Synch with Oort Gnus.
[elisp/gnus.git-] / texi / gnus.texi
1 \input texinfo
2
3 @setfilename gnus
4 @settitle T-gnus 6.15 Manual
5 @synindex fn cp
6 @synindex vr cp
7 @synindex pg cp
8 @dircategory Emacs
9 @direntry
10 * Gnus: (gnus).         The newsreader Gnus.
11 @end direntry
12 @iftex
13 @finalout
14 @end iftex
15 @setchapternewpage odd
16
17 @iftex
18 @iflatex
19 \documentclass[twoside,a4paper,openright,11pt]{book}
20 \usepackage[latin1]{inputenc}
21 \usepackage{pagestyle}
22 \usepackage{epsfig}
23 \usepackage{pixidx}
24 \input{gnusconfig.tex}
25
26 \ifx\pdfoutput\undefined
27 \else
28 \usepackage[pdftex,bookmarks,colorlinks=true]{hyperref}
29 \usepackage{thumbpdf}
30 \pdfcompresslevel=9
31 \fi
32
33 \makeindex
34 \begin{document}
35
36 \newcommand{\gnusversionname}{Oort Gnus v0.10}
37 \newcommand{\gnuschaptername}{}
38 \newcommand{\gnussectionname}{}
39
40 \newcommand{\gnusbackslash}{/}
41
42 \newcommand{\gnusref}[1]{``#1'' on page \pageref{#1}}
43 \ifx\pdfoutput\undefined
44 \newcommand{\gnusuref}[1]{\gnustt{#1}}
45 \else
46 \newcommand{\gnusuref}[1]{\href{#1}{\gnustt{#1}}}
47 \fi
48 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
49 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
50
51 \newcommand{\gnuskindex}[1]{\index{#1}}
52 \newcommand{\gnusindex}[1]{\index{#1}}
53
54 \newcommand{\gnustt}[1]{{\gnusselectttfont{}#1}}
55 \newcommand{\gnuscode}[1]{\gnustt{#1}}
56 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
57 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
58 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
59 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
60 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
61 \newcommand{\gnusdfn}[1]{\textit{#1}}
62 \newcommand{\gnusi}[1]{\textit{#1}}
63 \newcommand{\gnusstrong}[1]{\textbf{#1}}
64 \newcommand{\gnusemph}[1]{\textit{#1}}
65 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
66 \newcommand{\gnussc}[1]{\textsc{#1}}
67 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
68 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
69 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
70 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
71
72 \newcommand{\gnusbullet}{{${\bullet}$}}
73 \newcommand{\gnusdollar}{\$}
74 \newcommand{\gnusampersand}{\&}
75 \newcommand{\gnuspercent}{\%}
76 \newcommand{\gnushash}{\#}
77 \newcommand{\gnushat}{\symbol{"5E}}
78 \newcommand{\gnusunderline}{\symbol{"5F}}
79 \newcommand{\gnusnot}{$\neg$}
80 \newcommand{\gnustilde}{\symbol{"7E}}
81 \newcommand{\gnusless}{{$<$}}
82 \newcommand{\gnusgreater}{{$>$}}
83 \newcommand{\gnusbraceleft}{{$>$}}
84 \newcommand{\gnusbraceright}{{$>$}}
85
86 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
87 \newcommand{\gnusinteresting}{
88 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
89 }
90
91 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
92
93 \newcommand{\gnuspagechapter}[1]{
94 {\mbox{}}
95 }
96
97 \newdimen{\gnusdimen}
98 \gnusdimen 0pt
99
100 \newcommand{\gnuschapter}[2]{
101 \gnuscleardoublepage
102 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
103 \chapter{#2}
104 \renewcommand{\gnussectionname}{}
105 \renewcommand{\gnuschaptername}{#2}
106 \thispagestyle{empty}
107 \hspace*{-2cm}
108 \begin{picture}(500,500)(0,0)
109 \put(480,350){\makebox(0,0)[tr]{#1}}
110 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
111 \end{picture}
112 \clearpage
113 }
114
115 \newcommand{\gnusfigure}[3]{
116 \begin{figure}
117 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
118 #3
119 \end{picture}
120 \caption{#1}
121 \end{figure}
122 }
123
124 \newcommand{\gnusicon}[1]{
125 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
126 }
127
128 \newcommand{\gnuspicon}[1]{
129 \margindex{\epsfig{figure=#1,width=2cm}}
130 }
131
132 \newcommand{\gnusxface}[2]{
133 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
134 }
135
136 \newcommand{\gnussmiley}[2]{
137 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
138 }
139
140 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
141
142 \newcommand{\gnussection}[1]{
143 \renewcommand{\gnussectionname}{#1}
144 \section{#1}
145 }
146
147 \newenvironment{codelist}%
148 {\begin{list}{}{
149 }
150 }{\end{list}}
151
152 \newenvironment{kbdlist}%
153 {\begin{list}{}{
154 \labelwidth=0cm
155 }
156 }{\end{list}}
157
158 \newenvironment{dfnlist}%
159 {\begin{list}{}{
160 }
161 }{\end{list}}
162
163 \newenvironment{stronglist}%
164 {\begin{list}{}{
165 }
166 }{\end{list}}
167
168 \newenvironment{samplist}%
169 {\begin{list}{}{
170 }
171 }{\end{list}}
172
173 \newenvironment{varlist}%
174 {\begin{list}{}{
175 }
176 }{\end{list}}
177
178 \newenvironment{emphlist}%
179 {\begin{list}{}{
180 }
181 }{\end{list}}
182
183 \newlength\gnusheadtextwidth
184 \setlength{\gnusheadtextwidth}{\headtextwidth}
185 \addtolength{\gnusheadtextwidth}{1cm}
186
187 \newpagestyle{gnuspreamble}%
188 {
189 {
190 \ifodd\count0
191 {
192 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
193 }
194 \else
195 {
196 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
197 }
198 }
199 \fi
200 }
201 }
202 {
203 \ifodd\count0
204 \mbox{} \hfill
205 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
206 \else
207 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
208 \hfill \mbox{}
209 \fi
210 }
211
212 \newpagestyle{gnusindex}%
213 {
214 {
215 \ifodd\count0
216 {
217 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
218 }
219 \else
220 {
221 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
222 }
223 \fi
224 }
225 }
226 {
227 \ifodd\count0
228 \mbox{} \hfill
229 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
230 \else
231 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
232 \hfill \mbox{}
233 \fi
234 }
235
236 \newpagestyle{gnus}%
237 {
238 {
239 \ifodd\count0
240 {
241 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
242 }
243 \else
244 {
245 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
246 }
247 \fi
248 }
249 }
250 {
251 \ifodd\count0
252 \mbox{} \hfill
253 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
254 \else
255 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
256 \hfill \mbox{}
257 \fi
258 }
259
260 \pagenumbering{roman}
261 \pagestyle{gnuspreamble}
262
263 @end iflatex
264 @end iftex
265
266 @iftex
267 @iflatex
268 \begin{titlepage}
269 {
270
271 %\addtolength{\oddsidemargin}{-5cm}
272 %\addtolength{\evensidemargin}{-5cm}
273 \parindent=0cm
274 \addtolength{\textheight}{2cm}
275
276 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
277 \rule{15cm}{1mm}\\
278 \vfill
279 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
280 \vfill
281 \rule{15cm}{1mm}\\
282 \gnusauthor{by Lars Magne Ingebrigtsen}
283 \newpage
284 }
285
286 \mbox{}
287 \vfill
288
289 \thispagestyle{empty}
290
291 Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
292 Free Software Foundation, Inc.
293
294
295 Permission is granted to copy, distribute and/or modify this document
296 under the terms of the GNU Free Documentation License, Version 1.1 or
297 any later version published by the Free Software Foundation; with no
298 Invariant Sections, with the Front-Cover texts being ``A GNU
299 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
300 license is included in the section entitled ``GNU Free Documentation
301 License'' in the Emacs manual.
302
303 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
304 this GNU Manual, like GNU software.  Copies published by the Free
305 Software Foundation raise funds for GNU development.''
306
307 This document is part of a collection distributed under the GNU Free
308 Documentation License.  If you want to distribute this document
309 separately from the collection, you can do so by adding a copy of the
310 license to the document, as described in section 6 of the license.
311 \newpage
312 \end{titlepage}
313 @end iflatex
314 @end iftex
315
316 @ifnottex
317
318 This file documents gnus, the GNU Emacs newsreader.
319
320 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
321         Free Software Foundation, Inc.
322
323 Permission is granted to copy, distribute and/or modify this document
324 under the terms of the GNU Free Documentation License, Version 1.1 or
325 any later version published by the Free Software Foundation; with the
326 Invariant Sections being none, with the Front-Cover texts being ``A GNU
327 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
328 license is included in the section entitled ``GNU Free Documentation
329 License'' in the Emacs manual.
330
331 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
332 this GNU Manual, like GNU software.  Copies published by the Free
333 Software Foundation raise funds for GNU development.''
334
335 This document is part of a collection distributed under the GNU Free
336 Documentation License.  If you want to distribute this document
337 separately from the collection, you can do so by adding a copy of the
338 license to the document, as described in section 6 of the license.
339 @end ifnottex
340
341 @tex
342
343 @titlepage
344 @title T-gnus 6.15 Manual
345
346 @author by Lars Magne Ingebrigtsen
347 @page
348
349 @vskip 0pt plus 1filll
350 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002
351         Free Software Foundation, Inc.
352
353 Permission is granted to copy, distribute and/or modify this document
354 under the terms of the GNU Free Documentation License, Version 1.1 or
355 any later version published by the Free Software Foundation; with no
356 Invariant Sections, with the Front-Cover texts being ``A GNU
357 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
358 license is included in the section entitled ``GNU Free Documentation
359 License'' in the Emacs manual.
360
361 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
362 this GNU Manual, like GNU software.  Copies published by the Free
363 Software Foundation raise funds for GNU development.''
364
365 This document is part of a collection distributed under the GNU Free
366 Documentation License.  If you want to distribute this document
367 separately from the collection, you can do so by adding a copy of the
368 license to the document, as described in section 6 of the license.
369
370 @end titlepage
371 @page
372
373 @end tex
374
375
376 @node Top
377 @top The gnus Newsreader
378
379 @ifinfo
380
381 You can read news (and mail) from within Emacs by using gnus.  The news
382 can be gotten by any nefarious means you can think of---@sc{nntp}, local
383 spool or your mbox file.  All at the same time, if you want to push your
384 luck.
385
386 T-gnus provides @sc{mime} features based on @sc{semi} API.  So T-gnus
387 supports your right to read strange messages including big images or
388 other various kinds of formats.  T-gnus also supports
389 internationalization/localization and multiscript features based on MULE
390 API.  So T-gnus does not discriminate various language communities.
391 Oh, if you are a Klingon, please wait Unicode Next Generation.
392
393 This manual corresponds to T-gnus 6.15.
394
395 @end ifinfo
396
397 @iftex
398
399 @iflatex
400 \tableofcontents
401 \gnuscleardoublepage
402 @end iflatex
403
404 Gnus is the advanced, self-documenting, customizable, extensible
405 unreal-time newsreader for GNU Emacs.
406
407 Oops.  That sounds oddly familiar, so let's start over again to avoid
408 being accused of plagiarism:
409
410 Gnus is a message-reading laboratory.  It will let you look at just
411 about anything as if it were a newsgroup.  You can read mail with it,
412 you can browse directories with it, you can @code{ftp} with it---you
413 can even read news with it!
414
415 Gnus tries to empower people who read news the same way Emacs empowers
416 people who edit text.  Gnus sets no limits to what the user should be
417 allowed to do.  Users are encouraged to extend gnus to make it behave
418 like they want it to behave.  A program should not control people;
419 people should be empowered to do what they want by using (or abusing)
420 the program.
421
422 @end iftex
423
424 @menu
425 * Starting Up::                 Finding news can be a pain.
426 * Group Buffer::                Selecting, subscribing and killing groups.
427 * Summary Buffer::              Reading, saving and posting articles.
428 * Article Buffer::              Displaying and handling articles.
429 * Composing Messages::          Information on sending mail and news.
430 * Select Methods::              Gnus reads all messages from various select methods.
431 * Scoring::                     Assigning values to articles.
432 * Various::                     General purpose settings.
433 * The End::                     Farewell and goodbye.
434 * Appendices::                  Terminology, Emacs intro, FAQ, History, Internals.
435 * Index::                       Variable, function and concept index.
436 * Key Index::                   Key Index.
437
438 Other related manuals
439
440 * Message:(message).            Composing messages.
441 * Emacs-MIME:(emacs-mime).      Composing messages; MIME-specific parts.
442 * Sieve:(sieve).                Managing Sieve scripts in Emacs.
443 * PGG:(pgg).                    PGP/MIME with Gnus.
444
445 @detailmenu
446  --- The Detailed Node Listing ---
447
448 Starting Gnus
449
450 * Finding the News::            Choosing a method for getting news.
451 * The First Time::              What does Gnus do the first time you start it?
452 * The Server is Down::          How can I read my mail then?
453 * Slave Gnusae::                You can have more than one Gnus active at a time.
454 * Fetching a Group::            Starting Gnus just to read a group.
455 * New Groups::                  What is Gnus supposed to do with new groups?
456 * Changing Servers::            You may want to move from one server to another.
457 * Startup Files::               Those pesky startup files---@file{.newsrc}.
458 * Auto Save::                   Recovering from a crash.
459 * The Active File::             Reading the active file over a slow line Takes Time.
460 * Startup Variables::           Other variables you might change.
461
462 New Groups
463
464 * Checking New Groups::         Determining what groups are new.
465 * Subscription Methods::        What Gnus should do with new groups.
466 * Filtering New Groups::        Making Gnus ignore certain new groups.
467
468 Group Buffer
469
470 * Group Buffer Format::         Information listed and how you can change it.
471 * Group Maneuvering::           Commands for moving in the group buffer.
472 * Selecting a Group::           Actually reading news.
473 * Subscription Commands::       Unsubscribing, killing, subscribing.
474 * Group Data::                  Changing the info for a group.
475 * Group Levels::                Levels? What are those, then?
476 * Group Score::                 A mechanism for finding out what groups you like.
477 * Marking Groups::              You can mark groups for later processing.
478 * Foreign Groups::              Creating and editing groups.
479 * Group Parameters::            Each group may have different parameters set.
480 * Listing Groups::              Gnus can list various subsets of the groups.
481 * Sorting Groups::              Re-arrange the group order.
482 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
483 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
484 * Exiting Gnus::                Stop reading news and get some work done.
485 * Group Topics::                A folding group mode divided into topics.
486 * Misc Group Stuff::            Other stuff that you can to do.
487
488 Group Buffer Format
489
490 * Group Line Specification::    Deciding how the group buffer is to look.
491 * Group Modeline Specification::  The group buffer modeline.
492 * Group Highlighting::          Having nice colors in the group buffer.
493
494 Group Topics
495
496 * Topic Commands::              Interactive E-Z commands.
497 * Topic Variables::             How to customize the topics the Lisp Way.
498 * Topic Sorting::               Sorting each topic individually.
499 * Topic Topology::              A map of the world.
500 * Topic Parameters::            Parameters that apply to all groups in a topic.
501
502 Misc Group Stuff
503
504 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
505 * Group Information::           Information and help on groups and Gnus.
506 * Group Timestamp::             Making Gnus keep track of when you last read a group.
507 * File Commands::               Reading and writing the Gnus files.
508 * Sieve Commands::              Managing Sieve scripts.
509
510 Summary Buffer
511
512 * Summary Buffer Format::       Deciding how the summary buffer is to look.
513 * Summary Maneuvering::         Moving around the summary buffer.
514 * Choosing Articles::           Reading articles.
515 * Paging the Article::          Scrolling the current article.
516 * Reply Followup and Post::     Posting articles.
517 * Delayed Articles::            Send articles at a later time.
518 * Marking Articles::            Marking articles as read, expirable, etc.
519 * Limiting::                    You can limit the summary buffer.
520 * Threading::                   How threads are made.
521 * Sorting the Summary Buffer::  How articles and threads are sorted.
522 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
523 * Article Caching::             You may store articles in a cache.
524 * Persistent Articles::         Making articles expiry-resistant.
525 * Article Backlog::             Having already read articles hang around.
526 * Saving Articles::             Ways of customizing article saving.
527 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
528 * Article Treatment::           The article buffer can be mangled at will.
529 * MIME Commands::               Doing MIMEy things with the articles.
530 * Charsets::                    Character set issues.
531 * Article Commands::            Doing various things with the article buffer.
532 * Summary Sorting::             Sorting the summary buffer in various ways.
533 * Finding the Parent::          No child support? Get the parent.
534 * Alternative Approaches::      Reading using non-default summaries.
535 * Tree Display::                A more visual display of threads.
536 * Mail Group Commands::         Some commands can only be used in mail groups.
537 * Various Summary Stuff::       What didn't fit anywhere else.
538 * Exiting the Summary Buffer::  Returning to the Group buffer,
539                                 or reselecting the current group.
540 * Crosspost Handling::          How crossposted articles are dealt with.
541 * Duplicate Suppression::       An alternative when crosspost handling fails.
542 * Security::                    Decrypt and Verify.
543 * Mailing List::                Mailing list minor mode.
544
545 Summary Buffer Format
546
547 * Summary Buffer Lines::        You can specify how summary lines should look.
548 * To From Newsgroups::          How to not display your own name.
549 * Summary Buffer Mode Line::    You can say how the mode line should look.
550 * Summary Highlighting::        Making the summary buffer all pretty and nice.
551
552 Choosing Articles
553
554 * Choosing Commands::           Commands for choosing articles.
555 * Choosing Variables::          Variables that influence these commands.
556
557 Reply, Followup and Post
558
559 * Summary Mail Commands::       Sending mail.
560 * Summary Post Commands::       Sending news.
561 * Summary Message Commands::    Other Message-related commands.
562 * Canceling and Superseding::   
563
564 Marking Articles
565
566 * Unread Articles::             Marks for unread articles.
567 * Read Articles::               Marks for read articles.
568 * Other Marks::                 Marks that do not affect readedness.
569 * Setting Marks::               
570 * Generic Marking Commands::    
571 * Setting Process Marks::       
572
573 Marking Articles
574
575 * Setting Marks::             How to set and remove marks.
576 * Generic Marking Commands::  How to customize the marking.
577 * Setting Process Marks::     How to mark articles for later processing.
578
579 Threading
580
581 * Customizing Threading::       Variables you can change to affect the threading.
582 * Thread Commands::             Thread based commands in the summary buffer.
583
584 Customizing Threading
585
586 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
587 * Filling In Threads::          Making the threads displayed look fuller.
588 * More Threading::              Even more variables for fiddling with threads.
589 * Low-Level Threading::         You thought it was over... but you were wrong!
590
591 Decoding Articles
592
593 * Uuencoded Articles::          Uudecode articles.
594 * Shell Archives::              Unshar articles.
595 * PostScript Files::            Split PostScript.
596 * Other Files::                 Plain save and binhex.
597 * Decoding Variables::          Variables for a happy decoding.
598 * Viewing Files::               You want to look at the result of the decoding?
599
600 Decoding Variables
601
602 * Rule Variables::              Variables that say how a file is to be viewed.
603 * Other Decode Variables::      Other decode variables.
604 * Uuencoding and Posting::      Variables for customizing uuencoding.
605
606 Article Treatment
607
608 * Article Highlighting::        You want to make the article look like fruit salad.
609 * Article Fontisizing::         Making emphasized text look nice.
610 * Article Hiding::              You also want to make certain info go away.
611 * Article Washing::             Lots of way-neat functions to make life better.
612 * Article Header::              Doing various header transformations.
613 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
614 * Article Date::                Grumble, UT!
615 * Article Display::             Display various stuff---X-Face, Picons, Smileys
616 * Article Signature::           What is a signature?
617 * Article Miscellania::         Various other stuff.
618
619 Alternative Approaches
620
621 * Pick and Read::               First mark articles and then read them.
622 * Binary Groups::               Auto-decode all articles.
623
624 Various Summary Stuff
625
626 * Summary Group Information::   Information oriented commands.
627 * Searching for Articles::      Multiple article commands.
628 * Summary Generation Commands::  
629 * Really Various Summary Commands::  Those pesky non-conformant commands.
630
631 Article Buffer
632
633 * Hiding Headers::              Deciding what headers should be displayed.
634 * Using MIME::                  Pushing articles through @sc{mime} before reading them.
635 * Customizing Articles::        Tailoring the look of the articles.
636 * Article Keymap::              Keystrokes available in the article buffer.
637 * Misc Article::                Other stuff.
638
639 Composing Messages
640
641 * Mail::                        Mailing and replying.
642 * Posting Server::              What server should you post and mail via?
643 * Mail and Post::               Mailing and posting at the same time.
644 * Archived Messages::           Where Gnus stores the messages you've sent.
645 * Posting Styles::              An easier way to specify who you are.
646 * Drafts::                      Postponing messages and rejected messages.
647 * Rejected Articles::           What happens if the server doesn't like your article?
648 * Signing and encrypting::      How to compose secure messages.
649
650 Select Methods
651
652 * Server Buffer::               Making and editing virtual servers.
653 * Getting News::                Reading USENET news with Gnus.
654 * Getting Mail::                Reading your personal mail with Gnus.
655 * Browsing the Web::            Getting messages from a plethora of Web sources.
656 * IMAP::                        Using Gnus as a @sc{imap} client.
657 * Other Sources::               Reading directories, files, SOUP packets.
658 * Combined Groups::             Combining groups into one group.
659 * Gnus Unplugged::              Reading news and mail offline.
660
661 Server Buffer
662
663 * Server Buffer Format::        You can customize the look of this buffer.
664 * Server Commands::             Commands to manipulate servers.
665 * Example Methods::             Examples server specifications.
666 * Creating a Virtual Server::   An example session.
667 * Server Variables::            Which variables to set.
668 * Servers and Methods::         You can use server names as select methods.
669 * Unavailable Servers::         Some servers you try to contact may be down.
670
671 Getting News
672
673 * NNTP::                        Reading news from an @sc{nntp} server.
674 * News Spool::                  Reading news from the local spool.
675
676 @sc{nntp}
677
678 * Direct Functions::            Connecting directly to the server.
679 * Indirect Functions::          Connecting indirectly to the server.
680 * Common Variables::            Understood by several connection functions.
681
682 Getting Mail
683
684 * Mail in a Newsreader::        Important introductory notes.
685 * Getting Started Reading Mail::  A simple cookbook example.
686 * Splitting Mail::              How to create mail groups.
687 * Mail Sources::                How to tell Gnus where to get mail from.
688 * Mail Back End Variables::     Variables for customizing mail handling.
689 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
690 * Group Mail Splitting::        Use group customize to drive mail splitting.
691 * Incorporating Old Mail::      What about the old mail you have?
692 * Expiring Mail::               Getting rid of unwanted mail.
693 * Washing Mail::                Removing gruft from the mail you get.
694 * Duplicates::                  Dealing with duplicated mail.
695 * Not Reading Mail::            Using mail back ends for reading other files.
696 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
697
698 Mail Sources
699
700 * Mail Source Specifiers::      How to specify what a mail source is.
701 * Mail Source Customization::   Some variables that influence things.
702 * Fetching Mail::               Using the mail source specifiers.
703
704 Choosing a Mail Back End
705
706 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
707 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
708 * Mail Spool::                  Store your mail in a private spool?
709 * MH Spool::                    An mhspool-like back end.
710 * Mail Folders::                Having one file for each group.
711 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
712
713 Browsing the Web
714
715 * Archiving Mail::              
716 * Web Searches::                Creating groups from articles that match a string.
717 * Slashdot::                    Reading the Slashdot comments.
718 * Ultimate::                    The Ultimate Bulletin Board systems.
719 * Web Archive::                 Reading mailing list archived on web.
720 * RSS::                         Reading RDF site summary.
721 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
722
723 @sc{imap}
724
725 * Splitting in IMAP::           Splitting mail with nnimap.
726 * Expiring in IMAP::            Expiring mail with nnimap.
727 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
728 * Expunging mailboxes::         Equivalent of a "compress mailbox" button.
729 * A note on namespaces::        How to (not) use IMAP namespace in Gnus.
730
731 Other Sources
732
733 * Directory Groups::            You can read a directory as if it was a newsgroup.
734 * Anything Groups::             Dired?  Who needs dired?
735 * Document Groups::             Single files can be the basis of a group.
736 * SOUP::                        Reading @sc{soup} packets ``offline''.
737 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
738
739 Document Groups
740
741 * Document Server Internals::   How to add your own document types.
742
743 SOUP
744
745 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
746 * SOUP Groups::                 A back end for reading @sc{soup} packets.
747 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
748
749 Combined Groups
750
751 * Virtual Groups::              Combining articles from many groups.
752 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
753
754 Gnus Unplugged
755
756 * Agent Basics::                How it all is supposed to work.
757 * Agent Categories::            How to tell the Gnus Agent what to download.
758 * Agent Commands::              New commands for all the buffers.
759 * Agent as Cache::              The Agent is a big cache too.
760 * Agent Expiry::                How to make old articles go away.
761 * Agent and IMAP::              How to use the Agent with IMAP.
762 * Outgoing Messages::           What happens when you post/mail something?
763 * Agent Variables::             Customizing is fun.
764 * Example Setup::               An example @file{.gnus.el} file for offline people.
765 * Batching Agents::             How to fetch news from a @code{cron} job.
766 * Agent Caveats::               What you think it'll do and what it does.
767
768 Agent Categories
769
770 * Category Syntax::             What a category looks like.
771 * Category Buffer::             A buffer for maintaining categories.
772 * Category Variables::          Customize'r'Us.
773
774 Agent Commands
775
776 * Group Agent Commands::        
777 * Summary Agent Commands::      
778 * Server Agent Commands::       
779
780 Scoring
781
782 * Summary Score Commands::      Adding score entries for the current group.
783 * Group Score Commands::        General score commands.
784 * Score Variables::             Customize your scoring.  (My, what terminology).
785 * Score File Format::           What a score file may contain.
786 * Score File Editing::          You can edit score files by hand as well.
787 * Adaptive Scoring::            Big Sister Gnus knows what you read.
788 * Home Score File::             How to say where new score entries are to go.
789 * Followups To Yourself::       Having Gnus notice when people answer you.
790 * Scoring On Other Headers::    Scoring on non-standard headers.
791 * Scoring Tips::                How to score effectively.
792 * Reverse Scoring::             That problem child of old is not problem.
793 * Global Score Files::          Earth-spanning, ear-splitting score files.
794 * Kill Files::                  They are still here, but they can be ignored.
795 * Converting Kill Files::       Translating kill files to score files.
796 * GroupLens::                   Getting predictions on what you like to read.
797 * Advanced Scoring::            Using logical expressions to build score rules.
798 * Score Decays::                It can be useful to let scores wither away.
799
800 GroupLens
801
802 * Using GroupLens::             How to make Gnus use GroupLens.
803 * Rating Articles::             Letting GroupLens know how you rate articles.
804 * Displaying Predictions::      Displaying predictions given by GroupLens.
805 * GroupLens Variables::         Customizing GroupLens.
806
807 Advanced Scoring
808
809 * Advanced Scoring Syntax::     A definition.
810 * Advanced Scoring Examples::   What they look like.
811 * Advanced Scoring Tips::       Getting the most out of it.
812
813 Various
814
815 * Process/Prefix::              A convention used by many treatment commands.
816 * Interactive::                 Making Gnus ask you many questions.
817 * Symbolic Prefixes::           How to supply some Gnus functions with options.
818 * Formatting Variables::        You can specify what buffers should look like.
819 * Window Layout::               Configuring the Gnus buffer windows.
820 * Faces and Fonts::             How to change how faces look.
821 * Compilation::                 How to speed Gnus up.
822 * Mode Lines::                  Displaying information in the mode lines.
823 * Highlighting and Menus::      Making buffers look all nice and cozy.
824 * Buttons::                     Get tendinitis in ten easy steps!
825 * Daemons::                     Gnus can do things behind your back.
826 * NoCeM::                       How to avoid spam and other fatty foods.
827 * Undo::                        Some actions can be undone.
828 * Predicate Specifiers::        Specifying predicates.
829 * Moderation::                  What to do if you're a moderator.
830 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
831 * Fuzzy Matching::              What's the big fuzz?
832 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
833 * Various Various::             Things that are really various.
834
835 Formatting Variables
836
837 * Formatting Basics::           A formatting variable is basically a format string.
838 * Mode Line Formatting::        Some rules about mode line formatting variables.
839 * Advanced Formatting::         Modifying output in various ways.
840 * User-Defined Specs::          Having Gnus call your own functions.
841 * Formatting Fonts::            Making the formatting look colorful and nice.
842 * Positioning Point::           Moving point to a position after an operation.
843 * Tabulation::                  Tabulating your output.
844 * Wide Characters::             Dealing with wide characters.
845
846 Image Enhancements
847
848 * Picons::                      How to display pictures of what you're reading.
849 * Smileys::                     Show all those happy faces the way they were meant to be shown.
850 * X-Face::                      Display a funky, teensy black-and-white image.
851 * Toolbar::                     Click'n'drool.
852 * XVarious::                    Other XEmacsy Gnusey variables.
853
854 Picons
855
856 * Picon Basics::                What are picons and How do I get them.
857 * Picon Requirements::          Don't go further if you aren't using XEmacs.
858 * Easy Picons::                 Displaying Picons---the easy way.
859 * Hard Picons::                 The way you should do it.  You'll learn something.
860 * Picon Useless Configuration::  Other variables you can trash/tweak/munge/play with.
861
862 Thwarting Email Spam
863
864 * The problem of spam::         Some background, and some solutions
865 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
866 * SpamAssassin::                How to use external anti-spam tools.
867 * Hashcash::                    Reduce spam by burning CPU time.
868 * Filtering Spam Using spam.el::  
869 * Filtering Spam Using Statistics (spam-stat.el)::  
870
871 Appendices
872
873 * XEmacs::                      Requirements for installing under XEmacs.
874 * History::                     How Gnus got where it is today.
875 * On Writing Manuals::          Why this is not a beginner's guide.
876 * Terminology::                 We use really difficult, like, words here.
877 * Customization::               Tailoring Gnus to your needs.
878 * Troubleshooting::             What you might try if things do not work.
879 * Gnus Reference Guide::        Rilly, rilly technical stuff.
880 * Emacs for Heathens::          A short introduction to Emacsian terms.
881 * Frequently Asked Questions::
882
883 History
884
885 * Gnus Versions::               What Gnus versions have been released.
886 * Other Gnus Versions::         Other Gnus versions that also have been released.
887 * Why?::                        What's the point of Gnus?
888 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
889 * Conformity::                  Gnus tries to conform to all standards.
890 * Emacsen::                     Gnus can be run on a few modern Emacsen.
891 * Gnus Development::            How Gnus is developed.
892 * Contributors::                Oodles of people.
893 * New Features::                Pointers to some of the new stuff in Gnus.
894
895 New Features
896
897 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
898 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
899 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
900 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
901 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
902
903 Customization
904
905 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
906 * Slow Terminal Connection::    You run a remote Emacs.
907 * Little Disk Space::           You feel that having large setup files is icky.
908 * Slow Machine::                You feel like buying a faster machine.
909
910 Gnus Reference Guide
911
912 * Gnus Utility Functions::      Common functions and variable to use.
913 * Back End Interface::          How Gnus communicates with the servers.
914 * Score File Syntax::           A BNF definition of the score file standard.
915 * Headers::                     How Gnus stores headers internally.
916 * Ranges::                      A handy format for storing mucho numbers.
917 * Group Info::                  The group info format.
918 * Extended Interactive::        Symbolic prefixes and stuff.
919 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
920 * Various File Formats::        Formats of files that Gnus use.
921
922 Back End Interface
923
924 * Required Back End Functions::  Functions that must be implemented.
925 * Optional Back End Functions::  Functions that need not be implemented.
926 * Error Messaging::             How to get messages and report errors.
927 * Writing New Back Ends::       Extending old back ends.
928 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
929 * Mail-like Back Ends::         Some tips on mail back ends.
930
931 Various File Formats
932
933 * Active File Format::          Information on articles and groups available.
934 * Newsgroups File Format::      Group descriptions.
935
936 Emacs for Heathens
937
938 * Keystrokes::                  Entering text and executing commands.
939 * Emacs Lisp::                  The built-in Emacs programming language.
940
941 @end detailmenu
942 @end menu
943
944 @node Starting Up
945 @chapter Starting gnus
946 @cindex starting up
947
948 @kindex M-x gnus
949 @findex gnus
950 If your system administrator has set things up properly, starting gnus
951 and reading news is extremely easy---you just type @kbd{M-x gnus} in
952 your Emacs.
953
954 @findex gnus-other-frame
955 @kindex M-x gnus-other-frame
956 If you want to start gnus in a different frame, you can use the command
957 @kbd{M-x gnus-other-frame} instead.
958
959 If things do not go smoothly at startup, you have to twiddle some
960 variables in your @file{~/.gnus} file.  This file is similar to
961 @file{~/.emacs}, but is read when gnus starts.
962
963 If you puzzle at any terms used in this manual, please refer to the
964 terminology section (@pxref{Terminology}).
965
966 @menu
967 * Finding the News::            Choosing a method for getting news.
968 * The First Time::              What does Gnus do the first time you start it?
969 * The Server is Down::          How can I read my mail then?
970 * Slave Gnusae::                You can have more than one Gnus active at a time.
971 * Fetching a Group::            Starting Gnus just to read a group.
972 * New Groups::                  What is Gnus supposed to do with new groups?
973 * Changing Servers::            You may want to move from one server to another.
974 * Startup Files::               Those pesky startup files---@file{.newsrc}.
975 * Auto Save::                   Recovering from a crash.
976 * The Active File::             Reading the active file over a slow line Takes Time.
977 * Startup Variables::           Other variables you might change.
978 @end menu
979
980
981 @node Finding the News
982 @section Finding the News
983 @cindex finding news
984
985 @vindex gnus-select-method
986 @c @head
987 The @code{gnus-select-method} variable says where gnus should look for
988 news.  This variable should be a list where the first element says
989 @dfn{how} and the second element says @dfn{where}.  This method is your
990 native method.  All groups not fetched with this method are
991 foreign groups.
992
993 For instance, if the @samp{news.somewhere.edu} @sc{nntp} server is where
994 you want to get your daily dosage of news from, you'd say:
995
996 @lisp
997 (setq gnus-select-method '(nntp "news.somewhere.edu"))
998 @end lisp
999
1000 If you want to read directly from the local spool, say:
1001
1002 @lisp
1003 (setq gnus-select-method '(nnspool ""))
1004 @end lisp
1005
1006 If you can use a local spool, you probably should, as it will almost
1007 certainly be much faster.  But do not use the local spool if your
1008 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
1009
1010 @vindex gnus-nntpserver-file
1011 @cindex NNTPSERVER
1012 @cindex @sc{nntp} server
1013 If this variable is not set, gnus will take a look at the
1014 @code{NNTPSERVER} environment variable.  If that variable isn't set,
1015 gnus will see whether @code{gnus-nntpserver-file}
1016 (@file{/etc/nntpserver} by default) has any opinions on the matter.  If
1017 that fails as well, gnus will try to use the machine running Emacs as an @sc{nntp} server.  That's a long shot, though.
1018
1019 @vindex gnus-nntp-server
1020 If @code{gnus-nntp-server} is set, this variable will override
1021 @code{gnus-select-method}.  You should therefore set
1022 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1023
1024 @vindex gnus-secondary-servers
1025 @vindex gnus-nntp-server
1026 You can also make gnus prompt you interactively for the name of an
1027 @sc{nntp} server.  If you give a non-numerical prefix to @code{gnus}
1028 (i.e., @kbd{C-u M-x gnus}), gnus will let you choose between the servers
1029 in the @code{gnus-secondary-servers} list (if any).  You can also just
1030 type in the name of any server you feel like visiting.  (Note that this
1031 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1032 gnus} later in the same Emacs session, Gnus will contact the same
1033 server.)
1034
1035 @findex gnus-group-browse-foreign-server
1036 @kindex B (Group)
1037 However, if you use one @sc{nntp} server regularly and are just
1038 interested in a couple of groups from a different server, you would be
1039 better served by using the @kbd{B} command in the group buffer.  It will
1040 let you have a look at what groups are available, and you can subscribe
1041 to any of the groups you want to.  This also makes @file{.newsrc}
1042 maintenance much tidier.  @xref{Foreign Groups}.
1043
1044 @vindex gnus-secondary-select-methods
1045 @c @head
1046 A slightly different approach to foreign groups is to set the
1047 @code{gnus-secondary-select-methods} variable.  The select methods
1048 listed in this variable are in many ways just as native as the
1049 @code{gnus-select-method} server.  They will also be queried for active
1050 files during startup (if that's required), and new newsgroups that
1051 appear on these servers will be subscribed (or not) just as native
1052 groups are.
1053
1054 For instance, if you use the @code{nnmbox} back end to read your mail,
1055 you would typically set this variable to
1056
1057 @lisp
1058 (setq gnus-secondary-select-methods '((nnmbox "")))
1059 @end lisp
1060
1061
1062 @node The First Time
1063 @section The First Time
1064 @cindex first time usage
1065
1066 If no startup files exist, gnus will try to determine what groups should
1067 be subscribed by default.
1068
1069 @vindex gnus-default-subscribed-newsgroups
1070 If the variable @code{gnus-default-subscribed-newsgroups} is set, gnus
1071 will subscribe you to just those groups in that list, leaving the rest
1072 killed.  Your system administrator should have set this variable to
1073 something useful.
1074
1075 Since she hasn't, gnus will just subscribe you to a few arbitrarily
1076 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1077 here as @dfn{whatever Lars thinks you should read}.)
1078
1079 You'll also be subscribed to the gnus documentation group, which should
1080 help you with most common problems.
1081
1082 If @code{gnus-default-subscribed-newsgroups} is @code{t}, gnus will just
1083 use the normal functions for handling new groups, and not do anything
1084 special.
1085
1086
1087 @node The Server is Down
1088 @section The Server is Down
1089 @cindex server errors
1090
1091 If the default server is down, gnus will understandably have some
1092 problems starting.  However, if you have some mail groups in addition to
1093 the news groups, you may want to start gnus anyway.
1094
1095 Gnus, being the trusting sort of program, will ask whether to proceed
1096 without a native select method if that server can't be contacted.  This
1097 will happen whether the server doesn't actually exist (i.e., you have
1098 given the wrong address) or the server has just momentarily taken ill
1099 for some reason or other.  If you decide to continue and have no foreign
1100 groups, you'll find it difficult to actually do anything in the group
1101 buffer.  But, hey, that's your problem.  Blllrph!
1102
1103 @findex gnus-no-server
1104 @kindex M-x gnus-no-server
1105 @c @head
1106 If you know that the server is definitely down, or you just want to read
1107 your mail without bothering with the server at all, you can use the
1108 @code{gnus-no-server} command to start gnus.  That might come in handy
1109 if you're in a hurry as well.  This command will not attempt to contact
1110 your primary server---instead, it will just activate all groups on level
1111 1 and 2.  (You should preferably keep no native groups on those two
1112 levels.) Also @pxref{Group Levels}.
1113
1114
1115 @node Slave Gnusae
1116 @section Slave Gnusae
1117 @cindex slave
1118
1119 You might want to run more than one Emacs with more than one gnus at the
1120 same time.  If you are using different @file{.newsrc} files (e.g., if you
1121 are using the two different gnusae to read from two different servers),
1122 that is no problem whatsoever.  You just do it.
1123
1124 The problem appears when you want to run two Gnusae that use the same
1125 @code{.newsrc} file.
1126
1127 To work around that problem some, we here at the Think-Tank at the gnus
1128 Towers have come up with a new concept: @dfn{Masters} and
1129 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1130 taken out a copyright on those words.  If you wish to use those words in
1131 conjunction with each other, you have to send $1 per usage instance to
1132 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1133 Applications}) will be much more expensive, of course.)
1134
1135 Anyway, you start one gnus up the normal way with @kbd{M-x gnus} (or
1136 however you do it).  Each subsequent slave gnusae should be started with
1137 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1138 files, but instead save @dfn{slave files} that contain information only
1139 on what groups have been read in the slave session.  When a master gnus
1140 starts, it will read (and delete) these slave files, incorporating all
1141 information from them.  (The slave files will be read in the sequence
1142 they were created, so the latest changes will have precedence.)
1143
1144 Information from the slave files has, of course, precedence over the
1145 information in the normal (i.e., master) @code{.newsrc} file.
1146
1147 If the @code{.newsrc*} files have not been saved in the master when the
1148 slave starts, you may be prompted as to whether to read an auto-save
1149 file.  If you answer "yes", the unsaved changes to the master will be
1150 incorporated into the slave.  If you answer "no", the slave may see some
1151 messages as unread that have been read in the master.
1152
1153 @node Fetching a Group
1154 @section Fetching a Group
1155 @cindex fetching a group
1156
1157 @findex gnus-fetch-group
1158 It is sometimes convenient to be able to just say ``I want to read this
1159 group and I don't care whether gnus has been started or not''.  This is
1160 perhaps more useful for people who write code than for users, but the
1161 command @code{gnus-fetch-group} provides this functionality in any case.
1162 It takes the group name as a parameter.
1163
1164
1165 @node New Groups
1166 @section New Groups
1167 @cindex new groups
1168 @cindex subscription
1169
1170 @vindex gnus-check-new-newsgroups
1171 If you are satisfied that you really never want to see any new groups,
1172 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1173 also save you some time at startup.  Even if this variable is
1174 @code{nil}, you can always subscribe to the new groups just by pressing
1175 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1176 is @code{ask-server} by default.  If you set this variable to
1177 @code{always}, then Gnus will query the back ends for new groups even
1178 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1179
1180 @menu
1181 * Checking New Groups::         Determining what groups are new.
1182 * Subscription Methods::        What Gnus should do with new groups.
1183 * Filtering New Groups::        Making Gnus ignore certain new groups.
1184 @end menu
1185
1186
1187 @node Checking New Groups
1188 @subsection Checking New Groups
1189
1190 Gnus normally determines whether a group is new or not by comparing the
1191 list of groups from the active file(s) with the lists of subscribed and
1192 dead groups.  This isn't a particularly fast method.  If
1193 @code{gnus-check-new-newsgroups} is @code{ask-server}, gnus will ask the
1194 server for new groups since the last time.  This is both faster and
1195 cheaper.  This also means that you can get rid of the list of killed
1196 groups altogether, so you may set @code{gnus-save-killed-list} to
1197 @code{nil}, which will save time both at startup, at exit, and all over.
1198 Saves disk space, too.  Why isn't this the default, then?
1199 Unfortunately, not all servers support this command.
1200
1201 I bet I know what you're thinking now: How do I find out whether my
1202 server supports @code{ask-server}?  No?  Good, because I don't have a
1203 fail-safe answer.  I would suggest just setting this variable to
1204 @code{ask-server} and see whether any new groups appear within the next
1205 few days.  If any do, then it works.  If none do, then it doesn't
1206 work.  I could write a function to make gnus guess whether the server
1207 supports @code{ask-server}, but it would just be a guess.  So I won't.
1208 You could @code{telnet} to the server and say @code{HELP} and see
1209 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1210 it does, then it might work.  (But there are servers that lists
1211 @samp{NEWGROUPS} without supporting the function properly.)
1212
1213 This variable can also be a list of select methods.  If so, gnus will
1214 issue an @code{ask-server} command to each of the select methods, and
1215 subscribe them (or not) using the normal methods.  This might be handy
1216 if you are monitoring a few servers for new groups.  A side effect is
1217 that startup will take much longer, so you can meditate while waiting.
1218 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1219
1220
1221 @node Subscription Methods
1222 @subsection Subscription Methods
1223
1224 @vindex gnus-subscribe-newsgroup-method
1225 What gnus does when it encounters a new group is determined by the
1226 @code{gnus-subscribe-newsgroup-method} variable.
1227
1228 This variable should contain a function.  This function will be called
1229 with the name of the new group as the only parameter.
1230
1231 Some handy pre-fab functions are:
1232
1233 @table @code
1234
1235 @item gnus-subscribe-zombies
1236 @vindex gnus-subscribe-zombies
1237 Make all new groups zombies.  This is the default.  You can browse the
1238 zombies later (with @kbd{A z}) and either kill them all off properly
1239 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1240
1241 @item gnus-subscribe-randomly
1242 @vindex gnus-subscribe-randomly
1243 Subscribe all new groups in arbitrary order.  This really means that all
1244 new groups will be added at ``the top'' of the group buffer.
1245
1246 @item gnus-subscribe-alphabetically
1247 @vindex gnus-subscribe-alphabetically
1248 Subscribe all new groups in alphabetical order.
1249
1250 @item gnus-subscribe-hierarchically
1251 @vindex gnus-subscribe-hierarchically
1252 Subscribe all new groups hierarchically.  The difference between this
1253 function and @code{gnus-subscribe-alphabetically} is slight.
1254 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1255 alphabetical fashion, while this function will enter groups into its
1256 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1257 @samp{comp} hierarchy, this function will not mess that configuration
1258 up.  Or something like that.
1259
1260 @item gnus-subscribe-interactively
1261 @vindex gnus-subscribe-interactively
1262 Subscribe new groups interactively.  This means that gnus will ask
1263 you about @strong{all} new groups.  The groups you choose to subscribe
1264 to will be subscribed hierarchically.
1265
1266 @item gnus-subscribe-killed
1267 @vindex gnus-subscribe-killed
1268 Kill all new groups.
1269
1270 @item gnus-subscribe-topics
1271 @vindex gnus-subscribe-topics
1272 Put the groups into the topic that has a matching @code{subscribe} topic
1273 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1274 topic parameter that looks like
1275
1276 @example
1277 "nnslashdot"
1278 @end example
1279
1280 will mean that all groups that match that regex will be subscribed under
1281 that topic.
1282
1283 If no topics match the groups, the groups will be subscribed in the
1284 top-level topic.
1285
1286 @end table
1287
1288 @vindex gnus-subscribe-hierarchical-interactive
1289 A closely related variable is
1290 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1291 mouthful.)  If this variable is non-@code{nil}, gnus will ask you in a
1292 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1293 will ask you for each sub-hierarchy whether you want to descend the
1294 hierarchy or not.
1295
1296 One common mistake is to set the variable a few paragraphs above
1297 (@code{gnus-subscribe-newsgroup-method}) to
1298 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1299 will not work.  This is ga-ga.  So don't do it.
1300
1301
1302 @node Filtering New Groups
1303 @subsection Filtering New Groups
1304
1305 A nice and portable way to control which new newsgroups should be
1306 subscribed (or ignored) is to put an @dfn{options} line at the start of
1307 the @file{.newsrc} file.  Here's an example:
1308
1309 @example
1310 options -n !alt.all !rec.all sci.all
1311 @end example
1312
1313 @vindex gnus-subscribe-options-newsgroup-method
1314 This line obviously belongs to a serious-minded intellectual scientific
1315 person (or she may just be plain old boring), because it says that all
1316 groups that have names beginning with @samp{alt} and @samp{rec} should
1317 be ignored, and all groups with names beginning with @samp{sci} should
1318 be subscribed.  Gnus will not use the normal subscription method for
1319 subscribing these groups.
1320 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1321 variable defaults to @code{gnus-subscribe-alphabetically}.
1322
1323 @vindex gnus-options-not-subscribe
1324 @vindex gnus-options-subscribe
1325 If you don't want to mess with your @file{.newsrc} file, you can just
1326 set the two variables @code{gnus-options-subscribe} and
1327 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1328 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1329 and if the new group matches the former, it will be unconditionally
1330 subscribed, and if it matches the latter, it will be ignored.
1331
1332 @vindex gnus-auto-subscribed-groups
1333 Yet another variable that meddles here is
1334 @code{gnus-auto-subscribed-groups}.  It works exactly like
1335 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
1336 thought it would be nice to have two of these.  This variable is more
1337 meant for setting some ground rules, while the other variable is used
1338 more for user fiddling.  By default this variable makes all new groups
1339 that come from mail back ends (@code{nnml}, @code{nnbabyl},
1340 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1341 subscribed.  If you don't like that, just set this variable to
1342 @code{nil}.
1343
1344 New groups that match this regexp are subscribed using
1345 @code{gnus-subscribe-options-newsgroup-method}.
1346
1347
1348 @node Changing Servers
1349 @section Changing Servers
1350 @cindex changing servers
1351
1352 Sometimes it is necessary to move from one @sc{nntp} server to another.
1353 This happens very rarely, but perhaps you change jobs, or one server is
1354 very flaky and you want to use another.
1355
1356 Changing the server is pretty easy, right?  You just change
1357 @code{gnus-select-method} to point to the new server?
1358
1359 @emph{Wrong!}
1360
1361 Article numbers are not (in any way) kept synchronized between different
1362 @sc{nntp} servers, and the only way Gnus keeps track of what articles
1363 you have read is by keeping track of article numbers.  So when you
1364 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1365 worthless.
1366
1367 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1368 file from one server to another.  They all have one thing in
1369 common---they take a looong time to run.  You don't want to use these
1370 functions more than absolutely necessary.
1371
1372 @kindex M-x gnus-change-server
1373 @findex gnus-change-server
1374 If you have access to both servers, Gnus can request the headers for all
1375 the articles you have read and compare @code{Message-ID}s and map the
1376 article numbers of the read articles and article marks.  The @kbd{M-x
1377 gnus-change-server} command will do this for all your native groups.  It
1378 will prompt for the method you want to move to.
1379
1380 @kindex M-x gnus-group-move-group-to-server
1381 @findex gnus-group-move-group-to-server
1382 You can also move individual groups with the @kbd{M-x
1383 gnus-group-move-group-to-server} command.  This is useful if you want to
1384 move a (foreign) group from one server to another.
1385
1386 @kindex M-x gnus-group-clear-data-on-native-groups
1387 @findex gnus-group-clear-data-on-native-groups
1388 If you don't have access to both the old and new server, all your marks
1389 and read ranges have become worthless.  You can use the @kbd{M-x
1390 gnus-group-clear-data-on-native-groups} command to clear out all data
1391 that you have on your native groups.  Use with caution.
1392
1393 @kindex M-x gnus-group-clear-data
1394 @findex gnus-group-clear-data
1395 Clear the data from the current group only---nix out marks and the
1396 list of read articles (@code{gnus-group-clear-data}).
1397
1398 After changing servers, you @strong{must} move the cache hierarchy away,
1399 since the cached articles will have wrong article numbers, which will
1400 affect which articles Gnus thinks are read.
1401 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1402 to have it done automatically; for @code{gnus-group-clear-data}, you
1403 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1404 cache for all groups).
1405
1406
1407 @node Startup Files
1408 @section Startup Files
1409 @cindex startup files
1410 @cindex .newsrc
1411 @cindex .newsrc.el
1412 @cindex .newsrc.eld
1413
1414 Now, you all know about the @file{.newsrc} file.  All subscription
1415 information is traditionally stored in this file.
1416
1417 Things got a bit more complicated with @sc{gnus}.  In addition to
1418 keeping the @file{.newsrc} file updated, it also used a file called
1419 @file{.newsrc.el} for storing all the information that didn't fit into
1420 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1421 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1422 files was the most recently saved, which enabled people to swap between
1423 @sc{gnus} and other newsreaders.
1424
1425 That was kinda silly, so Gnus went one better: In addition to the
1426 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1427 @file{.newsrc.eld}.  It will read whichever of these files that are most
1428 recent, but it will never write a @file{.newsrc.el} file.  You should
1429 never delete the @file{.newsrc.eld} file---it contains much information
1430 not stored in the @file{.newsrc} file.
1431
1432 @vindex gnus-save-newsrc-file
1433 @vindex gnus-read-newsrc-file
1434 You can turn off writing the @file{.newsrc} file by setting
1435 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1436 the file and save some space, as well as exiting from gnus faster.
1437 However, this will make it impossible to use other newsreaders than
1438 gnus.  But hey, who would want to, right?  Similarly, setting
1439 @code{gnus-read-newsrc-file} to @code{nil} makes gnus ignore the
1440 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1441 convenient if you have a tendency to use Netscape once in a while.
1442
1443 @vindex gnus-save-killed-list
1444 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1445 will not save the list of killed groups to the startup file.  This will
1446 save both time (when starting and quitting) and space (on disk).  It
1447 will also mean that Gnus has no record of what groups are new or old,
1448 so the automatic new groups subscription methods become meaningless.
1449 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1450 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1451 Groups}).  This variable can also be a regular expression.  If that's
1452 the case, remove all groups that do not match this regexp before
1453 saving.  This can be useful in certain obscure situations that involve
1454 several servers where not all servers support @code{ask-server}.
1455
1456 @vindex gnus-startup-file
1457 The @code{gnus-startup-file} variable says where the startup files are.
1458 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1459 file being whatever that one is, with a @samp{.eld} appended.
1460
1461 @vindex gnus-save-newsrc-hook
1462 @vindex gnus-save-quick-newsrc-hook
1463 @vindex gnus-save-standard-newsrc-hook
1464 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1465 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1466 saving the @file{.newsrc.eld} file, and
1467 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1468 @file{.newsrc} file.  The latter two are commonly used to turn version
1469 control on or off.  Version control is on by default when saving the
1470 startup files.  If you want to turn backup creation off, say something like:
1471
1472 @lisp
1473 (defun turn-off-backup ()
1474   (set (make-local-variable 'backup-inhibited) t))
1475
1476 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1477 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1478 @end lisp
1479
1480 @vindex gnus-init-file
1481 When gnus starts, it will read the @code{gnus-site-init-file}
1482 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1483 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1484 and can be used to avoid cluttering your @file{~/.emacs} and
1485 @file{site-init} files with gnus stuff.  Gnus will also check for files
1486 with the same names as these, but with @file{.elc} and @file{.el}
1487 suffixes.  In other words, if you have set @code{gnus-init-file} to
1488 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1489 and finally @file{~/.gnus} (in this order).
1490
1491
1492
1493 @node Auto Save
1494 @section Auto Save
1495 @cindex dribble file
1496 @cindex auto-save
1497
1498 Whenever you do something that changes the gnus data (reading articles,
1499 catching up, killing/subscribing groups), the change is added to a
1500 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1501 Emacs way.  If your Emacs should crash before you have saved the
1502 @file{.newsrc} files, all changes you have made can be recovered from
1503 this file.
1504
1505 If gnus detects this file at startup, it will ask the user whether to
1506 read it.  The auto save file is deleted whenever the real startup file is
1507 saved.
1508
1509 @vindex gnus-use-dribble-file
1510 If @code{gnus-use-dribble-file} is @code{nil}, gnus won't create and
1511 maintain a dribble buffer.  The default is @code{t}.
1512
1513 @vindex gnus-dribble-directory
1514 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1515 this variable is @code{nil}, which it is by default, gnus will dribble
1516 into the directory where the @file{.newsrc} file is located.  (This is
1517 normally the user's home directory.)  The dribble file will get the same
1518 file permissions as the @code{.newsrc} file.
1519
1520 @vindex gnus-always-read-dribble-file
1521 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1522 read the dribble file on startup without querying the user.
1523
1524
1525 @node The Active File
1526 @section The Active File
1527 @cindex active file
1528 @cindex ignored groups
1529
1530 When gnus starts, or indeed whenever it tries to determine whether new
1531 articles have arrived, it reads the active file.  This is a very large
1532 file that lists all the active groups and articles on the server.
1533
1534 @vindex gnus-ignored-newsgroups
1535 Before examining the active file, gnus deletes all lines that match the
1536 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1537 any groups with bogus names, but you can use this variable to make gnus
1538 ignore hierarchies you aren't ever interested in.  However, this is not
1539 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1540 Groups} for an overview of other variables that can be used instead.
1541
1542 @c This variable is
1543 @c @code{nil} by default, and will slow down active file handling somewhat
1544 @c if you set it to anything else.
1545
1546 @vindex gnus-read-active-file
1547 @c @head
1548 The active file can be rather Huge, so if you have a slow network, you
1549 can set @code{gnus-read-active-file} to @code{nil} to prevent gnus from
1550 reading the active file.  This variable is @code{some} by default.
1551
1552 Gnus will try to make do by getting information just on the groups that
1553 you actually subscribe to.
1554
1555 Note that if you subscribe to lots and lots of groups, setting this
1556 variable to @code{nil} will probably make gnus slower, not faster.  At
1557 present, having this variable @code{nil} will slow gnus down
1558 considerably, unless you read news over a 2400 baud modem.
1559
1560 This variable can also have the value @code{some}.  Gnus will then
1561 attempt to read active info only on the subscribed groups.  On some
1562 servers this is quite fast (on sparkling, brand new INN servers that
1563 support the @code{LIST ACTIVE group} command), on others this isn't fast
1564 at all.  In any case, @code{some} should be faster than @code{nil}, and
1565 is certainly faster than @code{t} over slow lines.
1566
1567 Some news servers (old versions of Leafnode and old versions of INN, for
1568 instance) do not support the @code{LIST ACTIVE group}.  For these
1569 servers, @code{nil} is probably the most efficient value for this
1570 variable.
1571
1572 If this variable is @code{nil}, gnus will ask for group info in total
1573 lock-step, which isn't very fast.  If it is @code{some} and you use an
1574 @sc{nntp} server, gnus will pump out commands as fast as it can, and
1575 read all the replies in one swoop.  This will normally result in better
1576 performance, but if the server does not support the aforementioned
1577 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1578
1579 If you think that starting up Gnus takes too long, try all the three
1580 different values for this variable and see what works best for you.
1581
1582 In any case, if you use @code{some} or @code{nil}, you should definitely
1583 kill all groups that you aren't interested in to speed things up.
1584
1585 Note that this variable also affects active file retrieval from
1586 secondary select methods.
1587
1588
1589 @node Startup Variables
1590 @section Startup Variables
1591
1592 @table @code
1593
1594 @item gnus-load-hook
1595 @vindex gnus-load-hook
1596 A hook run while gnus is being loaded.  Note that this hook will
1597 normally be run just once in each Emacs session, no matter how many
1598 times you start gnus.
1599
1600 @item gnus-before-startup-hook
1601 @vindex gnus-before-startup-hook
1602 A hook run after starting up gnus successfully.
1603
1604 @item gnus-startup-hook
1605 @vindex gnus-startup-hook
1606 A hook run as the very last thing after starting up gnus
1607
1608 @item gnus-started-hook
1609 @vindex gnus-started-hook
1610 A hook that is run as the very last thing after starting up gnus
1611 successfully.
1612
1613 @item gnus-setup-news-hook
1614 @vindex gnus-setup-news-hook
1615 A hook that is run after reading the @file{.newsrc} file(s), but before
1616 generating the group buffer.
1617
1618 @item gnus-check-bogus-newsgroups
1619 @vindex gnus-check-bogus-newsgroups
1620 If non-@code{nil}, gnus will check for and delete all bogus groups at
1621 startup.  A @dfn{bogus group} is a group that you have in your
1622 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1623 bogus groups can take quite a while, so to save time and resources it's
1624 best to leave this option off, and do the checking for bogus groups once
1625 in a while from the group buffer instead (@pxref{Group Maintenance}).
1626
1627 @item gnus-inhibit-startup-message
1628 @vindex gnus-inhibit-startup-message
1629 If non-@code{nil}, the startup message won't be displayed.  That way,
1630 your boss might not notice as easily that you are reading news instead
1631 of doing your job.  Note that this variable is used before
1632 @file{.gnus.el} is loaded, so it should be set in @code{.emacs} instead.
1633
1634 @item gnus-no-groups-message
1635 @vindex gnus-no-groups-message
1636 Message displayed by gnus when no groups are available.
1637
1638 @item gnus-play-startup-jingle
1639 @vindex gnus-play-startup-jingle
1640 If non-@code{nil}, play the gnus jingle at startup.
1641
1642 @item gnus-startup-jingle
1643 @vindex gnus-startup-jingle
1644 Jingle to be played if the above variable is non-@code{nil}.  The
1645 default is @samp{Tuxedomoon.Jingle4.au}.
1646
1647 @end table
1648
1649
1650 @node Group Buffer
1651 @chapter Group Buffer
1652 @cindex group buffer
1653
1654 @c Alex Schroeder suggests to rearrange this as follows:
1655 @c
1656 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1657 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1658 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1659 @c   7. Group Score, 8. Group Buffer Format
1660 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1661 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1662 @c <kensanata> First, "Gnus considers groups... (default 9)."
1663 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1664 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1665 @c <kensanata> Then expand the next paragraph or add some more to it.
1666 @c    This short one sentence explains levels 1 and 2, therefore I understand
1667 @c    that I should keep important news at 3 and boring news at 4.
1668 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1669 @c    Maybe keep those that you don't want to read temporarily at 6,
1670 @c    those that you never want to read at 8, those that offend your
1671 @c    human rights at 9...
1672
1673
1674 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1675 is the first buffer shown when gnus starts, and will never be killed as
1676 long as gnus is active.
1677
1678 @iftex
1679 @iflatex
1680 \gnusfigure{The Group Buffer}{320}{
1681 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1682 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1683 \put(120,38){\vector(1,2){10}}
1684 \put(40,60){\makebox(0,0)[r]{Mode line}}
1685 \put(40,58){\vector(1,0){30}}
1686 \put(200,28){\makebox(0,0)[t]{Native select method}}
1687 \put(200,26){\vector(-1,2){15}}
1688 }
1689 @end iflatex
1690 @end iftex
1691
1692 @menu
1693 * Group Buffer Format::         Information listed and how you can change it.
1694 * Group Maneuvering::           Commands for moving in the group buffer.
1695 * Selecting a Group::           Actually reading news.
1696 * Subscription Commands::       Unsubscribing, killing, subscribing.
1697 * Group Data::                  Changing the info for a group.
1698 * Group Levels::                Levels? What are those, then?
1699 * Group Score::                 A mechanism for finding out what groups you like.
1700 * Marking Groups::              You can mark groups for later processing.
1701 * Foreign Groups::              Creating and editing groups.
1702 * Group Parameters::            Each group may have different parameters set.
1703 * Listing Groups::              Gnus can list various subsets of the groups.
1704 * Sorting Groups::              Re-arrange the group order.
1705 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1706 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1707 * Exiting Gnus::                Stop reading news and get some work done.
1708 * Group Topics::                A folding group mode divided into topics.
1709 * Misc Group Stuff::            Other stuff that you can to do.
1710 @end menu
1711
1712
1713 @node Group Buffer Format
1714 @section Group Buffer Format
1715
1716 @menu
1717 * Group Line Specification::    Deciding how the group buffer is to look.
1718 * Group Modeline Specification::  The group buffer modeline.
1719 * Group Highlighting::          Having nice colors in the group buffer.
1720 @end menu
1721
1722
1723 @node Group Line Specification
1724 @subsection Group Line Specification
1725 @cindex group buffer format
1726
1727 The default format of the group buffer is nice and dull, but you can
1728 make it as exciting and ugly as you feel like.
1729
1730 Here's a couple of example group lines:
1731
1732 @example
1733      25: news.announce.newusers
1734  *    0: alt.fan.andrea-dworkin
1735 @end example
1736
1737 Quite simple, huh?
1738
1739 You can see that there are 25 unread articles in
1740 @samp{news.announce.newusers}.  There are no unread articles, but some
1741 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1742 asterisk at the beginning of the line?).
1743
1744 @vindex gnus-group-line-format
1745 You can change that format to whatever you want by fiddling with the
1746 @code{gnus-group-line-format} variable.  This variable works along the
1747 lines of a @code{format} specification, which is pretty much the same as
1748 a @code{printf} specifications, for those of you who use (feh!) C.
1749 @xref{Formatting Variables}.
1750
1751 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1752
1753 There should always be a colon on the line; the cursor always moves to
1754 the colon after performing an operation.  @xref{Positioning
1755 Point}. Nothing else is required---not even the group name.  All
1756 displayed text is just window dressing, and is never examined by Gnus.
1757 Gnus stores all real information it needs using text properties.
1758
1759 (Note that if you make a really strange, wonderful, spreadsheet-like
1760 layout, everybody will believe you are hard at work with the accounting
1761 instead of wasting time reading news.)
1762
1763 Here's a list of all available format characters:
1764
1765 @table @samp
1766
1767 @item M
1768 An asterisk if the group only has marked articles.
1769
1770 @item S
1771 Whether the group is subscribed.
1772
1773 @item L
1774 Level of subscribedness.
1775
1776 @item N
1777 Number of unread articles.
1778
1779 @item I
1780 Number of dormant articles.
1781
1782 @item T
1783 Number of ticked articles.
1784
1785 @item R
1786 Number of read articles.
1787
1788 @item U
1789 Number of unseen articles.
1790
1791 @item t
1792 Estimated total number of articles.  (This is really @var{max-number}
1793 minus @var{min-number} plus 1.)
1794
1795 Gnus uses this estimation because the @sc{nntp} protocol provides
1796 efficient access to @var{max-number} and @var{min-number} but getting
1797 the true unread message count is not possible efficiently.  For
1798 hysterical raisins, even the mail back ends, where the true number of
1799 unread messages might be available efficiently, use the same limited
1800 interface.  To remove this restriction from Gnus means that the back
1801 end interface has to be changed, which is not an easy job.  If you
1802 want to work on this, please contact the Gnus mailing list.
1803
1804 @item y
1805 Number of unread, unticked, non-dormant articles.
1806
1807 @item i
1808 Number of ticked and dormant articles.
1809
1810 @item g
1811 Full group name.
1812
1813 @item G
1814 Group name.
1815
1816 @item C
1817 Group comment (@pxref{Group Parameters}) or group name if there is no
1818 comment element in the group parameters.
1819
1820 @item D
1821 Newsgroup description.
1822
1823 @item o
1824 @samp{m} if moderated.
1825
1826 @item O
1827 @samp{(m)} if moderated.
1828
1829 @item s
1830 Select method.
1831
1832 @item B
1833 If the summary buffer for the group is open or not.
1834
1835 @item n
1836 Select from where.
1837
1838 @item z
1839 A string that looks like @samp{<%s:%n>} if a foreign select method is
1840 used.
1841
1842 @item P
1843 Indentation based on the level of the topic (@pxref{Group Topics}).
1844
1845 @item c
1846 @vindex gnus-group-uncollapsed-levels
1847 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1848 variable says how many levels to leave at the end of the group name.
1849 The default is 1---this will mean that group names like
1850 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1851
1852 @item m
1853 @vindex gnus-new-mail-mark
1854 @cindex %
1855 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1856 the group lately.
1857
1858 @item p
1859 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1860
1861 @item d
1862 A string that says when you last read the group (@pxref{Group
1863 Timestamp}).
1864
1865 @item u
1866 User defined specifier.  The next character in the format string should
1867 be a letter.  Gnus will call the function
1868 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1869 following @samp{%u}.  The function will be passed a single dummy
1870 parameter as argument.  The function should return a string, which will
1871 be inserted into the buffer just like information from any other
1872 specifier.
1873 @end table
1874
1875 @cindex *
1876 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1877 if no info is available---for instance, if it is a non-activated foreign
1878 group, or a bogus native group.
1879
1880
1881 @node Group Modeline Specification
1882 @subsection Group Modeline Specification
1883 @cindex group modeline
1884
1885 @vindex gnus-group-mode-line-format
1886 The mode line can be changed by setting
1887 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1888 doesn't understand that many format specifiers:
1889
1890 @table @samp
1891 @item S
1892 The native news server.
1893 @item M
1894 The native select method.
1895 @end table
1896
1897
1898 @node Group Highlighting
1899 @subsection Group Highlighting
1900 @cindex highlighting
1901 @cindex group highlighting
1902
1903 @vindex gnus-group-highlight
1904 Highlighting in the group buffer is controlled by the
1905 @code{gnus-group-highlight} variable.  This is an alist with elements
1906 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1907 something non-@code{nil}, the @var{face} will be used on the line.
1908
1909 Here's an example value for this variable that might look nice if the
1910 background is dark:
1911
1912 @lisp
1913 (cond (window-system
1914        (setq custom-background-mode 'light)
1915        (defface my-group-face-1
1916          '((t (:foreground "Red" :bold t))) "First group face")
1917        (defface my-group-face-2
1918          '((t (:foreground "DarkSeaGreen4" :bold t))) "Second group face")
1919        (defface my-group-face-3
1920          '((t (:foreground "Green4" :bold t))) "Third group face")
1921        (defface my-group-face-4
1922          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1923        (defface my-group-face-5
1924          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1925
1926 (setq gnus-group-highlight
1927       '(((> unread 200) . my-group-face-1)
1928         ((and (< level 3) (zerop unread)) . my-group-face-2)
1929         ((< level 3) . my-group-face-3)
1930         ((zerop unread) . my-group-face-4)
1931         (t . my-group-face-5)))
1932 @end lisp
1933
1934 Also @pxref{Faces and Fonts}.
1935
1936 Variables that are dynamically bound when the forms are evaluated
1937 include:
1938
1939 @table @code
1940 @item group
1941 The group name.
1942 @item unread
1943 The number of unread articles in the group.
1944 @item method
1945 The select method.
1946 @item mailp
1947 Whether the group is a mail group.
1948 @item level
1949 The level of the group.
1950 @item score
1951 The score of the group.
1952 @item ticked
1953 The number of ticked articles in the group.
1954 @item total
1955 The total number of articles in the group.  Or rather, MAX-NUMBER minus
1956 MIN-NUMBER plus one.
1957 @item topic
1958 When using the topic minor mode, this variable is bound to the current
1959 topic being inserted.
1960 @end table
1961
1962 When the forms are @code{eval}ed, point is at the beginning of the line
1963 of the group in question, so you can use many of the normal gnus
1964 functions for snarfing info on the group.
1965
1966 @vindex gnus-group-update-hook
1967 @findex gnus-group-highlight-line
1968 @code{gnus-group-update-hook} is called when a group line is changed.
1969 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1970 calls @code{gnus-group-highlight-line} by default.
1971
1972
1973 @node Group Maneuvering
1974 @section Group Maneuvering
1975 @cindex group movement
1976
1977 All movement commands understand the numeric prefix and will behave as
1978 expected, hopefully.
1979
1980 @table @kbd
1981
1982 @item n
1983 @kindex n (Group)
1984 @findex gnus-group-next-unread-group
1985 Go to the next group that has unread articles
1986 (@code{gnus-group-next-unread-group}).
1987
1988 @item p
1989 @itemx DEL
1990 @kindex DEL (Group)
1991 @kindex p (Group)
1992 @findex gnus-group-prev-unread-group
1993 Go to the previous group that has unread articles
1994 (@code{gnus-group-prev-unread-group}).
1995
1996 @item N
1997 @kindex N (Group)
1998 @findex gnus-group-next-group
1999 Go to the next group (@code{gnus-group-next-group}).
2000
2001 @item P
2002 @kindex P (Group)
2003 @findex gnus-group-prev-group
2004 Go to the previous group (@code{gnus-group-prev-group}).
2005
2006 @item M-n
2007 @kindex M-n (Group)
2008 @findex gnus-group-next-unread-group-same-level
2009 Go to the next unread group on the same (or lower) level
2010 (@code{gnus-group-next-unread-group-same-level}).
2011
2012 @item M-p
2013 @kindex M-p (Group)
2014 @findex gnus-group-prev-unread-group-same-level
2015 Go to the previous unread group on the same (or lower) level
2016 (@code{gnus-group-prev-unread-group-same-level}).
2017 @end table
2018
2019 Three commands for jumping to groups:
2020
2021 @table @kbd
2022
2023 @item j
2024 @kindex j (Group)
2025 @findex gnus-group-jump-to-group
2026 Jump to a group (and make it visible if it isn't already)
2027 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2028 like living groups.
2029
2030 @item ,
2031 @kindex , (Group)
2032 @findex gnus-group-best-unread-group
2033 Jump to the unread group with the lowest level
2034 (@code{gnus-group-best-unread-group}).
2035
2036 @item .
2037 @kindex . (Group)
2038 @findex gnus-group-first-unread-group
2039 Jump to the first group with unread articles
2040 (@code{gnus-group-first-unread-group}).
2041 @end table
2042
2043 @vindex gnus-group-goto-unread
2044 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2045 commands will move to the next group, not the next unread group.  Even
2046 the commands that say they move to the next unread group.  The default
2047 is @code{t}.
2048
2049
2050 @node Selecting a Group
2051 @section Selecting a Group
2052 @cindex group selection
2053
2054 @table @kbd
2055
2056 @item SPACE
2057 @kindex SPACE (Group)
2058 @findex gnus-group-read-group
2059 Select the current group, switch to the summary buffer and display the
2060 first unread article (@code{gnus-group-read-group}).  If there are no
2061 unread articles in the group, or if you give a non-numerical prefix to
2062 this command, gnus will offer to fetch all the old articles in this
2063 group from the server.  If you give a numerical prefix @var{N}, @var{N}
2064 determines the number of articles gnus will fetch.  If @var{N} is
2065 positive, gnus fetches the @var{N} newest articles, if @var{N} is
2066 negative, Gnus fetches the @code{abs(@var{N})} oldest articles.
2067
2068 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2069 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2070 - 4 2 SPC} fetches the 42 oldest ones.
2071
2072 When you are in the group (in the Summary buffer), you can type
2073 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2074 ones.
2075
2076 @item RET
2077 @kindex RET (Group)
2078 @findex gnus-group-select-group
2079 Select the current group and switch to the summary buffer
2080 (@code{gnus-group-select-group}).  Takes the same arguments as
2081 @code{gnus-group-read-group}---the only difference is that this command
2082 does not display the first unread article automatically upon group
2083 entry.
2084
2085 @item M-RET
2086 @kindex M-RET (Group)
2087 @findex gnus-group-quick-select-group
2088 This does the same as the command above, but tries to do it with the
2089 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2090 scoring/killing will be performed, there will be no highlights and no
2091 expunging.  This might be useful if you're in a real hurry and have to
2092 enter some humongous group.  If you give a 0 prefix to this command
2093 (i.e., @kbd{0 M-RET}), gnus won't even generate the summary buffer,
2094 which is useful if you want to toggle threading before generating the
2095 summary buffer (@pxref{Summary Generation Commands}).
2096
2097 @item M-SPACE
2098 @kindex M-SPACE (Group)
2099 @findex gnus-group-visible-select-group
2100 This is yet one more command that does the same as the @kbd{RET}
2101 command, but this one does it without expunging and hiding dormants
2102 (@code{gnus-group-visible-select-group}).
2103
2104 @item C-M-RET
2105 @kindex C-M-RET (Group)
2106 @findex gnus-group-select-group-ephemerally
2107 Finally, this command selects the current group ephemerally without
2108 doing any processing of its contents
2109 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2110 turned off.  Everything you do in the group after selecting it in this
2111 manner will have no permanent effects.
2112
2113 @end table
2114
2115 @vindex gnus-large-newsgroup
2116 The @code{gnus-large-newsgroup} variable says what gnus should consider
2117 to be a big group.  This is 200 by default.  If the group has more
2118 (unread and/or ticked) articles than this, gnus will query the user
2119 before entering the group.  The user can then specify how many articles
2120 should be fetched from the server.  If the user specifies a negative
2121 number (@code{-n}), the @code{n} oldest articles will be fetched.  If it
2122 is positive, the @code{n} articles that have arrived most recently will
2123 be fetched.
2124
2125 @vindex gnus-select-group-hook
2126 @vindex gnus-auto-select-first
2127 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2128 automatically when entering a group with the @kbd{SPACE} command.
2129 Which article this is is controlled by the
2130 @code{gnus-auto-select-subject} variable.  Valid values for this
2131 variable is:
2132
2133 @table @code
2134
2135 @item unread
2136 Place point on the subject line of the first unread article.
2137
2138 @item first
2139 Place point on the subject line of the first article.
2140
2141 @item unseen
2142 Place point on the subject line of the first unseen article.
2143
2144 @item unseen-or-unread
2145 Place point on the subject line of the first unseen article, and if
2146 there is no such article, place point on the subject line of the first
2147 unread article.
2148
2149 @item best
2150 Place point on the subject line of the highest-scored unread article.
2151
2152 @end table
2153
2154 This variable can also be a function.  In that case, that function
2155 will be called to place point on a subject line.
2156
2157 If you want to prevent automatic selection in some group (say, in a
2158 binary group with Huge articles) you can set the
2159 @code{gnus-auto-select-first} variable to @code{nil} in
2160 @code{gnus-select-group-hook}, which is called when a group is
2161 selected.
2162
2163
2164 @node Subscription Commands
2165 @section Subscription Commands
2166 @cindex subscription
2167
2168 @table @kbd
2169
2170 @item S t
2171 @itemx u
2172 @kindex S t (Group)
2173 @kindex u (Group)
2174 @findex gnus-group-unsubscribe-current-group
2175 @c @icon{gnus-group-unsubscribe}
2176 Toggle subscription to the current group
2177 (@code{gnus-group-unsubscribe-current-group}).
2178
2179 @item S s
2180 @itemx U
2181 @kindex S s (Group)
2182 @kindex U (Group)
2183 @findex gnus-group-unsubscribe-group
2184 Prompt for a group to subscribe, and then subscribe it.  If it was
2185 subscribed already, unsubscribe it instead
2186 (@code{gnus-group-unsubscribe-group}).
2187
2188 @item S k
2189 @itemx C-k
2190 @kindex S k (Group)
2191 @kindex C-k (Group)
2192 @findex gnus-group-kill-group
2193 @c @icon{gnus-group-kill-group}
2194 Kill the current group (@code{gnus-group-kill-group}).
2195
2196 @item S y
2197 @itemx C-y
2198 @kindex S y (Group)
2199 @kindex C-y (Group)
2200 @findex gnus-group-yank-group
2201 Yank the last killed group (@code{gnus-group-yank-group}).
2202
2203 @item C-x C-t
2204 @kindex C-x C-t (Group)
2205 @findex gnus-group-transpose-groups
2206 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2207 really a subscription command, but you can use it instead of a
2208 kill-and-yank sequence sometimes.
2209
2210 @item S w
2211 @itemx C-w
2212 @kindex S w (Group)
2213 @kindex C-w (Group)
2214 @findex gnus-group-kill-region
2215 Kill all groups in the region (@code{gnus-group-kill-region}).
2216
2217 @item S z
2218 @kindex S z (Group)
2219 @findex gnus-group-kill-all-zombies
2220 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2221
2222 @item S C-k
2223 @kindex S C-k (Group)
2224 @findex gnus-group-kill-level
2225 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2226 These groups can't be yanked back after killing, so this command should
2227 be used with some caution.  The only time where this command comes in
2228 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2229 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2230 kill off all unsubscribed groups that do not have message numbers in the
2231 @file{.newsrc} file.
2232
2233 @end table
2234
2235 Also @pxref{Group Levels}.
2236
2237
2238 @node Group Data
2239 @section Group Data
2240
2241 @table @kbd
2242
2243 @item c
2244 @kindex c (Group)
2245 @findex gnus-group-catchup-current
2246 @vindex gnus-group-catchup-group-hook
2247 @c @icon{gnus-group-catchup-current}
2248 Mark all unticked articles in this group as read
2249 (@code{gnus-group-catchup-current}).
2250 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2251 the group buffer.
2252
2253 @item C
2254 @kindex C (Group)
2255 @findex gnus-group-catchup-current-all
2256 Mark all articles in this group, even the ticked ones, as read
2257 (@code{gnus-group-catchup-current-all}).
2258
2259 @item M-c
2260 @kindex M-c (Group)
2261 @findex gnus-group-clear-data
2262 Clear the data from the current group---nix out marks and the list of
2263 read articles (@code{gnus-group-clear-data}).
2264
2265 @item M-x gnus-group-clear-data-on-native-groups
2266 @kindex M-x gnus-group-clear-data-on-native-groups
2267 @findex gnus-group-clear-data-on-native-groups
2268 If you have switched from one @sc{nntp} server to another, all your marks
2269 and read ranges have become worthless.  You can use this command to
2270 clear out all data that you have on your native groups.  Use with
2271 caution.
2272
2273 @end table
2274
2275
2276 @node Group Levels
2277 @section Group Levels
2278 @cindex group level
2279 @cindex level
2280
2281 All groups have a level of @dfn{subscribedness}.  For instance, if a
2282 group is on level 2, it is more subscribed than a group on level 5.  You
2283 can ask gnus to just list groups on a given level or lower
2284 (@pxref{Listing Groups}), or to just check for new articles in groups on
2285 a given level or lower (@pxref{Scanning New Messages}).
2286
2287 Remember:  The higher the level of the group, the less important it is.
2288
2289 @table @kbd
2290
2291 @item S l
2292 @kindex S l (Group)
2293 @findex gnus-group-set-current-level
2294 Set the level of the current group.  If a numeric prefix is given, the
2295 next @var{n} groups will have their levels set.  The user will be
2296 prompted for a level.
2297 @end table
2298
2299 @vindex gnus-level-killed
2300 @vindex gnus-level-zombie
2301 @vindex gnus-level-unsubscribed
2302 @vindex gnus-level-subscribed
2303 Gnus considers groups from levels 1 to
2304 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2305 @code{gnus-level-subscribed} (exclusive) and
2306 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2307 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2308 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2309 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2310 same, but zombie and killed groups have no information on what articles
2311 you have read, etc, stored.  This distinction between dead and living
2312 groups isn't done because it is nice or clever, it is done purely for
2313 reasons of efficiency.
2314
2315 It is recommended that you keep all your mail groups (if any) on quite
2316 low levels (e.g. 1 or 2).
2317
2318 Maybe the following description of the default behavior of Gnus helps to
2319 understand what these levels are all about.  By default, Gnus shows you
2320 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2321 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2322 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2323 groups are hidden, in a way.
2324
2325 Zombie and killed groups are similar to unsubscribed groups in that they
2326 are hidden by default.  But they are different from subscribed and
2327 unsubscribed groups in that Gnus doesn't ask the news server for
2328 information (number of messages, number of unread messages) on zombie
2329 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2330 aren't interested in.  If most groups are killed, Gnus is faster.
2331
2332 Why does Gnus distinguish between zombie and killed groups?  Well, when
2333 a new group arrives on the server, Gnus by default makes it a zombie
2334 group.  This means that you are normally not bothered with new groups,
2335 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2336 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2337 list of killed groups.)
2338
2339 If you want to play with the level variables, you should show some care.
2340 Set them once, and don't touch them ever again.  Better yet, don't touch
2341 them at all unless you know exactly what you're doing.
2342
2343 @vindex gnus-level-default-unsubscribed
2344 @vindex gnus-level-default-subscribed
2345 Two closely related variables are @code{gnus-level-default-subscribed}
2346 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2347 which are the levels that new groups will be put on if they are
2348 (un)subscribed.  These two variables should, of course, be inside the
2349 relevant valid ranges.
2350
2351 @vindex gnus-keep-same-level
2352 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2353 will only move to groups of the same level (or lower).  In
2354 particular, going from the last article in one group to the next group
2355 will go to the next group of the same level (or lower).  This might be
2356 handy if you want to read the most important groups before you read the
2357 rest.
2358
2359 If this variable is @code{best}, Gnus will make the next newsgroup the
2360 one with the best level.
2361
2362 @vindex gnus-group-default-list-level
2363 All groups with a level less than or equal to
2364 @code{gnus-group-default-list-level} will be listed in the group buffer
2365 by default.
2366
2367 @vindex gnus-group-list-inactive-groups
2368 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2369 groups will be listed along with the unread groups.  This variable is
2370 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2371 listed.
2372
2373 @vindex gnus-group-use-permanent-levels
2374 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2375 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2376 use this level as the ``work'' level.
2377
2378 @vindex gnus-activate-level
2379 Gnus will normally just activate (i. e., query the server about) groups
2380 on level @code{gnus-activate-level} or less.  If you don't want to
2381 activate unsubscribed groups, for instance, you might set this variable
2382 to 5.  The default is 6.
2383
2384
2385 @node Group Score
2386 @section Group Score
2387 @cindex group score
2388 @cindex group rank
2389 @cindex rank
2390
2391 You would normally keep important groups on high levels, but that scheme
2392 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2393 group buffer according to how often you read groups, perhaps?  Within
2394 reason?
2395
2396 This is what @dfn{group score} is for.  You can have Gnus assign a score
2397 to each group through the mechanism described below.  You can then sort
2398 the group buffer based on this score.  Alternatively, you can sort on
2399 score and then level.  (Taken together, the level and the score is
2400 called the @dfn{rank} of the group.  A group that is on level 4 and has
2401 a score of 1 has a higher rank than a group on level 5 that has a score
2402 of 300.  (The level is the most significant part and the score is the
2403 least significant part.))
2404
2405 @findex gnus-summary-bubble-group
2406 If you want groups you read often to get higher scores than groups you
2407 read seldom you can add the @code{gnus-summary-bubble-group} function to
2408 the @code{gnus-summary-exit-hook} hook.  This will result (after
2409 sorting) in a bubbling sort of action.  If you want to see that in
2410 action after each summary exit, you can add
2411 @code{gnus-group-sort-groups-by-rank} or
2412 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2413 slow things down somewhat.
2414
2415
2416 @node Marking Groups
2417 @section Marking Groups
2418 @cindex marking groups
2419
2420 If you want to perform some command on several groups, and they appear
2421 subsequently in the group buffer, you would normally just give a
2422 numerical prefix to the command.  Most group commands will then do your
2423 bidding on those groups.
2424
2425 However, if the groups are not in sequential order, you can still
2426 perform a command on several groups.  You simply mark the groups first
2427 with the process mark and then execute the command.
2428
2429 @table @kbd
2430
2431 @item #
2432 @kindex # (Group)
2433 @itemx M m
2434 @kindex M m (Group)
2435 @findex gnus-group-mark-group
2436 Set the mark on the current group (@code{gnus-group-mark-group}).
2437
2438 @item M-#
2439 @kindex M-# (Group)
2440 @itemx M u
2441 @kindex M u (Group)
2442 @findex gnus-group-unmark-group
2443 Remove the mark from the current group
2444 (@code{gnus-group-unmark-group}).
2445
2446 @item M U
2447 @kindex M U (Group)
2448 @findex gnus-group-unmark-all-groups
2449 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2450
2451 @item M w
2452 @kindex M w (Group)
2453 @findex gnus-group-mark-region
2454 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2455
2456 @item M b
2457 @kindex M b (Group)
2458 @findex gnus-group-mark-buffer
2459 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2460
2461 @item M r
2462 @kindex M r (Group)
2463 @findex gnus-group-mark-regexp
2464 Mark all groups that match some regular expression
2465 (@code{gnus-group-mark-regexp}).
2466 @end table
2467
2468 Also @pxref{Process/Prefix}.
2469
2470 @findex gnus-group-universal-argument
2471 If you want to execute some command on all groups that have been marked
2472 with the process mark, you can use the @kbd{M-&}
2473 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2474 the command to be executed.
2475
2476
2477 @node Foreign Groups
2478 @section Foreign Groups
2479 @cindex foreign groups
2480
2481 Below are some group mode commands for making and editing general foreign
2482 groups, as well as commands to ease the creation of a few
2483 special-purpose groups.  All these commands insert the newly created
2484 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2485 consulted.
2486
2487 @table @kbd
2488
2489 @item G m
2490 @kindex G m (Group)
2491 @findex gnus-group-make-group
2492 @cindex making groups
2493 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2494 for a name, a method and possibly an @dfn{address}.  For an easier way
2495 to subscribe to @sc{nntp} groups, @pxref{Browse Foreign Server}.
2496
2497 @item G r
2498 @kindex G r (Group)
2499 @findex gnus-group-rename-group
2500 @cindex renaming groups
2501 Rename the current group to something else
2502 (@code{gnus-group-rename-group}).  This is valid only on some
2503 groups---mail groups mostly.  This command might very well be quite slow
2504 on some back ends.
2505
2506 @item G c
2507 @kindex G c (Group)
2508 @cindex customizing
2509 @findex gnus-group-customize
2510 Customize the group parameters (@code{gnus-group-customize}).
2511
2512 @item G e
2513 @kindex G e (Group)
2514 @findex gnus-group-edit-group-method
2515 @cindex renaming groups
2516 Enter a buffer where you can edit the select method of the current
2517 group (@code{gnus-group-edit-group-method}).
2518
2519 @item G p
2520 @kindex G p (Group)
2521 @findex gnus-group-edit-group-parameters
2522 Enter a buffer where you can edit the group parameters
2523 (@code{gnus-group-edit-group-parameters}).
2524
2525 @item G E
2526 @kindex G E (Group)
2527 @findex gnus-group-edit-group
2528 Enter a buffer where you can edit the group info
2529 (@code{gnus-group-edit-group}).
2530
2531 @item G d
2532 @kindex G d (Group)
2533 @findex gnus-group-make-directory-group
2534 @cindex nndir
2535 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2536 for a directory name (@code{gnus-group-make-directory-group}).
2537
2538 @item G h
2539 @kindex G h (Group)
2540 @cindex help group
2541 @findex gnus-group-make-help-group
2542 Make the gnus help group (@code{gnus-group-make-help-group}).
2543
2544 @item G a
2545 @kindex G a (Group)
2546 @cindex (ding) archive
2547 @cindex archive group
2548 @findex gnus-group-make-archive-group
2549 @vindex gnus-group-archive-directory
2550 @vindex gnus-group-recent-archive-directory
2551 Make a gnus archive group (@code{gnus-group-make-archive-group}).  By
2552 default a group pointing to the most recent articles will be created
2553 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2554 group will be created from @code{gnus-group-archive-directory}.
2555
2556 @item G k
2557 @kindex G k (Group)
2558 @findex gnus-group-make-kiboze-group
2559 @cindex nnkiboze
2560 Make a kiboze group.  You will be prompted for a name, for a regexp to
2561 match groups to be ``included'' in the kiboze group, and a series of
2562 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2563 @xref{Kibozed Groups}.
2564
2565 @item G D
2566 @kindex G D (Group)
2567 @findex gnus-group-enter-directory
2568 @cindex nneething
2569 Read an arbitrary directory as if it were a newsgroup with the
2570 @code{nneething} back end (@code{gnus-group-enter-directory}).
2571 @xref{Anything Groups}.
2572
2573 @item G f
2574 @kindex G f (Group)
2575 @findex gnus-group-make-doc-group
2576 @cindex ClariNet Briefs
2577 @cindex nndoc
2578 Make a group based on some file or other
2579 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2580 command, you will be prompted for a file name and a file type.
2581 Currently supported types are @code{mbox}, @code{babyl},
2582 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2583 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2584 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2585 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2586 you run this command without a prefix, Gnus will guess at the file
2587 type.  @xref{Document Groups}.
2588
2589 @item G u
2590 @kindex G u (Group)
2591 @vindex gnus-useful-groups
2592 @findex gnus-group-make-useful-group
2593 Create one of the groups mentioned in @code{gnus-useful-groups}
2594 (@code{gnus-group-make-useful-group}).
2595
2596 @item G w
2597 @kindex G w (Group)
2598 @findex gnus-group-make-web-group
2599 @cindex Google
2600 @cindex nnweb
2601 @cindex gmane
2602 Make an ephemeral group based on a web search
2603 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2604 command, make a solid group instead.  You will be prompted for the
2605 search engine type and the search string.  Valid search engine types
2606 include @code{google}, @code{dejanews}, and @code{gmane}.
2607 @xref{Web Searches}.
2608
2609 If you use the @code{google} search engine, you can limit the search
2610 to a particular group by using a match string like
2611 @samp{shaving group:alt.sysadmin.recovery}.
2612
2613 @item G DEL
2614 @kindex G DEL (Group)
2615 @findex gnus-group-delete-group
2616 This function will delete the current group
2617 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2618 actually delete all the articles in the group, and forcibly remove the
2619 group itself from the face of the Earth.  Use a prefix only if you are
2620 absolutely sure of what you are doing.  This command can't be used on
2621 read-only groups (like @code{nntp} group), though.
2622
2623 @item G V
2624 @kindex G V (Group)
2625 @findex gnus-group-make-empty-virtual
2626 Make a new, fresh, empty @code{nnvirtual} group
2627 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2628
2629 @item G v
2630 @kindex G v (Group)
2631 @findex gnus-group-add-to-virtual
2632 Add the current group to an @code{nnvirtual} group
2633 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2634 @end table
2635
2636 @xref{Select Methods}, for more information on the various select
2637 methods.
2638
2639 @vindex gnus-activate-foreign-newsgroups
2640 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2641 gnus will check all foreign groups with this level or lower at startup.
2642 This might take quite a while, especially if you subscribe to lots of
2643 groups from different @sc{nntp} servers.  Also @pxref{Group Levels};
2644 @code{gnus-activate-level} also affects activation of foreign
2645 newsgroups.
2646
2647
2648 @node Group Parameters
2649 @section Group Parameters
2650 @cindex group parameters
2651
2652 The group parameters store information local to a particular group.
2653 Here's an example group parameter list:
2654
2655 @example
2656 ((to-address . "ding@@gnus.org")
2657  (auto-expire . t))
2658 @end example
2659
2660 We see that each element consists of a "dotted pair"---the thing before
2661 the dot is the key, while the thing after the dot is the value.  All the
2662 parameters have this form @emph{except} local variable specs, which are
2663 not dotted pairs, but proper lists.
2664
2665 Some parameters have correspondant customizable variables, each of which
2666 is an alist of regexps and values.
2667
2668 The following group parameters can be used:
2669
2670 @table @code
2671 @item to-address
2672 @cindex to-address
2673 Address used by when doing followups and new posts.
2674
2675 @example
2676 (to-address . "some@@where.com")
2677 @end example
2678
2679 This is primarily useful in mail groups that represent closed mailing
2680 lists---mailing lists where it's expected that everybody that writes to
2681 the mailing list is subscribed to it.  Since using this parameter
2682 ensures that the mail only goes to the mailing list itself, it means
2683 that members won't receive two copies of your followups.
2684
2685 Using @code{to-address} will actually work whether the group is foreign
2686 or not.  Let's say there's a group on the server that is called
2687 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2688 the articles from a mail-to-news gateway.  Posting directly to this
2689 group is therefore impossible---you have to send mail to the mailing
2690 list address instead.
2691
2692 See also @code{gnus-parameter-to-address-alist}.
2693
2694 @item to-list
2695 @cindex to-list
2696 Address used when doing @kbd{a} in that group.
2697
2698 @example
2699 (to-list . "some@@where.com")
2700 @end example
2701
2702 It is totally ignored
2703 when doing a followup---except that if it is present in a news group,
2704 you'll get mail group semantics when doing @kbd{f}.
2705
2706 If you do an @kbd{a} command in a mail group and you have neither a
2707 @code{to-list} group parameter nor a @code{to-address} group parameter,
2708 then a @code{to-list} group parameter will be added automatically upon
2709 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2710 @vindex gnus-add-to-list
2711
2712 If you do an @kbd{a} command in a mail group and you don't have a
2713 @code{to-list} group parameter, one will be added automatically upon
2714 sending the message.
2715
2716 @findex gnus-mailing-list-mode
2717 @cindex Mail List Groups
2718 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2719 entering summary buffer.
2720
2721 See also @code{gnus-parameter-to-list-alist}.
2722
2723 @anchor{subscribed}
2724 @item subscribed
2725 @cindex subscribed
2726 If this parameter is set to @code{t}, Gnus will consider the
2727 to-address and to-list parameters for this group as addresses of
2728 mailing lists you are subscribed to.  Giving Gnus this information is
2729 (only) a first step in getting it to generate correct Mail-Followup-To
2730 headers for your posts to these lists.  Look here @pxref{(message)Mailing
2731 Lists} for a complete treatment of available MFT support.
2732
2733 See also @code{gnus-find-subscribed-addresses}, the function that
2734 directly uses this group parameter.
2735
2736 @item visible
2737 @cindex visible
2738 If the group parameter list has the element @code{(visible . t)},
2739 that group will always be visible in the Group buffer, regardless
2740 of whether it has any unread articles.
2741
2742 @item broken-reply-to
2743 @cindex broken-reply-to
2744 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2745 headers in this group are to be ignored.  This can be useful if you're
2746 reading a mailing list group where the listserv has inserted
2747 @code{Reply-To} headers that point back to the listserv itself.  This is
2748 broken behavior.  So there!
2749
2750 @item to-group
2751 @cindex to-group
2752 Elements like @code{(to-group . "some.group.name")} means that all
2753 posts in that group will be sent to @code{some.group.name}.
2754
2755 @item newsgroup
2756 @cindex newsgroup
2757 If you have @code{(newsgroup . t)} in the group parameter list, gnus
2758 will treat all responses as if they were responses to news articles.
2759 This can be useful if you have a mail group that's really a mirror of a
2760 news group.
2761
2762 @item gcc-self
2763 @cindex gcc-self
2764 If @code{(gcc-self . t)} is present in the group parameter list, newly
2765 composed messages will be @code{Gcc}'d to the current group.  If
2766 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2767 generated, if @code{(gcc-self . "string")} is present, this string will
2768 be inserted literally as a @code{gcc} header.  This parameter takes
2769 precedence over any default @code{Gcc} rules as described later
2770 (@pxref{Archived Messages}).  CAVEAT:: It yields an error putting
2771 @code{(gcc-self . t)} in groups of a @code{nntp} server or so, because
2772 a @code{nntp} server doesn't accept articles.
2773
2774 @item auto-expire
2775 @cindex auto-expire
2776 If the group parameter has an element that looks like @code{(auto-expire
2777 . t)}, all articles read will be marked as expirable.  For an
2778 alternative approach, @pxref{Expiring Mail}.
2779
2780 See also @code{gnus-auto-expirable-newsgroups}.
2781
2782 @item total-expire
2783 @cindex total-expire
2784 If the group parameter has an element that looks like
2785 @code{(total-expire . t)}, all read articles will be put through the
2786 expiry process, even if they are not marked as expirable.  Use with
2787 caution.  Unread, ticked and dormant articles are not eligible for
2788 expiry.
2789
2790 See also @code{gnus-total-expirable-newsgroups}.
2791
2792 @item expiry-wait
2793 @cindex expiry-wait
2794 @vindex nnmail-expiry-wait-function
2795 If the group parameter has an element that looks like
2796 @code{(expiry-wait . 10)}, this value will override any
2797 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2798 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2799 can either be a number of days (not necessarily an integer) or the
2800 symbols @code{never} or @code{immediate}.
2801
2802 @item score-file
2803 @cindex score file group parameter
2804 Elements that look like @code{(score-file . "file")} will make
2805 @file{file} into the current score file for the group in question.  All
2806 interactive score entries will be put into this file.
2807
2808 @item adapt-file
2809 @cindex adapt file group parameter
2810 Elements that look like @code{(adapt-file . "file")} will make
2811 @file{file} into the current adaptive file for the group in question.
2812 All adaptive score entries will be put into this file.
2813
2814 @item admin-address
2815 @cindex admin-address
2816 When unsubscribing from a mailing list you should never send the
2817 unsubscription notice to the mailing list itself.  Instead, you'd send
2818 messages to the administrative address.  This parameter allows you to
2819 put the admin address somewhere convenient.
2820
2821 @item display
2822 @cindex display
2823 Elements that look like @code{(display . MODE)} say which articles to
2824 display on entering the group.  Valid values are:
2825
2826 @table @code
2827 @item all
2828 Display all articles, both read and unread.
2829
2830 @item an integer
2831 Display the last INTEGER articles in the group.  This is the same as
2832 entering the group with C-u INTEGER.
2833
2834 @item default
2835 Display the default visible articles, which normally includes unread and
2836 ticked articles.
2837
2838 @item an array
2839 Display articles that satisfy a predicate.
2840
2841 Here are some examples:
2842
2843 @table @code
2844 @item [unread]
2845 Display only unread articles.
2846
2847 @item [not expire]
2848 Display everything except expirable articles.
2849
2850 @item [and (not reply) (not expire)]
2851 Display everything except expirable and articles you've already
2852 responded to.
2853 @end table
2854
2855 The available operators are @code{not}, @code{and} and @code{or}.
2856 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2857 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2858 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2859 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2860
2861 @end table
2862
2863 The @code{display} parameter works by limiting the summary buffer to
2864 the subset specified.  You can pop the limit by using the @kbd{/ w}
2865 command (@pxref{Limiting}).
2866
2867 @item comment
2868 @cindex comment
2869 Elements that look like @code{(comment . "This is a comment")} are
2870 arbitrary comments on the group.  You can display comments in the
2871 group line (@pxref{Group Line Specification}).
2872
2873 @item charset
2874 @cindex charset
2875 Elements that look like @code{(charset . iso-8859-1)} will make
2876 @code{iso-8859-1} the default charset; that is, the charset that will be
2877 used for all articles that do not specify a charset.
2878
2879 See also @code{gnus-group-charset-alist}.
2880
2881 @item ignored-charsets
2882 @cindex ignored-charset
2883 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2884 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2885 default charset will be used for decoding articles.
2886
2887 See also @code{gnus-group-ignored-charsets-alist}.
2888
2889 @item posting-style
2890 @cindex posting-style
2891 You can store additional posting style information for this group only
2892 here (@pxref{Posting Styles}).  The format is that of an entry in the
2893 @code{gnus-posting-styles} alist, except that there's no regexp matching
2894 the group name (of course).  Style elements in this group parameter will
2895 take precedence over the ones found in @code{gnus-posting-styles}.
2896
2897 For instance, if you want a funky name and signature in this group only,
2898 instead of hacking @code{gnus-posting-styles}, you could put something
2899 like this in the group parameters:
2900
2901 @example
2902 (posting-style
2903   (name "Funky Name")
2904   (signature "Funky Signature"))
2905 @end example
2906
2907 @item post-method
2908 @cindex post-method
2909 If it is set, the value is used as the method for posting message
2910 instead of @code{gnus-post-method}.
2911
2912 @item banner
2913 @cindex banner
2914 An item like @code{(banner . "regex")} causes any part of an article
2915 that matches the regular expression "regex" to be stripped. Instead of
2916 "regex", you can also use the symbol @code{signature} which strips the
2917 last signature or any of the elements of the alist
2918 @code{gnus-article-banner-alist}.
2919
2920 @item sieve
2921 @cindex sieve
2922 This parameter contains a Sieve test that should match incoming mail
2923 that should be placed in this group.  From this group parameter, a
2924 Sieve @samp{IF} control structure is generated, having the test as the
2925 condition and @samp{fileinto "group.name";} as the body.
2926
2927 For example, if the INBOX.list.sieve group has the @code{(sieve
2928 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2929 translating the group parameter into a Sieve script (@pxref{Sieve
2930 Commands}) the following Sieve code is generated:
2931
2932 @example
2933 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2934         fileinto \"INBOX.list.sieve\";
2935 @}
2936 @end example
2937
2938 The Sieve language is described in RFC 3028.  @xref{Top, , Top, sieve,
2939 Emacs Sieve}.
2940
2941 @item (@var{variable} @var{form})
2942 You can use the group parameters to set variables local to the group you
2943 are entering.  If you want to turn threading off in @samp{news.answers},
2944 you could put @code{(gnus-show-threads nil)} in the group parameters of
2945 that group.  @code{gnus-show-threads} will be made into a local variable
2946 in the summary buffer you enter, and the form @code{nil} will be
2947 @code{eval}ed there.
2948
2949 @vindex gnus-list-identifiers
2950 A use for this feature, is to remove a mailing list identifier tag in
2951 the subject fields of articles.   E.g. if the news group
2952 @samp{nntp+news.gnus.org:gmane.text.docbook.apps} has the tag
2953 @samp{DOC-BOOK-APPS:} in the subject of all articles, this tag can be
2954 removed from the article subjects in the summary buffer for the group by
2955 putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")} into the group
2956 parameters for the group.
2957
2958
2959 This can also be used as a group-specific hook function, if you'd like.
2960 If you want to hear a beep when you enter a group, you could put
2961 something like @code{(dummy-variable (ding))} in the parameters of that
2962 group.  @code{dummy-variable} will be set to the result of the
2963 @code{(ding)} form, but who cares?
2964
2965 @end table
2966
2967 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2968 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2969 presents you with a Customize-like interface.  The latter helps avoid
2970 silly Lisp errors.)  You might also be interested in reading about topic
2971 parameters (@pxref{Topic Parameters}).
2972
2973 Group parameters can be set via the @code{gnus-parameters} variable too.
2974 But some variables, such as @code{visible}, have no effect.  For
2975 example:
2976
2977 @example
2978 (setq gnus-parameters
2979       '(("mail\\..*"
2980          (gnus-show-threads nil)
2981          (gnus-use-scoring nil)
2982          (gnus-summary-line-format
2983           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
2984          (gcc-self . t)
2985          (display . all))
2986
2987         ("^nnimap:\\(foo.bar\\)$"
2988          (to-group . "\\1"))
2989
2990         ("mail\\.me"
2991          (gnus-use-scoring  t))
2992
2993         ("list\\..*"
2994          (total-expire . t)
2995          (broken-reply-to . t))))
2996 @end example
2997
2998 String value of parameters will be subjected to regexp substitution, as
2999 the @code{to-group} example shows.
3000
3001
3002 @node Listing Groups
3003 @section Listing Groups
3004 @cindex group listing
3005
3006 These commands all list various slices of the groups available.
3007
3008 @table @kbd
3009
3010 @item l
3011 @itemx A s
3012 @kindex A s (Group)
3013 @kindex l (Group)
3014 @findex gnus-group-list-groups
3015 List all groups that have unread articles
3016 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3017 command will list only groups of level ARG and lower.  By default, it
3018 only lists groups of level five (i. e.,
3019 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3020 groups).
3021
3022 @item L
3023 @itemx A u
3024 @kindex A u (Group)
3025 @kindex L (Group)
3026 @findex gnus-group-list-all-groups
3027 List all groups, whether they have unread articles or not
3028 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3029 this command will list only groups of level ARG and lower.  By default,
3030 it lists groups of level seven or lower (i.e., just subscribed and
3031 unsubscribed groups).
3032
3033 @item A l
3034 @kindex A l (Group)
3035 @findex gnus-group-list-level
3036 List all unread groups on a specific level
3037 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3038 with no unread articles.
3039
3040 @item A k
3041 @kindex A k (Group)
3042 @findex gnus-group-list-killed
3043 List all killed groups (@code{gnus-group-list-killed}).  If given a
3044 prefix argument, really list all groups that are available, but aren't
3045 currently (un)subscribed.  This could entail reading the active file
3046 from the server.
3047
3048 @item A z
3049 @kindex A z (Group)
3050 @findex gnus-group-list-zombies
3051 List all zombie groups (@code{gnus-group-list-zombies}).
3052
3053 @item A m
3054 @kindex A m (Group)
3055 @findex gnus-group-list-matching
3056 List all unread, subscribed groups with names that match a regexp
3057 (@code{gnus-group-list-matching}).
3058
3059 @item A M
3060 @kindex A M (Group)
3061 @findex gnus-group-list-all-matching
3062 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3063
3064 @item A A
3065 @kindex A A (Group)
3066 @findex gnus-group-list-active
3067 List absolutely all groups in the active file(s) of the
3068 server(s) you are connected to (@code{gnus-group-list-active}).  This
3069 might very well take quite a while.  It might actually be a better idea
3070 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3071 thing to match on.  Also note that this command may list groups that
3072 don't exist (yet)---these will be listed as if they were killed groups.
3073 Take the output with some grains of salt.
3074
3075 @item A a
3076 @kindex A a (Group)
3077 @findex gnus-group-apropos
3078 List all groups that have names that match a regexp
3079 (@code{gnus-group-apropos}).
3080
3081 @item A d
3082 @kindex A d (Group)
3083 @findex gnus-group-description-apropos
3084 List all groups that have names or descriptions that match a regexp
3085 (@code{gnus-group-description-apropos}).
3086
3087 @item A c
3088 @kindex A c (Group)
3089 @findex gnus-group-list-cached
3090 List all groups with cached articles (@code{gnus-group-list-cached}).
3091
3092 @item A ?
3093 @kindex A ? (Group)
3094 @findex gnus-group-list-dormant
3095 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3096
3097 @item A /
3098 @kindex A / (Group)
3099 @findex gnus-group-list-limit
3100 List groups limited within the current selection
3101 (@code{gnus-group-list-limit}).
3102
3103 @item A f
3104 @kindex A f (Group)
3105 @findex gnus-group-list-flush
3106 Flush groups from the current selection (@code{gnus-group-list-flush}).
3107
3108 @item A p
3109 @kindex A p (Group)
3110 @findex gnus-group-list-plus
3111 List groups plus the current selection (@code{gnus-group-list-plus}).
3112
3113 @end table
3114
3115 @vindex gnus-permanently-visible-groups
3116 @cindex visible group parameter
3117 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3118 always be shown, whether they have unread articles or not.  You can also
3119 add the @code{visible} element to the group parameters in question to
3120 get the same effect.
3121
3122 @vindex gnus-list-groups-with-ticked-articles
3123 Groups that have just ticked articles in it are normally listed in the
3124 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3125 @code{nil}, these groups will be treated just like totally empty
3126 groups.  It is @code{t} by default.
3127
3128
3129 @node Sorting Groups
3130 @section Sorting Groups
3131 @cindex sorting groups
3132
3133 @kindex C-c C-s (Group)
3134 @findex gnus-group-sort-groups
3135 @vindex gnus-group-sort-function
3136 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3137 group buffer according to the function(s) given by the
3138 @code{gnus-group-sort-function} variable.  Available sorting functions
3139 include:
3140
3141 @table @code
3142
3143 @item gnus-group-sort-by-alphabet
3144 @findex gnus-group-sort-by-alphabet
3145 Sort the group names alphabetically.  This is the default.
3146
3147 @item gnus-group-sort-by-real-name
3148 @findex gnus-group-sort-by-real-name
3149 Sort the group alphabetically on the real (unprefixed) group names.
3150
3151 @item gnus-group-sort-by-level
3152 @findex gnus-group-sort-by-level
3153 Sort by group level.
3154
3155 @item gnus-group-sort-by-score
3156 @findex gnus-group-sort-by-score
3157 Sort by group score.  @xref{Group Score}.
3158
3159 @item gnus-group-sort-by-rank
3160 @findex gnus-group-sort-by-rank
3161 Sort by group score and then the group level.  The level and the score
3162 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3163
3164 @item gnus-group-sort-by-unread
3165 @findex gnus-group-sort-by-unread
3166 Sort by number of unread articles.
3167
3168 @item gnus-group-sort-by-method
3169 @findex gnus-group-sort-by-method
3170 Sort alphabetically on the select method.
3171
3172 @item gnus-group-sort-by-server
3173 @findex gnus-group-sort-by-server
3174 Sort alphabetically on the Gnus server name.
3175
3176
3177 @end table
3178
3179 @code{gnus-group-sort-function} can also be a list of sorting
3180 functions.  In that case, the most significant sort key function must be
3181 the last one.
3182
3183
3184 There are also a number of commands for sorting directly according to
3185 some sorting criteria:
3186
3187 @table @kbd
3188 @item G S a
3189 @kindex G S a (Group)
3190 @findex gnus-group-sort-groups-by-alphabet
3191 Sort the group buffer alphabetically by group name
3192 (@code{gnus-group-sort-groups-by-alphabet}).
3193
3194 @item G S u
3195 @kindex G S u (Group)
3196 @findex gnus-group-sort-groups-by-unread
3197 Sort the group buffer by the number of unread articles
3198 (@code{gnus-group-sort-groups-by-unread}).
3199
3200 @item G S l
3201 @kindex G S l (Group)
3202 @findex gnus-group-sort-groups-by-level
3203 Sort the group buffer by group level
3204 (@code{gnus-group-sort-groups-by-level}).
3205
3206 @item G S v
3207 @kindex G S v (Group)
3208 @findex gnus-group-sort-groups-by-score
3209 Sort the group buffer by group score
3210 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3211
3212 @item G S r
3213 @kindex G S r (Group)
3214 @findex gnus-group-sort-groups-by-rank
3215 Sort the group buffer by group rank
3216 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3217
3218 @item G S m
3219 @kindex G S m (Group)
3220 @findex gnus-group-sort-groups-by-method
3221 Sort the group buffer alphabetically by back end name
3222 (@code{gnus-group-sort-groups-by-method}).
3223
3224 @item G S n
3225 @kindex G S n (Group)
3226 @findex gnus-group-sort-groups-by-real-name
3227 Sort the group buffer alphabetically by real (unprefixed) group name
3228 (@code{gnus-group-sort-groups-by-real-name}).
3229
3230 @end table
3231
3232 All the commands below obey the process/prefix convention
3233 (@pxref{Process/Prefix}).
3234
3235 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3236 commands will sort in reverse order.
3237
3238 You can also sort a subset of the groups:
3239
3240 @table @kbd
3241 @item G P a
3242 @kindex G P a (Group)
3243 @findex gnus-group-sort-selected-groups-by-alphabet
3244 Sort the groups alphabetically by group name
3245 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3246
3247 @item G P u
3248 @kindex G P u (Group)
3249 @findex gnus-group-sort-selected-groups-by-unread
3250 Sort the groups by the number of unread articles
3251 (@code{gnus-group-sort-selected-groups-by-unread}).
3252
3253 @item G P l
3254 @kindex G P l (Group)
3255 @findex gnus-group-sort-selected-groups-by-level
3256 Sort the groups by group level
3257 (@code{gnus-group-sort-selected-groups-by-level}).
3258
3259 @item G P v
3260 @kindex G P v (Group)
3261 @findex gnus-group-sort-selected-groups-by-score
3262 Sort the groups by group score
3263 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3264
3265 @item G P r
3266 @kindex G P r (Group)
3267 @findex gnus-group-sort-selected-groups-by-rank
3268 Sort the groups by group rank
3269 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3270
3271 @item G P m
3272 @kindex G P m (Group)
3273 @findex gnus-group-sort-selected-groups-by-method
3274 Sort the groups alphabetically by back end name
3275 (@code{gnus-group-sort-selected-groups-by-method}).
3276
3277 @item G P n
3278 @kindex G P n (Group)
3279 @findex gnus-group-sort-selected-groups-by-real-name
3280 Sort the groups alphabetically by real (unprefixed) group name
3281 (@code{gnus-group-sort-selected-groups-by-real-name}).
3282
3283 @item G P s
3284 @kindex G P s (Group)
3285 @findex gnus-group-sort-selected-groups
3286 Sort the groups according to @code{gnus-group-sort-function}.
3287
3288 @end table
3289
3290 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3291 move groups around.
3292
3293
3294 @node Group Maintenance
3295 @section Group Maintenance
3296 @cindex bogus groups
3297
3298 @table @kbd
3299 @item b
3300 @kindex b (Group)
3301 @findex gnus-group-check-bogus-groups
3302 Find bogus groups and delete them
3303 (@code{gnus-group-check-bogus-groups}).
3304
3305 @item F
3306 @kindex F (Group)
3307 @findex gnus-group-find-new-groups
3308 Find new groups and process them (@code{gnus-group-find-new-groups}).
3309 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3310 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3311 to query the server for new groups, and subscribe the new groups as
3312 zombies.
3313
3314 @item C-c C-x
3315 @kindex C-c C-x (Group)
3316 @findex gnus-group-expire-articles
3317 Run all expirable articles in the current group through the expiry
3318 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3319 all expirable articles in the group that have been around for a while.
3320 (@pxref{Expiring Mail}).
3321
3322 @item C-c C-M-x
3323 @kindex C-c C-M-x (Group)
3324 @findex gnus-group-expire-all-groups
3325 Run all expirable articles in all groups through the expiry process
3326 (@code{gnus-group-expire-all-groups}).
3327
3328 @end table
3329
3330
3331 @node Browse Foreign Server
3332 @section Browse Foreign Server
3333 @cindex foreign servers
3334 @cindex browsing servers
3335
3336 @table @kbd
3337 @item B
3338 @kindex B (Group)
3339 @findex gnus-group-browse-foreign-server
3340 You will be queried for a select method and a server name.  Gnus will
3341 then attempt to contact this server and let you browse the groups there
3342 (@code{gnus-group-browse-foreign-server}).
3343 @end table
3344
3345 @findex gnus-browse-mode
3346 A new buffer with a list of available groups will appear.  This buffer
3347 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3348 a lot) like a normal group buffer.
3349
3350 Here's a list of keystrokes available in the browse mode:
3351
3352 @table @kbd
3353 @item n
3354 @kindex n (Browse)
3355 @findex gnus-group-next-group
3356 Go to the next group (@code{gnus-group-next-group}).
3357
3358 @item p
3359 @kindex p (Browse)
3360 @findex gnus-group-prev-group
3361 Go to the previous group (@code{gnus-group-prev-group}).
3362
3363 @item SPACE
3364 @kindex SPACE (Browse)
3365 @findex gnus-browse-read-group
3366 Enter the current group and display the first article
3367 (@code{gnus-browse-read-group}).
3368
3369 @item RET
3370 @kindex RET (Browse)
3371 @findex gnus-browse-select-group
3372 Enter the current group (@code{gnus-browse-select-group}).
3373
3374 @item u
3375 @kindex u (Browse)
3376 @findex gnus-browse-unsubscribe-current-group
3377 Unsubscribe to the current group, or, as will be the case here,
3378 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3379
3380 @item l
3381 @itemx q
3382 @kindex q (Browse)
3383 @kindex l (Browse)
3384 @findex gnus-browse-exit
3385 Exit browse mode (@code{gnus-browse-exit}).
3386
3387 @item d
3388 @kindex d (Browse)
3389 @findex gnus-browse-describe-group
3390 Describe the current group (@code{gnus-browse-describe-group}).
3391
3392 @item ?
3393 @kindex ? (Browse)
3394 @findex gnus-browse-describe-briefly
3395 Describe browse mode briefly (well, there's not much to describe, is
3396 there) (@code{gnus-browse-describe-briefly}).
3397 @end table
3398
3399
3400 @node Exiting Gnus
3401 @section Exiting gnus
3402 @cindex exiting gnus
3403
3404 Yes, gnus is ex(c)iting.
3405
3406 @table @kbd
3407 @item z
3408 @kindex z (Group)
3409 @findex gnus-group-suspend
3410 Suspend gnus (@code{gnus-group-suspend}).  This doesn't really exit gnus,
3411 but it kills all buffers except the Group buffer.  I'm not sure why this
3412 is a gain, but then who am I to judge?
3413
3414 @item q
3415 @kindex q (Group)
3416 @findex gnus-group-exit
3417 @c @icon{gnus-group-exit}
3418 Quit gnus (@code{gnus-group-exit}).
3419
3420 @item Q
3421 @kindex Q (Group)
3422 @findex gnus-group-quit
3423 Quit gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3424 The dribble file will be saved, though (@pxref{Auto Save}).
3425 @end table
3426
3427 @vindex gnus-exit-gnus-hook
3428 @vindex gnus-suspend-gnus-hook
3429 @code{gnus-suspend-gnus-hook} is called when you suspend gnus and
3430 @code{gnus-exit-gnus-hook} is called when you quit gnus, while
3431 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3432 exiting gnus.
3433
3434 @findex gnus-unload
3435 @cindex unloading
3436 If you wish to completely unload gnus and all its adherents, you can use
3437 the @code{gnus-unload} command.  This command is also very handy when
3438 trying to customize meta-variables.
3439
3440 Note:
3441
3442 @quotation
3443 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3444 numbly heavy and herself fall into a hazy trance as the boy sitting
3445 behind her drew repeated lines with his pencil across the back of her
3446 plastic chair.
3447 @end quotation
3448
3449
3450 @node Group Topics
3451 @section Group Topics
3452 @cindex topics
3453
3454 If you read lots and lots of groups, it might be convenient to group
3455 them hierarchically according to topics.  You put your Emacs groups over
3456 here, your sex groups over there, and the rest (what, two groups or so?)
3457 you put in some misc section that you never bother with anyway.  You can
3458 even group the Emacs sex groups as a sub-topic to either the Emacs
3459 groups or the sex groups---or both!  Go wild!
3460
3461 @iftex
3462 @iflatex
3463 \gnusfigure{Group Topics}{400}{
3464 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3465 }
3466 @end iflatex
3467 @end iftex
3468
3469 Here's an example:
3470
3471 @example
3472 Gnus
3473   Emacs -- I wuw it!
3474      3: comp.emacs
3475      2: alt.religion.emacs
3476     Naughty Emacs
3477      452: alt.sex.emacs
3478        0: comp.talk.emacs.recovery
3479   Misc
3480      8: comp.binaries.fractals
3481     13: comp.sources.unix
3482 @end example
3483
3484 @findex gnus-topic-mode
3485 @kindex t (Group)
3486 To get this @emph{fab} functionality you simply turn on (ooh!) the
3487 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3488 is a toggling command.)
3489
3490 Go ahead, just try it.  I'll still be here when you get back.  La de
3491 dum...  Nice tune, that...  la la la...  What, you're back?  Yes, and
3492 now press @kbd{l}.  There.  All your groups are now listed under
3493 @samp{misc}.  Doesn't that make you feel all warm and fuzzy?  Hot and
3494 bothered?
3495
3496 If you want this permanently enabled, you should add that minor mode to
3497 the hook for the group mode.  Put the following line in your
3498 @file{~/.gnus} file:
3499
3500 @lisp
3501 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3502 @end lisp
3503
3504 @menu
3505 * Topic Commands::              Interactive E-Z commands.
3506 * Topic Variables::             How to customize the topics the Lisp Way.
3507 * Topic Sorting::               Sorting each topic individually.
3508 * Topic Topology::              A map of the world.
3509 * Topic Parameters::            Parameters that apply to all groups in a topic.
3510 @end menu
3511
3512
3513 @node Topic Commands
3514 @subsection Topic Commands
3515 @cindex topic commands
3516
3517 When the topic minor mode is turned on, a new @kbd{T} submap will be
3518 available.  In addition, a few of the standard keys change their
3519 definitions slightly.
3520
3521 In general, the following kinds of operations are possible on topics.
3522 First of all, you want to create topics.  Secondly, you want to put
3523 groups in topics and to move them around until you have an order you
3524 like.  The third kind of operation is to show/hide parts of the whole
3525 shebang.  You might want to hide a topic including its subtopics and
3526 groups, to get a better overview of the other groups.
3527
3528 Here is a list of the basic keys that you might need to set up topics
3529 the way you like.
3530
3531 @table @kbd
3532
3533 @item T n
3534 @kindex T n (Topic)
3535 @findex gnus-topic-create-topic
3536 Prompt for a new topic name and create it
3537 (@code{gnus-topic-create-topic}).
3538
3539 @item T TAB
3540 @itemx TAB
3541 @kindex T TAB (Topic)
3542 @kindex TAB (Topic)
3543 @findex gnus-topic-indent
3544 ``Indent'' the current topic so that it becomes a sub-topic of the
3545 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3546 ``un-indent'' the topic instead.
3547
3548 @item M-TAB
3549 @kindex M-TAB (Topic)
3550 @findex gnus-topic-unindent
3551 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3552 parent of its current parent (@code{gnus-topic-unindent}).
3553
3554 @end table
3555
3556 The following two keys can be used to move groups and topics around.
3557 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3558 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3559 kill and yank rather than cut and paste.
3560
3561 @table @kbd
3562
3563 @item C-k
3564 @kindex C-k (Topic)
3565 @findex gnus-topic-kill-group
3566 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3567 topic will be removed along with the topic.
3568
3569 @item C-y
3570 @kindex C-y (Topic)
3571 @findex gnus-topic-yank-group
3572 Yank the previously killed group or topic
3573 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3574 before all groups.
3575
3576 So, to move a topic to the beginning of the list of topics, just hit
3577 @kbd{C-k} on it.  This is like the `cut' part of cut and paste.  Then,
3578 move the cursor to the beginning of the buffer (just below the `Gnus'
3579 topic) and hit @kbd{C-y}.  This is like the `paste' part of cut and
3580 paste.  Like I said -- E-Z.
3581
3582 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3583 you can move topics around as well as groups.
3584
3585 @end table
3586
3587 After setting up the topics the way you like them, you might wish to
3588 hide a topic, or to show it again.  That's why we have the following
3589 key.
3590
3591 @table @kbd
3592
3593 @item RET
3594 @kindex RET (Topic)
3595 @findex gnus-topic-select-group
3596 @itemx SPACE
3597 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3598 When you perform this command on a group, you'll enter the group, as
3599 usual.  When done on a topic line, the topic will be folded (if it was
3600 visible) or unfolded (if it was folded already).  So it's basically a
3601 toggling command on topics.  In addition, if you give a numerical
3602 prefix, group on that level (and lower) will be displayed.
3603
3604 @end table
3605
3606 Now for a list of other commands, in no particular order.
3607
3608 @table @kbd
3609
3610 @item T m
3611 @kindex T m (Topic)
3612 @findex gnus-topic-move-group
3613 Move the current group to some other topic
3614 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3615 convention (@pxref{Process/Prefix}).
3616
3617 @item T j
3618 @kindex T j (Topic)
3619 @findex gnus-topic-jump-to-topic
3620 Go to a topic (@code{gnus-topic-jump-to-topic}).
3621
3622 @item T c
3623 @kindex T c (Topic)
3624 @findex gnus-topic-copy-group
3625 Copy the current group to some other topic
3626 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3627 convention (@pxref{Process/Prefix}).
3628
3629 @item T h
3630 @kindex T h (Topic)
3631 @findex gnus-topic-hide-topic
3632 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3633 a prefix, hide the topic permanently.
3634
3635 @item T s
3636 @kindex T s (Topic)
3637 @findex gnus-topic-show-topic
3638 Show the current topic (@code{gnus-topic-show-topic}).  If given
3639 a prefix, show the topic permanently.
3640
3641 @item T D
3642 @kindex T D (Topic)
3643 @findex gnus-topic-remove-group
3644 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3645 This command is mainly useful if you have the same group in several
3646 topics and wish to remove it from one of the topics.  You may also
3647 remove a group from all topics, but in that case, Gnus will add it to
3648 the root topic the next time you start Gnus.  In fact, all new groups
3649 (which, naturally, don't belong to any topic) will show up in the root
3650 topic.
3651
3652 This command uses the process/prefix convention
3653 (@pxref{Process/Prefix}).
3654
3655 @item T M
3656 @kindex T M (Topic)
3657 @findex gnus-topic-move-matching
3658 Move all groups that match some regular expression to a topic
3659 (@code{gnus-topic-move-matching}).
3660
3661 @item T C
3662 @kindex T C (Topic)
3663 @findex gnus-topic-copy-matching
3664 Copy all groups that match some regular expression to a topic
3665 (@code{gnus-topic-copy-matching}).
3666
3667 @item T H
3668 @kindex T H (Topic)
3669 @findex gnus-topic-toggle-display-empty-topics
3670 Toggle hiding empty topics
3671 (@code{gnus-topic-toggle-display-empty-topics}).
3672
3673 @item T #
3674 @kindex T # (Topic)
3675 @findex gnus-topic-mark-topic
3676 Mark all groups in the current topic with the process mark
3677 (@code{gnus-topic-mark-topic}).
3678
3679 @item T M-#
3680 @kindex T M-# (Topic)
3681 @findex gnus-topic-unmark-topic
3682 Remove the process mark from all groups in the current topic
3683 (@code{gnus-topic-unmark-topic}).
3684
3685 @item C-c C-x
3686 @kindex C-c C-x (Topic)
3687 @findex gnus-topic-expire-articles
3688 Run all expirable articles in the current group or topic through the
3689 expiry process (if any)
3690 (@code{gnus-topic-expire-articles}). (@pxref{Expiring Mail}).
3691
3692 @item T r
3693 @kindex T r (Topic)
3694 @findex gnus-topic-rename
3695 Rename a topic (@code{gnus-topic-rename}).
3696
3697 @item T DEL
3698 @kindex T DEL (Topic)
3699 @findex gnus-topic-delete
3700 Delete an empty topic (@code{gnus-topic-delete}).
3701
3702 @item A T
3703 @kindex A T (Topic)
3704 @findex gnus-topic-list-active
3705 List all groups that gnus knows about in a topics-ified way
3706 (@code{gnus-topic-list-active}).
3707
3708 @item T M-n
3709 @kindex T M-n (Topic)
3710 @findex gnus-topic-goto-next-topic
3711 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3712
3713 @item T M-p
3714 @kindex T M-p (Topic)
3715 @findex gnus-topic-goto-previous-topic
3716 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3717
3718 @item G p
3719 @kindex G p (Topic)
3720 @findex gnus-topic-edit-parameters
3721 @cindex group parameters
3722 @cindex topic parameters
3723 @cindex parameters
3724 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3725 @xref{Topic Parameters}.
3726
3727 @end table
3728
3729
3730 @node Topic Variables
3731 @subsection Topic Variables
3732 @cindex topic variables
3733
3734 The previous section told you how to tell Gnus which topics to display.
3735 This section explains how to tell Gnus what to display about each topic.
3736
3737 @vindex gnus-topic-line-format
3738 The topic lines themselves are created according to the
3739 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3740 Valid elements are:
3741
3742 @table @samp
3743 @item i
3744 Indentation.
3745 @item n
3746 Topic name.
3747 @item v
3748 Visibility.
3749 @item l
3750 Level.
3751 @item g
3752 Number of groups in the topic.
3753 @item a
3754 Number of unread articles in the topic.
3755 @item A
3756 Number of unread articles in the topic and all its subtopics.
3757 @end table
3758
3759 @vindex gnus-topic-indent-level
3760 Each sub-topic (and the groups in the sub-topics) will be indented with
3761 @code{gnus-topic-indent-level} times the topic level number of spaces.
3762 The default is 2.
3763
3764 @vindex gnus-topic-mode-hook
3765 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3766
3767 @vindex gnus-topic-display-empty-topics
3768 The @code{gnus-topic-display-empty-topics} says whether to display even
3769 topics that have no unread articles in them.  The default is @code{t}.
3770
3771
3772 @node Topic Sorting
3773 @subsection Topic Sorting
3774 @cindex topic sorting
3775
3776 You can sort the groups in each topic individually with the following
3777 commands:
3778
3779
3780 @table @kbd
3781 @item T S a
3782 @kindex T S a (Topic)
3783 @findex gnus-topic-sort-groups-by-alphabet
3784 Sort the current topic alphabetically by group name
3785 (@code{gnus-topic-sort-groups-by-alphabet}).
3786
3787 @item T S u
3788 @kindex T S u (Topic)
3789 @findex gnus-topic-sort-groups-by-unread
3790 Sort the current topic by the number of unread articles
3791 (@code{gnus-topic-sort-groups-by-unread}).
3792
3793 @item T S l
3794 @kindex T S l (Topic)
3795 @findex gnus-topic-sort-groups-by-level
3796 Sort the current topic by group level
3797 (@code{gnus-topic-sort-groups-by-level}).
3798
3799 @item T S v
3800 @kindex T S v (Topic)
3801 @findex gnus-topic-sort-groups-by-score
3802 Sort the current topic by group score
3803 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3804
3805 @item T S r
3806 @kindex T S r (Topic)
3807 @findex gnus-topic-sort-groups-by-rank
3808 Sort the current topic by group rank
3809 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3810
3811 @item T S m
3812 @kindex T S m (Topic)
3813 @findex gnus-topic-sort-groups-by-method
3814 Sort the current topic alphabetically by back end name
3815 (@code{gnus-topic-sort-groups-by-method}).
3816
3817 @item T S e
3818 @kindex T S e (Topic)
3819 @findex gnus-topic-sort-groups-by-server
3820 Sort the current topic alphabetically by server name
3821 (@code{gnus-topic-sort-groups-by-server}).
3822
3823 @item T S s
3824 @kindex T S s
3825 @findex gnus-topic-sort-groups
3826 Sort the current topic according to the function(s) given by the
3827 @code{gnus-group-sort-function} variable
3828 (@code{gnus-topic-sort-groups}).
3829
3830 @end table
3831
3832 When given a prefix argument, all these commands will sort in reverse
3833 order.  @xref{Sorting Groups}, for more information about group
3834 sorting.
3835
3836
3837 @node Topic Topology
3838 @subsection Topic Topology
3839 @cindex topic topology
3840 @cindex topology
3841
3842 So, let's have a look at an example group buffer:
3843
3844 @example
3845 Gnus
3846   Emacs -- I wuw it!
3847      3: comp.emacs
3848      2: alt.religion.emacs
3849     Naughty Emacs
3850      452: alt.sex.emacs
3851        0: comp.talk.emacs.recovery
3852   Misc
3853      8: comp.binaries.fractals
3854     13: comp.sources.unix
3855 @end example
3856
3857 So, here we have one top-level topic (@samp{Gnus}), two topics under
3858 that, and one sub-topic under one of the sub-topics.  (There is always
3859 just one (1) top-level topic).  This topology can be expressed as
3860 follows:
3861
3862 @lisp
3863 (("Gnus" visible)
3864  (("Emacs -- I wuw it!" visible)
3865   (("Naughty Emacs" visible)))
3866  (("Misc" visible)))
3867 @end lisp
3868
3869 @vindex gnus-topic-topology
3870 This is in fact how the variable @code{gnus-topic-topology} would look
3871 for the display above.  That variable is saved in the @file{.newsrc.eld}
3872 file, and shouldn't be messed with manually---unless you really want
3873 to.  Since this variable is read from the @file{.newsrc.eld} file,
3874 setting it in any other startup files will have no effect.
3875
3876 This topology shows what topics are sub-topics of what topics (right),
3877 and which topics are visible.  Two settings are currently
3878 allowed---@code{visible} and @code{invisible}.
3879
3880
3881 @node Topic Parameters
3882 @subsection Topic Parameters
3883 @cindex topic parameters
3884
3885 All groups in a topic will inherit group parameters from the parent (and
3886 ancestor) topic parameters.  All valid group parameters are valid topic
3887 parameters (@pxref{Group Parameters}).
3888
3889 In addition, the following parameters are only valid as topic
3890 parameters:
3891
3892 @table @code
3893 @item subscribe
3894 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3895 @code{subscribe} topic parameter says what groups go in what topic.  Its
3896 value should be a regexp to match the groups that should go in that
3897 topic.
3898
3899 @item subscribe-level
3900 When subscribing new groups by topic (see the @code{subscribe} parameter),
3901 the group will be subscribed with the level specified in the
3902 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3903
3904 @end table
3905
3906 Group parameters (of course) override topic parameters, and topic
3907 parameters in sub-topics override topic parameters in super-topics.  You
3908 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3909 verb, although you may feel free to disagree with me here.)
3910
3911 @example
3912 Gnus
3913   Emacs
3914      3: comp.emacs
3915      2: alt.religion.emacs
3916    452: alt.sex.emacs
3917     Relief
3918      452: alt.sex.emacs
3919        0: comp.talk.emacs.recovery
3920   Misc
3921      8: comp.binaries.fractals
3922     13: comp.sources.unix
3923    452: alt.sex.emacs
3924 @end example
3925
3926 The @samp{Emacs} topic has the topic parameter @code{(score-file
3927 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
3928 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
3929 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
3930 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
3931 . "religion.SCORE")}.
3932
3933 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
3934 will get the @file{relief.SCORE} home score file.  If you enter the same
3935 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
3936 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
3937 get the @file{religion.SCORE} home score file.
3938
3939 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
3940 there are some problems, especially with the @code{total-expiry}
3941 parameter.  Say you have a mail group in two topics; one with
3942 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
3943 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
3944 of these topics you mean to expire articles from, so anything may
3945 happen.  In fact, I hereby declare that it is @dfn{undefined} what
3946 happens.  You just have to be careful if you do stuff like that.
3947
3948
3949 @node Misc Group Stuff
3950 @section Misc Group Stuff
3951
3952 @menu
3953 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
3954 * Group Information::           Information and help on groups and Gnus.
3955 * Group Timestamp::             Making Gnus keep track of when you last read a group.
3956 * File Commands::               Reading and writing the Gnus files.
3957 * Sieve Commands::              Managing Sieve scripts.
3958 @end menu
3959
3960 @table @kbd
3961
3962 @item ^
3963 @kindex ^ (Group)
3964 @findex gnus-group-enter-server-mode
3965 Enter the server buffer (@code{gnus-group-enter-server-mode}).
3966 @xref{Server Buffer}.
3967
3968 @item a
3969 @kindex a (Group)
3970 @findex gnus-group-post-news
3971 Start composing a message (a news by default)
3972 (@code{gnus-group-post-news}).  If given a prefix, post to the group
3973 under the point.  If the prefix is 1, prompt for a group to post to.
3974 Contrary to what the name of this function suggests, the prepared
3975 article might be a mail instead of a news, if a mail group is specified
3976 with the prefix argument.  @xref{Composing Messages}.
3977
3978 @item m
3979 @kindex m (Group)
3980 @findex gnus-group-mail
3981 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
3982 use the posting style of the group under the point.  If the prefix is 1,
3983 prompt for a group name to find the posting style.
3984 @xref{Composing Messages}.
3985
3986 @item i
3987 @kindex i (Group)
3988 @findex gnus-group-news
3989 Start composing a news (@code{gnus-group-news}).  If given a prefix,
3990 post to the group under the point.  If the prefix is 1, prompt
3991 for group to post to.  @xref{Composing Messages}.
3992
3993 This function actually prepares a news even when using mail groups.
3994 This is useful for "posting" messages to mail groups without actually
3995 sending them over the network: they're just saved directly to the group
3996 in question.  The corresponding back end must have a request-post method
3997 for this to work though.
3998
3999 @end table
4000
4001 Variables for the group buffer:
4002
4003 @table @code
4004
4005 @item gnus-group-mode-hook
4006 @vindex gnus-group-mode-hook
4007 is called after the group buffer has been
4008 created.
4009
4010 @item gnus-group-prepare-hook
4011 @vindex gnus-group-prepare-hook
4012 is called after the group buffer is
4013 generated.  It may be used to modify the buffer in some strange,
4014 unnatural way.
4015
4016 @item gnus-group-prepared-hook
4017 @vindex gnus-group-prepare-hook
4018 is called as the very last thing after the group buffer has been
4019 generated.  It may be used to move point around, for instance.
4020
4021 @item gnus-permanently-visible-groups
4022 @vindex gnus-permanently-visible-groups
4023 Groups matching this regexp will always be listed in the group buffer,
4024 whether they are empty or not.
4025
4026 @item gnus-group-name-charset-method-alist
4027 @vindex gnus-group-name-charset-method-alist
4028 An alist of method and the charset for group names. It is used to show
4029 non-ASCII group names.
4030
4031 For example:
4032 @lisp
4033 (setq gnus-group-name-charset-method-alist
4034     '(((nntp "news.com.cn") . cn-gb-2312)))
4035 @end lisp
4036
4037 @item gnus-group-name-charset-group-alist
4038 @cindex UTF-8 group names
4039 @vindex gnus-group-name-charset-group-alist
4040 An alist of regexp of group name and the charset for group names.  It
4041 is used to show non-ASCII group names.  @code{((".*" utf-8))} is the
4042 default value if UTF-8 is supported, otherwise the default is nil.
4043
4044 For example:
4045 @lisp
4046 (setq gnus-group-name-charset-group-alist
4047     '(("\\.com\\.cn:" . cn-gb-2312)))
4048 @end lisp
4049
4050 @end table
4051
4052 @node Scanning New Messages
4053 @subsection Scanning New Messages
4054 @cindex new messages
4055 @cindex scanning new news
4056
4057 @table @kbd
4058
4059 @item g
4060 @kindex g (Group)
4061 @findex gnus-group-get-new-news
4062 @c @icon{gnus-group-get-new-news}
4063 Check the server(s) for new articles.  If the numerical prefix is used,
4064 this command will check only groups of level @var{arg} and lower
4065 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4066 command will force a total re-reading of the active file(s) from the
4067 back end(s).
4068
4069 @item M-g
4070 @kindex M-g (Group)
4071 @findex gnus-group-get-new-news-this-group
4072 @vindex gnus-goto-next-group-when-activating
4073 @c @icon{gnus-group-get-new-news-this-group}
4074 Check whether new articles have arrived in the current group
4075 (@code{gnus-group-get-new-news-this-group}).
4076 @code{gnus-goto-next-group-when-activating} says whether this command is
4077 to move point to the next group or not.  It is @code{t} by default.
4078
4079 @findex gnus-activate-all-groups
4080 @cindex activating groups
4081 @item C-c M-g
4082 @kindex C-c M-g (Group)
4083 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4084
4085 @item R
4086 @kindex R (Group)
4087 @cindex restarting
4088 @findex gnus-group-restart
4089 Restart gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4090 file(s), closes the connection to all servers, clears up all run-time
4091 gnus variables, and then starts gnus all over again.
4092
4093 @end table
4094
4095 @vindex gnus-get-new-news-hook
4096 @code{gnus-get-new-news-hook} is run just before checking for new news.
4097
4098 @vindex gnus-after-getting-new-news-hook
4099 @code{gnus-after-getting-new-news-hook} is run after checking for new
4100 news.
4101
4102
4103 @node Group Information
4104 @subsection Group Information
4105 @cindex group information
4106 @cindex information on groups
4107
4108 @table @kbd
4109
4110
4111 @item H f
4112 @kindex H f (Group)
4113 @findex gnus-group-fetch-faq
4114 @vindex gnus-group-faq-directory
4115 @cindex FAQ
4116 @cindex ange-ftp
4117 Try to fetch the FAQ for the current group
4118 (@code{gnus-group-fetch-faq}).  Gnus will try to get the FAQ from
4119 @code{gnus-group-faq-directory}, which is usually a directory on a
4120 remote machine.  This variable can also be a list of directories.  In
4121 that case, giving a prefix to this command will allow you to choose
4122 between the various sites.  @code{ange-ftp} (or @code{efs}) will be used
4123 for fetching the file.
4124
4125 If fetching from the first site is unsuccessful, gnus will attempt to go
4126 through @code{gnus-group-faq-directory} and try to open them one by one.
4127
4128 @item H c
4129 @kindex H c (Group)
4130 @findex gnus-group-fetch-charter
4131 @vindex gnus-group-charter-alist
4132 @cindex charter
4133 Try to open the charter for the current group in a web browser
4134 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4135 prefix argument.
4136
4137 Gnus will use @code{gnus-group-charter-alist} to find the location of
4138 the charter.  If no location is known, Gnus will fetch the control
4139 messages for the group, which in some cases includes the charter.
4140
4141 @item H C
4142 @kindex H C (Group)
4143 @findex gnus-group-fetch-control
4144 @vindex gnus-group-fetch-control-use-browse-url
4145 @cindex control message
4146 Fetch the control messages for the group from the archive at
4147 @code{ftp.isc.org} (@code{gnus-group-fetch-control}). Query for a
4148 group if given a prefix argument.
4149
4150 If @code{gnus-group-fetch-control-use-browse-url} is non-nil, Gnus
4151 will open the control messages in a browser using @code{browse-url}.
4152 Otherwise they are fetched using @code{ange-ftp} and displayed in an
4153 ephemeral group.
4154
4155 Note that the control messages are compressed.  To use this command
4156 you need to turn on @code{auto-compression-mode}
4157 (@pxref{(emacs)Compressed Files}).
4158
4159 @item H d
4160 @itemx C-c C-d
4161 @c @icon{gnus-group-describe-group}
4162 @kindex H d (Group)
4163 @kindex C-c C-d (Group)
4164 @cindex describing groups
4165 @cindex group description
4166 @findex gnus-group-describe-group
4167 Describe the current group (@code{gnus-group-describe-group}).  If given
4168 a prefix, force Gnus to re-read the description from the server.
4169
4170 @item M-d
4171 @kindex M-d (Group)
4172 @findex gnus-group-describe-all-groups
4173 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4174 prefix, force gnus to re-read the description file from the server.
4175
4176 @item H v
4177 @itemx V
4178 @kindex V (Group)
4179 @kindex H v (Group)
4180 @cindex version
4181 @findex gnus-version
4182 Display current gnus version numbers (@code{gnus-version}).
4183
4184 @item ?
4185 @kindex ? (Group)
4186 @findex gnus-group-describe-briefly
4187 Give a very short help message (@code{gnus-group-describe-briefly}).
4188
4189 @item C-c C-i
4190 @kindex C-c C-i (Group)
4191 @cindex info
4192 @cindex manual
4193 @findex gnus-info-find-node
4194 Go to the gnus info node (@code{gnus-info-find-node}).
4195 @end table
4196
4197
4198 @node Group Timestamp
4199 @subsection Group Timestamp
4200 @cindex timestamps
4201 @cindex group timestamps
4202
4203 It can be convenient to let gnus keep track of when you last read a
4204 group.  To set the ball rolling, you should add
4205 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4206
4207 @lisp
4208 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4209 @end lisp
4210
4211 After doing this, each time you enter a group, it'll be recorded.
4212
4213 This information can be displayed in various ways---the easiest is to
4214 use the @samp{%d} spec in the group line format:
4215
4216 @lisp
4217 (setq gnus-group-line-format
4218       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4219 @end lisp
4220
4221 This will result in lines looking like:
4222
4223 @example
4224 *        0: mail.ding                                19961002T012943
4225          0: custom                                   19961002T012713
4226 @end example
4227
4228 As you can see, the date is displayed in compact ISO 8601 format.  This
4229 may be a bit too much, so to just display the date, you could say
4230 something like:
4231
4232 @lisp
4233 (setq gnus-group-line-format
4234       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4235 @end lisp
4236
4237 If you would like greater control of the time format, you can use a
4238 user-defined format spec.  Something like the following should do the
4239 trick:
4240
4241 @lisp
4242 (setq gnus-group-line-format
4243       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4244 (defun gnus-user-format-function-d (headers)
4245   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4246     (if time
4247         (format-time-string "%b %d  %H:%M" time)
4248       "")))
4249 @end lisp
4250
4251
4252 @node File Commands
4253 @subsection File Commands
4254 @cindex file commands
4255
4256 @table @kbd
4257
4258 @item r
4259 @kindex r (Group)
4260 @findex gnus-group-read-init-file
4261 @vindex gnus-init-file
4262 @cindex reading init file
4263 Re-read the init file (@code{gnus-init-file}, which defaults to
4264 @file{~/.gnus}) (@code{gnus-group-read-init-file}).
4265
4266 @item s
4267 @kindex s (Group)
4268 @findex gnus-group-save-newsrc
4269 @cindex saving .newsrc
4270 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4271 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4272 file(s) whether Gnus thinks it is necessary or not.
4273
4274 @c @item Z
4275 @c @kindex Z (Group)
4276 @c @findex gnus-group-clear-dribble
4277 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4278
4279 @end table
4280
4281
4282 @node Sieve Commands
4283 @subsection Sieve Commands
4284 @cindex group sieve commands
4285
4286 Sieve is a server-side mail filtering language.  In Gnus you can use
4287 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4288 sieve rules that should apply to each group.  Gnus provides two
4289 commands to translate all these group parameters into a proper Sieve
4290 script that can be transfered to the server somehow.
4291
4292 @vindex gnus-sieve-file
4293 @vindex gnus-sieve-region-start
4294 @vindex gnus-sieve-region-end
4295 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4296 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4297 between two delimiters, @code{gnus-sieve-region-start} and
4298 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4299 outside these delimiters that will not be removed the next time you
4300 regenerate the Sieve script.
4301
4302 @vindex gnus-sieve-crosspost
4303 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4304 is generated.  If it is non-nil (the default) articles is placed in
4305 all groups that have matching rules, otherwise the article is only
4306 placed in the group with the first matching rule.  For example, the
4307 group parameter @samp{(sieve address "sender"
4308 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4309 code if @code{gnus-sieve-crosspost} is nil. (When
4310 @code{gnus-sieve-crosspost} is non-nil, it looks the same except that
4311 the line containing the call to @code{stop} is removed.)
4312
4313 @example
4314 if address "sender" "owner-ding@@hpc.uh.edu" @{
4315         fileinto "INBOX.ding";
4316         stop;
4317 @}
4318 @end example
4319
4320 @xref{Top, ,Top, sieve, Emacs Sieve}.
4321
4322 @table @kbd
4323
4324 @item D g
4325 @kindex D g (Group)
4326 @findex gnus-sieve-generate
4327 @vindex gnus-sieve-file
4328 @cindex generating sieve script
4329 Regenerate a Sieve script from the @code{sieve} group parameters and
4330 put you into the @code{gnus-sieve-file} without saving it.
4331
4332 @item D u
4333 @kindex D u (Group)
4334 @findex gnus-sieve-update
4335 @vindex gnus-sieve-file
4336 @cindex updating sieve script
4337 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4338 @code{sieve} group parameters, save the file and upload it to the
4339 server using the @code{sieveshell} program.
4340
4341 @end table
4342
4343
4344 @node Summary Buffer
4345 @chapter Summary Buffer
4346 @cindex summary buffer
4347
4348 A line for each article is displayed in the summary buffer.  You can
4349 move around, read articles, post articles and reply to articles.
4350
4351 The most common way to a summary buffer is to select a group from the
4352 group buffer (@pxref{Selecting a Group}).
4353
4354 You can have as many summary buffers open as you wish.
4355
4356 @menu
4357 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4358 * Summary Maneuvering::         Moving around the summary buffer.
4359 * Choosing Articles::           Reading articles.
4360 * Paging the Article::          Scrolling the current article.
4361 * Reply Followup and Post::     Posting articles.
4362 * Delayed Articles::            Send articles at a later time.
4363 * Marking Articles::            Marking articles as read, expirable, etc.
4364 * Limiting::                    You can limit the summary buffer.
4365 * Threading::                   How threads are made.
4366 * Sorting the Summary Buffer::  How articles and threads are sorted.
4367 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4368 * Article Caching::             You may store articles in a cache.
4369 * Persistent Articles::         Making articles expiry-resistant.
4370 * Article Backlog::             Having already read articles hang around.
4371 * Saving Articles::             Ways of customizing article saving.
4372 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4373 * Article Treatment::           The article buffer can be mangled at will.
4374 * MIME Commands::               Doing MIMEy things with the articles.
4375 * Charsets::                    Character set issues.
4376 * Article Commands::            Doing various things with the article buffer.
4377 * Summary Sorting::             Sorting the summary buffer in various ways.
4378 * Finding the Parent::          No child support? Get the parent.
4379 * Alternative Approaches::      Reading using non-default summaries.
4380 * Tree Display::                A more visual display of threads.
4381 * Mail Group Commands::         Some commands can only be used in mail groups.
4382 * Various Summary Stuff::       What didn't fit anywhere else.
4383 * Exiting the Summary Buffer::  Returning to the Group buffer,
4384                                 or reselecting the current group.
4385 * Crosspost Handling::          How crossposted articles are dealt with.
4386 * Duplicate Suppression::       An alternative when crosspost handling fails.
4387 * Security::                    Decrypt and Verify.
4388 * Mailing List::                Mailing list minor mode.
4389 @end menu
4390
4391
4392 @node Summary Buffer Format
4393 @section Summary Buffer Format
4394 @cindex summary buffer format
4395
4396 @iftex
4397 @iflatex
4398 \gnusfigure{The Summary Buffer}{180}{
4399 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4400 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4401 }
4402 @end iflatex
4403 @end iftex
4404
4405 @menu
4406 * Summary Buffer Lines::        You can specify how summary lines should look.
4407 * To From Newsgroups::          How to not display your own name.
4408 * Summary Buffer Mode Line::    You can say how the mode line should look.
4409 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4410 @end menu
4411
4412 @findex mail-extract-address-components
4413 @findex gnus-extract-address-components
4414 @vindex gnus-extract-address-components
4415 Gnus will use the value of the @code{gnus-extract-address-components}
4416 variable as a function for getting the name and address parts of a
4417 @code{From} header.  Three pre-defined functions exist:
4418 @code{gnus-extract-address-components}, which is the default, quite
4419 fast, and too simplistic solution;
4420 @code{mail-extract-address-components}, which works nicely, but is
4421 slower; and @code{std11-extract-address-components}, which works very
4422 nicely, but is slower.  The default function will return the wrong
4423 answer in 5% of the cases.  If this is unacceptable to you, use the
4424 other function instead:
4425
4426 @lisp
4427 (setq gnus-extract-address-components
4428       'mail-extract-address-components)
4429 @end lisp
4430
4431 @vindex gnus-summary-same-subject
4432 @code{gnus-summary-same-subject} is a string indicating that the current
4433 article has the same subject as the previous.  This string will be used
4434 with those specs that require it.  The default is @code{""}.
4435
4436
4437 @node Summary Buffer Lines
4438 @subsection Summary Buffer Lines
4439
4440 @vindex gnus-summary-line-format
4441 You can change the format of the lines in the summary buffer by changing
4442 the @code{gnus-summary-line-format} variable.  It works along the same
4443 lines as a normal @code{format} string, with some extensions
4444 (@pxref{Formatting Variables}).
4445
4446 There should always be a colon or a point position marker on the line;
4447 the cursor always moves to the point position marker or the colon after
4448 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4449 possible to change this.  Just write a new function
4450 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4451 @xref{Positioning Point}.
4452
4453 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4454
4455 The following format specification characters and extended format
4456 specification(s) are understood:
4457
4458 @table @samp
4459 @item N
4460 Article number.
4461 @item S
4462 Subject string.  List identifiers stripped,
4463 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4464 @item s
4465 Subject if the article is the root of the thread or the previous article
4466 had a different subject, @code{gnus-summary-same-subject} otherwise.
4467 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4468 @item F
4469 Full @code{From} header.
4470 @item n
4471 The name (from the @code{From} header).
4472 @item f
4473 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4474 From Newsgroups}).
4475 @item a
4476 The name (from the @code{From} header).  This differs from the @code{n}
4477 spec in that it uses the function designated by the
4478 @code{gnus-extract-address-components} variable, which is slower, but
4479 may be more thorough.
4480 @item A
4481 The address (from the @code{From} header).  This works the same way as
4482 the @code{a} spec.
4483 @item L
4484 Number of lines in the article.
4485 @item c
4486 Number of characters in the article. This specifier is not supported
4487 in some methods (like nnfolder).
4488 @item k
4489 Pretty-printed version of the number of characters in the article;
4490 for example, @samp{1.2k} or @samp{0.4M}.
4491 @item I
4492 Indentation based on thread level (@pxref{Customizing Threading}).
4493 @item B
4494 A complex trn-style thread tree, showing response-connecting trace
4495 lines.
4496 @item T
4497 Nothing if the article is a root and lots of spaces if it isn't (it
4498 pushes everything after it off the screen).
4499 @item [
4500 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4501 for adopted articles (@pxref{Customizing Threading}).
4502 @item ]
4503 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4504 for adopted articles.
4505 @item >
4506 One space for each thread level.
4507 @item <
4508 Twenty minus thread level spaces.
4509 @item U
4510 Unread. @xref{Read Articles}.
4511
4512 @item R
4513 This misleadingly named specifier is the @dfn{secondary mark}.  This
4514 mark will say whether the article has been replied to, has been cached,
4515 or has been saved.  @xref{Other Marks}.
4516
4517 @item i
4518 Score as a number (@pxref{Scoring}).
4519 @item z
4520 @vindex gnus-summary-zcore-fuzz
4521 Zcore, @samp{+} if above the default level and @samp{-} if below the
4522 default level.  If the difference between
4523 @code{gnus-summary-default-score} and the score is less than
4524 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4525 @item V
4526 Total thread score.
4527 @item x
4528 @code{Xref}.
4529 @item D
4530 @code{Date}.
4531 @item d
4532 The @code{Date} in @code{DD-MMM} format.
4533 @item o
4534 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4535 @item M
4536 @code{Message-ID}.
4537 @item r
4538 @code{References}.
4539 @item t
4540 Number of articles in the current sub-thread.  Using this spec will slow
4541 down summary buffer generation somewhat.
4542 @item e
4543 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4544 article has any children.
4545 @item P
4546 The line number.
4547 @item O
4548 Download mark.
4549 @item &user-date;
4550 Age sensitive date format.  Various date format is defined in
4551 @code{gnus-user-date-format-alist}.
4552 @item u
4553 User defined specifier.  The next character in the format string should
4554 be a letter.  Gnus will call the function
4555 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
4556 following @samp{%u}.  The function will be passed the current header as
4557 argument.  The function should return a string, which will be inserted
4558 into the summary just like information from any other summary specifier.
4559 @end table
4560
4561 Text between @samp{%(} and @samp{%)} will be highlighted with
4562 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4563 There can only be one such area.
4564
4565 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4566 have to be handled with care.  For reasons of efficiency, gnus will
4567 compute what column these characters will end up in, and ``hard-code''
4568 that.  This means that it is invalid to have these specs after a
4569 variable-length spec.  Well, you might not be arrested, but your summary
4570 buffer will look strange, which is bad enough.
4571
4572 The smart choice is to have these specs as far to the left as possible.
4573 (Isn't that the case with everything, though?  But I digress.)
4574
4575 This restriction may disappear in later versions of gnus.
4576
4577
4578 @node To From Newsgroups
4579 @subsection To From Newsgroups
4580 @cindex To
4581 @cindex Newsgroups
4582
4583 In some groups (particularly in archive groups), the @code{From} header
4584 isn't very interesting, since all the articles there are written by
4585 you.  To display the information in the @code{To} or @code{Newsgroups}
4586 headers instead, you need to decide three things: What information to
4587 gather; where to display it; and when to display it.
4588
4589 @enumerate
4590 @item
4591 @vindex gnus-extra-headers
4592 The reading of extra header information is controlled by the
4593 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4594 instance:
4595
4596 @lisp
4597 (setq gnus-extra-headers
4598       '(To Newsgroups X-Newsreader))
4599 @end lisp
4600
4601 This will result in Gnus trying to obtain these three headers, and
4602 storing it in header structures for later easy retrieval.
4603
4604 @item
4605 @findex gnus-extra-header
4606 The value of these extra headers can be accessed via the
4607 @code{gnus-extra-header} function.  Here's a format line spec that will
4608 access the @code{X-Newsreader} header:
4609
4610 @example
4611 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4612 @end example
4613
4614 @item
4615 @vindex gnus-ignored-from-addresses
4616 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4617 summary line spec returns the @code{To}, @code{Newsreader} or
4618 @code{From} header.  If this regexp matches the contents of the
4619 @code{From} header, the value of the @code{To} or @code{Newsreader}
4620 headers are used instead.
4621
4622 @end enumerate
4623
4624 @vindex nnmail-extra-headers
4625 A related variable is @code{nnmail-extra-headers}, which controls when
4626 to include extra headers when generating overview (@sc{nov}) files.  If
4627 you have old overview files, you should regenerate them after changing
4628 this variable, by entering the server buffer using `^', and then `g' on
4629 the appropriate mail server (e.g. nnml) to cause regeneration.
4630
4631 @vindex gnus-summary-line-format
4632 You also have to instruct Gnus to display the data by changing the
4633 @code{%n} spec to the @code{%f} spec in the
4634 @code{gnus-summary-line-format} variable.
4635
4636 In summary, you'd typically put something like the following in
4637 @file{~/.gnus}:
4638
4639 @lisp
4640 (setq gnus-extra-headers
4641       '(To Newsgroups))
4642 (setq nnmail-extra-headers gnus-extra-headers)
4643 (setq gnus-summary-line-format
4644       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4645 (setq gnus-ignored-from-addresses
4646       "Your Name Here")
4647 @end lisp
4648
4649 (The values listed above are the default values in Gnus.  Alter them
4650 to fit your needs.)
4651
4652 A note for news server administrators, or for users who wish to try to
4653 convince their news server administrator to provide some additional
4654 support:
4655
4656 The above is mostly useful for mail groups, where you have control over
4657 the @sc{nov} files that are created.  However, if you can persuade your
4658 nntp admin to add (in the usual implementation, notably INN):
4659
4660 @example
4661 Newsgroups:full
4662 @end example
4663
4664 to the end of her @file{overview.fmt} file, then you can use that just
4665 as you would the extra headers from the mail groups.
4666
4667
4668 @node Summary Buffer Mode Line
4669 @subsection Summary Buffer Mode Line
4670
4671 @vindex gnus-summary-mode-line-format
4672 You can also change the format of the summary mode bar (@pxref{Mode Line
4673 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4674 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4675
4676 Here are the elements you can play with:
4677
4678 @table @samp
4679 @item G
4680 Group name.
4681 @item p
4682 Unprefixed group name.
4683 @item A
4684 Current article number.
4685 @item z
4686 Current article score.
4687 @item V
4688 Gnus version.
4689 @item U
4690 Number of unread articles in this group.
4691 @item e
4692 Number of unread articles in this group that aren't displayed in the
4693 summary buffer.
4694 @item Z
4695 A string with the number of unread and unselected articles represented
4696 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4697 articles, and just as @samp{<%U more>} if there are just unread articles
4698 and no unselected ones.
4699 @item g
4700 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4701 shortened to @samp{r.a.anime}.
4702 @item S
4703 Subject of the current article.
4704 @item u
4705 User-defined spec (@pxref{User-Defined Specs}).
4706 @item s
4707 Name of the current score file (@pxref{Scoring}).
4708 @item d
4709 Number of dormant articles (@pxref{Unread Articles}).
4710 @item t
4711 Number of ticked articles (@pxref{Unread Articles}).
4712 @item r
4713 Number of articles that have been marked as read in this session.
4714 @item E
4715 Number of articles expunged by the score files.
4716 @end table
4717
4718
4719 @node Summary Highlighting
4720 @subsection Summary Highlighting
4721
4722 @table @code
4723
4724 @item gnus-visual-mark-article-hook
4725 @vindex gnus-visual-mark-article-hook
4726 This hook is run after selecting an article.  It is meant to be used for
4727 highlighting the article in some way.  It is not run if
4728 @code{gnus-visual} is @code{nil}.
4729
4730 @item gnus-summary-update-hook
4731 @vindex gnus-summary-update-hook
4732 This hook is called when a summary line is changed.  It is not run if
4733 @code{gnus-visual} is @code{nil}.
4734
4735 @item gnus-summary-selected-face
4736 @vindex gnus-summary-selected-face
4737 This is the face (or @dfn{font} as some people call it) used to
4738 highlight the current article in the summary buffer.
4739
4740 @item gnus-summary-highlight
4741 @vindex gnus-summary-highlight
4742 Summary lines are highlighted according to this variable, which is a
4743 list where the elements are of the format @code{(@var{form}
4744 . @var{face})}.  If you would, for instance, like ticked articles to be
4745 italic and high-scored articles to be bold, you could set this variable
4746 to something like
4747 @lisp
4748 (((eq mark gnus-ticked-mark) . italic)
4749  ((> score default) . bold))
4750 @end lisp
4751 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4752 @var{face} will be applied to the line.
4753 @end table
4754
4755
4756 @node Summary Maneuvering
4757 @section Summary Maneuvering
4758 @cindex summary movement
4759
4760 All the straight movement commands understand the numeric prefix and
4761 behave pretty much as you'd expect.
4762
4763 None of these commands select articles.
4764
4765 @table @kbd
4766 @item G M-n
4767 @itemx M-n
4768 @kindex M-n (Summary)
4769 @kindex G M-n (Summary)
4770 @findex gnus-summary-next-unread-subject
4771 Go to the next summary line of an unread article
4772 (@code{gnus-summary-next-unread-subject}).
4773
4774 @item G M-p
4775 @itemx M-p
4776 @kindex M-p (Summary)
4777 @kindex G M-p (Summary)
4778 @findex gnus-summary-prev-unread-subject
4779 Go to the previous summary line of an unread article
4780 (@code{gnus-summary-prev-unread-subject}).
4781
4782 @item G g
4783 @kindex G g (Summary)
4784 @findex gnus-summary-goto-subject
4785 Ask for an article number and then go to the summary line of that article
4786 without displaying the article (@code{gnus-summary-goto-subject}).
4787 @end table
4788
4789 If gnus asks you to press a key to confirm going to the next group, you
4790 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4791 buffer, searching for the next group to read without actually returning
4792 to the group buffer.
4793
4794 Variables related to summary movement:
4795
4796 @table @code
4797
4798 @vindex gnus-auto-select-next
4799 @item gnus-auto-select-next
4800 If you issue one of the movement commands (like @kbd{n}) and there are
4801 no more unread articles after the current one, gnus will offer to go to
4802 the next group.  If this variable is @code{t} and the next group is
4803 empty, gnus will exit summary mode and return to the group buffer.  If
4804 this variable is neither @code{t} nor @code{nil}, gnus will select the
4805 next group with unread articles.  As a special case, if this variable
4806 is @code{quietly}, Gnus will select the next group without asking for
4807 confirmation.  If this variable is @code{almost-quietly}, the same
4808 will happen only if you are located on the last article in the group.
4809 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4810 command will go to the next group without confirmation.  Also
4811 @pxref{Group Levels}.
4812
4813 @item gnus-auto-select-same
4814 @vindex gnus-auto-select-same
4815 If non-@code{nil}, all the movement commands will try to go to the next
4816 article with the same subject as the current.  (@dfn{Same} here might
4817 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4818 for details (@pxref{Customizing Threading}).)  If there are no more
4819 articles with the same subject, go to the first unread article.
4820
4821 This variable is not particularly useful if you use a threaded display.
4822
4823 @item gnus-summary-check-current
4824 @vindex gnus-summary-check-current
4825 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4826 to the next (or previous) article if the current article is unread.
4827 Instead, they will choose the current article.
4828
4829 @item gnus-auto-center-summary
4830 @vindex gnus-auto-center-summary
4831 If non-@code{nil}, gnus will keep the point in the summary buffer
4832 centered at all times.  This makes things quite tidy, but if you have a
4833 slow network connection, or simply do not like this un-Emacsism, you can
4834 set this variable to @code{nil} to get the normal Emacs scrolling
4835 action.  This will also inhibit horizontal re-centering of the summary
4836 buffer, which might make it more inconvenient to read extremely long
4837 threads.
4838
4839 This variable can also be a number.  In that case, center the window at
4840 the given number of lines from the top.
4841
4842 @end table
4843
4844
4845 @node Choosing Articles
4846 @section Choosing Articles
4847 @cindex selecting articles
4848
4849 @menu
4850 * Choosing Commands::           Commands for choosing articles.
4851 * Choosing Variables::          Variables that influence these commands.
4852 @end menu
4853
4854
4855 @node Choosing Commands
4856 @subsection Choosing Commands
4857
4858 None of the following movement commands understand the numeric prefix,
4859 and they all select and display an article.
4860
4861 If you want to fetch new articles or redisplay the group, see
4862 @ref{Exiting the Summary Buffer}.
4863
4864 @table @kbd
4865 @item SPACE
4866 @kindex SPACE (Summary)
4867 @findex gnus-summary-next-page
4868 Select the current article, or, if that one's read already, the next
4869 unread article (@code{gnus-summary-next-page}).
4870
4871 @item G n
4872 @itemx n
4873 @kindex n (Summary)
4874 @kindex G n (Summary)
4875 @findex gnus-summary-next-unread-article
4876 @c @icon{gnus-summary-next-unread}
4877 Go to next unread article (@code{gnus-summary-next-unread-article}).
4878
4879 @item G p
4880 @itemx p
4881 @kindex p (Summary)
4882 @findex gnus-summary-prev-unread-article
4883 @c @icon{gnus-summary-prev-unread}
4884 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
4885
4886 @item G N
4887 @itemx N
4888 @kindex N (Summary)
4889 @kindex G N (Summary)
4890 @findex gnus-summary-next-article
4891 Go to the next article (@code{gnus-summary-next-article}).
4892
4893 @item G P
4894 @itemx P
4895 @kindex P (Summary)
4896 @kindex G P (Summary)
4897 @findex gnus-summary-prev-article
4898 Go to the previous article (@code{gnus-summary-prev-article}).
4899
4900 @item G C-n
4901 @kindex G C-n (Summary)
4902 @findex gnus-summary-next-same-subject
4903 Go to the next article with the same subject
4904 (@code{gnus-summary-next-same-subject}).
4905
4906 @item G C-p
4907 @kindex G C-p (Summary)
4908 @findex gnus-summary-prev-same-subject
4909 Go to the previous article with the same subject
4910 (@code{gnus-summary-prev-same-subject}).
4911
4912 @item G f
4913 @itemx .
4914 @kindex G f  (Summary)
4915 @kindex .  (Summary)
4916 @findex gnus-summary-first-unread-article
4917 Go to the first unread article
4918 (@code{gnus-summary-first-unread-article}).
4919
4920 @item G b
4921 @itemx ,
4922 @kindex G b (Summary)
4923 @kindex , (Summary)
4924 @findex gnus-summary-best-unread-article
4925 Go to the unread article with the highest score
4926 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
4927 go to the first unread article that has a score over the default score.
4928
4929 @item G l
4930 @itemx l
4931 @kindex l (Summary)
4932 @kindex G l (Summary)
4933 @findex gnus-summary-goto-last-article
4934 Go to the previous article read (@code{gnus-summary-goto-last-article}).
4935
4936 @item G o
4937 @kindex G o (Summary)
4938 @findex gnus-summary-pop-article
4939 @cindex history
4940 @cindex article history
4941 Pop an article off the summary history and go to this article
4942 (@code{gnus-summary-pop-article}).  This command differs from the
4943 command above in that you can pop as many previous articles off the
4944 history as you like, while @kbd{l} toggles the two last read articles.
4945 For a somewhat related issue (if you use these commands a lot),
4946 @pxref{Article Backlog}.
4947
4948 @item G j
4949 @itemx j
4950 @kindex j (Summary)
4951 @kindex G j (Summary)
4952 @findex gnus-summary-goto-article
4953 Ask for an article number or @code{Message-ID}, and then go to that
4954 article (@code{gnus-summary-goto-article}).
4955
4956 @end table
4957
4958
4959 @node Choosing Variables
4960 @subsection Choosing Variables
4961
4962 Some variables relevant for moving and selecting articles:
4963
4964 @table @code
4965 @item gnus-auto-extend-newsgroup
4966 @vindex gnus-auto-extend-newsgroup
4967 All the movement commands will try to go to the previous (or next)
4968 article, even if that article isn't displayed in the Summary buffer if
4969 this variable is non-@code{nil}.  Gnus will then fetch the article from
4970 the server and display it in the article buffer.
4971
4972 @item gnus-select-article-hook
4973 @vindex gnus-select-article-hook
4974 This hook is called whenever an article is selected.  By default it
4975 exposes any threads hidden under the selected article.
4976
4977 @item gnus-mark-article-hook
4978 @vindex gnus-mark-article-hook
4979 @findex gnus-summary-mark-unread-as-read
4980 @findex gnus-summary-mark-read-and-unread-as-read
4981 @findex gnus-unread-mark
4982 This hook is called whenever an article is selected.  It is intended to
4983 be used for marking articles as read.  The default value is
4984 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
4985 mark of almost any article you read to @code{gnus-unread-mark}.  The
4986 only articles not affected by this function are ticked, dormant, and
4987 expirable articles.  If you'd instead like to just have unread articles
4988 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
4989 instead.  It will leave marks like @code{gnus-low-score-mark},
4990 @code{gnus-del-mark} (and so on) alone.
4991
4992 @end table
4993
4994
4995 @node Paging the Article
4996 @section Scrolling the Article
4997 @cindex article scrolling
4998
4999 @table @kbd
5000
5001 @item SPACE
5002 @kindex SPACE (Summary)
5003 @findex gnus-summary-next-page
5004 Pressing @kbd{SPACE} will scroll the current article forward one page,
5005 or, if you have come to the end of the current article, will choose the
5006 next article (@code{gnus-summary-next-page}).
5007
5008 @item DEL
5009 @kindex DEL (Summary)
5010 @findex gnus-summary-prev-page
5011 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5012
5013 @item RET
5014 @kindex RET (Summary)
5015 @findex gnus-summary-scroll-up
5016 Scroll the current article one line forward
5017 (@code{gnus-summary-scroll-up}).
5018
5019 @item M-RET
5020 @kindex M-RET (Summary)
5021 @findex gnus-summary-scroll-down
5022 Scroll the current article one line backward
5023 (@code{gnus-summary-scroll-down}).
5024
5025 @item A g
5026 @itemx g
5027 @kindex A g (Summary)
5028 @kindex g (Summary)
5029 @findex gnus-summary-show-article
5030 @vindex gnus-summary-show-article-charset-alist
5031 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5032 given a prefix, fetch the current article, but don't run any of the
5033 article treatment functions.  This will give you a ``raw'' article, just
5034 the way it came from the server.
5035
5036 If given a numerical prefix, you can do semi-manual charset stuff.
5037 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5038 encoded in the @code{cn-gb-2312} charset.  If you have
5039
5040 @lisp
5041 (setq gnus-summary-show-article-charset-alist
5042       '((1 . cn-gb-2312)
5043         (2 . big5)))
5044 @end lisp
5045
5046 then you can say @kbd{C-u 1 g} to get the same effect.
5047
5048 @item A <
5049 @itemx <
5050 @kindex < (Summary)
5051 @kindex A < (Summary)
5052 @findex gnus-summary-beginning-of-article
5053 Scroll to the beginning of the article
5054 (@code{gnus-summary-beginning-of-article}).
5055
5056 @item A >
5057 @itemx >
5058 @kindex > (Summary)
5059 @kindex A > (Summary)
5060 @findex gnus-summary-end-of-article
5061 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5062
5063 @item A s
5064 @itemx s
5065 @kindex A s (Summary)
5066 @kindex s (Summary)
5067 @findex gnus-summary-isearch-article
5068 Perform an isearch in the article buffer
5069 (@code{gnus-summary-isearch-article}).
5070
5071 @item h
5072 @kindex h (Summary)
5073 @findex gnus-summary-select-article-buffer
5074 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5075
5076 @end table
5077
5078
5079 @node Reply Followup and Post
5080 @section Reply, Followup and Post
5081
5082 @menu
5083 * Summary Mail Commands::       Sending mail.
5084 * Summary Post Commands::       Sending news.
5085 * Summary Message Commands::    Other Message-related commands.
5086 * Canceling and Superseding::   
5087 @end menu
5088
5089
5090 @node Summary Mail Commands
5091 @subsection Summary Mail Commands
5092 @cindex mail
5093 @cindex composing mail
5094
5095 Commands for composing a mail message:
5096
5097 @table @kbd
5098
5099 @item S r
5100 @itemx r
5101 @kindex S r (Summary)
5102 @kindex r (Summary)
5103 @findex gnus-summary-reply
5104 @c @icon{gnus-summary-mail-reply}
5105 @c @icon{gnus-summary-reply}
5106 Mail a reply to the author of the current article
5107 (@code{gnus-summary-reply}).
5108
5109 @item S R
5110 @itemx R
5111 @kindex R (Summary)
5112 @kindex S R (Summary)
5113 @findex gnus-summary-reply-with-original
5114 @c @icon{gnus-summary-reply-with-original}
5115 Mail a reply to the author of the current article and include the
5116 original message (@code{gnus-summary-reply-with-original}).  This
5117 command uses the process/prefix convention.
5118
5119 @item S w
5120 @kindex S w (Summary)
5121 @findex gnus-summary-wide-reply
5122 Mail a wide reply to the author of the current article
5123 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5124 goes out to all people listed in the @code{To}, @code{From} (or
5125 @code{Reply-to}) and @code{Cc} headers.
5126
5127 @item S W
5128 @kindex S W (Summary)
5129 @findex gnus-summary-wide-reply-with-original
5130 Mail a wide reply to the current article and include the original
5131 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5132 the process/prefix convention.
5133
5134 @item S v
5135 @kindex S v (Summary)
5136 @findex gnus-summary-very-wide-reply
5137 Mail a very wide reply to the author of the current article
5138 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5139 that goes out to all people listed in the @code{To}, @code{From} (or
5140 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5141 articles.  This command uses the process/prefix convention.
5142
5143 @item S V
5144 @kindex S V (Summary)
5145 @findex gnus-summary-very-wide-reply-with-original
5146 Mail a very wide reply to the author of the current article and include the
5147 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5148 command uses the process/prefix convention.
5149
5150 @item S B r
5151 @kindex S B r (Summary)
5152 @findex gnus-summary-reply-broken-reply-to
5153 Mail a reply to the author of the current article but ignore the
5154 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5155
5156 @item S B R
5157 @kindex S B R (Summary)
5158 @findex gnus-summary-reply-broken-reply-to-with-original
5159 Mail a reply to the author of the current article and include the
5160 original message but ignore the @code{Reply-To} field
5161 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5162
5163 @item S o m
5164 @itemx C-c C-f
5165 @kindex S o m (Summary)
5166 @kindex C-c C-f (Summary)
5167 @findex gnus-summary-mail-forward
5168 @c @icon{gnus-summary-mail-forward}
5169 Forward the current article to some other person
5170 (@code{gnus-summary-mail-forward}).  If given a prefix, include the full
5171 headers of the forwarded article.
5172
5173 @item S m
5174 @itemx m
5175 @kindex m (Summary)
5176 @kindex S m (Summary)
5177 @findex gnus-summary-mail-other-window
5178 @c @icon{gnus-summary-mail-originate}
5179 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5180 the posting style of the current group.  If given a prefix, disable that.
5181 If the prefix is 1, prompt for a group name to find the posting style.
5182
5183 @item S i
5184 @itemx i
5185 @kindex i (Summary)
5186 @kindex S i (Summary)
5187 @findex gnus-summary-news-other-window
5188 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5189 post to the current group.  If given a prefix, disable that.  If the
5190 prefix is 1, prompt for a group to post to.
5191
5192 This function actually prepares a news even when using mail groups.
5193 This is useful for "posting" messages to mail groups without actually
5194 sending them over the network: they're just saved directly to the group
5195 in question.  The corresponding back end must have a request-post method
5196 for this to work though.
5197
5198 @item S D b
5199 @kindex S D b (Summary)
5200 @findex gnus-summary-resend-bounced-mail
5201 @cindex bouncing mail
5202 If you have sent a mail, but the mail was bounced back to you for some
5203 reason (wrong address, transient failure), you can use this command to
5204 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5205 will be popped into a mail buffer where you can edit the headers before
5206 sending the mail off again.  If you give a prefix to this command, and
5207 the bounced mail is a reply to some other mail, gnus will try to fetch
5208 that mail and display it for easy perusal of its headers.  This might
5209 very well fail, though.
5210
5211 @item S D r
5212 @kindex S D r (Summary)
5213 @findex gnus-summary-resend-message
5214 Not to be confused with the previous command,
5215 @code{gnus-summary-resend-message} will prompt you for an address to
5216 send the current message off to, and then send it to that place.  The
5217 headers of the message won't be altered---but lots of headers that say
5218 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5219 means that you actually send a mail to someone that has a @code{To}
5220 header that (probably) points to yourself.  This will confuse people.
5221 So, natcherly you'll only do that if you're really eVIl.
5222
5223 This command is mainly used if you have several accounts and want to
5224 ship a mail to a different account of yours.  (If you're both
5225 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5226 to the @code{root} account, you may want to resend it to
5227 @code{postmaster}.  Ordnung muss sein!
5228
5229 This command understands the process/prefix convention
5230 (@pxref{Process/Prefix}).
5231
5232 @item S O m
5233 @kindex S O m (Summary)
5234 @findex gnus-summary-digest-mail-forward
5235 Digest the current series (@pxref{Decoding Articles}) and forward the
5236 result using mail (@code{gnus-summary-digest-mail-forward}).  This
5237 command uses the process/prefix convention (@pxref{Process/Prefix}).
5238
5239 @item S M-c
5240 @kindex S M-c (Summary)
5241 @findex gnus-summary-mail-crosspost-complaint
5242 @cindex crossposting
5243 @cindex excessive crossposting
5244 Send a complaint about excessive crossposting to the author of the
5245 current article (@code{gnus-summary-mail-crosspost-complaint}).
5246
5247 @findex gnus-crosspost-complaint
5248 This command is provided as a way to fight back against the current
5249 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5250 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5251 command understands the process/prefix convention
5252 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5253
5254 @end table
5255
5256 Also @xref{Header Commands, ,Header Commands, message, The Message
5257 Manual}, for more information.
5258
5259
5260 @node Summary Post Commands
5261 @subsection Summary Post Commands
5262 @cindex post
5263 @cindex composing news
5264
5265 Commands for posting a news article:
5266
5267 @table @kbd
5268 @item S p
5269 @itemx a
5270 @kindex a (Summary)
5271 @kindex S p (Summary)
5272 @findex gnus-summary-post-news
5273 @c @icon{gnus-summary-post-news}
5274 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5275 default, post to the current group.  If given a prefix, disable that.
5276 If the prefix is 1, prompt for another group instead.
5277
5278 @item S f
5279 @itemx f
5280 @kindex f (Summary)
5281 @kindex S f (Summary)
5282 @findex gnus-summary-followup
5283 @c @icon{gnus-summary-followup}
5284 Post a followup to the current article (@code{gnus-summary-followup}).
5285
5286 @item S F
5287 @itemx F
5288 @kindex S F (Summary)
5289 @kindex F (Summary)
5290 @c @icon{gnus-summary-followup-with-original}
5291 @findex gnus-summary-followup-with-original
5292 Post a followup to the current article and include the original message
5293 (@code{gnus-summary-followup-with-original}).   This command uses the
5294 process/prefix convention.
5295
5296 @item S n
5297 @kindex S n (Summary)
5298 @findex gnus-summary-followup-to-mail
5299 Post a followup to the current article via news, even if you got the
5300 message through mail (@code{gnus-summary-followup-to-mail}).
5301
5302 @item S N
5303 @kindex S N (Summary)
5304 @findex gnus-summary-followup-to-mail-with-original
5305 Post a followup to the current article via news, even if you got the
5306 message through mail and include the original message
5307 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5308 the process/prefix convention.
5309
5310 @item S o p
5311 @kindex S o p (Summary)
5312 @findex gnus-summary-post-forward
5313 Forward the current article to a newsgroup
5314 (@code{gnus-summary-post-forward}).  If given a prefix, include the full
5315 headers of the forwarded article.
5316
5317 @item S O p
5318 @kindex S O p (Summary)
5319 @findex gnus-summary-digest-post-forward
5320 @cindex digests
5321 @cindex making digests
5322 Digest the current series and forward the result to a newsgroup
5323 (@code{gnus-summary-digest-post-forward}).  This command uses the
5324 process/prefix convention.
5325
5326 @item S u
5327 @kindex S u (Summary)
5328 @findex gnus-uu-post-news
5329 @c @icon{gnus-uu-post-news}
5330 Uuencode a file, split it into parts, and post it as a series
5331 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5332 @end table
5333
5334 Also @xref{Header Commands, ,Header Commands, message, The Message
5335 Manual}, for more information.
5336
5337
5338 @node Summary Message Commands
5339 @subsection Summary Message Commands
5340
5341 @table @kbd
5342 @item S y
5343 @kindex S y (Summary)
5344 @findex gnus-summary-yank-message
5345 Yank the current article into an already existing Message composition
5346 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5347 what message buffer you want to yank into, and understands the
5348 process/prefix convention (@pxref{Process/Prefix}).
5349
5350 @end table
5351
5352
5353 @node Canceling and Superseding
5354 @subsection Canceling Articles
5355 @cindex canceling articles
5356 @cindex superseding articles
5357
5358 Have you ever written something, and then decided that you really,
5359 really, really wish you hadn't posted that?
5360
5361 Well, you can't cancel mail, but you can cancel posts.
5362
5363 @findex gnus-summary-cancel-article
5364 @kindex C (Summary)
5365 @c @icon{gnus-summary-cancel-article}
5366 Find the article you wish to cancel (you can only cancel your own
5367 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5368 c} (@code{gnus-summary-cancel-article}).  Your article will be
5369 canceled---machines all over the world will be deleting your article.
5370 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5371
5372 Be aware, however, that not all sites honor cancels, so your article may
5373 live on here and there, while most sites will delete the article in
5374 question.
5375
5376 Gnus will use the ``current'' select method when canceling.  If you
5377 want to use the standard posting method, use the @samp{a} symbolic
5378 prefix (@pxref{Symbolic Prefixes}).
5379
5380 If you discover that you have made some mistakes and want to do some
5381 corrections, you can post a @dfn{superseding} article that will replace
5382 your original article.
5383
5384 @findex gnus-summary-supersede-article
5385 @kindex S (Summary)
5386 Go to the original article and press @kbd{S s}
5387 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5388 where you can edit the article all you want before sending it off the
5389 usual way.
5390
5391 The same goes for superseding as for canceling, only more so: Some
5392 sites do not honor superseding.  On those sites, it will appear that you
5393 have posted almost the same article twice.
5394
5395 If you have just posted the article, and change your mind right away,
5396 there is a trick you can use to cancel/supersede the article without
5397 waiting for the article to appear on your site first.  You simply return
5398 to the post buffer (which is called @code{*sent ...*}).  There you will
5399 find the article you just posted, with all the headers intact.  Change
5400 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5401 header by substituting one of those words for the word
5402 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5403 you would do normally.  The previous article will be
5404 canceled/superseded.
5405
5406 Just remember, kids: There is no 'c' in 'supersede'.
5407
5408 @node Delayed Articles
5409 @section Delayed Articles
5410 @cindex delayed sending
5411 @cindex send delayed
5412
5413 Sometimes, you might wish to delay the sending of a message.  For
5414 example, you might wish to arrange for a message to turn up just in time
5415 to remind your about the birthday of your Significant Other.  For this,
5416 there is the @code{gnus-delay} package.  Setup is simple:
5417
5418 @lisp
5419 (gnus-delay-initialize)
5420 @end lisp
5421
5422 @findex gnus-delay-article
5423 Normally, to send a message you use the @kbd{C-c C-c} command from
5424 Message mode.  To delay a message, use @kbd{C-c C-j}
5425 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5426 message should be delayed.  Possible answers are:
5427
5428 @itemize @bullet
5429 @item
5430 A time span.  Consists of an integer and a letter.  For example,
5431 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5432 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5433 (months) and @code{Y} (years).
5434
5435 @item
5436 A specific date.  Looks like @code{YYYYY-MM-DD}.  The message will be
5437 delayed until that day, at a specific time (eight o'clock by default).
5438 See also @code{gnus-delay-default-hour}.
5439
5440 @item
5441 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5442 stuff.  The deadline will be at that time today, except if that time has
5443 already passed, then it's at the given time tomorrow.  So if it's ten
5444 o'clock in the morning and you specify @code{11:15}, then the deadline
5445 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5446 that means a time tomorrow.
5447 @end itemize
5448
5449 The action of the @code{gnus-delay-article} command is influenced by a
5450 couple of variables:
5451
5452 @table @code
5453 @item gnus-delay-default-hour
5454 @vindex gnus-delay-default-hour
5455 When you specify a specific date, the message will be due on that hour
5456 on the given date.  Possible values are integers 0 through 23.
5457
5458 @item gnus-delay-default-delay
5459 @vindex gnus-delay-default-delay
5460 This is a string and gives the default delay.  It can be of any of the
5461 formats described above.
5462
5463 @item gnus-delay-group
5464 @vindex gnus-delay-group
5465 Delayed articles will be kept in this group on the drafts server until
5466 they are due.  You probably don't need to change this.  The default
5467 value is @code{"delayed"}.
5468
5469 @item gnus-delay-header
5470 @vindex gnus-delay-header
5471 The deadline for each article will be stored in a header.  This variable
5472 is a string and gives the header name.  You probably don't need to
5473 change this.  The default value is @code{"X-Gnus-Delayed"}.
5474 @end table
5475
5476 The way delaying works is like this: when you use the
5477 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5478 calculates the deadline of the message and stores it in the
5479 @code{X-Gnus-Delayed} header and puts the message in the
5480 @code{nndraft:delayed} group.
5481
5482 And whenever you get new news, Gnus looks through the group for articles
5483 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5484 function for this.  By default, this function is added to the hook
5485 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5486 Maybe you want to use the demon to send drafts?  Just tell the demon to
5487 execute the @code{gnus-delay-send-queue} function.
5488
5489 @table @code
5490 @item gnus-delay-initialize
5491 @findex gnus-delay-initialize
5492
5493 By default, this function installs @code{gnus-delay-send-queue} in
5494 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5495 argument @code{no-check}.  If it is non-nil,
5496 @code{gnus-get-new-news-hook} is not changed.  The optional first
5497 argument is ignored.
5498
5499 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5500 Presumably, you want to use the demon for sending due delayed articles.
5501 Just don't forget to set that up :-)
5502 @end table
5503
5504
5505 @node Marking Articles
5506 @section Marking Articles
5507 @cindex article marking
5508 @cindex article ticking
5509 @cindex marks
5510
5511 There are several marks you can set on an article.
5512
5513 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5514 neologism ohoy!) of the article.  Alphabetic marks generally mean
5515 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5516
5517 In addition, you also have marks that do not affect readedness.
5518
5519 @menu
5520 * Unread Articles::             Marks for unread articles.
5521 * Read Articles::               Marks for read articles.
5522 * Other Marks::                 Marks that do not affect readedness.
5523 @end menu
5524
5525 @ifinfo
5526 There's a plethora of commands for manipulating these marks:
5527 @end ifinfo
5528
5529 @menu
5530 * Setting Marks::             How to set and remove marks.
5531 * Generic Marking Commands::  How to customize the marking.
5532 * Setting Process Marks::     How to mark articles for later processing.
5533 @end menu
5534
5535
5536 @node Unread Articles
5537 @subsection Unread Articles
5538
5539 The following marks mark articles as (kinda) unread, in one form or
5540 other.
5541
5542 @table @samp
5543 @item !
5544 @vindex gnus-ticked-mark
5545 Marked as ticked (@code{gnus-ticked-mark}).
5546
5547 @dfn{Ticked articles} are articles that will remain visible always.  If
5548 you see an article that you find interesting, or you want to put off
5549 reading it, or replying to it, until sometime later, you'd typically
5550 tick it.  However, articles can be expired (from news servers by the
5551 news server software, Gnus itself never expires ticked messages), so if
5552 you want to keep an article forever, you'll have to make it persistent
5553 (@pxref{Persistent Articles}).
5554
5555 @item ?
5556 @vindex gnus-dormant-mark
5557 Marked as dormant (@code{gnus-dormant-mark}).
5558
5559 @dfn{Dormant articles} will only appear in the summary buffer if there
5560 are followups to it.  If you want to see them even if they don't have
5561 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5562 Otherwise (except for the visibility issue), they are just like ticked
5563 messages.
5564
5565 @item SPACE
5566 @vindex gnus-unread-mark
5567 Marked as unread (@code{gnus-unread-mark}).
5568
5569 @dfn{Unread articles} are articles that haven't been read at all yet.
5570 @end table
5571
5572
5573 @node Read Articles
5574 @subsection Read Articles
5575 @cindex expirable mark
5576
5577 All the following marks mark articles as read.
5578
5579 @table @samp
5580
5581 @item r
5582 @vindex gnus-del-mark
5583 These are articles that the user has marked as read with the @kbd{d}
5584 command manually, more or less (@code{gnus-del-mark}).
5585
5586 @item R
5587 @vindex gnus-read-mark
5588 Articles that have actually been read (@code{gnus-read-mark}).
5589
5590 @item O
5591 @vindex gnus-ancient-mark
5592 Articles that were marked as read in previous sessions and are now
5593 @dfn{old} (@code{gnus-ancient-mark}).
5594
5595 @item K
5596 @vindex gnus-killed-mark
5597 Marked as killed (@code{gnus-killed-mark}).
5598
5599 @item X
5600 @vindex gnus-kill-file-mark
5601 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5602
5603 @item Y
5604 @vindex gnus-low-score-mark
5605 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5606
5607 @item C
5608 @vindex gnus-catchup-mark
5609 Marked as read by a catchup (@code{gnus-catchup-mark}).
5610
5611 @item G
5612 @vindex gnus-canceled-mark
5613 Canceled article (@code{gnus-canceled-mark})
5614
5615 @item F
5616 @vindex gnus-souped-mark
5617 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5618
5619 @item Q
5620 @vindex gnus-sparse-mark
5621 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5622 Threading}.
5623
5624 @item M
5625 @vindex gnus-duplicate-mark
5626 Article marked as read by duplicate suppression
5627 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5628
5629 @end table
5630
5631 All these marks just mean that the article is marked as read, really.
5632 They are interpreted differently when doing adaptive scoring, though.
5633
5634 One more special mark, though:
5635
5636 @table @samp
5637 @item E
5638 @vindex gnus-expirable-mark
5639 Marked as expirable (@code{gnus-expirable-mark}).
5640
5641 Marking articles as @dfn{expirable} (or have them marked as such
5642 automatically) doesn't make much sense in normal groups---a user doesn't
5643 control expiring of news articles, but in mail groups, for instance,
5644 articles marked as @dfn{expirable} can be deleted by gnus at
5645 any time.
5646 @end table
5647
5648
5649 @node Other Marks
5650 @subsection Other Marks
5651 @cindex process mark
5652 @cindex bookmarks
5653
5654 There are some marks that have nothing to do with whether the article is
5655 read or not.
5656
5657 @itemize @bullet
5658
5659 @item
5660 You can set a bookmark in the current article.  Say you are reading a
5661 long thesis on cats' urinary tracts, and have to go home for dinner
5662 before you've finished reading the thesis.  You can then set a bookmark
5663 in the article, and gnus will jump to this bookmark the next time it
5664 encounters the article.  @xref{Setting Marks}.
5665
5666 @item
5667 @vindex gnus-replied-mark
5668 All articles that you have replied to or made a followup to (i.e., have
5669 answered) will be marked with an @samp{A} in the second column
5670 (@code{gnus-replied-mark}).
5671
5672 @item
5673 @vindex gnus-forwarded-mark
5674 All articles that you have forwarded will be marked with an @samp{F} in
5675 the second column (@code{gnus-forwarded-mark}).
5676
5677 @item
5678 @vindex gnus-cached-mark
5679 Articles stored in the article cache will be marked with an @samp{*} in
5680 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5681
5682 @item
5683 @vindex gnus-saved-mark
5684 Articles ``saved'' (in some manner or other; not necessarily
5685 religiously) are marked with an @samp{S} in the second column
5686 (@code{gnus-saved-mark}).
5687
5688 @item
5689 @vindex gnus-recent-mark
5690 Articles that according to the server haven't been shown to the user
5691 before are marked with a @samp{N} in the second column
5692 (@code{gnus-recent-mark}).  Note that not all servers support this
5693 mark, in which case it simply never appears. Compare with
5694 @code{gnus-unseen-mark}.
5695
5696 @item
5697 @vindex gnus-unseen-mark
5698 Articles that haven't been seen before in Gnus by the user are marked
5699 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5700 Compare with @code{gnus-recent-mark}.
5701
5702 @item
5703 @vindex gnus-undownloaded-mark
5704 When using the Gnus agent @pxref{Agent Basics}, some articles might not
5705 have been downloaded.  Such articles cannot be viewed while you are
5706 offline (unplugged).  These articles get the @samp{@@} mark in the
5707 first column.  (The variable @code{gnus-undownloaded-mark} controls
5708 which character to use.)
5709
5710 @item
5711 @vindex gnus-downloadable-mark
5712 The Gnus agent @pxref{Agent Basics} downloads some articles
5713 automatically, but it is also possible to explicitly mark articles for
5714 download, even if they would not be downloaded automatically.  Such
5715 explicitly-marked articles get the @samp{%} mark in the first column.
5716 (The variable @code{gnus-downloadable-mark} controls which character to
5717 use.)
5718
5719 @item
5720 @vindex gnus-not-empty-thread-mark
5721 @vindex gnus-empty-thread-mark
5722 If the @samp{%e} spec is used, the presence of threads or not will be
5723 marked with @code{gnus-not-empty-thread-mark} and
5724 @code{gnus-empty-thread-mark} in the third column, respectively.
5725
5726 @item
5727 @vindex gnus-process-mark
5728 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5729 variety of commands react to the presence of the process mark.  For
5730 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5731 all articles that have been marked with the process mark.  Articles
5732 marked with the process mark have a @samp{#} in the second column.
5733
5734 @end itemize
5735
5736 You might have noticed that most of these ``non-readedness'' marks
5737 appear in the second column by default.  So if you have a cached, saved,
5738 replied article that you have process-marked, what will that look like?
5739
5740 Nothing much.  The precedence rules go as follows: process -> cache ->
5741 replied -> saved.  So if the article is in the cache and is replied,
5742 you'll only see the cache mark and not the replied mark.
5743
5744
5745 @node Setting Marks
5746 @subsection Setting Marks
5747 @cindex setting marks
5748
5749 All the marking commands understand the numeric prefix.
5750
5751 @table @kbd
5752 @item M c
5753 @itemx M-u
5754 @kindex M c (Summary)
5755 @kindex M-u (Summary)
5756 @findex gnus-summary-clear-mark-forward
5757 @cindex mark as unread
5758 Clear all readedness-marks from the current article
5759 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5760 article as unread.
5761
5762 @item M t
5763 @itemx !
5764 @kindex ! (Summary)
5765 @kindex M t (Summary)
5766 @findex gnus-summary-tick-article-forward
5767 Tick the current article (@code{gnus-summary-tick-article-forward}).
5768 @xref{Article Caching}.
5769
5770 @item M ?
5771 @itemx ?
5772 @kindex ? (Summary)
5773 @kindex M ? (Summary)
5774 @findex gnus-summary-mark-as-dormant
5775 Mark the current article as dormant
5776 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5777
5778 @item M d
5779 @itemx d
5780 @kindex M d (Summary)
5781 @kindex d (Summary)
5782 @findex gnus-summary-mark-as-read-forward
5783 Mark the current article as read
5784 (@code{gnus-summary-mark-as-read-forward}).
5785
5786 @item D
5787 @kindex D (Summary)
5788 @findex gnus-summary-mark-as-read-backward
5789 Mark the current article as read and move point to the previous line
5790 (@code{gnus-summary-mark-as-read-backward}).
5791
5792 @item M k
5793 @itemx k
5794 @kindex k (Summary)
5795 @kindex M k (Summary)
5796 @findex gnus-summary-kill-same-subject-and-select
5797 Mark all articles that have the same subject as the current one as read,
5798 and then select the next unread article
5799 (@code{gnus-summary-kill-same-subject-and-select}).
5800
5801 @item M K
5802 @itemx C-k
5803 @kindex M K (Summary)
5804 @kindex C-k (Summary)
5805 @findex gnus-summary-kill-same-subject
5806 Mark all articles that have the same subject as the current one as read
5807 (@code{gnus-summary-kill-same-subject}).
5808
5809 @item M C
5810 @kindex M C (Summary)
5811 @findex gnus-summary-catchup
5812 @c @icon{gnus-summary-catchup}
5813 Mark all unread articles as read (@code{gnus-summary-catchup}).
5814
5815 @item M C-c
5816 @kindex M C-c (Summary)
5817 @findex gnus-summary-catchup-all
5818 Mark all articles in the group as read---even the ticked and dormant
5819 articles (@code{gnus-summary-catchup-all}).
5820
5821 @item M H
5822 @kindex M H (Summary)
5823 @findex gnus-summary-catchup-to-here
5824 Catchup the current group to point (before the point)
5825 (@code{gnus-summary-catchup-to-here}).
5826
5827 @item M h
5828 @kindex M h (Summary)
5829 @findex gnus-summary-catchup-from-here
5830 Catchup the current group from point (after the point)
5831 (@code{gnus-summary-catchup-from-here}).
5832
5833 @item C-w
5834 @kindex C-w (Summary)
5835 @findex gnus-summary-mark-region-as-read
5836 Mark all articles between point and mark as read
5837 (@code{gnus-summary-mark-region-as-read}).
5838
5839 @item M V k
5840 @kindex M V k (Summary)
5841 @findex gnus-summary-kill-below
5842 Kill all articles with scores below the default score (or below the
5843 numeric prefix) (@code{gnus-summary-kill-below}).
5844
5845 @item M e
5846 @itemx E
5847 @kindex M e (Summary)
5848 @kindex E (Summary)
5849 @findex gnus-summary-mark-as-expirable
5850 Mark the current article as expirable
5851 (@code{gnus-summary-mark-as-expirable}).
5852
5853 @item M b
5854 @kindex M b (Summary)
5855 @findex gnus-summary-set-bookmark
5856 Set a bookmark in the current article
5857 (@code{gnus-summary-set-bookmark}).
5858
5859 @item M B
5860 @kindex M B (Summary)
5861 @findex gnus-summary-remove-bookmark
5862 Remove the bookmark from the current article
5863 (@code{gnus-summary-remove-bookmark}).
5864
5865 @item M V c
5866 @kindex M V c (Summary)
5867 @findex gnus-summary-clear-above
5868 Clear all marks from articles with scores over the default score (or
5869 over the numeric prefix) (@code{gnus-summary-clear-above}).
5870
5871 @item M V u
5872 @kindex M V u (Summary)
5873 @findex gnus-summary-tick-above
5874 Tick all articles with scores over the default score (or over the
5875 numeric prefix) (@code{gnus-summary-tick-above}).
5876
5877 @item M V m
5878 @kindex M V m (Summary)
5879 @findex gnus-summary-mark-above
5880 Prompt for a mark, and mark all articles with scores over the default
5881 score (or over the numeric prefix) with this mark
5882 (@code{gnus-summary-clear-above}).
5883 @end table
5884
5885 @vindex gnus-summary-goto-unread
5886 The @code{gnus-summary-goto-unread} variable controls what action should
5887 be taken after setting a mark.  If non-@code{nil}, point will move to
5888 the next/previous unread article.  If @code{nil}, point will just move
5889 one line up or down.  As a special case, if this variable is
5890 @code{never}, all the marking commands as well as other commands (like
5891 @kbd{SPACE}) will move to the next article, whether it is unread or not.
5892 The default is @code{t}.
5893
5894
5895 @node Generic Marking Commands
5896 @subsection Generic Marking Commands
5897
5898 Some people would like the command that ticks an article (@kbd{!}) go to
5899 the next article.  Others would like it to go to the next unread
5900 article.  Yet others would like it to stay on the current article.  And
5901 even though I haven't heard of anybody wanting it to go to the
5902 previous (unread) article, I'm sure there are people that want that as
5903 well.
5904
5905 Multiply these five behaviors with five different marking commands, and
5906 you get a potentially complex set of variable to control what each
5907 command should do.
5908
5909 To sidestep that mess, Gnus provides commands that do all these
5910 different things.  They can be found on the @kbd{M M} map in the summary
5911 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
5912 to list in this manual.
5913
5914 While you can use these commands directly, most users would prefer
5915 altering the summary mode keymap.  For instance, if you would like the
5916 @kbd{!} command to go to the next article instead of the next unread
5917 article, you could say something like:
5918
5919 @lisp
5920 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
5921 (defun my-alter-summary-map ()
5922   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
5923 @end lisp
5924
5925 or
5926
5927 @lisp
5928 (defun my-alter-summary-map ()
5929   (local-set-key "!" "MM!n"))
5930 @end lisp
5931
5932
5933 @node Setting Process Marks
5934 @subsection Setting Process Marks
5935 @cindex setting process marks
5936
5937 Process marks are displayed as @code{#} in the summary buffer, and are
5938 used for marking articles in such a way that other commands will
5939 process these articles.  For instance, if you process mark four
5940 articles and then use the @kbd{*} command, Gnus will enter these four
5941 commands into the cache.  For more information,
5942 @pxref{Process/Prefix}.
5943
5944 @table @kbd
5945
5946 @item M P p
5947 @itemx #
5948 @kindex # (Summary)
5949 @kindex M P p (Summary)
5950 @findex gnus-summary-mark-as-processable
5951 Mark the current article with the process mark
5952 (@code{gnus-summary-mark-as-processable}).
5953 @findex gnus-summary-unmark-as-processable
5954
5955 @item M P u
5956 @itemx M-#
5957 @kindex M P u (Summary)
5958 @kindex M-# (Summary)
5959 Remove the process mark, if any, from the current article
5960 (@code{gnus-summary-unmark-as-processable}).
5961
5962 @item M P U
5963 @kindex M P U (Summary)
5964 @findex gnus-summary-unmark-all-processable
5965 Remove the process mark from all articles
5966 (@code{gnus-summary-unmark-all-processable}).
5967
5968 @item M P i
5969 @kindex M P i (Summary)
5970 @findex gnus-uu-invert-processable
5971 Invert the list of process marked articles
5972 (@code{gnus-uu-invert-processable}).
5973
5974 @item M P R
5975 @kindex M P R (Summary)
5976 @findex gnus-uu-mark-by-regexp
5977 Mark articles that have a @code{Subject} header that matches a regular
5978 expression (@code{gnus-uu-mark-by-regexp}).
5979
5980 @item M P G
5981 @kindex M P G (Summary)
5982 @findex gnus-uu-unmark-by-regexp
5983 Unmark articles that have a @code{Subject} header that matches a regular
5984 expression (@code{gnus-uu-unmark-by-regexp}).
5985
5986 @item M P r
5987 @kindex M P r (Summary)
5988 @findex gnus-uu-mark-region
5989 Mark articles in region (@code{gnus-uu-mark-region}).
5990
5991 @item M P g
5992 @kindex M P g
5993 @findex gnus-uu-unmark-region
5994 Unmark articles in region (@code{gnus-uu-unmark-region}).
5995
5996 @item M P t
5997 @kindex M P t (Summary)
5998 @findex gnus-uu-mark-thread
5999 Mark all articles in the current (sub)thread
6000 (@code{gnus-uu-mark-thread}).
6001
6002 @item M P T
6003 @kindex M P T (Summary)
6004 @findex gnus-uu-unmark-thread
6005 Unmark all articles in the current (sub)thread
6006 (@code{gnus-uu-unmark-thread}).
6007
6008 @item M P v
6009 @kindex M P v (Summary)
6010 @findex gnus-uu-mark-over
6011 Mark all articles that have a score above the prefix argument
6012 (@code{gnus-uu-mark-over}).
6013
6014 @item M P s
6015 @kindex M P s (Summary)
6016 @findex gnus-uu-mark-series
6017 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6018
6019 @item M P S
6020 @kindex M P S (Summary)
6021 @findex gnus-uu-mark-sparse
6022 Mark all series that have already had some articles marked
6023 (@code{gnus-uu-mark-sparse}).
6024
6025 @item M P a
6026 @kindex M P a (Summary)
6027 @findex gnus-uu-mark-all
6028 Mark all articles in series order (@code{gnus-uu-mark-series}).
6029
6030 @item M P b
6031 @kindex M P b (Summary)
6032 @findex gnus-uu-mark-buffer
6033 Mark all articles in the buffer in the order they appear
6034 (@code{gnus-uu-mark-buffer}).
6035
6036 @item M P k
6037 @kindex M P k (Summary)
6038 @findex gnus-summary-kill-process-mark
6039 Push the current process mark set onto the stack and unmark all articles
6040 (@code{gnus-summary-kill-process-mark}).
6041
6042 @item M P y
6043 @kindex M P y (Summary)
6044 @findex gnus-summary-yank-process-mark
6045 Pop the previous process mark set from the stack and restore it
6046 (@code{gnus-summary-yank-process-mark}).
6047
6048 @item M P w
6049 @kindex M P w (Summary)
6050 @findex gnus-summary-save-process-mark
6051 Push the current process mark set onto the stack
6052 (@code{gnus-summary-save-process-mark}).
6053
6054 @end table
6055
6056 Also see the @kbd{&} command in @pxref{Searching for Articles} for how to
6057 set process marks based on article body contents.
6058
6059
6060 @node Limiting
6061 @section Limiting
6062 @cindex limiting
6063
6064 It can be convenient to limit the summary buffer to just show some
6065 subset of the articles currently in the group.  The effect most limit
6066 commands have is to remove a few (or many) articles from the summary
6067 buffer.
6068
6069 All limiting commands work on subsets of the articles already fetched
6070 from the servers.  None of these commands query the server for
6071 additional articles.
6072
6073 @table @kbd
6074
6075 @item / /
6076 @itemx / s
6077 @kindex / / (Summary)
6078 @findex gnus-summary-limit-to-subject
6079 Limit the summary buffer to articles that match some subject
6080 (@code{gnus-summary-limit-to-subject}). If given a prefix, exclude
6081 matching articles.
6082
6083 @item / a
6084 @kindex / a (Summary)
6085 @findex gnus-summary-limit-to-author
6086 Limit the summary buffer to articles that match some author
6087 (@code{gnus-summary-limit-to-author}). If given a prefix, exclude
6088 matching articles.
6089
6090 @item / x
6091 @kindex / x (Summary)
6092 @findex gnus-summary-limit-to-extra
6093 Limit the summary buffer to articles that match one of the ``extra''
6094 headers (@pxref{To From Newsgroups})
6095 (@code{gnus-summary-limit-to-extra}). If given a prefix, exclude
6096 matching articles.
6097
6098 @item / u
6099 @itemx x
6100 @kindex / u (Summary)
6101 @kindex x (Summary)
6102 @findex gnus-summary-limit-to-unread
6103 Limit the summary buffer to articles not marked as read
6104 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6105 buffer to articles strictly unread.  This means that ticked and
6106 dormant articles will also be excluded.
6107
6108 @item / m
6109 @kindex / m (Summary)
6110 @findex gnus-summary-limit-to-marks
6111 Ask for a mark and then limit to all articles that have been marked
6112 with that mark (@code{gnus-summary-limit-to-marks}).
6113
6114 @item / t
6115 @kindex / t (Summary)
6116 @findex gnus-summary-limit-to-age
6117 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6118 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6119 articles younger than that number of days.
6120
6121 @item / n
6122 @kindex / n (Summary)
6123 @findex gnus-summary-limit-to-articles
6124 Limit the summary buffer to the current article
6125 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6126 convention (@pxref{Process/Prefix}).
6127
6128 @item / w
6129 @kindex / w (Summary)
6130 @findex gnus-summary-pop-limit
6131 Pop the previous limit off the stack and restore it
6132 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6133 the stack.
6134
6135 @item / .
6136 @kindex / . (Summary)
6137 @findex gnus-summary-limit-to-unseen
6138 Limit the summary buffer to the unseen articles
6139 (@code{gnus-summary-limit-to-unseen}).
6140
6141 @item / v
6142 @kindex / v (Summary)
6143 @findex gnus-summary-limit-to-score
6144 Limit the summary buffer to articles that have a score at or above some
6145 score (@code{gnus-summary-limit-to-score}).
6146
6147 @item / p
6148 @kindex / p (Summary)
6149 @findex gnus-summary-limit-to-display-predicate
6150 Limit the summary buffer to articles that satisfy the @code{display}
6151 group parameter predicate
6152 (@code{gnus-summary-limit-to-display-predicate}).  See @pxref{Group
6153 Parameters} for more on this predicate.
6154
6155 @item / E
6156 @itemx M S
6157 @kindex M S (Summary)
6158 @kindex / E (Summary)
6159 @findex gnus-summary-limit-include-expunged
6160 Include all expunged articles in the limit
6161 (@code{gnus-summary-limit-include-expunged}).
6162
6163 @item / D
6164 @kindex / D (Summary)
6165 @findex gnus-summary-limit-include-dormant
6166 Include all dormant articles in the limit
6167 (@code{gnus-summary-limit-include-dormant}).
6168
6169 @item / *
6170 @kindex / * (Summary)
6171 @findex gnus-summary-limit-include-cached
6172 Include all cached articles in the limit
6173 (@code{gnus-summary-limit-include-cached}).
6174
6175 @item / d
6176 @kindex / d (Summary)
6177 @findex gnus-summary-limit-exclude-dormant
6178 Exclude all dormant articles from the limit
6179 (@code{gnus-summary-limit-exclude-dormant}).
6180
6181 @item / M
6182 @kindex / M (Summary)
6183 @findex gnus-summary-limit-exclude-marks
6184 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6185
6186 @item / T
6187 @kindex / T (Summary)
6188 @findex gnus-summary-limit-include-thread
6189 Include all the articles in the current thread in the limit.
6190
6191 @item / c
6192 @kindex / c (Summary)
6193 @findex gnus-summary-limit-exclude-childless-dormant
6194 Exclude all dormant articles that have no children from the limit
6195 (@code{gnus-summary-limit-exclude-childless-dormant}).
6196
6197 @item / C
6198 @kindex / C (Summary)
6199 @findex gnus-summary-limit-mark-excluded-as-read
6200 Mark all excluded unread articles as read
6201 (@code{gnus-summary-limit-mark-excluded-as-read}).   If given a prefix,
6202 also mark excluded ticked and dormant articles as read.
6203
6204 @item / N
6205 @kindex / N (Summary)
6206 @findex gnus-summary-insert-new-articles
6207 Insert all new articles in the summary buffer. It scans for new emails
6208 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6209
6210 @item / o
6211 @kindex / o (Summary)
6212 @findex gnus-summary-insert-old-articles
6213 Insert all old articles in the summary buffer. If given a numbered
6214 prefix, fetch this number of articles.
6215
6216 @end table
6217
6218
6219 @node Threading
6220 @section Threading
6221 @cindex threading
6222 @cindex article threading
6223
6224 Gnus threads articles by default.  @dfn{To thread} is to put responses
6225 to articles directly after the articles they respond to---in a
6226 hierarchical fashion.
6227
6228 Threading is done by looking at the @code{References} headers of the
6229 articles.  In a perfect world, this would be enough to build pretty
6230 trees, but unfortunately, the @code{References} header is often broken
6231 or simply missing.  Weird news propagation exacerbates the problem,
6232 so one has to employ other heuristics to get pleasing results.  A
6233 plethora of approaches exists, as detailed in horrible detail in
6234 @pxref{Customizing Threading}.
6235
6236 First, a quick overview of the concepts:
6237
6238 @table @dfn
6239 @item root
6240 The top-most article in a thread; the first article in the thread.
6241
6242 @item thread
6243 A tree-like article structure.
6244
6245 @item sub-thread
6246 A small(er) section of this tree-like structure.
6247
6248 @item loose threads
6249 Threads often lose their roots due to article expiry, or due to the root
6250 already having been read in a previous session, and not displayed in the
6251 summary buffer.  We then typically have many sub-threads that really
6252 belong to one thread, but are without connecting roots.  These are
6253 called loose threads.
6254
6255 @item thread gathering
6256 An attempt to gather loose threads into bigger threads.
6257
6258 @item sparse threads
6259 A thread where the missing articles have been ``guessed'' at, and are
6260 displayed as empty lines in the summary buffer.
6261
6262 @end table
6263
6264
6265 @menu
6266 * Customizing Threading::       Variables you can change to affect the threading.
6267 * Thread Commands::             Thread based commands in the summary buffer.
6268 @end menu
6269
6270
6271 @node Customizing Threading
6272 @subsection Customizing Threading
6273 @cindex customizing threading
6274
6275 @menu
6276 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6277 * Filling In Threads::          Making the threads displayed look fuller.
6278 * More Threading::              Even more variables for fiddling with threads.
6279 * Low-Level Threading::         You thought it was over... but you were wrong!
6280 @end menu
6281
6282
6283 @node Loose Threads
6284 @subsubsection Loose Threads
6285 @cindex <
6286 @cindex >
6287 @cindex loose threads
6288
6289 @table @code
6290 @item gnus-summary-make-false-root
6291 @vindex gnus-summary-make-false-root
6292 If non-@code{nil}, gnus will gather all loose subtrees into one big tree
6293 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6294 Yup.)  Loose subtrees occur when the real root has expired, or you've
6295 read or killed the root in a previous session.
6296
6297 When there is no real root of a thread, gnus will have to fudge
6298 something.  This variable says what fudging method gnus should use.
6299 There are four possible values:
6300
6301 @iftex
6302 @iflatex
6303 \gnusfigure{The Summary Buffer}{390}{
6304 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6305 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6306 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6307 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6308 }
6309 @end iflatex
6310 @end iftex
6311
6312 @cindex adopting articles
6313
6314 @table @code
6315
6316 @item adopt
6317 Gnus will make the first of the orphaned articles the parent.  This
6318 parent will adopt all the other articles.  The adopted articles will be
6319 marked as such by pointy brackets (@samp{<>}) instead of the standard
6320 square brackets (@samp{[]}).  This is the default method.
6321
6322 @item dummy
6323 @vindex gnus-summary-dummy-line-format
6324 @vindex gnus-summary-make-false-root-always
6325 Gnus will create a dummy summary line that will pretend to be the
6326 parent.  This dummy line does not correspond to any real article, so
6327 selecting it will just select the first real article after the dummy
6328 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6329 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6330 which is the subject of the article.  @xref{Formatting Variables}.
6331 If you want all threads to have a dummy root, even the non-gathered
6332 ones, set @code{gnus-summary-make-false-root-always} to t.
6333
6334 @item empty
6335 Gnus won't actually make any article the parent, but simply leave the
6336 subject field of all orphans except the first empty.  (Actually, it will
6337 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6338 Buffer Format}).)
6339
6340 @item none
6341 Don't make any article parent at all.  Just gather the threads and
6342 display them after one another.
6343
6344 @item nil
6345 Don't gather loose threads.
6346 @end table
6347
6348 @item gnus-summary-gather-subject-limit
6349 @vindex gnus-summary-gather-subject-limit
6350 Loose threads are gathered by comparing subjects of articles.  If this
6351 variable is @code{nil}, gnus requires an exact match between the
6352 subjects of the loose threads before gathering them into one big
6353 super-thread.  This might be too strict a requirement, what with the
6354 presence of stupid newsreaders that chop off long subject lines.  If
6355 you think so, set this variable to, say, 20 to require that only the
6356 first 20 characters of the subjects have to match.  If you set this
6357 variable to a really low number, you'll find that gnus will gather
6358 everything in sight into one thread, which isn't very helpful.
6359
6360 @cindex fuzzy article gathering
6361 If you set this variable to the special value @code{fuzzy}, gnus will
6362 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6363 Matching}).
6364
6365 @item gnus-simplify-subject-fuzzy-regexp
6366 @vindex gnus-simplify-subject-fuzzy-regexp
6367 This can either be a regular expression or list of regular expressions
6368 that match strings that will be removed from subjects if fuzzy subject
6369 simplification is used.
6370
6371 @item gnus-simplify-ignored-prefixes
6372 @vindex gnus-simplify-ignored-prefixes
6373 If you set @code{gnus-summary-gather-subject-limit} to something as low
6374 as 10, you might consider setting this variable to something sensible:
6375
6376 @c Written by Michael Ernst <mernst@cs.rice.edu>
6377 @lisp
6378 (setq gnus-simplify-ignored-prefixes
6379       (concat
6380        "\\`\\[?\\("
6381        (mapconcat
6382         'identity
6383         '("looking"
6384           "wanted" "followup" "summary\\( of\\)?"
6385           "help" "query" "problem" "question"
6386           "answer" "reference" "announce"
6387           "How can I" "How to" "Comparison of"
6388           ;; ...
6389           )
6390         "\\|")
6391        "\\)\\s *\\("
6392        (mapconcat 'identity
6393                   '("for" "for reference" "with" "about")
6394                   "\\|")
6395        "\\)?\\]?:?[ \t]*"))
6396 @end lisp
6397
6398 All words that match this regexp will be removed before comparing two
6399 subjects.
6400
6401 @item gnus-simplify-subject-functions
6402 @vindex gnus-simplify-subject-functions
6403 If non-@code{nil}, this variable overrides
6404 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6405 list of functions to apply to the @code{Subject} string iteratively to
6406 arrive at the simplified version of the string.
6407
6408 Useful functions to put in this list include:
6409
6410 @table @code
6411 @item gnus-simplify-subject-re
6412 @findex gnus-simplify-subject-re
6413 Strip the leading @samp{Re:}.
6414
6415 @item gnus-simplify-subject-fuzzy
6416 @findex gnus-simplify-subject-fuzzy
6417 Simplify fuzzily.
6418
6419 @item gnus-simplify-whitespace
6420 @findex gnus-simplify-whitespace
6421 Remove excessive whitespace.
6422
6423 @item gnus-simplify-all-whitespace
6424 @findex gnus-simplify-all-whitespace
6425 Remove all whitespace.
6426 @end table
6427
6428 You may also write your own functions, of course.
6429
6430
6431 @item gnus-summary-gather-exclude-subject
6432 @vindex gnus-summary-gather-exclude-subject
6433 Since loose thread gathering is done on subjects only, that might lead
6434 to many false hits, especially with certain common subjects like
6435 @samp{} and @samp{(none)}.  To make the situation slightly better,
6436 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6437 what subjects should be excluded from the gathering process.@*
6438 The default is @samp{^ *$\\|^(none)$}.
6439
6440 @item gnus-summary-thread-gathering-function
6441 @vindex gnus-summary-thread-gathering-function
6442 Gnus gathers threads by looking at @code{Subject} headers.  This means
6443 that totally unrelated articles may end up in the same ``thread'', which
6444 is confusing.  An alternate approach is to look at all the
6445 @code{Message-ID}s in all the @code{References} headers to find matches.
6446 This will ensure that no gathered threads ever include unrelated
6447 articles, but it also means that people who have posted with broken
6448 newsreaders won't be gathered properly.  The choice is yours---plague or
6449 cholera:
6450
6451 @table @code
6452 @item gnus-gather-threads-by-subject
6453 @findex gnus-gather-threads-by-subject
6454 This function is the default gathering function and looks at
6455 @code{Subject}s exclusively.
6456
6457 @item gnus-gather-threads-by-references
6458 @findex gnus-gather-threads-by-references
6459 This function looks at @code{References} headers exclusively.
6460 @end table
6461
6462 If you want to test gathering by @code{References}, you could say
6463 something like:
6464
6465 @lisp
6466 (setq gnus-summary-thread-gathering-function
6467       'gnus-gather-threads-by-references)
6468 @end lisp
6469
6470 @end table
6471
6472
6473 @node Filling In Threads
6474 @subsubsection Filling In Threads
6475
6476 @table @code
6477 @item gnus-fetch-old-headers
6478 @vindex gnus-fetch-old-headers
6479 If non-@code{nil}, gnus will attempt to build old threads by fetching
6480 more old headers---headers to articles marked as read.  If you
6481 would like to display as few summary lines as possible, but still
6482 connect as many loose threads as possible, you should set this variable
6483 to @code{some} or a number.  If you set it to a number, no more than
6484 that number of extra old headers will be fetched.  In either case,
6485 fetching old headers only works if the back end you are using carries
6486 overview files---this would normally be @code{nntp}, @code{nnspool},
6487 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6488 the thread has been expired by the server, there's not much Gnus can do
6489 about that.
6490
6491 This variable can also be set to @code{invisible}.  This won't have any
6492 visible effects, but is useful if you use the @kbd{A T} command a lot
6493 (@pxref{Finding the Parent}).
6494
6495 @item gnus-build-sparse-threads
6496 @vindex gnus-build-sparse-threads
6497 Fetching old headers can be slow.  A low-rent similar effect can be
6498 gotten by setting this variable to @code{some}.  Gnus will then look at
6499 the complete @code{References} headers of all articles and try to string
6500 together articles that belong in the same thread.  This will leave
6501 @dfn{gaps} in the threading display where gnus guesses that an article
6502 is missing from the thread.  (These gaps appear like normal summary
6503 lines.  If you select a gap, gnus will try to fetch the article in
6504 question.)  If this variable is @code{t}, gnus will display all these
6505 ``gaps'' without regard for whether they are useful for completing the
6506 thread or not.  Finally, if this variable is @code{more}, gnus won't cut
6507 off sparse leaf nodes that don't lead anywhere.  This variable is
6508 @code{nil} by default.
6509
6510 @item gnus-read-all-available-headers
6511 @vindex gnus-read-all-available-headers
6512 This is a rather obscure variable that few will find useful.  It's
6513 intended for those non-news newsgroups where the back end has to fetch
6514 quite a lot to present the summary buffer, and where it's impossible to
6515 go back to parents of articles.  This is mostly the case in the
6516 web-based groups, like the @code{nnultimate} groups.
6517
6518 If you don't use those, then it's safe to leave this as the default
6519 @code{nil}.  If you want to use this variable, it should be a regexp
6520 that matches the group name, or @code{t} for all groups.
6521
6522 @end table
6523
6524
6525 @node More Threading
6526 @subsubsection More Threading
6527
6528 @table @code
6529 @item gnus-show-threads
6530 @vindex gnus-show-threads
6531 If this variable is @code{nil}, no threading will be done, and all of
6532 the rest of the variables here will have no effect.  Turning threading
6533 off will speed group selection up a bit, but it is sure to make reading
6534 slower and more awkward.
6535
6536 @item gnus-thread-hide-subtree
6537 @vindex gnus-thread-hide-subtree
6538 If non-@code{nil}, all threads will be hidden when the summary buffer is
6539 generated.
6540
6541 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6542 Available predicates are @code{gnus-article-unread-p} and
6543 @code{gnus-article-unseen-p}).
6544
6545 Here's an example:
6546
6547 @lisp
6548 (setq gnus-thread-hide-subtree
6549       '(or gnus-article-unread-p
6550            gnus-article-unseen-p))
6551 @end lisp
6552
6553 (It's a pretty nonsensical example, since all unseen articles are also
6554 unread, but you get my drift.)
6555
6556
6557 @item gnus-thread-expunge-below
6558 @vindex gnus-thread-expunge-below
6559 All threads that have a total score (as defined by
6560 @code{gnus-thread-score-function}) less than this number will be
6561 expunged.  This variable is @code{nil} by default, which means that no
6562 threads are expunged.
6563
6564 @item gnus-thread-hide-killed
6565 @vindex gnus-thread-hide-killed
6566 if you kill a thread and this variable is non-@code{nil}, the subtree
6567 will be hidden.
6568
6569 @item gnus-thread-ignore-subject
6570 @vindex gnus-thread-ignore-subject
6571 Sometimes somebody changes the subject in the middle of a thread.  If
6572 this variable is non-@code{nil}, which is the default, the subject
6573 change is ignored.  If it is @code{nil}, a change in the subject will
6574 result in a new thread.
6575
6576 @item gnus-thread-indent-level
6577 @vindex gnus-thread-indent-level
6578 This is a number that says how much each sub-thread should be indented.
6579 The default is 4.
6580
6581 @item gnus-sort-gathered-threads-function
6582 @vindex gnus-sort-gathered-threads-function
6583 Sometimes, particularly with mailing lists, the order in which mails
6584 arrive locally is not necessarily the same as the order in which they
6585 arrived on the mailing list.  Consequently, when sorting sub-threads
6586 using the default @code{gnus-thread-sort-by-number}, responses can end
6587 up appearing before the article to which they are responding to.
6588 Setting this variable to an alternate value
6589 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6590 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6591 more logical sub-thread ordering in such instances.
6592
6593 @end table
6594
6595
6596 @node Low-Level Threading
6597 @subsubsection Low-Level Threading
6598
6599 @table @code
6600
6601 @item gnus-parse-headers-hook
6602 @vindex gnus-parse-headers-hook
6603 Hook run before parsing any headers.  The default value is
6604 @code{(gnus-set-summary-default-charset)}, which sets up local value of
6605 @code{default-mime-charset} in summary buffer based on variable
6606 @code{gnus-newsgroup-default-charset-alist}.
6607
6608 @item gnus-alter-header-function
6609 @vindex gnus-alter-header-function
6610 If non-@code{nil}, this function will be called to allow alteration of
6611 article header structures.  The function is called with one parameter,
6612 the article header vector, which it may alter in any way.  For instance,
6613 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6614 in systematic ways (by adding prefixes and such), you can use this
6615 variable to un-scramble the @code{Message-ID}s so that they are more
6616 meaningful.  Here's one example:
6617
6618 @lisp
6619 (setq gnus-alter-header-function 'my-alter-message-id)
6620
6621 (defun my-alter-message-id (header)
6622   (let ((id (mail-header-id header)))
6623     (when (string-match
6624            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6625       (mail-header-set-id
6626        (concat (match-string 1 id) "@@" (match-string 2 id))
6627        header))))
6628 @end lisp
6629
6630 @end table
6631
6632
6633 @node Thread Commands
6634 @subsection Thread Commands
6635 @cindex thread commands
6636
6637 @table @kbd
6638
6639 @item T k
6640 @itemx C-M-k
6641 @kindex T k (Summary)
6642 @kindex C-M-k (Summary)
6643 @findex gnus-summary-kill-thread
6644 Mark all articles in the current (sub-)thread as read
6645 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6646 remove all marks instead.  If the prefix argument is negative, tick
6647 articles instead.
6648
6649 @item T l
6650 @itemx C-M-l
6651 @kindex T l (Summary)
6652 @kindex C-M-l (Summary)
6653 @findex gnus-summary-lower-thread
6654 Lower the score of the current (sub-)thread
6655 (@code{gnus-summary-lower-thread}).
6656
6657 @item T i
6658 @kindex T i (Summary)
6659 @findex gnus-summary-raise-thread
6660 Increase the score of the current (sub-)thread
6661 (@code{gnus-summary-raise-thread}).
6662
6663 @item T #
6664 @kindex T # (Summary)
6665 @findex gnus-uu-mark-thread
6666 Set the process mark on the current (sub-)thread
6667 (@code{gnus-uu-mark-thread}).
6668
6669 @item T M-#
6670 @kindex T M-# (Summary)
6671 @findex gnus-uu-unmark-thread
6672 Remove the process mark from the current (sub-)thread
6673 (@code{gnus-uu-unmark-thread}).
6674
6675 @item T T
6676 @kindex T T (Summary)
6677 @findex gnus-summary-toggle-threads
6678 Toggle threading (@code{gnus-summary-toggle-threads}).
6679
6680 @item T s
6681 @kindex T s (Summary)
6682 @findex gnus-summary-show-thread
6683 Expose the (sub-)thread hidden under the current article, if any
6684 (@code{gnus-summary-show-thread}).
6685
6686 @item T h
6687 @kindex T h (Summary)
6688 @findex gnus-summary-hide-thread
6689 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6690
6691 @item T S
6692 @kindex T S (Summary)
6693 @findex gnus-summary-show-all-threads
6694 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6695
6696 @item T H
6697 @kindex T H (Summary)
6698 @findex gnus-summary-hide-all-threads
6699 Hide all threads (@code{gnus-summary-hide-all-threads}).
6700
6701 @item T t
6702 @kindex T t (Summary)
6703 @findex gnus-summary-rethread-current
6704 Re-thread the current article's thread
6705 (@code{gnus-summary-rethread-current}).  This works even when the
6706 summary buffer is otherwise unthreaded.
6707
6708 @item T ^
6709 @kindex T ^ (Summary)
6710 @findex gnus-summary-reparent-thread
6711 Make the current article the child of the marked (or previous) article
6712 (@code{gnus-summary-reparent-thread}).
6713
6714 @end table
6715
6716 The following commands are thread movement commands.  They all
6717 understand the numeric prefix.
6718
6719 @table @kbd
6720
6721 @item T n
6722 @kindex T n (Summary)
6723 @itemx C-M-f
6724 @kindex C-M-n (Summary)
6725 @itemx M-down
6726 @kindex M-down (Summary)
6727 @findex gnus-summary-next-thread
6728 Go to the next thread (@code{gnus-summary-next-thread}).
6729
6730 @item T p
6731 @kindex T p (Summary)
6732 @itemx C-M-b
6733 @kindex C-M-p (Summary)
6734 @itemx M-up
6735 @kindex M-up (Summary)
6736 @findex gnus-summary-prev-thread
6737 Go to the previous thread (@code{gnus-summary-prev-thread}).
6738
6739 @item T d
6740 @kindex T d (Summary)
6741 @findex gnus-summary-down-thread
6742 Descend the thread (@code{gnus-summary-down-thread}).
6743
6744 @item T u
6745 @kindex T u (Summary)
6746 @findex gnus-summary-up-thread
6747 Ascend the thread (@code{gnus-summary-up-thread}).
6748
6749 @item T o
6750 @kindex T o (Summary)
6751 @findex gnus-summary-top-thread
6752 Go to the top of the thread (@code{gnus-summary-top-thread}).
6753 @end table
6754
6755 @vindex gnus-thread-operation-ignore-subject
6756 If you ignore subject while threading, you'll naturally end up with
6757 threads that have several different subjects in them.  If you then issue
6758 a command like `T k' (@code{gnus-summary-kill-thread}) you might not
6759 wish to kill the entire thread, but just those parts of the thread that
6760 have the same subject as the current article.  If you like this idea,
6761 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6762 is non-@code{nil} (which it is by default), subjects will be ignored
6763 when doing thread commands.  If this variable is @code{nil}, articles in
6764 the same thread with different subjects will not be included in the
6765 operation in question.  If this variable is @code{fuzzy}, only articles
6766 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6767 Matching}).
6768
6769
6770 @node Sorting the Summary Buffer
6771 @section Sorting the Summary Buffer
6772
6773 @findex gnus-thread-sort-by-total-score
6774 @findex gnus-thread-sort-by-date
6775 @findex gnus-thread-sort-by-score
6776 @findex gnus-thread-sort-by-subject
6777 @findex gnus-thread-sort-by-author
6778 @findex gnus-thread-sort-by-number
6779 @findex gnus-thread-sort-by-random
6780 @vindex gnus-thread-sort-functions
6781 @findex gnus-thread-sort-by-most-recent-thread
6782 If you are using a threaded summary display, you can sort the threads by
6783 setting @code{gnus-thread-sort-functions}, which can be either a single
6784 function, a list of functions, or a list containing functions and
6785 @code{(not some-function)} elements.
6786
6787 By default, sorting is done on article numbers.  Ready-made sorting
6788 predicate functions include @code{gnus-thread-sort-by-number},
6789 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6790 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6791 @code{gnus-thread-sort-by-most-recent-number},
6792 @code{gnus-thread-sort-by-most-recent-date},
6793 @code{gnus-thread-sort-by-random} and
6794 @code{gnus-thread-sort-by-total-score}.
6795
6796 Each function takes two threads and returns non-@code{nil} if the first
6797 thread should be sorted before the other.  Note that sorting really is
6798 normally done by looking only at the roots of each thread.
6799
6800 If you use more than one function, the primary sort key should be the
6801 last function in the list.  You should probably always include
6802 @code{gnus-thread-sort-by-number} in the list of sorting
6803 functions---preferably first.  This will ensure that threads that are
6804 equal with respect to the other sort criteria will be displayed in
6805 ascending article order.
6806
6807 If you would like to sort by reverse score, then by subject, and finally
6808 by number, you could do something like:
6809
6810 @lisp
6811 (setq gnus-thread-sort-functions
6812       '(gnus-thread-sort-by-number
6813         gnus-thread-sort-by-subject
6814         (not gnus-thread-sort-by-total-score)))
6815 @end lisp
6816
6817 The threads that have highest score will be displayed first in the
6818 summary buffer.  When threads have the same score, they will be sorted
6819 alphabetically.  The threads that have the same score and the same
6820 subject will be sorted by number, which is (normally) the sequence in
6821 which the articles arrived.
6822
6823 If you want to sort by score and then reverse arrival order, you could
6824 say something like:
6825
6826 @lisp
6827 (setq gnus-thread-sort-functions
6828       '((lambda (t1 t2)
6829           (not (gnus-thread-sort-by-number t1 t2)))
6830         gnus-thread-sort-by-score))
6831 @end lisp
6832
6833 @vindex gnus-thread-score-function
6834 The function in the @code{gnus-thread-score-function} variable (default
6835 @code{+}) is used for calculating the total score of a thread.  Useful
6836 functions might be @code{max}, @code{min}, or squared means, or whatever
6837 tickles your fancy.
6838
6839 @findex gnus-article-sort-functions
6840 @findex gnus-article-sort-by-date
6841 @findex gnus-article-sort-by-score
6842 @findex gnus-article-sort-by-subject
6843 @findex gnus-article-sort-by-author
6844 @findex gnus-article-sort-by-random
6845 @findex gnus-article-sort-by-number
6846 If you are using an unthreaded display for some strange reason or
6847 other, you have to fiddle with the @code{gnus-article-sort-functions}
6848 variable.  It is very similar to the
6849 @code{gnus-thread-sort-functions}, except that it uses slightly
6850 different functions for article comparison.  Available sorting
6851 predicate functions are @code{gnus-article-sort-by-number},
6852 @code{gnus-article-sort-by-author},
6853 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
6854 @code{gnus-article-sort-by-random}, and
6855 @code{gnus-article-sort-by-score}.
6856
6857 If you want to sort an unthreaded summary display by subject, you could
6858 say something like:
6859
6860 @lisp
6861 (setq gnus-article-sort-functions
6862       '(gnus-article-sort-by-number
6863         gnus-article-sort-by-subject))
6864 @end lisp
6865
6866
6867
6868 @node Asynchronous Fetching
6869 @section Asynchronous Article Fetching
6870 @cindex asynchronous article fetching
6871 @cindex article pre-fetch
6872 @cindex pre-fetch
6873
6874 If you read your news from an @sc{nntp} server that's far away, the
6875 network latencies may make reading articles a chore.  You have to wait
6876 for a while after pressing @kbd{n} to go to the next article before the
6877 article appears.  Why can't gnus just go ahead and fetch the article
6878 while you are reading the previous one?  Why not, indeed.
6879
6880 First, some caveats.  There are some pitfalls to using asynchronous
6881 article fetching, especially the way gnus does it.
6882
6883 Let's say you are reading article 1, which is short, and article 2 is
6884 quite long, and you are not interested in reading that.  Gnus does not
6885 know this, so it goes ahead and fetches article 2.  You decide to read
6886 article 3, but since gnus is in the process of fetching article 2, the
6887 connection is blocked.
6888
6889 To avoid these situations, gnus will open two (count 'em two)
6890 connections to the server.  Some people may think this isn't a very nice
6891 thing to do, but I don't see any real alternatives.  Setting up that
6892 extra connection takes some time, so gnus startup will be slower.
6893
6894 Gnus will fetch more articles than you will read.  This will mean that
6895 the link between your machine and the @sc{nntp} server will become more
6896 loaded than if you didn't use article pre-fetch.  The server itself will
6897 also become more loaded---both with the extra article requests, and the
6898 extra connection.
6899
6900 Ok, so now you know that you shouldn't really use this thing...  unless
6901 you really want to.
6902
6903 @vindex gnus-asynchronous
6904 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
6905 happen automatically.
6906
6907 @vindex gnus-use-article-prefetch
6908 You can control how many articles are to be pre-fetched by setting
6909 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
6910 that when you read an article in the group, the back end will pre-fetch
6911 the next 30 articles.  If this variable is @code{t}, the back end will
6912 pre-fetch all the articles it can without bound.  If it is
6913 @code{nil}, no pre-fetching will be done.
6914
6915 @vindex gnus-async-prefetch-article-p
6916 @findex gnus-async-read-p
6917 There are probably some articles that you don't want to pre-fetch---read
6918 articles, for instance.  The @code{gnus-async-prefetch-article-p} variable controls whether an article is to be pre-fetched.  This function should
6919 return non-@code{nil} when the article in question is to be
6920 pre-fetched.  The default is @code{gnus-async-read-p}, which returns
6921 @code{nil} on read articles.  The function is called with an article
6922 data structure as the only parameter.
6923
6924 If, for instance, you wish to pre-fetch only unread articles shorter than 100 lines, you could say something like:
6925
6926 @lisp
6927 (defun my-async-short-unread-p (data)
6928   "Return non-nil for short, unread articles."
6929   (and (gnus-data-unread-p data)
6930        (< (mail-header-lines (gnus-data-header data))
6931           100)))
6932
6933 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
6934 @end lisp
6935
6936 These functions will be called many, many times, so they should
6937 preferably be short and sweet to avoid slowing down gnus too much.
6938 It's probably a good idea to byte-compile things like this.
6939
6940 @vindex gnus-prefetched-article-deletion-strategy
6941 Articles have to be removed from the asynch buffer sooner or later.  The
6942 @code{gnus-prefetched-article-deletion-strategy} says when to remove
6943 articles.  This is a list that may contain the following elements:
6944
6945 @table @code
6946 @item read
6947 Remove articles when they are read.
6948
6949 @item exit
6950 Remove articles when exiting the group.
6951 @end table
6952
6953 The default value is @code{(read exit)}.
6954
6955 @c @vindex gnus-use-header-prefetch
6956 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
6957 @c from the next group.
6958
6959
6960 @node Article Caching
6961 @section Article Caching
6962 @cindex article caching
6963 @cindex caching
6964
6965 If you have an @emph{extremely} slow @sc{nntp} connection, you may
6966 consider turning article caching on.  Each article will then be stored
6967 locally under your home directory.  As you may surmise, this could
6968 potentially use @emph{huge} amounts of disk space, as well as eat up all
6969 your inodes so fast it will make your head swim.  In vodka.
6970
6971 Used carefully, though, it could be just an easier way to save articles.
6972
6973 @vindex gnus-use-long-file-name
6974 @vindex gnus-cache-directory
6975 @vindex gnus-use-cache
6976 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
6977 all articles ticked or marked as dormant will then be copied
6978 over to your local cache (@code{gnus-cache-directory}).  Whether this
6979 cache is flat or hierarchical is controlled by the
6980 @code{gnus-use-long-file-name} variable, as usual.
6981
6982 When re-selecting a ticked or dormant article, it will be fetched from the
6983 cache instead of from the server.  As articles in your cache will never
6984 expire, this might serve as a method of saving articles while still
6985 keeping them where they belong.  Just mark all articles you want to save
6986 as dormant, and don't worry.
6987
6988 When an article is marked as read, is it removed from the cache.
6989
6990 @vindex gnus-cache-remove-articles
6991 @vindex gnus-cache-enter-articles
6992 The entering/removal of articles from the cache is controlled by the
6993 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
6994 variables.  Both are lists of symbols.  The first is @code{(ticked
6995 dormant)} by default, meaning that ticked and dormant articles will be
6996 put in the cache.  The latter is @code{(read)} by default, meaning that
6997 articles marked as read are removed from the cache.  Possibly
6998 symbols in these two lists are @code{ticked}, @code{dormant},
6999 @code{unread} and @code{read}.
7000
7001 @findex gnus-jog-cache
7002 So where does the massive article-fetching and storing come into the
7003 picture?  The @code{gnus-jog-cache} command will go through all
7004 subscribed newsgroups, request all unread articles, score them, and
7005 store them in the cache.  You should only ever, ever ever ever, use this
7006 command if 1) your connection to the @sc{nntp} server is really, really,
7007 really slow and 2) you have a really, really, really huge disk.
7008 Seriously.  One way to cut down on the number of articles downloaded is
7009 to score unwanted articles down and have them marked as read.  They will
7010 not then be downloaded by this command.
7011
7012 @vindex gnus-uncacheable-groups
7013 @vindex gnus-cacheable-groups
7014 It is likely that you do not want caching on all groups.  For instance,
7015 if your @code{nnml} mail is located under your home directory, it makes no
7016 sense to cache it somewhere else under your home directory.  Unless you
7017 feel that it's neat to use twice as much space.
7018
7019 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7020 regexp of groups to cache, @samp{^nntp} for instance, or set the
7021 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7022 Both variables are @code{nil} by default.  If a group matches both
7023 variables, the group is not cached.
7024
7025 @findex gnus-cache-generate-nov-databases
7026 @findex gnus-cache-generate-active
7027 @vindex gnus-cache-active-file
7028 The cache stores information on what articles it contains in its active
7029 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7030 of the cache) becomes all messed up for some reason or other, gnus
7031 offers two functions that will try to set things right.  @kbd{M-x
7032 gnus-cache-generate-nov-databases} will (re)build all the @sc{nov}
7033 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7034 file.
7035
7036 @findex gnus-cache-move-cache
7037 @code{gnus-cache-move-cache} will move your whole
7038 @code{gnus-cache-directory} to some other location. You get asked to
7039 where, isn't that cool?
7040
7041 @node Persistent Articles
7042 @section Persistent Articles
7043 @cindex persistent articles
7044
7045 Closely related to article caching, we have @dfn{persistent articles}.
7046 In fact, it's just a different way of looking at caching, and much more
7047 useful in my opinion.
7048
7049 Say you're reading a newsgroup, and you happen on to some valuable gem
7050 that you want to keep and treasure forever.  You'd normally just save it
7051 (using one of the many saving commands) in some file.  The problem with
7052 that is that it's just, well, yucky.  Ideally you'd prefer just having
7053 the article remain in the group where you found it forever; untouched by
7054 the expiry going on at the news server.
7055
7056 This is what a @dfn{persistent article} is---an article that just won't
7057 be deleted.  It's implemented using the normal cache functions, but
7058 you use two explicit commands for managing persistent articles:
7059
7060 @table @kbd
7061
7062 @item *
7063 @kindex * (Summary)
7064 @findex gnus-cache-enter-article
7065 Make the current article persistent (@code{gnus-cache-enter-article}).
7066
7067 @item M-*
7068 @kindex M-* (Summary)
7069 @findex gnus-cache-remove-article
7070 Remove the current article from the persistent articles
7071 (@code{gnus-cache-remove-article}).  This will normally delete the
7072 article.
7073 @end table
7074
7075 Both these commands understand the process/prefix convention.
7076
7077 To avoid having all ticked articles (and stuff) entered into the cache,
7078 you should set @code{gnus-use-cache} to @code{passive} if you're just
7079 interested in persistent articles:
7080
7081 @lisp
7082 (setq gnus-use-cache 'passive)
7083 @end lisp
7084
7085
7086 @node Article Backlog
7087 @section Article Backlog
7088 @cindex backlog
7089 @cindex article backlog
7090
7091 If you have a slow connection, but the idea of using caching seems
7092 unappealing to you (and it is, really), you can help the situation some
7093 by switching on the @dfn{backlog}.  This is where gnus will buffer
7094 already read articles so that it doesn't have to re-fetch articles
7095 you've already read.  This only helps if you are in the habit of
7096 re-selecting articles you've recently read, of course.  If you never do
7097 that, turning the backlog on will slow gnus down a little bit, and
7098 increase memory usage some.
7099
7100 @vindex gnus-keep-backlog
7101 If you set @code{gnus-keep-backlog} to a number @var{n}, gnus will store
7102 at most @var{n} old articles in a buffer for later re-fetching.  If this
7103 variable is non-@code{nil} and is not a number, gnus will store
7104 @emph{all} read articles, which means that your Emacs will grow without
7105 bound before exploding and taking your machine down with you.  I put
7106 that in there just to keep y'all on your toes.
7107
7108 This variable is @code{nil} by default.
7109
7110
7111 @node Saving Articles
7112 @section Saving Articles
7113 @cindex saving articles
7114
7115 Gnus can save articles in a number of ways.  Below is the documentation
7116 for saving articles in a fairly straight-forward fashion (i.e., little
7117 processing of the article is done before it is saved).  For a different
7118 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7119 (@pxref{Decoding Articles}).
7120
7121 For the commands listed here, the target is a file.  If you want to
7122 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7123 command (@pxref{Mail Group Commands}).
7124
7125 @vindex gnus-save-all-headers
7126 If @code{gnus-save-all-headers} is non-@code{nil}, gnus will not delete
7127 unwanted headers before saving the article.
7128
7129 @vindex gnus-saved-headers
7130 If the preceding variable is @code{nil}, all headers that match the
7131 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7132 deleted before saving.
7133
7134 @table @kbd
7135
7136 @item O o
7137 @itemx o
7138 @kindex O o (Summary)
7139 @kindex o (Summary)
7140 @findex gnus-summary-save-article
7141 @c @icon{gnus-summary-save-article}
7142 Save the current article using the default article saver
7143 (@code{gnus-summary-save-article}).
7144
7145 @item O m
7146 @kindex O m (Summary)
7147 @findex gnus-summary-save-article-mail
7148 Save the current article in mail format
7149 (@code{gnus-summary-save-article-mail}).
7150
7151 @item O r
7152 @kindex O r (Summary)
7153 @findex gnus-summary-save-article-rmail
7154 Save the current article in rmail format
7155 (@code{gnus-summary-save-article-rmail}).
7156
7157 @item O f
7158 @kindex O f (Summary)
7159 @findex gnus-summary-save-article-file
7160 @c @icon{gnus-summary-save-article-file}
7161 Save the current article in plain file format
7162 (@code{gnus-summary-save-article-file}).
7163
7164 @item O F
7165 @kindex O F (Summary)
7166 @findex gnus-summary-write-article-file
7167 Write the current article in plain file format, overwriting any previous
7168 file contents (@code{gnus-summary-write-article-file}).
7169
7170 @item O b
7171 @kindex O b (Summary)
7172 @findex gnus-summary-save-article-body-file
7173 Save the current article body in plain file format
7174 (@code{gnus-summary-save-article-body-file}).
7175
7176 @item O h
7177 @kindex O h (Summary)
7178 @findex gnus-summary-save-article-folder
7179 Save the current article in mh folder format
7180 (@code{gnus-summary-save-article-folder}).
7181
7182 @item O v
7183 @kindex O v (Summary)
7184 @findex gnus-summary-save-article-vm
7185 Save the current article in a VM folder
7186 (@code{gnus-summary-save-article-vm}).
7187
7188 @item O p
7189 @itemx |
7190 @kindex O p (Summary)
7191 @kindex | (Summary)
7192 @findex gnus-summary-pipe-output
7193 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7194 the current article to a process (@code{gnus-summary-pipe-output}).
7195 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7196 complete headers in the piped output.
7197
7198 @item O P
7199 @kindex O P (Summary)
7200 @findex gnus-summary-muttprint
7201 @vindex gnus-summary-muttprint-program
7202 Save the current article into muttprint. That is, print it using the
7203 external program Muttprint (see
7204 @uref{http://muttprint.sourceforge.net/}). The program name and
7205 options to use is controlled by the variable
7206 @code{gnus-summary-muttprint-program}. (@code{gnus-summary-muttprint}).
7207
7208 @end table
7209
7210 @vindex gnus-prompt-before-saving
7211 All these commands use the process/prefix convention
7212 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7213 functions, you might get tired of being prompted for files to save each
7214 and every article in.  The prompting action is controlled by
7215 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7216 default, giving you that excessive prompting action you know and
7217 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7218 just once for each series of articles you save.  If you like to really
7219 have Gnus do all your thinking for you, you can even set this variable
7220 to @code{nil}, which means that you will never be prompted for files to
7221 save articles in.  Gnus will simply save all the articles in the default
7222 files.
7223
7224
7225 @vindex gnus-default-article-saver
7226 You can customize the @code{gnus-default-article-saver} variable to make
7227 gnus do what you want it to.  You can use any of the six ready-made
7228 functions below, or you can create your own.
7229
7230 @table @code
7231
7232 @item gnus-summary-save-in-rmail
7233 @findex gnus-summary-save-in-rmail
7234 @vindex gnus-rmail-save-name
7235 @findex gnus-plain-save-name
7236 This is the default format, @dfn{babyl}.  Uses the function in the
7237 @code{gnus-rmail-save-name} variable to get a file name to save the
7238 article in.  The default is @code{gnus-plain-save-name}.
7239
7240 @item gnus-summary-save-in-mail
7241 @findex gnus-summary-save-in-mail
7242 @vindex gnus-mail-save-name
7243 Save in a Unix mail (mbox) file.  Uses the function in the
7244 @code{gnus-mail-save-name} variable to get a file name to save the
7245 article in.  The default is @code{gnus-plain-save-name}.
7246
7247 @item gnus-summary-save-in-file
7248 @findex gnus-summary-save-in-file
7249 @vindex gnus-file-save-name
7250 @findex gnus-numeric-save-name
7251 Append the article straight to an ordinary file.  Uses the function in
7252 the @code{gnus-file-save-name} variable to get a file name to save the
7253 article in.  The default is @code{gnus-numeric-save-name}.
7254
7255 @item gnus-summary-write-to-file
7256 @findex gnus-summary-write-to-file
7257 Write the article straight to an ordinary file.  The file is
7258 overwritten if it exists.  Uses the function in the
7259 @code{gnus-file-save-name} variable to get a file name to save the
7260 article in.  The default is @code{gnus-numeric-save-name}.
7261
7262 @item gnus-summary-save-body-in-file
7263 @findex gnus-summary-save-body-in-file
7264 Append the article body to an ordinary file.  Uses the function in the
7265 @code{gnus-file-save-name} variable to get a file name to save the
7266 article in.  The default is @code{gnus-numeric-save-name}.
7267
7268 @item gnus-summary-save-in-folder
7269 @findex gnus-summary-save-in-folder
7270 @findex gnus-folder-save-name
7271 @findex gnus-Folder-save-name
7272 @vindex gnus-folder-save-name
7273 @cindex rcvstore
7274 @cindex MH folders
7275 Save the article to an MH folder using @code{rcvstore} from the MH
7276 library.  Uses the function in the @code{gnus-folder-save-name} variable
7277 to get a file name to save the article in.  The default is
7278 @code{gnus-folder-save-name}, but you can also use
7279 @code{gnus-Folder-save-name}, which creates capitalized names.
7280
7281 @item gnus-summary-save-in-vm
7282 @findex gnus-summary-save-in-vm
7283 Save the article in a VM folder.  You have to have the VM mail
7284 reader to use this setting.
7285 @end table
7286
7287 @vindex gnus-article-save-directory
7288 All of these functions, except for the last one, will save the article
7289 in the @code{gnus-article-save-directory}, which is initialized from the
7290 @code{SAVEDIR} environment variable.  This is @file{~/News/} by
7291 default.
7292
7293 As you can see above, the functions use different functions to find a
7294 suitable name of a file to save the article in.  Below is a list of
7295 available functions that generate names:
7296
7297 @table @code
7298
7299 @item gnus-Numeric-save-name
7300 @findex gnus-Numeric-save-name
7301 File names like @file{~/News/Alt.andrea-dworkin/45}.
7302
7303 @item gnus-numeric-save-name
7304 @findex gnus-numeric-save-name
7305 File names like @file{~/News/alt.andrea-dworkin/45}.
7306
7307 @item gnus-Plain-save-name
7308 @findex gnus-Plain-save-name
7309 File names like @file{~/News/Alt.andrea-dworkin}.
7310
7311 @item gnus-plain-save-name
7312 @findex gnus-plain-save-name
7313 File names like @file{~/News/alt.andrea-dworkin}.
7314
7315 @item gnus-sender-save-name
7316 @findex gnus-sender-save-name
7317 File names like @file{~/News/larsi}.
7318 @end table
7319
7320 @vindex gnus-split-methods
7321 You can have gnus suggest where to save articles by plonking a regexp into
7322 the @code{gnus-split-methods} alist.  For instance, if you would like to
7323 save articles related to gnus in the file @file{gnus-stuff}, and articles
7324 related to VM in @code{vm-stuff}, you could set this variable to something
7325 like:
7326
7327 @lisp
7328 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7329  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7330  (my-choosing-function "../other-dir/my-stuff")
7331  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7332 @end lisp
7333
7334 We see that this is a list where each element is a list that has two
7335 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7336 a string (in which case it is used as a regexp to match on the article
7337 head); it can be a symbol (which will be called as a function with the
7338 group name as a parameter); or it can be a list (which will be
7339 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7340 the @dfn{file} will be used as a default prompt.  In addition, the
7341 result of the operation itself will be used if the function or form
7342 called returns a string or a list of strings.
7343
7344 You basically end up with a list of file names that might be used when
7345 saving the current article.  (All ``matches'' will be used.)  You will
7346 then be prompted for what you really want to use as a name, with file
7347 name completion over the results from applying this variable.
7348
7349 This variable is @code{((gnus-article-archive-name))} by default, which
7350 means that gnus will look at the articles it saves for an
7351 @code{Archive-name} line and use that as a suggestion for the file
7352 name.
7353
7354 Here's an example function to clean up file names somewhat.  If you have
7355 lots of mail groups called things like
7356 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7357 these group names before creating the file name to save to.  The
7358 following will do just that:
7359
7360 @lisp
7361 (defun my-save-name (group)
7362   (when (string-match "^nnml:mail." group)
7363     (substring group (match-end 0))))
7364
7365 (setq gnus-split-methods
7366       '((gnus-article-archive-name)
7367         (my-save-name)))
7368 @end lisp
7369
7370
7371 @vindex gnus-use-long-file-name
7372 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7373 @code{nil}, all the preceding functions will replace all periods
7374 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7375 the functions will generate hierarchies of directories instead of having
7376 all the files in the top level directory
7377 (@file{~/News/alt/andrea-dworkin} instead of
7378 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7379 on most systems.  However, for historical reasons, this is @code{nil} on
7380 Xenix and usg-unix-v machines by default.
7381
7382 This function also affects kill and score file names.  If this variable
7383 is a list, and the list contains the element @code{not-score}, long file
7384 names will not be used for score files, if it contains the element
7385 @code{not-save}, long file names will not be used for saving, and if it
7386 contains the element @code{not-kill}, long file names will not be used
7387 for kill files.
7388
7389 If you'd like to save articles in a hierarchy that looks something like
7390 a spool, you could
7391
7392 @lisp
7393 (setq gnus-use-long-file-name '(not-save)) ; to get a hierarchy
7394 (setq gnus-default-article-saver
7395       'gnus-summary-save-in-file) ; no encoding
7396 @end lisp
7397
7398 Then just save with @kbd{o}.  You'd then read this hierarchy with
7399 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7400 the top level directory as the argument (@file{~/News/}).  Then just walk
7401 around to the groups/directories with @code{nneething}.
7402
7403
7404 @node Decoding Articles
7405 @section Decoding Articles
7406 @cindex decoding articles
7407
7408 Sometime users post articles (or series of articles) that have been
7409 encoded in some way or other.  Gnus can decode them for you.
7410
7411 @menu
7412 * Uuencoded Articles::          Uudecode articles.
7413 * Shell Archives::              Unshar articles.
7414 * PostScript Files::            Split PostScript.
7415 * Other Files::                 Plain save and binhex.
7416 * Decoding Variables::          Variables for a happy decoding.
7417 * Viewing Files::               You want to look at the result of the decoding?
7418 @end menu
7419
7420 @cindex series
7421 @cindex article series
7422 All these functions use the process/prefix convention
7423 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7424 the extension that a ``single article'' means ``a single series''.  Gnus
7425 can find out by itself what articles belong to a series, decode all the
7426 articles and unpack/view/save the resulting file(s).
7427
7428 Gnus guesses what articles are in the series according to the following
7429 simplish rule: The subjects must be (nearly) identical, except for the
7430 last two numbers of the line.  (Spaces are largely ignored, however.)
7431
7432 For example: If you choose a subject called @samp{cat.gif (2/3)}, gnus
7433 will find all the articles that match the regexp @samp{^cat.gif
7434 ([0-9]+/[0-9]+).*$}.
7435
7436 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7437 series}, will not be properly recognized by any of the automatic viewing
7438 commands, and you have to mark the articles manually with @kbd{#}.
7439
7440
7441 @node Uuencoded Articles
7442 @subsection Uuencoded Articles
7443 @cindex uudecode
7444 @cindex uuencoded articles
7445
7446 @table @kbd
7447
7448 @item X u
7449 @kindex X u (Summary)
7450 @findex gnus-uu-decode-uu
7451 @c @icon{gnus-uu-decode-uu}
7452 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7453
7454 @item X U
7455 @kindex X U (Summary)
7456 @findex gnus-uu-decode-uu-and-save
7457 Uudecodes and saves the current series
7458 (@code{gnus-uu-decode-uu-and-save}).
7459
7460 @item X v u
7461 @kindex X v u (Summary)
7462 @findex gnus-uu-decode-uu-view
7463 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7464
7465 @item X v U
7466 @kindex X v U (Summary)
7467 @findex gnus-uu-decode-uu-and-save-view
7468 Uudecodes, views and saves the current series
7469 (@code{gnus-uu-decode-uu-and-save-view}).
7470
7471 @end table
7472
7473 Remember that these all react to the presence of articles marked with
7474 the process mark.  If, for instance, you'd like to decode and save an
7475 entire newsgroup, you'd typically do @kbd{M P a}
7476 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7477 (@code{gnus-uu-decode-uu-and-save}).
7478
7479 All this is very much different from how @code{gnus-uu} worked with
7480 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7481 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7482 articles in some way (@pxref{Setting Process Marks}) and then press
7483 @kbd{X u}.
7484
7485 @vindex gnus-uu-notify-files
7486 Note: When trying to decode articles that have names matching
7487 @code{gnus-uu-notify-files}, which is hard-coded to
7488 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7489 automatically post an article on @samp{comp.unix.wizards} saying that
7490 you have just viewed the file in question.  This feature can't be turned
7491 off.
7492
7493
7494 @node Shell Archives
7495 @subsection Shell Archives
7496 @cindex unshar
7497 @cindex shell archives
7498 @cindex shared articles
7499
7500 Shell archives (``shar files'') used to be a popular way to distribute
7501 sources, but it isn't used all that much today.  In any case, we have
7502 some commands to deal with these:
7503
7504 @table @kbd
7505
7506 @item X s
7507 @kindex X s (Summary)
7508 @findex gnus-uu-decode-unshar
7509 Unshars the current series (@code{gnus-uu-decode-unshar}).
7510
7511 @item X S
7512 @kindex X S (Summary)
7513 @findex gnus-uu-decode-unshar-and-save
7514 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7515
7516 @item X v s
7517 @kindex X v s (Summary)
7518 @findex gnus-uu-decode-unshar-view
7519 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7520
7521 @item X v S
7522 @kindex X v S (Summary)
7523 @findex gnus-uu-decode-unshar-and-save-view
7524 Unshars, views and saves the current series
7525 (@code{gnus-uu-decode-unshar-and-save-view}).
7526 @end table
7527
7528
7529 @node PostScript Files
7530 @subsection PostScript Files
7531 @cindex PostScript
7532
7533 @table @kbd
7534
7535 @item X p
7536 @kindex X p (Summary)
7537 @findex gnus-uu-decode-postscript
7538 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7539
7540 @item X P
7541 @kindex X P (Summary)
7542 @findex gnus-uu-decode-postscript-and-save
7543 Unpack and save the current PostScript series
7544 (@code{gnus-uu-decode-postscript-and-save}).
7545
7546 @item X v p
7547 @kindex X v p (Summary)
7548 @findex gnus-uu-decode-postscript-view
7549 View the current PostScript series
7550 (@code{gnus-uu-decode-postscript-view}).
7551
7552 @item X v P
7553 @kindex X v P (Summary)
7554 @findex gnus-uu-decode-postscript-and-save-view
7555 View and save the current PostScript series
7556 (@code{gnus-uu-decode-postscript-and-save-view}).
7557 @end table
7558
7559
7560 @node Other Files
7561 @subsection Other Files
7562
7563 @table @kbd
7564 @item X o
7565 @kindex X o (Summary)
7566 @findex gnus-uu-decode-save
7567 Save the current series
7568 (@code{gnus-uu-decode-save}).
7569
7570 @item X b
7571 @kindex X b (Summary)
7572 @findex gnus-uu-decode-binhex
7573 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7574 doesn't really work yet.
7575 @end table
7576
7577
7578 @node Decoding Variables
7579 @subsection Decoding Variables
7580
7581 Adjective, not verb.
7582
7583 @menu
7584 * Rule Variables::              Variables that say how a file is to be viewed.
7585 * Other Decode Variables::      Other decode variables.
7586 * Uuencoding and Posting::      Variables for customizing uuencoding.
7587 @end menu
7588
7589
7590 @node Rule Variables
7591 @subsubsection Rule Variables
7592 @cindex rule variables
7593
7594 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7595 variables are of the form
7596
7597 @lisp
7598       (list '(regexp1 command2)
7599             '(regexp2 command2)
7600             ...)
7601 @end lisp
7602
7603 @table @code
7604
7605 @item gnus-uu-user-view-rules
7606 @vindex gnus-uu-user-view-rules
7607 @cindex sox
7608 This variable is consulted first when viewing files.  If you wish to use,
7609 for instance, @code{sox} to convert an @samp{.au} sound file, you could
7610 say something like:
7611 @lisp
7612 (setq gnus-uu-user-view-rules
7613       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7614 @end lisp
7615
7616 @item gnus-uu-user-view-rules-end
7617 @vindex gnus-uu-user-view-rules-end
7618 This variable is consulted if gnus couldn't make any matches from the
7619 user and default view rules.
7620
7621 @item gnus-uu-user-archive-rules
7622 @vindex gnus-uu-user-archive-rules
7623 This variable can be used to say what commands should be used to unpack
7624 archives.
7625 @end table
7626
7627
7628 @node Other Decode Variables
7629 @subsubsection Other Decode Variables
7630
7631 @table @code
7632 @vindex gnus-uu-grabbed-file-functions
7633
7634 @item gnus-uu-grabbed-file-functions
7635 All functions in this list will be called right after each file has been
7636 successfully decoded---so that you can move or view files right away,
7637 and don't have to wait for all files to be decoded before you can do
7638 anything.  Ready-made functions you can put in this list are:
7639
7640 @table @code
7641
7642 @item gnus-uu-grab-view
7643 @findex gnus-uu-grab-view
7644 View the file.
7645
7646 @item gnus-uu-grab-move
7647 @findex gnus-uu-grab-move
7648 Move the file (if you're using a saving function.)
7649 @end table
7650
7651 @item gnus-uu-be-dangerous
7652 @vindex gnus-uu-be-dangerous
7653 Specifies what to do if unusual situations arise during decoding.  If
7654 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7655 that didn't work, and overwrite existing files.  Otherwise, ask each
7656 time.
7657
7658 @item gnus-uu-ignore-files-by-name
7659 @vindex gnus-uu-ignore-files-by-name
7660 Files with name matching this regular expression won't be viewed.
7661
7662 @item gnus-uu-ignore-files-by-type
7663 @vindex gnus-uu-ignore-files-by-type
7664 Files with a @sc{mime} type matching this variable won't be viewed.
7665 Note that Gnus tries to guess what type the file is based on the name.
7666 @code{gnus-uu} is not a @sc{mime} package (yet), so this is slightly
7667 kludgey.
7668
7669 @item gnus-uu-tmp-dir
7670 @vindex gnus-uu-tmp-dir
7671 Where @code{gnus-uu} does its work.
7672
7673 @item gnus-uu-do-not-unpack-archives
7674 @vindex gnus-uu-do-not-unpack-archives
7675 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7676 looking for files to display.
7677
7678 @item gnus-uu-view-and-save
7679 @vindex gnus-uu-view-and-save
7680 Non-@code{nil} means that the user will always be asked to save a file
7681 after viewing it.
7682
7683 @item gnus-uu-ignore-default-view-rules
7684 @vindex gnus-uu-ignore-default-view-rules
7685 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7686 rules.
7687
7688 @item gnus-uu-ignore-default-archive-rules
7689 @vindex gnus-uu-ignore-default-archive-rules
7690 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7691 unpacking commands.
7692
7693 @item gnus-uu-kill-carriage-return
7694 @vindex gnus-uu-kill-carriage-return
7695 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7696 from articles.
7697
7698 @item gnus-uu-unmark-articles-not-decoded
7699 @vindex gnus-uu-unmark-articles-not-decoded
7700 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7701 decoded articles as unread.
7702
7703 @item gnus-uu-correct-stripped-uucode
7704 @vindex gnus-uu-correct-stripped-uucode
7705 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7706 uuencoded files that have had trailing spaces deleted.
7707
7708 @item gnus-uu-pre-uudecode-hook
7709 @vindex gnus-uu-pre-uudecode-hook
7710 Hook run before sending a message to @code{uudecode}.
7711
7712 @item gnus-uu-view-with-metamail
7713 @vindex gnus-uu-view-with-metamail
7714 @cindex metamail
7715 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7716 commands defined by the rule variables and just fudge a @sc{mime}
7717 content type based on the file name.  The result will be fed to
7718 @code{metamail} for viewing.
7719
7720 @item gnus-uu-save-in-digest
7721 @vindex gnus-uu-save-in-digest
7722 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7723 decoding, will save in digests.  If this variable is @code{nil},
7724 @code{gnus-uu} will just save everything in a file without any
7725 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7726 to specify any meaningful volume and issue numbers were found, so I
7727 simply dropped them.
7728
7729 @end table
7730
7731
7732 @node Uuencoding and Posting
7733 @subsubsection Uuencoding and Posting
7734
7735 @table @code
7736
7737 @item gnus-uu-post-include-before-composing
7738 @vindex gnus-uu-post-include-before-composing
7739 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7740 before you compose the article.  If this variable is @code{t}, you can
7741 either include an encoded file with @kbd{C-c C-i} or have one included
7742 for you when you post the article.
7743
7744 @item gnus-uu-post-length
7745 @vindex gnus-uu-post-length
7746 Maximum length of an article.  The encoded file will be split into how
7747 many articles it takes to post the entire file.
7748
7749 @item gnus-uu-post-threaded
7750 @vindex gnus-uu-post-threaded
7751 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7752 thread.  This may not be smart, as no other decoder I have seen is able
7753 to follow threads when collecting uuencoded articles.  (Well, I have
7754 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7755 think that counts...) Default is @code{nil}.
7756
7757 @item gnus-uu-post-separate-description
7758 @vindex gnus-uu-post-separate-description
7759 Non-@code{nil} means that the description will be posted in a separate
7760 article.  The first article will typically be numbered (0/x).  If this
7761 variable is @code{nil}, the description the user enters will be included
7762 at the beginning of the first article, which will be numbered (1/x).
7763 Default is @code{t}.
7764
7765 @end table
7766
7767
7768 @node Viewing Files
7769 @subsection Viewing Files
7770 @cindex viewing files
7771 @cindex pseudo-articles
7772
7773 After decoding, if the file is some sort of archive, gnus will attempt
7774 to unpack the archive and see if any of the files in the archive can be
7775 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7776 containing the files @file{pic1.jpg} and @file{pic2.gif}, gnus will
7777 uncompress and de-tar the main file, and then view the two pictures.
7778 This unpacking process is recursive, so if the archive contains archives
7779 of archives, it'll all be unpacked.
7780
7781 Finally, gnus will normally insert a @dfn{pseudo-article} for each
7782 extracted file into the summary buffer.  If you go to these
7783 ``articles'', you will be prompted for a command to run (usually Gnus
7784 will make a suggestion), and then the command will be run.
7785
7786 @vindex gnus-view-pseudo-asynchronously
7787 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7788 until the viewing is done before proceeding.
7789
7790 @vindex gnus-view-pseudos
7791 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7792 the pseudo-articles into the summary buffer, but view them
7793 immediately.  If this variable is @code{not-confirm}, the user won't even
7794 be asked for a confirmation before viewing is done.
7795
7796 @vindex gnus-view-pseudos-separately
7797 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7798 pseudo-article will be created for each file to be viewed.  If
7799 @code{nil}, all files that use the same viewing command will be given as
7800 a list of parameters to that command.
7801
7802 @vindex gnus-insert-pseudo-articles
7803 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7804 pseudo-articles when decoding.  It is @code{t} by default.
7805
7806 So; there you are, reading your @emph{pseudo-articles} in your
7807 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7808 Why isn't anything real anymore? How did we get here?
7809
7810
7811 @node Article Treatment
7812 @section Article Treatment
7813
7814 Reading through this huge manual, you may have quite forgotten that the
7815 object of newsreaders is to actually, like, read what people have
7816 written.  Reading articles.  Unfortunately, people are quite bad at
7817 writing, so there are tons of functions and variables to make reading
7818 these articles easier.
7819
7820 @menu
7821 * Article Highlighting::        You want to make the article look like fruit salad.
7822 * Article Fontisizing::         Making emphasized text look nice.
7823 * Article Hiding::              You also want to make certain info go away.
7824 * Article Washing::             Lots of way-neat functions to make life better.
7825 * Article Header::              Doing various header transformations.
7826 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7827 * Article Date::                Grumble, UT!
7828 * Article Display::             Display various stuff---X-Face, Picons, Smileys
7829 * Article Signature::           What is a signature?
7830 * Article Miscellania::         Various other stuff.
7831 @end menu
7832
7833
7834 @node Article Highlighting
7835 @subsection Article Highlighting
7836 @cindex highlighting
7837
7838 Not only do you want your article buffer to look like fruit salad, but
7839 you want it to look like technicolor fruit salad.
7840
7841 @table @kbd
7842
7843 @item W H a
7844 @kindex W H a (Summary)
7845 @findex gnus-article-highlight
7846 @findex gnus-article-maybe-highlight
7847 Do much highlighting of the current article
7848 (@code{gnus-article-highlight}).  This function highlights header, cited
7849 text, the signature, and adds buttons to the body and the head.
7850
7851 @item W H h
7852 @kindex W H h (Summary)
7853 @findex gnus-article-highlight-headers
7854 @vindex gnus-header-face-alist
7855 Highlight the headers (@code{gnus-article-highlight-headers}).  The
7856 highlighting will be done according to the @code{gnus-header-face-alist}
7857 variable, which is a list where each element has the form
7858 @code{(@var{regexp} @var{name} @var{content})}.
7859 @var{regexp} is a regular expression for matching the
7860 header, @var{name} is the face used for highlighting the header name
7861 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
7862 the header value.  The first match made will be used.  Note that
7863 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
7864
7865 @item W H c
7866 @kindex W H c (Summary)
7867 @findex gnus-article-highlight-citation
7868 Highlight cited text (@code{gnus-article-highlight-citation}).
7869
7870 Some variables to customize the citation highlights:
7871
7872 @table @code
7873 @vindex gnus-cite-parse-max-size
7874
7875 @item gnus-cite-parse-max-size
7876 If the article size if bigger than this variable (which is 25000 by
7877 default), no citation highlighting will be performed.
7878
7879 @item gnus-cite-max-prefix
7880 @vindex gnus-cite-max-prefix
7881 Maximum possible length for a citation prefix (default 20).
7882
7883 @item gnus-cite-face-list
7884 @vindex gnus-cite-face-list
7885 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
7886 When there are citations from multiple articles in the same message,
7887 gnus will try to give each citation from each article its own face.
7888 This should make it easier to see who wrote what.
7889
7890 @item gnus-supercite-regexp
7891 @vindex gnus-supercite-regexp
7892 Regexp matching normal Supercite attribution lines.
7893
7894 @item gnus-supercite-secondary-regexp
7895 @vindex gnus-supercite-secondary-regexp
7896 Regexp matching mangled Supercite attribution lines.
7897
7898 @item gnus-cite-minimum-match-count
7899 @vindex gnus-cite-minimum-match-count
7900 Minimum number of identical prefixes we have to see before we believe
7901 that it's a citation.
7902
7903 @item gnus-cite-attribution-prefix
7904 @vindex gnus-cite-attribution-prefix
7905 Regexp matching the beginning of an attribution line.
7906
7907 @item gnus-cite-attribution-suffix
7908 @vindex gnus-cite-attribution-suffix
7909 Regexp matching the end of an attribution line.
7910
7911 @item gnus-cite-attribution-face
7912 @vindex gnus-cite-attribution-face
7913 Face used for attribution lines.  It is merged with the face for the
7914 cited text belonging to the attribution.
7915
7916 @end table
7917
7918
7919 @item W H s
7920 @kindex W H s (Summary)
7921 @vindex gnus-signature-separator
7922 @vindex gnus-signature-face
7923 @findex gnus-article-highlight-signature
7924 Highlight the signature (@code{gnus-article-highlight-signature}).
7925 Everything after @code{gnus-signature-separator} (@pxref{Article
7926 Signature}) in an article will be considered a signature and will be
7927 highlighted with @code{gnus-signature-face}, which is @code{italic} by
7928 default.
7929
7930 @end table
7931
7932 @xref{Customizing Articles}, for how to highlight articles automatically.
7933
7934
7935 @node Article Fontisizing
7936 @subsection Article Fontisizing
7937 @cindex emphasis
7938 @cindex article emphasis
7939
7940 @findex gnus-article-emphasize
7941 @kindex W e (Summary)
7942 People commonly add emphasis to words in news articles by writing things
7943 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
7944 this look nicer by running the article through the @kbd{W e}
7945 (@code{gnus-article-emphasize}) command.
7946
7947 @vindex gnus-emphasis-alist
7948 How the emphasis is computed is controlled by the
7949 @code{gnus-emphasis-alist} variable.  This is an alist where the first
7950 element is a regular expression to be matched.  The second is a number
7951 that says what regular expression grouping is used to find the entire
7952 emphasized word.  The third is a number that says what regexp grouping
7953 should be displayed and highlighted.  (The text between these two
7954 groupings will be hidden.)  The fourth is the face used for
7955 highlighting.
7956
7957 @lisp
7958 (setq gnus-emphasis-alist
7959       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
7960         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
7961 @end lisp
7962
7963 @cindex slash
7964 @cindex asterisk
7965 @cindex underline
7966 @cindex /
7967 @cindex *
7968
7969 @vindex gnus-emphasis-underline
7970 @vindex gnus-emphasis-bold
7971 @vindex gnus-emphasis-italic
7972 @vindex gnus-emphasis-underline-bold
7973 @vindex gnus-emphasis-underline-italic
7974 @vindex gnus-emphasis-bold-italic
7975 @vindex gnus-emphasis-underline-bold-italic
7976 By default, there are seven rules, and they use the following faces:
7977 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
7978 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
7979 @code{gnus-emphasis-underline-italic},
7980 @code{gnus-emphasis-underline-bold}, and
7981 @code{gnus-emphasis-underline-bold-italic}.
7982
7983 If you want to change these faces, you can either use @kbd{M-x
7984 customize}, or you can use @code{copy-face}.  For instance, if you want
7985 to make @code{gnus-emphasis-italic} use a red face instead, you could
7986 say something like:
7987
7988 @lisp
7989 (copy-face 'red 'gnus-emphasis-italic)
7990 @end lisp
7991
7992 @vindex gnus-group-highlight-words-alist
7993
7994 If you want to highlight arbitrary words, you can use the
7995 @code{gnus-group-highlight-words-alist} variable, which uses the same
7996 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
7997 parameter (@pxref{Group Parameters}) can also be used.
7998
7999 @xref{Customizing Articles}, for how to fontize articles automatically.
8000
8001
8002 @node Article Hiding
8003 @subsection Article Hiding
8004 @cindex article hiding
8005
8006 Or rather, hiding certain things in each article.  There usually is much
8007 too much cruft in most articles.
8008
8009 @table @kbd
8010
8011 @item W W a
8012 @kindex W W a (Summary)
8013 @findex gnus-article-hide
8014 Do quite a lot of hiding on the article buffer
8015 (@kbd{gnus-article-hide}).  In particular, this function will hide
8016 headers, PGP, cited text and the signature.
8017
8018 @item W W h
8019 @kindex W W h (Summary)
8020 @findex gnus-article-hide-headers
8021 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8022 Headers}.
8023
8024 @item W W b
8025 @kindex W W b (Summary)
8026 @findex gnus-article-hide-boring-headers
8027 Hide headers that aren't particularly interesting
8028 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8029
8030 @item W W s
8031 @kindex W W s (Summary)
8032 @findex gnus-article-hide-signature
8033 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8034 Signature}.
8035
8036 @item W W l
8037 @kindex W W l (Summary)
8038 @findex gnus-article-hide-list-identifiers
8039 @vindex gnus-list-identifiers
8040 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8041 are strings some mailing list servers add to the beginning of all
8042 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8043 @samp{Re: } is skipped before stripping. @code{gnus-list-identifiers}
8044 may not contain @code{\\(..\\)}.
8045
8046 @table @code
8047
8048 @item gnus-list-identifiers
8049 @vindex gnus-list-identifiers
8050 A regular expression that matches list identifiers to be removed from
8051 subject.  This can also be a list of regular expressions.
8052
8053 @end table
8054
8055 @item W W p
8056 @kindex W W p (Summary)
8057 @findex gnus-article-hide-pgp
8058 @vindex gnus-article-hide-pgp-hook
8059 Hide @sc{pgp} signatures (@code{gnus-article-hide-pgp}).  The
8060 @code{gnus-article-hide-pgp-hook} hook will be run after a @sc{pgp}
8061 signature has been hidden.  For example, to automatically verify
8062 articles that have signatures in them do:
8063 @lisp
8064 ;;; Hide pgp cruft if any.
8065
8066 (setq gnus-treat-strip-pgp t)
8067
8068 ;;; After hiding pgp, verify the message;
8069 ;;; only happens if pgp signature is found.
8070
8071 (add-hook 'gnus-article-hide-pgp-hook
8072           (lambda ()
8073             (save-excursion
8074               (set-buffer gnus-original-article-buffer)
8075               (mc-verify))))
8076 @end lisp
8077
8078 @item W W P
8079 @kindex W W P (Summary)
8080 @findex gnus-article-hide-pem
8081 Hide @sc{pem} (privacy enhanced messages) cruft
8082 (@code{gnus-article-hide-pem}).
8083
8084 @item W W B
8085 @kindex W W B (Summary)
8086 @findex gnus-article-strip-banner
8087 @vindex gnus-article-banner-alist
8088 @vindex gnus-article-address-banner-alist
8089 @cindex banner
8090 @cindex OneList
8091 @cindex stripping advertisements
8092 @cindex advertisements
8093 Strip the banner specified by the @code{banner} group parameter
8094 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8095 annoying banners and/or signatures that some mailing lists and moderated
8096 groups adds to all the messages.  The way to use this function is to add
8097 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8098 group you want banners stripped from.  The parameter either be a string,
8099 which will be interpreted as a regular expression matching text to be
8100 removed, or the symbol @code{signature}, meaning that the (last)
8101 signature should be removed, or other symbol, meaning that the
8102 corresponding regular expression in @code{gnus-article-banner-alist} is
8103 used.
8104
8105 Regardless of a group, you can hide things like advertisements only when
8106 the sender of an article has a certain mail address specified in
8107 @code{gnus-article-address-banner-alist}.
8108
8109 @table @code
8110
8111 @item gnus-article-address-banner-alist
8112 @vindex gnus-article-address-banner-alist
8113 Alist of mail addresses and banners.  Each element has the form
8114 @code{(ADDRESS . BANNER)}, where ADDRESS is a regexp matching a mail
8115 address in the From header, BANNER is one of a symbol @code{signature},
8116 an item in @code{gnus-article-banner-alist}, a regexp and @code{nil}.
8117 If ADDRESS matches author's mail address, it will remove things like
8118 advertisements.  For example, if a sender has the mail address
8119 @samp{hail@@yoo-hoo.co.jp} and there is a banner something like
8120 @samp{Do You Yoo-hoo!?} in all articles he sends, you can use the
8121 following element to remove them:
8122
8123 @lisp
8124 ("@@yoo-hoo\\.co\\.jp\\'" . "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8125 @end lisp
8126
8127 @end table
8128
8129 @item W W c
8130 @kindex W W c (Summary)
8131 @findex gnus-article-hide-citation
8132 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8133 customizing the hiding:
8134
8135 @table @code
8136
8137 @item gnus-cited-opened-text-button-line-format
8138 @itemx gnus-cited-closed-text-button-line-format
8139 @vindex gnus-cited-closed-text-button-line-format
8140 @vindex gnus-cited-opened-text-button-line-format
8141 Gnus adds buttons to show where the cited text has been hidden, and to
8142 allow toggle hiding the text.  The format of the variable is specified
8143 by these format-like variable (@pxref{Formatting Variables}).  These
8144 specs are valid:
8145
8146 @table @samp
8147 @item b
8148 Starting point of the hidden text.
8149 @item e
8150 Ending point of the hidden text.
8151 @item l
8152 Number of characters in the hidden region.
8153 @item n
8154 Number of lines of hidden text.
8155 @end table
8156
8157 @item gnus-cited-lines-visible
8158 @vindex gnus-cited-lines-visible
8159 The number of lines at the beginning of the cited text to leave
8160 shown. This can also be a cons cell with the number of lines at the top
8161 and bottom of the text, respectively, to remain visible.
8162
8163 @end table
8164
8165 @item W W C-c
8166 @kindex W W C-c (Summary)
8167 @findex gnus-article-hide-citation-maybe
8168
8169 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8170 following two variables:
8171
8172 @table @code
8173 @item gnus-cite-hide-percentage
8174 @vindex gnus-cite-hide-percentage
8175 If the cited text is of a bigger percentage than this variable (default
8176 50), hide the cited text.
8177
8178 @item gnus-cite-hide-absolute
8179 @vindex gnus-cite-hide-absolute
8180 The cited text must have at least this length (default 10) before it
8181 is hidden.
8182 @end table
8183
8184 @item W W C
8185 @kindex W W C (Summary)
8186 @findex gnus-article-hide-citation-in-followups
8187 Hide cited text in articles that aren't roots
8188 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8189 useful as an interactive command, but might be a handy function to stick
8190 have happen automatically (@pxref{Customizing Articles}).
8191
8192 @end table
8193
8194 All these ``hiding'' commands are toggles, but if you give a negative
8195 prefix to these commands, they will show what they have previously
8196 hidden.  If you give a positive prefix, they will always hide.
8197
8198 Also @pxref{Article Highlighting} for further variables for
8199 citation customization.
8200
8201 @xref{Customizing Articles}, for how to hide article elements
8202 automatically.
8203
8204
8205 @node Article Washing
8206 @subsection Article Washing
8207 @cindex washing
8208 @cindex article washing
8209
8210 We call this ``article washing'' for a really good reason.  Namely, the
8211 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8212
8213 @dfn{Washing} is defined by us as ``changing something from something to
8214 something else'', but normally results in something looking better.
8215 Cleaner, perhaps.
8216
8217 @xref{Customizing Articles}, if you want to change how Gnus displays
8218 articles by default.
8219
8220 @table @kbd
8221
8222 @item C-u g
8223 This is not really washing, it's sort of the opposite of washing.  If
8224 you type this, you see the article exactly as it exists on disk or on
8225 the server.
8226
8227 @item W l
8228 @kindex W l (Summary)
8229 @findex gnus-summary-stop-page-breaking
8230 Remove page breaks from the current article
8231 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8232 delimiters.
8233
8234 @item W r
8235 @kindex W r (Summary)
8236 @findex gnus-summary-caesar-message
8237 @c @icon{gnus-summary-caesar-message}
8238 Do a Caesar rotate (rot13) on the article buffer
8239 (@code{gnus-summary-caesar-message}).
8240 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8241 (Typically offensive jokes and such.)
8242
8243 It's commonly called ``rot13'' because each letter is rotated 13
8244 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8245 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8246 is rumored to have employed this form of, uh, somewhat weak encryption.
8247
8248 @item W m
8249 @kindex W m (Summary)
8250 @findex gnus-summary-morse-message
8251 @c @icon{gnus-summary-morse-message}
8252 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8253
8254 @item W t
8255 @item t
8256 @kindex W t (Summary)
8257 @kindex t (Summary)
8258 @findex gnus-summary-toggle-header
8259 Toggle whether to display all headers in the article buffer
8260 (@code{gnus-summary-toggle-header}).
8261
8262 @item W v
8263 @kindex W v (Summary)
8264 @findex gnus-summary-verbose-headers
8265 Toggle whether to display all headers in the article buffer permanently
8266 (@code{gnus-summary-verbose-headers}).
8267
8268 @item W m
8269 @kindex W m (Summary)
8270 @findex gnus-summary-toggle-mime
8271 Toggle whether to run the article through @sc{mime} before displaying
8272 (@code{gnus-summary-toggle-mime}).
8273
8274 @item W o
8275 @kindex W o (Summary)
8276 @findex gnus-article-treat-overstrike
8277 Treat overstrike (@code{gnus-article-treat-overstrike}).
8278
8279 @item W d
8280 @kindex W d (Summary)
8281 @findex gnus-article-treat-dumbquotes
8282 @vindex gnus-article-dumbquotes-map
8283 @cindex Smartquotes
8284 @cindex M****s*** sm*rtq**t*s
8285 @cindex Latin 1
8286 Treat M****s*** sm*rtq**t*s according to
8287 @code{gnus-article-dumbquotes-map}
8288 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8289 whether a character is a sm*rtq**t* or not, so it should only be used
8290 interactively.
8291
8292 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8293 an attempt to provide more quoting characters.  If you see something
8294 like @code{\222} or @code{\264} where you're expecting some kind of
8295 apostrophe or quotation mark, then try this wash.
8296
8297 @item W k
8298 @kindex W k (Summary)
8299 @findex gnus-article-outlook-deuglify-article
8300 @cindex Outlook Express
8301 Deuglify broken Outlook (Express) articles and redisplay
8302 (@code{gnus-article-outlook-deuglify-article}).
8303
8304 @item W w
8305 @kindex W w (Summary)
8306 @findex gnus-article-fill-cited-article
8307 Do word wrap (@code{gnus-article-fill-cited-article}).
8308
8309 You can give the command a numerical prefix to specify the width to use
8310 when filling.
8311
8312 @item W Q
8313 @kindex W Q (Summary)
8314 @findex gnus-article-fill-long-lines
8315 Fill long lines (@code{gnus-article-fill-long-lines}).
8316
8317 @item W C
8318 @kindex W C (Summary)
8319 @findex gnus-article-capitalize-sentences
8320 Capitalize the first word in each sentence
8321 (@code{gnus-article-capitalize-sentences}).
8322
8323 @item W c
8324 @kindex W c (Summary)
8325 @findex gnus-article-remove-cr
8326 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8327 (this takes care of DOS line endings), and then translate any remaining
8328 CRs into LF (this takes care of Mac line endings)
8329 (@code{gnus-article-remove-cr}).
8330
8331 @item W 6
8332 @kindex W 6 (Summary)
8333 @findex gnus-article-de-base64-unreadable
8334 Treat base64 (@code{gnus-article-de-base64-unreadable}).
8335 Base64 is one common @sc{mime} encoding employed when sending non-ASCII
8336 (i. e., 8-bit) articles.  Note that this is usually done
8337 automatically by Gnus if the message in question has a
8338 @code{Content-Transfer-Encoding} header that says that this encoding has
8339 been done.
8340 If a prefix is given, a charset will be asked for.
8341
8342 @item W Z
8343 @kindex W Z (Summary)
8344 @findex gnus-article-decode-HZ
8345 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8346 common encoding employed when sending Chinese articles.  It typically
8347 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8348
8349 @item W u
8350 @kindex W u (Summary)
8351 @findex gnus-article-unsplit-urls
8352 Remove newlines from within URLs.  Some mailers insert newlines into
8353 outgoing email messages to keep lines short.  This reformatting can
8354 split long URLs onto multiple lines.  Repair those URLs by removing
8355 the newlines (@code{gnus-article-unsplit-urls}).
8356
8357 @item W h
8358 @kindex W h (Summary)
8359 @findex gnus-article-wash-html
8360 Treat @sc{html} (@code{gnus-article-wash-html}).  Note that this is
8361 usually done automatically by Gnus if the message in question has a
8362 @code{Content-Type} header that says that the message is @sc{html}.
8363
8364 If a prefix is given, a charset will be asked for.
8365
8366 @vindex gnus-article-wash-function
8367 The default is to use the function specified by
8368 @code{mm-inline-text-html-renderer} (@pxref{Customization, , , emacs-mime})
8369 to convert the @sc{html}, but this is controlled by the
8370 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8371 can use include:
8372
8373 @table @code
8374 @item w3
8375 Use Emacs/w3.
8376
8377 @item w3m
8378 Use emacs-w3m (see @uref{http://emacs-w3m.namazu.org/} for more
8379 information).
8380
8381 @item links
8382 Use Links (see @uref{http://artax.karlin.mff.cuni.cz/~mikulas/links/}).
8383
8384 @item lynx
8385 Use Lynx (see @uref{http://lynx.browser.org/}).
8386
8387 @item html2text
8388 Use html2text -- a simple @sc{html} converter included with Gnus.
8389
8390 @end table
8391
8392 @item W b
8393 @kindex W b (Summary)
8394 @findex gnus-article-add-buttons
8395 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8396 @xref{Article Buttons}.
8397
8398 @item W B
8399 @kindex W B (Summary)
8400 @findex gnus-article-add-buttons-to-head
8401 Add clickable buttons to the article headers
8402 (@code{gnus-article-add-buttons-to-head}).
8403
8404 @item W p
8405 @kindex W p (Summary)
8406 @findex gnus-article-verify-x-pgp-sig
8407 Verify a signed control message (@code{gnus-article-verify-x-pgp-sig}).
8408 Control messages such as @code{newgroup} and @code{checkgroups} are
8409 usually signed by the hierarchy maintainer.  You need to add the PGP
8410 public key of the maintainer to your keyring to verify the
8411 message.@footnote{PGP keys for many hierarchies are available at
8412 @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8413
8414 @item W s
8415 @kindex W s (Summary)
8416 @findex gnus-summary-force-verify-and-decrypt
8417 Verify a signed (PGP, @sc{pgp/mime} or @sc{s/mime}) message
8418 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8419
8420 @item W a
8421 @kindex W a (Summary)
8422 @findex gnus-article-strip-headers-in-body
8423 Strip headers like the @code{X-No-Archive} header from the beginning of
8424 article bodies (@code{gnus-article-strip-headers-in-body}).
8425
8426 @item W E l
8427 @kindex W E l (Summary)
8428 @findex gnus-article-strip-leading-blank-lines
8429 Remove all blank lines from the beginning of the article
8430 (@code{gnus-article-strip-leading-blank-lines}).
8431
8432 @item W E m
8433 @kindex W E m (Summary)
8434 @findex gnus-article-strip-multiple-blank-lines
8435 Replace all blank lines with empty lines and then all multiple empty
8436 lines with a single empty line.
8437 (@code{gnus-article-strip-multiple-blank-lines}).
8438
8439 @item W E t
8440 @kindex W E t (Summary)
8441 @findex gnus-article-remove-trailing-blank-lines
8442 Remove all blank lines at the end of the article
8443 (@code{gnus-article-remove-trailing-blank-lines}).
8444
8445 @item W E a
8446 @kindex W E a (Summary)
8447 @findex gnus-article-strip-blank-lines
8448 Do all the three commands above
8449 (@code{gnus-article-strip-blank-lines}).
8450
8451 @item W E A
8452 @kindex W E A (Summary)
8453 @findex gnus-article-strip-all-blank-lines
8454 Remove all blank lines
8455 (@code{gnus-article-strip-all-blank-lines}).
8456
8457 @item W E s
8458 @kindex W E s (Summary)
8459 @findex gnus-article-strip-leading-space
8460 Remove all white space from the beginning of all lines of the article
8461 body (@code{gnus-article-strip-leading-space}).
8462
8463 @item W E e
8464 @kindex W E e (Summary)
8465 @findex gnus-article-strip-trailing-space
8466 Remove all white space from the end of all lines of the article
8467 body (@code{gnus-article-strip-trailing-space}).
8468
8469 @end table
8470
8471 @xref{Customizing Articles}, for how to wash articles automatically.
8472
8473
8474 @node Article Header
8475 @subsection Article Header
8476
8477 These commands perform various transformations of article header.
8478
8479 @table @kbd
8480
8481 @item W G u
8482 @kindex W G u (Summary)
8483 @findex gnus-article-treat-unfold-headers
8484 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8485
8486 @item W G n
8487 @kindex W G n (Summary)
8488 @findex gnus-article-treat-fold-newsgroups
8489 Fold the @code{Newsgroups} and @code{Followup-To} headers
8490 (@code{gnus-article-treat-fold-newsgroups}).
8491
8492 @item W G f
8493 @kindex W G f (Summary)
8494 @findex gnus-article-treat-fold-headers
8495 Fold all the message headers
8496 (@code{gnus-article-treat-fold-headers}).
8497
8498 @item W E w
8499 @kindex W E w
8500 @findex gnus-article-remove-leading-whitespace
8501 Remove excessive whitespace from all headers
8502 (@code{gnus-article-remove-leading-whitespace}).
8503
8504 @end table
8505
8506
8507 @node Article Buttons
8508 @subsection Article Buttons
8509 @cindex buttons
8510
8511 People often include references to other stuff in articles, and it would
8512 be nice if Gnus could just fetch whatever it is that people talk about
8513 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8514 button on these references.
8515
8516 @vindex gnus-button-man-handler
8517 Gnus adds @dfn{buttons} to certain standard references by default:
8518 Well-formed URLs, mail addresses, Message-IDs, Info links and man pages.
8519 This is controlled by two variables, one that handles article bodies and
8520 one that handles article heads:
8521
8522 @table @code
8523
8524 @item gnus-button-alist
8525 @vindex gnus-button-alist
8526 This is an alist where each entry has this form:
8527
8528 @lisp
8529 (REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
8530 @end lisp
8531
8532 @table @var
8533
8534 @item regexp
8535 All text that match this regular expression (case insensitive) will be
8536 considered an external reference.  Here's a typical regexp that matches
8537 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8538 variable containing a regexp, useful variables to use include
8539 @code{gnus-button-url-regexp}.
8540
8541 @item button-par
8542 Gnus has to know which parts of the matches is to be highlighted.  This
8543 is a number that says what sub-expression of the regexp is to be
8544 highlighted.  If you want it all highlighted, you use 0 here.
8545
8546 @item use-p
8547 This form will be @code{eval}ed, and if the result is non-@code{nil},
8548 this is considered a match.  This is useful if you want extra sifting to
8549 avoid false matches.
8550
8551 @item function
8552 This function will be called when you click on this button.
8553
8554 @item data-par
8555 As with @var{button-par}, this is a sub-expression number, but this one
8556 says which part of the match is to be sent as data to @var{function}.
8557
8558 @end table
8559
8560 So the full entry for buttonizing URLs is then
8561
8562 @lisp
8563 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8564 @end lisp
8565
8566 @item gnus-header-button-alist
8567 @vindex gnus-header-button-alist
8568 This is just like the other alist, except that it is applied to the
8569 article head only, and that each entry has an additional element that is
8570 used to say what headers to apply the buttonize coding to:
8571
8572 @lisp
8573 (HEADER REGEXP BUTTON-PAR USE-P FUNCTION DATA-PAR)
8574 @end lisp
8575
8576 @var{header} is a regular expression.
8577
8578 @item gnus-button-url-regexp
8579 @vindex gnus-button-url-regexp
8580 A regular expression that matches embedded URLs.  It is used in the
8581 default values of the variables above.
8582
8583 @item gnus-article-button-face
8584 @vindex gnus-article-button-face
8585 Face used on buttons.
8586
8587 @item gnus-article-mouse-face
8588 @vindex gnus-article-mouse-face
8589 Face used when the mouse cursor is over a button.
8590
8591 @end table
8592
8593 @xref{Customizing Articles}, for how to buttonize articles automatically.
8594
8595
8596 @node Article Date
8597 @subsection Article Date
8598
8599 The date is most likely generated in some obscure timezone you've never
8600 heard of, so it's quite nice to be able to find out what the time was
8601 when the article was sent.
8602
8603 @table @kbd
8604
8605 @item W T u
8606 @kindex W T u (Summary)
8607 @findex gnus-article-date-ut
8608 Display the date in UT (aka. GMT, aka ZULU)
8609 (@code{gnus-article-date-ut}).
8610
8611 @item W T i
8612 @kindex W T i (Summary)
8613 @findex gnus-article-date-iso8601
8614 @cindex ISO 8601
8615 Display the date in international format, aka. ISO 8601
8616 (@code{gnus-article-date-iso8601}).
8617
8618 @item W T l
8619 @kindex W T l (Summary)
8620 @findex gnus-article-date-local
8621 Display the date in the local timezone (@code{gnus-article-date-local}).
8622
8623 @item W T p
8624 @kindex W T p (Summary)
8625 @findex gnus-article-date-english
8626 Display the date in a format that's easily pronounceable in English
8627 (@code{gnus-article-date-english}).
8628
8629 @item W T s
8630 @kindex W T s (Summary)
8631 @vindex gnus-article-time-format
8632 @findex gnus-article-date-user
8633 @findex format-time-string
8634 Display the date using a user-defined format
8635 (@code{gnus-article-date-user}).  The format is specified by the
8636 @code{gnus-article-time-format} variable, and is a string that's passed
8637 to @code{format-time-string}.  See the documentation of that variable
8638 for a list of possible format specs.
8639
8640 @item W T e
8641 @kindex W T e (Summary)
8642 @findex gnus-article-date-lapsed
8643 @findex gnus-start-date-timer
8644 @findex gnus-stop-date-timer
8645 Say how much time has elapsed between the article was posted and now
8646 (@code{gnus-article-date-lapsed}).  It looks something like:
8647
8648 @example
8649 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8650 @end example
8651
8652 The value of @code{gnus-article-date-lapsed-new-header} determines
8653 whether this header will just be added below the old Date one, or will
8654 replace it.
8655
8656 An advantage of using Gnus to read mail is that it converts simple bugs
8657 into wonderful absurdities.
8658
8659 If you want to have this line updated continually, you can put
8660
8661 @lisp
8662 (gnus-start-date-timer)
8663 @end lisp
8664
8665 in your @file{.gnus.el} file, or you can run it off of some hook.  If
8666 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8667 command.
8668
8669 @item W T o
8670 @kindex W T o (Summary)
8671 @findex gnus-article-date-original
8672 Display the original date (@code{gnus-article-date-original}).  This can
8673 be useful if you normally use some other conversion function and are
8674 worried that it might be doing something totally wrong.  Say, claiming
8675 that the article was posted in 1854.  Although something like that is
8676 @emph{totally} impossible.  Don't you trust me? *titter*
8677
8678 @end table
8679
8680 @xref{Customizing Articles}, for how to display the date in your
8681 preferred format automatically.
8682
8683
8684 @node Article Display
8685 @subsection Article Display
8686 @cindex picons
8687 @cindex x-face
8688 @cindex smileys
8689
8690 These commands add various frivolous display gimmicks to the article
8691 buffer in Emacs versions that support them.
8692
8693 @code{X-Face} headers are small black-and-white images supplied by the
8694 message headers (@pxref{X-Face}).
8695
8696 Picons, on the other hand, reside on your own system, and Gnus will
8697 try to match the headers to what you have (@pxref{Picons}).
8698
8699 Smileys are those little @samp{:-)} symbols that people like to litter
8700 their messages with (@pxref{Smileys}).
8701
8702 All these functions are toggles--if the elements already exist,
8703 they'll be removed.
8704
8705 @table @kbd
8706 @item W D x
8707 @kindex W D x (Summary)
8708 @findex gnus-article-display-x-face
8709 Display an @code{X-Face} in the @code{From} header.
8710 (@code{gnus-article-display-x-face}).
8711
8712 @item W D s
8713 @kindex W D s (Summary)
8714 @findex gnus-treat-smiley
8715 Display smileys (@code{gnus-treat-smiley}).
8716
8717 @item W D f
8718 @kindex W D f (Summary)
8719 @findex gnus-treat-from-picon
8720 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
8721
8722 @item W D m
8723 @kindex W D m (Summary)
8724 @findex gnus-treat-mail-picon
8725 Piconify all mail headers (i. e., @code{Cc}, @code{To})
8726 (@code{gnus-treat-mail-picon}).
8727
8728 @item W D n
8729 @kindex W D n (Summary)
8730 @findex gnus-treat-newsgroups-picon
8731 Piconify all news headers (i. e., @code{Newsgroups} and
8732 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
8733
8734 @item W D D
8735 @kindex W D D (Summary)
8736 @findex gnus-article-remove-images
8737 Remove all images from the article buffer
8738 (@code{gnus-article-remove-images}).
8739
8740 @end table
8741
8742
8743
8744 @node Article Signature
8745 @subsection Article Signature
8746 @cindex signatures
8747 @cindex article signature
8748
8749 @vindex gnus-signature-separator
8750 Each article is divided into two parts---the head and the body.  The
8751 body can be divided into a signature part and a text part.  The variable
8752 that says what is to be considered a signature is
8753 @code{gnus-signature-separator}.  This is normally the standard
8754 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
8755 non-standard signature separators, so this variable can also be a list
8756 of regular expressions to be tested, one by one.  (Searches are done
8757 from the end of the body towards the beginning.)  One likely value is:
8758
8759 @lisp
8760 (setq gnus-signature-separator
8761       '("^-- $"         ; The standard
8762         "^-- *$"        ; A common mangling
8763         "^-------*$"    ; Many people just use a looong
8764                         ; line of dashes.  Shame!
8765         "^ *--------*$" ; Double-shame!
8766         "^________*$"   ; Underscores are also popular
8767         "^========*$")) ; Pervert!
8768 @end lisp
8769
8770 The more permissive you are, the more likely it is that you'll get false
8771 positives.
8772
8773 @vindex gnus-signature-limit
8774 @code{gnus-signature-limit} provides a limit to what is considered a
8775 signature when displaying articles.
8776
8777 @enumerate
8778 @item
8779 If it is an integer, no signature may be longer (in characters) than
8780 that integer.
8781 @item
8782 If it is a floating point number, no signature may be longer (in lines)
8783 than that number.
8784 @item
8785 If it is a function, the function will be called without any parameters,
8786 and if it returns @code{nil}, there is no signature in the buffer.
8787 @item
8788 If it is a string, it will be used as a regexp.  If it matches, the text
8789 in question is not a signature.
8790 @end enumerate
8791
8792 This variable can also be a list where the elements may be of the types
8793 listed above.  Here's an example:
8794
8795 @lisp
8796 (setq gnus-signature-limit
8797       '(200.0 "^---*Forwarded article"))
8798 @end lisp
8799
8800 This means that if there are more than 200 lines after the signature
8801 separator, or the text after the signature separator is matched by
8802 the regular expression @samp{^---*Forwarded article}, then it isn't a
8803 signature after all.
8804
8805
8806 @node Article Miscellania
8807 @subsection Article Miscellania
8808
8809 @table @kbd
8810 @item A t
8811 @kindex A t (Summary)
8812 @findex gnus-article-babel
8813 Translate the article from one language to another
8814 (@code{gnus-article-babel}).
8815
8816 @end table
8817
8818
8819 @node MIME Commands
8820 @section MIME Commands
8821 @cindex MIME decoding
8822 @cindex attachments
8823 @cindex viewing attachments
8824
8825 The following commands all understand the numerical prefix.  For
8826 instance, @kbd{3 b} means ``view the third @sc{mime} part''.
8827
8828 @table @kbd
8829 @item b
8830 @itemx K v
8831 @kindex b (Summary)
8832 @kindex K v (Summary)
8833 View the @sc{mime} part.
8834
8835 @item K o
8836 @kindex K o (Summary)
8837 Save the @sc{mime} part.
8838
8839 @item K c
8840 @kindex K c (Summary)
8841 Copy the @sc{mime} part.
8842
8843 @item K e
8844 @kindex K e (Summary)
8845 View the @sc{mime} part externally.
8846
8847 @item K i
8848 @kindex K i (Summary)
8849 View the @sc{mime} part internally.
8850
8851 @item K |
8852 @kindex K | (Summary)
8853 Pipe the @sc{mime} part to an external command.
8854 @end table
8855
8856 The rest of these @sc{mime} commands do not use the numerical prefix in
8857 the same manner:
8858
8859 @table @kbd
8860 @item K b
8861 @kindex K b (Summary)
8862 Make all the @sc{mime} parts have buttons in front of them.  This is
8863 mostly useful if you wish to save (or perform other actions) on inlined
8864 parts.
8865
8866 @item K m
8867 @kindex K m (Summary)
8868 @findex gnus-summary-repair-multipart
8869 Some multipart messages are transmitted with missing or faulty headers.
8870 This command will attempt to ``repair'' these messages so that they can
8871 be viewed in a more pleasant manner
8872 (@code{gnus-summary-repair-multipart}).
8873
8874 @item X m
8875 @kindex X m (Summary)
8876 @findex gnus-summary-save-parts
8877 Save all parts matching a @sc{mime} type to a directory
8878 (@code{gnus-summary-save-parts}).  Understands the process/prefix
8879 convention (@pxref{Process/Prefix}).
8880
8881 @item M-t
8882 @kindex M-t (Summary)
8883 @findex gnus-summary-toggle-display-buttonized
8884 Toggle the buttonized display of the article buffer
8885 (@code{gnus-summary-toggle-display-buttonized}).
8886
8887 @item W M w
8888 @kindex W M w (Summary)
8889 @findex gnus-article-decode-mime-words
8890 Decode RFC 2047-encoded words in the article headers
8891 (@code{gnus-article-decode-mime-words}).
8892
8893 @item W M c
8894 @kindex W M c (Summary)
8895 @findex gnus-article-decode-charset
8896 Decode encoded article bodies as well as charsets
8897 (@code{gnus-article-decode-charset}).
8898
8899 This command looks in the @code{Content-Type} header to determine the
8900 charset.  If there is no such header in the article, you can give it a
8901 prefix, which will prompt for the charset to decode as.  In regional
8902 groups where people post using some common encoding (but do not
8903 include @sc{mime} headers), you can set the @code{charset} group/topic
8904 parameter to the required charset (@pxref{Group Parameters}).
8905
8906 @item W M v
8907 @kindex W M v (Summary)
8908 @findex gnus-mime-view-all-parts
8909 View all the @sc{mime} parts in the current article
8910 (@code{gnus-mime-view-all-parts}).
8911
8912 @end table
8913
8914 Relevant variables:
8915
8916 @table @code
8917 @item gnus-ignored-mime-types
8918 @vindex gnus-ignored-mime-types
8919 This is a list of regexps.  @sc{mime} types that match a regexp from
8920 this list will be completely ignored by Gnus.  The default value is
8921 @code{nil}.
8922
8923 To have all Vcards be ignored, you'd say something like this:
8924
8925 @lisp
8926 (setq gnus-ignored-mime-types
8927       '("text/x-vcard"))
8928 @end lisp
8929
8930 @item gnus-unbuttonized-mime-types
8931 @vindex gnus-unbuttonized-mime-types
8932 This is a list of regexps.  @sc{mime} types that match a regexp from
8933 this list won't have @sc{mime} buttons inserted unless they aren't
8934 displayed or this variable is overridden by
8935 @code{gnus-buttonized-mime-types}.  The default value is
8936 @code{(".*/.*")}.
8937
8938 @item gnus-buttonized-mime-types
8939 @vindex gnus-buttonized-mime-types
8940 This is a list of regexps.  @sc{mime} types that match a regexp from
8941 this list will have @sc{mime} buttons inserted unless they aren't
8942 displayed.  This variable overrides
8943 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
8944
8945 To see e.g. security buttons but no other buttons, you could set this
8946 variable to @code{("multipart/signed")} and leave
8947 @code{gnus-unbuttonized-mime-types} at the default value.
8948
8949 @item gnus-inhibit-mime-unbuttonizing
8950 @vindex gnus-inhibit-mime-unbuttonizing
8951 If this is non-nil, then all @sc{mime} parts get buttons.  The default
8952 value is @code{nil}.
8953
8954 @item gnus-article-mime-part-function
8955 @vindex gnus-article-mime-part-function
8956 For each @sc{mime} part, this function will be called with the @sc{mime}
8957 handle as the parameter.  The function is meant to be used to allow
8958 users to gather information from the article (e. g., add Vcard info to
8959 the bbdb database) or to do actions based on parts (e. g., automatically
8960 save all jpegs into some directory).
8961
8962 Here's an example function the does the latter:
8963
8964 @lisp
8965 (defun my-save-all-jpeg-parts (handle)
8966   (when (equal (car (mm-handle-type handle)) "image/jpeg")
8967     (with-temp-buffer
8968       (insert (mm-get-part handle))
8969       (write-region (point-min) (point-max)
8970                     (read-file-name "Save jpeg to: ")))))
8971 (setq gnus-article-mime-part-function
8972       'my-save-all-jpeg-parts)
8973 @end lisp
8974
8975 @vindex gnus-mime-multipart-functions
8976 @item gnus-mime-multipart-functions
8977 Alist of @sc{mime} multipart types and functions to handle them.
8978
8979 @vindex mm-file-name-rewrite-functions
8980 @item mm-file-name-rewrite-functions
8981 List of functions used for rewriting file names of @sc{mime} parts.
8982 Each function takes a file name as input and returns a file name.
8983
8984 Ready-made functions include@*
8985 @code{mm-file-name-delete-whitespace},
8986 @code{mm-file-name-trim-whitespace},
8987 @code{mm-file-name-collapse-whitespace}, and
8988 @code{mm-file-name-replace-whitespace}.  The later uses the value of
8989 the variable @code{mm-file-name-replace-whitespace} to replace each
8990 whitespace character in a file name with that string; default value
8991 is @code{"_"} (a single underscore).
8992 @findex mm-file-name-delete-whitespace
8993 @findex mm-file-name-trim-whitespace
8994 @findex mm-file-name-collapse-whitespace
8995 @findex mm-file-name-replace-whitespace
8996 @vindex mm-file-name-replace-whitespace
8997
8998 The standard functions @code{capitalize}, @code{downcase},
8999 @code{upcase}, and @code{upcase-initials} may be useful, too.
9000
9001 Everybody knows that whitespace characters in file names are evil,
9002 except those who don't know.  If you receive lots of attachments from
9003 such unenlightened users, you can make live easier by adding
9004
9005 @lisp
9006 (setq mm-file-name-rewrite-functions
9007       '(mm-file-name-trim-whitespace
9008         mm-file-name-collapse-whitespace
9009         mm-file-name-replace-whitespace))
9010 @end lisp
9011
9012 @noindent
9013 to your @file{.gnus} file.
9014
9015 @end table
9016
9017
9018 @node Charsets
9019 @section Charsets
9020 @cindex charsets
9021
9022 People use different charsets, and we have @sc{mime} to let us know what
9023 charsets they use.  Or rather, we wish we had.  Many people use
9024 newsreaders and mailers that do not understand or use @sc{mime}, and
9025 just send out messages without saying what character sets they use.  To
9026 help a bit with this, some local news hierarchies have policies that say
9027 what character set is the default.  For instance, the @samp{fj}
9028 hierarchy uses @code{iso-2022-jp-2}.
9029
9030 @vindex gnus-group-charset-alist
9031 This knowledge is encoded in the @code{gnus-group-charset-alist}
9032 variable, which is an alist of regexps (use the first item to match full
9033 group names) and default charsets to be used when reading these groups.
9034
9035 In addition, some people do use soi-disant @sc{mime}-aware agents that
9036 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9037 even if they really are in @code{koi-8}.  To help here, the
9038 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9039 charsets that are listed here will be ignored.  The variable can be
9040 set on a group-by-group basis using the group parameters (@pxref{Group
9041 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9042 which includes values some agents insist on having in there.
9043
9044 @vindex gnus-group-posting-charset-alist
9045 When posting, @code{gnus-group-posting-charset-alist} is used to
9046 determine which charsets should not be encoded using the @sc{mime}
9047 encodings.  For instance, some hierarchies discourage using
9048 quoted-printable header encoding.
9049
9050 This variable is an alist of regexps and permitted unencoded charsets
9051 for posting.  Each element of the alist has the form @code{(}@var{test
9052 header body-list}@code{)}, where:
9053
9054 @table @var
9055 @item test
9056 is either a regular expression matching the newsgroup header or a
9057 variable to query,
9058 @item header
9059 is the charset which may be left unencoded in the header (@code{nil}
9060 means encode all charsets),
9061 @item body-list
9062 is a list of charsets which may be encoded using 8bit content-transfer
9063 encoding in the body, or one of the special values @code{nil} (always
9064 encode using quoted-printable) or @code{t} (always use 8bit).
9065 @end table
9066
9067 @cindex Russian
9068 @cindex koi8-r
9069 @cindex koi8-u
9070 @cindex iso-8859-5
9071 @cindex coding system aliases
9072 @cindex preferred charset
9073
9074 Other charset tricks that may be useful, although not Gnus-specific:
9075
9076 If there are several @sc{mime} charsets that encode the same Emacs
9077 charset, you can choose what charset to use by saying the following:
9078
9079 @lisp
9080 (put-charset-property 'cyrillic-iso8859-5
9081                       'preferred-coding-system 'koi8-r)
9082 @end lisp
9083
9084 This means that Russian will be encoded using @code{koi8-r} instead of
9085 the default @code{iso-8859-5} @sc{mime} charset.
9086
9087 If you want to read messages in @code{koi8-u}, you can cheat and say
9088
9089 @lisp
9090 (define-coding-system-alias 'koi8-u 'koi8-r)
9091 @end lisp
9092
9093 This will almost do the right thing.
9094
9095 And finally, to read charsets like @code{windows-1251}, you can say
9096 something like
9097
9098 @lisp
9099 (codepage-setup 1251)
9100 (define-coding-system-alias 'windows-1251 'cp1251)
9101 @end lisp
9102
9103
9104 @node Article Commands
9105 @section Article Commands
9106
9107 @table @kbd
9108
9109 @item A P
9110 @cindex PostScript
9111 @cindex printing
9112 @kindex A P (Summary)
9113 @vindex gnus-ps-print-hook
9114 @findex gnus-summary-print-article
9115 Generate and print a PostScript image of the article buffer
9116 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9117 be run just before printing the buffer.  An alternative way to print
9118 article is to use Muttprint (@pxref{Saving Articles}).
9119
9120 @end table
9121
9122
9123 @node Summary Sorting
9124 @section Summary Sorting
9125 @cindex summary sorting
9126
9127 You can have the summary buffer sorted in various ways, even though I
9128 can't really see why you'd want that.
9129
9130 @table @kbd
9131
9132 @item C-c C-s C-n
9133 @kindex C-c C-s C-n (Summary)
9134 @findex gnus-summary-sort-by-number
9135 Sort by article number (@code{gnus-summary-sort-by-number}).
9136
9137 @item C-c C-s C-a
9138 @kindex C-c C-s C-a (Summary)
9139 @findex gnus-summary-sort-by-author
9140 Sort by author (@code{gnus-summary-sort-by-author}).
9141
9142 @item C-c C-s C-s
9143 @kindex C-c C-s C-s (Summary)
9144 @findex gnus-summary-sort-by-subject
9145 Sort by subject (@code{gnus-summary-sort-by-subject}).
9146
9147 @item C-c C-s C-d
9148 @kindex C-c C-s C-d (Summary)
9149 @findex gnus-summary-sort-by-date
9150 Sort by date (@code{gnus-summary-sort-by-date}).
9151
9152 @item C-c C-s C-l
9153 @kindex C-c C-s C-l (Summary)
9154 @findex gnus-summary-sort-by-lines
9155 Sort by lines (@code{gnus-summary-sort-by-lines}).
9156
9157 @item C-c C-s C-c
9158 @kindex C-c C-s C-c (Summary)
9159 @findex gnus-summary-sort-by-chars
9160 Sort by article length (@code{gnus-summary-sort-by-chars}).
9161
9162 @item C-c C-s C-i
9163 @kindex C-c C-s C-i (Summary)
9164 @findex gnus-summary-sort-by-score
9165 Sort by score (@code{gnus-summary-sort-by-score}).
9166
9167 @item C-c C-s C-r
9168 @kindex C-c C-s C-r (Summary)
9169 @findex gnus-summary-sort-by-random
9170 Randomize (@code{gnus-summary-sort-by-random}).
9171
9172 @item C-c C-s C-o
9173 @kindex C-c C-s C-o (Summary)
9174 @findex gnus-summary-sort-by-original
9175 Sort using the default sorting method
9176 (@code{gnus-summary-sort-by-original}).
9177 @end table
9178
9179 These functions will work both when you use threading and when you don't
9180 use threading.  In the latter case, all summary lines will be sorted,
9181 line by line.  In the former case, sorting will be done on a
9182 root-by-root basis, which might not be what you were looking for.  To
9183 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9184 Commands}).
9185
9186
9187 @node Finding the Parent
9188 @section Finding the Parent
9189 @cindex parent articles
9190 @cindex referring articles
9191
9192 @table @kbd
9193 @item ^
9194 @kindex ^ (Summary)
9195 @findex gnus-summary-refer-parent-article
9196 If you'd like to read the parent of the current article, and it is not
9197 displayed in the summary buffer, you might still be able to.  That is,
9198 if the current group is fetched by @sc{nntp}, the parent hasn't expired
9199 and the @code{References} in the current article are not mangled, you
9200 can just press @kbd{^} or @kbd{A r}
9201 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9202 you'll get the parent.  If the parent is already displayed in the
9203 summary buffer, point will just move to this article.
9204
9205 If given a positive numerical prefix, fetch that many articles back into
9206 the ancestry.  If given a negative numerical prefix, fetch just that
9207 ancestor.  So if you say @kbd{3 ^}, gnus will fetch the parent, the
9208 grandparent and the grandgrandparent of the current article.  If you say
9209 @kbd{-3 ^}, gnus will only fetch the grandgrandparent of the current
9210 article.
9211
9212 @item A R (Summary)
9213 @findex gnus-summary-refer-references
9214 @kindex A R (Summary)
9215 Fetch all articles mentioned in the @code{References} header of the
9216 article (@code{gnus-summary-refer-references}).
9217
9218 @item A T (Summary)
9219 @findex gnus-summary-refer-thread
9220 @kindex A T (Summary)
9221 Display the full thread where the current article appears
9222 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9223 headers in the current group to work, so it usually takes a while.  If
9224 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9225 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9226 visible effects normally, but it'll make this command work a whole lot
9227 faster.  Of course, it'll make group entry somewhat slow.
9228
9229 @vindex gnus-refer-thread-limit
9230 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9231 articles before the first displayed in the current group) headers to
9232 fetch when doing this command.  The default is 200.  If @code{t}, all
9233 the available headers will be fetched.  This variable can be overridden
9234 by giving the @kbd{A T} command a numerical prefix.
9235
9236 @item M-^ (Summary)
9237 @findex gnus-summary-refer-article
9238 @kindex M-^ (Summary)
9239 @cindex Message-ID
9240 @cindex fetching by Message-ID
9241 You can also ask the @sc{nntp} server for an arbitrary article, no
9242 matter what group it belongs to.  @kbd{M-^}
9243 (@code{gnus-summary-refer-article}) will ask you for a
9244 @code{Message-ID}, which is one of those long, hard-to-read thingies
9245 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9246 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9247 @end table
9248
9249 The current select method will be used when fetching by
9250 @code{Message-ID} from non-news select method, but you can override this
9251 by giving this command a prefix.
9252
9253 @vindex gnus-refer-article-method
9254 If the group you are reading is located on a back end that does not
9255 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9256 you can set @code{gnus-refer-article-method} to an @sc{nntp} method.  It
9257 would, perhaps, be best if the @sc{nntp} server you consult is the one
9258 updating the spool you are reading from, but that's not really
9259 necessary.
9260
9261 It can also be a list of select methods, as well as the special symbol
9262 @code{current}, which means to use the current select method.  If it
9263 is a list, Gnus will try all the methods in the list until it finds a
9264 match.
9265
9266 Here's an example setting that will first try the current method, and
9267 then ask Google if that fails:
9268
9269 @lisp
9270 (setq gnus-refer-article-method
9271       '(current
9272         (nnweb "google" (nnweb-type google))))
9273 @end lisp
9274
9275 Most of the mail back ends support fetching by @code{Message-ID}, but
9276 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9277 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9278 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9279 only able to locate articles that have been posted to the current group.
9280 (Anything else would be too time consuming.)  @code{nnmh} does not
9281 support this at all.
9282
9283
9284 @node Alternative Approaches
9285 @section Alternative Approaches
9286
9287 Different people like to read news using different methods.  This being
9288 gnus, we offer a small selection of minor modes for the summary buffers.
9289
9290 @menu
9291 * Pick and Read::               First mark articles and then read them.
9292 * Binary Groups::               Auto-decode all articles.
9293 @end menu
9294
9295
9296 @node Pick and Read
9297 @subsection Pick and Read
9298 @cindex pick and read
9299
9300 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9301 a two-phased reading interface.  The user first marks in a summary
9302 buffer the articles she wants to read.  Then she starts reading the
9303 articles with just an article buffer displayed.
9304
9305 @findex gnus-pick-mode
9306 @kindex M-x gnus-pick-mode
9307 Gnus provides a summary buffer minor mode that allows
9308 this---@code{gnus-pick-mode}.  This basically means that a few process
9309 mark commands become one-keystroke commands to allow easy marking, and
9310 it provides one additional command for switching to the summary buffer.
9311
9312 Here are the available keystrokes when using pick mode:
9313
9314 @table @kbd
9315 @item .
9316 @kindex . (Pick)
9317 @findex gnus-pick-article-or-thread
9318 Pick the article or thread on the current line
9319 (@code{gnus-pick-article-or-thread}).  If the variable
9320 @code{gnus-thread-hide-subtree} is true, then this key selects the
9321 entire thread when used at the first article of the thread.  Otherwise,
9322 it selects just the article.  If given a numerical prefix, go to that
9323 thread or article and pick it.  (The line number is normally displayed
9324 at the beginning of the summary pick lines.)
9325
9326 @item SPACE
9327 @kindex SPACE (Pick)
9328 @findex gnus-pick-next-page
9329 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9330 at the end of the buffer, start reading the picked articles.
9331
9332 @item u
9333 @kindex u (Pick)
9334 @findex gnus-pick-unmark-article-or-thread.
9335 Unpick the thread or article
9336 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9337 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9338 thread if used at the first article of the thread.  Otherwise it unpicks
9339 just the article.  You can give this key a numerical prefix to unpick
9340 the thread or article at that line.
9341
9342 @item RET
9343 @kindex RET (Pick)
9344 @findex gnus-pick-start-reading
9345 @vindex gnus-pick-display-summary
9346 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9347 given a prefix, mark all unpicked articles as read first.  If
9348 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9349 will still be visible when you are reading.
9350
9351 @end table
9352
9353 All the normal summary mode commands are still available in the
9354 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9355 which is mapped to the same function
9356 @code{gnus-summary-tick-article-forward}.
9357
9358 If this sounds like a good idea to you, you could say:
9359
9360 @lisp
9361 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9362 @end lisp
9363
9364 @vindex gnus-pick-mode-hook
9365 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9366
9367 @vindex gnus-mark-unpicked-articles-as-read
9368 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9369 all unpicked articles as read.  The default is @code{nil}.
9370
9371 @vindex gnus-summary-pick-line-format
9372 The summary line format in pick mode is slightly different from the
9373 standard format.  At the beginning of each line the line number is
9374 displayed.  The pick mode line format is controlled by the
9375 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9376 Variables}).  It accepts the same format specs that
9377 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9378
9379
9380 @node Binary Groups
9381 @subsection Binary Groups
9382 @cindex binary groups
9383
9384 @findex gnus-binary-mode
9385 @kindex M-x gnus-binary-mode
9386 If you spend much time in binary groups, you may grow tired of hitting
9387 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9388 is a minor mode for summary buffers that makes all ordinary Gnus article
9389 selection functions uudecode series of articles and display the result
9390 instead of just displaying the articles the normal way.
9391
9392 @kindex g (Binary)
9393 @findex gnus-binary-show-article
9394 The only way, in fact, to see the actual articles is the @kbd{g}
9395 command, when you have turned on this mode
9396 (@code{gnus-binary-show-article}).
9397
9398 @vindex gnus-binary-mode-hook
9399 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9400
9401
9402 @node Tree Display
9403 @section Tree Display
9404 @cindex trees
9405
9406 @vindex gnus-use-trees
9407 If you don't like the normal gnus summary display, you might try setting
9408 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9409 additional @dfn{tree buffer}.  You can execute all summary mode commands
9410 in the tree buffer.
9411
9412 There are a few variables to customize the tree display, of course:
9413
9414 @table @code
9415 @item gnus-tree-mode-hook
9416 @vindex gnus-tree-mode-hook
9417 A hook called in all tree mode buffers.
9418
9419 @item gnus-tree-mode-line-format
9420 @vindex gnus-tree-mode-line-format
9421 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9422 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9423 of valid specs, @pxref{Summary Buffer Mode Line}.
9424
9425 @item gnus-selected-tree-face
9426 @vindex gnus-selected-tree-face
9427 Face used for highlighting the selected article in the tree buffer.  The
9428 default is @code{modeline}.
9429
9430 @item gnus-tree-line-format
9431 @vindex gnus-tree-line-format
9432 A format string for the tree nodes.  The name is a bit of a misnomer,
9433 though---it doesn't define a line, but just the node.  The default value
9434 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9435 the name of the poster.  It is vital that all nodes are of the same
9436 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9437
9438 Valid specs are:
9439
9440 @table @samp
9441 @item n
9442 The name of the poster.
9443 @item f
9444 The @code{From} header.
9445 @item N
9446 The number of the article.
9447 @item [
9448 The opening bracket.
9449 @item ]
9450 The closing bracket.
9451 @item s
9452 The subject.
9453 @end table
9454
9455 @xref{Formatting Variables}.
9456
9457 Variables related to the display are:
9458
9459 @table @code
9460 @item gnus-tree-brackets
9461 @vindex gnus-tree-brackets
9462 This is used for differentiating between ``real'' articles and
9463 ``sparse'' articles.  The format is @code{((@var{real-open} . @var{real-close})
9464 (@var{sparse-open} . @var{sparse-close}) (@var{dummy-open} . @var{dummy-close}))}, and the
9465 default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9466
9467 @item gnus-tree-parent-child-edges
9468 @vindex gnus-tree-parent-child-edges
9469 This is a list that contains the characters used for connecting parent
9470 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9471
9472 @end table
9473
9474 @item gnus-tree-minimize-window
9475 @vindex gnus-tree-minimize-window
9476 If this variable is non-@code{nil}, gnus will try to keep the tree
9477 buffer as small as possible to allow more room for the other gnus
9478 windows.  If this variable is a number, the tree buffer will never be
9479 higher than that number.  The default is @code{t}.  Note that if you
9480 have several windows displayed side-by-side in a frame and the tree
9481 buffer is one of these, minimizing the tree window will also resize all
9482 other windows displayed next to it.
9483
9484 You may also wish to add the following hook to keep the window minimized
9485 at all times:
9486
9487 @lisp
9488 (add-hook 'gnus-configure-windows-hook
9489           'gnus-tree-perhaps-minimize)
9490 @end lisp
9491
9492 @item gnus-generate-tree-function
9493 @vindex gnus-generate-tree-function
9494 @findex gnus-generate-horizontal-tree
9495 @findex gnus-generate-vertical-tree
9496 The function that actually generates the thread tree.  Two predefined
9497 functions are available: @code{gnus-generate-horizontal-tree} and
9498 @code{gnus-generate-vertical-tree} (which is the default).
9499
9500 @end table
9501
9502 Here's an example from a horizontal tree buffer:
9503
9504 @example
9505 @{***@}-(***)-[odd]-[Gun]
9506      |      \[Jan]
9507      |      \[odd]-[Eri]
9508      |      \(***)-[Eri]
9509      |            \[odd]-[Paa]
9510      \[Bjo]
9511      \[Gun]
9512      \[Gun]-[Jor]
9513 @end example
9514
9515 Here's the same thread displayed in a vertical tree buffer:
9516
9517 @example
9518 @{***@}
9519   |--------------------------\-----\-----\
9520 (***)                         [Bjo] [Gun] [Gun]
9521   |--\-----\-----\                          |
9522 [odd] [Jan] [odd] (***)                   [Jor]
9523   |           |     |--\
9524 [Gun]       [Eri] [Eri] [odd]
9525                           |
9526                         [Paa]
9527 @end example
9528
9529 If you're using horizontal trees, it might be nice to display the trees
9530 side-by-side with the summary buffer.  You could add something like the
9531 following to your @file{.gnus.el} file:
9532
9533 @lisp
9534 (setq gnus-use-trees t
9535       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9536       gnus-tree-minimize-window nil)
9537 (gnus-add-configuration
9538  '(article
9539    (vertical 1.0
9540              (horizontal 0.25
9541                          (summary 0.75 point)
9542                          (tree 1.0))
9543              (article 1.0))))
9544 @end lisp
9545
9546 @xref{Window Layout}.
9547
9548
9549 @node Mail Group Commands
9550 @section Mail Group Commands
9551 @cindex mail group commands
9552
9553 Some commands only make sense in mail groups.  If these commands are
9554 invalid in the current group, they will raise a hell and let you know.
9555
9556 All these commands (except the expiry and edit commands) use the
9557 process/prefix convention (@pxref{Process/Prefix}).
9558
9559 @table @kbd
9560
9561 @item B e
9562 @kindex B e (Summary)
9563 @findex gnus-summary-expire-articles
9564 Run all expirable articles in the current group through the expiry
9565 process (@code{gnus-summary-expire-articles}).  That is, delete all
9566 expirable articles in the group that have been around for a while.
9567 (@pxref{Expiring Mail}).
9568
9569 @item B C-M-e
9570 @kindex B C-M-e (Summary)
9571 @findex gnus-summary-expire-articles-now
9572 Delete all the expirable articles in the group
9573 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9574 articles eligible for expiry in the current group will
9575 disappear forever into that big @file{/dev/null} in the sky.
9576
9577 @item B DEL
9578 @kindex B DEL (Summary)
9579 @findex gnus-summary-delete-article
9580 @c @icon{gnus-summary-mail-delete}
9581 Delete the mail article.  This is ``delete'' as in ``delete it from your
9582 disk forever and ever, never to return again.'' Use with caution.
9583 (@code{gnus-summary-delete-article}).
9584
9585 @item B m
9586 @kindex B m (Summary)
9587 @cindex move mail
9588 @findex gnus-summary-move-article
9589 @vindex gnus-preserve-marks
9590 Move the article from one mail group to another
9591 (@code{gnus-summary-move-article}).  Marks will be preserved if
9592 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9593
9594 @item B c
9595 @kindex B c (Summary)
9596 @cindex copy mail
9597 @findex gnus-summary-copy-article
9598 @c @icon{gnus-summary-mail-copy}
9599 Copy the article from one group (mail group or not) to a mail group
9600 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9601 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9602
9603 @item B B
9604 @kindex B B (Summary)
9605 @cindex crosspost mail
9606 @findex gnus-summary-crosspost-article
9607 Crosspost the current article to some other group
9608 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9609 the article in the other group, and the Xref headers of the article will
9610 be properly updated.
9611
9612 @item B i
9613 @kindex B i (Summary)
9614 @findex gnus-summary-import-article
9615 Import an arbitrary file into the current mail newsgroup
9616 (@code{gnus-summary-import-article}).  You will be prompted for a file
9617 name, a @code{From} header and a @code{Subject} header.
9618
9619 @item B I
9620 @kindex B I (Summary)
9621 @findex gnus-summary-create-article
9622 Create an empty article in the current mail newsgroups
9623 (@code{gnus-summary-create-article}).  You will be prompted for a
9624 @code{From} header and a @code{Subject} header.
9625
9626 @item B r
9627 @kindex B r (Summary)
9628 @findex gnus-summary-respool-article
9629 Respool the mail article (@code{gnus-summary-respool-article}).
9630 @code{gnus-summary-respool-default-method} will be used as the default
9631 select method when respooling.  This variable is @code{nil} by default,
9632 which means that the current group select method will be used instead.
9633 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9634 (which is the default).
9635
9636 @item B w
9637 @itemx e
9638 @kindex B w (Summary)
9639 @kindex e (Summary)
9640 @findex gnus-summary-edit-article
9641 @kindex C-c C-c (Article)
9642 @findex gnus-summary-edit-article-done
9643 Edit the current article (@code{gnus-summary-edit-article}).  To finish
9644 editing and make the changes permanent, type @kbd{C-c C-c}
9645 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
9646 @kbd{C-c C-c} command, gnus won't re-highlight the article.
9647
9648 @item B q
9649 @kindex B q (Summary)
9650 @findex gnus-summary-respool-query
9651 If you want to re-spool an article, you might be curious as to what group
9652 the article will end up in before you do the re-spooling.  This command
9653 will tell you (@code{gnus-summary-respool-query}).
9654
9655 @item B t
9656 @kindex B t (Summary)
9657 @findex gnus-summary-respool-trace
9658 Similarly, this command will display all fancy splitting patterns used
9659 when repooling, if any (@code{gnus-summary-respool-trace}).
9660
9661 @item B p
9662 @kindex B p (Summary)
9663 @findex gnus-summary-article-posted-p
9664 Some people have a tendency to send you "courtesy" copies when they
9665 follow up to articles you have posted.  These usually have a
9666 @code{Newsgroups} header in them, but not always.  This command
9667 (@code{gnus-summary-article-posted-p}) will try to fetch the current
9668 article from your news server (or rather, from
9669 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
9670 report back whether it found the article or not.  Even if it says that
9671 it didn't find the article, it may have been posted anyway---mail
9672 propagation is much faster than news propagation, and the news copy may
9673 just not have arrived yet.
9674
9675 @item K E
9676 @kindex K E (Summary)
9677 @findex gnus-article-encrypt-body
9678 @vindex gnus-article-encrypt-protocol
9679 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
9680 The body is encrypted with the encryption protocol specified by the
9681 variable @code{gnus-article-encrypt-protocol}.
9682
9683 @end table
9684
9685 @vindex gnus-move-split-methods
9686 @cindex moving articles
9687 If you move (or copy) articles regularly, you might wish to have gnus
9688 suggest where to put the articles.  @code{gnus-move-split-methods} is a
9689 variable that uses the same syntax as @code{gnus-split-methods}
9690 (@pxref{Saving Articles}).  You may customize that variable to create
9691 suggestions you find reasonable.  (Note that
9692 @code{gnus-move-split-methods} uses group names where
9693 @code{gnus-split-methods} uses file names.)
9694
9695 @lisp
9696 (setq gnus-move-split-methods
9697       '(("^From:.*Lars Magne" "nnml:junk")
9698         ("^Subject:.*gnus" "nnfolder:important")
9699         (".*" "nnml:misc")))
9700 @end lisp
9701
9702
9703 @node Various Summary Stuff
9704 @section Various Summary Stuff
9705
9706 @menu
9707 * Summary Group Information::   Information oriented commands.
9708 * Searching for Articles::      Multiple article commands.
9709 * Summary Generation Commands::  
9710 * Really Various Summary Commands::  Those pesky non-conformant commands.
9711 @end menu
9712
9713 @table @code
9714 @vindex gnus-summary-mode-hook
9715 @item gnus-summary-mode-hook
9716 This hook is called when creating a summary mode buffer.
9717
9718 @vindex gnus-summary-generate-hook
9719 @item gnus-summary-generate-hook
9720 This is called as the last thing before doing the threading and the
9721 generation of the summary buffer.  It's quite convenient for customizing
9722 the threading variables based on what data the newsgroup has.  This hook
9723 is called from the summary buffer after most summary buffer variables
9724 have been set.
9725
9726 @vindex gnus-summary-prepare-hook
9727 @item gnus-summary-prepare-hook
9728 It is called after the summary buffer has been generated.  You might use
9729 it to, for instance, highlight lines or modify the look of the buffer in
9730 some other ungodly manner.  I don't care.
9731
9732 @vindex gnus-summary-prepared-hook
9733 @item gnus-summary-prepared-hook
9734 A hook called as the very last thing after the summary buffer has been
9735 generated.
9736
9737 @vindex gnus-summary-ignore-duplicates
9738 @item gnus-summary-ignore-duplicates
9739 When gnus discovers two articles that have the same @code{Message-ID},
9740 it has to do something drastic.  No articles are allowed to have the
9741 same @code{Message-ID}, but this may happen when reading mail from some
9742 sources.  Gnus allows you to customize what happens with this variable.
9743 If it is @code{nil} (which is the default), gnus will rename the
9744 @code{Message-ID} (for display purposes only) and display the article as
9745 any other article.  If this variable is @code{t}, it won't display the
9746 article---it'll be as if it never existed.
9747
9748 @vindex gnus-alter-articles-to-read-function
9749 @item gnus-alter-articles-to-read-function
9750 This function, which takes two parameters (the group name and the list
9751 of articles to be selected), is called to allow the user to alter the
9752 list of articles to be selected.
9753
9754 For instance, the following function adds the list of cached articles to
9755 the list in one particular group:
9756
9757 @lisp
9758 (defun my-add-cached-articles (group articles)
9759   (if (string= group "some.group")
9760       (append gnus-newsgroup-cached articles)
9761     articles))
9762 @end lisp
9763
9764 @vindex gnus-newsgroup-variables
9765 @item gnus-newsgroup-variables
9766 A list of newsgroup (summary buffer) local variables, or cons of
9767 variables and their default values (when the default values are not
9768 nil), that should be made global while the summary buffer is active.
9769 These variables can be used to set variables in the group parameters
9770 while still allowing them to affect operations done in other
9771 buffers. For example:
9772
9773 @lisp
9774 (setq gnus-newsgroup-variables
9775      '(message-use-followup-to
9776        (gnus-visible-headers .
9777          "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
9778 @end lisp
9779
9780 @end table
9781
9782
9783 @node Summary Group Information
9784 @subsection Summary Group Information
9785
9786 @table @kbd
9787
9788 @item H f
9789 @kindex H f (Summary)
9790 @findex gnus-summary-fetch-faq
9791 @vindex gnus-group-faq-directory
9792 Try to fetch the FAQ (list of frequently asked questions) for the
9793 current group (@code{gnus-summary-fetch-faq}).  Gnus will try to get the
9794 FAQ from @code{gnus-group-faq-directory}, which is usually a directory
9795 on a remote machine.  This variable can also be a list of directories.
9796 In that case, giving a prefix to this command will allow you to choose
9797 between the various sites.  @code{ange-ftp} or @code{efs} will probably
9798 be used for fetching the file.
9799
9800 @item H d
9801 @kindex H d (Summary)
9802 @findex gnus-summary-describe-group
9803 Give a brief description of the current group
9804 (@code{gnus-summary-describe-group}).  If given a prefix, force
9805 rereading the description from the server.
9806
9807 @item H h
9808 @kindex H h (Summary)
9809 @findex gnus-summary-describe-briefly
9810 Give an extremely brief description of the most important summary
9811 keystrokes (@code{gnus-summary-describe-briefly}).
9812
9813 @item H i
9814 @kindex H i (Summary)
9815 @findex gnus-info-find-node
9816 Go to the gnus info node (@code{gnus-info-find-node}).
9817 @end table
9818
9819
9820 @node Searching for Articles
9821 @subsection Searching for Articles
9822
9823 @table @kbd
9824
9825 @item M-s
9826 @kindex M-s (Summary)
9827 @findex gnus-summary-search-article-forward
9828 Search through all subsequent (raw) articles for a regexp
9829 (@code{gnus-summary-search-article-forward}).
9830
9831 @item M-r
9832 @kindex M-r (Summary)
9833 @findex gnus-summary-search-article-backward
9834 Search through all previous (raw) articles for a regexp
9835 (@code{gnus-summary-search-article-backward}).
9836
9837 @item &
9838 @kindex & (Summary)
9839 @findex gnus-summary-execute-command
9840 This command will prompt you for a header, a regular expression to match
9841 on this field, and a command to be executed if the match is made
9842 (@code{gnus-summary-execute-command}).  If the header is an empty
9843 string, the match is done on the entire article.  If given a prefix,
9844 search backward instead.
9845
9846 For instance, @kbd{& RET some.*string #} will put the process mark on
9847 all articles that have heads or bodies that match @samp{some.*string}.
9848
9849 @item M-&
9850 @kindex M-& (Summary)
9851 @findex gnus-summary-universal-argument
9852 Perform any operation on all articles that have been marked with
9853 the process mark (@code{gnus-summary-universal-argument}).
9854 @end table
9855
9856 @node Summary Generation Commands
9857 @subsection Summary Generation Commands
9858
9859 @table @kbd
9860
9861 @item Y g
9862 @kindex Y g (Summary)
9863 @findex gnus-summary-prepare
9864 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
9865
9866 @item Y c
9867 @kindex Y c (Summary)
9868 @findex gnus-summary-insert-cached-articles
9869 Pull all cached articles (for the current group) into the summary buffer
9870 (@code{gnus-summary-insert-cached-articles}).
9871
9872 @item Y d
9873 @kindex Y d (Summary)
9874 @findex gnus-summary-insert-dormant-articles
9875 Pull all dormant articles (for the current group) into the summary buffer
9876 (@code{gnus-summary-insert-dormant-articles}).
9877
9878 @end table
9879
9880
9881 @node Really Various Summary Commands
9882 @subsection Really Various Summary Commands
9883
9884 @table @kbd
9885
9886 @item A D
9887 @itemx C-d
9888 @kindex C-d (Summary)
9889 @kindex A D (Summary)
9890 @findex gnus-summary-enter-digest-group
9891 If the current article is a collection of other articles (for instance,
9892 a digest), you might use this command to enter a group based on the that
9893 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
9894 guess what article type is currently displayed unless you give a prefix
9895 to this command, which forces a ``digest'' interpretation.  Basically,
9896 whenever you see a message that is a collection of other messages of
9897 some format, you @kbd{C-d} and read these messages in a more convenient
9898 fashion.
9899
9900 @item C-M-d
9901 @kindex C-M-d (Summary)
9902 @findex gnus-summary-read-document
9903 This command is very similar to the one above, but lets you gather
9904 several documents into one biiig group
9905 (@code{gnus-summary-read-document}).  It does this by opening several
9906 @code{nndoc} groups for each document, and then opening an
9907 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
9908 command understands the process/prefix convention
9909 (@pxref{Process/Prefix}).
9910
9911 @item C-t
9912 @kindex C-t (Summary)
9913 @findex gnus-summary-toggle-truncation
9914 Toggle truncation of summary lines
9915 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
9916 line centering function in the summary buffer, so it's not a good idea
9917 to have truncation switched off while reading articles.
9918
9919 @item =
9920 @kindex = (Summary)
9921 @findex gnus-summary-expand-window
9922 Expand the summary buffer window (@code{gnus-summary-expand-window}).
9923 If given a prefix, force an @code{article} window configuration.
9924
9925 @item C-M-e
9926 @kindex C-M-e (Summary)
9927 @findex gnus-summary-edit-parameters
9928 Edit the group parameters (@pxref{Group Parameters}) of the current
9929 group (@code{gnus-summary-edit-parameters}).
9930
9931 @item C-M-a
9932 @kindex C-M-a (Summary)
9933 @findex gnus-summary-customize-parameters
9934 Customize the group parameters (@pxref{Group Parameters}) of the current
9935 group (@code{gnus-summary-customize-parameters}).
9936
9937 @end table
9938
9939
9940 @node Exiting the Summary Buffer
9941 @section Exiting the Summary Buffer
9942 @cindex summary exit
9943 @cindex exiting groups
9944
9945 Exiting from the summary buffer will normally update all info on the
9946 group and return you to the group buffer.
9947
9948 @table @kbd
9949
9950 @item Z Z
9951 @itemx q
9952 @kindex Z Z (Summary)
9953 @kindex q (Summary)
9954 @findex gnus-summary-exit
9955 @vindex gnus-summary-exit-hook
9956 @vindex gnus-summary-prepare-exit-hook
9957 @c @icon{gnus-summary-exit}
9958 Exit the current group and update all information on the group
9959 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
9960 called before doing much of the exiting, which calls
9961 @code{gnus-summary-expire-articles} by default.
9962 @code{gnus-summary-exit-hook} is called after finishing the exit
9963 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
9964 group mode having no more (unread) groups.
9965
9966 @item Z E
9967 @itemx Q
9968 @kindex Z E (Summary)
9969 @kindex Q (Summary)
9970 @findex gnus-summary-exit-no-update
9971 Exit the current group without updating any information on the group
9972 (@code{gnus-summary-exit-no-update}).
9973
9974 @item Z c
9975 @itemx c
9976 @kindex Z c (Summary)
9977 @kindex c (Summary)
9978 @findex gnus-summary-catchup-and-exit
9979 @c @icon{gnus-summary-catchup-and-exit}
9980 Mark all unticked articles in the group as read and then exit
9981 (@code{gnus-summary-catchup-and-exit}).
9982
9983 @item Z C
9984 @kindex Z C (Summary)
9985 @findex gnus-summary-catchup-all-and-exit
9986 Mark all articles, even the ticked ones, as read and then exit
9987 (@code{gnus-summary-catchup-all-and-exit}).
9988
9989 @item Z n
9990 @kindex Z n (Summary)
9991 @findex gnus-summary-catchup-and-goto-next-group
9992 Mark all articles as read and go to the next group
9993 (@code{gnus-summary-catchup-and-goto-next-group}).
9994
9995 @item Z R
9996 @kindex Z R (Summary)
9997 @findex gnus-summary-reselect-current-group
9998 Exit this group, and then enter it again
9999 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10000 all articles, both read and unread.
10001
10002 @item Z G
10003 @itemx M-g
10004 @kindex Z G (Summary)
10005 @kindex M-g (Summary)
10006 @findex gnus-summary-rescan-group
10007 @c @icon{gnus-summary-mail-get}
10008 Exit the group, check for new articles in the group, and select the
10009 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10010 articles, both read and unread.
10011
10012 @item Z N
10013 @kindex Z N (Summary)
10014 @findex gnus-summary-next-group
10015 Exit the group and go to the next group
10016 (@code{gnus-summary-next-group}).
10017
10018 @item Z P
10019 @kindex Z P (Summary)
10020 @findex gnus-summary-prev-group
10021 Exit the group and go to the previous group
10022 (@code{gnus-summary-prev-group}).
10023
10024 @item Z s
10025 @kindex Z s (Summary)
10026 @findex gnus-summary-save-newsrc
10027 Save the current number of read/marked articles in the dribble buffer
10028 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10029 given a prefix, also save the @file{.newsrc} file(s).  Using this
10030 command will make exit without updating (the @kbd{Q} command) worthless.
10031 @end table
10032
10033 @vindex gnus-exit-group-hook
10034 @code{gnus-exit-group-hook} is called when you exit the current group
10035 with an ``updating'' exit.  For instance @kbd{Q}
10036 (@code{gnus-summary-exit-no-update}) does not call this hook.
10037
10038 @findex gnus-summary-wake-up-the-dead
10039 @findex gnus-dead-summary-mode
10040 @vindex gnus-kill-summary-on-exit
10041 If you're in the habit of exiting groups, and then changing your mind
10042 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10043 If you do that, gnus won't kill the summary buffer when you exit it.
10044 (Quelle surprise!)  Instead it will change the name of the buffer to
10045 something like @samp{*Dead Summary ... *} and install a minor mode
10046 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10047 buffer, you'll find that all keys are mapped to a function called
10048 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10049 summary buffer will result in a live, normal summary buffer.
10050
10051 There will never be more than one dead summary buffer at any one time.
10052
10053 @vindex gnus-use-cross-reference
10054 The data on the current group will be updated (which articles you have
10055 read, which articles you have replied to, etc.) when you exit the
10056 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10057 @code{t} (which is the default), articles that are cross-referenced to
10058 this group and are marked as read, will also be marked as read in the
10059 other subscribed groups they were cross-posted to.  If this variable is
10060 neither @code{nil} nor @code{t}, the article will be marked as read in
10061 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10062
10063
10064 @node Crosspost Handling
10065 @section Crosspost Handling
10066
10067 @cindex velveeta
10068 @cindex spamming
10069 Marking cross-posted articles as read ensures that you'll never have to
10070 read the same article more than once.  Unless, of course, somebody has
10071 posted it to several groups separately.  Posting the same article to
10072 several groups (not cross-posting) is called @dfn{spamming}, and you are
10073 by law required to send nasty-grams to anyone who perpetrates such a
10074 heinous crime.  You may want to try NoCeM handling to filter out spam
10075 (@pxref{NoCeM}).
10076
10077 Remember: Cross-posting is kinda ok, but posting the same article
10078 separately to several groups is not.  Massive cross-posting (aka.
10079 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10080 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10081 excessive crossposting (@pxref{Summary Mail Commands}).
10082
10083 @cindex cross-posting
10084 @cindex Xref
10085 @cindex @sc{nov}
10086 One thing that may cause Gnus to not do the cross-posting thing
10087 correctly is if you use an @sc{nntp} server that supports @sc{xover}
10088 (which is very nice, because it speeds things up considerably) which
10089 does not include the @code{Xref} header in its @sc{nov} lines.  This is
10090 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10091 even with @sc{xover} by registering the @code{Xref} lines of all
10092 articles you actually read, but if you kill the articles, or just mark
10093 them as read without reading them, Gnus will not get a chance to snoop
10094 the @code{Xref} lines out of these articles, and will be unable to use
10095 the cross reference mechanism.
10096
10097 @cindex LIST overview.fmt
10098 @cindex overview.fmt
10099 To check whether your @sc{nntp} server includes the @code{Xref} header
10100 in its overview files, try @samp{telnet your.nntp.server nntp},
10101 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10102 overview.fmt}.  This may not work, but if it does, and the last line you
10103 get does not read @samp{Xref:full}, then you should shout and whine at
10104 your news admin until she includes the @code{Xref} header in the
10105 overview files.
10106
10107 @vindex gnus-nov-is-evil
10108 If you want Gnus to get the @code{Xref}s right all the time, you have to
10109 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10110 considerably.
10111
10112 C'est la vie.
10113
10114 For an alternative approach, @pxref{Duplicate Suppression}.
10115
10116
10117 @node Duplicate Suppression
10118 @section Duplicate Suppression
10119
10120 By default, gnus tries to make sure that you don't have to read the same
10121 article more than once by utilizing the crossposting mechanism
10122 (@pxref{Crosspost Handling}).  However, that simple and efficient
10123 approach may not work satisfactory for some users for various
10124 reasons.
10125
10126 @enumerate
10127 @item
10128 The @sc{nntp} server may fail to generate the @code{Xref} header.  This
10129 is evil and not very common.
10130
10131 @item
10132 The @sc{nntp} server may fail to include the @code{Xref} header in the
10133 @file{.overview} data bases.  This is evil and all too common, alas.
10134
10135 @item
10136 You may be reading the same group (or several related groups) from
10137 different @sc{nntp} servers.
10138
10139 @item
10140 You may be getting mail that duplicates articles posted to groups.
10141 @end enumerate
10142
10143 I'm sure there are other situations where @code{Xref} handling fails as
10144 well, but these four are the most common situations.
10145
10146 If, and only if, @code{Xref} handling fails for you, then you may
10147 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10148 will remember the @code{Message-ID}s of all articles you have read or
10149 otherwise marked as read, and then, as if by magic, mark them as read
10150 all subsequent times you see them---in @emph{all} groups.  Using this
10151 mechanism is quite likely to be somewhat inefficient, but not overly
10152 so.  It's certainly preferable to reading the same articles more than
10153 once.
10154
10155 Duplicate suppression is not a very subtle instrument.  It's more like a
10156 sledge hammer than anything else.  It works in a very simple
10157 fashion---if you have marked an article as read, it adds this Message-ID
10158 to a cache.  The next time it sees this Message-ID, it will mark the
10159 article as read with the @samp{M} mark.  It doesn't care what group it
10160 saw the article in.
10161
10162 @table @code
10163 @item gnus-suppress-duplicates
10164 @vindex gnus-suppress-duplicates
10165 If non-@code{nil}, suppress duplicates.
10166
10167 @item gnus-save-duplicate-list
10168 @vindex gnus-save-duplicate-list
10169 If non-@code{nil}, save the list of duplicates to a file.  This will
10170 make startup and shutdown take longer, so the default is @code{nil}.
10171 However, this means that only duplicate articles read in a single gnus
10172 session are suppressed.
10173
10174 @item gnus-duplicate-list-length
10175 @vindex gnus-duplicate-list-length
10176 This variable says how many @code{Message-ID}s to keep in the duplicate
10177 suppression list.  The default is 10000.
10178
10179 @item gnus-duplicate-file
10180 @vindex gnus-duplicate-file
10181 The name of the file to store the duplicate suppression list in.  The
10182 default is @file{~/News/suppression}.
10183 @end table
10184
10185 If you have a tendency to stop and start gnus often, setting
10186 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10187 you leave gnus running for weeks on end, you may have it @code{nil}.  On
10188 the other hand, saving the list makes startup and shutdown much slower,
10189 so that means that if you stop and start gnus often, you should set
10190 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10191 to you to figure out, I think.
10192
10193 @node Security
10194 @section Security
10195
10196 Gnus is able to verify signed messages or decrypt encrypted messages.
10197 The formats that are supported are PGP, @sc{pgp/mime} and @sc{s/mime},
10198 however you need some external programs to get things to work:
10199
10200 @enumerate
10201 @item
10202 To handle PGP messages, you have to install mailcrypt or gpg.el as
10203 well as a OpenPGP implementation (such as GnuPG).
10204
10205 @item
10206 To handle @sc{s/mime} message, you need to install OpenSSL.  OpenSSL 0.9.6
10207 or newer is recommended.
10208
10209 @end enumerate
10210
10211 More information on how to set things up can be found in the message
10212 manual (@pxref{Security, ,Security, message, Message Manual}).
10213
10214 @table @code
10215 @item mm-verify-option
10216 @vindex mm-verify-option
10217 Option of verifying signed parts.  @code{never}, not verify;
10218 @code{always}, always verify; @code{known}, only verify known
10219 protocols. Otherwise, ask user.
10220
10221 @item mm-decrypt-option
10222 @vindex mm-decrypt-option
10223 Option of decrypting encrypted parts.  @code{never}, no decryption;
10224 @code{always}, always decrypt; @code{known}, only decrypt known
10225 protocols. Otherwise, ask user.
10226
10227 @end table
10228
10229 @node Mailing List
10230 @section Mailing List
10231
10232 @kindex A M (summary)
10233 @findex gnus-mailing-list-insinuate
10234 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10235 either add a `to-list' group parameter (@pxref{Group Parameters}),
10236 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10237 summary buffer, or say:
10238
10239 @lisp
10240 (add-hook 'gnus-summary-mode-hook 'turn-on-gnus-mailing-list-mode)
10241 @end lisp
10242
10243 That enables the following commands to the summary buffer:
10244
10245 @table @kbd
10246
10247 @item C-c C-n h
10248 @kindex C-c C-n h (Summary)
10249 @findex gnus-mailing-list-help
10250 Send a message to fetch mailing list help, if List-Help field exists.
10251
10252 @item C-c C-n s
10253 @kindex C-c C-n s (Summary)
10254 @findex gnus-mailing-list-subscribe
10255 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10256
10257 @item C-c C-n u
10258 @kindex C-c C-n u (Summary)
10259 @findex gnus-mailing-list-unsubscribe
10260 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10261 field exists.
10262
10263 @item C-c C-n p
10264 @kindex C-c C-n p (Summary)
10265 @findex gnus-mailing-list-post
10266 Post to the mailing list, if List-Post field exists.
10267
10268 @item C-c C-n o
10269 @kindex C-c C-n o (Summary)
10270 @findex gnus-mailing-list-owner
10271 Send a message to the mailing list owner, if List-Owner field exists.
10272
10273 @item C-c C-n a
10274 @kindex C-c C-n a (Summary)
10275 @findex gnus-mailing-list-owner
10276 Browse the mailing list archive, if List-Archive field exists.
10277
10278 @end table
10279
10280 @node Article Buffer
10281 @chapter Article Buffer
10282 @cindex article buffer
10283
10284 The articles are displayed in the article buffer, of which there is only
10285 one.  All the summary buffers share the same article buffer unless you
10286 tell gnus otherwise.
10287
10288 @menu
10289 * Hiding Headers::              Deciding what headers should be displayed.
10290 * Using MIME::                  Pushing articles through @sc{mime} before reading them.
10291 * Customizing Articles::        Tailoring the look of the articles.
10292 * Article Keymap::              Keystrokes available in the article buffer.
10293 * Misc Article::                Other stuff.
10294 @end menu
10295
10296
10297 @node Hiding Headers
10298 @section Hiding Headers
10299 @cindex hiding headers
10300 @cindex deleting headers
10301
10302 The top section of each article is the @dfn{head}.  (The rest is the
10303 @dfn{body}, but you may have guessed that already.)
10304
10305 @vindex gnus-show-all-headers
10306 There is a lot of useful information in the head: the name of the person
10307 who wrote the article, the date it was written and the subject of the
10308 article.  That's well and nice, but there's also lots of information
10309 most people do not want to see---what systems the article has passed
10310 through before reaching you, the @code{Message-ID}, the
10311 @code{References}, etc. ad nauseum---and you'll probably want to get rid
10312 of some of those lines.  If you want to keep all those lines in the
10313 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10314
10315 Gnus provides you with two variables for sifting headers:
10316
10317 @table @code
10318
10319 @item gnus-visible-headers
10320 @vindex gnus-visible-headers
10321 If this variable is non-@code{nil}, it should be a regular expression
10322 that says what headers you wish to keep in the article buffer.  All
10323 headers that do not match this variable will be hidden.
10324
10325 For instance, if you only want to see the name of the person who wrote
10326 the article and the subject, you'd say:
10327
10328 @lisp
10329 (setq gnus-visible-headers "^From:\\|^Subject:")
10330 @end lisp
10331
10332 This variable can also be a list of regexps to match headers to
10333 remain visible.
10334
10335 @item gnus-ignored-headers
10336 @vindex gnus-ignored-headers
10337 This variable is the reverse of @code{gnus-visible-headers}.  If this
10338 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10339 should be a regular expression that matches all lines that you want to
10340 hide.  All lines that do not match this variable will remain visible.
10341
10342 For instance, if you just want to get rid of the @code{References} field
10343 and the @code{Xref} field, you might say:
10344
10345 @lisp
10346 (setq gnus-ignored-headers "^References:\\|^Xref:")
10347 @end lisp
10348
10349 This variable can also be a list of regexps to match headers to
10350 be removed.
10351
10352 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10353 variable will have no effect.
10354
10355 @end table
10356
10357 @vindex gnus-sorted-header-list
10358 Gnus can also sort the headers for you.  (It does this by default.)  You
10359 can control the sorting by setting the @code{gnus-sorted-header-list}
10360 variable.  It is a list of regular expressions that says in what order
10361 the headers are to be displayed.
10362
10363 For instance, if you want the name of the author of the article first,
10364 and then the subject, you might say something like:
10365
10366 @lisp
10367 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10368 @end lisp
10369
10370 Any headers that are to remain visible, but are not listed in this
10371 variable, will be displayed in random order after all the headers listed in this variable.
10372
10373 @findex gnus-article-hide-boring-headers
10374 @vindex gnus-boring-article-headers
10375 You can hide further boring headers by setting
10376 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10377 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10378 list, but this list doesn't actually contain header names.  Instead is
10379 lists various @dfn{boring conditions} that Gnus can check and remove
10380 from sight.
10381
10382 These conditions are:
10383 @table @code
10384 @item empty
10385 Remove all empty headers.
10386 @item followup-to
10387 Remove the @code{Followup-To} header if it is identical to the
10388 @code{Newsgroups} header.
10389 @item reply-to
10390 Remove the @code{Reply-To} header if it lists the same address as the
10391 @code{From} header.
10392 @item newsgroups
10393 Remove the @code{Newsgroups} header if it only contains the current group
10394 name.
10395 @item to-address
10396 Remove the @code{To} header if it only contains the address identical to
10397 the current groups's @code{to-address} parameter.
10398 @item date
10399 Remove the @code{Date} header if the article is less than three days
10400 old.
10401 @item long-to
10402 Remove the @code{To} header if it is very long.
10403 @item many-to
10404 Remove all @code{To} headers if there are more than one.
10405 @end table
10406
10407 To include these three elements, you could say something like:
10408
10409 @lisp
10410 (setq gnus-boring-article-headers
10411       '(empty followup-to reply-to))
10412 @end lisp
10413
10414 This is also the default value for this variable.
10415
10416
10417 @node Using MIME
10418 @section Using MIME
10419 @cindex @sc{mime}
10420
10421 Mime is a standard for waving your hands through the air, aimlessly,
10422 while people stand around yawning.
10423
10424 @sc{mime}, however, is a standard for encoding your articles, aimlessly,
10425 while all newsreaders die of fear.
10426
10427 @sc{mime} may specify what character set the article uses, the encoding
10428 of the characters, and it also makes it possible to embed pictures and
10429 other naughty stuff in innocent-looking articles.
10430
10431 @vindex gnus-show-mime
10432 @vindex gnus-article-display-method-for-mime
10433 @findex gnus-article-display-mime-message
10434 Gnus handles @sc{mime} by pushing the articles through
10435 @code{gnus-article-display-method-for-mime}, which is
10436 @code{gnus-article-display-mime-message} by default.  This function
10437 calls the @sc{semi} MIME-View program to actually do the work.  For more
10438 information on @sc{semi} MIME-View, see its manual page (however it is
10439 not existed yet, sorry).
10440
10441 Set @code{gnus-show-mime} to @code{t} if you want to use
10442 @sc{mime} all the time.  If you have @code{gnus-show-mime} set, then
10443 you'll see some unfortunate display glitches in the article buffer.
10444 These can't be avoided.
10445
10446 In GNUS or Gnus, it might be best to just use the toggling functions
10447 from the summary buffer to avoid getting nasty surprises. (For instance,
10448 you enter the group @samp{alt.sing-a-long} and, before you know it,
10449 @sc{mime} has decoded the sound file in the article and some horrible
10450 sing-a-long song comes screaming out your speakers, and you can't find
10451 the volume button, because there isn't one, and people are starting to
10452 look at you, and you try to stop the program, but you can't, and you
10453 can't find the program to control the volume, and everybody else in the
10454 room suddenly decides to look at you disdainfully, and you'll feel
10455 rather stupid.)
10456
10457 Any similarity to real events and people is purely coincidental.  Ahem.
10458
10459 To avoid such kind of situation, gnus stops to use
10460 @code{metamail-buffer}.  So now, you can set @code{gnus-show-mime} to
10461 non-@code{nil} every-time, then you can push button in the article
10462 buffer when there are nobody else.
10463
10464 Also see @pxref{MIME Commands}.
10465
10466
10467 @node Customizing Articles
10468 @section Customizing Articles
10469 @cindex article customization
10470
10471 A slew of functions for customizing how the articles are to look like
10472 exist.  You can call these functions interactively, or you can have them
10473 called automatically when you select the articles.
10474
10475 To have them called automatically, you should set the corresponding
10476 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10477 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10478 be set, but first we discuss the values these variables can have.
10479
10480 Note: Some values, while valid, make little sense.  Check the list below
10481 for sensible values.
10482
10483 @enumerate
10484 @item
10485 @code{nil}: Don't do this treatment.
10486
10487 @item
10488 @code{t}: Do this treatment on all body parts.
10489
10490 @item
10491 @code{head}: Do the treatment on the headers.
10492
10493 @item
10494 @code{last}: Do this treatment on the last part.
10495
10496 @item
10497 An integer: Do this treatment on all body parts that have a length less
10498 than this number.
10499
10500 @item
10501 A list of strings: Do this treatment on all body parts that are in
10502 articles that are read in groups that have names that match one of the
10503 regexps in the list.
10504
10505 @item
10506 A list where the first element is not a string:
10507
10508 The list is evaluated recursively.  The first element of the list is a
10509 predicate.  The following predicates are recognized: @code{or},
10510 @code{and}, @code{not} and @code{typep}.  Here's an example:
10511
10512 @lisp
10513 (or last
10514     (typep "text/x-vcard"))
10515 @end lisp
10516
10517 @item
10518 @code{mime}: Do this treatment if the value of @code{gnus-show-mime}' is
10519 non-nil.
10520
10521 @end enumerate
10522
10523 You may have noticed that the word @dfn{part} is used here.  This refers
10524 to the fact that some messages are @sc{mime} multipart articles that may
10525 be divided into several parts.  Articles that are not multiparts are
10526 considered to contain just a single part.
10527
10528 @vindex gnus-article-treat-types
10529 Are the treatments applied to all sorts of multipart parts?  Yes, if you
10530 want to, but by default, only @samp{text/plain} parts are given the
10531 treatment.  This is controlled by the @code{gnus-article-treat-types}
10532 variable, which is a list of regular expressions that are matched to the
10533 type of the part.  This variable is ignored if the value of the
10534 controlling variable is a predicate list, as described above.
10535
10536 The following treatment options are available.  The easiest way to
10537 customize this is to examine the @code{gnus-article-treat} customization
10538 group.  Values in parenthesis are suggested sensible values.  Others are
10539 possible but those listed are probably sufficient for most people.
10540
10541 @table @code
10542 @item gnus-treat-buttonize (t, integer)
10543 @item gnus-treat-buttonize-head (head)
10544
10545 @xref{Article Buttons}.
10546
10547 @item gnus-treat-capitalize-sentences (t, integer)
10548 @item gnus-treat-overstrike (t, integer)
10549 @item gnus-treat-strip-cr (t, integer)
10550 @item gnus-treat-strip-headers-in-body (t, integer)
10551 @item gnus-treat-strip-leading-blank-lines (t, integer)
10552 @item gnus-treat-strip-multiple-blank-lines (t, integer)
10553 @item gnus-treat-strip-pem (t, last, integer)
10554 @item gnus-treat-strip-pgp (t, last, integer)
10555 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
10556 @item gnus-treat-unsplit-urls (t, integer)
10557 @item gnus-treat-wash-html (t, integer)
10558 @item gnus-treat-decode-article-as-default-mime-charset (t, integer)
10559
10560 @xref{Article Washing}.
10561
10562 @item gnus-treat-date-english (head)
10563 @item gnus-treat-date-iso8601 (head)
10564 @item gnus-treat-date-lapsed (head)
10565 @item gnus-treat-date-local (head)
10566 @item gnus-treat-date-original (head)
10567 @item gnus-treat-date-user-defined (head)
10568 @item gnus-treat-date-ut (head)
10569
10570 @xref{Article Date}.
10571
10572 @item gnus-treat-from-picon (head)
10573 @item gnus-treat-mail-picon (head)
10574 @item gnus-treat-newsgroups-picon (head)
10575
10576 @xref{Picons}.
10577
10578 @item gnus-treat-display-smileys (t, integer)
10579
10580 @item gnus-treat-body-boundary (head)
10581
10582 @vindex gnus-body-boundary-delimiter
10583 Adds a delimiter between header and body, the string used as delimiter
10584 is controlled by @code{gnus-body-boundary-delimiter}.
10585
10586 @xref{Smileys}.
10587
10588 @item gnus-treat-display-xface (head)
10589
10590 @xref{X-Face}.
10591
10592 @item gnus-treat-emphasize (t, head, integer)
10593 @item gnus-treat-fill-article (t, integer)
10594 @item gnus-treat-fill-long-lines (t, integer)
10595 @item gnus-treat-hide-boring-headers (head)
10596 @item gnus-treat-hide-citation (t, integer)
10597 @item gnus-treat-hide-citation-maybe (t, integer)
10598 @item gnus-treat-hide-headers (head)
10599 @item gnus-treat-hide-signature (t, last)
10600
10601 @xref{Article Hiding}.
10602
10603 @item gnus-treat-highlight-citation (t, integer)
10604 @item gnus-treat-highlight-headers (head)
10605 @item gnus-treat-highlight-signature (t, last, integer)
10606
10607 @xref{Article Highlighting}.
10608
10609 @item gnus-treat-play-sounds
10610 @item gnus-treat-translate
10611 @item gnus-treat-x-pgp-sig (head)
10612
10613 @item gnus-treat-unfold-headers (head)
10614 @item gnus-treat-fold-headers (head)
10615 @item gnus-treat-fold-newsgroups (head)
10616 @item gnus-treat-leading-whitespace (head)
10617
10618 @xref{Article Header}.
10619
10620
10621 @end table
10622
10623 @vindex gnus-part-display-hook
10624 You can, of course, write your own functions to be called from
10625 @code{gnus-part-display-hook}.  The functions are called narrowed to the
10626 part, and you can do anything you like, pretty much.  There is no
10627 information that you have to keep in the buffer---you can change
10628 everything.
10629
10630
10631 @node Article Keymap
10632 @section Article Keymap
10633
10634 Most of the keystrokes in the summary buffer can also be used in the
10635 article buffer.  They should behave as if you typed them in the summary
10636 buffer, which means that you don't actually have to have a summary
10637 buffer displayed while reading.  You can do it all from the article
10638 buffer.
10639
10640 A few additional keystrokes are available:
10641
10642 @table @kbd
10643
10644 @item SPACE
10645 @kindex SPACE (Article)
10646 @findex gnus-article-next-page
10647 Scroll forwards one page (@code{gnus-article-next-page}).
10648
10649 @item DEL
10650 @kindex DEL (Article)
10651 @findex gnus-article-prev-page
10652 Scroll backwards one page (@code{gnus-article-prev-page}).
10653
10654 @item C-c ^
10655 @kindex C-c ^ (Article)
10656 @findex gnus-article-refer-article
10657 If point is in the neighborhood of a @code{Message-ID} and you press
10658 @kbd{C-c ^}, Gnus will try to get that article from the server
10659 (@code{gnus-article-refer-article}).
10660
10661 @item C-c C-m
10662 @kindex C-c C-m (Article)
10663 @findex gnus-article-mail
10664 Send a reply to the address near point (@code{gnus-article-mail}).  If
10665 given a prefix, include the mail.
10666
10667 @item s
10668 @kindex s (Article)
10669 @findex gnus-article-show-summary
10670 Reconfigure the buffers so that the summary buffer becomes visible
10671 (@code{gnus-article-show-summary}).
10672
10673 @item ?
10674 @kindex ? (Article)
10675 @findex gnus-article-describe-briefly
10676 Give a very brief description of the available keystrokes
10677 (@code{gnus-article-describe-briefly}).
10678
10679 @item TAB
10680 @kindex TAB (Article)
10681 @findex gnus-article-next-button
10682 Go to the next button, if any (@code{gnus-article-next-button}).  This
10683 only makes sense if you have buttonizing turned on.
10684
10685 @item M-TAB
10686 @kindex M-TAB (Article)
10687 @findex gnus-article-prev-button
10688 Go to the previous button, if any (@code{gnus-article-prev-button}).
10689
10690 @item R
10691 @kindex R (Article)
10692 @findex gnus-article-reply-with-original
10693 Send a reply to the current article and yank the current article
10694 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
10695 wide reply.  If the region is active, only yank the text in the
10696 region.
10697
10698 @item F
10699 @kindex F (Article)
10700 @findex gnus-article-followup-with-original
10701 Send a followup to the current article and yank the current article
10702 (@code{gnus-article-followup-with-original}).  If given a prefix, make
10703 a wide reply.  If the region is active, only yank the text in the
10704 region.
10705
10706
10707 @end table
10708
10709
10710 @node Misc Article
10711 @section Misc Article
10712
10713 @table @code
10714
10715 @item gnus-single-article-buffer
10716 @vindex gnus-single-article-buffer
10717 If non-@code{nil}, use the same article buffer for all the groups.
10718 (This is the default.)  If @code{nil}, each group will have its own
10719 article buffer.
10720
10721 @vindex gnus-article-decode-hook
10722 @item gnus-article-decode-hook
10723 @cindex MIME
10724 Hook used to decode @sc{mime} articles.  The default value is
10725 @code{(article-decode-charset article-decode-encoded-words)}
10726
10727 @vindex gnus-article-prepare-hook
10728 @item gnus-article-prepare-hook
10729 This hook is called right after the article has been inserted into the
10730 article buffer.  It is mainly intended for functions that do something
10731 depending on the contents; it should probably not be used for changing
10732 the contents of the article buffer.
10733
10734 @item gnus-article-mode-hook
10735 @vindex gnus-article-mode-hook
10736 Hook called in article mode buffers.
10737
10738 @item gnus-article-mode-syntax-table
10739 @vindex gnus-article-mode-syntax-table
10740 Syntax table used in article buffers.  It is initialized from
10741 @code{text-mode-syntax-table}.
10742
10743 @vindex gnus-article-mode-line-format
10744 @item gnus-article-mode-line-format
10745 This variable is a format string along the same lines as
10746 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
10747 accepts the same format specifications as that variable, with two
10748 extensions:
10749
10750 @table @samp
10751
10752 @item w
10753 The @dfn{wash status} of the article.  This is a short string with one
10754 character for each possible article wash operation that may have been
10755 performed.  The characters and their meaning:
10756
10757 @table @samp
10758
10759 @item c
10760 Displayed when cited text may be hidden in the article buffer.
10761
10762 @item h
10763 Displayed when headers are hidden in the article buffer.
10764
10765 @item p
10766 Displayed when article is digitally signed or encrypted, and Gnus has
10767 hidden the security headers.  (N.B. does not tell anything about
10768 security status, i.e. good or bad signature.)
10769
10770 @item s
10771 Displayed when the signature has been hidden in the Article buffer.
10772
10773 @item o
10774 Displayed when Gnus has treated overstrike characters in the article buffer.
10775
10776 @item e
10777 Displayed when Gnus has treated emphasised strings in the article buffer.
10778
10779 @end table
10780
10781 @item m
10782 The number of @sc{mime} parts in the article.
10783
10784 @end table
10785
10786 @vindex gnus-break-pages
10787
10788 @item gnus-break-pages
10789 Controls whether @dfn{page breaking} is to take place.  If this variable
10790 is non-@code{nil}, the articles will be divided into pages whenever a
10791 page delimiter appears in the article.  If this variable is @code{nil},
10792 paging will not be done.
10793
10794 @item gnus-page-delimiter
10795 @vindex gnus-page-delimiter
10796 This is the delimiter mentioned above.  By default, it is @samp{^L}
10797 (formfeed).
10798 @end table
10799
10800
10801 @node Composing Messages
10802 @chapter Composing Messages
10803 @cindex composing messages
10804 @cindex messages
10805 @cindex mail
10806 @cindex sending mail
10807 @cindex reply
10808 @cindex followup
10809 @cindex post
10810 @cindex using gpg
10811 @cindex using s/mime
10812 @cindex using smime
10813
10814 @kindex C-c C-c (Post)
10815 All commands for posting and mailing will put you in a message buffer
10816 where you can edit the article all you like, before you send the
10817 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
10818 Message Manual}.  Where the message will be posted/mailed to depends
10819 on your setup (@pxref{Posting Server}).
10820
10821 @menu
10822 * Mail::                        Mailing and replying.
10823 * Posting Server::              What server should you post and mail via?
10824 * Mail and Post::               Mailing and posting at the same time.
10825 * Archived Messages::           Where Gnus stores the messages you've sent.
10826 * Posting Styles::              An easier way to specify who you are.
10827 * Drafts::                      Postponing messages and rejected messages.
10828 * Rejected Articles::           What happens if the server doesn't like your article?
10829 * Signing and encrypting::      How to compose secure messages.
10830 @end menu
10831
10832 Also see @pxref{Canceling and Superseding} for information on how to
10833 remove articles you shouldn't have posted.
10834
10835
10836 @node Mail
10837 @section Mail
10838
10839 Variables for customizing outgoing mail:
10840
10841 @table @code
10842 @item gnus-uu-digest-headers
10843 @vindex gnus-uu-digest-headers
10844 List of regexps to match headers included in digested messages.  The
10845 headers will be included in the sequence they are matched.  If
10846 @code{nil} include all headers.
10847
10848 @item gnus-add-to-list
10849 @vindex gnus-add-to-list
10850 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
10851 that have none when you do a @kbd{a}.
10852
10853 @item gnus-confirm-mail-reply-to-news
10854 @vindex gnus-confirm-mail-reply-to-news
10855 If non-@code{nil}, Gnus requests confirmation when replying to news.
10856 If you find yourself never wanting to reply to mail, but occasionally
10857 press R anyway, this variable might be for you.
10858
10859 @end table
10860
10861
10862 @node Posting Server
10863 @section Posting Server
10864
10865 When you press those magical @kbd{C-c C-c} keys to ship off your latest
10866 (extremely intelligent, of course) article, where does it go?
10867
10868 Thank you for asking.  I hate you.
10869
10870 It can be quite complicated.
10871
10872 @vindex gnus-post-method
10873 When posting news, Message usually invokes @code{message-send-news}
10874 (@pxref{News Variables, , News Variables, message, Message Manual}).
10875 Normally, Gnus will post using the same select method as you're
10876 reading from (which might be convenient if you're reading lots of
10877 groups from different private servers).  However.  If the server
10878 you're reading from doesn't allow posting, just reading, you probably
10879 want to use some other server to post your (extremely intelligent and
10880 fabulously interesting) articles.  You can then set the
10881 @code{gnus-post-method} to some other method:
10882
10883 @lisp
10884 (setq gnus-post-method '(nnspool ""))
10885 @end lisp
10886
10887 Now, if you've done this, and then this server rejects your article, or
10888 this server is down, what do you do then?  To override this variable you
10889 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
10890 the ``current'' server, to get back the default behavior, for posting.
10891
10892 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
10893 gnus will prompt you for what method to use for posting.
10894
10895 You can also set @code{gnus-post-method} to a list of select methods.
10896 If that's the case, gnus will always prompt you for what method to use
10897 for posting.
10898
10899 Finally, if you want to always post using the native select method,
10900 you can set this variable to @code{native}.
10901
10902 When sending mail, Message invokes @code{message-send-mail-function}.
10903 The default function, @code{message-send-mail-with-sendmail}, pipes
10904 your article to the @code{sendmail} binary for further queuing and
10905 sending.  When your local system is not configured for sending mail
10906 using @code{sendmail}, and you have access to a remote @sc{smtp}
10907 server, you can set @code{message-send-mail-function} to
10908 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
10909 package correctly.  An example:
10910
10911 @lisp
10912 (setq message-send-mail-function 'smtpmail-send-it
10913       smtpmail-default-smtp-server "YOUR SMTP HOST")
10914 @end lisp
10915
10916 To the thing similar to this, there is @code{message-smtpmail-send-it}.
10917 It is useful if your ISP requires the POP-before-SMTP authentication.
10918 See the documentation for the function @code{mail-source-touch-pop}.
10919
10920 Other possible choices for @code{message-send-mail-function} includes
10921 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
10922 and @code{feedmail-send-it}.
10923
10924 @node Mail and Post
10925 @section Mail and Post
10926
10927 Here's a list of variables relevant to both mailing and
10928 posting:
10929
10930 @table @code
10931 @item gnus-mailing-list-groups
10932 @findex gnus-mailing-list-groups
10933 @cindex mailing lists
10934
10935 If your news server offers groups that are really mailing lists
10936 gatewayed to the @sc{nntp} server, you can read those groups without
10937 problems, but you can't post/followup to them without some difficulty.
10938 One solution is to add a @code{to-address} to the group parameters
10939 (@pxref{Group Parameters}).  An easier thing to do is set the
10940 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
10941 really are mailing lists.  Then, at least, followups to the mailing
10942 lists will work most of the time.  Posting to these groups (@kbd{a}) is
10943 still a pain, though.
10944
10945 @end table
10946
10947 You may want to do spell-checking on messages that you send out.  Or, if
10948 you don't want to spell-check by hand, you could add automatic
10949 spell-checking via the @code{ispell} package:
10950
10951 @cindex ispell
10952 @findex ispell-message
10953 @lisp
10954 (add-hook 'message-send-hook 'ispell-message)
10955 @end lisp
10956
10957 If you want to change the @code{ispell} dictionary based on what group
10958 you're in, you could say something like the following:
10959
10960 @lisp
10961 (add-hook 'gnus-select-group-hook
10962           (lambda ()
10963             (cond
10964              ((string-match
10965                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
10966               (ispell-change-dictionary "deutsch"))
10967              (t
10968               (ispell-change-dictionary "english")))))
10969 @end lisp
10970
10971 Modify to suit your needs.
10972
10973
10974 @node Archived Messages
10975 @section Archived Messages
10976 @cindex archived messages
10977 @cindex sent messages
10978
10979 Gnus provides a few different methods for storing the mail and news you
10980 send.  The default method is to use the @dfn{archive virtual server} to
10981 store the messages.  If you want to disable this completely, the
10982 @code{gnus-message-archive-group} variable should be @code{nil}, which
10983 is the default.
10984
10985 For archiving interesting messages in a group you read, see the
10986 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
10987 Group Commands}).
10988
10989 @vindex gnus-message-archive-method
10990 @code{gnus-message-archive-method} says what virtual server gnus is to
10991 use to store sent messages.  The default is:
10992
10993 @lisp
10994 (nnfolder "archive"
10995           (nnfolder-directory   "~/Mail/archive")
10996           (nnfolder-active-file "~/Mail/archive/active")
10997           (nnfolder-get-new-mail nil)
10998           (nnfolder-inhibit-expiry t))
10999 @end lisp
11000
11001 You can, however, use any mail select method (@code{nnml},
11002 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11003 for doing this sort of thing, though.  If you don't like the default
11004 directory chosen, you could say something like:
11005
11006 @lisp
11007 (setq gnus-message-archive-method
11008       '(nnfolder "archive"
11009                  (nnfolder-inhibit-expiry t)
11010                  (nnfolder-active-file "~/News/sent-mail/active")
11011                  (nnfolder-directory "~/News/sent-mail/")))
11012 @end lisp
11013
11014 @vindex gnus-message-archive-group
11015 @cindex Gcc
11016 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11017 to one or more group(s) on that server.  Which group to use is
11018 determined by the @code{gnus-message-archive-group} variable.
11019
11020 This variable can be used to do the following:
11021
11022 @itemize @bullet
11023 @item
11024 a string
11025 Messages will be saved in that group.
11026
11027 Note that you can include a select method in the group name, then the
11028 message will not be stored in the select method given by
11029 @code{gnus-message-archive-method}, but in the select method specified
11030 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11031 has the default value shown above.  Then setting
11032 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11033 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11034 value @code{"nnml:foo"}, then outgoing messages will be stored in
11035 @samp{nnml:foo}.
11036 @item
11037 a list of strings
11038 Messages will be saved in all those groups.
11039 @item
11040 an alist of regexps, functions and forms
11041 When a key ``matches'', the result is used.
11042 @item
11043 @code{nil}
11044 No message archiving will take place.  This is the default.
11045 @end itemize
11046
11047 Let's illustrate:
11048
11049 Just saving to a single group called @samp{MisK}:
11050 @lisp
11051 (setq gnus-message-archive-group "MisK")
11052 @end lisp
11053
11054 Saving to two groups, @samp{MisK} and @samp{safe}:
11055 @lisp
11056 (setq gnus-message-archive-group '("MisK" "safe"))
11057 @end lisp
11058
11059 Save to different groups based on what group you are in:
11060 @lisp
11061 (setq gnus-message-archive-group
11062       '(("^alt" "sent-to-alt")
11063         ("mail" "sent-to-mail")
11064         (".*" "sent-to-misc")))
11065 @end lisp
11066
11067 More complex stuff:
11068 @lisp
11069 (setq gnus-message-archive-group
11070       '((if (message-news-p)
11071             "misc-news"
11072           "misc-mail")))
11073 @end lisp
11074
11075 How about storing all news messages in one file, but storing all mail
11076 messages in one file per month:
11077
11078 @lisp
11079 (setq gnus-message-archive-group
11080       '((if (message-news-p)
11081             "misc-news"
11082           (concat "mail." (format-time-string "%Y-%m")))))
11083 @end lisp
11084
11085 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11086 @c use a different value for @code{gnus-message-archive-group} there.)
11087
11088 Now, when you send a message off, it will be stored in the appropriate
11089 group.  (If you want to disable storing for just one particular message,
11090 you can just remove the @code{Gcc} header that has been inserted.)  The
11091 archive group will appear in the group buffer the next time you start
11092 gnus, or the next time you press @kbd{F} in the group buffer.  You can
11093 enter it and read the articles in it just like you'd read any other
11094 group.  If the group gets really big and annoying, you can simply rename
11095 if (using @kbd{G r} in the group buffer) to something
11096 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11097 continue to be stored in the old (now empty) group.
11098
11099 That's the default method of archiving sent messages.  Gnus offers a
11100 different way for the people who don't like the default method.  In that
11101 case you should set @code{gnus-message-archive-group} to @code{nil};
11102 this will disable archiving.
11103
11104 @table @code
11105 @item gnus-outgoing-message-group
11106 @vindex gnus-outgoing-message-group
11107 All outgoing messages will be put in this group.  If you want to store
11108 all your outgoing mail and articles in the group @samp{nnml:archive},
11109 you set this variable to that value.  This variable can also be a list of
11110 group names.
11111
11112 If you want to have greater control over what group to put each
11113 message in, you can set this variable to a function that checks the
11114 current newsgroup name and then returns a suitable group name (or list
11115 of names).
11116
11117 This variable can be used instead of @code{gnus-message-archive-group},
11118 but the latter is the preferred method.
11119
11120 @item gnus-gcc-mark-as-read
11121 @vindex gnus-gcc-mark-as-read
11122 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11123
11124 @item gnus-gcc-externalize-attachments
11125 @vindex gnus-gcc-externalize-attachments
11126 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11127 and matches the Gcc group name, attach files as external parts; if it is
11128 @code{all}, attach local files as external parts; if it is other
11129 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11130 changed in the future.
11131
11132 @end table
11133
11134
11135 @node Posting Styles
11136 @section Posting Styles
11137 @cindex posting styles
11138 @cindex styles
11139
11140 All them variables, they make my head swim.
11141
11142 So what if you want a different @code{Organization} and signature based
11143 on what groups you post to?  And you post both from your home machine
11144 and your work machine, and you want different @code{From} lines, and so
11145 on?
11146
11147 @vindex gnus-posting-styles
11148 One way to do stuff like that is to write clever hooks that change the
11149 variables you need to have changed.  That's a bit boring, so somebody
11150 came up with the bright idea of letting the user specify these things in
11151 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11152 variable:
11153
11154 @lisp
11155 ((".*"
11156   (signature "Peace and happiness")
11157   (organization "What me?"))
11158  ("^comp"
11159   (signature "Death to everybody"))
11160  ("comp.emacs.i-love-it"
11161   (organization "Emacs is it")))
11162 @end lisp
11163
11164 As you might surmise from this example, this alist consists of several
11165 @dfn{styles}.  Each style will be applicable if the first element
11166 ``matches'', in some form or other.  The entire alist will be iterated
11167 over, from the beginning towards the end, and each match will be
11168 applied, which means that attributes in later styles that match override
11169 the same attributes in earlier matching styles.  So
11170 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11171 signature and the @samp{What me?} @code{Organization} header.
11172
11173 The first element in each style is called the @code{match}.  If it's a
11174 string, then Gnus will try to regexp match it against the group name.
11175 If it is the form @code{(header MATCH REGEXP)}, then Gnus will look in
11176 the original article for a header whose name is MATCH and compare that
11177 REGEXP.  MATCH and REGEXP are strings.  (There original article is the
11178 one you are replying or following up to.  If you are not composing a
11179 reply or a followup, then there is nothing to match against.)  If the
11180 @code{match} is a function symbol, that function will be called with no
11181 arguments.  If it's a variable symbol, then the variable will be
11182 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11183 any case, if this returns a non-@code{nil} value, then the style is said
11184 to @dfn{match}.
11185
11186 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11187 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11188 attribute name can be one of @code{signature}, @code{signature-file},
11189 @code{x-face-file}, @code{address} (overriding
11190 @code{user-mail-address}), @code{name} (overriding
11191 @code{(user-full-name)}) or @code{body}.  The attribute name can also
11192 be a string or a symbol.  In that case, this will be used as a header
11193 name, and the value will be inserted in the headers of the article; if
11194 the value is @code{nil}, the header name will be removed.  If the
11195 attribute name is @code{eval}, the form is evaluated, and the result
11196 is thrown away.
11197
11198 The attribute value can be a string (used verbatim), a function with
11199 zero arguments (the return value will be used), a variable (its value
11200 will be used) or a list (it will be @code{eval}ed and the return value
11201 will be used).  The functions and sexps are called/@code{eval}ed in the
11202 message buffer that is being set up.  The headers of the current article
11203 are available through the @code{message-reply-headers} variable, which
11204 is a vector of the following headers: number subject from date id
11205 references chars lines xref extra.
11206
11207 @vindex message-reply-headers
11208
11209 If you wish to check whether the message you are about to compose is
11210 meant to be a news article or a mail message, you can check the values
11211 of the @code{message-news-p} and @code{message-mail-p} functions.
11212
11213 @findex message-mail-p
11214 @findex message-news-p
11215
11216 So here's a new example:
11217
11218 @lisp
11219 (setq gnus-posting-styles
11220       '((".*"
11221          (signature-file "~/.signature")
11222          (name "User Name")
11223          ("X-Home-Page" (getenv "WWW_HOME"))
11224          (organization "People's Front Against MWM"))
11225         ("^rec.humor"
11226          (signature my-funny-signature-randomizer))
11227         ((equal (system-name) "gnarly")  ;; A form
11228          (signature my-quote-randomizer))
11229         (message-news-p        ;; A function symbol
11230          (signature my-news-signature))
11231         (window-system         ;; A value symbol
11232          ("X-Window-System" (format "%s" window-system)))
11233         ;; If I'm replying to Larsi, set the Organization header.
11234         ((header "from" "larsi.*org")
11235          (Organization "Somewhere, Inc."))
11236         ((posting-from-work-p) ;; A user defined function
11237          (signature-file "~/.work-signature")
11238          (address "user@@bar.foo")
11239          (body "You are fired.\n\nSincerely, your boss.")
11240          (organization "Important Work, Inc"))
11241         ("nnml:.*"
11242          (From (save-excursion
11243                  (set-buffer gnus-article-buffer)
11244                  (message-fetch-field "to"))))
11245         ("^nn.+:"
11246          (signature-file "~/.mail-signature"))))
11247 @end lisp
11248
11249 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11250 @code{From} address in all your outgoing replies, which might be handy
11251 if you fill many roles.
11252
11253 Setting the @code{gnus-named-posting-styles} variable will make
11254 posting-styles allow to have distinctive names.  You can specify an
11255 arbitrary posting-style when article posting with @kbd{S P} in the
11256 summary buffer.  @code{gnus-named-posting-styles} is an alist which maps
11257 the names to styles.  Once a posting-style is added to the alist, we can
11258 import it from @code{gnus-posting-styles}.  If an attribute whose name
11259 is @code{import} is found, Gnus will look for the attribute value in
11260 @code{gnus-named-posting-styles} and expand it in place.
11261
11262 Here's an example:
11263
11264 @lisp
11265 (setq gnus-named-posting-styles
11266       '(("Default"
11267          (signature-file "~/.signature")
11268          (name "User Name")
11269          ("X-Home-Page" (getenv "WWW_HOME"))
11270          (organization "People's Front Against MWM"))
11271         ("Emacs"
11272          (import "Default")
11273          (organization "The Church of Emacs"))))
11274 @end lisp
11275
11276 The posting-style named "Emacs" will inherit all the attributes from
11277 "Default" except @code{organization}.
11278
11279
11280 @node Drafts
11281 @section Drafts
11282 @cindex drafts
11283
11284 If you are writing a message (mail or news) and suddenly remember that
11285 you have a steak in the oven (or some pesto in the food processor, you
11286 craaazy vegetarians), you'll probably wish there was a method to save
11287 the message you are writing so that you can continue editing it some
11288 other day, and send it when you feel its finished.
11289
11290 Well, don't worry about it.  Whenever you start composing a message of
11291 some sort using the gnus mail and post commands, the buffer you get will
11292 automatically associate to an article in a special @dfn{draft} group.
11293 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11294 article will be saved there.  (Auto-save files also go to the draft
11295 group.)
11296
11297 @cindex nndraft
11298 @vindex nndraft-directory
11299 The draft group is a special group (which is implemented as an
11300 @code{nndraft} group, if you absolutely have to know) called
11301 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11302 @code{nndraft} is to store its files.  What makes this group special is
11303 that you can't tick any articles in it or mark any articles as
11304 read---all articles in the group are permanently unread.
11305
11306 If the group doesn't exist, it will be created and you'll be subscribed
11307 to it.  The only way to make it disappear from the Group buffer is to
11308 unsubscribe it.
11309
11310 @c @findex gnus-dissociate-buffer-from-draft
11311 @c @kindex C-c M-d (Mail)
11312 @c @kindex C-c M-d (Post)
11313 @c @findex gnus-associate-buffer-with-draft
11314 @c @kindex C-c C-d (Mail)
11315 @c @kindex C-c C-d (Post)
11316 @c If you're writing some super-secret message that you later want to
11317 @c encode with PGP before sending, you may wish to turn the auto-saving
11318 @c (and association with the draft group) off.  You never know who might be
11319 @c interested in reading all your extremely valuable and terribly horrible
11320 @c and interesting secrets.  The @kbd{C-c M-d}
11321 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11322 @c If you change your mind and want to turn the auto-saving back on again,
11323 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11324 @c
11325 @c @vindex gnus-use-draft
11326 @c To leave association with the draft group off by default, set
11327 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11328
11329 @findex gnus-draft-edit-message
11330 @kindex D e (Draft)
11331 When you want to continue editing the article, you simply enter the
11332 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11333 that.  You will be placed in a buffer where you left off.
11334
11335 Rejected articles will also be put in this draft group (@pxref{Rejected
11336 Articles}).
11337
11338 @findex gnus-draft-send-all-messages
11339 @findex gnus-draft-send-message
11340 If you have lots of rejected messages you want to post (or mail) without
11341 doing further editing, you can use the @kbd{D s} command
11342 (@code{gnus-draft-send-message}).  This command understands the
11343 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11344 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11345 in the buffer.
11346
11347 If you have some messages that you wish not to send, you can use the
11348 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11349 as unsendable.  This is a toggling command.
11350
11351
11352 @node Rejected Articles
11353 @section Rejected Articles
11354 @cindex rejected articles
11355
11356 Sometimes a news server will reject an article.  Perhaps the server
11357 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11358 @emph{there be demons}.  Perhaps you have included too much cited text.
11359 Perhaps the disk is full.  Perhaps the server is down.
11360
11361 These situations are, of course, totally beyond the control of gnus.
11362 (Gnus, of course, loves the way you look, always feels great, has angels
11363 fluttering around inside of it, doesn't care about how much cited text
11364 you include, never runs full and never goes down.)  So gnus saves these
11365 articles until some later time when the server feels better.
11366
11367 The rejected articles will automatically be put in a special draft group
11368 (@pxref{Drafts}).  When the server comes back up again, you'd then
11369 typically enter that group and send all the articles off.
11370
11371 @node Signing and encrypting
11372 @section Signing and encrypting
11373 @cindex using gpg
11374 @cindex using s/mime
11375 @cindex using smime
11376
11377 Gnus can digitally sign and encrypt your messages, using vanilla PGP
11378 format or @sc{pgp/mime} or @sc{s/mime}.  For decoding such messages,
11379 see the @code{mm-verify-option} and @code{mm-decrypt-option} options
11380 (@pxref{Security}).
11381
11382 For PGP, Gnus supports two external libraries, @sc{gpg.el} and
11383 @sc{Mailcrypt}, you need to install at least one of them.  The
11384 @sc{s/mime} support in Gnus requires the external program OpenSSL.
11385
11386 Often, you would like to sign replies to people who send you signed
11387 messages.  Even more often, you might want to encrypt messages which
11388 are in reply to encrypted messages.  Gnus offers
11389 @code{gnus-message-replysign} to enable the former, and
11390 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11391 @code{gnus-message-replysignencrypted} (on by default) will sign
11392 automatically encrypted messages.
11393
11394 Instructing MML to perform security operations on a @sc{mime} part is
11395 done using the @kbd{C-c C-m s} key map for signing and the @kbd{C-c
11396 C-m c} key map for encryption, as follows.
11397
11398 @table @kbd
11399
11400 @item C-c C-m s s
11401 @kindex C-c C-m s s
11402 @findex mml-secure-message-sign-smime
11403
11404 Digitally sign current message using @sc{s/mime}.
11405
11406 @item C-c C-m s o
11407 @kindex C-c C-m s o
11408 @findex mml-secure-message-sign-pgp
11409
11410 Digitally sign current message using PGP.
11411
11412 @item C-c C-m s p
11413 @kindex C-c C-m s p
11414 @findex mml-secure-message-sign-pgp
11415
11416 Digitally sign current message using @sc{pgp/mime}.
11417
11418 @item C-c C-m c s
11419 @kindex C-c C-m c s
11420 @findex mml-secure-message-encrypt-smime
11421
11422 Digitally encrypt current message using @sc{s/mime}.
11423
11424 @item C-c C-m c o
11425 @kindex C-c C-m c o
11426 @findex mml-secure-message-encrypt-pgp
11427
11428 Digitally encrypt current message using PGP.
11429
11430 @item C-c C-m c p
11431 @kindex C-c C-m c p
11432 @findex mml-secure-message-encrypt-pgpmime
11433
11434 Digitally encrypt current message using @sc{pgp/mime}.
11435
11436 @item C-c C-m C-n
11437 @kindex C-c C-m C-n
11438 @findex mml-unsecure-message
11439 Remove security related MML tags from message.
11440
11441 @end table
11442
11443 Also @xref{Security, ,Security, message, Message Manual}.
11444
11445 @node Select Methods
11446 @chapter Select Methods
11447 @cindex foreign groups
11448 @cindex select methods
11449
11450 A @dfn{foreign group} is a group not read by the usual (or
11451 default) means.  It could be, for instance, a group from a different
11452 @sc{nntp} server, it could be a virtual group, or it could be your own
11453 personal mail group.
11454
11455 A foreign group (or any group, really) is specified by a @dfn{name} and
11456 a @dfn{select method}.  To take the latter first, a select method is a
11457 list where the first element says what back end to use (e.g. @code{nntp},
11458 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
11459 name}.  There may be additional elements in the select method, where the
11460 value may have special meaning for the back end in question.
11461
11462 One could say that a select method defines a @dfn{virtual server}---so
11463 we do just that (@pxref{Server Buffer}).
11464
11465 The @dfn{name} of the group is the name the back end will recognize the
11466 group as.
11467
11468 For instance, the group @samp{soc.motss} on the @sc{nntp} server
11469 @samp{some.where.edu} will have the name @samp{soc.motss} and select
11470 method @code{(nntp "some.where.edu")}.  Gnus will call this group
11471 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
11472 back end just knows this group as @samp{soc.motss}.
11473
11474 The different methods all have their peculiarities, of course.
11475
11476 @menu
11477 * Server Buffer::               Making and editing virtual servers.
11478 * Getting News::                Reading USENET news with Gnus.
11479 * Getting Mail::                Reading your personal mail with Gnus.
11480 * Browsing the Web::            Getting messages from a plethora of Web sources.
11481 * IMAP::                        Using Gnus as a @sc{imap} client.
11482 * Other Sources::               Reading directories, files, SOUP packets.
11483 * Combined Groups::             Combining groups into one group.
11484 * Gnus Unplugged::              Reading news and mail offline.
11485 @end menu
11486
11487
11488 @node Server Buffer
11489 @section Server Buffer
11490
11491 Traditionally, a @dfn{server} is a machine or a piece of software that
11492 one connects to, and then requests information from.  Gnus does not
11493 connect directly to any real servers, but does all transactions through
11494 one back end or other.  But that's just putting one layer more between
11495 the actual media and Gnus, so we might just as well say that each
11496 back end represents a virtual server.
11497
11498 For instance, the @code{nntp} back end may be used to connect to several
11499 different actual @sc{nntp} servers, or, perhaps, to many different ports
11500 on the same actual @sc{nntp} server.  You tell Gnus which back end to
11501 use, and what parameters to set by specifying a @dfn{select method}.
11502
11503 These select method specifications can sometimes become quite
11504 complicated---say, for instance, that you want to read from the
11505 @sc{nntp} server @samp{news.funet.fi} on port number 13, which
11506 hangs if queried for @sc{nov} headers and has a buggy select.  Ahem.
11507 Anyway, if you had to specify that for each group that used this
11508 server, that would be too much work, so Gnus offers a way of naming
11509 select methods, which is what you do in the server buffer.
11510
11511 To enter the server buffer, use the @kbd{^}
11512 (@code{gnus-group-enter-server-mode}) command in the group buffer.
11513
11514 @menu
11515 * Server Buffer Format::        You can customize the look of this buffer.
11516 * Server Commands::             Commands to manipulate servers.
11517 * Example Methods::             Examples server specifications.
11518 * Creating a Virtual Server::   An example session.
11519 * Server Variables::            Which variables to set.
11520 * Servers and Methods::         You can use server names as select methods.
11521 * Unavailable Servers::         Some servers you try to contact may be down.
11522 @end menu
11523
11524 @vindex gnus-server-mode-hook
11525 @code{gnus-server-mode-hook} is run when creating the server buffer.
11526
11527
11528 @node Server Buffer Format
11529 @subsection Server Buffer Format
11530 @cindex server buffer format
11531
11532 @vindex gnus-server-line-format
11533 You can change the look of the server buffer lines by changing the
11534 @code{gnus-server-line-format} variable.  This is a @code{format}-like
11535 variable, with some simple extensions:
11536
11537 @table @samp
11538
11539 @item h
11540 How the news is fetched---the back end name.
11541
11542 @item n
11543 The name of this server.
11544
11545 @item w
11546 Where the news is to be fetched from---the address.
11547
11548 @item s
11549 The opened/closed/denied status of the server.
11550 @end table
11551
11552 @vindex gnus-server-mode-line-format
11553 The mode line can also be customized by using the
11554 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
11555 Formatting}).  The following specs are understood:
11556
11557 @table @samp
11558 @item S
11559 Server name.
11560
11561 @item M
11562 Server method.
11563 @end table
11564
11565 Also @pxref{Formatting Variables}.
11566
11567
11568 @node Server Commands
11569 @subsection Server Commands
11570 @cindex server commands
11571
11572 @table @kbd
11573
11574 @item a
11575 @kindex a (Server)
11576 @findex gnus-server-add-server
11577 Add a new server (@code{gnus-server-add-server}).
11578
11579 @item e
11580 @kindex e (Server)
11581 @findex gnus-server-edit-server
11582 Edit a server (@code{gnus-server-edit-server}).
11583
11584 @item SPACE
11585 @kindex SPACE (Server)
11586 @findex gnus-server-read-server
11587 Browse the current server (@code{gnus-server-read-server}).
11588
11589 @item q
11590 @kindex q (Server)
11591 @findex gnus-server-exit
11592 Return to the group buffer (@code{gnus-server-exit}).
11593
11594 @item k
11595 @kindex k (Server)
11596 @findex gnus-server-kill-server
11597 Kill the current server (@code{gnus-server-kill-server}).
11598
11599 @item y
11600 @kindex y (Server)
11601 @findex gnus-server-yank-server
11602 Yank the previously killed server (@code{gnus-server-yank-server}).
11603
11604 @item c
11605 @kindex c (Server)
11606 @findex gnus-server-copy-server
11607 Copy the current server (@code{gnus-server-copy-server}).
11608
11609 @item l
11610 @kindex l (Server)
11611 @findex gnus-server-list-servers
11612 List all servers (@code{gnus-server-list-servers}).
11613
11614 @item s
11615 @kindex s (Server)
11616 @findex gnus-server-scan-server
11617 Request that the server scan its sources for new articles
11618 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
11619 servers.
11620
11621 @item g
11622 @kindex g (Server)
11623 @findex gnus-server-regenerate-server
11624 Request that the server regenerate all its data structures
11625 (@code{gnus-server-regenerate-server}).  This can be useful if you have
11626 a mail back end that has gotten out of sync.
11627
11628 @end table
11629
11630
11631 @node Example Methods
11632 @subsection Example Methods
11633
11634 Most select methods are pretty simple and self-explanatory:
11635
11636 @lisp
11637 (nntp "news.funet.fi")
11638 @end lisp
11639
11640 Reading directly from the spool is even simpler:
11641
11642 @lisp
11643 (nnspool "")
11644 @end lisp
11645
11646 As you can see, the first element in a select method is the name of the
11647 back end, and the second is the @dfn{address}, or @dfn{name}, if you
11648 will.
11649
11650 After these two elements, there may be an arbitrary number of
11651 @code{(@var{variable} @var{form})} pairs.
11652
11653 To go back to the first example---imagine that you want to read from
11654 port 15 on that machine.  This is what the select method should
11655 look like then:
11656
11657 @lisp
11658 (nntp "news.funet.fi" (nntp-port-number 15))
11659 @end lisp
11660
11661 You should read the documentation to each back end to find out what
11662 variables are relevant, but here's an @code{nnmh} example:
11663
11664 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
11665 you have two structures that you wish to access: One is your private
11666 mail spool, and the other is a public one.  Here's the possible spec for
11667 your private mail:
11668
11669 @lisp
11670 (nnmh "private" (nnmh-directory "~/private/mail/"))
11671 @end lisp
11672
11673 (This server is then called @samp{private}, but you may have guessed
11674 that.)
11675
11676 Here's the method for a public spool:
11677
11678 @lisp
11679 (nnmh "public"
11680       (nnmh-directory "/usr/information/spool/")
11681       (nnmh-get-new-mail nil))
11682 @end lisp
11683
11684 @cindex proxy
11685 @cindex firewall
11686
11687 If you are behind a firewall and only have access to the @sc{nntp}
11688 server from the firewall machine, you can instruct Gnus to @code{rlogin}
11689 on the firewall machine and telnet from there to the @sc{nntp} server.
11690 Doing this can be rather fiddly, but your virtual server definition
11691 should probably look something like this:
11692
11693 @lisp
11694 (nntp "firewall"
11695       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
11696       (nntp-via-address "the.firewall.machine")
11697       (nntp-address "the.real.nntp.host")
11698       (nntp-end-of-line "\n"))
11699 @end lisp
11700
11701 If you want to use the wonderful @code{ssh} program to provide a
11702 compressed connection over the modem line, you could add the following
11703 configuration to the example above:
11704
11705 @lisp
11706       (nntp-via-rlogin-command "ssh")
11707 @end lisp
11708
11709 See also @code{nntp-via-rlogin-command-switches}.
11710
11711 If you're behind a firewall, but have direct access to the outside world
11712 through a wrapper command like "runsocks", you could open a socksified
11713 telnet connection to the news server as follows:
11714
11715 @lisp
11716 (nntp "outside"
11717       (nntp-pre-command "runsocks")
11718       (nntp-open-connection-function nntp-open-via-telnet)
11719       (nntp-address "the.news.server")
11720       (nntp-end-of-line "\n"))
11721 @end lisp
11722
11723 This means that you have to have set up @code{ssh-agent} correctly to
11724 provide automatic authorization, of course.  And to get a compressed
11725 connection, you have to have the @samp{Compression} option in the
11726 @code{ssh} @file{config} file.
11727
11728
11729 @node Creating a Virtual Server
11730 @subsection Creating a Virtual Server
11731
11732 If you're saving lots of articles in the cache by using persistent
11733 articles, you may want to create a virtual server to read the cache.
11734
11735 First you need to add a new server.  The @kbd{a} command does that.  It
11736 would probably be best to use @code{nnspool} to read the cache.  You
11737 could also use @code{nnml} or @code{nnmh}, though.
11738
11739 Type @kbd{a nnspool RET cache RET}.
11740
11741 You should now have a brand new @code{nnspool} virtual server called
11742 @samp{cache}.  You now need to edit it to have the right definitions.
11743 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
11744 will contain the following:
11745
11746 @lisp
11747 (nnspool "cache")
11748 @end lisp
11749
11750 Change that to:
11751
11752 @lisp
11753 (nnspool "cache"
11754          (nnspool-spool-directory "~/News/cache/")
11755          (nnspool-nov-directory "~/News/cache/")
11756          (nnspool-active-file "~/News/cache/active"))
11757 @end lisp
11758
11759 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
11760 @kbd{RET} over this virtual server, you should be entered into a browse
11761 buffer, and you should be able to enter any of the groups displayed.
11762
11763
11764 @node Server Variables
11765 @subsection Server Variables
11766
11767 One sticky point when defining variables (both on back ends and in Emacs
11768 in general) is that some variables are typically initialized from other
11769 variables when the definition of the variables is being loaded.  If you
11770 change the "base" variable after the variables have been loaded, you
11771 won't change the "derived" variables.
11772
11773 This typically affects directory and file variables.  For instance,
11774 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
11775 directory variables are initialized from that variable, so
11776 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
11777 new virtual @code{nnml} server, it will @emph{not} suffice to set just
11778 @code{nnml-directory}---you have to explicitly set all the file
11779 variables to be what you want them to be.  For a complete list of
11780 variables for each back end, see each back end's section later in this
11781 manual, but here's an example @code{nnml} definition:
11782
11783 @lisp
11784 (nnml "public"
11785       (nnml-directory "~/my-mail/")
11786       (nnml-active-file "~/my-mail/active")
11787       (nnml-newsgroups-file "~/my-mail/newsgroups"))
11788 @end lisp
11789
11790
11791 @node Servers and Methods
11792 @subsection Servers and Methods
11793
11794 Wherever you would normally use a select method
11795 (e.g. @code{gnus-secondary-select-method}, in the group select method,
11796 when browsing a foreign server) you can use a virtual server name
11797 instead.  This could potentially save lots of typing.  And it's nice all
11798 over.
11799
11800
11801 @node Unavailable Servers
11802 @subsection Unavailable Servers
11803
11804 If a server seems to be unreachable, Gnus will mark that server as
11805 @code{denied}.  That means that any subsequent attempt to make contact
11806 with that server will just be ignored.  ``It can't be opened,'' Gnus
11807 will tell you, without making the least effort to see whether that is
11808 actually the case or not.
11809
11810 That might seem quite naughty, but it does make sense most of the time.
11811 Let's say you have 10 groups subscribed to on server
11812 @samp{nephelococcygia.com}.  This server is located somewhere quite far
11813 away from you and the machine is quite slow, so it takes 1 minute just
11814 to find out that it refuses connection to you today.  If Gnus were to
11815 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
11816 attempt to do that.  Once it has gotten a single ``connection refused'',
11817 it will regard that server as ``down''.
11818
11819 So, what happens if the machine was only feeling unwell temporarily?
11820 How do you test to see whether the machine has come up again?
11821
11822 You jump to the server buffer (@pxref{Server Buffer}) and poke it
11823 with the following commands:
11824
11825 @table @kbd
11826
11827 @item O
11828 @kindex O (Server)
11829 @findex gnus-server-open-server
11830 Try to establish connection to the server on the current line
11831 (@code{gnus-server-open-server}).
11832
11833 @item C
11834 @kindex C (Server)
11835 @findex gnus-server-close-server
11836 Close the connection (if any) to the server
11837 (@code{gnus-server-close-server}).
11838
11839 @item D
11840 @kindex D (Server)
11841 @findex gnus-server-deny-server
11842 Mark the current server as unreachable
11843 (@code{gnus-server-deny-server}).
11844
11845 @item M-o
11846 @kindex M-o (Server)
11847 @findex gnus-server-open-all-servers
11848 Open the connections to all servers in the buffer
11849 (@code{gnus-server-open-all-servers}).
11850
11851 @item M-c
11852 @kindex M-c (Server)
11853 @findex gnus-server-close-all-servers
11854 Close the connections to all servers in the buffer
11855 (@code{gnus-server-close-all-servers}).
11856
11857 @item R
11858 @kindex R (Server)
11859 @findex gnus-server-remove-denials
11860 Remove all marks to whether Gnus was denied connection from any servers
11861 (@code{gnus-server-remove-denials}).
11862
11863 @item L
11864 @kindex L (Server)
11865 @findex gnus-server-offline-server
11866 Set server status to offline (@code{gnus-server-offline-server}).
11867
11868 @end table
11869
11870
11871 @node Getting News
11872 @section Getting News
11873 @cindex reading news
11874 @cindex news back ends
11875
11876 A newsreader is normally used for reading news.  Gnus currently provides
11877 only two methods of getting news---it can read from an @sc{nntp} server,
11878 or it can read from a local spool.
11879
11880 @menu
11881 * NNTP::                        Reading news from an @sc{nntp} server.
11882 * News Spool::                  Reading news from the local spool.
11883 @end menu
11884
11885
11886 @node NNTP
11887 @subsection NNTP
11888 @cindex nntp
11889
11890 Subscribing to a foreign group from an @sc{nntp} server is rather easy.
11891 You just specify @code{nntp} as method and the address of the @sc{nntp}
11892 server as the, uhm, address.
11893
11894 If the @sc{nntp} server is located at a non-standard port, setting the
11895 third element of the select method to this port number should allow you
11896 to connect to the right port.  You'll have to edit the group info for
11897 that (@pxref{Foreign Groups}).
11898
11899 The name of the foreign group can be the same as a native group.  In
11900 fact, you can subscribe to the same group from as many different servers
11901 you feel like.  There will be no name collisions.
11902
11903 The following variables can be used to create a virtual @code{nntp}
11904 server:
11905
11906 @table @code
11907
11908 @item nntp-server-opened-hook
11909 @vindex nntp-server-opened-hook
11910 @cindex @sc{mode reader}
11911 @cindex authinfo
11912 @cindex authentification
11913 @cindex nntp authentification
11914 @findex nntp-send-authinfo
11915 @findex nntp-send-mode-reader
11916 is run after a connection has been made.  It can be used to send
11917 commands to the @sc{nntp} server after it has been contacted.  By
11918 default it sends the command @code{MODE READER} to the server with the
11919 @code{nntp-send-mode-reader} function.  This function should always be
11920 present in this hook.
11921
11922 @item nntp-authinfo-function
11923 @vindex nntp-authinfo-function
11924 @findex nntp-send-authinfo
11925 @vindex nntp-authinfo-file
11926 This function will be used to send @samp{AUTHINFO} to the @sc{nntp}
11927 server.  The default function is @code{nntp-send-authinfo}, which looks
11928 through your @file{~/.authinfo} (or whatever you've set the
11929 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
11930 are found, it will prompt you for a login name and a password.  The
11931 format of the @file{~/.authinfo} file is (almost) the same as the
11932 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
11933 manual page, but here are the salient facts:
11934
11935 @enumerate
11936 @item
11937 The file contains one or more line, each of which define one server.
11938
11939 @item
11940 Each line may contain an arbitrary number of token/value pairs.
11941
11942 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
11943 @samp{default}.  In addition Gnus introduces two new tokens, not present
11944 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
11945 @samp{force}.  (This is the only way the @file{.authinfo} file format
11946 deviates from the @file{.netrc} file format.)  @samp{port} is used to
11947 indicate what port on the server the credentials apply to and
11948 @samp{force} is explained below.
11949
11950 @end enumerate
11951
11952 Here's an example file:
11953
11954 @example
11955 machine news.uio.no login larsi password geheimnis
11956 machine nntp.ifi.uio.no login larsi force yes
11957 @end example
11958
11959 The token/value pairs may appear in any order; @samp{machine} doesn't
11960 have to be first, for instance.
11961
11962 In this example, both login name and password have been supplied for the
11963 former server, while the latter has only the login name listed, and the
11964 user will be prompted for the password.  The latter also has the
11965 @samp{force} tag, which means that the authinfo will be sent to the
11966 @var{nntp} server upon connection; the default (i.e., when there is not
11967 @samp{force} tag) is to not send authinfo to the @var{nntp} server
11968 until the @var{nntp} server asks for it.
11969
11970 You can also add @samp{default} lines that will apply to all servers
11971 that don't have matching @samp{machine} lines.
11972
11973 @example
11974 default force yes
11975 @end example
11976
11977 This will force sending @samp{AUTHINFO} commands to all servers not
11978 previously mentioned.
11979
11980 Remember to not leave the @file{~/.authinfo} file world-readable.
11981
11982 @item nntp-server-action-alist
11983 @vindex nntp-server-action-alist
11984 This is a list of regexps to match on server types and actions to be
11985 taken when matches are made.  For instance, if you want Gnus to beep
11986 every time you connect to innd, you could say something like:
11987
11988 @lisp
11989 (setq nntp-server-action-alist
11990       '(("innd" (ding))))
11991 @end lisp
11992
11993 You probably don't want to do that, though.
11994
11995 The default value is
11996
11997 @lisp
11998 '(("nntpd 1\\.5\\.11t"
11999    (remove-hook 'nntp-server-opened-hook
12000                 'nntp-send-mode-reader)))
12001 @end lisp
12002
12003 This ensures that Gnus doesn't send the @code{MODE READER} command to
12004 nntpd 1.5.11t, since that command chokes that server, I've been told.
12005
12006 @item nntp-maximum-request
12007 @vindex nntp-maximum-request
12008 If the @sc{nntp} server doesn't support @sc{nov} headers, this back end
12009 will collect headers by sending a series of @code{head} commands.  To
12010 speed things up, the back end sends lots of these commands without
12011 waiting for reply, and then reads all the replies.  This is controlled
12012 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12013 your network is buggy, you should set this to 1.
12014
12015 @item nntp-connection-timeout
12016 @vindex nntp-connection-timeout
12017 If you have lots of foreign @code{nntp} groups that you connect to
12018 regularly, you're sure to have problems with @sc{nntp} servers not
12019 responding properly, or being too loaded to reply within reasonable
12020 time.  This is can lead to awkward problems, which can be helped
12021 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12022 that says how many seconds the @code{nntp} back end should wait for a
12023 connection before giving up.  If it is @code{nil}, which is the default,
12024 no timeouts are done.
12025
12026 @c @item nntp-command-timeout
12027 @c @vindex nntp-command-timeout
12028 @c @cindex PPP connections
12029 @c @cindex dynamic IP addresses
12030 @c If you're running Gnus on a machine that has a dynamically assigned
12031 @c address, Gnus may become confused.  If the address of your machine
12032 @c changes after connecting to the @sc{nntp} server, Gnus will simply sit
12033 @c waiting forever for replies from the server.  To help with this
12034 @c unfortunate problem, you can set this command to a number.  Gnus will
12035 @c then, if it sits waiting for a reply from the server longer than that
12036 @c number of seconds, shut down the connection, start a new one, and resend
12037 @c the command.  This should hopefully be transparent to the user.  A
12038 @c likely number is 30 seconds.
12039 @c
12040 @c @item nntp-retry-on-break
12041 @c @vindex nntp-retry-on-break
12042 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12043 @c hangs.  This will have much the same effect as the command timeout
12044 @c described above.
12045
12046 @item nntp-server-hook
12047 @vindex nntp-server-hook
12048 This hook is run as the last step when connecting to an @sc{nntp}
12049 server.
12050
12051 @item nntp-buggy-select
12052 @vindex nntp-buggy-select
12053 Set this to non-@code{nil} if your select routine is buggy.
12054
12055 @item nntp-nov-is-evil
12056 @vindex nntp-nov-is-evil
12057 If the @sc{nntp} server does not support @sc{nov}, you could set this
12058 variable to @code{t}, but @code{nntp} usually checks automatically whether @sc{nov}
12059 can be used.
12060
12061 @item nntp-xover-commands
12062 @vindex nntp-xover-commands
12063 @cindex nov
12064 @cindex XOVER
12065 List of strings used as commands to fetch @sc{nov} lines from a
12066 server.  The default value of this variable is @code{("XOVER"
12067 "XOVERVIEW")}.
12068
12069 @item nntp-nov-gap
12070 @vindex nntp-nov-gap
12071 @code{nntp} normally sends just one big request for @sc{nov} lines to
12072 the server.  The server responds with one huge list of lines.  However,
12073 if you have read articles 2-5000 in the group, and only want to read
12074 article 1 and 5001, that means that @code{nntp} will fetch 4999 @sc{nov}
12075 lines that you will not need.  This variable says how
12076 big a gap between two consecutive articles is allowed to be before the
12077 @code{XOVER} request is split into several request.  Note that if your
12078 network is fast, setting this variable to a really small number means
12079 that fetching will probably be slower.  If this variable is @code{nil},
12080 @code{nntp} will never split requests.  The default is 5.
12081
12082 @item nntp-prepare-server-hook
12083 @vindex nntp-prepare-server-hook
12084 A hook run before attempting to connect to an @sc{nntp} server.
12085
12086 @item nntp-warn-about-losing-connection
12087 @vindex nntp-warn-about-losing-connection
12088 If this variable is non-@code{nil}, some noise will be made when a
12089 server closes connection.
12090
12091 @item nntp-record-commands
12092 @vindex nntp-record-commands
12093 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12094 @sc{nntp} server (along with a timestamp) in the @samp{*nntp-log*}
12095 buffer.  This is useful if you are debugging a Gnus/@sc{nntp} connection
12096 that doesn't seem to work.
12097
12098 @item nntp-open-connection-function
12099 @vindex nntp-open-connection-function
12100 It is possible to customize how the connection to the nntp server will
12101 be opened.  If you specify an @code{nntp-open-connection-function}
12102 parameter, Gnus will use that function to establish the connection.
12103 Five pre-made functions are supplied.  These functions can be grouped in
12104 two categories: direct connection functions (three pre-made), and
12105 indirect ones (two pre-made).
12106
12107 @item nntp-prepare-post-hook
12108 @vindex nntp-prepare-post-hook
12109 A hook run just before posting an article.  If there is no
12110 @code{Message-ID} header in the article and the news server provides the
12111 recommended ID, it will be added to the article before running this
12112 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12113 inhibit Gnus to add a @code{Message-ID} header, you could say:
12114
12115 @lisp
12116 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12117 @end lisp
12118
12119 Note that not all servers support the recommended ID.  This works for
12120 INN versions 2.3.0 and later, for instance.
12121
12122 @item nntp-list-options
12123 @vindex nntp-list-options
12124 List of newsgroup name used for a option of the LIST command to restrict
12125 the listing output to only the specified newsgroups.  Each newsgroup name
12126 can be a shell-style wildcard, for instance, @dfn{fj.*}, @dfn{japan.*},
12127 etc.  Fortunately, if the server can accept such a option, it will
12128 probably make gnus run faster.  You may use it as a server variable as
12129 follows:
12130
12131 @lisp
12132 (setq gnus-select-method
12133       '(nntp "news.somewhere.edu"
12134              (nntp-list-options ("fj.*" "japan.*"))))
12135 @end lisp
12136
12137 @item nntp-options-subscribe
12138 @vindex nntp-options-subscribe
12139 Regexp matching the newsgroup names which will be subscribed
12140 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
12141 It may be effective as well as @code{nntp-list-options} even though the
12142 server could not accept a shell-style wildcard as a option of the LIST
12143 command.  You may use it as a server variable as follows:
12144
12145 @lisp
12146 (setq gnus-select-method
12147       '(nntp "news.somewhere.edu"
12148              (nntp-options-subscribe "^fj\\.\\|^japan\\.")))
12149 @end lisp
12150
12151 @item nntp-options-not-subscribe
12152 @vindex nntp-options-not-subscribe
12153 Regexp matching the newsgroup names which will not be subscribed
12154 unconditionally.  Use @dfn{ } instead of @dfn{$} for a regexp string.
12155 It may be effective as well as @code{nntp-list-options} even though the
12156 server could not accept a shell-style wildcard as a option of the LIST
12157 command.  You may use it as a server variable as follows:
12158
12159 @lisp
12160 (setq gnus-select-method
12161       '(nntp "news.somewhere.edu"
12162              (nntp-options-not-subscribe "\\.binaries\\.")))
12163 @end lisp
12164 @end table
12165
12166 @menu
12167 * Direct Functions::            Connecting directly to the server.
12168 * Indirect Functions::          Connecting indirectly to the server.
12169 * Common Variables::            Understood by several connection functions.
12170 @end menu
12171
12172
12173 @node Direct Functions
12174 @subsubsection Direct Functions
12175 @cindex direct connection functions
12176
12177 These functions are called direct because they open a direct connection
12178 between your machine and the @sc{nntp} server.  The behavior of these
12179 functions is also affected by commonly understood variables
12180 (@pxref{Common Variables}).
12181
12182 @table @code
12183 @findex nntp-open-network-stream
12184 @item nntp-open-network-stream
12185 This is the default, and simply connects to some port or other on the
12186 remote system.
12187
12188 @findex nntp-open-ssl-stream
12189 @item nntp-open-ssl-stream
12190 Opens a connection to a server over a @dfn{secure} channel.  To use
12191 this you must have OpenSSL (@uref{http://www.openssl.org}) or SSLeay
12192 installed (@uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL}, and you also
12193 need @file{ssl.el} (from the W3 distribution, for instance).  You then
12194 define a server as follows:
12195
12196 @lisp
12197 ;; Type `C-c C-c' after you've finished editing.
12198 ;;
12199 ;; "snews" is port 563 and is predefined in our /etc/services
12200 ;; however, openssl s_client -port doesn't like named ports
12201 ;;
12202 (nntp "snews.bar.com"
12203       (nntp-open-connection-function nntp-open-ssl-stream)
12204       (nntp-port-number 563)
12205       (nntp-address "snews.bar.com"))
12206 @end lisp
12207
12208 @findex nntp-open-telnet-stream
12209 @item nntp-open-telnet-stream
12210 Opens a connection to an @sc{nntp} server by simply @samp{telnet}'ing
12211 it.  You might wonder why this function exists, since we have the
12212 default @code{nntp-open-network-stream} which would do the job.  (One
12213 of) the reason(s) is that if you are behind a firewall but have direct
12214 connections to the outside world thanks to a command wrapper like
12215 @code{runsocks}, you can use it like this:
12216
12217 @lisp
12218 (nntp "socksified"
12219       (nntp-pre-command "runsocks")
12220       (nntp-open-connection-function nntp-open-telnet-stream)
12221       (nntp-address "the.news.server"))
12222 @end lisp
12223
12224 With the default method, you would need to wrap your whole Emacs
12225 session, which is not a good idea.
12226 @end table
12227
12228
12229 @node Indirect Functions
12230 @subsubsection Indirect Functions
12231 @cindex indirect connection functions
12232
12233 These functions are called indirect because they connect to an
12234 intermediate host before actually connecting to the @sc{nntp} server.
12235 All of these functions and related variables are also said to belong to
12236 the "via" family of connection: they're all prefixed with "via" to make
12237 things cleaner.  The behavior of these functions is also affected by
12238 commonly understood variables (@pxref{Common Variables}).
12239
12240 @table @code
12241 @item nntp-open-via-rlogin-and-telnet
12242 @findex nntp-open-via-rlogin-and-telnet
12243 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12244 to the real @sc{nntp} server from there.  This is useful for instance if
12245 you need to connect to a firewall machine first.
12246
12247 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12248
12249 @table @code
12250 @item nntp-via-rlogin-command
12251 @vindex nntp-via-rlogin-command
12252 Command used to log in on the intermediate host.  The default is
12253 @samp{rsh}, but @samp{ssh} is a popular alternative.
12254
12255 @item nntp-via-rlogin-command-switches
12256 @vindex nntp-via-rlogin-command-switches
12257 List of strings to be used as the switches to
12258 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12259 @samp{ssh} for `nntp-via-rlogin-command', you may set this to
12260 @samp{("-C")} in order to compress all data connections, otherwise set
12261 this to @samp{("-t")} or @samp{("-C" "-t")} if the telnet command
12262 requires a pseudo-tty allocation on an intermediate host.
12263 @end table
12264
12265 @item nntp-open-via-telnet-and-telnet
12266 @findex nntp-open-via-telnet-and-telnet
12267 Does essentially the same, but uses @samp{telnet} instead of
12268 @samp{rlogin} to connect to the intermediate host.
12269
12270 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12271
12272 @table @code
12273 @item nntp-via-telnet-command
12274 @vindex nntp-via-telnet-command
12275 Command used to @code{telnet} the intermediate host.  The default is
12276 @samp{telnet}.
12277
12278 @item nntp-via-telnet-switches
12279 @vindex nntp-via-telnet-switches
12280 List of strings to be used as the switches to the
12281 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12282
12283 @item nntp-via-user-password
12284 @vindex nntp-via-user-password
12285 Password to use when logging in on the intermediate host.
12286
12287 @item nntp-via-envuser
12288 @vindex nntp-via-envuser
12289 If non-@code{nil}, the intermediate @code{telnet} session (client and
12290 server both) will support the @code{ENVIRON} option and not prompt for
12291 login name. This works for Solaris @code{telnet}, for instance.
12292
12293 @item nntp-via-shell-prompt
12294 @vindex nntp-via-shell-prompt
12295 Regexp matching the shell prompt on the intermediate host.  The default
12296 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12297
12298 @end table
12299
12300 @end table
12301
12302
12303 Here are some additional variables that are understood by all the above
12304 functions:
12305
12306 @table @code
12307
12308 @item nntp-via-user-name
12309 @vindex nntp-via-user-name
12310 User name to use when connecting to the intermediate host.
12311
12312 @item nntp-via-address
12313 @vindex nntp-via-address
12314 Address of the intermediate host to connect to.
12315
12316 @end table
12317
12318
12319 @node Common Variables
12320 @subsubsection Common Variables
12321
12322 The following variables affect the behavior of all, or several of the
12323 pre-made connection functions. When not specified, all functions are
12324 affected.
12325
12326 @table @code
12327
12328 @item nntp-pre-command
12329 @vindex nntp-pre-command
12330 A command wrapper to use when connecting through a non native connection
12331 function (all except @code{nntp-open-network-stream} and
12332 @code{nntp-open-ssl-stream}.  This is where you would put a @samp{SOCKS}
12333 wrapper for instance.
12334
12335 @item nntp-address
12336 @vindex nntp-address
12337 The address of the @sc{nntp} server.
12338
12339 @item nntp-port-number
12340 @vindex nntp-port-number
12341 Port number to connect to the @sc{nntp} server.  The default is @samp{nntp}.
12342 If you use @sc{nntp} over @sc{ssl}, you may want to use integer ports rather
12343 than named ports (i.e, use @samp{563} instead of @samp{snews}), because
12344 external SSL tools may not work with named ports.
12345
12346 @item nntp-end-of-line
12347 @vindex nntp-end-of-line
12348 String to use as end-of-line marker when talking to the @sc{nntp}
12349 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12350 using a non native connection function.
12351
12352 @item nntp-telnet-command
12353 @vindex nntp-telnet-command
12354 Command to use when connecting to the @sc{nntp} server through
12355 @samp{telnet}.  This is NOT for an intermediate host.  This is just for
12356 the real @sc{nntp} server.  The default is @samp{telnet}.
12357
12358 @item nntp-telnet-switches
12359 @vindex nntp-telnet-switches
12360 A list of switches to pass to @code{nntp-telnet-command}.  The default
12361 is @samp{("-8")}.
12362
12363 @end table
12364
12365
12366 @node News Spool
12367 @subsection News Spool
12368 @cindex nnspool
12369 @cindex news spool
12370
12371 Subscribing to a foreign group from the local spool is extremely easy,
12372 and might be useful, for instance, to speed up reading groups that
12373 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12374 instance.
12375
12376 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12377 anything else) as the address.
12378
12379 If you have access to a local spool, you should probably use that as the
12380 native select method (@pxref{Finding the News}).  It is normally faster
12381 than using an @code{nntp} select method, but might not be.  It depends.
12382 You just have to try to find out what's best at your site.
12383
12384 @table @code
12385
12386 @item nnspool-inews-program
12387 @vindex nnspool-inews-program
12388 Program used to post an article.
12389
12390 @item nnspool-inews-switches
12391 @vindex nnspool-inews-switches
12392 Parameters given to the inews program when posting an article.
12393
12394 @item nnspool-spool-directory
12395 @vindex nnspool-spool-directory
12396 Where @code{nnspool} looks for the articles.  This is normally
12397 @file{/usr/spool/news/}.
12398
12399 @item nnspool-nov-directory
12400 @vindex nnspool-nov-directory
12401 Where @code{nnspool} will look for @sc{nov} files.  This is normally
12402 @file{/usr/spool/news/over.view/}.
12403
12404 @item nnspool-lib-dir
12405 @vindex nnspool-lib-dir
12406 Where the news lib dir is (@file{/usr/lib/news/} by default).
12407
12408 @item nnspool-active-file
12409 @vindex nnspool-active-file
12410 The path to the active file.
12411
12412 @item nnspool-newsgroups-file
12413 @vindex nnspool-newsgroups-file
12414 The path to the group descriptions file.
12415
12416 @item nnspool-history-file
12417 @vindex nnspool-history-file
12418 The path to the news history file.
12419
12420 @item nnspool-active-times-file
12421 @vindex nnspool-active-times-file
12422 The path to the active date file.
12423
12424 @item nnspool-nov-is-evil
12425 @vindex nnspool-nov-is-evil
12426 If non-@code{nil}, @code{nnspool} won't try to use any @sc{nov} files
12427 that it finds.
12428
12429 @item nnspool-sift-nov-with-sed
12430 @vindex nnspool-sift-nov-with-sed
12431 @cindex sed
12432 If non-@code{nil}, which is the default, use @code{sed} to get the
12433 relevant portion from the overview file.  If nil, @code{nnspool} will
12434 load the entire file into a buffer and process it there.
12435
12436 @end table
12437
12438
12439 @node Getting Mail
12440 @section Getting Mail
12441 @cindex reading mail
12442 @cindex mail
12443
12444 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12445 course.
12446
12447 @menu
12448 * Mail in a Newsreader::        Important introductory notes.
12449 * Getting Started Reading Mail::  A simple cookbook example.
12450 * Splitting Mail::              How to create mail groups.
12451 * Mail Sources::                How to tell Gnus where to get mail from.
12452 * Mail Back End Variables::     Variables for customizing mail handling.
12453 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12454 * Group Mail Splitting::        Use group customize to drive mail splitting.
12455 * Incorporating Old Mail::      What about the old mail you have?
12456 * Expiring Mail::               Getting rid of unwanted mail.
12457 * Washing Mail::                Removing gruft from the mail you get.
12458 * Duplicates::                  Dealing with duplicated mail.
12459 * Not Reading Mail::            Using mail back ends for reading other files.
12460 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12461 @end menu
12462
12463
12464 @node Mail in a Newsreader
12465 @subsection Mail in a Newsreader
12466
12467 If you are used to traditional mail readers, but have decided to switch
12468 to reading mail with Gnus, you may find yourself experiencing something
12469 of a culture shock.
12470
12471 Gnus does not behave like traditional mail readers.  If you want to make
12472 it behave that way, you can, but it's an uphill battle.
12473
12474 Gnus, by default, handles all its groups using the same approach.  This
12475 approach is very newsreaderly---you enter a group, see the new/unread
12476 messages, and when you read the messages, they get marked as read, and
12477 you don't see them any more.  (Unless you explicitly ask for them.)
12478
12479 In particular, you do not do anything explicitly to delete messages.
12480
12481 Does this mean that all the messages that have been marked as read are
12482 deleted?  How awful!
12483
12484 But, no, it means that old messages are @dfn{expired} according to some
12485 scheme or other.  For news messages, the expire process is controlled by
12486 the news administrator; for mail, the expire process is controlled by
12487 you.  The expire process for mail is covered in depth in @pxref{Expiring
12488 Mail}.
12489
12490 What many Gnus users find, after using it a while for both news and
12491 mail, is that the transport mechanism has very little to do with how
12492 they want to treat a message.
12493
12494 Many people subscribe to several mailing lists.  These are transported
12495 via @sc{smtp}, and are therefore mail.  But we might go for weeks without
12496 answering, or even reading these messages very carefully.  We may not
12497 need to save them because if we should need to read one again, they are
12498 archived somewhere else.
12499
12500 Some people have local news groups which have only a handful of readers.
12501 These are transported via @sc{nntp}, and are therefore news.  But we may need
12502 to read and answer a large fraction of the messages very carefully in
12503 order to do our work.  And there may not be an archive, so we may need
12504 to save the interesting messages the same way we would personal mail.
12505
12506 The important distinction turns out to be not the transport mechanism,
12507 but other factors such as how interested we are in the subject matter,
12508 or how easy it is to retrieve the message if we need to read it again.
12509
12510 Gnus provides many options for sorting mail into ``groups'' which behave
12511 like newsgroups, and for treating each group (whether mail or news)
12512 differently.
12513
12514 Some users never get comfortable using the Gnus (ahem) paradigm and wish
12515 that Gnus should grow up and be a male, er, mail reader.  It is possible
12516 to whip Gnus into a more mailreaderly being, but, as said before, it's
12517 not easy.  People who prefer proper mail readers should try @sc{vm}
12518 instead, which is an excellent, and proper, mail reader.
12519
12520 I don't mean to scare anybody off, but I want to make it clear that you
12521 may be required to learn a new way of thinking about messages.  After
12522 you've been subjected to The Gnus Way, you will come to love it.  I can
12523 guarantee it.  (At least the guy who sold me the Emacs Subliminal
12524 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
12525 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
12526 You Do.)
12527
12528
12529 @node Getting Started Reading Mail
12530 @subsection Getting Started Reading Mail
12531
12532 It's quite easy to use Gnus to read your new mail.  You just plonk the
12533 mail back end of your choice into @code{gnus-secondary-select-methods},
12534 and things will happen automatically.
12535
12536 For instance, if you want to use @code{nnml} (which is a "one file per
12537 mail" back end), you could put the following in your @file{.gnus} file:
12538
12539 @lisp
12540 (setq gnus-secondary-select-methods '((nnml "")))
12541 @end lisp
12542
12543 Now, the next time you start Gnus, this back end will be queried for new
12544 articles, and it will move all the messages in your spool file to its
12545 directory, which is @code{~/Mail/} by default.  The new group that will
12546 be created (@samp{mail.misc}) will be subscribed, and you can read it
12547 like any other group.
12548
12549 You will probably want to split the mail into several groups, though:
12550
12551 @lisp
12552 (setq nnmail-split-methods
12553       '(("junk" "^From:.*Lars Ingebrigtsen")
12554         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
12555         ("other" "")))
12556 @end lisp
12557
12558 This will result in three new @code{nnml} mail groups being created:
12559 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
12560 mail that doesn't fit into the first two groups will be placed in the
12561 last group.
12562
12563 This should be sufficient for reading mail with Gnus.  You might want to
12564 give the other sections in this part of the manual a perusal, though.
12565 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
12566
12567
12568 @node Splitting Mail
12569 @subsection Splitting Mail
12570 @cindex splitting mail
12571 @cindex mail splitting
12572
12573 @vindex nnmail-split-methods
12574 The @code{nnmail-split-methods} variable says how the incoming mail is
12575 to be split into groups.
12576
12577 @lisp
12578 (setq nnmail-split-methods
12579   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
12580     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
12581     ("mail.other" "")))
12582 @end lisp
12583
12584 This variable is a list of lists, where the first element of each of
12585 these lists is the name of the mail group (they do not have to be called
12586 something beginning with @samp{mail}, by the way), and the second
12587 element is a regular expression used on the header of each mail to
12588 determine if it belongs in this mail group.  The first string may
12589 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
12590 insert sub-expressions from the matched text.  For instance:
12591
12592 @lisp
12593 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
12594 @end lisp
12595
12596 The second element can also be a function.  In that case, it will be
12597 called narrowed to the headers with the first element of the rule as the
12598 argument.  It should return a non-@code{nil} value if it thinks that the
12599 mail belongs in that group.
12600
12601 The last of these groups should always be a general one, and the regular
12602 expression should @emph{always} be @samp{} so that it matches any mails
12603 that haven't been matched by any of the other regexps.  (These rules are
12604 processed from the beginning of the alist toward the end.  The first
12605 rule to make a match will "win", unless you have crossposting enabled.
12606 In that case, all matching rules will "win".)
12607
12608 If you like to tinker with this yourself, you can set this variable to a
12609 function of your choice.  This function will be called without any
12610 arguments in a buffer narrowed to the headers of an incoming mail
12611 message.  The function should return a list of group names that it
12612 thinks should carry this mail message.
12613
12614 Note that the mail back ends are free to maul the poor, innocent,
12615 incoming headers all they want to.  They all add @code{Lines} headers;
12616 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
12617 @code{From<SPACE>} line to something else.
12618
12619 @vindex nnmail-crosspost
12620 The mail back ends all support cross-posting.  If several regexps match,
12621 the mail will be ``cross-posted'' to all those groups.
12622 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
12623 that no articles are crossposted to the general (@samp{}) group.
12624
12625 @vindex nnmail-crosspost-link-function
12626 @cindex crosspost
12627 @cindex links
12628 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
12629 the crossposted articles.  However, not all file systems support hard
12630 links.  If that's the case for you, set
12631 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
12632 variable is @code{add-name-to-file} by default.)
12633
12634 @kindex M-x nnmail-split-history
12635 @kindex nnmail-split-history
12636 If you wish to see where the previous mail split put the messages, you
12637 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
12638 where re-spooling messages would put the messages, you can use
12639 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
12640 Group Commands}).
12641
12642 @vindex nnmail-split-header-length-limit
12643 Header lines longer than the value of
12644 @code{nnmail-split-header-length-limit} are excluded from the split
12645 function.
12646
12647 @vindex nnmail-mail-splitting-charset
12648 @vindex nnmail-mail-splitting-decodes
12649 By default the splitting codes MIME decodes headers so you can match
12650 on non-ASCII strings.  The @code{nnmail-mail-splitting-charset}
12651 variable specifies the default charset for decoding.  The behaviour
12652 can be turned off completely by binding
12653 @code{nnmail-mail-splitting-decodes} to nil, which is useful if you
12654 want to match articles based on the raw header data.
12655
12656 @vindex nnmail-resplit-incoming
12657 By default, splitting is performed on all incoming messages.  If
12658 you specify a @code{directory} entry for the variable
12659 @code{mail-sources} @pxref{Mail Source Specifiers}, however, then
12660 splitting does @emph{not} happen by default.  You can set the variable
12661 @code{nnmail-resplit-incoming} to a non-nil value to make splitting
12662 happen even in this case.  (This variable has no effect on other kinds
12663 of entries.)
12664
12665 Gnus gives you all the opportunity you could possibly want for shooting
12666 yourself in the foot.  Let's say you create a group that will contain
12667 all the mail you get from your boss.  And then you accidentally
12668 unsubscribe from the group.  Gnus will still put all the mail from your
12669 boss in the unsubscribed group, and so, when your boss mails you ``Have
12670 that report ready by Monday or you're fired!'', you'll never see it and,
12671 come Tuesday, you'll still believe that you're gainfully employed while
12672 you really should be out collecting empty bottles to save up for next
12673 month's rent money.
12674
12675
12676 @node Mail Sources
12677 @subsection Mail Sources
12678
12679 Mail can be gotten from many different sources---the mail spool, from a
12680 POP mail server, from a procmail directory, or from a maildir, for
12681 instance.
12682
12683 @menu
12684 * Mail Source Specifiers::      How to specify what a mail source is.
12685 * Mail Source Customization::   Some variables that influence things.
12686 * Fetching Mail::               Using the mail source specifiers.
12687 @end menu
12688
12689
12690 @node Mail Source Specifiers
12691 @subsubsection Mail Source Specifiers
12692 @cindex POP
12693 @cindex mail server
12694 @cindex procmail
12695 @cindex mail spool
12696 @cindex mail source
12697
12698 You tell Gnus how to fetch mail by setting @code{mail-sources}
12699 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
12700
12701 Here's an example:
12702
12703 @lisp
12704 (pop :server "pop3.mailserver.com" :user "myname")
12705 @end lisp
12706
12707 As can be observed, a mail source specifier is a list where the first
12708 element is a @dfn{mail source type}, followed by an arbitrary number of
12709 @dfn{keywords}.  Keywords that are not explicitly specified are given
12710 default values.
12711
12712 The following mail source types are available:
12713
12714 @table @code
12715 @item file
12716 Get mail from a single file; typically from the mail spool.
12717
12718 Keywords:
12719
12720 @table @code
12721 @item :path
12722 The path of the file.  Defaults to the value of the @code{MAIL}
12723 environment variable or the value of @code{rmail-spool-directory}
12724 (usually something like @file{/usr/mail/spool/user-name}).
12725 @end table
12726
12727 An example file mail source:
12728
12729 @lisp
12730 (file :path "/usr/spool/mail/user-name")
12731 @end lisp
12732
12733 Or using the default path:
12734
12735 @lisp
12736 (file)
12737 @end lisp
12738
12739 If the mail spool file is not located on the local machine, it's best to
12740 use POP or @sc{imap} or the like to fetch the mail.  You can not use ange-ftp
12741 file names here---it has no way to lock the mail spool while moving the
12742 mail.
12743
12744 If it's impossible to set up a proper server, you can use ssh instead.
12745
12746 @lisp
12747 (setq mail-sources
12748       '((file :prescript "ssh host bin/getmail >%t")))
12749 @end lisp
12750
12751 The @samp{getmail} script would look something like the following:
12752
12753 @example
12754 #!/bin/sh
12755 #  getmail - move mail from spool to stdout
12756 #  flu@@iki.fi
12757
12758 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
12759 TMP=$HOME/Mail/tmp
12760 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
12761 @end example
12762
12763 Alter this script to fit find the @samp{movemail} you want to use.
12764
12765
12766 @item directory
12767 @vindex nnmail-scan-directory-mail-source-once
12768 Get mail from several files in a directory.  This is typically used when
12769 you have procmail split the incoming mail into several files.  That is,
12770 there is a one-to-one correspondence between files in that directory and
12771 groups, so that mail from the file @file{foo.bar.spool} will be put in
12772 the group @code{foo.bar}.  (You can change the suffix to be used instead
12773 of @code{.spool}.)  Setting
12774 @code{nnmail-scan-directory-mail-source-once} to non-nil forces Gnus to
12775 scan the mail source only once.  This is particularly useful if you want
12776 to scan mail groups at a specified level.
12777
12778 @vindex nnmail-resplit-incoming
12779 There is also the variable @code{nnmail-resplit-incoming}, if you set
12780 that to a non-nil value, then the normal splitting process is applied
12781 to all the files from the directory, @ref{Splitting Mail}.
12782
12783 Keywords:
12784
12785 @table @code
12786 @item :path
12787 The path of the directory where the files are.  There is no default
12788 value.
12789
12790 @item :suffix
12791 Only files ending with this suffix are used.  The default is
12792 @samp{.spool}.
12793
12794 @item :predicate
12795 Only files that have this predicate return non-@code{nil} are returned.
12796 The default is @code{identity}.  This is used as an additional
12797 filter---only files that have the right suffix @emph{and} satisfy this
12798 predicate are considered.
12799
12800 @item :prescript
12801 @itemx :postscript
12802 Script run before/after fetching mail.
12803
12804 @end table
12805
12806 An example directory mail source:
12807
12808 @lisp
12809 (directory :path "/home/user-name/procmail-dir/"
12810            :suffix ".prcml")
12811 @end lisp
12812
12813 @item pop
12814 Get mail from a POP server.
12815
12816 Keywords:
12817
12818 @table @code
12819 @item :server
12820 The name of the POP server.  The default is taken from the
12821 @code{MAILHOST} environment variable.
12822
12823 @item :port
12824 The port number of the POP server.  This can be a number (eg,
12825 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
12826 string, it should be a service name as listed in @file{/etc/services} on
12827 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
12828 need to specify it as @samp{"pop-3"} instead.
12829
12830 @item :user
12831 The user name to give to the POP server.  The default is the login
12832 name.
12833
12834 @item :password
12835 The password to give to the POP server.  If not specified, the user is
12836 prompted.
12837
12838 @item :program
12839 The program to use to fetch mail from the POP server.  This should be
12840 a @code{format}-like string.  Here's an example:
12841
12842 @example
12843 fetchmail %u@@%s -P %p %t
12844 @end example
12845
12846 The valid format specifier characters are:
12847
12848 @table @samp
12849 @item t
12850 The name of the file the mail is to be moved to.  This must always be
12851 included in this string.
12852
12853 @item s
12854 The name of the server.
12855
12856 @item P
12857 The port number of the server.
12858
12859 @item u
12860 The user name to use.
12861
12862 @item p
12863 The password to use.
12864 @end table
12865
12866 The values used for these specs are taken from the values you give the
12867 corresponding keywords.
12868
12869 @item :prescript
12870 A script to be run before fetching the mail.  The syntax is the same as
12871 the @code{:program} keyword.  This can also be a function to be run.
12872
12873 @item :postscript
12874 A script to be run after fetching the mail.  The syntax is the same as
12875 the @code{:program} keyword.  This can also be a function to be run.
12876
12877 @item :function
12878 The function to use to fetch mail from the POP server.  The function is
12879 called with one parameter---the name of the file where the mail should
12880 be moved to.
12881
12882 @item :authentication
12883 This can be either the symbol @code{password} or the symbol @code{apop}
12884 and says what authentication scheme to use.  The default is
12885 @code{password}.
12886
12887 @item :connection
12888 What stream to use for connecting to the server, this can be the symbol
12889 @code{ssl}, the symbol @code{tls} or others.  The default is @code{nil}
12890 and use insecure connections.  Note that for SSL/TLS, you need external
12891 programs and libraries:
12892
12893 @itemize @bullet
12894 @item
12895 @dfn{ssl:} Connect through SSL@. Requires OpenSSL (the program
12896 @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external
12897 library @samp{ssl.el}.
12898 @item
12899 @dfn{starttls:} Connect via the STARTTLS extension (similar to SSL)@.
12900 Requires the external library @samp{starttls.el} and program
12901 @samp{starttls}.
12902 @end itemize
12903
12904 @item :leave
12905 Non-@code{nil} if mail is to be left on the server and UIDL used for
12906 message retrieval.  The default is @code{nil}.
12907
12908 @end table
12909
12910 If the @code{:program} and @code{:function} keywords aren't specified,
12911 @code{pop3-movemail} will be used.
12912
12913 Here are some examples.  Fetch from the default POP server, using the
12914 default user name, and default fetcher:
12915
12916 @lisp
12917 (pop)
12918 @end lisp
12919
12920 Fetch from a named server with a named user and password:
12921
12922 @lisp
12923 (pop :server "my.pop.server"
12924      :user "user-name" :password "secret")
12925 @end lisp
12926
12927 Use @samp{movemail} to move the mail:
12928
12929 @lisp
12930 (pop :program "movemail po:%u %t %p")
12931 @end lisp
12932
12933 @item maildir
12934 Get mail from a maildir.  This is a type of mailbox that is supported by
12935 at least qmail and postfix, where each file in a special directory
12936 contains exactly one mail.
12937
12938 Keywords:
12939
12940 @table @code
12941 @item :path
12942 The path of the directory where the mails are stored.  The default is
12943 taken from the @code{MAILDIR} environment variable or
12944 @samp{~/Maildir/}.
12945 @item :subdirs
12946 The subdirectories of the Maildir.  The default is
12947 @samp{("new" "cur")}.
12948
12949 @c If you sometimes look at your mail through a pop3 daemon before fetching
12950 @c them with Gnus, you may also have to fetch your mails from the
12951 @c @code{cur} directory inside the maildir, like in the first example
12952 @c below.
12953
12954 You can also get mails from remote hosts (because maildirs don't suffer
12955 from locking problems).
12956
12957 @end table
12958
12959 Two example maildir mail sources:
12960
12961 @lisp
12962 (maildir :path "/home/user-name/Maildir/"
12963          :subdirs ("cur" "new"))
12964 @end lisp
12965
12966 @lisp
12967 (maildir :path "/user@@remotehost.org:~/Maildir/"
12968          :subdirs ("new"))
12969 @end lisp
12970
12971 @item imap
12972 Get mail from a @sc{imap} server.  If you don't want to use @sc{imap}
12973 as intended, as a network mail reading protocol (ie with nnimap), for
12974 some reason or other, Gnus let you treat it similar to a POP server
12975 and fetches articles from a given @sc{imap} mailbox.  @xref{IMAP}, for
12976 more information.
12977
12978 Note that for the Kerberos, GSSAPI, SSL/TLS and STARTTLS support you
12979 may need external programs and libraries, @xref{IMAP}.
12980
12981 Keywords:
12982
12983 @table @code
12984 @item :server
12985 The name of the @sc{imap} server.  The default is taken from the
12986 @code{MAILHOST} environment variable.
12987
12988 @item :port
12989 The port number of the @sc{imap} server.  The default is @samp{143}, or
12990 @samp{993} for SSL/TLS connections.
12991
12992 @item :user
12993 The user name to give to the @sc{imap} server.  The default is the login
12994 name.
12995
12996 @item :password
12997 The password to give to the @sc{imap} server.  If not specified, the user is
12998 prompted.
12999
13000 @item :stream
13001 What stream to use for connecting to the server, this is one of the
13002 symbols in @code{imap-stream-alist}.  Right now, this means
13003 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{ssl},
13004 @samp{shell} or the default @samp{network}.
13005
13006 @item :authentication
13007 Which authenticator to use for authenticating to the server, this is
13008 one of the symbols in @code{imap-authenticator-alist}.  Right now,
13009 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13010 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13011
13012 @item :program
13013 When using the `shell' :stream, the contents of this variable is
13014 mapped into the `imap-shell-program' variable.  This should be a
13015 @code{format}-like string (or list of strings).  Here's an example:
13016
13017 @example
13018 ssh %s imapd
13019 @end example
13020
13021 The valid format specifier characters are:
13022
13023 @table @samp
13024 @item s
13025 The name of the server.
13026
13027 @item l
13028 User name from `imap-default-user'.
13029
13030 @item p
13031 The port number of the server.
13032 @end table
13033
13034 The values used for these specs are taken from the values you give the
13035 corresponding keywords.
13036
13037 @item :mailbox
13038 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13039 which normally is the mailbox which receive incoming mail.
13040
13041 @item :predicate
13042 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13043 UNDELETED}, is probably the best choice for most people, but if you
13044 sometimes peek in your mailbox with a @sc{imap} client and mark some
13045 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13046 Then all articles in the mailbox is fetched, no matter what.  For a
13047 complete list of predicates, see RFC 2060 section 6.4.4.
13048
13049 @item :fetchflag
13050 How to flag fetched articles on the server, the default @samp{\Deleted}
13051 will mark them as deleted, an alternative would be @samp{\Seen} which
13052 would simply mark them as read.  These are the two most likely choices,
13053 but more flags are defined in RFC 2060 section 2.3.2.
13054
13055 @item :dontexpunge
13056 If non-nil, don't remove all articles marked as deleted in the mailbox
13057 after finishing the fetch.
13058
13059 @end table
13060
13061 An example @sc{imap} mail source:
13062
13063 @lisp
13064 (imap :server "mail.mycorp.com"
13065       :stream kerberos4
13066       :fetchflag "\\Seen")
13067 @end lisp
13068
13069 @item webmail
13070 Get mail from a webmail server, such as @uref{www.hotmail.com},
13071 @uref{webmail.netscape.com}, @uref{www.netaddress.com},
13072 @uref{mail.yahoo..com}.
13073
13074 NOTE: Webmail largely depends cookies. A "one-line-cookie" patch is
13075 required for url "4.0pre.46".
13076
13077 WARNING: Mails may be lost.  NO WARRANTY.
13078
13079 Keywords:
13080
13081 @table @code
13082 @item :subtype
13083 The type of the webmail server.  The default is @code{hotmail}.  The
13084 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13085
13086 @item :user
13087 The user name to give to the webmail server.  The default is the login
13088 name.
13089
13090 @item :password
13091 The password to give to the webmail server.  If not specified, the user is
13092 prompted.
13093
13094 @item :dontexpunge
13095 If non-nil, only fetch unread articles and don't move them to trash
13096 folder after finishing the fetch.
13097
13098 @end table
13099
13100 An example webmail source:
13101
13102 @lisp
13103 (webmail :subtype 'hotmail
13104          :user "user-name"
13105          :password "secret")
13106 @end lisp
13107 @end table
13108
13109 @table @dfn
13110 @item Common Keywords
13111 Common keywords can be used in any type of mail source.
13112
13113 Keywords:
13114
13115 @table @code
13116 @item :plugged
13117 If non-nil, fetch the mail even when Gnus is unplugged.  If you use
13118 directory source to get mail, you can specify it as in this example:
13119
13120 @lisp
13121 (setq mail-sources
13122       '((directory :path "/home/pavel/.Spool/"
13123                    :suffix ""
13124                    :plugged t)))
13125 @end lisp
13126
13127 Gnus will then fetch your mail even when you are unplugged.  This is
13128 useful when you use local mail and news.
13129
13130 @end table
13131 @end table
13132
13133 @subsubsection Function Interface
13134
13135 Some of the above keywords specify a Lisp function to be executed.
13136 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13137 the value of the keyword while the function is executing.  For example,
13138 consider the following mail-source setting:
13139
13140 @lisp
13141 (setq mail-sources '((pop :user "jrl"
13142                           :server "pophost" :function fetchfunc)))
13143 @end lisp
13144
13145 While the function @code{fetchfunc} is executing, the symbol @code{user}
13146 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13147 @code{"pophost"}.  The symbols @code{port}, @code{password},
13148 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13149 and @code{authentication} are also bound (to their default values).
13150
13151 See above for a list of keywords for each type of mail source.
13152
13153
13154 @node Mail Source Customization
13155 @subsubsection Mail Source Customization
13156
13157 The following is a list of variables that influence how the mail is
13158 fetched.  You would normally not need to set or change any of these
13159 variables.
13160
13161 @table @code
13162 @item mail-source-crash-box
13163 @vindex mail-source-crash-box
13164 File where mail will be stored while processing it.  The default is
13165 @file{~/.emacs-mail-crash-box}.
13166
13167 @item mail-source-delete-incoming
13168 @vindex mail-source-delete-incoming
13169 If non-@code{nil}, delete incoming files after handling them.
13170
13171 @item mail-source-directory
13172 @vindex mail-source-directory
13173 Directory where files (if any) will be stored.  The default is
13174 @file{~/Mail/}.  At present, the only thing this is used for is to say
13175 where the incoming files will be stored if the previous variable is
13176 @code{nil}.
13177
13178 @item mail-source-incoming-file-prefix
13179 @vindex mail-source-incoming-file-prefix
13180 Prefix for file name for storing incoming mail.  The default is
13181 @file{Incoming}, in which case files will end up with names like
13182 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13183 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13184
13185 @item mail-source-default-file-modes
13186 @vindex mail-source-default-file-modes
13187 All new mail files will get this file mode.  The default is 384.
13188
13189 @item mail-source-movemail-program
13190 @vindex mail-source-movemail-program
13191 If non-nil, name of program for fetching new mail.  If nil,
13192 @code{movemail} in @var{exec-directory}.
13193
13194 @end table
13195
13196
13197 @node Fetching Mail
13198 @subsubsection Fetching Mail
13199
13200 @vindex mail-sources
13201 @vindex nnmail-spool-file
13202 The way to actually tell Gnus where to get new mail from is to set
13203 @code{mail-sources} to a list of mail source specifiers
13204 (@pxref{Mail Source Specifiers}).
13205
13206 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13207 @code{nil}, the mail back ends will never attempt to fetch mail by
13208 themselves.
13209
13210 If you want to fetch mail both from your local spool as well as a POP
13211 mail server, you'd say something like:
13212
13213 @lisp
13214 (setq mail-sources
13215       '((file)
13216         (pop :server "pop3.mail.server"
13217              :password "secret")))
13218 @end lisp
13219
13220 Or, if you don't want to use any of the keyword defaults:
13221
13222 @lisp
13223 (setq mail-sources
13224       '((file :path "/var/spool/mail/user-name")
13225         (pop :server "pop3.mail.server"
13226              :user "user-name"
13227              :port "pop3"
13228              :password "secret")))
13229 @end lisp
13230
13231
13232 When you use a mail back end, Gnus will slurp all your mail from your
13233 inbox and plonk it down in your home directory.  Gnus doesn't move any
13234 mail if you're not using a mail back end---you have to do a lot of magic
13235 invocations first.  At the time when you have finished drawing the
13236 pentagram, lightened the candles, and sacrificed the goat, you really
13237 shouldn't be too surprised when Gnus moves your mail.
13238
13239
13240
13241 @node Mail Back End Variables
13242 @subsection Mail Back End Variables
13243
13244 These variables are (for the most part) pertinent to all the various
13245 mail back ends.
13246
13247 @table @code
13248 @vindex nnmail-read-incoming-hook
13249 @item nnmail-read-incoming-hook
13250 The mail back ends all call this hook after reading new mail.  You can
13251 use this hook to notify any mail watch programs, if you want to.
13252
13253 @vindex nnmail-split-hook
13254 @item nnmail-split-hook
13255 @findex article-decode-encoded-words
13256 @findex RFC 1522 decoding
13257 @findex RFC 2047 decoding
13258 Hook run in the buffer where the mail headers of each message is kept
13259 just before the splitting based on these headers is done.  The hook is
13260 free to modify the buffer contents in any way it sees fit---the buffer
13261 is discarded after the splitting has been done, and no changes performed
13262 in the buffer will show up in any files.
13263 @code{gnus-article-decode-encoded-words} is one likely function to add
13264 to this hook.
13265
13266 @vindex nnmail-pre-get-new-mail-hook
13267 @vindex nnmail-post-get-new-mail-hook
13268 @item nnmail-pre-get-new-mail-hook
13269 @itemx nnmail-post-get-new-mail-hook
13270 These are two useful hooks executed when treating new incoming
13271 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13272 starting to handle the new mail) and
13273 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13274 is done).  Here's and example of using these two hooks to change the
13275 default file modes the new mail files get:
13276
13277 @lisp
13278 (add-hook 'nnmail-pre-get-new-mail-hook
13279           (lambda () (set-default-file-modes 511)))
13280
13281 (add-hook 'nnmail-post-get-new-mail-hook
13282           (lambda () (set-default-file-modes 551)))
13283 @end lisp
13284
13285 @item nnmail-use-long-file-names
13286 @vindex nnmail-use-long-file-names
13287 If non-@code{nil}, the mail back ends will use long file and directory
13288 names.  Groups like @samp{mail.misc} will end up in directories
13289 (assuming use of @code{nnml} back end) or files (assuming use of
13290 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13291 the same group will end up in @file{mail/misc}.
13292
13293 @item nnmail-delete-file-function
13294 @vindex nnmail-delete-file-function
13295 @findex delete-file
13296 Function called to delete files.  It is @code{delete-file} by default.
13297
13298 @item nnmail-cache-accepted-message-ids
13299 @vindex nnmail-cache-accepted-message-ids
13300 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13301 the back end (via @code{Gcc}, for instance) into the mail duplication
13302 discovery cache.  The default is @code{nil}.
13303
13304 @item nnmail-cache-ignore-groups
13305 @vindex nnmail-cache-ignore-groups
13306 This can be a regular expression or a list of regular expressions.
13307 Group names that match any of the regular expressions will never be
13308 recorded in the @code{Message-ID} cache.
13309
13310 This can be useful, for example, when using Fancy Splitting
13311 (@pxref{Fancy Mail Splitting}) together with the function
13312 @code{nnmail-split-fancy-with-parent}.
13313
13314 @end table
13315
13316
13317 @node Fancy Mail Splitting
13318 @subsection Fancy Mail Splitting
13319 @cindex mail splitting
13320 @cindex fancy mail splitting
13321
13322 @vindex nnmail-split-fancy
13323 @findex nnmail-split-fancy
13324 If the rather simple, standard method for specifying how to split mail
13325 doesn't allow you to do what you want, you can set
13326 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13327 play with the @code{nnmail-split-fancy} variable.
13328
13329 Let's look at an example value of this variable first:
13330
13331 @lisp
13332 ;; Messages from the mailer daemon are not crossposted to any of
13333 ;; the ordinary groups.  Warnings are put in a separate group
13334 ;; from real errors.
13335 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13336                    "mail.misc"))
13337    ;; Non-error messages are crossposted to all relevant
13338    ;; groups, but we don't crosspost between the group for the
13339    ;; (ding) list and the group for other (ding) related mail.
13340    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13341          ("subject" "ding" "ding.misc"))
13342       ;; Other mailing lists...
13343       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13344       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13345       ;; Both lists below have the same suffix, so prevent
13346       ;; cross-posting to mkpkg.list of messages posted only to
13347       ;; the bugs- list, but allow cross-posting when the
13348       ;; message was really cross-posted.
13349       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13350       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13351       ;; People...
13352       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13353    ;; Unmatched mail goes to the catch all group.
13354    "misc.misc")
13355 @end lisp
13356
13357 This variable has the format of a @dfn{split}.  A split is a (possibly)
13358 recursive structure where each split may contain other splits.  Here are
13359 the five possible split syntaxes:
13360
13361 @enumerate
13362
13363 @item
13364 @samp{group}: If the split is a string, that will be taken as a group
13365 name.  Normal regexp match expansion will be done.  See below for
13366 examples.
13367
13368 @item
13369 @code{(@var{field} @var{value} @code{[-} @var{restrict}
13370 @code{[@dots{}]}@code{]} @var{split})}: If the split is a list, the
13371 first element of which is a string, then store the message as
13372 specified by @var{split}, if header @var{field} (a regexp) contains
13373 @var{value} (also a regexp).  If @var{restrict} (yet another regexp)
13374 matches some string after @var{field} and before the end of the
13375 matched @var{value}, the @var{split} is ignored.  If none of the
13376 @var{restrict} clauses match, @var{split} is processed.
13377
13378 @item
13379 @code{(| @var{split}@dots{})}: If the split is a list, and the first
13380 element is @code{|} (vertical bar), then process each @var{split} until
13381 one of them matches.  A @var{split} is said to match if it will cause
13382 the mail message to be stored in one or more groups.
13383
13384 @item
13385 @code{(& @var{split}@dots{})}: If the split is a list, and the first
13386 element is @code{&}, then process all @var{split}s in the list.
13387
13388 @item
13389 @code{junk}: If the split is the symbol @code{junk}, then don't save
13390 (i.e., delete) this message.  Use with extreme caution.
13391
13392 @item
13393 @code{(: @var{function} @var{arg1} @var{arg2} @dots{})}:  If the split is
13394 a list, and the first element is @code{:}, then the second element will
13395 be called as a function with @var{args} given as arguments.  The
13396 function should return a @var{split}.
13397
13398 @cindex body split
13399 For instance, the following function could be used to split based on the
13400 body of the messages:
13401
13402 @lisp
13403 (defun split-on-body ()
13404   (save-excursion
13405     (set-buffer " *nnmail incoming*")
13406     (goto-char (point-min))
13407     (when (re-search-forward "Some.*string" nil t)
13408       "string.group")))
13409 @end lisp
13410
13411 The @samp{" *nnmail incoming*"} is narrowed to the message in question
13412 when the @code{:} function is run.
13413
13414 @item
13415 @code{(! @var{func} @var{split})}: If the split is a list, and the first
13416 element is @code{!}, then SPLIT will be processed, and FUNC will be
13417 called as a function with the result of SPLIT as argument.  FUNC should
13418 return a split.
13419
13420 @item
13421 @code{nil}: If the split is @code{nil}, it is ignored.
13422
13423 @end enumerate
13424
13425 In these splits, @var{field} must match a complete field name.
13426 @var{value} must match a complete word according to the fundamental mode
13427 syntax table.  You can use @code{.*} in the regexps to match partial
13428 field names or words.  In other words, all @var{value}'s are wrapped in
13429 @samp{\<} and @samp{\>} pairs.
13430
13431 @vindex nnmail-split-abbrev-alist
13432 @var{field} and @var{value} can also be lisp symbols, in that case they
13433 are expanded as specified by the variable
13434 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells, where
13435 the @code{car} of a cell contains the key, and the @code{cdr} contains the associated
13436 value.
13437
13438 @vindex nnmail-split-fancy-syntax-table
13439 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
13440 when all this splitting is performed.
13441
13442 If you want to have Gnus create groups dynamically based on some
13443 information in the headers (i.e., do @code{replace-match}-like
13444 substitutions in the group names), you can say things like:
13445
13446 @example
13447 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
13448 @end example
13449
13450 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
13451 will be filed in @samp{mail.debian.foo}.
13452
13453 If the string contains the element @samp{\&}, then the previously
13454 matched string will be substituted.  Similarly, the elements @samp{\\1}
13455 up to @samp{\\9} will be substituted with the text matched by the
13456 groupings 1 through 9.
13457
13458 @findex nnmail-split-fancy-with-parent
13459 @code{nnmail-split-fancy-with-parent} is a function which allows you to
13460 split followups into the same groups their parents are in.  Sometimes
13461 you can't make splitting rules for all your mail.  For example, your
13462 boss might send you personal mail regarding different projects you are
13463 working on, and as you can't tell your boss to put a distinguishing
13464 string into the subject line, you have to resort to manually moving the
13465 messages into the right group.  With this function, you only have to do
13466 it once per thread.
13467
13468 To use this feature, you have to set @code{nnmail-treat-duplicates} and
13469 @code{nnmail-cache-accepted-message-ids} to a non-nil value.  And then
13470 you can include @code{nnmail-split-fancy-with-parent} using the colon
13471 feature, like so:
13472 @lisp
13473 (setq nnmail-treat-duplicates 'warn     ; or 'delete
13474       nnmail-cache-accepted-message-ids t
13475       nnmail-split-fancy
13476       '(| (: nnmail-split-fancy-with-parent)
13477           ;; other splits go here
13478         ))
13479 @end lisp
13480
13481 This feature works as follows: when @code{nnmail-treat-duplicates} is
13482 non-nil, Gnus records the message id of every message it sees in the
13483 file specified by the variable @code{nnmail-message-id-cache-file},
13484 together with the group it is in (the group is omitted for non-mail
13485 messages).  When mail splitting is invoked, the function
13486 @code{nnmail-split-fancy-with-parent} then looks at the References (and
13487 In-Reply-To) header of each message to split and searches the file
13488 specified by @code{nnmail-message-id-cache-file} for the message ids.
13489 When it has found a parent, it returns the corresponding group name
13490 unless the group name matches the regexp
13491 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is recommended
13492 that you set @code{nnmail-message-id-cache-length} to a somewhat higher
13493 number than the default so that the message ids are still in the cache.
13494 (A value of 5000 appears to create a file some 300 kBytes in size.)
13495 @vindex nnmail-cache-accepted-message-ids
13496 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
13497 also records the message ids of moved articles, so that the followup
13498 messages goes into the new group.
13499
13500 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
13501 want certain groups to be recorded in the cache.  For example, if all
13502 outgoing messages are written to an `outgoing' group, you could set
13503 @code{nnmail-cache-ignore-groups} to match that group name.
13504 Otherwise, answers to all your messages would end up in the
13505 `outgoing' group.
13506
13507
13508 @node Group Mail Splitting
13509 @subsection Group Mail Splitting
13510 @cindex mail splitting
13511 @cindex group mail splitting
13512
13513 @findex gnus-group-split
13514 If you subscribe to dozens of mailing lists but you don't want to
13515 maintain mail splitting rules manually, group mail splitting is for you.
13516 You just have to set @var{to-list} and/or @var{to-address} in group
13517 parameters or group customization and set @code{nnmail-split-methods} to
13518 @code{gnus-group-split}.  This splitting function will scan all groups
13519 for those parameters and split mail accordingly, i.e., messages posted
13520 from or to the addresses specified in the parameters @var{to-list} or
13521 @var{to-address} of a mail group will be stored in that group.
13522
13523 Sometimes, mailing lists have multiple addresses, and you may want mail
13524 splitting to recognize them all: just set the @var{extra-aliases} group
13525 parameter to the list of additional addresses and it's done.  If you'd
13526 rather use a regular expression, set @var{split-regexp}.
13527
13528 All these parameters in a group will be used to create an
13529 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
13530 the @var{value} is a single regular expression that matches
13531 @var{to-list}, @var{to-address}, all of @var{extra-aliases} and all
13532 matches of @var{split-regexp}, and the @var{split} is the name of the
13533 group.  @var{restrict}s are also supported: just set the
13534 @var{split-exclude} parameter to a list of regular expressions.
13535
13536 If you can't get the right split to be generated using all these
13537 parameters, or you just need something fancier, you can set the
13538 parameter @var{split-spec} to an @code{nnmail-split-fancy} split.  In
13539 this case, all other aforementioned parameters will be ignored by
13540 @code{gnus-group-split}.  In particular, @var{split-spec} may be set to
13541 @code{nil}, in which case the group will be ignored by
13542 @code{gnus-group-split}.
13543
13544 @vindex gnus-group-split-default-catch-all-group
13545 @code{gnus-group-split} will do cross-posting on all groups that match,
13546 by defining a single @code{&} fancy split containing one split for each
13547 group.  If a message doesn't match any split, it will be stored in the
13548 group named in @code{gnus-group-split-default-catch-all-group}, unless
13549 some group has @var{split-spec} set to @code{catch-all}, in which case
13550 that group is used as the catch-all group.  Even though this variable is
13551 often used just to name a group, it may also be set to an arbitrarily
13552 complex fancy split (after all, a group name is a fancy split), and this
13553 may be useful to split mail that doesn't go to any mailing list to
13554 personal mail folders.  Note that this fancy split is added as the last
13555 element of a @code{|} split list that also contains a @code{&} split
13556 with the rules extracted from group parameters.
13557
13558 It's time for an example.  Assume the following group parameters have
13559 been defined:
13560
13561 @example
13562 nnml:mail.bar:
13563 ((to-address . "bar@@femail.com")
13564  (split-regexp . ".*@@femail\\.com"))
13565 nnml:mail.foo:
13566 ((to-list . "foo@@nowhere.gov")
13567  (extra-aliases "foo@@localhost" "foo-redist@@home")
13568  (split-exclude "bugs-foo" "rambling-foo")
13569  (admin-address . "foo-request@@nowhere.gov"))
13570 nnml:mail.others:
13571 ((split-spec . catch-all))
13572 @end example
13573
13574 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
13575 behave as if @code{nnmail-split-fancy} had been selected and variable
13576 @code{nnmail-split-fancy} had been set as follows:
13577
13578 @lisp
13579 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
13580       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
13581            - "bugs-foo" - "rambling-foo" "mail.foo"))
13582    "mail.others")
13583 @end lisp
13584
13585 @findex gnus-group-split-fancy
13586 If you'd rather not use group splitting for all your mail groups, you
13587 may use it for only some of them, by using @code{nnmail-split-fancy}
13588 splits like this:
13589
13590 @lisp
13591 (: gnus-group-split-fancy GROUPS NO-CROSSPOST CATCH-ALL)
13592 @end lisp
13593
13594 @var{groups} may be a regular expression or a list of group names whose
13595 parameters will be scanned to generate the output split.
13596 @var{no-crosspost} can be used to disable cross-posting; in this case, a
13597 single @code{|} split will be output.  @var{catch-all} is the fallback
13598 fancy split, used like @var{gnus-group-split-default-catch-all-group}.
13599 If @var{catch-all} is @code{nil}, or if @var{split-regexp} matches the
13600 empty string in any selected group, no catch-all split will be issued.
13601 Otherwise, if some group has @var{split-spec} set to @code{catch-all},
13602 this group will override the value of the @var{catch-all} argument.
13603
13604 @findex gnus-group-split-setup
13605 Unfortunately, scanning all groups and their parameters can be quite
13606 slow, especially considering that it has to be done for every message.
13607 But don't despair!  The function @code{gnus-group-split-setup} can be
13608 used to enable @code{gnus-group-split} in a much more efficient way.  It
13609 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
13610 @code{nnmail-split-fancy} to the split produced by
13611 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
13612 scanned once, no matter how many messages are split.
13613
13614 @findex gnus-group-split-update
13615 However, if you change group parameters, you'd have to update
13616 @code{nnmail-split-fancy} manually.  You can do it by running
13617 @code{gnus-group-split-update}.  If you'd rather have it updated
13618 automatically, just tell @code{gnus-group-split-setup} to do it for
13619 you.  For example, add to your @file{.gnus}:
13620
13621 @lisp
13622 (gnus-group-split-setup AUTO-UPDATE CATCH-ALL)
13623 @end lisp
13624
13625 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
13626 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
13627 have to worry about updating @code{nnmail-split-fancy} again.  If you
13628 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
13629 @code{gnus-group-split-default-catch-all-group} will be set to its
13630 value.
13631
13632 @vindex gnus-group-split-updated-hook
13633 Because you may want to change @code{nnmail-split-fancy} after it is set
13634 by @code{gnus-group-split-update}, this function will run
13635 @code{gnus-group-split-updated-hook} just before finishing.
13636
13637 @node Incorporating Old Mail
13638 @subsection Incorporating Old Mail
13639 @cindex incorporating old mail
13640 @cindex import old mail
13641
13642 Most people have lots of old mail stored in various file formats.  If
13643 you have set up Gnus to read mail using one of the spiffy Gnus mail
13644 back ends, you'll probably wish to have that old mail incorporated into
13645 your mail groups.
13646
13647 Doing so can be quite easy.
13648
13649 To take an example: You're reading mail using @code{nnml}
13650 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
13651 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
13652 file filled with important, but old, mail.  You want to move it into
13653 your @code{nnml} groups.
13654
13655 Here's how:
13656
13657 @enumerate
13658 @item
13659 Go to the group buffer.
13660
13661 @item
13662 Type `G f' and give the path to the mbox file when prompted to create an
13663 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
13664
13665 @item
13666 Type `SPACE' to enter the newly created group.
13667
13668 @item
13669 Type `M P b' to process-mark all articles in this group's buffer
13670 (@pxref{Setting Process Marks}).
13671
13672 @item
13673 Type `B r' to respool all the process-marked articles, and answer
13674 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
13675 @end enumerate
13676
13677 All the mail messages in the mbox file will now also be spread out over
13678 all your @code{nnml} groups.  Try entering them and check whether things
13679 have gone without a glitch.  If things look ok, you may consider
13680 deleting the mbox file, but I wouldn't do that unless I was absolutely
13681 sure that all the mail has ended up where it should be.
13682
13683 Respooling is also a handy thing to do if you're switching from one mail
13684 back end to another.  Just respool all the mail in the old mail groups
13685 using the new mail back end.
13686
13687
13688 @node Expiring Mail
13689 @subsection Expiring Mail
13690 @cindex article expiry
13691
13692 Traditional mail readers have a tendency to remove mail articles when
13693 you mark them as read, in some way.  Gnus takes a fundamentally
13694 different approach to mail reading.
13695
13696 Gnus basically considers mail just to be news that has been received in
13697 a rather peculiar manner.  It does not think that it has the power to
13698 actually change the mail, or delete any mail messages.  If you enter a
13699 mail group, and mark articles as ``read'', or kill them in some other
13700 fashion, the mail articles will still exist on the system.  I repeat:
13701 Gnus will not delete your old, read mail.  Unless you ask it to, of
13702 course.
13703
13704 To make Gnus get rid of your unwanted mail, you have to mark the
13705 articles as @dfn{expirable}.  (With the default keybindings, this means
13706 that you have to type @kbd{E}.)  This does not mean that the articles
13707 will disappear right away, however.  In general, a mail article will be
13708 deleted from your system if, 1) it is marked as expirable, AND 2) it is
13709 more than one week old.  If you do not mark an article as expirable, it
13710 will remain on your system until hell freezes over.  This bears
13711 repeating one more time, with some spurious capitalizations: IF you do
13712 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
13713
13714 You do not have to mark articles as expirable by hand.  Gnus provides
13715 two features, called `auto-expire' and `total-expire', that can help you
13716 with this.  In a nutshell, `auto-expire' means that Gnus hits @kbd{E}
13717 for you when you select an article.  And `total-expire' means that Gnus
13718 considers all articles as expirable that are read.  So, in addition to
13719 the articles marked @samp{E}, also the articles marked @samp{r},
13720 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
13721 expirable.
13722
13723 When should either auto-expire or total-expire be used?  Most people
13724 who are subscribed to mailing lists split each list into its own group
13725 and then turn on auto-expire or total-expire for those groups.
13726 (@xref{Splitting Mail}, for more information on splitting each list
13727 into its own group.)
13728
13729 Which one is better, auto-expire or total-expire?  It's not easy to
13730 answer.  Generally speaking, auto-expire is probably faster.  Another
13731 advantage of auto-expire is that you get more marks to work with: for
13732 the articles that are supposed to stick around, you can still choose
13733 between tick and dormant and read marks.  But with total-expire, you
13734 only have dormant and ticked to choose from.  The advantage of
13735 total-expire is that it works well with adaptive scoring @pxref{Adaptive
13736 Scoring}.  Auto-expire works with normal scoring but not with adaptive
13737 scoring.
13738
13739 @vindex gnus-auto-expirable-newsgroups
13740 Groups that match the regular expression
13741 @code{gnus-auto-expirable-newsgroups} will have all articles that you
13742 read marked as expirable automatically.  All articles marked as
13743 expirable have an @samp{E} in the first column in the summary buffer.
13744
13745 By default, if you have auto expiry switched on, Gnus will mark all the
13746 articles you read as expirable, no matter if they were read or unread
13747 before.  To avoid having articles marked as read marked as expirable
13748 automatically, you can put something like the following in your
13749 @file{.gnus} file:
13750
13751 @vindex gnus-mark-article-hook
13752 @lisp
13753 (remove-hook 'gnus-mark-article-hook
13754              'gnus-summary-mark-read-and-unread-as-read)
13755 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
13756 @end lisp
13757
13758 Note that making a group auto-expirable doesn't mean that all read
13759 articles are expired---only the articles marked as expirable
13760 will be expired.  Also note that using the @kbd{d} command won't make
13761 articles expirable---only semi-automatic marking of articles as read will
13762 mark the articles as expirable in auto-expirable groups.
13763
13764 Let's say you subscribe to a couple of mailing lists, and you want the
13765 articles you have read to disappear after a while:
13766
13767 @lisp
13768 (setq gnus-auto-expirable-newsgroups
13769       "mail.nonsense-list\\|mail.nice-list")
13770 @end lisp
13771
13772 Another way to have auto-expiry happen is to have the element
13773 @code{auto-expire} in the group parameters of the group.
13774
13775 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
13776 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
13777 don't really mix very well.
13778
13779 @vindex nnmail-expiry-wait
13780 The @code{nnmail-expiry-wait} variable supplies the default time an
13781 expirable article has to live.  Gnus starts counting days from when the
13782 message @emph{arrived}, not from when it was sent.  The default is seven
13783 days.
13784
13785 Gnus also supplies a function that lets you fine-tune how long articles
13786 are to live, based on what group they are in.  Let's say you want to
13787 have one month expiry period in the @samp{mail.private} group, a one day
13788 expiry period in the @samp{mail.junk} group, and a six day expiry period
13789 everywhere else:
13790
13791 @vindex nnmail-expiry-wait-function
13792 @lisp
13793 (setq nnmail-expiry-wait-function
13794       (lambda (group)
13795        (cond ((string= group "mail.private")
13796                31)
13797              ((string= group "mail.junk")
13798                1)
13799              ((string= group "important")
13800                'never)
13801              (t
13802                6))))
13803 @end lisp
13804
13805 The group names this function is fed are ``unadorned'' group
13806 names---no @samp{nnml:} prefixes and the like.
13807
13808 The @code{nnmail-expiry-wait} variable and
13809 @code{nnmail-expiry-wait-function} function can either be a number (not
13810 necessarily an integer) or one of the symbols @code{immediate} or
13811 @code{never}.
13812
13813 You can also use the @code{expiry-wait} group parameter to selectively
13814 change the expiry period (@pxref{Group Parameters}).
13815
13816 @vindex nnmail-expiry-target
13817 The normal action taken when expiring articles is to delete them.
13818 However, in some circumstances it might make more sense to move them
13819 to other groups instead of deleting them.  The variable
13820 @code{nnmail-expiry-target} (and the @code{expiry-target} group
13821 parameter) controls this.  The variable supplies a default value for
13822 all groups, which can be overridden for specific groups by the group
13823 parameter.  default value is @code{delete}, but this can also be a
13824 string (which should be the name of the group the message should be
13825 moved to), or a function (which will be called in a buffer narrowed to
13826 the message in question, and with the name of the group being moved
13827 from as its parameter) which should return a target -- either a group
13828 name or @code{delete}.
13829
13830 Here's an example for specifying a group name:
13831 @lisp
13832 (setq nnmail-expiry-target "nnml:expired")
13833 @end lisp
13834
13835 @findex nnmail-fancy-expiry-target
13836 @vindex nnmail-fancy-expiry-targets
13837 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
13838 expire mail to groups according to the variable
13839 @code{nnmail-fancy-expiry-targets}.  Here's an example:
13840
13841 @lisp
13842  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
13843        nnmail-fancy-expiry-targets
13844        '((to-from "boss" "nnfolder:Work")
13845          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
13846          ("from" ".*" "nnfolder:Archive-%Y")))
13847 @end lisp
13848
13849 With this setup, any mail that has @code{IMPORTANT} in its Subject
13850 header and was sent in the year @code{YYYY} and month @code{MMM}, will
13851 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}. If its
13852 From or To header contains the string @code{boss}, it will get expired
13853 to @code{nnfolder:Work}. All other mail will get expired to
13854 @code{nnfolder:Archive-YYYY}.
13855
13856 @vindex nnmail-keep-last-article
13857 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
13858 expire the final article in a mail newsgroup.  This is to make life
13859 easier for procmail users.
13860
13861 @vindex gnus-total-expirable-newsgroups
13862 By the way: That line up there, about Gnus never expiring non-expirable
13863 articles, is a lie.  If you put @code{total-expire} in the group
13864 parameters, articles will not be marked as expirable, but all read
13865 articles will be put through the expiry process.  Use with extreme
13866 caution.  Even more dangerous is the
13867 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
13868 this regexp will have all read articles put through the expiry process,
13869 which means that @emph{all} old mail articles in the groups in question
13870 will be deleted after a while.  Use with extreme caution, and don't come
13871 crying to me when you discover that the regexp you used matched the
13872 wrong group and all your important mail has disappeared.  Be a
13873 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
13874 with!  So there!
13875
13876 Most people make most of their mail groups total-expirable, though.
13877
13878 @vindex gnus-inhibit-user-auto-expire
13879 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
13880 commands will not mark an article as expirable, even if the group has
13881 auto-expire turned on.
13882
13883
13884 @node Washing Mail
13885 @subsection Washing Mail
13886 @cindex mail washing
13887 @cindex list server brain damage
13888 @cindex incoming mail treatment
13889
13890 Mailers and list servers are notorious for doing all sorts of really,
13891 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
13892 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
13893 end of all lines passing through our server, so let's do that!!!!1!''
13894 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
13895 considered to be self-evident were not discussed.  So.  Here we are.
13896
13897 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
13898 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
13899 be shocked and dismayed by this, but I haven't got the energy.  It is to
13900 laugh.
13901
13902 Gnus provides a plethora of functions for washing articles while
13903 displaying them, but it might be nicer to do the filtering before
13904 storing the mail to disk.  For that purpose, we have three hooks and
13905 various functions that can be put in these hooks.
13906
13907 @table @code
13908 @item nnmail-prepare-incoming-hook
13909 @vindex nnmail-prepare-incoming-hook
13910 This hook is called before doing anything with the mail and is meant for
13911 grand, sweeping gestures.  It is called in a buffer that contains all
13912 the new, incoming mail.  Functions to be used include:
13913
13914 @table @code
13915 @item nnheader-ms-strip-cr
13916 @findex nnheader-ms-strip-cr
13917 Remove trailing carriage returns from each line.  This is default on
13918 Emacs running on MS machines.
13919
13920 @end table
13921
13922 @item nnmail-prepare-incoming-header-hook
13923 @vindex nnmail-prepare-incoming-header-hook
13924 This hook is called narrowed to each header.  It can be used when
13925 cleaning up the headers.  Functions that can be used include:
13926
13927 @table @code
13928 @item nnmail-remove-leading-whitespace
13929 @findex nnmail-remove-leading-whitespace
13930 Clear leading white space that ``helpful'' listservs have added to the
13931 headers to make them look nice.  Aaah.
13932
13933 (Note that this function works on both the header on the body of all
13934 messages, so it is a potentially dangerous function to use (if a body
13935 of a message contains something that looks like a header line).  So
13936 rather than fix the bug, it is of course the right solution to make it
13937 into a feature by documenting it.)
13938
13939 @item nnmail-remove-list-identifiers
13940 @findex nnmail-remove-list-identifiers
13941 Some list servers add an identifier---for example, @samp{(idm)}---to the
13942 beginning of all @code{Subject} headers.  I'm sure that's nice for
13943 people who use stone age mail readers.  This function will remove
13944 strings that match the @code{nnmail-list-identifiers} regexp, which can
13945 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
13946 @code{\\(..\\)}.
13947
13948 For instance, if you want to remove the @samp{(idm)} and the
13949 @samp{nagnagnag} identifiers:
13950
13951 @lisp
13952 (setq nnmail-list-identifiers
13953       '("(idm)" "nagnagnag"))
13954 @end lisp
13955
13956 This can also be done non-destructively with
13957 @code{gnus-list-identifiers}, @xref{Article Hiding}.
13958
13959 @item nnmail-remove-tabs
13960 @findex nnmail-remove-tabs
13961 Translate all @samp{TAB} characters into @samp{SPACE} characters.
13962
13963 @item nnmail-fix-eudora-headers
13964 @findex nnmail-fix-eudora-headers
13965 @cindex Eudora
13966 Eudora produces broken @code{References} headers, but OK
13967 @code{In-Reply-To} headers.  This function will get rid of the
13968 @code{References} headers.
13969
13970 @end table
13971
13972 @item nnmail-prepare-incoming-message-hook
13973 @vindex nnmail-prepare-incoming-message-hook
13974 This hook is called narrowed to each message.  Functions to be used
13975 include:
13976
13977 @table @code
13978 @item article-de-quoted-unreadable
13979 @findex article-de-quoted-unreadable
13980 Decode Quoted Readable encoding.
13981
13982 @end table
13983 @end table
13984
13985
13986 @node Duplicates
13987 @subsection Duplicates
13988
13989 @vindex nnmail-treat-duplicates
13990 @vindex nnmail-message-id-cache-length
13991 @vindex nnmail-message-id-cache-file
13992 @cindex duplicate mails
13993 If you are a member of a couple of mailing lists, you will sometimes
13994 receive two copies of the same mail.  This can be quite annoying, so
13995 @code{nnmail} checks for and treats any duplicates it might find.  To do
13996 this, it keeps a cache of old @code{Message-ID}s---
13997 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
13998 default.  The approximate maximum number of @code{Message-ID}s stored
13999 there is controlled by the @code{nnmail-message-id-cache-length}
14000 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
14001 stored.) If all this sounds scary to you, you can set
14002 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14003 default), and @code{nnmail} won't delete duplicate mails.  Instead it
14004 will insert a warning into the head of the mail saying that it thinks
14005 that this is a duplicate of a different message.
14006
14007 This variable can also be a function.  If that's the case, the function
14008 will be called from a buffer narrowed to the message in question with
14009 the @code{Message-ID} as a parameter.  The function must return either
14010 @code{nil}, @code{warn}, or @code{delete}.
14011
14012 You can turn this feature off completely by setting the variable to
14013 @code{nil}.
14014
14015 If you want all the duplicate mails to be put into a special
14016 @dfn{duplicates} group, you could do that using the normal mail split
14017 methods:
14018
14019 @lisp
14020 (setq nnmail-split-fancy
14021       '(| ;; Messages duplicates go to a separate group.
14022           ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14023           ;; Message from daemons, postmaster, and the like to another.
14024           (any mail "mail.misc")
14025           ;; Other rules.
14026           [ ... ] ))
14027 @end lisp
14028
14029 Or something like:
14030 @lisp
14031 (setq nnmail-split-methods
14032       '(("duplicates" "^Gnus-Warning:.*duplicate")
14033         ;; Other rules.
14034         [...]))
14035 @end lisp
14036
14037 Here's a neat feature: If you know that the recipient reads her mail
14038 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14039 @code{delete}, you can send her as many insults as you like, just by
14040 using a @code{Message-ID} of a mail that you know that she's already
14041 received.  Think of all the fun!  She'll never see any of it!  Whee!
14042
14043
14044 @node Not Reading Mail
14045 @subsection Not Reading Mail
14046
14047 If you start using any of the mail back ends, they have the annoying
14048 habit of assuming that you want to read mail with them.  This might not
14049 be unreasonable, but it might not be what you want.
14050
14051 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14052 @code{nil}, none of the back ends will ever attempt to read incoming
14053 mail, which should help.
14054
14055 @vindex nnbabyl-get-new-mail
14056 @vindex nnmbox-get-new-mail
14057 @vindex nnml-get-new-mail
14058 @vindex nnmh-get-new-mail
14059 @vindex nnfolder-get-new-mail
14060 This might be too much, if, for instance, you are reading mail quite
14061 happily with @code{nnml} and just want to peek at some old @sc{rmail}
14062 file you have stashed away with @code{nnbabyl}.  All back ends have
14063 variables called back-end-@code{get-new-mail}.  If you want to disable
14064 the @code{nnbabyl} mail reading, you edit the virtual server for the
14065 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14066
14067 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14068 narrowed to the article to be saved before saving it when reading
14069 incoming mail.
14070
14071
14072 @node Choosing a Mail Back End
14073 @subsection Choosing a Mail Back End
14074
14075 Gnus will read the mail spool when you activate a mail group.  The mail
14076 file is first copied to your home directory.  What happens after that
14077 depends on what format you want to store your mail in.
14078
14079 There are six different mail back ends in the standard Gnus, and more
14080 back ends are available separately.  The mail back end most people use
14081 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14082 Spool}).  You might notice that only five back ends are listed below;
14083 @code{nnmaildir}'s documentation has not yet been completely
14084 incorporated into this manual.  Until it is, you can find it at
14085 @uref{http://multivac.cwru.edu./nnmaildir/}.
14086
14087 @menu
14088 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14089 * Rmail Babyl::                 Emacs programs use the rmail babyl format.
14090 * Mail Spool::                  Store your mail in a private spool?
14091 * MH Spool::                    An mhspool-like back end.
14092 * Mail Folders::                Having one file for each group.
14093 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14094 @end menu
14095
14096
14097 @node Unix Mail Box
14098 @subsubsection Unix Mail Box
14099 @cindex nnmbox
14100 @cindex unix mail box
14101
14102 @vindex nnmbox-active-file
14103 @vindex nnmbox-mbox-file
14104 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14105 mail.  @code{nnmbox} will add extra headers to each mail article to say
14106 which group it belongs in.
14107
14108 Virtual server settings:
14109
14110 @table @code
14111 @item nnmbox-mbox-file
14112 @vindex nnmbox-mbox-file
14113 The name of the mail box in the user's home directory.  Default is
14114 @file{~/mbox}.
14115
14116 @item nnmbox-active-file
14117 @vindex nnmbox-active-file
14118 The name of the active file for the mail box.  Default is
14119 @file{~/.mbox-active}.
14120
14121 @item nnmbox-get-new-mail
14122 @vindex nnmbox-get-new-mail
14123 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14124 into groups.  Default is @code{t}.
14125 @end table
14126
14127
14128 @node Rmail Babyl
14129 @subsubsection Rmail Babyl
14130 @cindex nnbabyl
14131 @cindex rmail mbox
14132
14133 @vindex nnbabyl-active-file
14134 @vindex nnbabyl-mbox-file
14135 The @dfn{nnbabyl} back end will use a babyl mail box (aka. @dfn{rmail
14136 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14137 mail article to say which group it belongs in.
14138
14139 Virtual server settings:
14140
14141 @table @code
14142 @item nnbabyl-mbox-file
14143 @vindex nnbabyl-mbox-file
14144 The name of the rmail mbox file.  The default is @file{~/RMAIL}
14145
14146 @item nnbabyl-active-file
14147 @vindex nnbabyl-active-file
14148 The name of the active file for the rmail box.  The default is
14149 @file{~/.rmail-active}
14150
14151 @item nnbabyl-get-new-mail
14152 @vindex nnbabyl-get-new-mail
14153 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14154 @code{t}
14155 @end table
14156
14157
14158 @node Mail Spool
14159 @subsubsection Mail Spool
14160 @cindex nnml
14161 @cindex mail @sc{nov} spool
14162
14163 The @dfn{nnml} spool mail format isn't compatible with any other known
14164 format.  It should be used with some caution.
14165
14166 @vindex nnml-directory
14167 If you use this back end, Gnus will split all incoming mail into files,
14168 one file for each mail, and put the articles into the corresponding
14169 directories under the directory specified by the @code{nnml-directory}
14170 variable.  The default value is @file{~/Mail/}.
14171
14172 You do not have to create any directories beforehand; Gnus will take
14173 care of all that.
14174
14175 If you have a strict limit as to how many files you are allowed to store
14176 in your account, you should not use this back end.  As each mail gets its
14177 own file, you might very well occupy thousands of inodes within a few
14178 weeks.  If this is no problem for you, and it isn't a problem for you
14179 having your friendly systems administrator walking around, madly,
14180 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14181 know that this is probably the fastest format to use.  You do not have
14182 to trudge through a big mbox file just to read your new mail.
14183
14184 @code{nnml} is probably the slowest back end when it comes to article
14185 splitting.  It has to create lots of files, and it also generates
14186 @sc{nov} databases for the incoming mails.  This makes it possibly the
14187 fastest back end when it comes to reading mail.
14188
14189 @cindex self contained nnml servers
14190 @cindex marks
14191 When the marks file is used (which it is by default), @code{nnml}
14192 servers have the property that you may backup them using @code{tar} or
14193 similar, and later be able to restore them into Gnus (by adding the
14194 proper @code{nnml} server) and have all your marks be preserved.  Marks
14195 for a group is usually stored in the @code{.marks} file (but see
14196 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14197 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14198 to restore the group (after restoring the backup into the nnml
14199 directory).
14200
14201 If for some reason you believe your @file{.marks} files are screwed
14202 up, you can just delete them all.  Gnus will then correctly regenerate
14203 them next time it starts.
14204
14205 Virtual server settings:
14206
14207 @table @code
14208 @item nnml-directory
14209 @vindex nnml-directory
14210 All @code{nnml} directories will be placed under this directory.
14211 The default is the value of `message-directory' (whose default value is
14212 @file{~/Mail}).
14213
14214 @item nnml-active-file
14215 @vindex nnml-active-file
14216 The active file for the @code{nnml} server.  The default is
14217 @file{~/Mail/active"}.
14218
14219 @item nnml-newsgroups-file
14220 @vindex nnml-newsgroups-file
14221 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14222 Format}.  The default is @file{~/Mail/newsgroups"}.
14223
14224 @item nnml-get-new-mail
14225 @vindex nnml-get-new-mail
14226 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14227 @code{t}.
14228
14229 @item nnml-nov-is-evil
14230 @vindex nnml-nov-is-evil
14231 If non-@code{nil}, this back end will ignore any @sc{nov} files.  The
14232 default is @code{nil}.
14233
14234 @item nnml-nov-file-name
14235 @vindex nnml-nov-file-name
14236 The name of the @sc{nov} files.  The default is @file{.overview}.
14237
14238 @item nnml-prepare-save-mail-hook
14239 @vindex nnml-prepare-save-mail-hook
14240 Hook run narrowed to an article before saving.
14241
14242 @item nnml-marks-is-evil
14243 @vindex nnml-marks-is-evil
14244 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14245 default is @code{nil}.
14246
14247 @item nnml-marks-file-name
14248 @vindex nnml-marks-file-name
14249 The name of the @dfn{marks} files.  The default is @file{.marks}.
14250
14251 @item nnml-use-compressed-files
14252 @vindex nnml-use-compressed-files
14253 If non-@code{nil}, @code{nnml} will allow using compressed message
14254 files.
14255
14256 @end table
14257
14258 @findex nnml-generate-nov-databases
14259 If your @code{nnml} groups and @sc{nov} files get totally out of whack,
14260 you can do a complete update by typing @kbd{M-x
14261 nnml-generate-nov-databases}.  This command will trawl through the
14262 entire @code{nnml} hierarchy, looking at each and every article, so it
14263 might take a while to complete.  A better interface to this
14264 functionality can be found in the server buffer (@pxref{Server
14265 Commands}).
14266
14267
14268 @node MH Spool
14269 @subsubsection MH Spool
14270 @cindex nnmh
14271 @cindex mh-e mail spool
14272
14273 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
14274 @sc{nov} databases and it doesn't keep an active file or marks file.
14275 This makes @code{nnmh} a @emph{much} slower back end than @code{nnml},
14276 but it also makes it easier to write procmail scripts for.
14277
14278 Virtual server settings:
14279
14280 @table @code
14281 @item nnmh-directory
14282 @vindex nnmh-directory
14283 All @code{nnmh} directories will be located under this directory.  The
14284 default is the value of @code{message-directory} (whose default is
14285 @file{~/Mail})
14286
14287 @item nnmh-get-new-mail
14288 @vindex nnmh-get-new-mail
14289 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
14290 @code{t}.
14291
14292 @item nnmh-be-safe
14293 @vindex nnmh-be-safe
14294 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
14295 sure that the articles in the folder are actually what Gnus thinks they
14296 are.  It will check date stamps and stat everything in sight, so
14297 setting this to @code{t} will mean a serious slow-down.  If you never
14298 use anything but Gnus to read the @code{nnmh} articles, you do not have
14299 to set this variable to @code{t}.  The default is @code{nil}.
14300 @end table
14301
14302
14303 @node Mail Folders
14304 @subsubsection Mail Folders
14305 @cindex nnfolder
14306 @cindex mbox folders
14307 @cindex mail folders
14308
14309 @code{nnfolder} is a back end for storing each mail group in a separate
14310 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
14311 will add extra headers to keep track of article numbers and arrival
14312 dates.
14313
14314 @cindex self contained nnfolder servers
14315 @cindex marks
14316 When the marks file is used (which it is by default), @code{nnfolder}
14317 servers have the property that you may backup them using @code{tar} or
14318 similar, and later be able to restore them into Gnus (by adding the
14319 proper @code{nnfolder} server) and have all your marks be preserved.
14320 Marks for a group is usually stored in a file named as the mbox file
14321 with @code{.mrk} concatenated to it (but see
14322 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder} directory.
14323 Individual @code{nnfolder} groups are also possible to backup, use
14324 @kbd{G m} to restore the group (after restoring the backup into the
14325 @code{nnfolder} directory).
14326
14327 Virtual server settings:
14328
14329 @table @code
14330 @item nnfolder-directory
14331 @vindex nnfolder-directory
14332 All the @code{nnfolder} mail boxes will be stored under this directory.
14333 The default is the value of @code{message-directory} (whose default is
14334 @file{~/Mail})
14335
14336 @item nnfolder-active-file
14337 @vindex nnfolder-active-file
14338 The name of the active file.  The default is @file{~/Mail/active}.
14339
14340 @item nnfolder-newsgroups-file
14341 @vindex nnfolder-newsgroups-file
14342 The name of the group descriptions file.  @xref{Newsgroups File
14343 Format}.  The default is @file{~/Mail/newsgroups"}
14344
14345 @item nnfolder-get-new-mail
14346 @vindex nnfolder-get-new-mail
14347 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
14348 is @code{t}
14349
14350 @item nnfolder-save-buffer-hook
14351 @vindex nnfolder-save-buffer-hook
14352 @cindex backup files
14353 Hook run before saving the folders.  Note that Emacs does the normal
14354 backup renaming of files even with the @code{nnfolder} buffers.  If you
14355 wish to switch this off, you could say something like the following in
14356 your @file{.emacs} file:
14357
14358 @lisp
14359 (defun turn-off-backup ()
14360   (set (make-local-variable 'backup-inhibited) t))
14361
14362 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
14363 @end lisp
14364
14365 @item nnfolder-delete-mail-hook
14366 @vindex nnfolder-delete-mail-hook
14367 Hook run in a buffer narrowed to the message that is to be deleted.
14368 This function can be used to copy the message to somewhere else, or to
14369 extract some information from it before removing it.
14370
14371 @item nnfolder-nov-is-evil
14372 @vindex nnfolder-nov-is-evil
14373 If non-@code{nil}, this back end will ignore any @sc{nov} files.  The
14374 default is @code{nil}.
14375
14376 @item nnfolder-nov-file-suffix
14377 @vindex nnfolder-nov-file-suffix
14378 The extension for @sc{nov} files.  The default is @file{.nov}.
14379
14380 @item nnfolder-nov-directory
14381 @vindex nnfolder-nov-directory
14382 The directory where the @sc{nov} files should be stored.  If nil,
14383 @code{nnfolder-directory} is used.
14384
14385 @item nnfolder-marks-is-evil
14386 @vindex nnfolder-marks-is-evil
14387 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14388 default is @code{nil}.
14389
14390 @item nnfolder-marks-file-suffix
14391 @vindex nnfolder-marks-file-suffix
14392 The extension for @sc{marks} files.  The default is @file{.mrk}.
14393
14394 @item nnfolder-marks-directory
14395 @vindex nnfolder-marks-directory
14396 The directory where the @sc{marks} files should be stored.  If nil,
14397 @code{nnfolder-directory} is used.
14398
14399 @end table
14400
14401
14402 @findex nnfolder-generate-active-file
14403 @kindex M-x nnfolder-generate-active-file
14404 If you have lots of @code{nnfolder}-like files you'd like to read with
14405 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
14406 command to make @code{nnfolder} aware of all likely files in
14407 @code{nnfolder-directory}.  This only works if you use long file names,
14408 though.
14409
14410 @node Comparing Mail Back Ends
14411 @subsubsection Comparing Mail Back Ends
14412
14413 First, just for terminology, the @dfn{back end} is the common word for a
14414 low-level access method---a transport, if you will, by which something
14415 is acquired.  The sense is that one's mail has to come from somewhere,
14416 and so selection of a suitable back end is required in order to get that
14417 mail within spitting distance of Gnus.
14418
14419 The same concept exists for Usenet itself: Though access to articles is
14420 typically done by @sc{nntp} these days, once upon a midnight dreary, everyone
14421 in the world got at Usenet by running a reader on the machine where the
14422 articles lay (the machine which today we call an @sc{nntp} server), and
14423 access was by the reader stepping into the articles' directory spool
14424 area directly.  One can still select between either the @code{nntp} or
14425 @code{nnspool} back ends, to select between these methods, if one happens
14426 actually to live on the server (or can see its spool directly, anyway,
14427 via NFS).
14428
14429 The goal in selecting a mail back end is to pick one which
14430 simultaneously represents a suitable way of dealing with the original
14431 format plus leaving mail in a form that is convenient to use in the
14432 future.  Here are some high and low points on each:
14433
14434 @table @code
14435 @item nnmbox
14436
14437 UNIX systems have historically had a single, very common, and well-
14438 defined format.  All messages arrive in a single @dfn{spool file}, and
14439 they are delineated by a line whose regular expression matches
14440 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
14441 to make it clear in this instance that this is not the RFC-specified
14442 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
14443 historically from the Unix environment, it is simplest if one does not
14444 mess a great deal with the original mailbox format, so if one chooses
14445 this back end, Gnus' primary activity in getting mail from the real spool
14446 area to Gnus' preferred directory is simply to copy it, with no
14447 (appreciable) format change in the process.  It is the ``dumbest'' way
14448 to move mail into availability in the Gnus environment.  This makes it
14449 fast to move into place, but slow to parse, when Gnus has to look at
14450 what's where.
14451
14452 @item nnbabyl
14453
14454 Once upon a time, there was the DEC-10 and DEC-20, running operating
14455 systems called TOPS and related things, and the usual (only?) mail
14456 reading environment was a thing called Babyl.  I don't know what format
14457 was used for mail landing on the system, but Babyl had its own internal
14458 format to which mail was converted, primarily involving creating a
14459 spool-file-like entity with a scheme for inserting Babyl-specific
14460 headers and status bits above the top of each message in the file.
14461 RMAIL was Emacs' first mail reader, it was written by Richard Stallman,
14462 and Stallman came out of that TOPS/Babyl environment, so he wrote RMAIL
14463 to understand the mail files folks already had in existence.  Gnus (and
14464 VM, for that matter) continue to support this format because it's
14465 perceived as having some good qualities in those mailer-specific
14466 headers/status bits stuff.  RMAIL itself still exists as well, of
14467 course, and is still maintained by Stallman.
14468
14469 Both of the above forms leave your mail in a single file on your
14470 file system, and they must parse that entire file each time you take a
14471 look at your mail.
14472
14473 @item nnml
14474
14475 @code{nnml} is the back end which smells the most as though you were
14476 actually operating with an @code{nnspool}-accessed Usenet system.  (In
14477 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
14478 lo these years ago.)  One's mail is taken from the original spool file,
14479 and is then cut up into individual message files, 1:1.  It maintains a
14480 Usenet-style active file (analogous to what one finds in an INN- or
14481 CNews-based news system in (for instance) @file{/var/lib/news/active},
14482 or what is returned via the @samp{NNTP LIST} verb) and also creates
14483 @dfn{overview} files for efficient group entry, as has been defined for
14484 @sc{nntp} servers for some years now.  It is slower in mail-splitting,
14485 due to the creation of lots of files, updates to the @code{nnml} active
14486 file, and additions to overview files on a per-message basis, but it is
14487 extremely fast on access because of what amounts to the indexing support
14488 provided by the active file and overviews.
14489
14490 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
14491 resource which defines available places in the file system to put new
14492 files.  Sysadmins take a dim view of heavy inode occupation within
14493 tight, shared file systems.  But if you live on a personal machine where
14494 the file system is your own and space is not at a premium, @code{nnml}
14495 wins big.
14496
14497 It is also problematic using this back end if you are living in a
14498 FAT16-based Windows world, since much space will be wasted on all these
14499 tiny files.
14500
14501 @item nnmh
14502
14503 The Rand MH mail-reading system has been around UNIX systems for a very
14504 long time; it operates by splitting one's spool file of messages into
14505 individual files, but with little or no indexing support -- @code{nnmh}
14506 is considered to be semantically equivalent to ``@code{nnml} without
14507 active file or overviews''.  This is arguably the worst choice, because
14508 one gets the slowness of individual file creation married to the
14509 slowness of access parsing when learning what's new in one's groups.
14510
14511 @item nnfolder
14512
14513 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
14514 method described above) on a per-group basis.  That is, @code{nnmbox}
14515 itself puts *all* one's mail in one file; @code{nnfolder} provides a
14516 little bit of optimization to this so that each of one's mail groups has
14517 a Unix mail box file.  It's faster than @code{nnmbox} because each group
14518 can be parsed separately, and still provides the simple Unix mail box
14519 format requiring minimal effort in moving the mail around.  In addition,
14520 it maintains an ``active'' file making it much faster for Gnus to figure
14521 out how many messages there are in each separate group.
14522
14523 If you have groups that are expected to have a massive amount of
14524 messages, @code{nnfolder} is not the best choice, but if you receive
14525 only a moderate amount of mail, @code{nnfolder} is probably the most
14526 friendly mail back end all over.
14527
14528 @item nnmaildir
14529
14530 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
14531 differences.  Each message is stored in a separate file, but the
14532 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
14533 also stores the equivalent of @code{nnml}'s overview files in one file
14534 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
14535 @code{df -i} to see how plentiful your inode supply is.)  If this slows
14536 you down or takes up very much space, consider switching to ReiserFS
14537 (@uref{http://www.namesys.com/}) or another non-block-structured
14538 file system.
14539
14540 Since maildirs don't require locking for delivery, the maildirs you use
14541 as groups can also be the maildirs your mail is directly delivered to.
14542 This means you can skip Gnus's mail splitting if your mail is already
14543 organized into different mailboxes during delivery.  A @code{directory}
14544 entry in @code{mail-sources} would have a similar effect, but would
14545 require one set of mailboxes for spooling deliveries (in mbox format,
14546 thus damaging message bodies), and another set to be used as groups (in
14547 whatever format you like).  A maildir has a built-in spool, in the
14548 @code{new/} subdirectory.  Beware that currently, mail moved from
14549 @code{new/} to @code{cur/} instead of via mail splitting will undergo
14550 treatment such as duplicate checking.
14551
14552 An article will not necessarily keep the same number across Gnus
14553 sessions; articles are renumbered starting from 1 for each Gnus session
14554 (more precisely, each time you open the @code{nnmaildir} server).  This
14555 way, you don't get gaps in your article number ranges, and when entering
14556 large groups, Gnus is likely to give a more accurate article count.  The
14557 price is that @code{nnmaildir} doesn't work with the cache or agent.
14558 This will probably be changed in the future.
14559
14560 @code{nnmaildir} stores article marks for a given group in the
14561 corresponding maildir, in a way designed so that it's easy to manipulate
14562 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
14563 else, and still have your marks.  @code{nnml} also stores marks, but
14564 it's not as easy to work with them from outside Gnus as with
14565 @code{nnmaildir}.
14566
14567 For configuring expiry and other things, @code{nnmaildir} uses group
14568 parameters slightly different from those of other mail back ends.
14569
14570 @code{nnmaildir} uses a significant amount of memory to speed things up.
14571 (It keeps in memory some of the things that @code{nnml} stores in files
14572 and that @code{nnmh} repeatedly parses out of message files.)  If this
14573 is a problem for you, you can set the @code{nov-cache-size} group
14574 parameter to something small (0 would probably not work, but 1 probably
14575 would) to make it use less memory.
14576
14577 Startup and shutdown are likely to be slower with @code{nnmaildir} than
14578 with other back ends.  Everything in between is likely to be faster,
14579 depending in part on your file system.
14580
14581 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
14582 to write an @code{nnmaildir}-derived back end.
14583
14584 @end table
14585
14586
14587 @node Browsing the Web
14588 @section Browsing the Web
14589 @cindex web
14590 @cindex browsing the web
14591 @cindex www
14592 @cindex http
14593
14594 Web-based discussion forums are getting more and more popular.  On many
14595 subjects, the web-based forums have become the most important forums,
14596 eclipsing the importance of mailing lists and news groups.  The reason
14597 is easy to understand---they are friendly to new users; you just point
14598 and click, and there's the discussion.  With mailing lists, you have to
14599 go through a cumbersome subscription procedure, and most people don't
14600 even know what a news group is.
14601
14602 The problem with this scenario is that web browsers are not very good at
14603 being newsreaders.  They do not keep track of what articles you've read;
14604 they do not allow you to score on subjects you're interested in; they do
14605 not allow off-line browsing; they require you to click around and drive
14606 you mad in the end.
14607
14608 So---if web browsers suck at reading discussion forums, why not use Gnus
14609 to do it instead?
14610
14611 Gnus has been getting a bit of a collection of back ends for providing
14612 interfaces to these sources.
14613
14614 @menu
14615 * Archiving Mail::              
14616 * Web Searches::                Creating groups from articles that match a string.
14617 * Slashdot::                    Reading the Slashdot comments.
14618 * Ultimate::                    The Ultimate Bulletin Board systems.
14619 * Web Archive::                 Reading mailing list archived on web.
14620 * RSS::                         Reading RDF site summary.
14621 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
14622 @end menu
14623
14624 All the web sources require Emacs/w3 and the url library to work.
14625
14626 The main caveat with all these web sources is that they probably won't
14627 work for a very long time.  Gleaning information from the @sc{html} data
14628 is guesswork at best, and when the layout is altered, the Gnus back end
14629 will fail.  If you have reasonably new versions of these back ends,
14630 though, you should be ok.
14631
14632 One thing all these Web methods have in common is that the Web sources
14633 are often down, unavailable or just plain too slow to be fun.  In those
14634 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
14635 Unplugged}) handle downloading articles, and then you can read them at
14636 leisure from your local disk.  No more World Wide Wait for you.
14637
14638 @node Archiving Mail
14639 @subsection Archiving Mail
14640 @cindex archiving mail
14641 @cindex backup of mail
14642
14643 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
14644 @code{nnmaildir}, now actually store the article marks with each group.
14645 For these servers, archiving and restoring a group while preserving
14646 marks is fairly simple.
14647
14648 (Preserving the group level and group parameters as well still
14649 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
14650 though.)
14651
14652 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
14653 server, take a recursive copy of the server directory.  There is no need
14654 to shut down Gnus, so archiving may be invoked by @code{cron} or
14655 similar.  You restore the data by restoring the directory tree, and
14656 adding a server definition pointing to that directory in Gnus. The
14657 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
14658 might interfere with overwriting data, so you may want to shut down Gnus
14659 before you restore the data.
14660
14661 It is also possible to archive individual @code{nnml},
14662 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
14663 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
14664 directory.  For @code{nnfolder} you need to copy both the base folder
14665 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
14666 this example). Restoring the group is done with @kbd{G m} from the Group
14667 buffer.  The last step makes Gnus notice the new directory.
14668 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
14669 is unnecessary in that case.
14670
14671 @node Web Searches
14672 @subsection Web Searches
14673 @cindex nnweb
14674 @cindex Google
14675 @cindex dejanews
14676 @cindex gmane
14677 @cindex Usenet searches
14678 @cindex searching the Usenet
14679
14680 It's, like, too neat to search the Usenet for articles that match a
14681 string, but it, like, totally @emph{sucks}, like, totally, to use one of
14682 those, like, Web browsers, and you, like, have to, rilly, like, look at
14683 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
14684 searches without having to use a browser.
14685
14686 The @code{nnweb} back end allows an easy interface to the mighty search
14687 engine.  You create an @code{nnweb} group, enter a search pattern, and
14688 then enter the group and read the articles like you would any normal
14689 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
14690 Groups}) will do this in an easy-to-use fashion.
14691
14692 @code{nnweb} groups don't really lend themselves to being solid
14693 groups---they have a very fleeting idea of article numbers.  In fact,
14694 each time you enter an @code{nnweb} group (not even changing the search
14695 pattern), you are likely to get the articles ordered in a different
14696 manner.  Not even using duplicate suppression (@pxref{Duplicate
14697 Suppression}) will help, since @code{nnweb} doesn't even know the
14698 @code{Message-ID} of the articles before reading them using some search
14699 engines (Google, for instance).  The only possible way to keep track
14700 of which articles you've read is by scoring on the @code{Date}
14701 header---mark all articles posted before the last date you read the
14702 group as read.
14703
14704 If the search engine changes its output substantially, @code{nnweb}
14705 won't be able to parse it and will fail.  One could hardly fault the Web
14706 providers if they were to do this---their @emph{raison d'être} is to
14707 make money off of advertisements, not to provide services to the
14708 community.  Since @code{nnweb} washes the ads off all the articles, one
14709 might think that the providers might be somewhat miffed.  We'll see.
14710
14711 You must have the @code{url} and @code{w3} package installed to be able
14712 to use @code{nnweb}.
14713
14714 Virtual server variables:
14715
14716 @table @code
14717 @item nnweb-type
14718 @vindex nnweb-type
14719 What search engine type is being used.  The currently supported types
14720 are @code{google}, @code{dejanews}, and @code{gmane}. Note that
14721 @code{dejanews} is an alias to @code{google}.
14722
14723 @item nnweb-search
14724 @vindex nnweb-search
14725 The search string to feed to the search engine.
14726
14727 @item nnweb-max-hits
14728 @vindex nnweb-max-hits
14729 Advisory maximum number of hits per search to display.  The default is
14730 999.
14731
14732 @item nnweb-type-definition
14733 @vindex nnweb-type-definition
14734 Type-to-definition alist.  This alist says what @code{nnweb} should do
14735 with the various search engine types.  The following elements must be
14736 present:
14737
14738 @table @code
14739 @item article
14740 Function to decode the article and provide something that Gnus
14741 understands.
14742
14743 @item map
14744 Function to create an article number to message header and URL alist.
14745
14746 @item search
14747 Function to send the search string to the search engine.
14748
14749 @item address
14750 The address the aforementioned function should send the search string
14751 to.
14752
14753 @item id
14754 Format string URL to fetch an article by @code{Message-ID}.
14755 @end table
14756
14757 @end table
14758
14759
14760 @node Slashdot
14761 @subsection Slashdot
14762 @cindex Slashdot
14763 @cindex nnslashdot
14764
14765 Slashdot (@uref{http://slashdot.org/}) is a popular news site, with
14766 lively discussion following the news articles.  @code{nnslashdot} will
14767 let you read this forum in a convenient manner.
14768
14769 The easiest way to read this source is to put something like the
14770 following in your @file{.gnus.el} file:
14771
14772 @lisp
14773 (setq gnus-secondary-select-methods
14774       '((nnslashdot "")))
14775 @end lisp
14776
14777 This will make Gnus query the @code{nnslashdot} back end for new comments
14778 and groups.  The @kbd{F} command will subscribe each new news article as
14779 a new Gnus group, and you can read the comments by entering these
14780 groups.  (Note that the default subscription method is to subscribe new
14781 groups as zombies.  Other methods are available (@pxref{Subscription
14782 Methods}).
14783
14784 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
14785 command is the most handy tool (@pxref{Foreign Groups}).
14786
14787 When following up to @code{nnslashdot} comments (or posting new
14788 comments), some light @sc{html}izations will be performed.  In
14789 particular, text quoted with @samp{> } will be quoted with
14790 @code{blockquote} instead, and signatures will have @code{br} added to
14791 the end of each line.  Other than that, you can just write @sc{html}
14792 directly into the message buffer.  Note that Slashdot filters out some
14793 @sc{html} forms.
14794
14795 The following variables can be altered to change its behavior:
14796
14797 @table @code
14798 @item nnslashdot-threaded
14799 Whether @code{nnslashdot} should display threaded groups or not.  The
14800 default is @code{t}.  To be able to display threads, @code{nnslashdot}
14801 has to retrieve absolutely all comments in a group upon entry.  If a
14802 threaded display is not required, @code{nnslashdot} will only retrieve
14803 the comments that are actually wanted by the user.  Threading is nicer,
14804 but much, much slower than unthreaded.
14805
14806 @item nnslashdot-login-name
14807 @vindex nnslashdot-login-name
14808 The login name to use when posting.
14809
14810 @item nnslashdot-password
14811 @vindex nnslashdot-password
14812 The password to use when posting.
14813
14814 @item nnslashdot-directory
14815 @vindex nnslashdot-directory
14816 Where @code{nnslashdot} will store its files.  The default is
14817 @samp{~/News/slashdot/}.
14818
14819 @item nnslashdot-active-url
14820 @vindex nnslashdot-active-url
14821 The @sc{url} format string that will be used to fetch the information on
14822 news articles and comments.  The default is
14823 @samp{http://slashdot.org/search.pl?section=&min=%d}.
14824
14825 @item nnslashdot-comments-url
14826 @vindex nnslashdot-comments-url
14827 The @sc{url} format string that will be used to fetch comments.  The
14828 default is
14829 @samp{http://slashdot.org/comments.pl?sid=%s&threshold=%d&commentsort=%d&mode=flat&startat=%d}.
14830
14831 @item nnslashdot-article-url
14832 @vindex nnslashdot-article-url
14833 The @sc{url} format string that will be used to fetch the news article.  The
14834 default is
14835 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
14836
14837 @item nnslashdot-threshold
14838 @vindex nnslashdot-threshold
14839 The score threshold.  The default is -1.
14840
14841 @item nnslashdot-group-number
14842 @vindex nnslashdot-group-number
14843 The number of old groups, in addition to the ten latest, to keep
14844 updated.  The default is 0.
14845
14846 @end table
14847
14848
14849
14850 @node Ultimate
14851 @subsection Ultimate
14852 @cindex nnultimate
14853 @cindex Ultimate Bulletin Board
14854
14855 The Ultimate Bulletin Board (@uref{http://www.ultimatebb.com/}) is
14856 probably the most popular Web bulletin board system used.  It has a
14857 quite regular and nice interface, and it's possible to get the
14858 information Gnus needs to keep groups updated.
14859
14860 The easiest way to get started with @code{nnultimate} is to say
14861 something like the following in the group buffer:  @kbd{B nnultimate RET
14862 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
14863 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
14864 you're interested in; there's quite a list of them on the Ultimate web
14865 site.)  Then subscribe to the groups you're interested in from the
14866 server buffer, and read them from the group buffer.
14867
14868 The following @code{nnultimate} variables can be altered:
14869
14870 @table @code
14871 @item nnultimate-directory
14872 @vindex nnultimate-directory
14873 The directory where @code{nnultimate} stores its files.  The default is
14874 @samp{~/News/ultimate/}.
14875 @end table
14876
14877
14878 @node Web Archive
14879 @subsection Web Archive
14880 @cindex nnwarchive
14881 @cindex Web Archive
14882
14883 Some mailing lists only have archives on Web servers, such as
14884 @uref{http://www.egroups.com/} and
14885 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
14886 interface, and it's possible to get the information Gnus needs to keep
14887 groups updated.
14888
14889 The easiest way to get started with @code{nnwarchive} is to say
14890 something like the following in the group buffer: @kbd{M-x
14891 gnus-group-make-warchive-group RET an_egroup RET egroups RET
14892 www.egroups.com RET your@@email.address RET}.  (Substitute the
14893 @sc{an_egroup} with the mailing list you subscribed, the
14894 @sc{your@@email.address} with your email address.), or to browse the
14895 back end by @kbd{B nnwarchive RET mail-archive RET}.
14896
14897 The following @code{nnwarchive} variables can be altered:
14898
14899 @table @code
14900 @item nnwarchive-directory
14901 @vindex nnwarchive-directory
14902 The directory where @code{nnwarchive} stores its files.  The default is
14903 @samp{~/News/warchive/}.
14904
14905 @item nnwarchive-login
14906 @vindex nnwarchive-login
14907 The account name on the web server.
14908
14909 @item nnwarchive-passwd
14910 @vindex nnwarchive-passwd
14911 The password for your account on the web server.
14912 @end table
14913
14914 @node RSS
14915 @subsection RSS
14916 @cindex nnrss
14917 @cindex RSS
14918
14919 Some sites have RDF site summary (RSS)
14920 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
14921 interface, and it's possible to get the information Gnus needs to keep
14922 groups updated.
14923
14924 The easiest way to get started with @code{nnrss} is to say something
14925 like the following in the group buffer: @kbd{B nnrss RET RET}, then
14926 subscribe groups.
14927
14928 The following @code{nnrss} variables can be altered:
14929
14930 @table @code
14931 @item nnrss-directory
14932 @vindex nnrss-directory
14933 The directory where @code{nnrss} stores its files.  The default is
14934 @samp{~/News/rss/}.
14935
14936 @end table
14937
14938 The following code may be helpful, if you want to show the description in
14939 the summary buffer.
14940
14941 @lisp
14942 (add-to-list 'nnmail-extra-headers nnrss-description-field)
14943 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
14944
14945 (defun gnus-user-format-function-X (header)
14946   (let ((descr
14947          (assq nnrss-description-field (mail-header-extra header))))
14948     (if descr (concat "\n\t" (cdr descr)) "")))
14949 @end lisp
14950
14951 The following code may be useful to open an nnrss url directly from the
14952 summary buffer.
14953 @lisp
14954 (require 'browse-url)
14955
14956 (defun browse-nnrss-url( arg )
14957   (interactive "p")
14958   (let ((url (assq nnrss-url-field
14959                    (mail-header-extra
14960                     (gnus-data-header
14961                      (assq (gnus-summary-article-number)
14962                            gnus-newsgroup-data))))))
14963     (if url
14964         (progn
14965           (browse-url (cdr url))
14966           (gnus-summary-mark-as-read-forward 1))
14967       (gnus-summary-scroll-up arg))))
14968
14969 (eval-after-load "gnus"
14970   #'(define-key gnus-summary-mode-map
14971       (kbd "<RET>") 'browse-nnrss-url))
14972 (add-to-list 'nnmail-extra-headers nnrss-url-field)
14973 @end lisp
14974
14975 @node Customizing w3
14976 @subsection Customizing w3
14977 @cindex w3
14978 @cindex html
14979 @cindex url
14980 @cindex Netscape
14981
14982 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
14983 pages.  Emacs/w3 is documented in its own manual, but there are some
14984 things that may be more relevant for Gnus users.
14985
14986 For instance, a common question is how to make Emacs/w3 follow links
14987 using the @code{browse-url} functions (which will call some external web
14988 browser like Netscape).  Here's one way:
14989
14990 @lisp
14991 (eval-after-load "w3"
14992   '(progn
14993     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
14994     (defun w3-fetch (&optional url target)
14995       (interactive (list (w3-read-url-with-default)))
14996       (if (eq major-mode 'gnus-article-mode)
14997           (browse-url url)
14998         (w3-fetch-orig url target)))))
14999 @end lisp
15000
15001 Put that in your @file{.emacs} file, and hitting links in w3-rendered
15002 @sc{html} in the Gnus article buffers will use @code{browse-url} to
15003 follow the link.
15004
15005
15006 @node IMAP
15007 @section IMAP
15008 @cindex nnimap
15009 @cindex @sc{imap}
15010
15011 @sc{imap} is a network protocol for reading mail (or news, or ...),
15012 think of it as a modernized @sc{nntp}.  Connecting to a @sc{imap}
15013 server is much similar to connecting to a news server, you just
15014 specify the network address of the server.
15015
15016 @sc{imap} has two properties.  First, @sc{imap} can do everything that
15017 POP can, it can hence be viewed as a POP++.  Secondly, @sc{imap} is a
15018 mail storage protocol, similar to @sc{nntp} being a news storage
15019 protocol -- however, @sc{imap} offers more features than @sc{nntp}
15020 because news is more or less read-only whereas mail is read-write.
15021
15022 If you want to use @sc{imap} as a POP++, use an imap entry in
15023 @code{mail-sources}.  With this, Gnus will fetch mails from the
15024 @sc{imap} server and store them on the local disk.  This is not the
15025 usage described in this section--@xref{Mail Sources}.
15026
15027 If you want to use @sc{imap} as a mail storage protocol, use an nnimap
15028 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
15029 manipulate mails stored on the @sc{imap} server.  This is the kind of
15030 usage explained in this section.
15031
15032 A server configuration in @code{~/.gnus} with a few @sc{imap} servers
15033 might look something like the following. (Note that for SSL/TLS, you
15034 need external programs and libraries, see below.)
15035
15036 @lisp
15037 (setq gnus-secondary-select-methods
15038       '((nnimap "simpleserver") ; no special configuration
15039         ; perhaps a ssh port forwarded server:
15040         (nnimap "dolk"
15041                 (nnimap-address "localhost")
15042                 (nnimap-server-port 1430))
15043         ; a UW server running on localhost
15044         (nnimap "barbar"
15045                 (nnimap-server-port 143)
15046                 (nnimap-address "localhost")
15047                 (nnimap-list-pattern ("INBOX" "mail/*")))
15048         ; anonymous public cyrus server:
15049         (nnimap "cyrus.andrew.cmu.edu"
15050                 (nnimap-authenticator anonymous)
15051                 (nnimap-list-pattern "archive.*")
15052                 (nnimap-stream network))
15053         ; a ssl server on a non-standard port:
15054         (nnimap "vic20"
15055                 (nnimap-address "vic20.somewhere.com")
15056                 (nnimap-server-port 9930)
15057                 (nnimap-stream ssl))))
15058 @end lisp
15059
15060 The following variables can be used to create a virtual @code{nnimap}
15061 server:
15062
15063 @table @code
15064
15065 @item nnimap-address
15066 @vindex nnimap-address
15067
15068 The address of the remote @sc{imap} server.  Defaults to the virtual
15069 server name if not specified.
15070
15071 @item nnimap-server-port
15072 @vindex nnimap-server-port
15073 Port on server to contact.  Defaults to port 143, or 993 for SSL.
15074
15075 Note that this should be an integer, example server specification:
15076
15077 @lisp
15078 (nnimap "mail.server.com"
15079         (nnimap-server-port 4711))
15080 @end lisp
15081
15082 @item nnimap-list-pattern
15083 @vindex nnimap-list-pattern
15084 String or list of strings of mailboxes to limit available groups to.
15085 This is used when the server has very many mailboxes and you're only
15086 interested in a few -- some servers export your home directory via
15087 @sc{imap}, you'll probably want to limit the mailboxes to those in
15088 @file{~/Mail/*} then.
15089
15090 The string can also be a cons of REFERENCE and the string as above, what
15091 REFERENCE is used for is server specific, but on the University of
15092 Washington server it's a directory that will be concatenated with the
15093 mailbox.
15094
15095 Example server specification:
15096
15097 @lisp
15098 (nnimap "mail.server.com"
15099         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
15100                                ("~friend/Mail/" . "list/*"))))
15101 @end lisp
15102
15103 @item nnimap-stream
15104 @vindex nnimap-stream
15105 The type of stream used to connect to your server.  By default, nnimap
15106 will detect and automatically use all of the below, with the exception
15107 of SSL/TLS. (@sc{imap} over SSL/TLS is being replaced by STARTTLS, which
15108 can be automatically detected, but it's not widely deployed yet.)
15109
15110 Example server specification:
15111
15112 @lisp
15113 (nnimap "mail.server.com"
15114         (nnimap-stream ssl))
15115 @end lisp
15116
15117 Please note that the value of @code{nnimap-stream} is a symbol!
15118
15119 @itemize @bullet
15120 @item
15121 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5). Requires the
15122 @samp{imtest} program.
15123 @item
15124 @dfn{kerberos4:} Connect with Kerberos 4. Requires the @samp{imtest} program.
15125 @item
15126 @dfn{starttls:} Connect via the STARTTLS extension (similar to
15127 SSL).  Requires the external library @samp{starttls.el} and program
15128 @samp{starttls}.
15129 @item
15130 @dfn{ssl:} Connect through SSL.  Requires OpenSSL (the program
15131 @samp{openssl}) or SSLeay (@samp{s_client}) as well as the external
15132 library @samp{ssl.el}.
15133 @item
15134 @dfn{shell:} Use a shell command to start @sc{imap} connection.
15135 @item
15136 @dfn{network:} Plain, TCP/IP network connection.
15137 @end itemize
15138
15139 @vindex imap-kerberos4-program
15140 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
15141 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
15142 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
15143 to make @code{imap.el} use a pty instead of a pipe when communicating
15144 with @samp{imtest}.  You will then suffer from a line length
15145 restrictions on @sc{imap} commands, which might make Gnus seem to hang
15146 indefinitely if you have many articles in a mailbox.  The variable
15147 @code{imap-kerberos4-program} contain parameters to pass to the imtest
15148 program.
15149
15150 @vindex imap-ssl-program
15151 For SSL connections, the OpenSSL program is available from
15152 @uref{http://www.openssl.org/}. OpenSSL was formerly known as SSLeay,
15153 and nnimap support it too - although the most recent versions of
15154 SSLeay, 0.9.x, are known to have serious bugs making it
15155 useless. Earlier versions, especially 0.8.x, of SSLeay are known to
15156 work. The variable @code{imap-ssl-program} contain parameters to pass
15157 to OpenSSL/SSLeay.  You also need @samp{ssl.el} (from the W3
15158 distribution, for instance).
15159
15160 @vindex imap-shell-program
15161 @vindex imap-shell-host
15162 For @sc{imap} connections using the @code{shell} stream, the variable
15163 @code{imap-shell-program} specify what program to call.
15164
15165 @item nnimap-authenticator
15166 @vindex nnimap-authenticator
15167
15168 The authenticator used to connect to the server.  By default, nnimap
15169 will use the most secure authenticator your server is capable of.
15170
15171 Example server specification:
15172
15173 @lisp
15174 (nnimap "mail.server.com"
15175         (nnimap-authenticator anonymous))
15176 @end lisp
15177
15178 Please note that the value of @code{nnimap-authenticator} is a symbol!
15179
15180 @itemize @bullet
15181 @item
15182 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication. Requires
15183 external program @code{imtest}.
15184 @item
15185 @dfn{kerberos4:} Kerberos 4 authentication. Requires external program
15186 @code{imtest}.
15187 @item
15188 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5. Requires
15189 external library @code{digest-md5.el}.
15190 @item
15191 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
15192 @item
15193 @dfn{login:} Plain-text username/password via LOGIN.
15194 @item
15195 @dfn{anonymous:} Login as `anonymous', supplying your email address as password.
15196 @end itemize
15197
15198 @item nnimap-expunge-on-close
15199 @cindex Expunging
15200 @vindex nnimap-expunge-on-close
15201 Unlike Parmenides the @sc{imap} designers has decided that things that
15202 doesn't exist actually does exist.  More specifically, @sc{imap} has
15203 this concept of marking articles @code{Deleted} which doesn't actually
15204 delete them, and this (marking them @code{Deleted}, that is) is what
15205 nnimap does when you delete a article in Gnus (with @kbd{B DEL} or
15206 similar).
15207
15208 Since the articles aren't really removed when we mark them with the
15209 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
15210 running in circles yet?
15211
15212 Traditionally, nnimap has removed all articles marked as @code{Deleted}
15213 when closing a mailbox but this is now configurable by this server
15214 variable.
15215
15216 The possible options are:
15217
15218 @table @code
15219
15220 @item always
15221 The default behavior, delete all articles marked as "Deleted" when
15222 closing a mailbox.
15223 @item never
15224 Never actually delete articles.  Currently there is no way of showing
15225 the articles marked for deletion in nnimap, but other @sc{imap} clients
15226 may allow you to do this.  If you ever want to run the EXPUNGE command
15227 manually, @xref{Expunging mailboxes}.
15228 @item ask
15229 When closing mailboxes, nnimap will ask if you wish to expunge deleted
15230 articles or not.
15231
15232 @end table
15233
15234 @item nnimap-importantize-dormant
15235 @vindex nnimap-importantize-dormant
15236
15237 If non-nil (the default), marks dormant articles as ticked (as well),
15238 for other @sc{imap} clients. Within Gnus, dormant articles will
15239 naturally still (only) be marked as dormant.  This is to make dormant
15240 articles stand out, just like ticked articles, in other @sc{imap}
15241 clients. (In other words, Gnus has two ``Tick'' marks and @sc{imap}
15242 has only one.)
15243
15244 Probably the only reason for frobing this would be if you're trying
15245 enable per-user persistant dormant flags, using something like:
15246
15247 @lisp
15248 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
15249         (format "gnus-dormant-%s" (user-login-name)))
15250 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
15251         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
15252 @end lisp
15253
15254 In this case, you would not want the per-user dormant flag showing up
15255 as ticked for other users.
15256
15257 @item nnimap-expunge-search-string
15258 @cindex Expunging
15259 @vindex nnimap-expunge-search-string
15260
15261 This variable contain the @sc{imap} search command sent to server when
15262 searching for articles eligible for expiring.  The default is
15263 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
15264 UID set and the second @code{%s} is replaced by a date.
15265
15266 Probably the only useful value to change this to is
15267 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
15268 messages instead of the internal article date. See section 6.4.4 of
15269 RFC 2060 for more information on valid strings.
15270
15271 @item nnimap-authinfo-file
15272 @vindex nnimap-authinfo-file
15273
15274 A file containing credentials used to log in on servers.  The format is
15275 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
15276 variable @code{nntp-authinfo-file} for exact syntax; also see
15277 @ref{NNTP}.
15278
15279 @end table
15280
15281 @menu
15282 * Splitting in IMAP::           Splitting mail with nnimap.
15283 * Expiring in IMAP::            Expiring mail with nnimap.
15284 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
15285 * Expunging mailboxes::         Equivalent of a "compress mailbox" button.
15286 * A note on namespaces::        How to (not) use IMAP namespace in Gnus.
15287 @end menu
15288
15289
15290
15291 @node Splitting in IMAP
15292 @subsection Splitting in IMAP
15293 @cindex splitting imap mail
15294
15295 Splitting is something Gnus users has loved and used for years, and now
15296 the rest of the world is catching up.  Yeah, dream on, not many
15297 @sc{imap} server has server side splitting and those that have splitting
15298 seem to use some non-standard protocol.  This means that @sc{imap}
15299 support for Gnus has to do it's own splitting.
15300
15301 And it does.
15302
15303 Here are the variables of interest:
15304
15305 @table @code
15306
15307 @item nnimap-split-crosspost
15308 @cindex splitting, crosspost
15309 @cindex crosspost
15310 @vindex nnimap-split-crosspost
15311
15312 If non-nil, do crossposting if several split methods match the mail.  If
15313 nil, the first match in @code{nnimap-split-rule} found will be used.
15314
15315 Nnmail equivalent: @code{nnmail-crosspost}.
15316
15317 @item nnimap-split-inbox
15318 @cindex splitting, inbox
15319 @cindex inbox
15320 @vindex nnimap-split-inbox
15321
15322 A string or a list of strings that gives the name(s) of @sc{imap}
15323 mailboxes to split from.  Defaults to nil, which means that splitting is
15324 disabled!
15325
15326 @lisp
15327 (setq nnimap-split-inbox
15328       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
15329 @end lisp
15330
15331 No nnmail equivalent.
15332
15333 @item nnimap-split-rule
15334 @cindex Splitting, rules
15335 @vindex nnimap-split-rule
15336
15337 New mail found in @code{nnimap-split-inbox} will be split according to
15338 this variable.
15339
15340 This variable contains a list of lists, where the first element in the
15341 sublist gives the name of the @sc{imap} mailbox to move articles
15342 matching the regexp in the second element in the sublist.  Got that?
15343 Neither did I, we need examples.
15344
15345 @lisp
15346 (setq nnimap-split-rule
15347       '(("INBOX.nnimap"
15348          "^Sender: owner-nnimap@@vic20.globalcom.se")
15349         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
15350         ("INBOX.private" "")))
15351 @end lisp
15352
15353 This will put all articles from the nnimap mailing list into mailbox
15354 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
15355 into INBOX.junk and everything else in INBOX.private.
15356
15357 The first string may contain `\\1' forms, like the ones used by
15358 replace-match to insert sub-expressions from the matched text.  For
15359 instance:
15360
15361 @lisp
15362 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
15363 @end lisp
15364
15365 The first element can also be the symbol @code{junk} to indicate that
15366 matching messages should simply be deleted.  Use with care.
15367
15368 The second element can also be a function.  In that case, it will be
15369 called with the first element of the rule as the argument, in a buffer
15370 containing the headers of the article.  It should return a non-nil value
15371 if it thinks that the mail belongs in that group.
15372
15373 Nnmail users might recollect that the last regexp had to be empty to
15374 match all articles (like in the example above).  This is not required in
15375 nnimap.  Articles not matching any of the regexps will not be moved out
15376 of your inbox.  (This might affect performance if you keep lots of
15377 unread articles in your inbox, since the splitting code would go over
15378 them every time you fetch new mail.)
15379
15380 These rules are processed from the beginning of the alist toward the
15381 end.  The first rule to make a match will "win", unless you have
15382 crossposting enabled.  In that case, all matching rules will "win".
15383
15384 This variable can also have a function as its value, the function will
15385 be called with the headers narrowed and should return a group where it
15386 thinks the article should be split to.  See @code{nnimap-split-fancy}.
15387
15388 The splitting code tries to create mailboxes if it needs to.
15389
15390 To allow for different split rules on different virtual servers, and
15391 even different split rules in different inboxes on the same server,
15392 the syntax of this variable have been extended along the lines of:
15393
15394 @lisp
15395 (setq nnimap-split-rule
15396       '(("my1server"    (".*"    (("ding"    "ding@@gnus.org")
15397                                   ("junk"    "From:.*Simon")))
15398         ("my2server"    ("INBOX" nnimap-split-fancy))
15399         ("my[34]server" (".*"    (("private" "To:.*Simon")
15400                                   ("junk"    my-junk-func)))))
15401 @end lisp
15402
15403 The virtual server name is in fact a regexp, so that the same rules
15404 may apply to several servers.  In the example, the servers
15405 @code{my3server} and @code{my4server} both use the same rules.
15406 Similarly, the inbox string is also a regexp.  The actual splitting
15407 rules are as before, either a function, or a list with group/regexp or
15408 group/function elements.
15409
15410 Nnmail equivalent: @code{nnmail-split-methods}.
15411
15412 @item nnimap-split-predicate
15413 @cindex splitting
15414 @vindex nnimap-split-predicate
15415
15416 Mail matching this predicate in @code{nnimap-split-inbox} will be
15417 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
15418
15419 This might be useful if you use another @sc{imap} client to read mail in
15420 your inbox but would like Gnus to split all articles in the inbox
15421 regardless of readedness. Then you might change this to
15422 @samp{UNDELETED}.
15423
15424 @item nnimap-split-fancy
15425 @cindex splitting, fancy
15426 @findex nnimap-split-fancy
15427 @vindex nnimap-split-fancy
15428
15429 It's possible to set @code{nnimap-split-rule} to
15430 @code{nnmail-split-fancy} if you want to use fancy
15431 splitting. @xref{Fancy Mail Splitting}.
15432
15433 However, to be able to have different fancy split rules for nnmail and
15434 nnimap back ends you can set @code{nnimap-split-rule} to
15435 @code{nnimap-split-fancy} and define the nnimap specific fancy split
15436 rule in @code{nnimap-split-fancy}.
15437
15438 Example:
15439
15440 @lisp
15441 (setq nnimap-split-rule 'nnimap-split-fancy
15442       nnimap-split-fancy ...)
15443 @end lisp
15444
15445 Nnmail equivalent: @code{nnmail-split-fancy}.
15446
15447 @end table
15448
15449 @node Expiring in IMAP
15450 @subsection Expiring in IMAP
15451 @cindex expiring imap mail
15452
15453 Even though @sc{nnimap} is not a proper @sc{nnmail} derived back end,
15454 it supports most features in regular expiring (@pxref{Expiring Mail}).
15455 Unlike splitting in IMAP (@pxref{Splitting in IMAP}) it do not clone
15456 the @sc{nnmail} variables (i.e., creating @var{nnimap-expiry-wait})
15457 but reuse the @sc{nnmail} variables.  What follows below are the
15458 variables used by the @sc{nnimap} expiry process.
15459
15460 A note on how the expire mark is stored on the @sc{imap} server is
15461 appropriate here as well.  The expire mark is translated into a
15462 @sc{imap} client specific mark, @code{gnus-expire}, and stored on the
15463 message.  This means that likely only Gnus will understand and treat
15464 the @code{gnus-expire} mark properly, although other clients may allow
15465 you to view client specific flags on the message.  It also means that
15466 your server must support permanent storage of client specific flags on
15467 messages.  Most do, fortunately.
15468
15469 @table @code
15470
15471 @item nnmail-expiry-wait
15472 @item nnmail-expiry-wait-function
15473
15474 These variables are fully supported.  The expire value can be a
15475 number, the symbol @var{immediate} or @var{never}.
15476
15477 @item nnmail-expiry-target
15478
15479 This variable is supported, and internally implemented by calling the
15480 @sc{nnmail} functions that handle this.  It contains an optimization
15481 that if the destination is a IMAP group on the same server, the
15482 article is copied instead of appended (that is, uploaded again).
15483
15484 @end table
15485
15486 @node Editing IMAP ACLs
15487 @subsection Editing IMAP ACLs
15488 @cindex editing imap acls
15489 @cindex Access Control Lists
15490 @cindex Editing @sc{imap} ACLs
15491 @kindex G l
15492 @findex gnus-group-nnimap-edit-acl
15493
15494 ACL stands for Access Control List.  ACLs are used in @sc{imap} for
15495 limiting (or enabling) other users access to your mail boxes.  Not all
15496 @sc{imap} servers support this, this function will give an error if it
15497 doesn't.
15498
15499 To edit a ACL for a mailbox, type @kbd{G l}
15500 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with a ACL
15501 editing window with detailed instructions.
15502
15503 Some possible uses:
15504
15505 @itemize @bullet
15506 @item
15507 Giving "anyone" the "lrs" rights (lookup, read, keep seen/unseen flags)
15508 on your mailing list mailboxes enables other users on the same server to
15509 follow the list without subscribing to it.
15510 @item
15511 At least with the Cyrus server, you are required to give the user
15512 "anyone" posting ("p") capabilities to have "plussing" work (that is,
15513 mail sent to user+mailbox@@domain ending up in the @sc{imap} mailbox
15514 INBOX.mailbox).
15515 @end itemize
15516
15517 @node Expunging mailboxes
15518 @subsection Expunging mailboxes
15519 @cindex expunging
15520
15521 @cindex Expunge
15522 @cindex Manual expunging
15523 @kindex G x
15524 @findex gnus-group-nnimap-expunge
15525
15526 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
15527 you may want the option of expunging all deleted articles in a mailbox
15528 manually.  This is exactly what @kbd{G x} does.
15529
15530 Currently there is no way of showing deleted articles, you can just
15531 delete them.
15532
15533 @node A note on namespaces
15534 @subsection A note on namespaces
15535 @cindex IMAP namespace
15536 @cindex namespaces
15537
15538 The IMAP protocol has a concept called namespaces, described by the
15539 following text in the RFC:
15540
15541 @example
15542 5.1.2.  Mailbox Namespace Naming Convention
15543
15544    By convention, the first hierarchical element of any mailbox name
15545    which begins with "#" identifies the "namespace" of the remainder of
15546    the name.  This makes it possible to disambiguate between different
15547    types of mailbox stores, each of which have their own namespaces.
15548
15549       For example, implementations which offer access to USENET
15550       newsgroups MAY use the "#news" namespace to partition the USENET
15551       newsgroup namespace from that of other mailboxes.  Thus, the
15552       comp.mail.misc newsgroup would have an mailbox name of
15553       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
15554       to a different object (e.g. a user's private mailbox).
15555 @end example
15556
15557 While there is nothing in this text that warrants concern for the IMAP
15558 implementation in Gnus, some servers use namespace prefixes in a way
15559 that does not work with how Gnus uses mailbox names.
15560
15561 Specifically, University of Washington's IMAP server uses mailbox
15562 names like @code{#driver.mbx/read-mail} which are valid only in the
15563 @sc{create} and @sc{append} commands.  After the mailbox is created
15564 (or a messages is appended to a mailbox), it must be accessed without
15565 the namespace prefix, i.e @code{read-mail}.  Since Gnus do not make it
15566 possible for the user to guarantee that user entered mailbox names
15567 will only be used with the CREATE and APPEND commands, you should
15568 simply not use the namespace prefixed mailbox names in Gnus.
15569
15570 See the UoW @sc{imapd} documentation for the @code{#driver.*/} prefix
15571 for more information on how to use the prefixes.  They are a power
15572 tool and should be used only if you are sure what the effects are.
15573
15574 @node Other Sources
15575 @section Other Sources
15576
15577 Gnus can do more than just read news or mail.  The methods described
15578 below allow Gnus to view directories and files as if they were
15579 newsgroups.
15580
15581 @menu
15582 * Directory Groups::            You can read a directory as if it was a newsgroup.
15583 * Anything Groups::             Dired?  Who needs dired?
15584 * Document Groups::             Single files can be the basis of a group.
15585 * SOUP::                        Reading @sc{soup} packets ``offline''.
15586 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
15587 @end menu
15588
15589
15590 @node Directory Groups
15591 @subsection Directory Groups
15592 @cindex nndir
15593 @cindex directory groups
15594
15595 If you have a directory that has lots of articles in separate files in
15596 it, you might treat it as a newsgroup.  The files have to have numerical
15597 names, of course.
15598
15599 This might be an opportune moment to mention @code{ange-ftp} (and its
15600 successor @code{efs}), that most wonderful of all wonderful Emacs
15601 packages.  When I wrote @code{nndir}, I didn't think much about it---a
15602 back end to read directories.  Big deal.
15603
15604 @code{ange-ftp} changes that picture dramatically.  For instance, if you
15605 enter the @code{ange-ftp} file name
15606 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
15607 @code{ange-ftp} or @code{efs} will actually allow you to read this
15608 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
15609
15610 @code{nndir} will use @sc{nov} files if they are present.
15611
15612 @code{nndir} is a ``read-only'' back end---you can't delete or expire
15613 articles with this method.  You can use @code{nnmh} or @code{nnml} for
15614 whatever you use @code{nndir} for, so you could switch to any of those
15615 methods if you feel the need to have a non-read-only @code{nndir}.
15616
15617
15618 @node Anything Groups
15619 @subsection Anything Groups
15620 @cindex nneething
15621
15622 From the @code{nndir} back end (which reads a single spool-like
15623 directory), it's just a hop and a skip to @code{nneething}, which
15624 pretends that any arbitrary directory is a newsgroup.  Strange, but
15625 true.
15626
15627 When @code{nneething} is presented with a directory, it will scan this
15628 directory and assign article numbers to each file.  When you enter such
15629 a group, @code{nneething} must create ``headers'' that Gnus can use.
15630 After all, Gnus is a newsreader, in case you're forgetting.
15631 @code{nneething} does this in a two-step process.  First, it snoops each
15632 file in question.  If the file looks like an article (i.e., the first
15633 few lines look like headers), it will use this as the head.  If this is
15634 just some arbitrary file without a head (e.g. a C source file),
15635 @code{nneething} will cobble up a header out of thin air.  It will use
15636 file ownership, name and date and do whatever it can with these
15637 elements.
15638
15639 All this should happen automatically for you, and you will be presented
15640 with something that looks very much like a newsgroup.  Totally like a
15641 newsgroup, to be precise.  If you select an article, it will be displayed
15642 in the article buffer, just as usual.
15643
15644 If you select a line that represents a directory, Gnus will pop you into
15645 a new summary buffer for this @code{nneething} group.  And so on.  You can
15646 traverse the entire disk this way, if you feel like, but remember that
15647 Gnus is not dired, really, and does not intend to be, either.
15648
15649 There are two overall modes to this action---ephemeral or solid.  When
15650 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
15651 will not store information on what files you have read, and what files
15652 are new, and so on.  If you create a solid @code{nneething} group the
15653 normal way with @kbd{G m}, Gnus will store a mapping table between
15654 article numbers and file names, and you can treat this group like any
15655 other groups.  When you activate a solid @code{nneething} group, you will
15656 be told how many unread articles it contains, etc., etc.
15657
15658 Some variables:
15659
15660 @table @code
15661 @item nneething-map-file-directory
15662 @vindex nneething-map-file-directory
15663 All the mapping files for solid @code{nneething} groups will be stored
15664 in this directory, which defaults to @file{~/.nneething/}.
15665
15666 @item nneething-exclude-files
15667 @vindex nneething-exclude-files
15668 All files that match this regexp will be ignored.  Nice to use to exclude
15669 auto-save files and the like, which is what it does by default.
15670
15671 @item nneething-include-files
15672 @vindex nneething-include-files
15673 Regexp saying what files to include in the group.  If this variable is
15674 non-@code{nil}, only files matching this regexp will be included.
15675
15676 @item nneething-map-file
15677 @vindex nneething-map-file
15678 Name of the map files.
15679 @end table
15680
15681
15682 @node Document Groups
15683 @subsection Document Groups
15684 @cindex nndoc
15685 @cindex documentation group
15686 @cindex help group
15687
15688 @code{nndoc} is a cute little thing that will let you read a single file
15689 as a newsgroup.  Several files types are supported:
15690
15691 @table @code
15692 @cindex babyl
15693 @cindex rmail mbox
15694
15695 @item babyl
15696 The babyl (rmail) mail box.
15697 @cindex mbox
15698 @cindex Unix mbox
15699
15700 @item mbox
15701 The standard Unix mbox file.
15702
15703 @cindex MMDF mail box
15704 @item mmdf
15705 The MMDF mail box format.
15706
15707 @item news
15708 Several news articles appended into a file.
15709
15710 @item rnews
15711 @cindex rnews batch files
15712 The rnews batch transport format.
15713 @cindex forwarded messages
15714
15715 @item forward
15716 Forwarded articles.
15717
15718 @item nsmail
15719 Netscape mail boxes.
15720
15721 @item mime-parts
15722 @sc{mime} multipart messages.
15723
15724 @item standard-digest
15725 The standard (RFC 1153) digest format.
15726
15727 @item mime-digest
15728 A @sc{mime} digest of messages.
15729
15730 @item lanl-gov-announce
15731 Announcement messages from LANL Gov Announce.
15732
15733 @item rfc822-forward
15734 A message forwarded according to RFC822.
15735
15736 @item outlook
15737 The Outlook mail box.
15738
15739 @item oe-dbx
15740 The Outlook Express dbx mail box.
15741
15742 @item exim-bounce
15743 A bounce message from the Exim MTA.
15744
15745 @item forward
15746 A message forwarded according to informal rules.
15747
15748 @item rfc934
15749 An RFC934-forwarded message.
15750
15751 @item mailman
15752 A mailman digest.
15753
15754 @item clari-briefs
15755 A digest of Clarinet brief news items.
15756
15757 @item slack-digest
15758 Non-standard digest format---matches most things, but does it badly.
15759
15760 @item mail-in-mail
15761 The last resort.
15762 @end table
15763
15764 You can also use the special ``file type'' @code{guess}, which means
15765 that @code{nndoc} will try to guess what file type it is looking at.
15766 @code{digest} means that @code{nndoc} should guess what digest type the
15767 file is.
15768
15769 @code{nndoc} will not try to change the file or insert any extra headers into
15770 it---it will simply, like, let you use the file as the basis for a
15771 group.  And that's it.
15772
15773 If you have some old archived articles that you want to insert into your
15774 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
15775 that.  Say you have an old @file{RMAIL} file with mail that you now want
15776 to split into your new @code{nnml} groups.  You look at that file using
15777 @code{nndoc} (using the @kbd{G f} command in the group buffer
15778 (@pxref{Foreign Groups})), set the process mark on all the articles in
15779 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
15780 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
15781 file is now also stored in lots of @code{nnml} directories, and you can
15782 delete that pesky @file{RMAIL} file.  If you have the guts!
15783
15784 Virtual server variables:
15785
15786 @table @code
15787 @item nndoc-article-type
15788 @vindex nndoc-article-type
15789 This should be one of @code{mbox}, @code{babyl}, @code{digest},
15790 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
15791 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
15792 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
15793 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
15794
15795 @item nndoc-post-type
15796 @vindex nndoc-post-type
15797 This variable says whether Gnus is to consider the group a news group or
15798 a mail group.  There are two valid values:  @code{mail} (the default)
15799 and @code{news}.
15800 @end table
15801
15802 @menu
15803 * Document Server Internals::   How to add your own document types.
15804 @end menu
15805
15806
15807 @node Document Server Internals
15808 @subsubsection Document Server Internals
15809
15810 Adding new document types to be recognized by @code{nndoc} isn't
15811 difficult.  You just have to whip up a definition of what the document
15812 looks like, write a predicate function to recognize that document type,
15813 and then hook into @code{nndoc}.
15814
15815 First, here's an example document type definition:
15816
15817 @example
15818 (mmdf
15819  (article-begin .  "^\^A\^A\^A\^A\n")
15820  (body-end .  "^\^A\^A\^A\^A\n"))
15821 @end example
15822
15823 The definition is simply a unique @dfn{name} followed by a series of
15824 regexp pseudo-variable settings.  Below are the possible
15825 variables---don't be daunted by the number of variables; most document
15826 types can be defined with very few settings:
15827
15828 @table @code
15829 @item first-article
15830 If present, @code{nndoc} will skip past all text until it finds
15831 something that match this regexp.  All text before this will be
15832 totally ignored.
15833
15834 @item article-begin
15835 This setting has to be present in all document type definitions.  It
15836 says what the beginning of each article looks like.
15837
15838 @item head-begin-function
15839 If present, this should be a function that moves point to the head of
15840 the article.
15841
15842 @item nndoc-head-begin
15843 If present, this should be a regexp that matches the head of the
15844 article.
15845
15846 @item nndoc-head-end
15847 This should match the end of the head of the article.  It defaults to
15848 @samp{^$}---the empty line.
15849
15850 @item body-begin-function
15851 If present, this function should move point to the beginning of the body
15852 of the article.
15853
15854 @item body-begin
15855 This should match the beginning of the body of the article.  It defaults
15856 to @samp{^\n}.
15857
15858 @item body-end-function
15859 If present, this function should move point to the end of the body of
15860 the article.
15861
15862 @item body-end
15863 If present, this should match the end of the body of the article.
15864
15865 @item file-end
15866 If present, this should match the end of the file.  All text after this
15867 regexp will be totally ignored.
15868
15869 @end table
15870
15871 So, using these variables @code{nndoc} is able to dissect a document
15872 file into a series of articles, each with a head and a body.  However, a
15873 few more variables are needed since not all document types are all that
15874 news-like---variables needed to transform the head or the body into
15875 something that's palatable for Gnus:
15876
15877 @table @code
15878 @item prepare-body-function
15879 If present, this function will be called when requesting an article.  It
15880 will be called with point at the start of the body, and is useful if the
15881 document has encoded some parts of its contents.
15882
15883 @item article-transform-function
15884 If present, this function is called when requesting an article.  It's
15885 meant to be used for more wide-ranging transformation of both head and
15886 body of the article.
15887
15888 @item generate-head-function
15889 If present, this function is called to generate a head that Gnus can
15890 understand.  It is called with the article number as a parameter, and is
15891 expected to generate a nice head for the article in question.  It is
15892 called when requesting the headers of all articles.
15893
15894 @end table
15895
15896 Let's look at the most complicated example I can come up with---standard
15897 digests:
15898
15899 @example
15900 (standard-digest
15901  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
15902  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
15903  (prepare-body-function . nndoc-unquote-dashes)
15904  (body-end-function . nndoc-digest-body-end)
15905  (head-end . "^ ?$")
15906  (body-begin . "^ ?\n")
15907  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
15908  (subtype digest guess))
15909 @end example
15910
15911 We see that all text before a 70-width line of dashes is ignored; all
15912 text after a line that starts with that @samp{^End of} is also ignored;
15913 each article begins with a 30-width line of dashes; the line separating
15914 the head from the body may contain a single space; and that the body is
15915 run through @code{nndoc-unquote-dashes} before being delivered.
15916
15917 To hook your own document definition into @code{nndoc}, use the
15918 @code{nndoc-add-type} function.  It takes two parameters---the first is
15919 the definition itself and the second (optional) parameter says where in
15920 the document type definition alist to put this definition.  The alist is
15921 traversed sequentially, and @code{nndoc-TYPE-type-p} is called for a given type @code{TYPE}.  So @code{nndoc-mmdf-type-p} is called to see whether a document
15922 is of @code{mmdf} type, and so on.  These type predicates should return
15923 @code{nil} if the document is not of the correct type; @code{t} if it is
15924 of the correct type; and a number if the document might be of the
15925 correct type.  A high number means high probability; a low number means
15926 low probability with @samp{0} being the lowest valid number.
15927
15928
15929 @node SOUP
15930 @subsection SOUP
15931 @cindex SOUP
15932 @cindex offline
15933
15934 In the PC world people often talk about ``offline'' newsreaders.  These
15935 are thingies that are combined reader/news transport monstrosities.
15936 With built-in modem programs.  Yecchh!
15937
15938 Of course, us Unix Weenie types of human beans use things like
15939 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
15940 transport things like Ghod intended.  And then we just use normal
15941 newsreaders.
15942
15943 However, it can sometimes be convenient to do something that's a bit
15944 easier on the brain if you have a very slow modem, and you're not really
15945 that interested in doing things properly.
15946
15947 A file format called @sc{soup} has been developed for transporting news
15948 and mail from servers to home machines and back again.  It can be a bit
15949 fiddly.
15950
15951 First some terminology:
15952
15953 @table @dfn
15954
15955 @item server
15956 This is the machine that is connected to the outside world and where you
15957 get news and/or mail from.
15958
15959 @item home machine
15960 This is the machine that you want to do the actual reading and responding
15961 on.  It is typically not connected to the rest of the world in any way.
15962
15963 @item packet
15964 Something that contains messages and/or commands.  There are two kinds
15965 of packets:
15966
15967 @table @dfn
15968 @item message packets
15969 These are packets made at the server, and typically contain lots of
15970 messages for you to read.  These are called @file{SoupoutX.tgz} by
15971 default, where @var{x} is a number.
15972
15973 @item response packets
15974 These are packets made at the home machine, and typically contains
15975 replies that you've written.  These are called @file{SoupinX.tgz} by
15976 default, where @var{x} is a number.
15977
15978 @end table
15979
15980 @end table
15981
15982
15983 @enumerate
15984
15985 @item
15986 You log in on the server and create a @sc{soup} packet.  You can either
15987 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
15988 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
15989 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
15990
15991 @item
15992 You transfer the packet home.  Rail, boat, car or modem will do fine.
15993
15994 @item
15995 You put the packet in your home directory.
15996
15997 @item
15998 You fire up Gnus on your home machine using the @code{nnsoup} back end as
15999 the native or secondary server.
16000
16001 @item
16002 You read articles and mail and answer and followup to the things you
16003 want (@pxref{SOUP Replies}).
16004
16005 @item
16006 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16007 packet.
16008
16009 @item
16010 You transfer this packet to the server.
16011
16012 @item
16013 You use Gnus to mail this packet out with the @kbd{G s s} command.
16014
16015 @item
16016 You then repeat until you die.
16017
16018 @end enumerate
16019
16020 So you basically have a bipartite system---you use @code{nnsoup} for
16021 reading and Gnus for packing/sending these @sc{soup} packets.
16022
16023 @menu
16024 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
16025 * SOUP Groups::                 A back end for reading @sc{soup} packets.
16026 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
16027 @end menu
16028
16029
16030 @node SOUP Commands
16031 @subsubsection SOUP Commands
16032
16033 These are commands for creating and manipulating @sc{soup} packets.
16034
16035 @table @kbd
16036 @item G s b
16037 @kindex G s b (Group)
16038 @findex gnus-group-brew-soup
16039 Pack all unread articles in the current group
16040 (@code{gnus-group-brew-soup}).  This command understands the
16041 process/prefix convention.
16042
16043 @item G s w
16044 @kindex G s w (Group)
16045 @findex gnus-soup-save-areas
16046 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
16047
16048 @item G s s
16049 @kindex G s s (Group)
16050 @findex gnus-soup-send-replies
16051 Send all replies from the replies packet
16052 (@code{gnus-soup-send-replies}).
16053
16054 @item G s p
16055 @kindex G s p (Group)
16056 @findex gnus-soup-pack-packet
16057 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
16058
16059 @item G s r
16060 @kindex G s r (Group)
16061 @findex nnsoup-pack-replies
16062 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
16063
16064 @item O s
16065 @kindex O s (Summary)
16066 @findex gnus-soup-add-article
16067 This summary-mode command adds the current article to a @sc{soup} packet
16068 (@code{gnus-soup-add-article}).  It understands the process/prefix
16069 convention (@pxref{Process/Prefix}).
16070
16071 @end table
16072
16073
16074 There are a few variables to customize where Gnus will put all these
16075 thingies:
16076
16077 @table @code
16078
16079 @item gnus-soup-directory
16080 @vindex gnus-soup-directory
16081 Directory where Gnus will save intermediate files while composing
16082 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
16083
16084 @item gnus-soup-replies-directory
16085 @vindex gnus-soup-replies-directory
16086 This is what Gnus will use as a temporary directory while sending our
16087 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
16088
16089 @item gnus-soup-prefix-file
16090 @vindex gnus-soup-prefix-file
16091 Name of the file where Gnus stores the last used prefix.  The default is
16092 @samp{gnus-prefix}.
16093
16094 @item gnus-soup-packer
16095 @vindex gnus-soup-packer
16096 A format string command for packing a @sc{soup} packet.  The default is
16097 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
16098
16099 @item gnus-soup-unpacker
16100 @vindex gnus-soup-unpacker
16101 Format string command for unpacking a @sc{soup} packet.  The default is
16102 @samp{gunzip -c %s | tar xvf -}.
16103
16104 @item gnus-soup-packet-directory
16105 @vindex gnus-soup-packet-directory
16106 Where Gnus will look for reply packets.  The default is @file{~/}.
16107
16108 @item gnus-soup-packet-regexp
16109 @vindex gnus-soup-packet-regexp
16110 Regular expression matching @sc{soup} reply packets in
16111 @code{gnus-soup-packet-directory}.
16112
16113 @end table
16114
16115
16116 @node SOUP Groups
16117 @subsubsection SOUP Groups
16118 @cindex nnsoup
16119
16120 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
16121 read incoming packets, unpack them, and put them in a directory where
16122 you can read them at leisure.
16123
16124 These are the variables you can use to customize its behavior:
16125
16126 @table @code
16127
16128 @item nnsoup-tmp-directory
16129 @vindex nnsoup-tmp-directory
16130 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
16131 directory.  (@file{/tmp/} by default.)
16132
16133 @item nnsoup-directory
16134 @vindex nnsoup-directory
16135 @code{nnsoup} then moves each message and index file to this directory.
16136 The default is @file{~/SOUP/}.
16137
16138 @item nnsoup-replies-directory
16139 @vindex nnsoup-replies-directory
16140 All replies will be stored in this directory before being packed into a
16141 reply packet.  The default is @file{~/SOUP/replies/"}.
16142
16143 @item nnsoup-replies-format-type
16144 @vindex nnsoup-replies-format-type
16145 The @sc{soup} format of the replies packets.  The default is @samp{?n}
16146 (rnews), and I don't think you should touch that variable.  I probably
16147 shouldn't even have documented it.  Drats!  Too late!
16148
16149 @item nnsoup-replies-index-type
16150 @vindex nnsoup-replies-index-type
16151 The index type of the replies packet.  The default is @samp{?n}, which
16152 means ``none''.  Don't fiddle with this one either!
16153
16154 @item nnsoup-active-file
16155 @vindex nnsoup-active-file
16156 Where @code{nnsoup} stores lots of information.  This is not an ``active
16157 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
16158 this file or mess it up in any way, you're dead.  The default is
16159 @file{~/SOUP/active}.
16160
16161 @item nnsoup-packer
16162 @vindex nnsoup-packer
16163 Format string command for packing a reply @sc{soup} packet.  The default
16164 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
16165
16166 @item nnsoup-unpacker
16167 @vindex nnsoup-unpacker
16168 Format string command for unpacking incoming @sc{soup} packets.  The
16169 default is @samp{gunzip -c %s | tar xvf -}.
16170
16171 @item nnsoup-packet-directory
16172 @vindex nnsoup-packet-directory
16173 Where @code{nnsoup} will look for incoming packets.  The default is
16174 @file{~/}.
16175
16176 @item nnsoup-packet-regexp
16177 @vindex nnsoup-packet-regexp
16178 Regular expression matching incoming @sc{soup} packets.  The default is
16179 @samp{Soupout}.
16180
16181 @item nnsoup-always-save
16182 @vindex nnsoup-always-save
16183 If non-@code{nil}, save the replies buffer after each posted message.
16184
16185 @end table
16186
16187
16188 @node SOUP Replies
16189 @subsubsection SOUP Replies
16190
16191 Just using @code{nnsoup} won't mean that your postings and mailings end
16192 up in @sc{soup} reply packets automagically.  You have to work a bit
16193 more for that to happen.
16194
16195 @findex nnsoup-set-variables
16196 The @code{nnsoup-set-variables} command will set the appropriate
16197 variables to ensure that all your followups and replies end up in the
16198 @sc{soup} system.
16199
16200 In specific, this is what it does:
16201
16202 @lisp
16203 (setq message-send-news-function 'nnsoup-request-post)
16204 (setq message-send-mail-function 'nnsoup-request-mail)
16205 @end lisp
16206
16207 And that's it, really.  If you only want news to go into the @sc{soup}
16208 system you just use the first line.  If you only want mail to be
16209 @sc{soup}ed you use the second.
16210
16211
16212 @node Mail-To-News Gateways
16213 @subsection Mail-To-News Gateways
16214 @cindex mail-to-news gateways
16215 @cindex gateways
16216
16217 If your local @code{nntp} server doesn't allow posting, for some reason
16218 or other, you can post using one of the numerous mail-to-news gateways.
16219 The @code{nngateway} back end provides the interface.
16220
16221 Note that you can't read anything from this back end---it can only be
16222 used to post with.
16223
16224 Server variables:
16225
16226 @table @code
16227 @item nngateway-address
16228 @vindex nngateway-address
16229 This is the address of the mail-to-news gateway.
16230
16231 @item nngateway-header-transformation
16232 @vindex nngateway-header-transformation
16233 News headers often have to be transformed in some odd way or other
16234 for the mail-to-news gateway to accept it.  This variable says what
16235 transformation should be called, and defaults to
16236 @code{nngateway-simple-header-transformation}.  The function is called
16237 narrowed to the headers to be transformed and with one parameter---the
16238 gateway address.
16239
16240 This default function just inserts a new @code{To} header based on the
16241 @code{Newsgroups} header and the gateway address.
16242 For instance, an article with this @code{Newsgroups} header:
16243
16244 @example
16245 Newsgroups: alt.religion.emacs
16246 @end example
16247
16248 will get this @code{To} header inserted:
16249
16250 @example
16251 To: alt-religion-emacs@@GATEWAY
16252 @end example
16253
16254 The following pre-defined functions exist:
16255
16256 @findex nngateway-simple-header-transformation
16257 @table @code
16258
16259 @item nngateway-simple-header-transformation
16260 Creates a @code{To} header that looks like
16261 @var{newsgroup}@@@code{nngateway-address}.
16262
16263 @findex nngateway-mail2news-header-transformation
16264
16265 @item nngateway-mail2news-header-transformation
16266 Creates a @code{To} header that looks like
16267 @code{nngateway-address}.
16268
16269 Here's an example:
16270
16271 @lisp
16272 (setq gnus-post-method
16273       '(nngateway
16274         "mail2news@@replay.com"
16275         (nngateway-header-transformation
16276          nngateway-mail2news-header-transformation)))
16277 @end lisp
16278
16279 @end table
16280
16281
16282 @end table
16283
16284 So, to use this, simply say something like:
16285
16286 @lisp
16287 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
16288 @end lisp
16289
16290
16291
16292 @node Combined Groups
16293 @section Combined Groups
16294
16295 Gnus allows combining a mixture of all the other group types into bigger
16296 groups.
16297
16298 @menu
16299 * Virtual Groups::              Combining articles from many groups.
16300 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
16301 @end menu
16302
16303
16304 @node Virtual Groups
16305 @subsection Virtual Groups
16306 @cindex nnvirtual
16307 @cindex virtual groups
16308 @cindex merging groups
16309
16310 An @dfn{nnvirtual group} is really nothing more than a collection of
16311 other groups.
16312
16313 For instance, if you are tired of reading many small groups, you can
16314 put them all in one big group, and then grow tired of reading one
16315 big, unwieldy group.  The joys of computing!
16316
16317 You specify @code{nnvirtual} as the method.  The address should be a
16318 regexp to match component groups.
16319
16320 All marks in the virtual group will stick to the articles in the
16321 component groups.  So if you tick an article in a virtual group, the
16322 article will also be ticked in the component group from whence it
16323 came.  (And vice versa---marks from the component groups will also be
16324 shown in the virtual group.). To create an empty virtual group, run
16325 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
16326 and edit the method regexp with @kbd{M-e}
16327 (@code{gnus-group-edit-group-method})
16328
16329 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
16330 newsgroups into one, big, happy newsgroup:
16331
16332 @lisp
16333 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
16334 @end lisp
16335
16336 The component groups can be native or foreign; everything should work
16337 smoothly, but if your computer explodes, it was probably my fault.
16338
16339 Collecting the same group from several servers might actually be a good
16340 idea if users have set the Distribution header to limit distribution.
16341 If you would like to read @samp{soc.motss} both from a server in Japan
16342 and a server in Norway, you could use the following as the group regexp:
16343
16344 @example
16345 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
16346 @end example
16347
16348 (Remember, though, that if you're creating the group with @kbd{G m}, you
16349 shouldn't double the backslashes, and you should leave off the quote
16350 characters at the beginning and the end of the string.)
16351
16352 This should work kinda smoothly---all articles from both groups should
16353 end up in this one, and there should be no duplicates.  Threading (and
16354 the rest) will still work as usual, but there might be problems with the
16355 sequence of articles.  Sorting on date might be an option here
16356 (@pxref{Selecting a Group}).
16357
16358 One limitation, however---all groups included in a virtual
16359 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
16360 zombie groups can't be component groups for @code{nnvirtual} groups.
16361
16362 @vindex nnvirtual-always-rescan
16363 If the @code{nnvirtual-always-rescan} is non-@code{nil},
16364 @code{nnvirtual} will always scan groups for unread articles when
16365 entering a virtual group.  If this variable is @code{nil} (which is the
16366 default) and you read articles in a component group after the virtual
16367 group has been activated, the read articles from the component group
16368 will show up when you enter the virtual group.  You'll also see this
16369 effect if you have two virtual groups that have a component group in
16370 common.  If that's the case, you should set this variable to @code{t}.
16371 Or you can just tap @code{M-g} on the virtual group every time before
16372 you enter it---it'll have much the same effect.
16373
16374 @code{nnvirtual} can have both mail and news groups as component groups.
16375 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
16376 has to ask the back end of the component group the article comes from
16377 whether it is a news or mail back end.  However, when you do a @kbd{^},
16378 there is typically no sure way for the component back end to know this,
16379 and in that case @code{nnvirtual} tells Gnus that the article came from a
16380 not-news back end.  (Just to be on the safe side.)
16381
16382 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
16383 line from the article you respond to in these cases.
16384
16385 @code{nnvirtual} groups do not inherit anything but articles and marks
16386 from component groups---group parameters, for instance, are not
16387 inherited.
16388
16389
16390 @node Kibozed Groups
16391 @subsection Kibozed Groups
16392 @cindex nnkiboze
16393 @cindex kibozing
16394
16395 @dfn{Kibozing} is defined by @sc{oed} as ``grepping through (parts of)
16396 the news feed''.  @code{nnkiboze} is a back end that will do this for
16397 you.  Oh joy!  Now you can grind any @sc{nntp} server down to a halt
16398 with useless requests!  Oh happiness!
16399
16400 @kindex G k (Group)
16401 To create a kibozed group, use the @kbd{G k} command in the group
16402 buffer.
16403
16404 The address field of the @code{nnkiboze} method is, as with
16405 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
16406 @code{nnkiboze} group.  That's where most similarities between @code{nnkiboze}
16407 and @code{nnvirtual} end.
16408
16409 In addition to this regexp detailing component groups, an @code{nnkiboze} group
16410 must have a score file to say what articles are to be included in
16411 the group (@pxref{Scoring}).
16412
16413 @kindex M-x nnkiboze-generate-groups
16414 @findex nnkiboze-generate-groups
16415 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
16416 @code{nnkiboze} groups you want to have.  This command will take time.  Lots of
16417 time.  Oodles and oodles of time.  Gnus has to fetch the headers from
16418 all the articles in all the component groups and run them through the
16419 scoring process to determine if there are any articles in the groups
16420 that are to be part of the @code{nnkiboze} groups.
16421
16422 Please limit the number of component groups by using restrictive
16423 regexps.  Otherwise your sysadmin may become annoyed with you, and the
16424 @sc{nntp} site may throw you off and never let you back in again.
16425 Stranger things have happened.
16426
16427 @code{nnkiboze} component groups do not have to be alive---they can be dead,
16428 and they can be foreign.  No restrictions.
16429
16430 @vindex nnkiboze-directory
16431 The generation of an @code{nnkiboze} group means writing two files in
16432 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
16433 contains the @sc{nov} header lines for all the articles in the group,
16434 and the other is an additional @file{.newsrc} file to store information
16435 on what groups have been searched through to find component articles.
16436
16437 Articles marked as read in the @code{nnkiboze} group will have
16438 their @sc{nov} lines removed from the @sc{nov} file.
16439
16440
16441 @node Gnus Unplugged
16442 @section Gnus Unplugged
16443 @cindex offline
16444 @cindex unplugged
16445 @cindex Agent
16446 @cindex Gnus Agent
16447 @cindex Gnus Unplugged
16448
16449 In olden times (ca. February '88), people used to run their newsreaders
16450 on big machines with permanent connections to the net.  News transport
16451 was dealt with by news servers, and all the newsreaders had to do was to
16452 read news.  Believe it or not.
16453
16454 Nowadays most people read news and mail at home, and use some sort of
16455 modem to connect to the net.  To avoid running up huge phone bills, it
16456 would be nice to have a way to slurp down all the news and mail, hang up
16457 the phone, read for several hours, and then upload any responses you
16458 have to make.  And then you repeat the procedure.
16459
16460 Of course, you can use news servers for doing this as well.  I've used
16461 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
16462 for some years, but doing that's a bore.  Moving the news server
16463 functionality up to the newsreader makes sense if you're the only person
16464 reading news on a machine.
16465
16466 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
16467 fact, you don't even have to configure anything.
16468
16469 Of course, to use it as such, you have to learn a few new commands.
16470
16471 @menu
16472 * Agent Basics::                How it all is supposed to work.
16473 * Agent Categories::            How to tell the Gnus Agent what to download.
16474 * Agent Commands::              New commands for all the buffers.
16475 * Agent as Cache::              The Agent is a big cache too.
16476 * Agent Expiry::                How to make old articles go away.
16477 * Agent and IMAP::              How to use the Agent with IMAP.
16478 * Outgoing Messages::           What happens when you post/mail something?
16479 * Agent Variables::             Customizing is fun.
16480 * Example Setup::               An example @file{.gnus.el} file for offline people.
16481 * Batching Agents::             How to fetch news from a @code{cron} job.
16482 * Agent Caveats::               What you think it'll do and what it does.
16483 @end menu
16484
16485
16486 @node Agent Basics
16487 @subsection Agent Basics
16488
16489 First, let's get some terminology out of the way.
16490
16491 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
16492 connection to the net (and notified the Agent that this is the case).
16493 When the connection to the net is up again (and Gnus knows this), the
16494 Agent is @dfn{plugged}.
16495
16496 The @dfn{local} machine is the one you're running on, and which isn't
16497 connected to the net continuously.
16498
16499 @dfn{Downloading} means fetching things from the net to your local
16500 machine.  @dfn{Uploading} is doing the opposite.
16501
16502 Let's take a typical Gnus session using the Agent.
16503
16504 @itemize @bullet
16505
16506 @item
16507 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
16508 Agent in a disconnected state.  You can read all the news that you have
16509 already fetched while in this mode.
16510
16511 @item
16512 You then decide to see whether any new news has arrived.  You connect
16513 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
16514 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
16515 as usual.  To check for new mail in unplugged mode, see (@pxref{Mail
16516 Source Specifiers}).
16517
16518 @item
16519 You can then read the new news immediately, or you can download the news
16520 onto your local machine.  If you want to do the latter, you press @kbd{g}
16521 to check if there are any new news and then @kbd{J
16522 s} to fetch all the eligible articles in all the groups.  (To let Gnus
16523 know which articles you want to download, @pxref{Agent Categories}.)
16524
16525 @item
16526 After fetching the articles, you press @kbd{J j} to make Gnus become
16527 unplugged again, and you shut down the PPP thing (or whatever).  And
16528 then you read the news offline.
16529
16530 @item
16531 And then you go to step 2.
16532 @end itemize
16533
16534 Here are some things you should do the first time (or so) that you use
16535 the Agent.
16536
16537 @itemize @bullet
16538
16539 @item
16540 Decide which servers should be covered by the Agent.  If you have a mail
16541 back end, it would probably be nonsensical to have it covered by the
16542 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
16543 @kbd{J a} on the server (or servers) that you wish to have covered by the
16544 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
16545 added servers you do not wish to have covered by the Agent.  By default,
16546 all @code{nntp} and @code{nnimap} groups in @code{gnus-select-method} and
16547 @code{gnus-secondary-select-methods} are agentized.
16548
16549 @item
16550 Decide on download policy.  @xref{Agent Categories}.
16551
16552 @item
16553 Uhm... that's it.
16554 @end itemize
16555
16556
16557 @node Agent Categories
16558 @subsection Agent Categories
16559
16560 One of the main reasons to integrate the news transport layer into the
16561 newsreader is to allow greater control over what articles to download.
16562 There's not much point in downloading huge amounts of articles, just to
16563 find out that you're not interested in reading any of them.  It's better
16564 to be somewhat more conservative in choosing what to download, and then
16565 mark the articles for downloading manually if it should turn out that
16566 you're interested in the articles anyway.
16567
16568 The main way to control what is to be downloaded is to create a
16569 @dfn{category} and then assign some (or all) groups to this category.
16570 Groups that do not belong in any other category belong to the
16571 @code{default} category.  Gnus has its own buffer for creating and
16572 managing categories.
16573
16574 @menu
16575 * Category Syntax::             What a category looks like.
16576 * Category Buffer::             A buffer for maintaining categories.
16577 * Category Variables::          Customize'r'Us.
16578 @end menu
16579
16580
16581 @node Category Syntax
16582 @subsubsection Category Syntax
16583
16584 A category consists of two things.
16585
16586 @enumerate
16587 @item
16588 A predicate which (generally) gives a rough outline of which articles
16589 are eligible for downloading; and
16590
16591 @item
16592 a score rule which (generally) gives you a finer granularity when
16593 deciding what articles to download.  (Note that this @dfn{download
16594 score} is not necessarily related to normal scores.)
16595 @end enumerate
16596
16597 A predicate in its simplest form can be a single predicate such as
16598 @code{true} or @code{false}.  These two will download every available
16599 article or nothing respectively.  In the case of these two special
16600 predicates an additional score rule is superfluous.
16601
16602 Predicates of @code{high} or @code{low} download articles in respect of
16603 their scores in relationship to @code{gnus-agent-high-score} and
16604 @code{gnus-agent-low-score} as described below.
16605
16606 To gain even finer control of what is to be regarded eligible for
16607 download a predicate can consist of a number of predicates with logical
16608 operators sprinkled in between.
16609
16610 Perhaps some examples are in order.
16611
16612 Here's a simple predicate.  (It's the default predicate, in fact, used
16613 for all groups that don't belong to any other category.)
16614
16615 @lisp
16616 short
16617 @end lisp
16618
16619 Quite simple, eh?  This predicate is true if and only if the article is
16620 short (for some value of ``short'').
16621
16622 Here's a more complex predicate:
16623
16624 @lisp
16625 (or high
16626     (and
16627      (not low)
16628      (not long)))
16629 @end lisp
16630
16631 This means that an article should be downloaded if it has a high score,
16632 or if the score is not low and the article is not long.  You get the
16633 drift.
16634
16635 The available logical operators are @code{or}, @code{and} and
16636 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
16637 @samp{|}, @code{&} and @code{!} instead.)
16638
16639 The following predicates are pre-defined, but if none of these fit what
16640 you want to do, you can write your own.
16641
16642 @table @code
16643 @item short
16644 True iff the article is shorter than @code{gnus-agent-short-article}
16645 lines; default 100.
16646
16647 @item long
16648 True iff the article is longer than @code{gnus-agent-long-article}
16649 lines; default 200.
16650
16651 @item low
16652 True iff the article has a download score less than
16653 @code{gnus-agent-low-score}; default 0.
16654
16655 @item high
16656 True iff the article has a download score greater than
16657 @code{gnus-agent-high-score}; default 0.
16658
16659 @item spam
16660 True iff the Gnus Agent guesses that the article is spam.  The
16661 heuristics may change over time, but at present it just computes a
16662 checksum and sees whether articles match.
16663
16664 @item true
16665 Always true.
16666
16667 @item false
16668 Always false.
16669 @end table
16670
16671 If you want to create your own predicate function, here's what you have
16672 to know:  The functions are called with no parameters, but the
16673 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
16674 useful values.
16675
16676 For example, you could decide that you don't want to download articles
16677 that were posted more than a certain number of days ago (e.g. posted
16678 more than @code{gnus-agent-expire-days} ago) you might write a function
16679 something along the lines of the following:
16680
16681 @lisp
16682 (defun my-article-old-p ()
16683   "Say whether an article is old."
16684   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
16685      (- (time-to-days (current-time)) gnus-agent-expire-days)))
16686 @end lisp
16687
16688 with the predicate then defined as:
16689
16690 @lisp
16691 (not my-article-old-p)
16692 @end lisp
16693
16694 or you could append your predicate to the predefined
16695 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
16696 wherever.
16697
16698 @lisp
16699 (require 'gnus-agent)
16700 (setq  gnus-category-predicate-alist
16701   (append gnus-category-predicate-alist
16702          '((old . my-article-old-p))))
16703 @end lisp
16704
16705 and simply specify your predicate as:
16706
16707 @lisp
16708 (not old)
16709 @end lisp
16710
16711 If/when using something like the above, be aware that there are many
16712 misconfigured systems/mailers out there and so an article's date is not
16713 always a reliable indication of when it was posted.  Hell, some people
16714 just don't give a damn.
16715
16716 The above predicates apply to *all* the groups which belong to the
16717 category.  However, if you wish to have a specific predicate for an
16718 individual group within a category, or you're just too lazy to set up a
16719 new category, you can enter a group's individual predicate in it's group
16720 parameters like so:
16721
16722 @lisp
16723 (agent-predicate . short)
16724 @end lisp
16725
16726 This is the group parameter equivalent of the agent category default.
16727 Note that when specifying a single word predicate like this, the
16728 @code{agent-predicate} specification must be in dotted pair notation.
16729
16730 The equivalent of the longer example from above would be:
16731
16732 @lisp
16733 (agent-predicate or high (and (not low) (not long)))
16734 @end lisp
16735
16736 The outer parenthesis required in the category specification are not
16737 entered here as, not being in dotted pair notation, the value of the
16738 predicate is assumed to be a list.
16739
16740
16741 Now, the syntax of the download score is the same as the syntax of
16742 normal score files, except that all elements that require actually
16743 seeing the article itself are verboten.  This means that only the
16744 following headers can be scored on: @code{Subject}, @code{From},
16745 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
16746 @code{Lines}, and @code{Xref}.
16747
16748 As with predicates, the specification of the @code{download score rule}
16749 to use in respect of a group can be in either the category definition if
16750 it's to be applicable to all groups in therein, or a group's parameters
16751 if it's to be specific to that group.
16752
16753 In both of these places the @code{download score rule} can take one of
16754 three forms:
16755
16756 @enumerate
16757 @item
16758 Score rule
16759
16760 This has the same syntax as a normal gnus score file except only a
16761 subset of scoring keywords are available as mentioned above.
16762
16763 example:
16764
16765 @itemize @bullet
16766 @item
16767 Category specification
16768
16769 @lisp
16770 (("from"
16771        ("Lars Ingebrigtsen" 1000000 nil s))
16772 ("lines"
16773        (500 -100 nil <)))
16774 @end lisp
16775
16776 @item
16777 Group Parameter specification
16778
16779 @lisp
16780 (agent-score ("from"
16781                    ("Lars Ingebrigtsen" 1000000 nil s))
16782              ("lines"
16783                    (500 -100 nil <)))
16784 @end lisp
16785
16786 Again, note the omission of the outermost parenthesis here.
16787 @end itemize
16788
16789 @item
16790 Agent score file
16791
16792 These score files must *only* contain the permitted scoring keywords
16793 stated above.
16794
16795 example:
16796
16797 @itemize @bullet
16798 @item
16799 Category specification
16800
16801 @lisp
16802 ("~/News/agent.SCORE")
16803 @end lisp
16804
16805 or perhaps
16806
16807 @lisp
16808 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
16809 @end lisp
16810
16811 @item
16812 Group Parameter specification
16813
16814 @lisp
16815 (agent-score "~/News/agent.SCORE")
16816 @end lisp
16817
16818 Additional score files can be specified as above.  Need I say anything
16819 about parenthesis?
16820 @end itemize
16821
16822 @item
16823 Use @code{normal} score files
16824
16825 If you don't want to maintain two sets of scoring rules for a group, and
16826 your desired @code{downloading} criteria for a group are the same as your
16827 @code{reading} criteria then you can tell the agent to refer to your
16828 @code{normal} score files when deciding what to download.
16829
16830 These directives in either the category definition or a group's
16831 parameters will cause the agent to read in all the applicable score
16832 files for a group, *filtering out* those sections that do not
16833 relate to one of the permitted subset of scoring keywords.
16834
16835 @itemize @bullet
16836 @item
16837 Category Specification
16838
16839 @lisp
16840 file
16841 @end lisp
16842
16843 @item
16844 Group Parameter specification
16845
16846 @lisp
16847 (agent-score . file)
16848 @end lisp
16849 @end itemize
16850 @end enumerate
16851
16852 @node Category Buffer
16853 @subsubsection Category Buffer
16854
16855 You'd normally do all category maintenance from the category buffer.
16856 When you enter it for the first time (with the @kbd{J c} command from
16857 the group buffer), you'll only see the @code{default} category.
16858
16859 The following commands are available in this buffer:
16860
16861 @table @kbd
16862 @item q
16863 @kindex q (Category)
16864 @findex gnus-category-exit
16865 Return to the group buffer (@code{gnus-category-exit}).
16866
16867 @item k
16868 @kindex k (Category)
16869 @findex gnus-category-kill
16870 Kill the current category (@code{gnus-category-kill}).
16871
16872 @item c
16873 @kindex c (Category)
16874 @findex gnus-category-copy
16875 Copy the current category (@code{gnus-category-copy}).
16876
16877 @item a
16878 @kindex a (Category)
16879 @findex gnus-category-add
16880 Add a new category (@code{gnus-category-add}).
16881
16882 @item p
16883 @kindex p (Category)
16884 @findex gnus-category-edit-predicate
16885 Edit the predicate of the current category
16886 (@code{gnus-category-edit-predicate}).
16887
16888 @item g
16889 @kindex g (Category)
16890 @findex gnus-category-edit-groups
16891 Edit the list of groups belonging to the current category
16892 (@code{gnus-category-edit-groups}).
16893
16894 @item s
16895 @kindex s (Category)
16896 @findex gnus-category-edit-score
16897 Edit the download score rule of the current category
16898 (@code{gnus-category-edit-score}).
16899
16900 @item l
16901 @kindex l (Category)
16902 @findex gnus-category-list
16903 List all the categories (@code{gnus-category-list}).
16904 @end table
16905
16906
16907 @node Category Variables
16908 @subsubsection Category Variables
16909
16910 @table @code
16911 @item gnus-category-mode-hook
16912 @vindex gnus-category-mode-hook
16913 Hook run in category buffers.
16914
16915 @item gnus-category-line-format
16916 @vindex gnus-category-line-format
16917 Format of the lines in the category buffer (@pxref{Formatting
16918 Variables}).  Valid elements are:
16919
16920 @table @samp
16921 @item c
16922 The name of the category.
16923
16924 @item g
16925 The number of groups in the category.
16926 @end table
16927
16928 @item gnus-category-mode-line-format
16929 @vindex gnus-category-mode-line-format
16930 Format of the category mode line (@pxref{Mode Line Formatting}).
16931
16932 @item gnus-agent-short-article
16933 @vindex gnus-agent-short-article
16934 Articles that have fewer lines than this are short.  Default 100.
16935
16936 @item gnus-agent-long-article
16937 @vindex gnus-agent-long-article
16938 Articles that have more lines than this are long.  Default 200.
16939
16940 @item gnus-agent-low-score
16941 @vindex gnus-agent-low-score
16942 Articles that have a score lower than this have a low score.  Default
16943 0.
16944
16945 @item gnus-agent-high-score
16946 @vindex gnus-agent-high-score
16947 Articles that have a score higher than this have a high score.  Default
16948 0.
16949
16950 @end table
16951
16952
16953 @node Agent Commands
16954 @subsection Agent Commands
16955
16956 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
16957 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
16958 toggles the plugged/unplugged state of the Gnus Agent.
16959
16960
16961 @menu
16962 * Group Agent Commands::        
16963 * Summary Agent Commands::      
16964 * Server Agent Commands::       
16965 @end menu
16966
16967 You can run a complete batch command from the command line with the
16968 following incantation:
16969
16970 @cindex gnus-agent-batch
16971 @example
16972 $ emacs -batch -l ~/.gnus.el -f gnus-agent-batch
16973 @end example
16974
16975
16976
16977 @node Group Agent Commands
16978 @subsubsection Group Agent Commands
16979
16980 @table @kbd
16981 @item J u
16982 @kindex J u (Agent Group)
16983 @findex gnus-agent-fetch-groups
16984 Fetch all eligible articles in the current group
16985 (@code{gnus-agent-fetch-groups}).
16986
16987 @item J c
16988 @kindex J c (Agent Group)
16989 @findex gnus-enter-category-buffer
16990 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
16991
16992 @item J s
16993 @kindex J s (Agent Group)
16994 @findex gnus-agent-fetch-session
16995 Fetch all eligible articles in all groups
16996 (@code{gnus-agent-fetch-session}).
16997
16998 @item J S
16999 @kindex J S (Agent Group)
17000 @findex gnus-group-send-queue
17001 Send all sendable messages in the queue group
17002 (@code{gnus-group-send-queue}).  @xref{Drafts}.
17003
17004 @item J a
17005 @kindex J a (Agent Group)
17006 @findex gnus-agent-add-group
17007 Add the current group to an Agent category
17008 (@code{gnus-agent-add-group}).  This command understands the
17009 process/prefix convention (@pxref{Process/Prefix}).
17010
17011 @item J r
17012 @kindex J r (Agent Group)
17013 @findex gnus-agent-remove-group
17014 Remove the current group from its category, if any
17015 (@code{gnus-agent-remove-group}).  This command understands the
17016 process/prefix convention (@pxref{Process/Prefix}).
17017
17018 @item J Y
17019 @kindex J Y (Agent Group)
17020 @findex gnus-agent-synchronize-flags
17021 Synchronize flags changed while unplugged with remote server, if any.
17022
17023
17024 @end table
17025
17026
17027 @node Summary Agent Commands
17028 @subsubsection Summary Agent Commands
17029
17030 @table @kbd
17031 @item J #
17032 @kindex J # (Agent Summary)
17033 @findex gnus-agent-mark-article
17034 Mark the article for downloading (@code{gnus-agent-mark-article}).
17035
17036 @item J M-#
17037 @kindex J M-# (Agent Summary)
17038 @findex gnus-agent-unmark-article
17039 Remove the downloading mark from the article
17040 (@code{gnus-agent-unmark-article}).
17041
17042 @item @@
17043 @kindex @@ (Agent Summary)
17044 @findex gnus-agent-toggle-mark
17045 Toggle whether to download the article (@code{gnus-agent-toggle-mark}).
17046
17047 @item J c
17048 @kindex J c (Agent Summary)
17049 @findex gnus-agent-catchup
17050 Mark all undownloaded articles as read (@code{gnus-agent-catchup}).
17051
17052 @item J u
17053 @kindex J u (Agent Summary)
17054 @findex gnus-agent-summary-fetch-group
17055 Download all downloadable articles in the current group
17056 (@code{gnus-agent-summary-fetch-group}).
17057
17058 @end table
17059
17060
17061 @node Server Agent Commands
17062 @subsubsection Server Agent Commands
17063
17064 @table @kbd
17065 @item J a
17066 @kindex J a (Agent Server)
17067 @findex gnus-agent-add-server
17068 Add the current server to the list of servers covered by the Gnus Agent
17069 (@code{gnus-agent-add-server}).
17070
17071 @item J r
17072 @kindex J r (Agent Server)
17073 @findex gnus-agent-remove-server
17074 Remove the current server from the list of servers covered by the Gnus
17075 Agent (@code{gnus-agent-remove-server}).
17076
17077 @end table
17078
17079
17080 @node Agent as Cache
17081 @subsection Agent as Cache
17082
17083 When Gnus is plugged, it is not efficient to download headers or
17084 articles from the server again, if they are already stored in the
17085 Agent.  So, Gnus normally only downloads headers once, and stores them
17086 in the Agent.  These headers are later used when generating the summary
17087 buffer, regardless of whether you are plugged or unplugged.  Articles
17088 are not cached in the Agent by default though (that would potentially
17089 consume lots of disk space), but if you have already downloaded an
17090 article into the Agent, Gnus will not download the article from the
17091 server again but use the locally stored copy instead.
17092
17093 This behaviour can be controlled by @code{gnus-agent-cache}
17094 (@pxref{Agent Variables}).
17095
17096 @node Agent Expiry
17097 @subsection Agent Expiry
17098
17099 @vindex gnus-agent-expire-days
17100 @findex gnus-agent-expire
17101 @kindex M-x gnus-agent-expire
17102 @cindex Agent expiry
17103 @cindex Gnus Agent expiry
17104 @cindex expiry
17105
17106 @code{nnagent} doesn't handle expiry.  Instead, there's a special
17107 @code{gnus-agent-expire} command that will expire all read articles that
17108 are older than @code{gnus-agent-expire-days} days.  It can be run
17109 whenever you feel that you're running out of space.  It's not
17110 particularly fast or efficient, and it's not a particularly good idea to
17111 interrupt it (with @kbd{C-g} or anything else) once you've started it.
17112
17113 @code{gnus-agent-expire-days} can also be a list of regexp/day pairs.
17114 The regexps will be matched against group names to allow differing
17115 expiry in different groups.
17116
17117 @lisp
17118 (setq gnus-agent-expire-days
17119       '(("alt\\." 7)
17120         (".*binary" 1)
17121         ("." 21)))
17122 @end lisp
17123
17124 If you use the list form, the last element must always be the default
17125 method---it must always match all groups.
17126
17127 @vindex gnus-agent-expire-all
17128 If @code{gnus-agent-expire-all} is non-@code{nil}, this command will
17129 expire all articles---unread, read, ticked and dormant.  If @code{nil}
17130 (which is the default), only read articles are eligible for expiry, and
17131 unread, ticked and dormant articles will be kept indefinitely.
17132
17133 @findex gnus-agent-regenerate
17134 If you find that some articles eligible for expiry are never expired,
17135 perhaps some Gnus Agent files are corrupted.  There's a special
17136 @code{gnus-agent-regenerate} command to fix possible problems.
17137
17138 @node Agent and IMAP
17139 @subsection Agent and IMAP
17140
17141 The Agent work with any Gnus back end, including nnimap.  However,
17142 since there are some conceptual differences between @sc{nntp} and
17143 @sc{imap}, this section (should) provide you with some information to
17144 make Gnus Agent work smoother as a @sc{imap} Disconnected Mode client.
17145
17146 The first thing to keep in mind is that all flags (read, ticked, etc)
17147 are kept on the @sc{imap} server, rather than in @code{.newsrc} as is the
17148 case for nntp.  Thus Gnus need to remember flag changes when
17149 disconnected, and synchronize these flags when you plug back in.
17150
17151 Gnus keeps track of flag changes when reading nnimap groups under the
17152 Agent.  When you plug back in, Gnus will check if you have any changed
17153 any flags and ask if you wish to synchronize these with the server.
17154 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
17155
17156 @vindex gnus-agent-synchronize-flags
17157 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
17158 never automatically synchronize flags.  If it is @code{ask}, which is
17159 the default, the Agent will check if you made any changes and if so
17160 ask if you wish to synchronize these when you re-connect.  If it has
17161 any other value, all flags will be synchronized automatically.
17162
17163 If you do not wish to synchronize flags automatically when you
17164 re-connect, you can do it manually with the
17165 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
17166 in the group buffer.
17167
17168 Some things are currently not implemented in the Agent that you'd might
17169 expect from a disconnected @sc{imap} client, including:
17170
17171 @itemize @bullet
17172
17173 @item
17174 Copying/moving articles into nnimap groups when unplugged.
17175
17176 @item
17177 Creating/deleting nnimap groups when unplugged.
17178
17179 @end itemize
17180
17181 Technical note: the synchronization algorithm does not work by "pushing"
17182 all local flags to the server, but rather incrementally update the
17183 server view of flags by changing only those flags that were changed by
17184 the user.  Thus, if you set one flag on a article, quit the group and
17185 re-select the group and remove the flag; the flag will be set and
17186 removed from the server when you "synchronize".  The queued flag
17187 operations can be found in the per-server @code{flags} file in the Agent
17188 directory.  It's emptied when you synchronize flags.
17189
17190
17191 @node Outgoing Messages
17192 @subsection Outgoing Messages
17193
17194 When Gnus is unplugged, all outgoing messages (both mail and news) are
17195 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
17196 them there after posting, and edit them at will.
17197
17198 When Gnus is plugged again, you can send the messages either from the
17199 draft group with the special commands available there, or you can use
17200 the @kbd{J S} command in the group buffer to send all the sendable
17201 messages in the draft group.
17202
17203
17204
17205 @node Agent Variables
17206 @subsection Agent Variables
17207
17208 @table @code
17209 @item gnus-agent-directory
17210 @vindex gnus-agent-directory
17211 Where the Gnus Agent will store its files.  The default is
17212 @file{~/News/agent/}.
17213
17214 @item gnus-agent-handle-level
17215 @vindex gnus-agent-handle-level
17216 Groups on levels (@pxref{Group Levels}) higher than this variable will
17217 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
17218 which means that only subscribed group will be considered by the Agent
17219 by default.
17220
17221 @item gnus-agent-plugged-hook
17222 @vindex gnus-agent-plugged-hook
17223 Hook run when connecting to the network.
17224
17225 @item gnus-agent-unplugged-hook
17226 @vindex gnus-agent-unplugged-hook
17227 Hook run when disconnecting from the network.
17228
17229 @item gnus-agent-fetched-hook
17230 @vindex gnus-agent-fetched-hook
17231 Hook run when after finishing fetching articles.
17232
17233 @item gnus-agent-cache
17234 @vindex gnus-agent-cache
17235 Variable to control whether use the locally stored @sc{nov} and
17236 articles when plugged, e.g. essentially using the Agent as a cache.
17237 The default is non-nil, which means to use the Agent as a cache.
17238
17239 @item gnus-agent-go-online
17240 @vindex gnus-agent-go-online
17241 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
17242 automatically switch offline servers into online status.  If it is
17243 @code{ask}, the default, the Agent will ask if you wish to switch
17244 offline servers into online status when you re-connect.  If it has any
17245 other value, all offline servers will be automatically switched into
17246 online status.
17247
17248 @item gnus-server-unopen-status
17249 @vindex gnus-server-unopen-status
17250 Perhaps not a Agent variable, but closely related to the Agent, this
17251 variable says what will happen if Gnus cannot open a server.  If the
17252 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
17253 whether to deny the server or whether to unplug the agent.  If the
17254 Agent is disabled, Gnus always simply deny the server.  Other choices
17255 for this variable include @code{denied} and @code{offline} the latter
17256 is only valid if the Agent is used.
17257
17258 @end table
17259
17260
17261 @node Example Setup
17262 @subsection Example Setup
17263
17264 If you don't want to read this manual, and you have a fairly standard
17265 setup, you may be able to use something like the following as your
17266 @file{.gnus.el} file to get started.
17267
17268 @lisp
17269 ;;; Define how Gnus is to fetch news.  We do this over @sc{nntp}
17270 ;;; from your ISP's server.
17271 (setq gnus-select-method '(nntp "news.your-isp.com"))
17272
17273 ;;; Define how Gnus is to read your mail.  We read mail from
17274 ;;; your ISP's POP server.
17275 (setq mail-sources '((pop :server "pop.your-isp.com")))
17276
17277 ;;; Say how Gnus is to store the mail.  We use nnml groups.
17278 (setq gnus-secondary-select-methods '((nnml "")))
17279
17280 ;;; Make Gnus into an offline newsreader.
17281 ;;; (gnus-agentize) ; The obsolete setting.
17282 ;;; (setq gnus-agent t) ; Now the default.
17283 @end lisp
17284
17285 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
17286 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
17287 gnus}.
17288
17289 If this is the first time you've run Gnus, you will be subscribed
17290 automatically to a few default newsgroups.  You'll probably want to
17291 subscribe to more groups, and to do that, you have to query the
17292 @sc{nntp} server for a complete list of groups with the @kbd{A A}
17293 command.  This usually takes quite a while, but you only have to do it
17294 once.
17295
17296 After reading and parsing a while, you'll be presented with a list of
17297 groups.  Subscribe to the ones you want to read with the @kbd{u}
17298 command.  @kbd{l} to make all the killed groups disappear after you've
17299 subscribe to all the groups you want to read.  (@kbd{A k} will bring
17300 back all the killed groups.)
17301
17302 You can now read the groups at once, or you can download the articles
17303 with the @kbd{J s} command.  And then read the rest of this manual to
17304 find out which of the other gazillion things you want to customize.
17305
17306
17307 @node Batching Agents
17308 @subsection Batching Agents
17309
17310 Having the Gnus Agent fetch articles (and post whatever messages you've
17311 written) is quite easy once you've gotten things set up properly.  The
17312 following shell script will do everything that is necessary:
17313
17314 @example
17315 #!/bin/sh
17316 emacs -batch -l ~/.emacs -f gnus-agent-batch >/dev/null
17317 @end example
17318
17319
17320 @node Agent Caveats
17321 @subsection Agent Caveats
17322
17323 The Gnus Agent doesn't seem to work like most other offline
17324 newsreaders.  Here are some common questions that some imaginary people
17325 may ask:
17326
17327 @table @dfn
17328 @item If I read an article while plugged, do they get entered into the Agent?
17329
17330 @strong{No}.
17331
17332 @item If I read an article while plugged, and the article already exists in the Agent, will it get downloaded once more?
17333
17334 @strong{No}, unless @code{gnus-agent-cache} is `nil'.
17335
17336 @end table
17337
17338 In short, when Gnus is unplugged, it only looks into the locally stored
17339 articles; when it's plugged, it only talks to your ISP and also uses the
17340 locally stored articles.
17341
17342
17343 @node Scoring
17344 @chapter Scoring
17345 @cindex scoring
17346
17347 Other people use @dfn{kill files}, but we here at Gnus Towers like
17348 scoring better than killing, so we'd rather switch than fight.  They do
17349 something completely different as well, so sit up straight and pay
17350 attention!
17351
17352 @vindex gnus-summary-mark-below
17353 All articles have a default score (@code{gnus-summary-default-score}),
17354 which is 0 by default.  This score may be raised or lowered either
17355 interactively or by score files.  Articles that have a score lower than
17356 @code{gnus-summary-mark-below} are marked as read.
17357
17358 Gnus will read any @dfn{score files} that apply to the current group
17359 before generating the summary buffer.
17360
17361 There are several commands in the summary buffer that insert score
17362 entries based on the current article.  You can, for instance, ask Gnus to
17363 lower or increase the score of all articles with a certain subject.
17364
17365 There are two sorts of scoring entries: Permanent and temporary.
17366 Temporary score entries are self-expiring entries.  Any entries that are
17367 temporary and have not been used for, say, a week, will be removed
17368 silently to help keep the sizes of the score files down.
17369
17370 @menu
17371 * Summary Score Commands::      Adding score entries for the current group.
17372 * Group Score Commands::        General score commands.
17373 * Score Variables::             Customize your scoring.  (My, what terminology).
17374 * Score File Format::           What a score file may contain.
17375 * Score File Editing::          You can edit score files by hand as well.
17376 * Adaptive Scoring::            Big Sister Gnus knows what you read.
17377 * Home Score File::             How to say where new score entries are to go.
17378 * Followups To Yourself::       Having Gnus notice when people answer you.
17379 * Scoring On Other Headers::    Scoring on non-standard headers.
17380 * Scoring Tips::                How to score effectively.
17381 * Reverse Scoring::             That problem child of old is not problem.
17382 * Global Score Files::          Earth-spanning, ear-splitting score files.
17383 * Kill Files::                  They are still here, but they can be ignored.
17384 * Converting Kill Files::       Translating kill files to score files.
17385 * GroupLens::                   Getting predictions on what you like to read.
17386 * Advanced Scoring::            Using logical expressions to build score rules.
17387 * Score Decays::                It can be useful to let scores wither away.
17388 @end menu
17389
17390
17391 @node Summary Score Commands
17392 @section Summary Score Commands
17393 @cindex score commands
17394
17395 The score commands that alter score entries do not actually modify real
17396 score files.  That would be too inefficient.  Gnus maintains a cache of
17397 previously loaded score files, one of which is considered the
17398 @dfn{current score file alist}.  The score commands simply insert
17399 entries into this list, and upon group exit, this list is saved.
17400
17401 The current score file is by default the group's local score file, even
17402 if no such score file actually exists.  To insert score commands into
17403 some other score file (e.g. @file{all.SCORE}), you must first make this
17404 score file the current one.
17405
17406 General score commands that don't actually change the score file:
17407
17408 @table @kbd
17409
17410 @item V s
17411 @kindex V s (Summary)
17412 @findex gnus-summary-set-score
17413 Set the score of the current article (@code{gnus-summary-set-score}).
17414
17415 @item V S
17416 @kindex V S (Summary)
17417 @findex gnus-summary-current-score
17418 Display the score of the current article
17419 (@code{gnus-summary-current-score}).
17420
17421 @item V t
17422 @kindex V t (Summary)
17423 @findex gnus-score-find-trace
17424 Display all score rules that have been used on the current article
17425 (@code{gnus-score-find-trace}).
17426
17427 @item V w
17428 @kindex V w (Summary)
17429 @findex gnus-score-find-favourite-words
17430 List words used in scoring (@code{gnus-score-find-favourite-words}).
17431
17432 @item V R
17433 @kindex V R (Summary)
17434 @findex gnus-summary-rescore
17435 Run the current summary through the scoring process
17436 (@code{gnus-summary-rescore}).  This might be useful if you're playing
17437 around with your score files behind Gnus' back and want to see the
17438 effect you're having.
17439
17440 @item V c
17441 @kindex V c (Summary)
17442 @findex gnus-score-change-score-file
17443 Make a different score file the current
17444 (@code{gnus-score-change-score-file}).
17445
17446 @item V e
17447 @kindex V e (Summary)
17448 @findex gnus-score-edit-current-scores
17449 Edit the current score file (@code{gnus-score-edit-current-scores}).
17450 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
17451 File Editing}).
17452
17453 @item V f
17454 @kindex V f (Summary)
17455 @findex gnus-score-edit-file
17456 Edit a score file and make this score file the current one
17457 (@code{gnus-score-edit-file}).
17458
17459 @item V F
17460 @kindex V F (Summary)
17461 @findex gnus-score-flush-cache
17462 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
17463 after editing score files.
17464
17465 @item V C
17466 @kindex V C (Summary)
17467 @findex gnus-score-customize
17468 Customize a score file in a visually pleasing manner
17469 (@code{gnus-score-customize}).
17470
17471 @end table
17472
17473 The rest of these commands modify the local score file.
17474
17475 @table @kbd
17476
17477 @item V m
17478 @kindex V m (Summary)
17479 @findex gnus-score-set-mark-below
17480 Prompt for a score, and mark all articles with a score below this as
17481 read (@code{gnus-score-set-mark-below}).
17482
17483 @item V x
17484 @kindex V x (Summary)
17485 @findex gnus-score-set-expunge-below
17486 Prompt for a score, and add a score rule to the current score file to
17487 expunge all articles below this score
17488 (@code{gnus-score-set-expunge-below}).
17489 @end table
17490
17491 The keystrokes for actually making score entries follow a very regular
17492 pattern, so there's no need to list all the commands.  (Hundreds of
17493 them.)
17494
17495 @findex gnus-summary-increase-score
17496 @findex gnus-summary-lower-score
17497
17498 @enumerate
17499 @item
17500 The first key is either @kbd{I} (upper case i) for increasing the score
17501 or @kbd{L} for lowering the score.
17502 @item
17503 The second key says what header you want to score on.  The following
17504 keys are available:
17505 @table @kbd
17506
17507 @item a
17508 Score on the author name.
17509
17510 @item s
17511 Score on the subject line.
17512
17513 @item x
17514 Score on the @code{Xref} line---i.e., the cross-posting line.
17515
17516 @item r
17517 Score on the @code{References} line.
17518
17519 @item d
17520 Score on the date.
17521
17522 @item l
17523 Score on the number of lines.
17524
17525 @item i
17526 Score on the @code{Message-ID} header.
17527
17528 @item e
17529 Score on an "extra" header, that is, one of those in gnus-extra-headers,
17530 if your @sc{nntp} server tracks additional header data in overviews.
17531
17532 @item f
17533 Score on followups---this matches the author name, and adds scores to
17534 the followups to this author.  (Using this key leads to the creation of
17535 @file{ADAPT} files.)
17536
17537 @item b
17538 Score on the body.
17539
17540 @item h
17541 Score on the head.
17542
17543 @item t
17544 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
17545 files.)
17546
17547 @end table
17548
17549 @item
17550 The third key is the match type.  Which match types are valid depends on
17551 what headers you are scoring on.
17552
17553 @table @code
17554
17555 @item strings
17556
17557 @table @kbd
17558
17559 @item e
17560 Exact matching.
17561
17562 @item s
17563 Substring matching.
17564
17565 @item f
17566 Fuzzy matching (@pxref{Fuzzy Matching}).
17567
17568 @item r
17569 Regexp matching
17570 @end table
17571
17572 @item date
17573 @table @kbd
17574
17575 @item b
17576 Before date.
17577
17578 @item a
17579 After date.
17580
17581 @item n
17582 This date.
17583 @end table
17584
17585 @item number
17586 @table @kbd
17587
17588 @item <
17589 Less than number.
17590
17591 @item =
17592 Equal to number.
17593
17594 @item >
17595 Greater than number.
17596 @end table
17597 @end table
17598
17599 @item
17600 The fourth and usually final key says whether this is a temporary (i.e.,
17601 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
17602 or whether it is to be done immediately, without adding to the score
17603 file.
17604 @table @kbd
17605
17606 @item t
17607 Temporary score entry.
17608
17609 @item p
17610 Permanent score entry.
17611
17612 @item i
17613 Immediately scoring.
17614 @end table
17615
17616 @item
17617 If you are scoring on `e' (extra) headers, you will then be prompted for
17618 the header name on which you wish to score.  This must be a header named
17619 in gnus-extra-headers, and @samp{TAB} completion is available.
17620
17621 @end enumerate
17622
17623 So, let's say you want to increase the score on the current author with
17624 exact matching permanently: @kbd{I a e p}.  If you want to lower the
17625 score based on the subject line, using substring matching, and make a
17626 temporary score entry: @kbd{L s s t}.  Pretty easy.
17627
17628 To make things a bit more complicated, there are shortcuts.  If you use
17629 a capital letter on either the second or third keys, Gnus will use
17630 defaults for the remaining one or two keystrokes.  The defaults are
17631 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
17632 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
17633
17634 These functions take both the numerical prefix and the symbolic prefix
17635 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
17636 (or increase) the score of the article.  A symbolic prefix of @code{a}
17637 says to use the @file{all.SCORE} file for the command instead of the
17638 current score file.
17639
17640 @vindex gnus-score-mimic-keymap
17641 The @code{gnus-score-mimic-keymap} says whether these commands will
17642 pretend they are keymaps or not.
17643
17644
17645 @node Group Score Commands
17646 @section Group Score Commands
17647 @cindex group score commands
17648
17649 There aren't many of these as yet, I'm afraid.
17650
17651 @table @kbd
17652
17653 @item W f
17654 @kindex W f (Group)
17655 @findex gnus-score-flush-cache
17656 Gnus maintains a cache of score alists to avoid having to reload them
17657 all the time.  This command will flush the cache
17658 (@code{gnus-score-flush-cache}).
17659
17660 @end table
17661
17662 You can do scoring from the command line by saying something like:
17663
17664 @findex gnus-batch-score
17665 @cindex batch scoring
17666 @example
17667 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
17668 @end example
17669
17670
17671 @node Score Variables
17672 @section Score Variables
17673 @cindex score variables
17674
17675 @table @code
17676
17677 @item gnus-use-scoring
17678 @vindex gnus-use-scoring
17679 If @code{nil}, Gnus will not check for score files, and will not, in
17680 general, do any score-related work.  This is @code{t} by default.
17681
17682 @item gnus-kill-killed
17683 @vindex gnus-kill-killed
17684 If this variable is @code{nil}, Gnus will never apply score files to
17685 articles that have already been through the kill process.  While this
17686 may save you lots of time, it also means that if you apply a kill file
17687 to a group, and then change the kill file and want to run it over you
17688 group again to kill more articles, it won't work.  You have to set this
17689 variable to @code{t} to do that.  (It is @code{t} by default.)
17690
17691 @item gnus-kill-files-directory
17692 @vindex gnus-kill-files-directory
17693 All kill and score files will be stored in this directory, which is
17694 initialized from the @code{SAVEDIR} environment variable by default.
17695 This is @file{~/News/} by default.
17696
17697 @item gnus-score-file-suffix
17698 @vindex gnus-score-file-suffix
17699 Suffix to add to the group name to arrive at the score file name
17700 (@samp{SCORE} by default.)
17701
17702 @item gnus-score-uncacheable-files
17703 @vindex gnus-score-uncacheable-files
17704 @cindex score cache
17705 All score files are normally cached to avoid excessive re-loading of
17706 score files.  However, if this might make your Emacs grow big and
17707 bloated, so this regexp can be used to weed out score files unlikely to be needed again.  It would be a bad idea to deny caching of
17708 @file{all.SCORE}, while it might be a good idea to not cache
17709 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
17710 variable is @samp{ADAPT$} by default, so no adaptive score files will
17711 be cached.
17712
17713 @item gnus-save-score
17714 @vindex gnus-save-score
17715 If you have really complicated score files, and do lots of batch
17716 scoring, then you might set this variable to @code{t}.  This will make
17717 Gnus save the scores into the @file{.newsrc.eld} file.
17718
17719 If you do not set this to @code{t}, then manual scores (like those set
17720 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
17721 across group visits.
17722
17723 @item gnus-score-interactive-default-score
17724 @vindex gnus-score-interactive-default-score
17725 Score used by all the interactive raise/lower commands to raise/lower
17726 score with.  Default is 1000, which may seem excessive, but this is to
17727 ensure that the adaptive scoring scheme gets enough room to play with.
17728 We don't want the small changes from the adaptive scoring to overwrite
17729 manually entered data.
17730
17731 @item gnus-summary-default-score
17732 @vindex gnus-summary-default-score
17733 Default score of an article, which is 0 by default.
17734
17735 @item gnus-summary-expunge-below
17736 @vindex gnus-summary-expunge-below
17737 Don't display the summary lines of articles that have scores lower than
17738 this variable.  This is @code{nil} by default, which means that no
17739 articles will be hidden.  This variable is local to the summary buffers,
17740 and has to be set from @code{gnus-summary-mode-hook}.
17741
17742 @item gnus-score-over-mark
17743 @vindex gnus-score-over-mark
17744 Mark (in the third column) used for articles with a score over the
17745 default.  Default is @samp{+}.
17746
17747 @item gnus-score-below-mark
17748 @vindex gnus-score-below-mark
17749 Mark (in the third column) used for articles with a score below the
17750 default.  Default is @samp{-}.
17751
17752 @item gnus-score-find-score-files-function
17753 @vindex gnus-score-find-score-files-function
17754 Function used to find score files for the current group.  This function
17755 is called with the name of the group as the argument.
17756
17757 Predefined functions available are:
17758 @table @code
17759
17760 @item gnus-score-find-single
17761 @findex gnus-score-find-single
17762 Only apply the group's own score file.
17763
17764 @item gnus-score-find-bnews
17765 @findex gnus-score-find-bnews
17766 Apply all score files that match, using bnews syntax.  This is the
17767 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
17768 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
17769 @file{gnu.all.SCORE} would all apply.  In short, the instances of
17770 @samp{all} in the score file names are translated into @samp{.*}, and
17771 then a regexp match is done.
17772
17773 This means that if you have some score entries that you want to apply to
17774 all groups, then you put those entries in the @file{all.SCORE} file.
17775
17776 The score files are applied in a semi-random order, although Gnus will
17777 try to apply the more general score files before the more specific score
17778 files.  It does this by looking at the number of elements in the score
17779 file names---discarding the @samp{all} elements.
17780
17781 @item gnus-score-find-hierarchical
17782 @findex gnus-score-find-hierarchical
17783 Apply all score files from all the parent groups.  This means that you
17784 can't have score files like @file{all.SCORE}, but you can have
17785 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
17786 server.
17787
17788 @end table
17789 This variable can also be a list of functions.  In that case, all
17790 these functions will be called with the group name as argument, and
17791 all the returned lists of score files will be applied.  These
17792 functions can also return lists of lists of score alists directly.  In
17793 that case, the functions that return these non-file score alists
17794 should probably be placed before the ``real'' score file functions, to
17795 ensure that the last score file returned is the local score file.
17796 Phu.
17797
17798 For example, to do hierarchical scoring but use a non-server-specific
17799 overall score file, you could use the value
17800 @example
17801 (list (lambda (group) ("all.SCORE"))
17802       'gnus-score-find-hierarchical)
17803 @end example
17804
17805 @item gnus-score-expiry-days
17806 @vindex gnus-score-expiry-days
17807 This variable says how many days should pass before an unused score file
17808 entry is expired.  If this variable is @code{nil}, no score file entries
17809 are expired.  It's 7 by default.
17810
17811 @item gnus-update-score-entry-dates
17812 @vindex gnus-update-score-entry-dates
17813 If this variable is non-@code{nil}, temporary score entries that have
17814 been triggered (matched) will have their dates updated.  (This is how Gnus
17815 controls expiry---all non-matched-entries will become too old while
17816 matched entries will stay fresh and young.)  However, if you set this
17817 variable to @code{nil}, even matched entries will grow old and will
17818 have to face that oh-so grim reaper.
17819
17820 @item gnus-score-after-write-file-function
17821 @vindex gnus-score-after-write-file-function
17822 Function called with the name of the score file just written.
17823
17824 @item gnus-score-thread-simplify
17825 @vindex gnus-score-thread-simplify
17826 If this variable is non-@code{nil}, article subjects will be simplified
17827 for subject scoring purposes in the same manner as with
17828 threading---according to the current value of
17829 gnus-simplify-subject-functions.  If the scoring entry uses
17830 @code{substring} or @code{exact} matching, the match will also be
17831 simplified in this manner.
17832
17833 @end table
17834
17835
17836 @node Score File Format
17837 @section Score File Format
17838 @cindex score file format
17839
17840 A score file is an @code{emacs-lisp} file that normally contains just a
17841 single form.  Casual users are not expected to edit these files;
17842 everything can be changed from the summary buffer.
17843
17844 Anyway, if you'd like to dig into it yourself, here's an example:
17845
17846 @lisp
17847 (("from"
17848   ("Lars Ingebrigtsen" -10000)
17849   ("Per Abrahamsen")
17850   ("larsi\\|lmi" -50000 nil R))
17851  ("subject"
17852   ("Ding is Badd" nil 728373))
17853  ("xref"
17854   ("alt.politics" -1000 728372 s))
17855  ("lines"
17856   (2 -100 nil <))
17857  (mark 0)
17858  (expunge -1000)
17859  (mark-and-expunge -10)
17860  (read-only nil)
17861  (orphan -10)
17862  (adapt t)
17863  (files "/hom/larsi/News/gnu.SCORE")
17864  (exclude-files "all.SCORE")
17865  (local (gnus-newsgroup-auto-expire t)
17866         (gnus-summary-make-false-root empty))
17867  (eval (ding)))
17868 @end lisp
17869
17870 This example demonstrates most score file elements.  For a different
17871 approach, see @pxref{Advanced Scoring}.
17872
17873 Even though this looks much like lisp code, nothing here is actually
17874 @code{eval}ed.  The lisp reader is used to read this form, though, so it
17875 has to be valid syntactically, if not semantically.
17876
17877 Six keys are supported by this alist:
17878
17879 @table @code
17880
17881 @item STRING
17882 If the key is a string, it is the name of the header to perform the
17883 match on.  Scoring can only be performed on these eight headers:
17884 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
17885 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
17886 these headers, there are three strings to tell Gnus to fetch the entire
17887 article and do the match on larger parts of the article: @code{Body}
17888 will perform the match on the body of the article, @code{Head} will
17889 perform the match on the head of the article, and @code{All} will
17890 perform the match on the entire article.  Note that using any of these
17891 last three keys will slow down group entry @emph{considerably}.  The
17892 final ``header'' you can score on is @code{Followup}.  These score
17893 entries will result in new score entries being added for all follow-ups
17894 to articles that matches these score entries.
17895
17896 Following this key is a arbitrary number of score entries, where each
17897 score entry has one to four elements.
17898 @enumerate
17899
17900 @item
17901 The first element is the @dfn{match element}.  On most headers this will
17902 be a string, but on the Lines and Chars headers, this must be an
17903 integer.
17904
17905 @item
17906 If the second element is present, it should be a number---the @dfn{score
17907 element}.  This number should be an integer in the neginf to posinf
17908 interval.  This number is added to the score of the article if the match
17909 is successful.  If this element is not present, the
17910 @code{gnus-score-interactive-default-score} number will be used
17911 instead.  This is 1000 by default.
17912
17913 @item
17914 If the third element is present, it should be a number---the @dfn{date
17915 element}.  This date says when the last time this score entry matched,
17916 which provides a mechanism for expiring the score entries.  It this
17917 element is not present, the score entry is permanent.  The date is
17918 represented by the number of days since December 31, 1 BCE.
17919
17920 @item
17921 If the fourth element is present, it should be a symbol---the @dfn{type
17922 element}.  This element specifies what function should be used to see
17923 whether this score entry matches the article.  What match types that can
17924 be used depends on what header you wish to perform the match on.
17925 @table @dfn
17926
17927 @item From, Subject, References, Xref, Message-ID
17928 For most header types, there are the @code{r} and @code{R} (regexp), as
17929 well as @code{s} and @code{S} (substring) types, and @code{e} and
17930 @code{E} (exact match), and @code{w} (word match) types.  If this
17931 element is not present, Gnus will assume that substring matching should
17932 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
17933 that the matches will be done in a case-sensitive manner.  All these
17934 one-letter types are really just abbreviations for the @code{regexp},
17935 @code{string}, @code{exact}, and @code{word} types, which you can use
17936 instead, if you feel like.
17937
17938 @item Extra
17939 Just as for the standard string overview headers, if you are using
17940 gnus-extra-headers, you can score on these headers' values.  In this
17941 case, there is a 5th element in the score entry, being the name of the
17942 header to be scored.  The following entry is useful in your
17943 @file{all.SCORE} file in case of spam attacks from a single origin host,
17944 if your @sc{nntp} server tracks NNTP-Posting-Host in overviews:
17945
17946 @lisp
17947 ("111.222.333.444" -1000 nil s "NNTP-Posting-Host")
17948 @end lisp
17949
17950 @item Lines, Chars
17951 These two headers use different match types: @code{<}, @code{>},
17952 @code{=}, @code{>=} and @code{<=}.
17953
17954 These predicates are true if
17955
17956 @example
17957 (PREDICATE HEADER MATCH)
17958 @end example
17959
17960 evaluates to non-@code{nil}.  For instance, the advanced match
17961 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
17962 following form:
17963
17964 @lisp
17965 (< header-value 4)
17966 @end lisp
17967
17968 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
17969 the match, we get the score added if the article has less than 4 lines.
17970 (It's easy to get confused and think it's the other way around.  But
17971 it's not.  I think.)
17972
17973 When matching on @code{Lines}, be careful because some back ends (like
17974 @code{nndir}) do not generate @code{Lines} header, so every article ends
17975 up being marked as having 0 lines.  This can lead to strange results if
17976 you happen to lower score of the articles with few lines.
17977
17978 @item Date
17979 For the Date header we have three kinda silly match types:
17980 @code{before}, @code{at} and @code{after}.  I can't really imagine this
17981 ever being useful, but, like, it would feel kinda silly not to provide
17982 this function.  Just in case.  You never know.  Better safe than sorry.
17983 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
17984 sex on a first date.  (I have been told that at least one person, and I
17985 quote, ``found this function indispensable'', however.)
17986
17987 @cindex ISO8601
17988 @cindex date
17989 A more useful match type is @code{regexp}.  With it, you can match the
17990 date string using a regular expression.  The date is normalized to
17991 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
17992 you want to match all articles that have been posted on April 1st in
17993 every year, you could use @samp{....0401.........} as a match string,
17994 for instance.  (Note that the date is kept in its original time zone, so
17995 this will match articles that were posted when it was April 1st where
17996 the article was posted from.  Time zones are such wholesome fun for the
17997 whole family, eh?)
17998
17999 @item Head, Body, All
18000 These three match keys use the same match types as the @code{From} (etc)
18001 header uses.
18002
18003 @item Followup
18004 This match key is somewhat special, in that it will match the
18005 @code{From} header, and affect the score of not only the matching
18006 articles, but also all followups to the matching articles.  This allows
18007 you e.g. increase the score of followups to your own articles, or
18008 decrease the score of followups to the articles of some known
18009 trouble-maker.  Uses the same match types as the @code{From} header
18010 uses.  (Using this match key will lead to creation of @file{ADAPT}
18011 files.)
18012
18013 @item Thread
18014 This match key works along the same lines as the @code{Followup} match
18015 key.  If you say that you want to score on a (sub-)thread started by an
18016 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
18017 match.  This will add a new @samp{thread} match for each article that
18018 has @var{x} in its @code{References} header.  (These new @samp{thread}
18019 matches will use the @code{Message-ID}s of these matching articles.)
18020 This will ensure that you can raise/lower the score of an entire thread,
18021 even though some articles in the thread may not have complete
18022 @code{References} headers.  Note that using this may lead to
18023 undeterministic scores of the articles in the thread.  (Using this match
18024 key will lead to creation of @file{ADAPT} files.)
18025 @end table
18026 @end enumerate
18027
18028 @cindex Score File Atoms
18029 @item mark
18030 The value of this entry should be a number.  Any articles with a score
18031 lower than this number will be marked as read.
18032
18033 @item expunge
18034 The value of this entry should be a number.  Any articles with a score
18035 lower than this number will be removed from the summary buffer.
18036
18037 @item mark-and-expunge
18038 The value of this entry should be a number.  Any articles with a score
18039 lower than this number will be marked as read and removed from the
18040 summary buffer.
18041
18042 @item thread-mark-and-expunge
18043 The value of this entry should be a number.  All articles that belong to
18044 a thread that has a total score below this number will be marked as read
18045 and removed from the summary buffer.  @code{gnus-thread-score-function}
18046 says how to compute the total score for a thread.
18047
18048 @item files
18049 The value of this entry should be any number of file names.  These files
18050 are assumed to be score files as well, and will be loaded the same way
18051 this one was.
18052
18053 @item exclude-files
18054 The clue of this entry should be any number of files.  These files will
18055 not be loaded, even though they would normally be so, for some reason or
18056 other.
18057
18058 @item eval
18059 The value of this entry will be @code{eval}el.  This element will be
18060 ignored when handling global score files.
18061
18062 @item read-only
18063 Read-only score files will not be updated or saved.  Global score files
18064 should feature this atom (@pxref{Global Score Files}).  (Note:
18065 @dfn{Global} here really means @dfn{global}; not your personal
18066 apply-to-all-groups score files.)
18067
18068 @item orphan
18069 The value of this entry should be a number.  Articles that do not have
18070 parents will get this number added to their scores.  Imagine you follow
18071 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
18072 will only follow a few of the threads, also want to see any new threads.
18073
18074 You can do this with the following two score file entries:
18075
18076 @example
18077         (orphan -500)
18078         (mark-and-expunge -100)
18079 @end example
18080
18081 When you enter the group the first time, you will only see the new
18082 threads.  You then raise the score of the threads that you find
18083 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
18084 rest.  Next time you enter the group, you will see new articles in the
18085 interesting threads, plus any new threads.
18086
18087 I.e.---the orphan score atom is for high-volume groups where a few
18088 interesting threads which can't be found automatically by ordinary
18089 scoring rules exist.
18090
18091 @item adapt
18092 This entry controls the adaptive scoring.  If it is @code{t}, the
18093 default adaptive scoring rules will be used.  If it is @code{ignore}, no
18094 adaptive scoring will be performed on this group.  If it is a list, this
18095 list will be used as the adaptive scoring rules.  If it isn't present,
18096 or is something other than @code{t} or @code{ignore}, the default
18097 adaptive scoring rules will be used.  If you want to use adaptive
18098 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
18099 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
18100 not want adaptive scoring.  If you only want adaptive scoring in a few
18101 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
18102 insert @code{(adapt t)} in the score files of the groups where you want
18103 it.
18104
18105 @item adapt-file
18106 All adaptive score entries will go to the file named by this entry.  It
18107 will also be applied when entering the group.  This atom might be handy
18108 if you want to adapt on several groups at once, using the same adaptive
18109 file for a number of groups.
18110
18111 @item local
18112 @cindex local variables
18113 The value of this entry should be a list of @code{(VAR VALUE)} pairs.
18114 Each @var{var} will be made buffer-local to the current summary buffer,
18115 and set to the value specified.  This is a convenient, if somewhat
18116 strange, way of setting variables in some groups if you don't like hooks
18117 much.  Note that the @var{value} won't be evaluated.
18118 @end table
18119
18120
18121 @node Score File Editing
18122 @section Score File Editing
18123
18124 You normally enter all scoring commands from the summary buffer, but you
18125 might feel the urge to edit them by hand as well, so we've supplied you
18126 with a mode for that.
18127
18128 It's simply a slightly customized @code{emacs-lisp} mode, with these
18129 additional commands:
18130
18131 @table @kbd
18132
18133 @item C-c C-c
18134 @kindex C-c C-c (Score)
18135 @findex gnus-score-edit-done
18136 Save the changes you have made and return to the summary buffer
18137 (@code{gnus-score-edit-done}).
18138
18139 @item C-c C-d
18140 @kindex C-c C-d (Score)
18141 @findex gnus-score-edit-insert-date
18142 Insert the current date in numerical format
18143 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
18144 you were wondering.
18145
18146 @item C-c C-p
18147 @kindex C-c C-p (Score)
18148 @findex gnus-score-pretty-print
18149 The adaptive score files are saved in an unformatted fashion.  If you
18150 intend to read one of these files, you want to @dfn{pretty print} it
18151 first.  This command (@code{gnus-score-pretty-print}) does that for
18152 you.
18153
18154 @end table
18155
18156 Type @kbd{M-x gnus-score-mode} to use this mode.
18157
18158 @vindex gnus-score-mode-hook
18159 @code{gnus-score-menu-hook} is run in score mode buffers.
18160
18161 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
18162 e} to begin editing score files.
18163
18164
18165 @node Adaptive Scoring
18166 @section Adaptive Scoring
18167 @cindex adaptive scoring
18168
18169 If all this scoring is getting you down, Gnus has a way of making it all
18170 happen automatically---as if by magic.  Or rather, as if by artificial
18171 stupidity, to be precise.
18172
18173 @vindex gnus-use-adaptive-scoring
18174 When you read an article, or mark an article as read, or kill an
18175 article, you leave marks behind.  On exit from the group, Gnus can sniff
18176 these marks and add score elements depending on what marks it finds.
18177 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
18178 @code{t} or @code{(line)}.  If you want score adaptively on separate
18179 words appearing in the subjects, you should set this variable to
18180 @code{(word)}.  If you want to use both adaptive methods, set this
18181 variable to @code{(word line)}.
18182
18183 @vindex gnus-default-adaptive-score-alist
18184 To give you complete control over the scoring process, you can customize
18185 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
18186 might look something like this:
18187
18188 @lisp
18189 (setq gnus-default-adaptive-score-alist
18190   '((gnus-unread-mark)
18191     (gnus-ticked-mark (from 4))
18192     (gnus-dormant-mark (from 5))
18193     (gnus-del-mark (from -4) (subject -1))
18194     (gnus-read-mark (from 4) (subject 2))
18195     (gnus-expirable-mark (from -1) (subject -1))
18196     (gnus-killed-mark (from -1) (subject -3))
18197     (gnus-kill-file-mark)
18198     (gnus-ancient-mark)
18199     (gnus-low-score-mark)
18200     (gnus-catchup-mark (from -1) (subject -1))))
18201 @end lisp
18202
18203 As you see, each element in this alist has a mark as a key (either a
18204 variable name or a ``real'' mark---a character).  Following this key is
18205 a arbitrary number of header/score pairs.  If there are no header/score
18206 pairs following the key, no adaptive scoring will be done on articles
18207 that have that key as the article mark.  For instance, articles with
18208 @code{gnus-unread-mark} in the example above will not get adaptive score
18209 entries.
18210
18211 Each article can have only one mark, so just a single of these rules
18212 will be applied to each article.
18213
18214 To take @code{gnus-del-mark} as an example---this alist says that all
18215 articles that have that mark (i.e., are marked with @samp{D}) will have a
18216 score entry added to lower based on the @code{From} header by -4, and
18217 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
18218
18219 If you have marked 10 articles with the same subject with
18220 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
18221 That means that that subject will get a score of ten times -1, which
18222 should be, unless I'm much mistaken, -10.
18223
18224 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
18225 the read articles will be marked with the @samp{E} mark.  This'll
18226 probably make adaptive scoring slightly impossible, so auto-expiring and
18227 adaptive scoring doesn't really mix very well.
18228
18229 The headers you can score on are @code{from}, @code{subject},
18230 @code{message-id}, @code{references}, @code{xref}, @code{lines},
18231 @code{chars} and @code{date}.  In addition, you can score on
18232 @code{followup}, which will create an adaptive score entry that matches
18233 on the @code{References} header using the @code{Message-ID} of the
18234 current article, thereby matching the following thread.
18235
18236 You can also score on @code{thread}, which will try to score all
18237 articles that appear in a thread.  @code{thread} matches uses a
18238 @code{Message-ID} to match on the @code{References} header of the
18239 article.  If the match is made, the @code{Message-ID} of the article is
18240 added to the @code{thread} rule.  (Think about it.  I'd recommend two
18241 aspirins afterwards.)
18242
18243 If you use this scheme, you should set the score file atom @code{mark}
18244 to something small---like -300, perhaps, to avoid having small random
18245 changes result in articles getting marked as read.
18246
18247 After using adaptive scoring for a week or so, Gnus should start to
18248 become properly trained and enhance the authors you like best, and kill
18249 the authors you like least, without you having to say so explicitly.
18250
18251 You can control what groups the adaptive scoring is to be performed on
18252 by using the score files (@pxref{Score File Format}).  This will also
18253 let you use different rules in different groups.
18254
18255 @vindex gnus-adaptive-file-suffix
18256 The adaptive score entries will be put into a file where the name is the
18257 group name with @code{gnus-adaptive-file-suffix} appended.  The default
18258 is @samp{ADAPT}.
18259
18260 @vindex gnus-score-exact-adapt-limit
18261 When doing adaptive scoring, substring or fuzzy matching would probably
18262 give you the best results in most cases.  However, if the header one
18263 matches is short, the possibility for false positives is great, so if
18264 the length of the match is less than
18265 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
18266 this variable is @code{nil}, exact matching will always be used to avoid
18267 this problem.
18268
18269 @vindex gnus-default-adaptive-word-score-alist
18270 As mentioned above, you can adapt either on individual words or entire
18271 headers.  If you adapt on words, the
18272 @code{gnus-default-adaptive-word-score-alist} variable says what score
18273 each instance of a word should add given a mark.
18274
18275 @lisp
18276 (setq gnus-default-adaptive-word-score-alist
18277       `((,gnus-read-mark . 30)
18278         (,gnus-catchup-mark . -10)
18279         (,gnus-killed-mark . -20)
18280         (,gnus-del-mark . -15)))
18281 @end lisp
18282
18283 This is the default value.  If you have adaption on words enabled, every
18284 word that appears in subjects of articles marked with
18285 @code{gnus-read-mark} will result in a score rule that increase the
18286 score with 30 points.
18287
18288 @vindex gnus-default-ignored-adaptive-words
18289 @vindex gnus-ignored-adaptive-words
18290 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
18291 will be ignored.  If you wish to add more words to be ignored, use the
18292 @code{gnus-ignored-adaptive-words} list instead.
18293
18294 @vindex gnus-adaptive-word-length-limit
18295 Some may feel that short words shouldn't count when doing adaptive
18296 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
18297 an integer.  Words shorter than this number will be ignored.  This
18298 variable defaults to @code{nil}.
18299
18300 @vindex gnus-adaptive-word-syntax-table
18301 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
18302 syntax table in effect.  It is similar to the standard syntax table, but
18303 it considers numbers to be non-word-constituent characters.
18304
18305 @vindex gnus-adaptive-word-minimum
18306 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
18307 word scoring process will never bring down the score of an article to
18308 below this number.  The default is @code{nil}.
18309
18310 @vindex gnus-adaptive-word-no-group-words
18311 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
18312 won't adaptively word score any of the words in the group name.  Useful
18313 for groups like @samp{comp.editors.emacs}, where most of the subject
18314 lines contain the word @samp{emacs}.
18315
18316 After using this scheme for a while, it might be nice to write a
18317 @code{gnus-psychoanalyze-user} command to go through the rules and see
18318 what words you like and what words you don't like.  Or perhaps not.
18319
18320 Note that the adaptive word scoring thing is highly experimental and is
18321 likely to change in the future.  Initial impressions seem to indicate
18322 that it's totally useless as it stands.  Some more work (involving more
18323 rigorous statistical methods) will have to be done to make this useful.
18324
18325
18326 @node Home Score File
18327 @section Home Score File
18328
18329 The score file where new score file entries will go is called the
18330 @dfn{home score file}.  This is normally (and by default) the score file
18331 for the group itself.  For instance, the home score file for
18332 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
18333
18334 However, this may not be what you want.  It is often convenient to share
18335 a common home score file among many groups---all @samp{emacs} groups
18336 could perhaps use the same home score file.
18337
18338 @vindex gnus-home-score-file
18339 The variable that controls this is @code{gnus-home-score-file}.  It can
18340 be:
18341
18342 @enumerate
18343 @item
18344 A string.  Then this file will be used as the home score file for all
18345 groups.
18346
18347 @item
18348 A function.  The result of this function will be used as the home score
18349 file.  The function will be called with the name of the group as the
18350 parameter.
18351
18352 @item
18353 A list.  The elements in this list can be:
18354
18355 @enumerate
18356 @item
18357 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
18358 group name, the @var{file-name} will be used as the home score file.
18359
18360 @item
18361 A function.  If the function returns non-nil, the result will be used as
18362 the home score file.
18363
18364 @item
18365 A string.  Use the string as the home score file.
18366 @end enumerate
18367
18368 The list will be traversed from the beginning towards the end looking
18369 for matches.
18370
18371 @end enumerate
18372
18373 So, if you want to use just a single score file, you could say:
18374
18375 @lisp
18376 (setq gnus-home-score-file
18377       "my-total-score-file.SCORE")
18378 @end lisp
18379
18380 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
18381 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
18382
18383 @findex gnus-hierarchial-home-score-file
18384 @lisp
18385 (setq gnus-home-score-file
18386       'gnus-hierarchial-home-score-file)
18387 @end lisp
18388
18389 This is a ready-made function provided for your convenience.
18390 Other functions include
18391
18392 @table @code
18393 @item gnus-current-home-score-file
18394 @findex gnus-current-home-score-file
18395 Return the ``current'' regular score file.  This will make scoring
18396 commands add entry to the ``innermost'' matching score file.
18397
18398 @end table
18399
18400 If you want to have one score file for the @samp{emacs} groups and
18401 another for the @samp{comp} groups, while letting all other groups use
18402 their own home score files:
18403
18404 @lisp
18405 (setq gnus-home-score-file
18406       ;; All groups that match the regexp "\\.emacs"
18407       '(("\\.emacs" "emacs.SCORE")
18408         ;; All the comp groups in one score file
18409         ("^comp" "comp.SCORE")))
18410 @end lisp
18411
18412 @vindex gnus-home-adapt-file
18413 @code{gnus-home-adapt-file} works exactly the same way as
18414 @code{gnus-home-score-file}, but says what the home adaptive score file
18415 is instead.  All new adaptive file entries will go into the file
18416 specified by this variable, and the same syntax is allowed.
18417
18418 In addition to using @code{gnus-home-score-file} and
18419 @code{gnus-home-adapt-file}, you can also use group parameters
18420 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
18421 Parameters}) to achieve much the same.  Group and topic parameters take
18422 precedence over this variable.
18423
18424
18425 @node Followups To Yourself
18426 @section Followups To Yourself
18427
18428 Gnus offers two commands for picking out the @code{Message-ID} header in
18429 the current buffer.  Gnus will then add a score rule that scores using
18430 this @code{Message-ID} on the @code{References} header of other
18431 articles.  This will, in effect, increase the score of all articles that
18432 respond to the article in the current buffer.  Quite useful if you want
18433 to easily note when people answer what you've said.
18434
18435 @table @code
18436
18437 @item gnus-score-followup-article
18438 @findex gnus-score-followup-article
18439 This will add a score to articles that directly follow up your own
18440 article.
18441
18442 @item gnus-score-followup-thread
18443 @findex gnus-score-followup-thread
18444 This will add a score to all articles that appear in a thread ``below''
18445 your own article.
18446 @end table
18447
18448 @vindex message-sent-hook
18449 These two functions are both primarily meant to be used in hooks like
18450 @code{message-sent-hook}, like this:
18451 @lisp
18452 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
18453 @end lisp
18454
18455
18456 If you look closely at your own @code{Message-ID}, you'll notice that
18457 the first two or three characters are always the same.  Here's two of
18458 mine:
18459
18460 @example
18461 <x6u3u47icf.fsf@@eyesore.no>
18462 <x6sp9o7ibw.fsf@@eyesore.no>
18463 @end example
18464
18465 So ``my'' ident on this machine is @samp{x6}.  This can be
18466 exploited---the following rule will raise the score on all followups to
18467 myself:
18468
18469 @lisp
18470 ("references"
18471  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
18472   1000 nil r))
18473 @end lisp
18474
18475 Whether it's the first two or first three characters that are ``yours''
18476 is system-dependent.
18477
18478
18479 @node Scoring On Other Headers
18480 @section Scoring On Other Headers
18481 @cindex scoring on other headers
18482
18483 Gnus is quite fast when scoring the ``traditional''
18484 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
18485 other headers requires writing a @code{head} scoring rule, which means
18486 that Gnus has to request every single article from the back end to find
18487 matches.  This takes a long time in big groups.
18488
18489 Now, there's not much you can do about this for news groups, but for
18490 mail groups, you have greater control.  In the @pxref{To From
18491 Newsgroups} section of the manual, it's explained in greater detail what
18492 this mechanism does, but here's a cookbook example for @code{nnml} on
18493 how to allow scoring on the @samp{To} and @samp{Cc} headers.
18494
18495 Put the following in your @file{.gnus.el} file.
18496
18497 @lisp
18498 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
18499       nnmail-extra-headers gnus-extra-headers)
18500 @end lisp
18501
18502 Restart Gnus and rebuild your @code{nnml} overview files with the
18503 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
18504 time if you have much mail.
18505
18506 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
18507 so: @kbd{I e s p To RET <your name> RET}.
18508
18509 See?  Simple.
18510
18511
18512 @node Scoring Tips
18513 @section Scoring Tips
18514 @cindex scoring tips
18515
18516 @table @dfn
18517
18518 @item Crossposts
18519 @cindex crossposts
18520 @cindex scoring crossposts
18521 If you want to lower the score of crossposts, the line to match on is
18522 the @code{Xref} header.
18523 @lisp
18524 ("xref" (" talk.politics.misc:" -1000))
18525 @end lisp
18526
18527 @item Multiple crossposts
18528 If you want to lower the score of articles that have been crossposted to
18529 more than, say, 3 groups:
18530 @lisp
18531 ("xref"
18532   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
18533    -1000 nil r))
18534 @end lisp
18535
18536 @item Matching on the body
18537 This is generally not a very good idea---it takes a very long time.
18538 Gnus actually has to fetch each individual article from the server.  But
18539 you might want to anyway, I guess.  Even though there are three match
18540 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
18541 and stick with it in each score file.  If you use any two, each article
18542 will be fetched @emph{twice}.  If you want to match a bit on the
18543 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
18544 the matches.
18545
18546 @item Marking as read
18547 You will probably want to mark articles that have scores below a certain
18548 number as read.  This is most easily achieved by putting the following
18549 in your @file{all.SCORE} file:
18550 @lisp
18551 ((mark -100))
18552 @end lisp
18553 You may also consider doing something similar with @code{expunge}.
18554
18555 @item Negated character classes
18556 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
18557 That will match newlines, which might lead to, well, The Unknown.  Say
18558 @code{[^abcd\n]*} instead.
18559 @end table
18560
18561
18562 @node Reverse Scoring
18563 @section Reverse Scoring
18564 @cindex reverse scoring
18565
18566 If you want to keep just articles that have @samp{Sex with Emacs} in the
18567 subject header, and expunge all other articles, you could put something
18568 like this in your score file:
18569
18570 @lisp
18571 (("subject"
18572   ("Sex with Emacs" 2))
18573  (mark 1)
18574  (expunge 1))
18575 @end lisp
18576
18577 So, you raise all articles that match @samp{Sex with Emacs} and mark the
18578 rest as read, and expunge them to boot.
18579
18580
18581 @node Global Score Files
18582 @section Global Score Files
18583 @cindex global score files
18584
18585 Sure, other newsreaders have ``global kill files''.  These are usually
18586 nothing more than a single kill file that applies to all groups, stored
18587 in the user's home directory.  Bah!  Puny, weak newsreaders!
18588
18589 What I'm talking about here are Global Score Files.  Score files from
18590 all over the world, from users everywhere, uniting all nations in one
18591 big, happy score file union!  Ange-score!  New and untested!
18592
18593 @vindex gnus-global-score-files
18594 All you have to do to use other people's score files is to set the
18595 @code{gnus-global-score-files} variable.  One entry for each score file,
18596 or each score file directory.  Gnus will decide by itself what score
18597 files are applicable to which group.
18598
18599 To use the score file
18600 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
18601 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
18602 say this:
18603
18604 @lisp
18605 (setq gnus-global-score-files
18606       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
18607         "/ftp@@ftp.some-where:/pub/score/"))
18608 @end lisp
18609
18610 @findex gnus-score-search-global-directories
18611 @noindent
18612 Simple, eh?  Directory names must end with a @samp{/}.  These
18613 directories are typically scanned only once during each Gnus session.
18614 If you feel the need to manually re-scan the remote directories, you can
18615 use the @code{gnus-score-search-global-directories} command.
18616
18617 Note that, at present, using this option will slow down group entry
18618 somewhat.  (That is---a lot.)
18619
18620 If you want to start maintaining score files for other people to use,
18621 just put your score file up for anonymous ftp and announce it to the
18622 world.  Become a retro-moderator!  Participate in the retro-moderator
18623 wars sure to ensue, where retro-moderators battle it out for the
18624 sympathy of the people, luring them to use their score files on false
18625 premises!  Yay!  The net is saved!
18626
18627 Here are some tips for the would-be retro-moderator, off the top of my
18628 head:
18629
18630 @itemize @bullet
18631
18632 @item
18633 Articles heavily crossposted are probably junk.
18634 @item
18635 To lower a single inappropriate article, lower by @code{Message-ID}.
18636 @item
18637 Particularly brilliant authors can be raised on a permanent basis.
18638 @item
18639 Authors that repeatedly post off-charter for the group can safely be
18640 lowered out of existence.
18641 @item
18642 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
18643 articles completely.
18644
18645 @item
18646 Use expiring score entries to keep the size of the file down.  You
18647 should probably have a long expiry period, though, as some sites keep
18648 old articles for a long time.
18649 @end itemize
18650
18651 ... I wonder whether other newsreaders will support global score files
18652 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
18653 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
18654 holding our breath yet?
18655
18656
18657 @node Kill Files
18658 @section Kill Files
18659 @cindex kill files
18660
18661 Gnus still supports those pesky old kill files.  In fact, the kill file
18662 entries can now be expiring, which is something I wrote before Daniel
18663 Quinlan thought of doing score files, so I've left the code in there.
18664
18665 In short, kill processing is a lot slower (and I do mean @emph{a lot})
18666 than score processing, so it might be a good idea to rewrite your kill
18667 files into score files.
18668
18669 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
18670 forms into this file, which means that you can use kill files as some
18671 sort of primitive hook function to be run on group entry, even though
18672 that isn't a very good idea.
18673
18674 Normal kill files look like this:
18675
18676 @lisp
18677 (gnus-kill "From" "Lars Ingebrigtsen")
18678 (gnus-kill "Subject" "ding")
18679 (gnus-expunge "X")
18680 @end lisp
18681
18682 This will mark every article written by me as read, and remove the
18683 marked articles from the summary buffer.  Very useful, you'll agree.
18684
18685 Other programs use a totally different kill file syntax.  If Gnus
18686 encounters what looks like a @code{rn} kill file, it will take a stab at
18687 interpreting it.
18688
18689 Two summary functions for editing a GNUS kill file:
18690
18691 @table @kbd
18692
18693 @item M-k
18694 @kindex M-k (Summary)
18695 @findex gnus-summary-edit-local-kill
18696 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
18697
18698 @item M-K
18699 @kindex M-K (Summary)
18700 @findex gnus-summary-edit-global-kill
18701 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
18702 @end table
18703
18704 Two group mode functions for editing the kill files:
18705
18706 @table @kbd
18707
18708 @item M-k
18709 @kindex M-k (Group)
18710 @findex gnus-group-edit-local-kill
18711 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
18712
18713 @item M-K
18714 @kindex M-K (Group)
18715 @findex gnus-group-edit-global-kill
18716 Edit the general kill file (@code{gnus-group-edit-global-kill}).
18717 @end table
18718
18719 Kill file variables:
18720
18721 @table @code
18722 @item gnus-kill-file-name
18723 @vindex gnus-kill-file-name
18724 A kill file for the group @samp{soc.motss} is normally called
18725 @file{soc.motss.KILL}.  The suffix appended to the group name to get
18726 this file name is detailed by the @code{gnus-kill-file-name} variable.
18727 The ``global'' kill file (not in the score file sense of ``global'', of
18728 course) is just called @file{KILL}.
18729
18730 @vindex gnus-kill-save-kill-file
18731 @item gnus-kill-save-kill-file
18732 If this variable is non-@code{nil}, Gnus will save the
18733 kill file after processing, which is necessary if you use expiring
18734 kills.
18735
18736 @item gnus-apply-kill-hook
18737 @vindex gnus-apply-kill-hook
18738 @findex gnus-apply-kill-file-unless-scored
18739 @findex gnus-apply-kill-file
18740 A hook called to apply kill files to a group.  It is
18741 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
18742 kill file if you have a score file for the same group, you can set this
18743 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
18744 kill files to be processed, you should set this variable to @code{nil}.
18745
18746 @item gnus-kill-file-mode-hook
18747 @vindex gnus-kill-file-mode-hook
18748 A hook called in kill-file mode buffers.
18749
18750 @end table
18751
18752
18753 @node Converting Kill Files
18754 @section Converting Kill Files
18755 @cindex kill files
18756 @cindex converting kill files
18757
18758 If you have loads of old kill files, you may want to convert them into
18759 score files.  If they are ``regular'', you can use
18760 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
18761 by hand.
18762
18763 The kill to score conversion package isn't included in Gnus by default.
18764 You can fetch it from
18765 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
18766
18767 If your old kill files are very complex---if they contain more
18768 non-@code{gnus-kill} forms than not, you'll have to convert them by
18769 hand.  Or just let them be as they are.  Gnus will still use them as
18770 before.
18771
18772
18773 @node GroupLens
18774 @section GroupLens
18775 @cindex GroupLens
18776
18777 GroupLens (@uref{http://www.cs.umn.edu/Research/GroupLens/}) is a
18778 collaborative filtering system that helps you work together with other
18779 people to find the quality news articles out of the huge volume of
18780 news articles generated every day.
18781
18782 To accomplish this the GroupLens system combines your opinions about
18783 articles you have already read with the opinions of others who have done
18784 likewise and gives you a personalized prediction for each unread news
18785 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
18786 rate articles, and finds other people that rate articles the same way.
18787 Once it has found some people you agree with it tells you, in the form
18788 of a prediction, what they thought of the article.  You can use this
18789 prediction to help you decide whether or not you want to read the
18790 article.
18791
18792 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
18793 so this section is mostly of historical interest.
18794
18795 @menu
18796 * Using GroupLens::             How to make Gnus use GroupLens.
18797 * Rating Articles::             Letting GroupLens know how you rate articles.
18798 * Displaying Predictions::      Displaying predictions given by GroupLens.
18799 * GroupLens Variables::         Customizing GroupLens.
18800 @end menu
18801
18802
18803 @node Using GroupLens
18804 @subsection Using GroupLens
18805
18806 To use GroupLens you must register a pseudonym with your local Better
18807 Bit Bureau (BBB).
18808 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html} is the only
18809 better bit in town at the moment.
18810
18811 Once you have registered you'll need to set a couple of variables.
18812
18813 @table @code
18814
18815 @item gnus-use-grouplens
18816 @vindex gnus-use-grouplens
18817 Setting this variable to a non-@code{nil} value will make Gnus hook into
18818 all the relevant GroupLens functions.
18819
18820 @item grouplens-pseudonym
18821 @vindex grouplens-pseudonym
18822 This variable should be set to the pseudonym you got when registering
18823 with the Better Bit Bureau.
18824
18825 @item grouplens-newsgroups
18826 @vindex grouplens-newsgroups
18827 A list of groups that you want to get GroupLens predictions for.
18828
18829 @end table
18830
18831 That's the minimum of what you need to get up and running with GroupLens.
18832 Once you've registered, GroupLens will start giving you scores for
18833 articles based on the average of what other people think.  But, to get
18834 the real benefit of GroupLens you need to start rating articles
18835 yourself.  Then the scores GroupLens gives you will be personalized for
18836 you, based on how the people you usually agree with have already rated.
18837
18838
18839 @node Rating Articles
18840 @subsection Rating Articles
18841
18842 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
18843 Where 1 means something like this article is a waste of bandwidth and 5
18844 means that the article was really good.  The basic question to ask
18845 yourself is, "on a scale from 1 to 5 would I like to see more articles
18846 like this one?"
18847
18848 There are four ways to enter a rating for an article in GroupLens.
18849
18850 @table @kbd
18851
18852 @item r
18853 @kindex r (GroupLens)
18854 @findex bbb-summary-rate-article
18855 This function will prompt you for a rating on a scale of one to five.
18856
18857 @item k
18858 @kindex k (GroupLens)
18859 @findex grouplens-score-thread
18860 This function will prompt you for a rating, and rate all the articles in
18861 the thread.  This is really useful for some of those long running giant
18862 threads in rec.humor.
18863
18864 @end table
18865
18866 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
18867 the score of the article you're reading.
18868
18869 @table @kbd
18870
18871 @item 1-5 n
18872 @kindex n (GroupLens)
18873 @findex grouplens-next-unread-article
18874 Rate the article and go to the next unread article.
18875
18876 @item 1-5 ,
18877 @kindex , (GroupLens)
18878 @findex grouplens-best-unread-article
18879 Rate the article and go to the next unread article with the highest score.
18880
18881 @end table
18882
18883 If you want to give the current article a score of 4 and then go to the
18884 next article, just type @kbd{4 n}.
18885
18886
18887 @node Displaying Predictions
18888 @subsection Displaying Predictions
18889
18890 GroupLens makes a prediction for you about how much you will like a
18891 news article.  The predictions from GroupLens are on a scale from 1 to
18892 5, where 1 is the worst and 5 is the best.  You can use the predictions
18893 from GroupLens in one of three ways controlled by the variable
18894 @code{gnus-grouplens-override-scoring}.
18895
18896 @vindex gnus-grouplens-override-scoring
18897 There are three ways to display predictions in grouplens.  You may
18898 choose to have the GroupLens scores contribute to, or override the
18899 regular gnus scoring mechanism.  override is the default; however, some
18900 people prefer to see the Gnus scores plus the grouplens scores.  To get
18901 the separate scoring behavior you need to set
18902 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
18903 GroupLens predictions combined with the grouplens scores set it to
18904 @code{'override} and to combine the scores set
18905 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
18906 the combine option you will also want to set the values for
18907 @code{grouplens-prediction-offset} and
18908 @code{grouplens-score-scale-factor}.
18909
18910 @vindex grouplens-prediction-display
18911 In either case, GroupLens gives you a few choices for how you would like
18912 to see your predictions displayed.  The display of predictions is
18913 controlled by the @code{grouplens-prediction-display} variable.
18914
18915 The following are valid values for that variable.
18916
18917 @table @code
18918 @item prediction-spot
18919 The higher the prediction, the further to the right an @samp{*} is
18920 displayed.
18921
18922 @item confidence-interval
18923 A numeric confidence interval.
18924
18925 @item prediction-bar
18926 The higher the prediction, the longer the bar.
18927
18928 @item confidence-bar
18929 Numerical confidence.
18930
18931 @item confidence-spot
18932 The spot gets bigger with more confidence.
18933
18934 @item prediction-num
18935 Plain-old numeric value.
18936
18937 @item confidence-plus-minus
18938 Prediction +/- confidence.
18939
18940 @end table
18941
18942
18943 @node GroupLens Variables
18944 @subsection GroupLens Variables
18945
18946 @table @code
18947
18948 @item gnus-summary-grouplens-line-format
18949 The summary line format used in GroupLens-enhanced summary buffers.  It
18950 accepts the same specs as the normal summary line format (@pxref{Summary
18951 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
18952 %s\n}.
18953
18954 @item grouplens-bbb-host
18955 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
18956 default.
18957
18958 @item grouplens-bbb-port
18959 Port of the host running the bbbd server.  The default is 9000.
18960
18961 @item grouplens-score-offset
18962 Offset the prediction by this value.  In other words, subtract the
18963 prediction value by this number to arrive at the effective score.  The
18964 default is 0.
18965
18966 @item grouplens-score-scale-factor
18967 This variable allows the user to magnify the effect of GroupLens scores.
18968 The scale factor is applied after the offset.  The default is 1.
18969
18970 @end table
18971
18972
18973 @node Advanced Scoring
18974 @section Advanced Scoring
18975
18976 Scoring on Subjects and From headers is nice enough, but what if you're
18977 really interested in what a person has to say only when she's talking
18978 about a particular subject?  Or what if you really don't want to
18979 read what person A has to say when she's following up to person B, but
18980 want to read what she says when she's following up to person C?
18981
18982 By using advanced scoring rules you may create arbitrarily complex
18983 scoring patterns.
18984
18985 @menu
18986 * Advanced Scoring Syntax::     A definition.
18987 * Advanced Scoring Examples::   What they look like.
18988 * Advanced Scoring Tips::       Getting the most out of it.
18989 @end menu
18990
18991
18992 @node Advanced Scoring Syntax
18993 @subsection Advanced Scoring Syntax
18994
18995 Ordinary scoring rules have a string as the first element in the rule.
18996 Advanced scoring rules have a list as the first element.  The second
18997 element is the score to be applied if the first element evaluated to a
18998 non-@code{nil} value.
18999
19000 These lists may consist of three logical operators, one redirection
19001 operator, and various match operators.
19002
19003 Logical operators:
19004
19005 @table @code
19006 @item &
19007 @itemx and
19008 This logical operator will evaluate each of its arguments until it finds
19009 one that evaluates to @code{false}, and then it'll stop.  If all arguments
19010 evaluate to @code{true} values, then this operator will return
19011 @code{true}.
19012
19013 @item |
19014 @itemx or
19015 This logical operator will evaluate each of its arguments until it finds
19016 one that evaluates to @code{true}.  If no arguments are @code{true},
19017 then this operator will return @code{false}.
19018
19019 @item !
19020 @itemx not
19021 @itemx Â¬
19022 This logical operator only takes a single argument.  It returns the
19023 logical negation of the value of its argument.
19024
19025 @end table
19026
19027 There is an @dfn{indirection operator} that will make its arguments
19028 apply to the ancestors of the current article being scored.  For
19029 instance, @code{1-} will make score rules apply to the parent of the
19030 current article.  @code{2-} will make score rules apply to the
19031 grandparent of the current article.  Alternatively, you can write
19032 @code{^^}, where the number of @code{^}s (carets) says how far back into
19033 the ancestry you want to go.
19034
19035 Finally, we have the match operators.  These are the ones that do the
19036 real work.  Match operators are header name strings followed by a match
19037 and a match type.  A typical match operator looks like @samp{("from"
19038 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
19039 simple scoring, and the match types are also the same.
19040
19041
19042 @node Advanced Scoring Examples
19043 @subsection Advanced Scoring Examples
19044
19045 Please note that the following examples are score file rules.  To
19046 make a complete score file from them, surround them with another pair
19047 of parentheses.
19048
19049 Let's say you want to increase the score of articles written by Lars
19050 when he's talking about Gnus:
19051
19052 @example
19053 ((&
19054   ("from" "Lars Ingebrigtsen")
19055   ("subject" "Gnus"))
19056  1000)
19057 @end example
19058
19059 Quite simple, huh?
19060
19061 When he writes long articles, he sometimes has something nice to say:
19062
19063 @example
19064 ((&
19065   ("from" "Lars Ingebrigtsen")
19066   (|
19067    ("subject" "Gnus")
19068    ("lines" 100 >)))
19069  1000)
19070 @end example
19071
19072 However, when he responds to things written by Reig Eigil Logge, you
19073 really don't want to read what he's written:
19074
19075 @example
19076 ((&
19077   ("from" "Lars Ingebrigtsen")
19078   (1- ("from" "Reig Eigir Logge")))
19079  -100000)
19080 @end example
19081
19082 Everybody that follows up Redmondo when he writes about disappearing
19083 socks should have their scores raised, but only when they talk about
19084 white socks.  However, when Lars talks about socks, it's usually not
19085 very interesting:
19086
19087 @example
19088 ((&
19089   (1-
19090    (&
19091     ("from" "redmondo@@.*no" r)
19092     ("body" "disappearing.*socks" t)))
19093   (! ("from" "Lars Ingebrigtsen"))
19094   ("body" "white.*socks"))
19095  1000)
19096 @end example
19097
19098 The possibilities are endless.
19099
19100
19101 @node Advanced Scoring Tips
19102 @subsection Advanced Scoring Tips
19103
19104 The @code{&} and @code{|} logical operators do short-circuit logic.
19105 That is, they stop processing their arguments when it's clear what the
19106 result of the operation will be.  For instance, if one of the arguments
19107 of an @code{&} evaluates to @code{false}, there's no point in evaluating
19108 the rest of the arguments.  This means that you should put slow matches
19109 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
19110 @samp{subject}) first.
19111
19112 The indirection arguments (@code{1-} and so on) will make their
19113 arguments work on previous generations of the thread.  If you say
19114 something like:
19115
19116 @example
19117 ...
19118 (1-
19119  (1-
19120   ("from" "lars")))
19121 ...
19122 @end example
19123
19124 Then that means "score on the from header of the grandparent of the
19125 current article".  An indirection is quite fast, but it's better to say:
19126
19127 @example
19128 (1-
19129  (&
19130   ("from" "Lars")
19131   ("subject" "Gnus")))
19132 @end example
19133
19134 than it is to say:
19135
19136 @example
19137 (&
19138  (1- ("from" "Lars"))
19139  (1- ("subject" "Gnus")))
19140 @end example
19141
19142
19143 @node Score Decays
19144 @section Score Decays
19145 @cindex score decays
19146 @cindex decays
19147
19148 You may find that your scores have a tendency to grow without
19149 bounds, especially if you're using adaptive scoring.  If scores get too
19150 big, they lose all meaning---they simply max out and it's difficult to
19151 use them in any sensible way.
19152
19153 @vindex gnus-decay-scores
19154 @findex gnus-decay-score
19155 @vindex gnus-decay-score-function
19156 Gnus provides a mechanism for decaying scores to help with this problem.
19157 When score files are loaded and @code{gnus-decay-scores} is
19158 non-@code{nil}, Gnus will run the score files through the decaying
19159 mechanism thereby lowering the scores of all non-permanent score rules.
19160 The decay itself if performed by the @code{gnus-decay-score-function}
19161 function, which is @code{gnus-decay-score} by default.  Here's the
19162 definition of that function:
19163
19164 @lisp
19165 (defun gnus-decay-score (score)
19166   "Decay SCORE.
19167 This is done according to `gnus-score-decay-constant'
19168 and `gnus-score-decay-scale'."
19169   (floor
19170    (- score
19171       (* (if (< score 0) 1 -1)
19172          (min (abs score)
19173               (max gnus-score-decay-constant
19174                    (* (abs score)
19175                       gnus-score-decay-scale)))))))
19176 @end lisp
19177
19178 @vindex gnus-score-decay-scale
19179 @vindex gnus-score-decay-constant
19180 @code{gnus-score-decay-constant} is 3 by default and
19181 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
19182
19183 @enumerate
19184 @item
19185 Scores between -3 and 3 will be set to 0 when this function is called.
19186
19187 @item
19188 Scores with magnitudes between 3 and 60 will be shrunk by 3.
19189
19190 @item
19191 Scores with magnitudes greater than 60 will be shrunk by 5% of the
19192 score.
19193 @end enumerate
19194
19195 If you don't like this decay function, write your own.  It is called
19196 with the score to be decayed as its only parameter, and it should return
19197 the new score, which should be an integer.
19198
19199 Gnus will try to decay scores once a day.  If you haven't run Gnus for
19200 four days, Gnus will decay the scores four times, for instance.
19201
19202 @iftex
19203 @iflatex
19204 @chapter Message
19205 @include message.texi
19206 @chapter Emacs MIME
19207 @include emacs-mime.texi
19208 @chapter Sieve
19209 @include sieve.texi
19210 @c @chapter PGG
19211 @c @include pgg.texi
19212 @end iflatex
19213 @end iftex
19214
19215 @node Various
19216 @chapter Various
19217
19218 @menu
19219 * Process/Prefix::              A convention used by many treatment commands.
19220 * Interactive::                 Making Gnus ask you many questions.
19221 * Symbolic Prefixes::           How to supply some Gnus functions with options.
19222 * Formatting Variables::        You can specify what buffers should look like.
19223 * Window Layout::               Configuring the Gnus buffer windows.
19224 * Faces and Fonts::             How to change how faces look.
19225 * Compilation::                 How to speed Gnus up.
19226 * Mode Lines::                  Displaying information in the mode lines.
19227 * Highlighting and Menus::      Making buffers look all nice and cozy.
19228 * Buttons::                     Get tendinitis in ten easy steps!
19229 * Daemons::                     Gnus can do things behind your back.
19230 * NoCeM::                       How to avoid spam and other fatty foods.
19231 * Undo::                        Some actions can be undone.
19232 * Predicate Specifiers::        Specifying predicates.
19233 * Moderation::                  What to do if you're a moderator.
19234 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
19235 * Fuzzy Matching::              What's the big fuzz?
19236 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
19237 * Various Various::             Things that are really various.
19238 @end menu
19239
19240
19241 @node Process/Prefix
19242 @section Process/Prefix
19243 @cindex process/prefix convention
19244
19245 Many functions, among them functions for moving, decoding and saving
19246 articles, use what is known as the @dfn{Process/Prefix convention}.
19247
19248 This is a method for figuring out what articles the user wants the
19249 command to be performed on.
19250
19251 It goes like this:
19252
19253 If the numeric prefix is N, perform the operation on the next N
19254 articles, starting with the current one.  If the numeric prefix is
19255 negative, perform the operation on the previous N articles, starting
19256 with the current one.
19257
19258 @vindex transient-mark-mode
19259 If @code{transient-mark-mode} in non-@code{nil} and the region is
19260 active, all articles in the region will be worked upon.
19261
19262 If there is no numeric prefix, but some articles are marked with the
19263 process mark, perform the operation on the articles marked with
19264 the process mark.
19265
19266 If there is neither a numeric prefix nor any articles marked with the
19267 process mark, just perform the operation on the current article.
19268
19269 Quite simple, really, but it needs to be made clear so that surprises
19270 are avoided.
19271
19272 Commands that react to the process mark will push the current list of
19273 process marked articles onto a stack and will then clear all process
19274 marked articles.  You can restore the previous configuration with the
19275 @kbd{M P y} command (@pxref{Setting Process Marks}).
19276
19277 @vindex gnus-summary-goto-unread
19278 One thing that seems to shock & horrify lots of people is that, for
19279 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
19280 Since each @kbd{d} (which marks the current article as read) by default
19281 goes to the next unread article after marking, this means that @kbd{3 d}
19282 will mark the next three unread articles as read, no matter what the
19283 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
19284 @code{nil} for a more straightforward action.
19285
19286 Many commands do not use the process/prefix convention.  All commands
19287 that do explicitly say so in this manual.  To apply the process/prefix
19288 convention to commands that do not use it, you can use the @kbd{M-&}
19289 command.  For instance, to mark all the articles in the group as
19290 expirable, you could say `M P b M-& E'.
19291
19292
19293 @node Interactive
19294 @section Interactive
19295 @cindex interaction
19296
19297 @table @code
19298
19299 @item gnus-novice-user
19300 @vindex gnus-novice-user
19301 If this variable is non-@code{nil}, you are either a newcomer to the
19302 World of Usenet, or you are very cautious, which is a nice thing to be,
19303 really.  You will be given questions of the type ``Are you sure you want
19304 to do this?'' before doing anything dangerous.  This is @code{t} by
19305 default.
19306
19307 @item gnus-expert-user
19308 @vindex gnus-expert-user
19309 If this variable is non-@code{nil}, you will seldom be asked any
19310 questions by Gnus.  It will simply assume you know what you're doing, no
19311 matter how strange.
19312
19313 @item gnus-interactive-catchup
19314 @vindex gnus-interactive-catchup
19315 Require confirmation before catching up a group if non-@code{nil}.  It
19316 is @code{t} by default.
19317
19318 @item gnus-interactive-exit
19319 @vindex gnus-interactive-exit
19320 Require confirmation before exiting Gnus.  This variable is @code{t} by
19321 default.
19322 @end table
19323
19324
19325 @node Symbolic Prefixes
19326 @section Symbolic Prefixes
19327 @cindex symbolic prefixes
19328
19329 Quite a lot of Emacs commands react to the (numeric) prefix.  For
19330 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
19331 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
19332 rule of 900 to the current article.
19333
19334 This is all nice and well, but what if you want to give a command some
19335 additional information?  Well, what most commands do is interpret the
19336 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
19337 doesn't want a backup file to be created when saving the current buffer,
19338 for instance.  But what if you want to save without making a backup
19339 file, and you want Emacs to flash lights and play a nice tune at the
19340 same time?  You can't, and you're probably perfectly happy that way.
19341
19342 @kindex M-i (Summary)
19343 @findex gnus-symbolic-argument
19344 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
19345 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
19346 character typed in is the value.  You can stack as many @kbd{M-i}
19347 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
19348 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
19349 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
19350 @code{b}''.  You get the drift.
19351
19352 Typing in symbolic prefixes to commands that don't accept them doesn't
19353 hurt, but it doesn't do any good either.  Currently not many Gnus
19354 functions make use of the symbolic prefix.
19355
19356 If you're interested in how Gnus implements this, @pxref{Extended
19357 Interactive}.
19358
19359
19360 @node Formatting Variables
19361 @section Formatting Variables
19362 @cindex formatting variables
19363
19364 Throughout this manual you've probably noticed lots of variables called
19365 things like @code{gnus-group-line-format} and
19366 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
19367 output lines in the various buffers.  There's quite a lot of them.
19368 Fortunately, they all use the same syntax, so there's not that much to
19369 be annoyed by.
19370
19371 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
19372 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
19373 lots of percentages everywhere.
19374
19375 @menu
19376 * Formatting Basics::           A formatting variable is basically a format string.
19377 * Mode Line Formatting::        Some rules about mode line formatting variables.
19378 * Advanced Formatting::         Modifying output in various ways.
19379 * User-Defined Specs::          Having Gnus call your own functions.
19380 * Formatting Fonts::            Making the formatting look colorful and nice.
19381 * Positioning Point::           Moving point to a position after an operation.
19382 * Tabulation::                  Tabulating your output.
19383 * Wide Characters::             Dealing with wide characters.
19384 @end menu
19385
19386 Currently Gnus uses the following formatting variables:
19387 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
19388 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
19389 @code{gnus-group-mode-line-format},
19390 @code{gnus-summary-mode-line-format},
19391 @code{gnus-article-mode-line-format},
19392 @code{gnus-server-mode-line-format}, and
19393 @code{gnus-summary-pick-line-format}.
19394
19395 All these format variables can also be arbitrary elisp forms.  In that
19396 case, they will be @code{eval}ed to insert the required lines.
19397
19398 @kindex M-x gnus-update-format
19399 @findex gnus-update-format
19400 Gnus includes a command to help you while creating your own format
19401 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
19402 update the spec in question and pop you to a buffer where you can
19403 examine the resulting lisp code to be run to generate the line.
19404
19405
19406
19407 @node Formatting Basics
19408 @subsection Formatting Basics
19409
19410 Each @samp{%} element will be replaced by some string or other when the
19411 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
19412 spec, and pad with spaces to get a 5-character field''.
19413
19414 As with normal C and Emacs Lisp formatting strings, the numerical
19415 modifier between the @samp{%} and the formatting type character will
19416 @dfn{pad} the output so that it is always at least that long.
19417 @samp{%5y} will make the field always (at least) five characters wide by
19418 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
19419 the right instead.
19420
19421 You may also wish to limit the length of the field to protect against
19422 particularly wide values.  For that you can say @samp{%4,6y}, which
19423 means that the field will never be more than 6 characters wide and never
19424 less than 4 characters wide.
19425
19426 Also Gnus supports some extended format specifications, such as
19427 @samp{%&user-date;}.
19428
19429
19430 @node Mode Line Formatting
19431 @subsection Mode Line Formatting
19432
19433 Mode line formatting variables (e.g.,
19434 @code{gnus-summary-mode-line-format}) follow the same rules as other,
19435 buffer line oriented formatting variables (@pxref{Formatting Basics})
19436 with the following two differences:
19437
19438 @enumerate
19439
19440 @item
19441 There must be no newline (@samp{\n}) at the end.
19442
19443 @item
19444 The special @samp{%%b} spec can be used to display the buffer name.
19445 Well, it's no spec at all, really---@samp{%%} is just a way to quote
19446 @samp{%} to allow it to pass through the formatting machinery unmangled,
19447 so that Emacs receives @samp{%b}, which is something the Emacs mode line
19448 display interprets to mean ``show the buffer name''.  For a full list of
19449 mode line specs Emacs understands, see the documentation of the
19450 @code{mode-line-format} variable.
19451
19452 @end enumerate
19453
19454
19455 @node Advanced Formatting
19456 @subsection Advanced Formatting
19457
19458 It is frequently useful to post-process the fields in some way.
19459 Padding, limiting, cutting off parts and suppressing certain values can
19460 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
19461 look like @samp{%~(cut 3)~(ignore "0")y}.
19462
19463 These are the valid modifiers:
19464
19465 @table @code
19466 @item pad
19467 @itemx pad-left
19468 Pad the field to the left with spaces until it reaches the required
19469 length.
19470
19471 @item pad-right
19472 Pad the field to the right with spaces until it reaches the required
19473 length.
19474
19475 @item max
19476 @itemx max-left
19477 Cut off characters from the left until it reaches the specified length.
19478
19479 @item max-right
19480 Cut off characters from the right until it reaches the specified
19481 length.
19482
19483 @item cut
19484 @itemx cut-left
19485 Cut off the specified number of characters from the left.
19486
19487 @item cut-right
19488 Cut off the specified number of characters from the right.
19489
19490 @item ignore
19491 Return an empty string if the field is equal to the specified value.
19492
19493 @item form
19494 Use the specified form as the field value when the @samp{@@} spec is
19495 used.
19496
19497 Here's an example:
19498
19499 @lisp
19500 "~(form (current-time-string))@@"
19501 @end lisp
19502
19503 @end table
19504
19505 Let's take an example.  The @samp{%o} spec in the summary mode lines
19506 will return a date in compact ISO8601 format---@samp{19960809T230410}.
19507 This is quite a mouthful, so we want to shave off the century number and
19508 the time, leaving us with a six-character date.  That would be
19509 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
19510 maxing, and we need the padding to ensure that the date is never less
19511 than 6 characters to make it look nice in columns.)
19512
19513 Ignoring is done first; then cutting; then maxing; and then as the very
19514 last operation, padding.
19515
19516 @vindex gnus-compile-user-specs
19517 If @code{gnus-compile-user-specs} is set to @code{nil} (@code{t} by
19518 default) with your strong personality, and use a lots of these advanced
19519 thingies, you'll find that Gnus gets quite slow.  This can be helped
19520 enormously by running @kbd{M-x gnus-compile} when you are satisfied with
19521 the look of your lines.
19522 @xref{Compilation}.
19523
19524
19525 @node User-Defined Specs
19526 @subsection User-Defined Specs
19527
19528 All the specs allow for inserting user defined specifiers---@samp{u}.
19529 The next character in the format string should be a letter.  Gnus
19530 will call the function @code{gnus-user-format-function-}@samp{X}, where
19531 @samp{X} is the letter following @samp{%u}.  The function will be passed
19532 a single parameter---what the parameter means depends on what buffer
19533 it's being called from.  The function should return a string, which will
19534 be inserted into the buffer just like information from any other
19535 specifier.  This function may also be called with dummy values, so it
19536 should protect against that.
19537
19538 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
19539 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
19540
19541 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
19542 much the same without defining new functions.  Here's an example:
19543 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
19544 given here will be evaluated to yield the current line number, and then
19545 inserted.
19546
19547
19548 @node Formatting Fonts
19549 @subsection Formatting Fonts
19550
19551 There are specs for highlighting, and these are shared by all the format
19552 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
19553 the special @code{mouse-face} property set, which means that it will be
19554 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
19555 over it.
19556
19557 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
19558 normal faces set using @code{gnus-face-0}, which is @code{bold} by
19559 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
19560 and so on.  Create as many faces as you wish.  The same goes for the
19561 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
19562 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
19563
19564 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
19565 special @code{balloon-help} property set to @code{gnus-balloon-face-0}.
19566 If you say @samp{%1<<}, you'll get @code{gnus-balloon-face-1} and so on.
19567 The @code{gnus-balloon-face-*} variables should be either strings or
19568 symbols naming functions that return a string.  When the mouse passes
19569 over text with this property set, a balloon window will appear and
19570 display the string.  Please refer to @ref{(emacs)Help Echo} (in GNU
19571 Emacs) or the doc string of @code{balloon-help-mode} (in XEmacs) for
19572 more information on this.  (For technical reasons, the guillemets have
19573 been approximated as @samp{<<} and @samp{>>} in this paragraph.)
19574
19575 Here's an alternative recipe for the group buffer:
19576
19577 @lisp
19578 ;; Create three face types.
19579 (setq gnus-face-1 'bold)
19580 (setq gnus-face-3 'italic)
19581
19582 ;; We want the article count to be in
19583 ;; a bold and green face.  So we create
19584 ;; a new face called `my-green-bold'.
19585 (copy-face 'bold 'my-green-bold)
19586 ;; Set the color.
19587 (set-face-foreground 'my-green-bold "ForestGreen")
19588 (setq gnus-face-2 'my-green-bold)
19589
19590 ;; Set the new & fancy format.
19591 (setq gnus-group-line-format
19592       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
19593 @end lisp
19594
19595 I'm sure you'll be able to use this scheme to create totally unreadable
19596 and extremely vulgar displays.  Have fun!
19597
19598 Note that the @samp{%(} specs (and friends) do not make any sense on the
19599 mode-line variables.
19600
19601 @node Positioning Point
19602 @subsection Positioning Point
19603
19604 Gnus usually moves point to a pre-defined place on each line in most
19605 buffers.  By default, point move to the first colon character on the
19606 line.  You can customize this behaviour in three different ways.
19607
19608 You can move the colon character to somewhere else on the line.
19609
19610 @findex gnus-goto-colon
19611 You can redefine the function that moves the point to the colon.  The
19612 function is called @code{gnus-goto-colon}.
19613
19614 But perhaps the most convenient way to deal with this, if you don't want
19615 to have a colon in your line, is to use the @samp{%C} specifier.  If you
19616 put a @samp{%C} somewhere in your format line definition, Gnus will
19617 place point there.
19618
19619
19620 @node Tabulation
19621 @subsection Tabulation
19622
19623 You can usually line up your displays by padding and cutting your
19624 strings.  However, when combining various strings of different size, it
19625 can often be more convenient to just output the strings, and then worry
19626 about lining up the following text afterwards.
19627
19628 To do that, Gnus supplies tabulator specs--@samp{%=}.  There are two
19629 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
19630
19631 @samp{%50=} will insert space characters to pad the line up to column
19632 50.  If the text is already past column 50, nothing will be inserted.
19633 This is the soft tabulator.
19634
19635 @samp{%-50=} will insert space characters to pad the line up to column
19636 50.  If the text is already past column 50, the excess text past column
19637 50 will be removed.  This is the hard tabulator.
19638
19639
19640 @node Wide Characters
19641 @subsection Wide Characters
19642
19643 Proportional fonts in most countries have characters of the same width.
19644 Some countries, however, use Latin characters mixed with wider
19645 characters---most notable East Asian countries.
19646
19647 The problem is that when formatting, Gnus assumes that if a string is 10
19648 characters wide, it'll be 10 Latin characters wide on the screen.  In
19649 these countries, that's not true.
19650
19651 @vindex gnus-use-correct-string-widths
19652 To help fix this, you can set @code{gnus-use-correct-string-widths} to
19653 @code{t}.  This makes buffer generation slower, but the results will be
19654 prettier.  The default value under XEmacs is @code{t} but @code{nil}
19655 for Emacs.
19656
19657
19658 @node Window Layout
19659 @section Window Layout
19660 @cindex window layout
19661
19662 No, there's nothing here about X, so be quiet.
19663
19664 @vindex gnus-use-full-window
19665 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
19666 other windows and occupy the entire Emacs screen by itself.  It is
19667 @code{t} by default.
19668
19669 Setting this variable to @code{nil} kinda works, but there are
19670 glitches.  Use at your own peril.
19671
19672 @vindex gnus-buffer-configuration
19673 @code{gnus-buffer-configuration} describes how much space each Gnus
19674 buffer should be given.  Here's an excerpt of this variable:
19675
19676 @lisp
19677 ((group (vertical 1.0 (group 1.0 point)
19678                       (if gnus-carpal (group-carpal 4))))
19679  (article (vertical 1.0 (summary 0.25 point)
19680                         (article 1.0))))
19681 @end lisp
19682
19683 This is an alist.  The @dfn{key} is a symbol that names some action or
19684 other.  For instance, when displaying the group buffer, the window
19685 configuration function will use @code{group} as the key.  A full list of
19686 possible names is listed below.
19687
19688 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
19689 should occupy.  To take the @code{article} split as an example -
19690
19691 @lisp
19692 (article (vertical 1.0 (summary 0.25 point)
19693                        (article 1.0)))
19694 @end lisp
19695
19696 This @dfn{split} says that the summary buffer should occupy 25% of upper
19697 half of the screen, and that it is placed over the article buffer.  As
19698 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
19699 reaching for that calculator there).  However, the special number
19700 @code{1.0} is used to signal that this buffer should soak up all the
19701 rest of the space available after the rest of the buffers have taken
19702 whatever they need.  There should be only one buffer with the @code{1.0}
19703 size spec per split.
19704
19705 Point will be put in the buffer that has the optional third element
19706 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
19707 split where the tag @code{frame-focus} is a member (i.e. is the third or
19708 fourth element in the list, depending on whether the @code{point} tag is
19709 present) gets focus.
19710
19711 Here's a more complicated example:
19712
19713 @lisp
19714 (article (vertical 1.0 (group 4)
19715                        (summary 0.25 point)
19716                        (if gnus-carpal (summary-carpal 4))
19717                        (article 1.0)))
19718 @end lisp
19719
19720 If the size spec is an integer instead of a floating point number,
19721 then that number will be used to say how many lines a buffer should
19722 occupy, not a percentage.
19723
19724 If the @dfn{split} looks like something that can be @code{eval}ed (to be
19725 precise---if the @code{car} of the split is a function or a subr), this
19726 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
19727 be used as a split.  This means that there will be three buffers if
19728 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
19729 is non-@code{nil}.
19730
19731 Not complicated enough for you?  Well, try this on for size:
19732
19733 @lisp
19734 (article (horizontal 1.0
19735              (vertical 0.5
19736                  (group 1.0)
19737                  (gnus-carpal 4))
19738              (vertical 1.0
19739                  (summary 0.25 point)
19740                  (summary-carpal 4)
19741                  (article 1.0))))
19742 @end lisp
19743
19744 Whoops.  Two buffers with the mystery 100% tag.  And what's that
19745 @code{horizontal} thingie?
19746
19747 If the first element in one of the split is @code{horizontal}, Gnus will
19748 split the window horizontally, giving you two windows side-by-side.
19749 Inside each of these strips you may carry on all you like in the normal
19750 fashion.  The number following @code{horizontal} says what percentage of
19751 the screen is to be given to this strip.
19752
19753 For each split, there @emph{must} be one element that has the 100% tag.
19754 The splitting is never accurate, and this buffer will eat any leftover
19755 lines from the splits.
19756
19757 To be slightly more formal, here's a definition of what a valid split
19758 may look like:
19759
19760 @example
19761 split      = frame | horizontal | vertical | buffer | form
19762 frame      = "(frame " size *split ")"
19763 horizontal = "(horizontal " size *split ")"
19764 vertical   = "(vertical " size *split ")"
19765 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
19766 size       = number | frame-params
19767 buf-name   = group | article | summary ...
19768 @end example
19769
19770 The limitations are that the @code{frame} split can only appear as the
19771 top-level split.  @var{form} should be an Emacs Lisp form that should
19772 return a valid split.  We see that each split is fully recursive, and
19773 may contain any number of @code{vertical} and @code{horizontal} splits.
19774
19775 @vindex gnus-window-min-width
19776 @vindex gnus-window-min-height
19777 @cindex window height
19778 @cindex window width
19779 Finding the right sizes can be a bit complicated.  No window may be less
19780 than @code{gnus-window-min-height} (default 1) characters high, and all
19781 windows must be at least @code{gnus-window-min-width} (default 1)
19782 characters wide.  Gnus will try to enforce this before applying the
19783 splits.  If you want to use the normal Emacs window width/height limit,
19784 you can just set these two variables to @code{nil}.
19785
19786 If you're not familiar with Emacs terminology, @code{horizontal} and
19787 @code{vertical} splits may work the opposite way of what you'd expect.
19788 Windows inside a @code{horizontal} split are shown side-by-side, and
19789 windows within a @code{vertical} split are shown above each other.
19790
19791 @findex gnus-configure-frame
19792 If you want to experiment with window placement, a good tip is to call
19793 @code{gnus-configure-frame} directly with a split.  This is the function
19794 that does all the real work when splitting buffers.  Below is a pretty
19795 nonsensical configuration with 5 windows; two for the group buffer and
19796 three for the article buffer.  (I said it was nonsensical.)  If you
19797 @code{eval} the statement below, you can get an idea of how that would
19798 look straight away, without going through the normal Gnus channels.
19799 Play with it until you're satisfied, and then use
19800 @code{gnus-add-configuration} to add your new creation to the buffer
19801 configuration list.
19802
19803 @lisp
19804 (gnus-configure-frame
19805  '(horizontal 1.0
19806     (vertical 10
19807       (group 1.0)
19808       (article 0.3 point))
19809     (vertical 1.0
19810       (article 1.0)
19811       (horizontal 4
19812         (group 1.0)
19813         (article 10)))))
19814 @end lisp
19815
19816 You might want to have several frames as well.  No prob---just use the
19817 @code{frame} split:
19818
19819 @lisp
19820 (gnus-configure-frame
19821  '(frame 1.0
19822          (vertical 1.0
19823                    (summary 0.25 point frame-focus)
19824                    (article 1.0))
19825          (vertical ((height . 5) (width . 15)
19826                     (user-position . t)
19827                     (left . -1) (top . 1))
19828                    (picon 1.0))))
19829
19830 @end lisp
19831
19832 This split will result in the familiar summary/article window
19833 configuration in the first (or ``main'') frame, while a small additional
19834 frame will be created where picons will be shown.  As you can see,
19835 instead of the normal @code{1.0} top-level spec, each additional split
19836 should have a frame parameter alist as the size spec.
19837 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
19838 Reference Manual}.  Under XEmacs, a frame property list will be
19839 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
19840 is such a plist.
19841 The list of all possible keys for @code{gnus-buffer-configuration} can
19842 be found in its default value.
19843
19844 Note that the @code{message} key is used for both
19845 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
19846 it is desirable to distinguish between the two, something like this
19847 might be used:
19848
19849 @lisp
19850 (message (horizontal 1.0
19851                      (vertical 1.0 (message 1.0 point))
19852                      (vertical 0.24
19853                                (if (buffer-live-p gnus-summary-buffer)
19854                                    '(summary 0.5))
19855                                (group 1.0)))))
19856 @end lisp
19857
19858 One common desire for a multiple frame split is to have a separate frame
19859 for composing mail and news while leaving the original frame intact.  To
19860 accomplish that, something like the following can be done:
19861
19862 @lisp
19863 (message
19864   (frame 1.0
19865          (if (not (buffer-live-p gnus-summary-buffer))
19866              (car (cdr (assoc 'group gnus-buffer-configuration)))
19867            (car (cdr (assoc 'summary gnus-buffer-configuration))))
19868          (vertical ((user-position . t) (top . 1) (left . 1)
19869                     (name . "Message"))
19870                    (message 1.0 point))))
19871 @end lisp
19872
19873 @findex gnus-add-configuration
19874 Since the @code{gnus-buffer-configuration} variable is so long and
19875 complicated, there's a function you can use to ease changing the config
19876 of a single setting: @code{gnus-add-configuration}.  If, for instance,
19877 you want to change the @code{article} setting, you could say:
19878
19879 @lisp
19880 (gnus-add-configuration
19881  '(article (vertical 1.0
19882                (group 4)
19883                (summary .25 point)
19884                (article 1.0))))
19885 @end lisp
19886
19887 You'd typically stick these @code{gnus-add-configuration} calls in your
19888 @file{.gnus.el} file or in some startup hook---they should be run after
19889 Gnus has been loaded.
19890
19891 @vindex gnus-always-force-window-configuration
19892 If all windows mentioned in the configuration are already visible, Gnus
19893 won't change the window configuration.  If you always want to force the
19894 ``right'' window configuration, you can set
19895 @code{gnus-always-force-window-configuration} to non-@code{nil}.
19896
19897 If you're using tree displays (@pxref{Tree Display}), and the tree
19898 window is displayed vertically next to another window, you may also want
19899 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
19900 windows resized.
19901
19902 @subsection Example Window Configurations
19903
19904 @itemize @bullet
19905 @item
19906 Narrow left hand side occupied by group buffer.  Right hand side split
19907 between summary buffer (top one-sixth) and article buffer (bottom).
19908
19909 @ifinfo
19910 @example
19911 +---+---------+
19912 | G | Summary |
19913 | r +---------+
19914 | o |         |
19915 | u | Article |
19916 | p |         |
19917 +---+---------+
19918 @end example
19919 @end ifinfo
19920
19921 @lisp
19922 (gnus-add-configuration
19923  '(article
19924    (horizontal 1.0
19925                (vertical 25 (group 1.0))
19926                (vertical 1.0
19927                          (summary 0.16 point)
19928                          (article 1.0)))))
19929
19930 (gnus-add-configuration
19931  '(summary
19932    (horizontal 1.0
19933                (vertical 25 (group 1.0))
19934                (vertical 1.0 (summary 1.0 point)))))
19935 @end lisp
19936
19937 @end itemize
19938
19939
19940 @node Faces and Fonts
19941 @section Faces and Fonts
19942 @cindex faces
19943 @cindex fonts
19944 @cindex colors
19945
19946 Fiddling with fonts and faces used to be very difficult, but these days
19947 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
19948 the face you want to alter, and alter it via the standard Customize
19949 interface.
19950
19951
19952 @node Compilation
19953 @section Compilation
19954 @cindex compilation
19955 @cindex byte-compilation
19956
19957 @findex gnus-compile
19958
19959 Remember all those line format specification variables?
19960 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
19961 on.  By default, T-gnus will use the byte-compiled codes of these
19962 variables and we can keep a slow-down to a minimum.  However, if you set
19963 @code{gnus-compile-user-specs} to @code{nil} (@code{t} by default),
19964 unfortunately, changing them will mean a quite significant slow-down.
19965 (The default values of these variables have byte-compiled functions
19966 associated with them, while the user-generated versions do not, of
19967 course.)
19968
19969 To help with this, you can run @kbd{M-x gnus-compile} after you've
19970 fiddled around with the variables and feel that you're (kind of)
19971 satisfied.  This will result in the new specs being byte-compiled, and
19972 you'll get top speed again.  Note that T-gnus will not save these
19973 compiled specs in the @file{.newsrc.eld} file.
19974
19975 @table @code
19976 @item gnus-compile-user-specs
19977 @vindex gnus-compile-user-specs
19978 If it is non-nil, the user-defined format specs will be byte-compiled
19979 automatically.  The default value of this variable is @code{t}.  It has
19980 an effect on the values of @code{gnus-*-line-format-spec}.
19981 @end table
19982
19983
19984 @node Mode Lines
19985 @section Mode Lines
19986 @cindex mode lines
19987
19988 @vindex gnus-updated-mode-lines
19989 @code{gnus-updated-mode-lines} says what buffers should keep their mode
19990 lines updated.  It is a list of symbols.  Supported symbols include
19991 @code{group}, @code{article}, @code{summary}, @code{server},
19992 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
19993 Gnus will keep that mode line updated with information that may be
19994 pertinent.  If this variable is @code{nil}, screen refresh may be
19995 quicker.
19996
19997 @cindex display-time
19998
19999 @vindex gnus-mode-non-string-length
20000 By default, Gnus displays information on the current article in the mode
20001 lines of the summary and article buffers.  The information Gnus wishes
20002 to display (e.g. the subject of the article) is often longer than the
20003 mode lines, and therefore have to be cut off at some point.  The
20004 @code{gnus-mode-non-string-length} variable says how long the other
20005 elements on the line is (i.e., the non-info part).  If you put
20006 additional elements on the mode line (e.g. a clock), you should modify
20007 this variable:
20008
20009 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
20010 @lisp
20011 (add-hook 'display-time-hook
20012           (lambda () (setq gnus-mode-non-string-length
20013                            (+ 21
20014                               (if line-number-mode 5 0)
20015                               (if column-number-mode 4 0)
20016                               (length display-time-string)))))
20017 @end lisp
20018
20019 If this variable is @code{nil} (which is the default), the mode line
20020 strings won't be chopped off, and they won't be padded either.  Note
20021 that the default is unlikely to be desirable, as even the percentage
20022 complete in the buffer may be crowded off the mode line; the user should
20023 configure this variable appropriately for her configuration.
20024
20025
20026 @node Highlighting and Menus
20027 @section Highlighting and Menus
20028 @cindex visual
20029 @cindex highlighting
20030 @cindex menus
20031
20032 @vindex gnus-visual
20033 The @code{gnus-visual} variable controls most of the Gnus-prettifying
20034 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
20035 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
20036 file.
20037
20038 This variable can be a list of visual properties that are enabled.  The
20039 following elements are valid, and are all included by default:
20040
20041 @table @code
20042 @item group-highlight
20043 Do highlights in the group buffer.
20044 @item summary-highlight
20045 Do highlights in the summary buffer.
20046 @item article-highlight
20047 Do highlights in the article buffer.
20048 @item highlight
20049 Turn on highlighting in all buffers.
20050 @item group-menu
20051 Create menus in the group buffer.
20052 @item summary-menu
20053 Create menus in the summary buffers.
20054 @item article-menu
20055 Create menus in the article buffer.
20056 @item browse-menu
20057 Create menus in the browse buffer.
20058 @item server-menu
20059 Create menus in the server buffer.
20060 @item score-menu
20061 Create menus in the score buffers.
20062 @item menu
20063 Create menus in all buffers.
20064 @end table
20065
20066 So if you only want highlighting in the article buffer and menus in all
20067 buffers, you could say something like:
20068
20069 @lisp
20070 (setq gnus-visual '(article-highlight menu))
20071 @end lisp
20072
20073 If you want highlighting only and no menus whatsoever, you'd say:
20074
20075 @lisp
20076 (setq gnus-visual '(highlight))
20077 @end lisp
20078
20079 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
20080 in all Gnus buffers.
20081
20082 Other general variables that influence the look of all buffers include:
20083
20084 @table @code
20085 @item gnus-mouse-face
20086 @vindex gnus-mouse-face
20087 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
20088 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
20089
20090 @end table
20091
20092 There are hooks associated with the creation of all the different menus:
20093
20094 @table @code
20095
20096 @item gnus-article-menu-hook
20097 @vindex gnus-article-menu-hook
20098 Hook called after creating the article mode menu.
20099
20100 @item gnus-group-menu-hook
20101 @vindex gnus-group-menu-hook
20102 Hook called after creating the group mode menu.
20103
20104 @item gnus-summary-menu-hook
20105 @vindex gnus-summary-menu-hook
20106 Hook called after creating the summary mode menu.
20107
20108 @item gnus-server-menu-hook
20109 @vindex gnus-server-menu-hook
20110 Hook called after creating the server mode menu.
20111
20112 @item gnus-browse-menu-hook
20113 @vindex gnus-browse-menu-hook
20114 Hook called after creating the browse mode menu.
20115
20116 @item gnus-score-menu-hook
20117 @vindex gnus-score-menu-hook
20118 Hook called after creating the score mode menu.
20119
20120 @end table
20121
20122
20123 @node Buttons
20124 @section Buttons
20125 @cindex buttons
20126 @cindex mouse
20127 @cindex click
20128
20129 Those new-fangled @dfn{mouse} contraptions is very popular with the
20130 young, hep kids who don't want to learn the proper way to do things
20131 these days.  Why, I remember way back in the summer of '89, when I was
20132 using Emacs on a Tops 20 system.  Three hundred users on one single
20133 machine, and every user was running Simula compilers.  Bah!
20134
20135 Right.
20136
20137 @vindex gnus-carpal
20138 Well, you can make Gnus display bufferfuls of buttons you can click to
20139 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
20140 really.  Tell the chiropractor I sent you.
20141
20142
20143 @table @code
20144
20145 @item gnus-carpal-mode-hook
20146 @vindex gnus-carpal-mode-hook
20147 Hook run in all carpal mode buffers.
20148
20149 @item gnus-carpal-button-face
20150 @vindex gnus-carpal-button-face
20151 Face used on buttons.
20152
20153 @item gnus-carpal-header-face
20154 @vindex gnus-carpal-header-face
20155 Face used on carpal buffer headers.
20156
20157 @item gnus-carpal-group-buffer-buttons
20158 @vindex gnus-carpal-group-buffer-buttons
20159 Buttons in the group buffer.
20160
20161 @item gnus-carpal-summary-buffer-buttons
20162 @vindex gnus-carpal-summary-buffer-buttons
20163 Buttons in the summary buffer.
20164
20165 @item gnus-carpal-server-buffer-buttons
20166 @vindex gnus-carpal-server-buffer-buttons
20167 Buttons in the server buffer.
20168
20169 @item gnus-carpal-browse-buffer-buttons
20170 @vindex gnus-carpal-browse-buffer-buttons
20171 Buttons in the browse buffer.
20172 @end table
20173
20174 All the @code{buttons} variables are lists.  The elements in these list
20175 are either cons cells where the @code{car} contains a text to be displayed and
20176 the @code{cdr} contains a function symbol, or a simple string.
20177
20178
20179 @node Daemons
20180 @section Daemons
20181 @cindex demons
20182 @cindex daemons
20183
20184 Gnus, being larger than any program ever written (allegedly), does lots
20185 of strange stuff that you may wish to have done while you're not
20186 present.  For instance, you may want it to check for new mail once in a
20187 while.  Or you may want it to close down all connections to all servers
20188 when you leave Emacs idle.  And stuff like that.
20189
20190 Gnus will let you do stuff like that by defining various
20191 @dfn{handlers}.  Each handler consists of three elements:  A
20192 @var{function}, a @var{time}, and an @var{idle} parameter.
20193
20194 Here's an example of a handler that closes connections when Emacs has
20195 been idle for thirty minutes:
20196
20197 @lisp
20198 (gnus-demon-close-connections nil 30)
20199 @end lisp
20200
20201 Here's a handler that scans for PGP headers every hour when Emacs is
20202 idle:
20203
20204 @lisp
20205 (gnus-demon-scan-pgp 60 t)
20206 @end lisp
20207
20208 This @var{time} parameter and than @var{idle} parameter work together
20209 in a strange, but wonderful fashion.  Basically, if @var{idle} is
20210 @code{nil}, then the function will be called every @var{time} minutes.
20211
20212 If @var{idle} is @code{t}, then the function will be called after
20213 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
20214 the function will never be called.  But once Emacs goes idle, the
20215 function will be called every @var{time} minutes.
20216
20217 If @var{idle} is a number and @var{time} is a number, the function will
20218 be called every @var{time} minutes only when Emacs has been idle for
20219 @var{idle} minutes.
20220
20221 If @var{idle} is a number and @var{time} is @code{nil}, the function
20222 will be called once every time Emacs has been idle for @var{idle}
20223 minutes.
20224
20225 And if @var{time} is a string, it should look like @samp{07:31}, and
20226 the function will then be called once every day somewhere near that
20227 time.  Modified by the @var{idle} parameter, of course.
20228
20229 @vindex gnus-demon-timestep
20230 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
20231 seconds.  This is 60 by default.  If you change that variable,
20232 all the timings in the handlers will be affected.)
20233
20234 So, if you want to add a handler, you could put something like this in
20235 your @file{.gnus} file:
20236
20237 @findex gnus-demon-add-handler
20238 @lisp
20239 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
20240 @end lisp
20241
20242 @findex gnus-demon-add-nocem
20243 @findex gnus-demon-add-scanmail
20244 @findex gnus-demon-add-rescan
20245 @findex gnus-demon-add-scan-timestamps
20246 @findex gnus-demon-add-disconnection
20247 Some ready-made functions to do this have been created:
20248 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
20249 @code{gnus-demon-add-nntp-close-connection},
20250 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
20251 @code{gnus-demon-add-scanmail}.  Just put those functions in your
20252 @file{.gnus} if you want those abilities.
20253
20254 @findex gnus-demon-init
20255 @findex gnus-demon-cancel
20256 @vindex gnus-demon-handlers
20257 If you add handlers to @code{gnus-demon-handlers} directly, you should
20258 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
20259 daemons, you can use the @code{gnus-demon-cancel} function.
20260
20261 Note that adding daemons can be pretty naughty if you over do it.  Adding
20262 functions that scan all news and mail from all servers every two seconds
20263 is a sure-fire way of getting booted off any respectable system.  So
20264 behave.
20265
20266
20267 @node NoCeM
20268 @section NoCeM
20269 @cindex nocem
20270 @cindex spam
20271
20272 @dfn{Spamming} is posting the same article lots and lots of times.
20273 Spamming is bad.  Spamming is evil.
20274
20275 Spamming is usually canceled within a day or so by various anti-spamming
20276 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
20277 NoCeM is pronounced ``no see-'em'', and means what the name
20278 implies---these are messages that make the offending articles, like, go
20279 away.
20280
20281 What use are these NoCeM messages if the articles are canceled anyway?
20282 Some sites do not honor cancel messages and some sites just honor cancels
20283 from a select few people.  Then you may wish to make use of the NoCeM
20284 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
20285
20286 Gnus can read and parse the messages in this group automatically, and
20287 this will make spam disappear.
20288
20289 There are some variables to customize, of course:
20290
20291 @table @code
20292 @item gnus-use-nocem
20293 @vindex gnus-use-nocem
20294 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
20295 by default.
20296
20297 @item gnus-nocem-groups
20298 @vindex gnus-nocem-groups
20299 Gnus will look for NoCeM messages in the groups in this list.  The
20300 default is @code{("news.lists.filters" "news.admin.net-abuse.bulletins"
20301 "alt.nocem.misc" "news.admin.net-abuse.announce")}.
20302
20303 @item gnus-nocem-issuers
20304 @vindex gnus-nocem-issuers
20305 There are many people issuing NoCeM messages.  This list says what
20306 people you want to listen to.  The default is @code{("Automoose-1"
20307 "clewis@@ferret.ocunix.on.ca" "cosmo.roadkill" "SpamHippo"
20308 "hweede@@snafu.de")}; fine, upstanding citizens all of them.
20309
20310 Known despammers that you can put in this list are listed at
20311 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
20312
20313 You do not have to heed NoCeM messages from all these people---just the
20314 ones you want to listen to.  You also don't have to accept all NoCeM
20315 messages from the people you like.  Each NoCeM message has a @dfn{type}
20316 header that gives the message a (more or less, usually less) rigorous
20317 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
20318 @samp{binary}, and @samp{troll}.  To specify this, you have to use
20319 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
20320 Each condition is either a string (which is a regexp that matches types
20321 you want to use) or a list on the form @code{(not @var{string})}, where
20322 @var{string} is a regexp that matches types you don't want to use.
20323
20324 For instance, if you want all NoCeM messages from Chris Lewis except his
20325 @samp{troll} messages, you'd say:
20326
20327 @lisp
20328 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
20329 @end lisp
20330
20331 On the other hand, if you just want nothing but his @samp{spam} and
20332 @samp{spew} messages, you'd say:
20333
20334 @lisp
20335 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
20336 @end lisp
20337
20338 The specs are applied left-to-right.
20339
20340
20341 @item gnus-nocem-verifyer
20342 @vindex gnus-nocem-verifyer
20343 @findex mc-verify
20344 This should be a function for verifying that the NoCeM issuer is who she
20345 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
20346 function.  If this is too slow and you don't care for verification
20347 (which may be dangerous), you can set this variable to @code{nil}.
20348
20349 If you want signed NoCeM messages to be verified and unsigned messages
20350 not to be verified (but used anyway), you could do something like:
20351
20352 @lisp
20353 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
20354
20355 (defun my-gnus-mc-verify ()
20356   (not (eq 'forged
20357            (ignore-errors
20358              (if (mc-verify)
20359                  t
20360                'forged)))))
20361 @end lisp
20362
20363 This might be dangerous, though.
20364
20365 @item gnus-nocem-directory
20366 @vindex gnus-nocem-directory
20367 This is where Gnus will store its NoCeM cache files.  The default is
20368 @file{~/News/NoCeM/}.
20369
20370 @item gnus-nocem-expiry-wait
20371 @vindex gnus-nocem-expiry-wait
20372 The number of days before removing old NoCeM entries from the cache.
20373 The default is 15.  If you make it shorter Gnus will be faster, but you
20374 might then see old spam.
20375
20376 @item gnus-nocem-check-from
20377 @vindex gnus-nocem-check-from
20378 Non-@code{nil} means check for valid issuers in message bodies.
20379 Otherwise don't bother fetching articles unless their author matches a
20380 valid issuer; that is much faster if you are selective about the
20381 issuers.
20382
20383 @item gnus-nocem-check-article-limit
20384 @vindex gnus-nocem-check-article-limit
20385 If non-@code{nil}, the maximum number of articles to check in any NoCeM
20386 group.  NoCeM groups can be huge and very slow to process.
20387
20388 @end table
20389
20390 Using NoCeM could potentially be a memory hog.  If you have many living
20391 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
20392 big.  If this is a problem, you should kill off all (or most) of your
20393 unsubscribed groups (@pxref{Subscription Commands}).
20394
20395
20396 @node Undo
20397 @section Undo
20398 @cindex undo
20399
20400 It is very useful to be able to undo actions one has done.  In normal
20401 Emacs buffers, it's easy enough---you just push the @code{undo} button.
20402 In Gnus buffers, however, it isn't that simple.
20403
20404 The things Gnus displays in its buffer is of no value whatsoever to
20405 Gnus---it's all just data designed to look nice to the user.
20406 Killing a group in the group buffer with @kbd{C-k} makes the line
20407 disappear, but that's just a side-effect of the real action---the
20408 removal of the group in question from the internal Gnus structures.
20409 Undoing something like that can't be done by the normal Emacs
20410 @code{undo} function.
20411
20412 Gnus tries to remedy this somewhat by keeping track of what the user
20413 does and coming up with actions that would reverse the actions the user
20414 takes.  When the user then presses the @code{undo} key, Gnus will run
20415 the code to reverse the previous action, or the previous actions.
20416 However, not all actions are easily reversible, so Gnus currently offers
20417 a few key functions to be undoable.  These include killing groups,
20418 yanking groups, and changing the list of read articles of groups.
20419 That's it, really.  More functions may be added in the future, but each
20420 added function means an increase in data to be stored, so Gnus will
20421 never be totally undoable.
20422
20423 @findex gnus-undo-mode
20424 @vindex gnus-use-undo
20425 @findex gnus-undo
20426 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
20427 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
20428 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
20429 command, which should feel kinda like the normal Emacs @code{undo}
20430 command.
20431
20432
20433 @node Predicate Specifiers
20434 @section Predicate Specifiers
20435 @cindex predicate specifiers
20436
20437 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
20438 form that allows flexible specification of predicates without having
20439 to type all that much.
20440
20441 These specifiers are lists consisting of functions, symbols and lists.
20442
20443 Here's an example:
20444
20445 @lisp
20446 (or gnus-article-unseen-p
20447     gnus-article-unread-p)
20448 @end lisp
20449
20450 The available symbols are @code{or}, @code{and} and @code{not}.  The
20451 functions all take one parameter.
20452
20453 @findex gnus-make-predicate
20454 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
20455 to create a function that can be called.  This input parameter to this
20456 function will be passed along to all the functions in the predicate
20457 specifier.
20458
20459
20460 @node Moderation
20461 @section Moderation
20462 @cindex moderation
20463
20464 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
20465 It is not included in the standard Gnus package.  Write a mail to
20466 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
20467 get a copy.
20468
20469 The moderation package is implemented as a minor mode for summary
20470 buffers.  Put
20471
20472 @lisp
20473 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
20474 @end lisp
20475
20476 in your @file{.gnus.el} file.
20477
20478 If you are the moderator of @samp{rec.zoofle}, this is how it's
20479 supposed to work:
20480
20481 @enumerate
20482 @item
20483 You split your incoming mail by matching on
20484 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
20485 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
20486
20487 @item
20488 You enter that group once in a while and post articles using the @kbd{e}
20489 (edit-and-post) or @kbd{s} (just send unedited) commands.
20490
20491 @item
20492 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
20493 articles that weren't approved by you, you can cancel them with the
20494 @kbd{c} command.
20495 @end enumerate
20496
20497 To use moderation mode in these two groups, say:
20498
20499 @lisp
20500 (setq gnus-moderated-list
20501       "^nnml:rec.zoofle$\\|^rec.zoofle$")
20502 @end lisp
20503
20504
20505 @node Image Enhancements
20506 @section Image Enhancements
20507
20508 XEmacs, as well as Emacs 21, is able to display pictures and stuff, so
20509 Gnus has taken advantage of that.
20510
20511 @menu
20512 * Picons::                      How to display pictures of what you're reading.
20513 * Smileys::                     Show all those happy faces the way they were meant to be shown.
20514 * X-Face::                      Display a funky, teensy black-and-white image.
20515 * Toolbar::                     Click'n'drool.
20516 * XVarious::                    Other XEmacsy Gnusey variables.
20517 @end menu
20518
20519
20520 @node Picons
20521 @subsection Picons
20522
20523 @iftex
20524 @iflatex
20525 \include{picons}
20526 @end iflatex
20527 @end iftex
20528
20529 So@dots{}  You want to slow down your news reader even more!  This is a
20530 good way to do so.  Its also a great way to impress people staring
20531 over your shoulder as you read news.
20532
20533 @menu
20534 * Picon Basics::                What are picons and How do I get them.
20535 * Picon Requirements::          Don't go further if you aren't using XEmacs.
20536 * Easy Picons::                 Displaying Picons---the easy way.
20537 * Hard Picons::                 The way you should do it.  You'll learn something.
20538 * Picon Useless Configuration::  Other variables you can trash/tweak/munge/play with.
20539 @end menu
20540
20541
20542 @node Picon Basics
20543 @subsubsection Picon Basics
20544
20545 What are Picons?  To quote directly from the Picons Web site:
20546
20547 @iftex
20548 @iflatex
20549 \margindex{}
20550 @end iflatex
20551 @end iftex
20552
20553 @quotation
20554 @dfn{Picons} is short for ``personal icons''.  They're small,
20555 constrained images used to represent users and domains on the net,
20556 organized into databases so that the appropriate image for a given
20557 e-mail address can be found.  Besides users and domains, there are picon
20558 databases for Usenet newsgroups and weather forecasts.  The picons are
20559 in either monochrome @code{XBM} format or color @code{XPM} and
20560 @code{GIF} formats.
20561 @end quotation
20562
20563 @vindex gnus-picons-piconsearch-url
20564 If you have a permanent connection to the Internet you can use Steve
20565 Kinzler's Picons Search engine by setting
20566 @code{gnus-picons-piconsearch-url} to the string @*
20567 @uref{http://www.cs.indiana.edu/picons/search.html}.
20568
20569 @vindex gnus-picons-database
20570 Otherwise you need a local copy of his database.  For instructions on
20571 obtaining and installing the picons databases, point your Web browser at @*
20572 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.  Gnus expects
20573 picons to be installed into a location pointed to by
20574 @code{gnus-picons-database}.
20575
20576 If you are using Debian GNU/Linux, saying @samp{apt-get install
20577 picons.*} will install the picons where Gnus can find them.
20578
20579
20580 @node Picon Requirements
20581 @subsubsection Picon Requirements
20582
20583 To have Gnus display Picons for you, you must have @code{x} support
20584 compiled into XEmacs.  To display color picons which are much nicer
20585 than the black & white one, you also need one of @code{xpm} or
20586 @code{gif} compiled into XEmacs.
20587
20588 @vindex gnus-picons-convert-x-face
20589 If you want to display faces from @code{X-Face} headers, you should have
20590 the @code{xface} support compiled into XEmacs.  Otherwise you must have
20591 the @code{netpbm} utilities installed, or munge the
20592 @code{gnus-picons-convert-x-face} variable to use something else.
20593 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20594
20595 @node Easy Picons
20596 @subsubsection Easy Picons
20597
20598 To enable displaying picons, simply put the following line in your
20599 @file{~/.gnus} file and start Gnus.
20600
20601 @lisp
20602 (setq gnus-use-picons t)
20603 (setq gnus-treat-display-picons t)
20604 @end lisp
20605
20606 and make sure @code{gnus-picons-database} points to the directory
20607 containing the Picons databases.
20608
20609 Alternatively if you want to use the web piconsearch engine add this:
20610
20611 @lisp
20612 (setq gnus-picons-piconsearch-url
20613       "http://www.cs.indiana.edu:800/piconsearch")
20614 @end lisp
20615
20616
20617 @node Hard Picons
20618 @subsubsection Hard Picons
20619
20620 @iftex
20621 @iflatex
20622 \margindex{}
20623 @end iflatex
20624 @end iftex
20625
20626 Gnus can display picons for you as you enter and leave groups and
20627 articles.  It knows how to interact with three sections of the picons
20628 database.  Namely, it can display the picons newsgroup pictures,
20629 author's face picture(s), and the authors domain.  To enable this
20630 feature, you need to select where to get the picons from, and where to
20631 display them.
20632
20633 @table @code
20634
20635 @item gnus-picons-database
20636 @vindex gnus-picons-database
20637 The location of the picons database.  Should point to a directory
20638 containing the @file{news}, @file{domains}, @file{users} (and so on)
20639 subdirectories.  This is only useful if
20640 @code{gnus-picons-piconsearch-url} is @code{nil}.  Defaults to
20641 @file{/usr/local/faces/}.
20642
20643 @item gnus-picons-piconsearch-url
20644 @vindex gnus-picons-piconsearch-url
20645 The URL for the web picons search engine.  The only currently known
20646 engine is @uref{http://www.cs.indiana.edu:800/piconsearch}.  To
20647 workaround network delays, icons will be fetched in the background.  If
20648 this is @code{nil} 'the default), then picons are fetched from local
20649 database indicated by @code{gnus-picons-database}.
20650
20651 @item gnus-picons-display-where
20652 @vindex gnus-picons-display-where
20653 Where the picon images should be displayed.  It is @code{picons} by
20654 default (which by default maps to the buffer @samp{*Picons*}).  Other
20655 valid places could be @code{article}, @code{summary}, or
20656 @samp{*scratch*} for all I care.  Just make sure that you've made the
20657 buffer visible using the standard Gnus window configuration
20658 routines---@pxref{Window Layout}.
20659
20660 @item gnus-picons-group-excluded-groups
20661 @vindex gnus-picons-group-excluded-groups
20662 Groups that are matched by this regexp won't have their group icons
20663 displayed.
20664
20665 @end table
20666
20667 Note: If you set @code{gnus-use-picons} to @code{t}, it will set up your
20668 window configuration for you to include the @code{picons} buffer.
20669
20670 Now that you've made those decision, you need to add the following
20671 functions to the appropriate hooks so these pictures will get displayed
20672 at the right time.
20673
20674 @vindex gnus-picons-display-where
20675 @table @code
20676 @item gnus-article-display-picons
20677 @findex gnus-article-display-picons
20678 Looks up and displays the picons for the author and the author's domain
20679 in the @code{gnus-picons-display-where} buffer.
20680
20681 @item gnus-picons-article-display-x-face
20682 @findex gnus-picons-article-display-x-face
20683 Decodes and displays the X-Face header if present.
20684 (NOTE: @code{x-face} is used in the function name, not @code{xface})
20685
20686 @end table
20687
20688
20689
20690 @node Picon Useless Configuration
20691 @subsubsection Picon Useless Configuration
20692
20693 @iftex
20694 @iflatex
20695 \margindex{}
20696 @end iflatex
20697 @end iftex
20698
20699 The following variables offer further control over how things are
20700 done, where things are located, and other useless stuff you really
20701 don't need to worry about.
20702
20703 @table @code
20704
20705 @item gnus-picons-news-directories
20706 @vindex gnus-picons-news-directories
20707 List of subdirectories to search in @code{gnus-picons-database} for
20708 newsgroups faces.  @code{("news")} is the default.
20709
20710 @item gnus-picons-user-directories
20711 @vindex gnus-picons-user-directories
20712 List of subdirectories to search in @code{gnus-picons-database} for user
20713 faces.  @code{("local" "users" "usenix" "misc")} is the default.
20714
20715 @item gnus-picons-domain-directories
20716 @vindex gnus-picons-domain-directories
20717 List of subdirectories to search in @code{gnus-picons-database} for
20718 domain name faces.  Defaults to @code{("domains")}.  Some people may
20719 want to add @samp{"unknown"} to this list.
20720
20721 @item gnus-picons-convert-x-face
20722 @vindex gnus-picons-convert-x-face
20723 If you don't have @code{xface} support builtin XEmacs, this is the
20724 command to use to convert the @code{X-Face} header to an X bitmap
20725 (@code{xbm}).  Defaults to @code{(format "@{ echo '/* Width=48,
20726 Height=48 */'; uncompface; @} | icontopbm | pbmtoxbm > %s"
20727 gnus-picons-x-face-file-name)}
20728 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20729
20730 @item gnus-picons-x-face-file-name
20731 @vindex gnus-picons-x-face-file-name
20732 Names a temporary file to store the @code{X-Face} bitmap in.  Defaults
20733 to @code{(format "/tmp/picon-xface.%s.xbm" (user-login-name))}.
20734 (NOTE: @code{x-face} is used in the variable name, not @code{xface})
20735
20736 @item gnus-picons-has-modeline-p
20737 @vindex gnus-picons-has-modeline-p
20738 If you have set @code{gnus-picons-display-where} to @code{picons}, your
20739 XEmacs frame will become really cluttered.  To alleviate this a bit you
20740 can set @code{gnus-picons-has-modeline-p} to @code{nil}; this will
20741 remove the mode line from the Picons buffer.  This is only useful if
20742 @code{gnus-picons-display-where} is @code{picons}.
20743
20744 @item gnus-picons-refresh-before-display
20745 @vindex gnus-picons-refresh-before-display
20746 If non-nil, display the article buffer before computing the picons.
20747 Defaults to @code{nil}.
20748
20749 @item gnus-picons-display-as-address
20750 @vindex gnus-picons-display-as-address
20751 If @code{t} display textual email addresses along with pictures.
20752 Defaults to @code{t}.
20753
20754 @item gnus-picons-file-suffixes
20755 @vindex gnus-picons-file-suffixes
20756 Ordered list of suffixes on picon file names to try.  Defaults to
20757 @code{("xpm" "gif" "xbm")} minus those not builtin your XEmacs.
20758
20759 @item gnus-picons-setup-hook
20760 @vindex gnus-picons-setup-hook
20761 Hook run in the picon buffer, if that is displayed.
20762
20763 @item gnus-picons-display-article-move-p
20764 @vindex gnus-picons-display-article-move-p
20765 Whether to move point to first empty line when displaying picons.  This
20766 has only an effect if `gnus-picons-display-where' has value `article'.
20767
20768 If @code{nil}, display the picons in the @code{From} and
20769 @code{Newsgroups} lines.  This is the default.
20770
20771 @item gnus-picons-clear-cache-on-shutdown
20772 @vindex gnus-picons-clear-cache-on-shutdown
20773 Whether to clear the picons cache when exiting gnus.  Gnus caches every
20774 picons it finds while it is running.  This saves some time in the search
20775 process but eats some memory.  If this variable is set to @code{nil},
20776 Gnus will never clear the cache itself; you will have to manually call
20777 @code{gnus-picons-clear-cache} to clear it.  Otherwise the cache will be
20778 cleared every time you exit Gnus.  Defaults to @code{t}.
20779
20780 @iftex
20781 @iflatex
20782 \margindex{}
20783 @end iflatex
20784 @end iftex
20785
20786 @end table
20787
20788 @node Smileys
20789 @subsection Smileys
20790 @cindex smileys
20791
20792 @iftex
20793 @iflatex
20794 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
20795 \input{smiley}
20796 @end iflatex
20797 @end iftex
20798
20799 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
20800 currently the only package that uses Smiley, it is documented here.
20801
20802 In short---to use Smiley in Gnus, put the following in your
20803 @file{.gnus.el} file:
20804
20805 @lisp
20806 (setq gnus-treat-display-smileys t)
20807 @end lisp
20808
20809 Smiley maps text smiley faces---@samp{:-)}, @samp{:-=}, @samp{:-(} and
20810 the like---to pictures and displays those instead of the text smiley
20811 faces.  The conversion is controlled by a list of regexps that matches
20812 text and maps that to file names.
20813
20814 @vindex smiley-nosey-regexp-alist
20815 @vindex smiley-deformed-regexp-alist
20816 Smiley supplies two example conversion alists by default:
20817 @code{smiley-deformed-regexp-alist} (which matches @samp{:)}, @samp{:(}
20818 and so on), and @code{smiley-nosey-regexp-alist} (which matches
20819 @samp{:-)}, @samp{:-(} and so on).
20820
20821 The alist used is specified by the @code{smiley-regexp-alist} variable,
20822 which defaults to the value of @code{smiley-deformed-regexp-alist}.
20823
20824 The first item in each element is the regexp to be matched; the second
20825 element is the regexp match group that is to be replaced by the picture;
20826 and the third element is the name of the file to be displayed.
20827
20828 The following variables customize where Smiley will look for these
20829 files, as well as the color to be used and stuff:
20830
20831 @table @code
20832
20833 @item smiley-data-directory
20834 @vindex smiley-data-directory
20835 Where Smiley will look for smiley faces files.
20836
20837 @item smiley-flesh-color
20838 @vindex smiley-flesh-color
20839 Skin color.  The default is @samp{yellow}, which is really racist.
20840
20841 @item smiley-features-color
20842 @vindex smiley-features-color
20843 Color of the features of the face.  The default is @samp{black}.
20844
20845 @item smiley-tongue-color
20846 @vindex smiley-tongue-color
20847 Color of the tongue.  The default is @samp{red}.
20848
20849 @item smiley-circle-color
20850 @vindex smiley-circle-color
20851 Color of the circle around the face.  The default is @samp{black}.
20852
20853 @item smiley-mouse-face
20854 @vindex smiley-mouse-face
20855 Face used for mouse highlighting over the smiley face.
20856
20857 @end table
20858
20859
20860 @node X-Face
20861 @subsection X-Face
20862 @cindex x-face
20863
20864 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
20865 depth) image that's supposed to represent the author of the message.
20866 It seems to be supported by an ever-growing number of mail and news
20867 readers.
20868
20869 @cindex x-face
20870 @findex gnus-article-display-x-face
20871 @findex gnus-article-x-face-command
20872 @vindex gnus-article-x-face-command
20873 @vindex gnus-article-x-face-too-ugly
20874 @iftex
20875 @iflatex
20876 \include{xface}
20877 @end iflatex
20878 @end iftex
20879 @c @anchor{X-Face}
20880
20881 Decoding an @code{X-Face} header either requires an Emacs that has
20882 @samp{compface} support (which most XEmacs versions has), or that you
20883 have @samp{compface} installed on your system.  If either is true,
20884 Gnus will default to displaying @code{X-Face} headers.
20885
20886 The variable that controls this is the
20887 @code{gnus-article-x-face-command} variable.  If this variable is a
20888 string, this string will be executed in a sub-shell.  If it is a
20889 function, this function will be called with the face as the argument.
20890 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
20891 the @code{From} header, the face will not be shown.
20892
20893 The default action under Emacs 20 is to fork off the @code{display}
20894 program@footnote{@code{display} is from the ImageMagick package.  For
20895 the @code{uncompface} and @code{icontopbm} programs look for a package
20896 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
20897 view the face.
20898
20899 Under XEmacs or Emacs 21+ with suitable image support, the default
20900 action is to display the face before the @code{From} header.  (It's
20901 nicer if XEmacs has been compiled with @code{X-Face} support---that
20902 will make display somewhat faster.  If there's no native @code{X-Face}
20903 support, Gnus will try to convert the @code{X-Face} header using
20904 external programs from the @code{pbmplus} package and
20905 friends.@footnote{On a GNU/Linux system look for packages with names
20906 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
20907
20908 (NOTE: @code{x-face} is used in the variable/function names, not
20909 @code{xface}).
20910
20911 Gnus provides a few convenience functions and variables to allow
20912 easier insertion of X-Face headers in outgoing messages.
20913
20914 @findex gnus-random-x-face
20915 @code{gnus-random-x-face} goes through all the @samp{pbm} files
20916 in @code{gnus-x-face-directory} and picks one at random, and then
20917 converts it to the X-Face format by using the
20918 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
20919 @samp{pbm} files should be 48x48 pixels big.
20920
20921 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
20922 converts the file to X-Face format by using the
20923 @code{gnus-convert-image-to-x-face-command} shell command.
20924
20925 Here's how you would typically use the former function.  Put something
20926 like the following in your @file{.gnus.el} file:
20927
20928 @lisp
20929 (setq message-required-news-headers
20930       (nconc message-required-news-headers
20931              (list '(X-Face . gnus-random-x-face))))
20932 @end lisp
20933
20934 Using the latter function would be something like this:
20935
20936 @lisp
20937 (setq message-required-news-headers
20938       (nconc message-required-news-headers
20939              (list '(X-Face . (lambda ()
20940                                 (gnus-x-face-from-file
20941                                  "~/My-face.gif"))))))
20942 @end lisp
20943
20944
20945 @node Toolbar
20946 @subsection Toolbar
20947
20948 @table @code
20949
20950 @iftex
20951 @iflatex
20952 \margindex{}
20953 @end iflatex
20954 @end iftex
20955
20956 @item gnus-use-toolbar
20957 @vindex gnus-use-toolbar
20958 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
20959 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
20960 @code{right-toolbar}, or @code{left-toolbar}.
20961
20962 @item gnus-group-toolbar
20963 @vindex gnus-group-toolbar
20964 The toolbar in the group buffer.
20965
20966 @item gnus-summary-toolbar
20967 @vindex gnus-summary-toolbar
20968 The toolbar in the summary buffer.
20969
20970 @item gnus-summary-mail-toolbar
20971 @vindex gnus-summary-mail-toolbar
20972 The toolbar in the summary buffer of mail groups.
20973
20974 @end table
20975
20976
20977 @node XVarious
20978 @subsection Various XEmacs Variables
20979
20980 @table @code
20981 @item gnus-xmas-glyph-directory
20982 @vindex gnus-xmas-glyph-directory
20983 This is where Gnus will look for pictures.  Gnus will normally
20984 auto-detect this directory, but you may set it manually if you have an
20985 unusual directory structure.
20986
20987 @item gnus-xmas-logo-color-alist
20988 @vindex gnus-xmas-logo-color-alist
20989 This is an alist where the key is a type symbol and the values are the
20990 foreground and background color of the splash page glyph.
20991
20992 @item gnus-xmas-logo-color-style
20993 @vindex gnus-xmas-logo-color-style
20994 This is the key used to look up the color in the alist described above.
20995 Valid values include @code{flame}, @code{pine}, @code{moss},
20996 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
20997 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
20998
20999 @item gnus-xmas-modeline-glyph
21000 @vindex gnus-xmas-modeline-glyph
21001 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
21002 default.
21003
21004 @iftex
21005 @iflatex
21006 \margindex{}
21007 @end iflatex
21008 @end iftex
21009
21010 @end table
21011
21012
21013
21014
21015 @node Fuzzy Matching
21016 @section Fuzzy Matching
21017 @cindex fuzzy matching
21018
21019 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
21020 things like scoring, thread gathering and thread comparison.
21021
21022 As opposed to regular expression matching, fuzzy matching is very fuzzy.
21023 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
21024 means, and the implementation has changed over time.
21025
21026 Basically, it tries to remove all noise from lines before comparing.
21027 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
21028 out of the strings before comparing the results.  This often leads to
21029 adequate results---even when faced with strings generated by text
21030 manglers masquerading as newsreaders.
21031
21032
21033 @node Thwarting Email Spam
21034 @section Thwarting Email Spam
21035 @cindex email spam
21036 @cindex spam
21037 @cindex UCE
21038 @cindex unsolicited commercial email
21039
21040 In these last days of the Usenet, commercial vultures are hanging about
21041 and grepping through news like crazy to find email addresses they can
21042 foist off their scams and products to.  As a reaction to this, many
21043 people have started putting nonsense addresses into their @code{From}
21044 lines.  I think this is counterproductive---it makes it difficult for
21045 people to send you legitimate mail in response to things you write, as
21046 well as making it difficult to see who wrote what.  This rewriting may
21047 perhaps be a bigger menace than the unsolicited commercial email itself
21048 in the end.
21049
21050 The biggest problem I have with email spam is that it comes in under
21051 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
21052 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
21053 mail group, only to find two pyramid schemes, seven advertisements
21054 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
21055 and one mail asking me to repent and find some god.
21056
21057 This is annoying.  Here's what you can do about it.
21058
21059 @menu
21060 * The problem of spam::         Some background, and some solutions
21061 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
21062 * SpamAssassin::                How to use external anti-spam tools.
21063 * Hashcash::                    Reduce spam by burning CPU time.
21064 * Filtering Spam Using spam.el::  
21065 * Filtering Spam Using Statistics (spam-stat.el)::  
21066 @end menu
21067
21068 @node The problem of spam
21069 @subsection The problem of spam
21070 @cindex email spam
21071 @cindex spam filtering approaches
21072 @cindex filtering approaches, spam
21073 @cindex UCE
21074 @cindex unsolicited commercial email
21075
21076 First, some background on spam.
21077
21078 If you have access to e-mail, you are familiar with spam (technically
21079 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
21080 because e-mail delivery is very cheap compared to paper mail, so only
21081 a very small percentage of people need to respond to an UCE to make it
21082 worthwhile to the advertiser.  Ironically, one of the most common
21083 spams is the one offering a database of e-mail addresses for further
21084 spamming.  Senders of spam are usually called @emph{spammers}, but terms like
21085 @emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
21086
21087 Spam comes from a wide variety of sources.  It is simply impossible to
21088 dispose of all spam without discarding useful messages.  A good
21089 example is the TMDA system, which requires senders
21090 unknown to you to confirm themselves as legitimate senders before
21091 their e-mail can reach you.  Without getting into the technical side
21092 of TMDA, a downside is clearly that e-mail from legitimate sources may
21093 be discarded if those sources can't or won't confirm themselves
21094 through the TMDA system.  Another problem with TMDA is that it
21095 requires its users to have a basic understanding of e-mail delivery
21096 and processing.
21097
21098 The simplest approach to filtering spam is filtering.  If you get 200
21099 spam messages per day from @email{random-address@@vmadmin.com}, you
21100 block @samp{vmadmin.com}.  If you get 200 messages about
21101 @samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
21102 message.  This, unfortunately, is a great way to discard legitimate
21103 e-mail.  For instance, the very informative and useful RISKS digest
21104 has been blocked by overzealous mail filters because it
21105 @strong{contained} words that were common in spam messages.
21106 Nevertheless, in isolated cases, with great care, direct filtering of
21107 mail can be useful.
21108
21109 Another approach to filtering e-mail is the distributed spam
21110 processing, for instance DCC implements such a system.  In essence,
21111 @code{N} systems around the world agree that a machine @samp{X} in
21112 China, Ghana, or California is sending out spam e-mail, and these
21113 @code{N} systems enter @samp{X} or the spam e-mail from @samp{X} into
21114 a database.  The criteria for spam detection vary - it may be the
21115 number of messages sent, the content of the messages, and so on.  When
21116 a user of the distributed processing system wants to find out if a
21117 message is spam, he consults one of those @code{N} systems.
21118
21119 Distributed spam processing works very well against spammers that send
21120 a large number of messages at once, but it requires the user to set up
21121 fairly complicated checks.  There are commercial and free distributed
21122 spam processing systems.  Distributed spam processing has its risks as
21123 well.  For instance legitimate e-mail senders have been accused of
21124 sending spam, and their web sites have been shut down for some time
21125 because of the incident.
21126
21127 The statistical approach to spam filtering is also popular.  It is
21128 based on a statistical analysis of previous spam messages.  Usually
21129 the analysis is a simple word frequency count, with perhaps pairs of
21130 words or 3-word combinations thrown into the mix.  Statistical
21131 analysis of spam works very well in most of the cases, but it can
21132 classify legitimate e-mail as spam in some cases.  It takes time to
21133 run the analysis, the full message must be analyzed, and the user has
21134 to store the database of spam analyses.
21135
21136 @node Anti-Spam Basics
21137 @subsection Anti-Spam Basics
21138 @cindex email spam
21139 @cindex spam
21140 @cindex UCE
21141 @cindex unsolicited commercial email
21142
21143 One way of dealing with spam is having Gnus split out all spam into a
21144 @samp{spam} mail group (@pxref{Splitting Mail}).
21145
21146 First, pick one (1) valid mail address that you can be reached at, and
21147 put it in your @code{From} header of all your news articles.  (I've
21148 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
21149 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
21150 sysadmin whether your sendmail installation accepts keywords in the local
21151 part of the mail address.)
21152
21153 @lisp
21154 (setq message-default-news-headers
21155       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
21156 @end lisp
21157
21158 Then put the following split rule in @code{nnmail-split-fancy}
21159 (@pxref{Fancy Mail Splitting}):
21160
21161 @lisp
21162 (
21163  ...
21164  (to "larsi@@trym.ifi.uio.no"
21165       (| ("subject" "re:.*" "misc")
21166          ("references" ".*@@.*" "misc")
21167          "spam"))
21168  ...
21169 )
21170 @end lisp
21171
21172 This says that all mail to this address is suspect, but if it has a
21173 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
21174 header, it's probably ok.  All the rest goes to the @samp{spam} group.
21175 (This idea probably comes from Tim Pierce.)
21176
21177 In addition, many mail spammers talk directly to your @sc{smtp} server
21178 and do not include your email address explicitly in the @code{To}
21179 header.  Why they do this is unknown---perhaps it's to thwart this
21180 thwarting scheme?  In any case, this is trivial to deal with---you just
21181 put anything not addressed to you in the @samp{spam} group by ending
21182 your fancy split rule in this way:
21183
21184 @lisp
21185 (
21186  ...
21187  (to "larsi" "misc")
21188  "spam")
21189 @end lisp
21190
21191 In my experience, this will sort virtually everything into the right
21192 group.  You still have to check the @samp{spam} group from time to time to
21193 check for legitimate mail, though.  If you feel like being a good net
21194 citizen, you can even send off complaints to the proper authorities on
21195 each unsolicited commercial email---at your leisure.
21196
21197 If you are also a lazy net citizen, you will probably prefer complaining
21198 automatically with the @file{gnus-junk.el} package, available FOR FREE
21199 at @* @uref{http://stud2.tuwien.ac.at/~e9426626/gnus-junk.html}.
21200 Since most e-mail spam is sent automatically, this may reconcile the
21201 cosmic balance somewhat.
21202
21203 This works for me.  It allows people an easy way to contact me (they can
21204 just press @kbd{r} in the usual way), and I'm not bothered at all with
21205 spam.  It's a win-win situation.  Forging @code{From} headers to point
21206 to non-existent domains is yucky, in my opinion.
21207
21208
21209
21210 @node SpamAssassin
21211 @subsection SpamAssassin, Vipul's Razor, DCC, etc
21212 @cindex SpamAssassin
21213 @cindex Vipul's Razor
21214 @cindex DCC
21215
21216 The days where the hints in the previous section was sufficient in
21217 avoiding spam is coming to an end.  There are many tools out there
21218 that claim to reduce the amount of spam you get.  This section could
21219 easily become outdated fast, as new products replace old, but
21220 fortunately most of these tools seem to have similar interfaces.  Even
21221 though this section will use SpamAssassin as an example, it should be
21222 easy to adapt it to most other tools.
21223
21224 If the tool you are using is not installed on the mail server, you
21225 need to invoke it yourself.  Ideas on how to use the
21226 @code{:postscript} mail source parameter (@pxref{Mail Source
21227 Specifiers}) follows.
21228
21229 @lisp
21230 (setq mail-sources
21231       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
21232         (pop :user "jrl"
21233              :server "pophost"
21234              :postscript "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
21235 @end lisp
21236
21237 Once you managed to process your incoming spool somehow, thus making
21238 the mail contain e.g. a header indicating it is spam, you are ready to
21239 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
21240
21241 @lisp
21242 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
21243                              ...))
21244 @end lisp
21245
21246 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
21247
21248 @lisp
21249 (setq nnmail-split-methods 'nnmail-split-fancy
21250       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
21251                              ...))
21252 @end lisp
21253
21254 Some people might not like the idea of piping the mail through various
21255 programs using a @code{:prescript} (if some program is buggy, you
21256 might lose all mail).  If you are one of them, another solution is to
21257 call the external tools during splitting.  Example fancy split method:
21258
21259 @lisp
21260 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
21261                              ...))
21262 (defun kevin-spamassassin ()
21263   (save-excursion
21264     (let ((buf (or (get-buffer " *nnmail incoming*")
21265                    (get-buffer " *nnml move*"))))
21266       (if (not buf)
21267           (progn (message "Oops, cannot find message buffer") nil)
21268         (set-buffer buf)
21269         (if (eq 1 (call-process-region (point-min) (point-max)
21270                                        "spamc" nil nil nil "-c"))
21271             "spam")))))
21272 @end lisp
21273
21274 That is about it.  As some spam is likely to get through anyway, you
21275 might want to have a nifty function to call when you happen to read
21276 spam.  And here is the nifty function:
21277
21278 @lisp
21279  (defun my-gnus-raze-spam ()
21280   "Submit SPAM to Vipul's Razor, then mark it as expirable."
21281   (interactive)
21282   (gnus-summary-show-raw-article)
21283   (gnus-summary-save-in-pipe "razor-report -f -d")
21284   (gnus-summary-mark-as-expirable 1))
21285 @end lisp
21286
21287 @node Hashcash
21288 @subsection Hashcash
21289 @cindex hashcash
21290
21291 A novel technique to fight spam is to require senders to do something
21292 costly for each message they send.  This has the obvious drawback that
21293 you cannot rely on that everyone in the world uses this technique,
21294 since it is not part of the Internet standards, but it may be useful
21295 in smaller communities.
21296
21297 While the tools in the previous section work well in practice, they
21298 work only because the tools are constantly maintained and updated as
21299 new form of spam appears.  This means that a small percentage of spam
21300 will always get through.  It also means that somewhere, someone needs
21301 to read lots of spam to update these tools.  Hashcash avoids that, but
21302 instead requires that everyone you communicate with supports the
21303 scheme.  You can view the two approaches as pragmatic vs dogmatic.
21304 The approaches have their own advantages and disadvantages, but as
21305 often in the real world, a combination of them is stronger than either
21306 one of them separately.
21307
21308 @cindex X-Hashcash
21309 The ``something costly'' is to burn CPU time, more specifically to
21310 compute a hash collision up to a certain number of bits.  The
21311 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
21312 header. For more details, and for the external application
21313 @code{hashcash} you need to install to use this feature, see
21314 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
21315 information can be found at @uref{http://www.camram.org/}.
21316
21317 If you wish to call hashcash for each message you send, say something
21318 like:
21319
21320 @lisp
21321 (require 'hashcash)
21322 (add-hook 'message-send-hook 'mail-add-payment)
21323 @end lisp
21324
21325 The @code{hashcash.el} library can be found at
21326 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}, or in the Gnus
21327 development contrib directory.
21328
21329 You will need to set up some additional variables as well:
21330
21331 @table @code
21332
21333 @item hashcash-default-payment
21334 @vindex hashcash-default-payment
21335 This variable indicates the default number of bits the hash collision
21336 should consist of.  By default this is 0, meaning nothing will be
21337 done.  Suggested useful values include 17 to 29.
21338
21339 @item hashcash-payment-alist
21340 @vindex hashcash-payment-alist
21341 Some receivers may require you to spend burn more CPU time than the
21342 default.  This variable contains a list of @samp{(ADDR AMOUNT)} cells,
21343 where ADDR is the receiver (email address or newsgroup) and AMOUNT is
21344 the number of bits in the collision that is needed.  It can also
21345 contain @samp{(ADDR STRING AMOUNT)} cells, where the STRING is the
21346 string to use (normally the email address or newsgroup name is used).
21347
21348 @item hashcash
21349 @vindex hashcash
21350 Where the @code{hashcash} binary is installed.
21351
21352 @end table
21353
21354 Currently there is no built in functionality in Gnus to verify
21355 hashcash cookies, it is expected that this is performed by your hand
21356 customized mail filtering scripts.  Improvements in this area would be
21357 a useful contribution, however.
21358
21359 @node Filtering Spam Using spam.el
21360 @subsection Filtering Spam Using spam.el
21361 @cindex spam filtering
21362 @cindex spam.el
21363
21364 The idea behind @code{spam.el} is to have a control center for spam detection
21365 and filtering in Gnus.  To that end, @code{spam.el} does two things: it
21366 filters incoming mail, and it analyzes mail known to be spam.
21367
21368 So, what happens when you load @code{spam.el}?  First of all, you get
21369 the following keyboard commands:
21370
21371 @table @kbd
21372
21373 @item M-d
21374 @itemx M s x
21375 @itemx S x
21376 @kindex M-d
21377 @kindex S x
21378 @kindex M s x
21379 @findex gnus-summary-mark-as-spam
21380 @code{gnus-summary-mark-as-spam}.
21381
21382 Mark current article as spam, showing it with the @samp{H} mark.
21383 Whenever you see a spam article, make sure to mark its summary line
21384 with @kbd{M-d} before leaving the group.
21385
21386 @item M s t
21387 @itemx S t
21388 @kindex M s t
21389 @kindex S t
21390 @findex spam-bogofilter-score
21391 @code{spam-bogofilter-score}.
21392
21393 You must have bogofilter processing enabled for that command to work
21394 properly.
21395
21396 @xref{Bogofilter}.
21397
21398 @end table
21399
21400 Gnus can learn from the spam you get.  All you have to do is collect
21401 your spam in one or more spam groups, and set the variable
21402 @code{spam-junk-mailgroups} as appropriate.  In these groups, all messages
21403 are considered to be spam by default: they get the @samp{H} mark.  You must
21404 review these messages from time to time and remove the @samp{H} mark for
21405 every message that is not spam after all.  When you leave a spam
21406 group, all messages that continue with the @samp{H} mark, are passed on to
21407 the spam-detection engine (bogofilter, ifile, and others).  To remove
21408 the @samp{H} mark, you can use @kbd{M-u} to "unread" the article, or @kbd{d} for
21409 declaring it read the non-spam way.  When you leave a group, all @samp{H}
21410 marked articles, saved or unsaved, are sent to Bogofilter or ifile
21411 (depending on @code{spam-use-bogofilter} and @code{spam-use-ifile}), which will study
21412 them as spam samples.
21413
21414 Messages may also be deleted in various other ways, and unless
21415 @code{spam-ham-marks-form} gets overridden below, marks @samp{R} and @samp{r} for
21416 default read or explicit delete, marks @samp{X} and @samp{K} for automatic or
21417 explicit kills, as well as mark @samp{Y} for low scores, are all considered
21418 to be associated with articles which are not spam.  This assumption
21419 might be false, in particular if you use kill files or score files as
21420 means for detecting genuine spam, you should then adjust
21421 @code{spam-ham-marks-form}.  When you leave a group, all _unsaved_ articles
21422 bearing any the above marks are sent to Bogofilter or ifile, which
21423 will study these as not-spam samples.  If you explicit kill a lot, you
21424 might sometimes end up with articles marked @samp{K} which you never saw,
21425 and which might accidentally contain spam.  Best is to make sure that
21426 real spam is marked with @samp{H}, and nothing else.
21427
21428 All other marks do not contribute to Bogofilter or ifile
21429 pre-conditioning.  In particular, ticked, dormant or souped articles
21430 are likely to contribute later, when they will get deleted for real,
21431 so there is no need to use them prematurely.  Explicitly expired
21432 articles do not contribute, command @kbd{E} is a way to get rid of an
21433 article without Bogofilter or ifile ever seeing it.
21434
21435 @strong{TODO: @code{spam-use-ifile} does not process spam articles on group exit.
21436 I'm waiting for info from the author of @code{ifile-gnus.el}, because I think
21437 that functionality should go in @code{ifile-gnus.el} rather than @code{spam.el}.}
21438
21439 To use the @code{spam.el} facilities for incoming mail filtering, you
21440 must add the following to your fancy split list
21441 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
21442
21443 @example
21444 (: spam-split)
21445 @end example
21446
21447 Note that the fancy split may be called @code{nnmail-split-fancy} or
21448 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
21449 nnimap back ends to retrieve your mail.
21450
21451 The @code{spam-split} function will process incoming mail and send the mail
21452 considered to be spam into the group name given by the variable
21453 @code{spam-split-group}.  Usually that group name is @samp{spam}.
21454
21455 The following are the methods you can use to control the behavior of
21456 @code{spam-split}:
21457
21458 @menu
21459 * Blacklists and Whitelists::   
21460 * BBDB Whitelists::             
21461 * Blackholes::                  
21462 * Bogofilter::                  
21463 * Ifile spam filtering::        
21464 * Extending spam.el::           
21465 @end menu
21466
21467 @node Blacklists and Whitelists
21468 @subsubsection Blacklists and Whitelists
21469 @cindex spam filtering
21470 @cindex whitelists, spam filtering
21471 @cindex blacklists, spam filtering
21472 @cindex spam.el
21473
21474 @defvar spam-use-blacklist
21475 Set this variables to t (the default) if you want to use blacklists.
21476 @end defvar
21477
21478 @defvar spam-use-whitelist
21479 Set this variables to t if you want to use whitelists.
21480 @end defvar
21481
21482 Blacklists are lists of regular expressions matching addresses you
21483 consider to be spam senders.  For instance, to block mail from any
21484 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
21485 blacklist.  Since you start out with an empty blacklist, no harm is
21486 done by having the @code{spam-use-blacklist} variable set, so it is
21487 set by default.  Blacklist entries use the Emacs regular expression
21488 syntax.
21489
21490 Conversely, whitelists tell Gnus what addresses are considered
21491 legitimate.  All non-whitelisted addresses are considered spammers.
21492 This option is probably not useful for most Gnus users unless the
21493 whitelists is very comprehensive.  Also see @ref{BBDB Whitelists}.
21494 Whitelist entries use the Emacs regular expression syntax.
21495
21496 The Blacklist and whitelist location can be customized with the
21497 @code{spam-directory} variable (@file{~/News/spam} by default).  The whitelist
21498 and blacklist files will be in that directory, named @file{whitelist} and
21499 @file{blacklist} respectively.
21500
21501 @node BBDB Whitelists
21502 @subsubsection BBDB Whitelists
21503 @cindex spam filtering
21504 @cindex BBDB whitelists, spam filtering
21505 @cindex BBDB, spam filtering
21506 @cindex spam.el
21507
21508 @defvar spam-use-bbdb
21509
21510 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
21511 Whitelists}), but uses the BBDB as the source of whitelisted addresses,
21512 without regular expressions.  You must have the BBDB loaded for
21513 @code{spam-use-bbdb} to work properly.  Only addresses in the BBDB
21514 will be allowed through; all others will be classified as spam.
21515
21516 @end defvar
21517
21518 @node Blackholes
21519 @subsubsection Blackholes
21520 @cindex spam filtering
21521 @cindex blackholes, spam filtering
21522 @cindex spam.el
21523
21524 @defvar spam-use-blackholes
21525
21526 This option is disabled by default.  You can let Gnus consult the
21527 blackhole-type distributed spam processing systems (DCC, for instance)
21528 when you set this option.  The variable @code{spam-blackhole-servers}
21529 holds the list of blackhole servers Gnus will consult.  The current
21530 list is fairly comprehensive, but make sure to let us know if it
21531 contains outdated servers.
21532
21533 The blackhole check uses the @code{dig.el} package, but you can tell
21534 @code{spam.el} to use @code{dns.el} instead for better performance if
21535 you set @code{spam-use-dig} to nil.  It is not recommended at this
21536 time to set @code{spam-use-dig} to nil despite the possible
21537 performance improvements, because some users may be unable to use it,
21538 but you can try it and see if it works for you.
21539
21540 @end defvar
21541
21542 @node Bogofilter
21543 @subsubsection Bogofilter
21544 @cindex spam filtering
21545 @cindex bogofilter, spam filtering
21546 @cindex spam.el
21547
21548 @defvar spam-use-bogofilter
21549
21550 Set this variable if you want to use Eric Raymond's speedy Bogofilter.
21551 This has been tested with a locally patched copy of version 0.4.  Make
21552 sure to read the installation comments in @code{spam.el}.
21553
21554 With a minimum of care for associating the @samp{H} mark for spam
21555 articles only, Bogofilter training all gets fairly automatic.  You
21556 should do this until you get a few hundreds of articles in each
21557 category, spam or not.  The shell command @command{head -1
21558 ~/.bogofilter/*} shows both article counts.  The command @kbd{S t} in
21559 summary mode, either for debugging or for curiosity, triggers
21560 Bogofilter into displaying in another buffer the @emph{spamicity}
21561 score of the current article (between 0.0 and 1.0), together with the
21562 article words which most significantly contribute to the score.
21563
21564 @end defvar
21565
21566 @node Ifile spam filtering
21567 @subsubsection Ifile spam filtering
21568 @cindex spam filtering
21569 @cindex ifile, spam filtering
21570 @cindex spam.el
21571
21572 @defvar spam-use-ifile
21573
21574 Enable this variable if you want to use Ifile, a statistical analyzer
21575 similar to Bogofilter.  Currently you must have @code{ifile-gnus.el}
21576 loaded.  The integration of Ifile with @code{spam.el} is not finished
21577 yet, but you can use @code{ifile-gnus.el} on its own if you like.
21578
21579 @end defvar
21580
21581 @node Extending spam.el
21582 @subsubsection Extending spam.el
21583 @cindex spam filtering
21584 @cindex spam.el, extending
21585 @cindex extending spam.el
21586
21587 Say you want to add a new back end called blackbox.  Provide the following:
21588
21589 @enumerate
21590 @item
21591 documentation
21592
21593 @item
21594 code
21595
21596 @example
21597 (defvar spam-use-blackbox nil
21598   "True if blackbox should be used.")
21599 @end example
21600
21601 Add
21602 @example
21603     (spam-use-blackbox   . spam-check-blackbox)
21604 @end example
21605 to @code{spam-list-of-checks}.
21606
21607 @item
21608 functionality
21609
21610 Write the @code{spam-check-blackbox} function.  It should return
21611 @samp{nil} or @code{spam-split-group}.  See the existing
21612 @code{spam-check-*} functions for examples of what you can do.
21613 @end enumerate
21614
21615 @node Filtering Spam Using Statistics (spam-stat.el)
21616 @subsection Filtering Spam Using Statistics (spam-stat.el)
21617 @cindex Paul Graham
21618 @cindex Graham, Paul
21619 @cindex naive Bayesian spam filtering
21620 @cindex Bayesian spam filtering, naive
21621 @cindex spam filtering, naive Bayesian
21622
21623 Paul Graham has written an excellent essay about spam filtering using
21624 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
21625 Spam}.  In it he describes the inherent deficiency of rule-based
21626 filtering as used by SpamAssassin, for example: Somebody has to write
21627 the rules, and everybody else has to install these rules.  You are
21628 always late.  It would be much better, he argues, to filter mail based
21629 on whether it somehow resembles spam or non-spam.  One way to measure
21630 this is word distribution.  He then goes on to describe a solution
21631 that checks whether a new mail resembles any of your other spam mails
21632 or not.
21633
21634 The basic idea is this:  Create a two collections of your mail, one
21635 with spam, one with non-spam.  Count how often each word appears in
21636 either collection, weight this by the total number of mails in the
21637 collections, and store this information in a dictionary.  For every
21638 word in a new mail, determine its probability to belong to a spam or a
21639 non-spam mail.  Use the 15 most conspicuous words, compute the total
21640 probability of the mail being spam.  If this probability is higher
21641 than a certain threshold, the mail is considered to be spam.
21642
21643 Gnus supports this kind of filtering.  But it needs some setting up.
21644 First, you need two collections of your mail, one with spam, one with
21645 non-spam.  Then you need to create a dictionary using these two
21646 collections, and save it.  And last but not least, you need to use
21647 this dictionary in your fancy mail splitting rules.
21648
21649 @menu
21650 * Creating a spam-stat dictionary::  
21651 * Splitting mail using spam-stat::  
21652 * Low-level interface to the spam-stat dictionary::  
21653 @end menu
21654
21655 @node Creating a spam-stat dictionary
21656 @subsubsection Creating a spam-stat dictionary
21657
21658 Before you can begin to filter spam based on statistics, you must
21659 create these statistics based on two mail collections, one with spam,
21660 one with non-spam.  These statistics are then stored in a dictionary
21661 for later use.  In order for these statistics to be meaningful, you
21662 need several hundred emails in both collections.
21663
21664 Gnus currently supports only the nnml back end for automated dictionary
21665 creation.  The nnml back end stores all mails in a directory, one file
21666 per mail.  Use the following:
21667
21668 @defun spam-stat-process-spam-directory
21669 Create spam statistics for every file in this directory.  Every file
21670 is treated as one spam mail.
21671 @end defun
21672
21673 @defun spam-stat-process-non-spam-directory
21674 Create non-spam statistics for every file in this directory.  Every
21675 file is treated as one non-spam mail.
21676 @end defun
21677
21678 Usually you would call @code{spam-stat-process-spam-directory} on a
21679 directory such as @file{~/Mail/mail/spam} (this usually corresponds
21680 the the group @samp{nnml:mail.spam}), and you would call
21681 @code{spam-stat-process-non-spam-directory} on a directory such as
21682 @file{~/Mail/mail/misc} (this usually corresponds the the group
21683 @samp{nnml:mail.misc}).
21684
21685 @defvar spam-stat
21686 This variable holds the hash-table with all the statistics -- the
21687 dictionary we have been talking about.  For every word in either
21688 collection, this hash-table stores a vector describing how often the
21689 word appeared in spam and often it appeared in non-spam mails.
21690
21691 If you want to regenerate the statistics from scratch, you need to
21692 reset the dictionary.
21693
21694 @end defvar
21695
21696 @defun spam-stat-reset
21697 Reset the @code{spam-stat} hash-table, deleting all the statistics.
21698
21699 When you are done, you must save the dictionary.  The dictionary may
21700 be rather large.  If you will not update the dictionary incrementally
21701 (instead, you will recreate it once a month, for example), then you
21702 can reduce the size of the dictionary by deleting all words that did
21703 not appear often enough or that do not clearly belong to only spam or
21704 only non-spam mails.
21705 @end defun
21706
21707 @defun spam-stat-reduce-size
21708 Reduce the size of the dictionary.  Use this only if you do not want
21709 to update the dictionary incrementally.
21710 @end defun
21711
21712 @defun spam-stat-save
21713 Save the dictionary.
21714 @end defun
21715
21716 @defvar spam-stat-file
21717 The filename used to store the dictionary.  This defaults to
21718 @file{~/.spam-stat.el}.
21719 @end defvar
21720
21721 @node Splitting mail using spam-stat
21722 @subsubsection Splitting mail using spam-stat
21723
21724 In order to use @code{spam-stat} to split your mail, you need to add the
21725 following to your @file{~/.gnus} file:
21726
21727 @example
21728 (require 'spam-stat)
21729 (spam-stat-load)
21730 @end example
21731
21732 This will load the necessary Gnus code, and the dictionary you
21733 created.
21734
21735 Next, you need to adapt your fancy splitting rules:  You need to
21736 determine how to use @code{spam-stat}.  In the simplest case, you only have
21737 two groups, @samp{mail.misc} and @samp{mail.spam}.  The following expression says
21738 that mail is either spam or it should go into @samp{mail.misc}.  If it is
21739 spam, then @code{spam-stat-split-fancy} will return @samp{mail.spam}.
21740
21741 @example
21742 (setq nnmail-split-fancy
21743       `(| (: spam-stat-split-fancy)
21744           "mail.misc"))
21745 @end example
21746
21747 @defvar spam-stat-split-fancy-spam-group
21748 The group to use for spam.  Default is @samp{mail.spam}.
21749 @end defvar
21750
21751 If you also filter mail with specific subjects into other groups, use
21752 the following expression.  It only the mails not matching the regular
21753 expression are considered potential spam.
21754
21755 @example
21756 (setq nnmail-split-fancy
21757       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
21758           (: spam-stat-split-fancy)
21759           "mail.misc"))
21760 @end example
21761
21762 If you want to filter for spam first, then you must be careful when
21763 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
21764 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
21765 non-spam, therefore both should be in your collection of non-spam
21766 mails, when creating the dictionary!
21767
21768 @example
21769 (setq nnmail-split-fancy
21770       `(| (: spam-stat-split-fancy)
21771           ("Subject" "\\bspam-stat\\b" "mail.emacs")
21772           "mail.misc"))
21773 @end example
21774
21775 You can combine this with traditional filtering.  Here, we move all
21776 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
21777 @code{spam-stat-split-fancy} will never see them, the mails in
21778 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
21779 nor in your collection of non-spam mails, when creating the
21780 dictionary!
21781
21782 @example
21783 (setq nnmail-split-fancy
21784       `(| ("Content-Type" "text/html" "mail.spam.filtered")
21785           (: spam-stat-split-fancy)
21786           ("Subject" "\\bspam-stat\\b" "mail.emacs")
21787           "mail.misc"))
21788 @end example
21789
21790
21791 @node Low-level interface to the spam-stat dictionary
21792 @subsubsection Low-level interface to the spam-stat dictionary
21793
21794 The main interface to using @code{spam-stat}, are the following functions:
21795
21796 @defun spam-stat-buffer-is-spam
21797 called in a buffer, that buffer is considered to be a new spam mail;
21798 use this for new mail that has not been processed before
21799
21800 @end defun
21801
21802 @defun spam-stat-buffer-is-no-spam
21803 called in a buffer, that buffer is considered to be a new non-spam
21804 mail; use this for new mail that has not been processed before
21805
21806 @end defun
21807
21808 @defun spam-stat-buffer-change-to-spam
21809 called in a buffer, that buffer is no longer considered to be normal
21810 mail but spam; use this to change the status of a mail that has
21811 already been processed as non-spam
21812
21813 @end defun
21814
21815 @defun spam-stat-buffer-change-to-non-spam
21816 called in a buffer, that buffer is no longer considered to be spam but
21817 normal mail; use this to change the status of a mail that has already
21818 been processed as spam
21819
21820 @end defun
21821
21822 @defun spam-stat-save
21823 save the hash table to the file; the filename used is stored in the
21824 variable @code{spam-stat-file}
21825
21826 @end defun
21827
21828 @defun spam-stat-load
21829 load the hash table from a file; the filename used is stored in the
21830 variable @code{spam-stat-file}
21831
21832 @end defun
21833
21834 @defun spam-stat-score-word
21835 return the spam score for a word
21836
21837 @end defun
21838
21839 @defun spam-stat-score-buffer
21840 return the spam score for a buffer
21841
21842 @end defun
21843
21844 @defun spam-stat-split-fancy
21845 for fancy mail splitting; add the rule @samp{(: spam-stat-split-fancy)} to
21846 @code{nnmail-split-fancy}
21847
21848 This requires the following in your @file{~/.gnus} file:
21849
21850 @example
21851 (require 'spam-stat)
21852 (spam-stat-load)
21853 @end example
21854
21855 @end defun
21856
21857 Typical test will involve calls to the following functions:
21858
21859 @example
21860 Reset: (setq spam-stat (make-hash-table :test 'equal))
21861 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
21862 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
21863 Save table: (spam-stat-save)
21864 File size: (nth 7 (file-attributes spam-stat-file))
21865 Number of words: (hash-table-count spam-stat)
21866 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
21867 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
21868 Reduce table size: (spam-stat-reduce-size)
21869 Save table: (spam-stat-save)
21870 File size: (nth 7 (file-attributes spam-stat-file))
21871 Number of words: (hash-table-count spam-stat)
21872 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
21873 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
21874 @end example
21875
21876 Here is how you would create your dictionary:
21877
21878 @example
21879 Reset: (setq spam-stat (make-hash-table :test 'equal))
21880 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
21881 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
21882 Repeat for any other non-spam group you need...
21883 Reduce table size: (spam-stat-reduce-size)
21884 Save table: (spam-stat-save)
21885 @end example
21886
21887 @node Various Various
21888 @section Various Various
21889 @cindex mode lines
21890 @cindex highlights
21891
21892 @table @code
21893
21894 @item gnus-home-directory
21895 All Gnus path variables will be initialized from this variable, which
21896 defaults to @file{~/}.
21897
21898 @item gnus-directory
21899 @vindex gnus-directory
21900 Most Gnus storage path variables will be initialized from this variable,
21901 which defaults to the @samp{SAVEDIR} environment variable, or
21902 @file{~/News/} if that variable isn't set.
21903
21904 Note that gnus is mostly loaded when the @file{.gnus.el} file is read.
21905 This means that other directory variables that are initialized from this
21906 variable won't be set properly if you set this variable in
21907 @file{.gnus.el}.  Set this variable in @file{.emacs} instead.
21908
21909 @item gnus-default-directory
21910 @vindex gnus-default-directory
21911 Not related to the above variable at all---this variable says what the
21912 default directory of all Gnus buffers should be.  If you issue commands
21913 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
21914 default directory.  If this variable is @code{nil} (which is the
21915 default), the default directory will be the default directory of the
21916 buffer you were in when you started Gnus.
21917
21918 @item gnus-verbose
21919 @vindex gnus-verbose
21920 This variable is an integer between zero and ten.  The higher the value,
21921 the more messages will be displayed.  If this variable is zero, Gnus
21922 will never flash any messages, if it is seven (which is the default),
21923 most important messages will be shown, and if it is ten, Gnus won't ever
21924 shut up, but will flash so many messages it will make your head swim.
21925
21926 @item gnus-verbose-backends
21927 @vindex gnus-verbose-backends
21928 This variable works the same way as @code{gnus-verbose}, but it applies
21929 to the Gnus back ends instead of Gnus proper.
21930
21931 @item nnheader-max-head-length
21932 @vindex nnheader-max-head-length
21933 When the back ends read straight heads of articles, they all try to read
21934 as little as possible.  This variable (default 4096) specifies
21935 the absolute max length the back ends will try to read before giving up
21936 on finding a separator line between the head and the body.  If this
21937 variable is @code{nil}, there is no upper read bound.  If it is
21938 @code{t}, the back ends won't try to read the articles piece by piece,
21939 but read the entire articles.  This makes sense with some versions of
21940 @code{ange-ftp} or @code{efs}.
21941
21942 @item nnheader-head-chop-length
21943 @vindex nnheader-head-chop-length
21944 This variable (default 2048) says how big a piece of each article to
21945 read when doing the operation described above.
21946
21947 @item nnheader-file-name-translation-alist
21948 @vindex nnheader-file-name-translation-alist
21949 @cindex file names
21950 @cindex invalid characters in file names
21951 @cindex characters in file names
21952 This is an alist that says how to translate characters in file names.
21953 For instance, if @samp{:} is invalid as a file character in file names
21954 on your system (you OS/2 user you), you could say something like:
21955
21956 @lisp
21957 (setq nnheader-file-name-translation-alist
21958       '((?: . ?_)))
21959 @end lisp
21960
21961 In fact, this is the default value for this variable on OS/2 and MS
21962 Windows (phooey) systems.
21963
21964 @item gnus-hidden-properties
21965 @vindex gnus-hidden-properties
21966 This is a list of properties to use to hide ``invisible'' text.  It is
21967 @code{(invisible t intangible t)} by default on most systems, which
21968 makes invisible text invisible and intangible.
21969
21970 @item gnus-parse-headers-hook
21971 @vindex gnus-parse-headers-hook
21972 A hook called before parsing headers.  It can be used, for instance, to
21973 gather statistics on the headers fetched, or perhaps you'd like to prune
21974 some headers.  I don't see why you'd want that, though.
21975
21976 @item gnus-shell-command-separator
21977 @vindex gnus-shell-command-separator
21978 String used to separate two shell commands.  The default is @samp{;}.
21979
21980 @item gnus-invalid-group-regexp
21981 @vindex gnus-invalid-group-regexp
21982
21983 Regexp to match ``invalid'' group names when querying user for a group
21984 name.  The default value catches some @strong{really} invalid group
21985 names who could possibly mess up Gnus internally (like allowing
21986 @samp{:} in a group name, which is normally used to delimit method and
21987 group).
21988
21989 @sc{imap} users might want to allow @samp{/} in group names though.
21990
21991
21992 @end table
21993
21994 @node The End
21995 @chapter The End
21996
21997 Well, that's the manual---you can get on with your life now.  Keep in
21998 touch.  Say hello to your cats from me.
21999
22000 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
22001
22002 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
22003
22004 @quotation
22005 @strong{Te Deum}
22006
22007 @sp 1
22008 Not because of victories @*
22009 I sing,@*
22010 having none,@*
22011 but for the common sunshine,@*
22012 the breeze,@*
22013 the largess of the spring.
22014
22015 @sp 1
22016 Not for victory@*
22017 but for the day's work done@*
22018 as well as I was able;@*
22019 not for a seat upon the dais@*
22020 but at the common table.@*
22021 @end quotation
22022
22023
22024 @node Appendices
22025 @chapter Appendices
22026
22027 @menu
22028 * XEmacs::                      Requirements for installing under XEmacs.
22029 * History::                     How Gnus got where it is today.
22030 * On Writing Manuals::          Why this is not a beginner's guide.
22031 * Terminology::                 We use really difficult, like, words here.
22032 * Customization::               Tailoring Gnus to your needs.
22033 * Troubleshooting::             What you might try if things do not work.
22034 * Gnus Reference Guide::        Rilly, rilly technical stuff.
22035 * Emacs for Heathens::          A short introduction to Emacsian terms.
22036 * Frequently Asked Questions::
22037 @end menu
22038
22039
22040 @node XEmacs
22041 @section XEmacs
22042 @cindex XEmacs
22043 @cindex Installing under XEmacs
22044
22045 XEmacs is distributed as a collection of packages.  You should install
22046 whatever packages the Gnus XEmacs package requires.  The current
22047 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
22048 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
22049 @samp{xemacs-base}, and @samp{fsf-compat}.  The @samp{misc-games}
22050 package is required for Morse decoding.
22051
22052
22053 @node History
22054 @section History
22055
22056 @cindex history
22057 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
22058 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
22059
22060 If you want to investigate the person responsible for this outrage,
22061 you can point your (feh!) web browser to
22062 @uref{http://quimby.gnus.org/}.  This is also the primary
22063 distribution point for the new and spiffy versions of Gnus, and is
22064 known as The Site That Destroys Newsrcs And Drives People Mad.
22065
22066 During the first extended alpha period of development, the new Gnus was
22067 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
22068 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
22069 (Besides, the ``Gnus'' in this abbreviation should probably be
22070 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
22071 appropriate name, don't you think?)
22072
22073 In any case, after spending all that energy on coming up with a new and
22074 spunky name, we decided that the name was @emph{too} spunky, so we
22075 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
22076 ``@sc{gnus}''.  New vs. old.
22077
22078 @menu
22079 * Gnus Versions::               What Gnus versions have been released.
22080 * Other Gnus Versions::         Other Gnus versions that also have been released.
22081 * Why?::                        What's the point of Gnus?
22082 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
22083 * Conformity::                  Gnus tries to conform to all standards.
22084 * Emacsen::                     Gnus can be run on a few modern Emacsen.
22085 * Gnus Development::            How Gnus is developed.
22086 * Contributors::                Oodles of people.
22087 * New Features::                Pointers to some of the new stuff in Gnus.
22088 @end menu
22089
22090
22091 @node Gnus Versions
22092 @subsection Gnus Versions
22093 @cindex ding Gnus
22094 @cindex September Gnus
22095 @cindex Red Gnus
22096 @cindex Quassia Gnus
22097 @cindex Pterodactyl Gnus
22098 @cindex Oort Gnus
22099 @cindex No Gnus
22100
22101 The first ``proper'' release of Gnus 5 was done in November 1995 when it
22102 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
22103 plus 15 Gnus 5.0 releases).
22104
22105 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
22106 releases)) was released under the name ``Gnus 5.2'' (40 releases).
22107
22108 On July 28th 1996 work on Red Gnus was begun, and it was released on
22109 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
22110
22111 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
22112 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
22113
22114 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
22115 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
22116 1999.
22117
22118 On the 26th of October 2000, Oort Gnus was begun.
22119
22120 If you happen upon a version of Gnus that has a prefixed name --
22121 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
22122 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
22123 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
22124 run.  Walk away, calmly, until you're out of its reach.  Find a proper
22125 released version of Gnus and snuggle up to that instead.
22126
22127
22128 @node Other Gnus Versions
22129 @subsection Other Gnus Versions
22130 @cindex Semi-gnus
22131
22132 In addition to the versions of Gnus which have had their releases
22133 coordinated by Lars, one major development has been Semi-gnus from
22134 Japan.  It's based on a library called @sc{semi}, which provides
22135 @sc{mime} capabilities.
22136
22137 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
22138 Collectively, they are called ``Semi-gnus'', and different strains are
22139 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
22140 @sc{mime} and multilingualization things, especially important for
22141 Japanese users.
22142
22143
22144 @node Why?
22145 @subsection Why?
22146
22147 What's the point of Gnus?
22148
22149 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
22150 newsreader, that lets you do anything you can think of.  That was my
22151 original motivation, but while working on Gnus, it has become clear to
22152 me that this generation of newsreaders really belong in the stone age.
22153 Newsreaders haven't developed much since the infancy of the net.  If the
22154 volume continues to rise with the current rate of increase, all current
22155 newsreaders will be pretty much useless.  How do you deal with
22156 newsgroups that have thousands of new articles each day?  How do you
22157 keep track of millions of people who post?
22158
22159 Gnus offers no real solutions to these questions, but I would very much
22160 like to see Gnus being used as a testing ground for new methods of
22161 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
22162 to separate the newsreader from the back ends, Gnus now offers a simple
22163 interface for anybody who wants to write new back ends for fetching mail
22164 and news from different sources.  I have added hooks for customizations
22165 everywhere I could imagine it being useful.  By doing so, I'm inviting
22166 every one of you to explore and invent.
22167
22168 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
22169 @kbd{C-u 100 M-x all-hail-xemacs}.
22170
22171
22172 @node Compatibility
22173 @subsection Compatibility
22174
22175 @cindex compatibility
22176 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
22177 bindings have been kept.  More key bindings have been added, of course,
22178 but only in one or two obscure cases have old bindings been changed.
22179
22180 Our motto is:
22181 @quotation
22182 @cartouche
22183 @center In a cloud bones of steel.
22184 @end cartouche
22185 @end quotation
22186
22187 All commands have kept their names.  Some internal functions have changed
22188 their names.
22189
22190 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
22191 Articles}.
22192
22193 One major compatibility question is the presence of several summary
22194 buffers.  All variables relevant while reading a group are
22195 buffer-local to the summary buffer they belong in.  Although many
22196 important variables have their values copied into their global
22197 counterparts whenever a command is executed in the summary buffer, this
22198 change might lead to incorrect values being used unless you are careful.
22199
22200 All code that relies on knowledge of @sc{gnus} internals will probably
22201 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
22202 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
22203 maintains a hash table that points to the entries in this alist (which
22204 speeds up many functions), and changing the alist directly will lead to
22205 peculiar results.
22206
22207 @cindex hilit19
22208 @cindex highlighting
22209 Old hilit19 code does not work at all.  In fact, you should probably
22210 remove all hilit code from all Gnus hooks
22211 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
22212 Gnus provides various integrated functions for highlighting.  These are
22213 faster and more accurate.  To make life easier for everybody, Gnus will
22214 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
22215 Away!
22216
22217 Packages like @code{expire-kill} will no longer work.  As a matter of
22218 fact, you should probably remove all old @sc{gnus} packages (and other
22219 code) when you start using Gnus.  More likely than not, Gnus already
22220 does what you have written code to make @sc{gnus} do.  (Snicker.)
22221
22222 Even though old methods of doing things are still supported, only the
22223 new methods are documented in this manual.  If you detect a new method of
22224 doing something while reading this manual, that does not mean you have
22225 to stop doing it the old way.
22226
22227 Gnus understands all @sc{gnus} startup files.
22228
22229 @kindex M-x gnus-bug
22230 @findex gnus-bug
22231 @cindex reporting bugs
22232 @cindex bugs
22233 Overall, a casual user who hasn't written much code that depends on
22234 @sc{gnus} internals should suffer no problems.  If problems occur,
22235 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
22236
22237 @vindex gnus-bug-create-help-buffer
22238 If you are in the habit of sending bug reports @emph{very} often, you
22239 may find the helpful help buffer annoying after a while.  If so, set
22240 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
22241 up at you.
22242
22243
22244 @node Conformity
22245 @subsection Conformity
22246
22247 No rebels without a clue here, ma'am.  We conform to all standards known
22248 to (wo)man.  Except for those standards and/or conventions we disagree
22249 with, of course.
22250
22251 @table @strong
22252
22253 @item RFC (2)822
22254 @cindex RFC 822
22255 @cindex RFC 2822
22256 There are no known breaches of this standard.
22257
22258 @item RFC 1036
22259 @cindex RFC 1036
22260 There are no known breaches of this standard, either.
22261
22262 @item Son-of-RFC 1036
22263 @cindex Son-of-RFC 1036
22264 We do have some breaches to this one.
22265
22266 @table @emph
22267
22268 @item X-Newsreader
22269 @itemx User-Agent
22270 These are considered to be ``vanity headers'', while I consider them
22271 to be consumer information.  After seeing so many badly formatted
22272 articles coming from @code{tin} and @code{Netscape} I know not to use
22273 either of those for posting articles.  I would not have known that if
22274 it wasn't for the @code{X-Newsreader} header.
22275 @end table
22276
22277 @item USEFOR
22278 @cindex USEFOR
22279 USEFOR is an IETF working group writing a successor to RFC 1036, based
22280 on Son-of-RFC 1036.  They have produced a number of drafts proposing
22281 various changes to the format of news articles.  The Gnus towers will
22282 look into implementing the changes when the draft is accepted as an RFC.
22283
22284 @item MIME - RFC 2045-2049 etc
22285 @cindex MIME
22286 All the various @sc{mime} RFCs are supported.
22287
22288 @item Disposition Notifications - RFC 2298
22289 Message Mode is able to request notifications from the receiver.
22290
22291 @item PGP - RFC 1991 and RFC 2440
22292 @cindex RFC 1991
22293 @cindex RFC 2440
22294 RFC 1991 is the original PGP message specification, published as a
22295 Information RFC.  RFC 2440 was the follow-up, now called Open PGP, and
22296 put on the Standards Track.  Both document a non-@sc{mime} aware PGP
22297 format.  Gnus supports both encoding (signing and encryption) and
22298 decoding (verification and decryption).
22299
22300 @item PGP/MIME - RFC 2015/3156
22301 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
22302 1991) describes the @sc{mime}-wrapping around the RF 1991/2440 format.
22303 Gnus supports both encoding and decoding.
22304
22305 @item S/MIME - RFC 2633
22306 RFC 2633 describes the @sc{s/mime} format.
22307
22308 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
22309 RFC 1730 is @sc{imap} version 4, updated somewhat by RFC 2060 (@sc{imap} 4
22310 revision 1).  RFC 2195 describes CRAM-MD5 authentication for @sc{imap}. RFC
22311 2086 describes access control lists (ACLs) for @sc{imap}. RFC 2359
22312 describes a @sc{imap} protocol enhancement.  RFC 2595 describes the proper
22313 TLS integration (STARTTLS) with @sc{imap}.  RFC 1731 describes the
22314 GSSAPI/Kerberos4 mechanisms for @sc{imap}.
22315
22316 @end table
22317
22318 If you ever notice Gnus acting non-compliant with regards to the texts
22319 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
22320 know.
22321
22322
22323 @node Emacsen
22324 @subsection Emacsen
22325 @cindex Emacsen
22326 @cindex XEmacs
22327 @cindex Mule
22328 @cindex Emacs
22329
22330 Gnus should work on :
22331
22332 @itemize @bullet
22333
22334 @item
22335 Emacs 20.3 and up.
22336
22337 @item
22338 XEmacs 21.1.1 and up.
22339
22340 @end itemize
22341
22342 This Gnus version will absolutely not work on any Emacsen older than
22343 that.  Not reliably, at least.  Older versions of Gnus may work on older
22344 Emacs versions.  However, T-gnus does support ``Mule 2.3 based on Emacs
22345 19.34'' and possibly the versions of XEmacs prior to 21.1.1, e.g. 20.4.
22346 See the file ``README'' in the T-gnus distribution for more details.
22347
22348 There are some vague differences between Gnus on the various
22349 platforms---XEmacs features more graphics (a logo and a toolbar)---but
22350 other than that, things should look pretty much the same under all
22351 Emacsen.
22352
22353
22354 @node Gnus Development
22355 @subsection Gnus Development
22356
22357 Gnus is developed in a two-phased cycle.  The first phase involves much
22358 discussion on the @samp{ding@@gnus.org} mailing list, where people
22359 propose changes and new features, post patches and new back ends.  This
22360 phase is called the @dfn{alpha} phase, since the Gnusae released in this
22361 phase are @dfn{alpha releases}, or (perhaps more commonly in other
22362 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
22363 unstable and should not be used by casual users.  Gnus alpha releases
22364 have names like ``Red Gnus'' and ``Quassia Gnus''.
22365
22366 After futzing around for 50-100 alpha releases, Gnus is declared
22367 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
22368 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
22369 supposed to be able to use these, and these are mostly discussed on the
22370 @samp{gnu.emacs.gnus} newsgroup.
22371
22372 @cindex Incoming*
22373 @vindex mail-source-delete-incoming
22374 Some variable defaults differ between alpha Gnusae and released Gnusae.
22375 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
22376 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
22377 lossage of mail if an alpha release hiccups while handling the mail.
22378
22379 The division of discussion between the ding mailing list and the Gnus
22380 newsgroup is not purely based on publicity concerns.  It's true that
22381 having people write about the horrible things that an alpha Gnus release
22382 can do (sometimes) in a public forum may scare people off, but more
22383 importantly, talking about new experimental features that have been
22384 introduced may confuse casual users.  New features are frequently
22385 introduced, fiddled with, and judged to be found wanting, and then
22386 either discarded or totally rewritten.  People reading the mailing list
22387 usually keep up with these rapid changes, while people on the newsgroup
22388 can't be assumed to do so.
22389
22390
22391
22392 @node Contributors
22393 @subsection Contributors
22394 @cindex contributors
22395
22396 The new Gnus version couldn't have been done without the help of all the
22397 people on the (ding) mailing list.  Every day for over a year I have
22398 gotten billions of nice bug reports from them, filling me with joy,
22399 every single one of them.  Smooches.  The people on the list have been
22400 tried beyond endurance, what with my ``oh, that's a neat idea <type
22401 type>, yup, I'll release it right away <ship off> no wait, that doesn't
22402 work at all <type type>, yup, I'll ship that one off right away <ship
22403 off> no, wait, that absolutely does not work'' policy for releases.
22404 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
22405 ``worser''? ``much worser''?  ``worsest''?)
22406
22407 I would like to take this opportunity to thank the Academy for...  oops,
22408 wrong show.
22409
22410 @itemize @bullet
22411
22412 @item
22413 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
22414
22415 @item
22416 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
22417 nnwarchive and many, many other things connected with @sc{mime} and
22418 other types of en/decoding, as well as general bug fixing, new
22419 functionality and stuff.
22420
22421 @item
22422 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
22423 well as numerous other things).
22424
22425 @item
22426 Luis Fernandes---design and graphics.
22427
22428 @item
22429 Joe Reiss---creator of the smiley faces.
22430
22431 @item
22432 Justin Sheehy--the FAQ maintainer.
22433
22434 @item
22435 Erik Naggum---help, ideas, support, code and stuff.
22436
22437 @item
22438 Wes Hardaker---@file{gnus-picon.el} and the manual section on
22439 @dfn{picons} (@pxref{Picons}).
22440
22441 @item
22442 Kim-Minh Kaplan---further work on the picon code.
22443
22444 @item
22445 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
22446 (@pxref{GroupLens}).
22447
22448 @item
22449 Sudish Joseph---innumerable bug fixes.
22450
22451 @item
22452 Ilja Weis---@file{gnus-topic.el}.
22453
22454 @item
22455 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
22456
22457 @item
22458 Vladimir Alexiev---the refcard and reference booklets.
22459
22460 @item
22461 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
22462 distribution by Felix Lee and JWZ.
22463
22464 @item
22465 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
22466
22467 @item
22468 Peter Mutsaers---orphan article scoring code.
22469
22470 @item
22471 Ken Raeburn---POP mail support.
22472
22473 @item
22474 Hallvard B Furuseth---various bits and pieces, especially dealing with
22475 .newsrc files.
22476
22477 @item
22478 Brian Edmonds---@file{gnus-bbdb.el}.
22479
22480 @item
22481 David Moore---rewrite of @file{nnvirtual.el} and many other things.
22482
22483 @item
22484 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
22485
22486 @item
22487 François Pinard---many, many interesting and thorough bug reports, as
22488 well as autoconf support.
22489
22490 @end itemize
22491
22492 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
22493 Borges, and Jost Krieger proof-reading parts of the manual.
22494
22495 The following people have contributed many patches and suggestions:
22496
22497 Christopher Davis,
22498 Andrew Eskilsson,
22499 Kai Grossjohann,
22500 David KÃ¥gedal,
22501 Richard Pieri,
22502 Fabrice Popineau,
22503 Daniel Quinlan,
22504 Jason L. Tibbitts, III,
22505 and
22506 Jack Vinson.
22507
22508 Also thanks to the following for patches and stuff:
22509
22510 Jari Aalto,
22511 Adrian Aichner,
22512 Vladimir Alexiev,
22513 Russ Allbery,
22514 Peter Arius,
22515 Matt Armstrong,
22516 Marc Auslander,
22517 Miles Bader,
22518 Alexei V. Barantsev,
22519 Frank Bennett,
22520 Robert Bihlmeyer,
22521 Chris Bone,
22522 Mark Borges,
22523 Mark Boyns,
22524 Lance A. Brown,
22525 Rob Browning,
22526 Kees de Bruin,
22527 Martin Buchholz,
22528 Joe Buehler,
22529 Kevin Buhr,
22530 Alastair Burt,
22531 Joao Cachopo,
22532 Zlatko Calusic,
22533 Massimo Campostrini,
22534 Castor,
22535 David Charlap,
22536 Dan Christensen,
22537 Kevin Christian,
22538 Jae-you Chung, @c ?
22539 James H. Cloos, Jr.,
22540 Laura Conrad,
22541 Michael R. Cook,
22542 Glenn Coombs,
22543 Andrew J. Cosgriff,
22544 Neil Crellin,
22545 Frank D. Cringle,
22546 Geoffrey T. Dairiki,
22547 Andre Deparade,
22548 Ulrik Dickow,
22549 Dave Disser,
22550 Rui-Tao Dong, @c ?
22551 Joev Dubach,
22552 Michael Welsh Duggan,
22553 Dave Edmondson,
22554 Paul Eggert,
22555 Mark W. Eichin,
22556 Karl Eichwalder,
22557 Enami Tsugutomo, @c Enami
22558 Michael Ernst,
22559 Luc Van Eycken,
22560 Sam Falkner,
22561 Nelson Jose dos Santos Ferreira,
22562 Sigbjorn Finne,
22563 Sven Fischer,
22564 Paul Fisher,
22565 Decklin Foster,
22566 Gary D. Foster,
22567 Paul Franklin,
22568 Guy Geens,
22569 Arne Georg Gleditsch,
22570 David S. Goldberg,
22571 Michelangelo Grigni,
22572 Dale Hagglund,
22573 D. Hall,
22574 Magnus Hammerin,
22575 Kenichi Handa, @c Handa
22576 Raja R. Harinath,
22577 Yoshiki Hayashi, @c ?
22578 P. E. Jareth Hein,
22579 Hisashige Kenji, @c Hisashige
22580 Scott Hofmann,
22581 Marc Horowitz,
22582 Gunnar Horrigmo,
22583 Richard Hoskins,
22584 Brad Howes,
22585 Miguel de Icaza,
22586 François Felix Ingrand,
22587 Tatsuya Ichikawa, @c ?
22588 Ishikawa Ichiro, @c Ishikawa
22589 Lee Iverson,
22590 Iwamuro Motonori, @c Iwamuro
22591 Rajappa Iyer,
22592 Andreas Jaeger,
22593 Adam P. Jenkins,
22594 Randell Jesup,
22595 Fred Johansen,
22596 Gareth Jones,
22597 Simon Josefsson,
22598 Greg Klanderman,
22599 Karl Kleinpaste,
22600 Michael Klingbeil,
22601 Peter Skov Knudsen,
22602 Shuhei Kobayashi, @c Kobayashi
22603 Petr Konecny,
22604 Koseki Yoshinori, @c Koseki
22605 Thor Kristoffersen,
22606 Jens Lautenbacher,
22607 Martin Larose,
22608 Seokchan Lee, @c Lee
22609 Joerg Lenneis,
22610 Carsten Leonhardt,
22611 James LewisMoss,
22612 Christian Limpach,
22613 Markus Linnala,
22614 Dave Love,
22615 Mike McEwan,
22616 Tonny Madsen,
22617 Shlomo Mahlab,
22618 Nat Makarevitch,
22619 Istvan Marko,
22620 David Martin,
22621 Jason R. Mastaler,
22622 Gordon Matzigkeit,
22623 Timo Metzemakers,
22624 Richard Mlynarik,
22625 Lantz Moore,
22626 Morioka Tomohiko, @c Morioka
22627 Erik Toubro Nielsen,
22628 Hrvoje Niksic,
22629 Andy Norman,
22630 Fred Oberhauser,
22631 C. R. Oldham,
22632 Alexandre Oliva,
22633 Ken Olstad,
22634 Masaharu Onishi, @c Onishi
22635 Hideki Ono, @c Ono
22636 Ettore Perazzoli,
22637 William Perry,
22638 Stephen Peters,
22639 Jens-Ulrik Holger Petersen,
22640 Ulrich Pfeifer,
22641 Matt Pharr,
22642 Andy Piper,
22643 John McClary Prevost,
22644 Bill Pringlemeir,
22645 Mike Pullen,
22646 Jim Radford,
22647 Colin Rafferty,
22648 Lasse Rasinen,
22649 Lars Balker Rasmussen,
22650 Joe Reiss,
22651 Renaud Rioboo,
22652 Roland B. Roberts,
22653 Bart Robinson,
22654 Christian von Roques,
22655 Markus Rost,
22656 Jason Rumney,
22657 Wolfgang Rupprecht,
22658 Jay Sachs,
22659 Dewey M. Sasser,
22660 Conrad Sauerwald,
22661 Loren Schall,
22662 Dan Schmidt,
22663 Ralph Schleicher,
22664 Philippe Schnoebelen,
22665 Andreas Schwab,
22666 Randal L. Schwartz,
22667 Danny Siu,
22668 Matt Simmons,
22669 Paul D. Smith,
22670 Jeff Sparkes,
22671 Toby Speight,
22672 Michael Sperber,
22673 Darren Stalder,
22674 Richard Stallman,
22675 Greg Stark,
22676 Sam Steingold,
22677 Paul Stevenson,
22678 Jonas Steverud,
22679 Paul Stodghill,
22680 Kiyokazu Suto, @c Suto
22681 Kurt Swanson,
22682 Samuel Tardieu,
22683 Teddy,
22684 Chuck Thompson,
22685 Tozawa Akihiko, @c Tozawa
22686 Philippe Troin,
22687 James Troup,
22688 Trung Tran-Duc,
22689 Jack Twilley,
22690 Aaron M. Ucko,
22691 Aki Vehtari,
22692 Didier Verna,
22693 Vladimir Volovich,
22694 Jan Vroonhof,
22695 Stefan Waldherr,
22696 Pete Ware,
22697 Barry A. Warsaw,
22698 Christoph Wedler,
22699 Joe Wells,
22700 Lee Willis,
22701 Katsumi Yamaoka @c Yamaoka
22702 and
22703 Lloyd Zusman.
22704
22705
22706 For a full overview of what each person has done, the ChangeLogs
22707 included in the Gnus alpha distributions should give ample reading
22708 (550kB and counting).
22709
22710 Apologies to everybody that I've forgotten, of which there are many, I'm
22711 sure.
22712
22713 Gee, that's quite a list of people.  I guess that must mean that there
22714 actually are people who are using Gnus.  Who'd'a thunk it!
22715
22716
22717 @node New Features
22718 @subsection New Features
22719 @cindex new features
22720
22721 @menu
22722 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
22723 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
22724 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
22725 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
22726 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
22727 @end menu
22728
22729 These lists are, of course, just @emph{short} overviews of the
22730 @emph{most} important new features.  No, really.  There are tons more.
22731 Yes, we have feeping creaturism in full effect.
22732
22733 @node ding Gnus
22734 @subsubsection (ding) Gnus
22735
22736 New features in Gnus 5.0/5.1:
22737
22738 @itemize @bullet
22739
22740 @item
22741 The look of all buffers can be changed by setting format-like variables
22742 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
22743
22744 @item
22745 Local spool and several @sc{nntp} servers can be used at once
22746 (@pxref{Select Methods}).
22747
22748 @item
22749 You can combine groups into virtual groups (@pxref{Virtual Groups}).
22750
22751 @item
22752 You can read a number of different mail formats (@pxref{Getting Mail}).
22753 All the mail back ends implement a convenient mail expiry scheme
22754 (@pxref{Expiring Mail}).
22755
22756 @item
22757 Gnus can use various strategies for gathering threads that have lost
22758 their roots (thereby gathering loose sub-threads into one thread) or it
22759 can go back and retrieve enough headers to build a complete thread
22760 (@pxref{Customizing Threading}).
22761
22762 @item
22763 Killed groups can be displayed in the group buffer, and you can read
22764 them as well (@pxref{Listing Groups}).
22765
22766 @item
22767 Gnus can do partial group updates---you do not have to retrieve the
22768 entire active file just to check for new articles in a few groups
22769 (@pxref{The Active File}).
22770
22771 @item
22772 Gnus implements a sliding scale of subscribedness to groups
22773 (@pxref{Group Levels}).
22774
22775 @item
22776 You can score articles according to any number of criteria
22777 (@pxref{Scoring}).  You can even get Gnus to find out how to score
22778 articles for you (@pxref{Adaptive Scoring}).
22779
22780 @item
22781 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
22782 manner, so it should be difficult to lose much data on what you have
22783 read if your machine should go down (@pxref{Auto Save}).
22784
22785 @item
22786 Gnus now has its own startup file (@file{.gnus}) to avoid cluttering up
22787 the @file{.emacs} file.
22788
22789 @item
22790 You can set the process mark on both groups and articles and perform
22791 operations on all the marked items (@pxref{Process/Prefix}).
22792
22793 @item
22794 You can grep through a subset of groups and create a group from the
22795 results (@pxref{Kibozed Groups}).
22796
22797 @item
22798 You can list subsets of groups according to, well, anything
22799 (@pxref{Listing Groups}).
22800
22801 @item
22802 You can browse foreign servers and subscribe to groups from those
22803 servers (@pxref{Browse Foreign Server}).
22804
22805 @item
22806 Gnus can fetch articles, asynchronously, on a second connection to the
22807 server (@pxref{Asynchronous Fetching}).
22808
22809 @item
22810 You can cache articles locally (@pxref{Article Caching}).
22811
22812 @item
22813 The uudecode functions have been expanded and generalized
22814 (@pxref{Decoding Articles}).
22815
22816 @item
22817 You can still post uuencoded articles, which was a little-known feature
22818 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
22819
22820 @item
22821 Fetching parents (and other articles) now actually works without
22822 glitches (@pxref{Finding the Parent}).
22823
22824 @item
22825 Gnus can fetch FAQs and group descriptions (@pxref{Group Information}).
22826
22827 @item
22828 Digests (and other files) can be used as the basis for groups
22829 (@pxref{Document Groups}).
22830
22831 @item
22832 Articles can be highlighted and customized (@pxref{Customizing
22833 Articles}).
22834
22835 @item
22836 URLs and other external references can be buttonized (@pxref{Article
22837 Buttons}).
22838
22839 @item
22840 You can do lots of strange stuff with the Gnus window & frame
22841 configuration (@pxref{Window Layout}).
22842
22843 @item
22844 You can click on buttons instead of using the keyboard
22845 (@pxref{Buttons}).
22846
22847 @end itemize
22848
22849
22850 @node September Gnus
22851 @subsubsection September Gnus
22852
22853 @iftex
22854 @iflatex
22855 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
22856 @end iflatex
22857 @end iftex
22858
22859 New features in Gnus 5.2/5.3:
22860
22861 @itemize @bullet
22862
22863 @item
22864 A new message composition mode is used.  All old customization variables
22865 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
22866 now obsolete.
22867
22868 @item
22869 Gnus is now able to generate @dfn{sparse} threads---threads where
22870 missing articles are represented by empty nodes (@pxref{Customizing
22871 Threading}).
22872
22873 @lisp
22874 (setq gnus-build-sparse-threads 'some)
22875 @end lisp
22876
22877 @item
22878 Outgoing articles are stored on a special archive server
22879 (@pxref{Archived Messages}).
22880
22881 @item
22882 Partial thread regeneration now happens when articles are
22883 referred.
22884
22885 @item
22886 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
22887
22888 @item
22889 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
22890
22891 @item
22892 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
22893
22894 @lisp
22895 (setq gnus-use-trees t)
22896 @end lisp
22897
22898 @item
22899 An @code{nn}-like pick-and-read minor mode is available for the summary
22900 buffers (@pxref{Pick and Read}).
22901
22902 @lisp
22903 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
22904 @end lisp
22905
22906 @item
22907 In binary groups you can use a special binary minor mode (@pxref{Binary
22908 Groups}).
22909
22910 @item
22911 Groups can be grouped in a folding topic hierarchy (@pxref{Group
22912 Topics}).
22913
22914 @lisp
22915 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
22916 @end lisp
22917
22918 @item
22919 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
22920
22921 @item
22922 Groups can now have a score, and bubbling based on entry frequency
22923 is possible (@pxref{Group Score}).
22924
22925 @lisp
22926 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
22927 @end lisp
22928
22929 @item
22930 Groups can be process-marked, and commands can be performed on
22931 groups of groups (@pxref{Marking Groups}).
22932
22933 @item
22934 Caching is possible in virtual groups.
22935
22936 @item
22937 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
22938 news batches, ClariNet briefs collections, and just about everything
22939 else (@pxref{Document Groups}).
22940
22941 @item
22942 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
22943 (@pxref{SOUP}).
22944
22945 @item
22946 The Gnus cache is much faster.
22947
22948 @item
22949 Groups can be sorted according to many criteria (@pxref{Sorting
22950 Groups}).
22951
22952 @item
22953 New group parameters have been introduced to set list-addresses and
22954 expiry times (@pxref{Group Parameters}).
22955
22956 @item
22957 All formatting specs allow specifying faces to be used
22958 (@pxref{Formatting Fonts}).
22959
22960 @item
22961 There are several more commands for setting/removing/acting on process
22962 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
22963
22964 @item
22965 The summary buffer can be limited to show parts of the available
22966 articles based on a wide range of criteria.  These commands have been
22967 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
22968
22969 @item
22970 Articles can be made persistent with the @kbd{*} command
22971 (@pxref{Persistent Articles}).
22972
22973 @item
22974 All functions for hiding article elements are now toggles.
22975
22976 @item
22977 Article headers can be buttonized (@pxref{Article Washing}).
22978
22979 @item
22980 All mail back ends support fetching articles by @code{Message-ID}.
22981
22982 @item
22983 Duplicate mail can now be treated properly (@pxref{Duplicates}).
22984
22985 @item
22986 All summary mode commands are available directly from the article
22987 buffer (@pxref{Article Keymap}).
22988
22989 @item
22990 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
22991 Layout}).
22992
22993 @item
22994 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
22995 @iftex
22996 @iflatex
22997 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
22998 @end iflatex
22999 @end iftex
23000
23001 @item
23002 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
23003
23004 @lisp
23005 (setq gnus-use-nocem t)
23006 @end lisp
23007
23008 @item
23009 Groups can be made permanently visible (@pxref{Listing Groups}).
23010
23011 @lisp
23012 (setq gnus-permanently-visible-groups "^nnml:")
23013 @end lisp
23014
23015 @item
23016 Many new hooks have been introduced to make customizing easier.
23017
23018 @item
23019 Gnus respects the @code{Mail-Copies-To} header.
23020
23021 @item
23022 Threads can be gathered by looking at the @code{References} header
23023 (@pxref{Customizing Threading}).
23024
23025 @lisp
23026 (setq gnus-summary-thread-gathering-function
23027       'gnus-gather-threads-by-references)
23028 @end lisp
23029
23030 @item
23031 Read articles can be stored in a special backlog buffer to avoid
23032 refetching (@pxref{Article Backlog}).
23033
23034 @lisp
23035 (setq gnus-keep-backlog 50)
23036 @end lisp
23037
23038 @item
23039 A clean copy of the current article is always stored in a separate
23040 buffer to allow easier treatment.
23041
23042 @item
23043 Gnus can suggest where to save articles (@pxref{Saving Articles}).
23044
23045 @item
23046 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
23047 Articles}).
23048
23049 @lisp
23050 (setq gnus-prompt-before-saving t)
23051 @end lisp
23052
23053 @item
23054 @code{gnus-uu} can view decoded files asynchronously while fetching
23055 articles (@pxref{Other Decode Variables}).
23056
23057 @lisp
23058 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
23059 @end lisp
23060
23061 @item
23062 Filling in the article buffer now works properly on cited text
23063 (@pxref{Article Washing}).
23064
23065 @item
23066 Hiding cited text adds buttons to toggle hiding, and how much
23067 cited text to hide is now customizable (@pxref{Article Hiding}).
23068
23069 @lisp
23070 (setq gnus-cited-lines-visible 2)
23071 @end lisp
23072
23073 @item
23074 Boring headers can be hidden (@pxref{Article Hiding}).
23075
23076 @item
23077 Default scoring values can now be set from the menu bar.
23078
23079 @item
23080 Further syntax checking of outgoing articles have been added.
23081
23082 @end itemize
23083
23084
23085 @node Red Gnus
23086 @subsubsection Red Gnus
23087
23088 New features in Gnus 5.4/5.5:
23089
23090 @iftex
23091 @iflatex
23092 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
23093 @end iflatex
23094 @end iftex
23095
23096 @itemize @bullet
23097
23098 @item
23099 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
23100
23101 @item
23102 Article prefetching functionality has been moved up into
23103 Gnus (@pxref{Asynchronous Fetching}).
23104
23105 @item
23106 Scoring can now be performed with logical operators like @code{and},
23107 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
23108 Scoring}).
23109
23110 @item
23111 Article washing status can be displayed in the
23112 article mode line (@pxref{Misc Article}).
23113
23114 @item
23115 @file{gnus.el} has been split into many smaller files.
23116
23117 @item
23118 Suppression of duplicate articles based on Message-ID can be done
23119 (@pxref{Duplicate Suppression}).
23120
23121 @lisp
23122 (setq gnus-suppress-duplicates t)
23123 @end lisp
23124
23125 @item
23126 New variables for specifying what score and adapt files are to be
23127 considered home score and adapt files (@pxref{Home Score File}) have
23128 been added.
23129
23130 @item
23131 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
23132 Server Internals}).
23133
23134 @item
23135 Groups can inherit group parameters from parent topics (@pxref{Topic
23136 Parameters}).
23137
23138 @item
23139 Article editing has been revamped and is now actually usable.
23140
23141 @item
23142 Signatures can be recognized in more intelligent fashions
23143 (@pxref{Article Signature}).
23144
23145 @item
23146 Summary pick mode has been made to look more @code{nn}-like.  Line
23147 numbers are displayed and the @kbd{.} command can be used to pick
23148 articles (@code{Pick and Read}).
23149
23150 @item
23151 Commands for moving the @file{.newsrc.eld} from one server to
23152 another have been added (@pxref{Changing Servers}).
23153
23154 @item
23155 There's a way now to specify that ``uninteresting'' fields be suppressed
23156 when generating lines in buffers (@pxref{Advanced Formatting}).
23157
23158 @item
23159 Several commands in the group buffer can be undone with @kbd{C-M-_}
23160 (@pxref{Undo}).
23161
23162 @item
23163 Scoring can be done on words using the new score type @code{w}
23164 (@pxref{Score File Format}).
23165
23166 @item
23167 Adaptive scoring can be done on a Subject word-by-word basis
23168 (@pxref{Adaptive Scoring}).
23169
23170 @lisp
23171 (setq gnus-use-adaptive-scoring '(word))
23172 @end lisp
23173
23174 @item
23175 Scores can be decayed (@pxref{Score Decays}).
23176
23177 @lisp
23178 (setq gnus-decay-scores t)
23179 @end lisp
23180
23181 @item
23182 Scoring can be performed using a regexp on the Date header.  The Date is
23183 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
23184
23185 @item
23186 A new command has been added to remove all data on articles from
23187 the native server (@pxref{Changing Servers}).
23188
23189 @item
23190 A new command for reading collections of documents
23191 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
23192 (@pxref{Really Various Summary Commands}).
23193
23194 @item
23195 Process mark sets can be pushed and popped (@pxref{Setting Process
23196 Marks}).
23197
23198 @item
23199 A new mail-to-news back end makes it possible to post even when the @sc{nntp}
23200 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
23201
23202 @item
23203 A new back end for reading searches from Web search engines
23204 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
23205 (@pxref{Web Searches}).
23206
23207 @item
23208 Groups inside topics can now be sorted using the standard sorting
23209 functions, and each topic can be sorted independently (@pxref{Topic
23210 Sorting}).
23211
23212 @item
23213 Subsets of the groups can be sorted independently (@code{Sorting
23214 Groups}).
23215
23216 @item
23217 Cached articles can be pulled into the groups (@pxref{Summary Generation
23218 Commands}).
23219 @iftex
23220 @iflatex
23221 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
23222 @end iflatex
23223 @end iftex
23224
23225 @item
23226 Score files are now applied in a more reliable order (@pxref{Score
23227 Variables}).
23228
23229 @item
23230 Reports on where mail messages end up can be generated (@pxref{Splitting
23231 Mail}).
23232
23233 @item
23234 More hooks and functions have been added to remove junk from incoming
23235 mail before saving the mail (@pxref{Washing Mail}).
23236
23237 @item
23238 Emphasized text can be properly fontisized:
23239
23240 @end itemize
23241
23242
23243 @node Quassia Gnus
23244 @subsubsection Quassia Gnus
23245
23246 New features in Gnus 5.6:
23247
23248 @itemize @bullet
23249
23250 @item
23251 New functionality for using Gnus as an offline newsreader has been
23252 added.  A plethora of new commands and modes have been added.  See
23253 @pxref{Gnus Unplugged} for the full story.
23254
23255 @item
23256  The @code{nndraft} back end has returned, but works differently than
23257 before.  All Message buffers are now also articles in the @code{nndraft}
23258 group, which is created automatically.
23259
23260 @item
23261 @code{gnus-alter-header-function} can now be used to alter header
23262 values.
23263
23264 @item
23265  @code{gnus-summary-goto-article} now accept Message-ID's.
23266
23267 @item
23268  A new Message command for deleting text in the body of a message
23269 outside the region: @kbd{C-c C-v}.
23270
23271 @item
23272  You can now post to component group in @code{nnvirtual} groups with
23273 @kbd{C-u C-c C-c}.
23274
23275 @item
23276  @code{nntp-rlogin-program}---new variable to ease customization.
23277
23278 @item
23279  @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
23280 re-highlighting of the article buffer.
23281
23282 @item
23283  New element in @code{gnus-boring-article-headers}---@code{long-to}.
23284
23285 @item
23286  @kbd{M-i} symbolic prefix command.  See the section "Symbolic
23287 Prefixes" in the Gnus manual for details.
23288
23289 @item
23290  @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
23291 @kbd{a} to add the score rule to the "all.SCORE" file.
23292
23293 @item
23294  @code{gnus-simplify-subject-functions} variable to allow greater
23295 control over simplification.
23296
23297 @item
23298  @kbd{A T}---new command for fetching the current thread.
23299
23300 @item
23301  @kbd{/ T}---new command for including the current thread in the
23302 limit.
23303
23304 @item
23305  @kbd{M-RET} is a new Message command for breaking cited text.
23306
23307 @item
23308  @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
23309
23310 @item
23311  The @code{custom-face-lookup} function has been removed.
23312 If you used this function in your initialization files, you must
23313 rewrite them to use @code{face-spec-set} instead.
23314
23315 @item
23316  Canceling now uses the current select method.  Symbolic prefix
23317 @kbd{a} forces normal posting method.
23318
23319 @item
23320  New command to translate M******** sm*rtq**t*s into proper
23321 text---@kbd{W d}.
23322
23323 @item
23324  For easier debugging of @code{nntp}, you can set
23325 @code{nntp-record-commands} to a non-@code{nil} value.
23326
23327 @item
23328  @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
23329 controlling where and how to send @sc{authinfo} to @sc{nntp} servers.
23330
23331 @item
23332  A command for editing group parameters from the summary buffer
23333 has been added.
23334
23335 @item
23336  A history of where mails have been split is available.
23337
23338 @item
23339  A new article date command has been added---@code{article-date-iso8601}.
23340
23341 @item
23342  Subjects can be simplified when threading by setting
23343 @code{gnus-score-thread-simplify}.
23344
23345 @item
23346  A new function for citing in Message has been
23347 added---@code{message-cite-original-without-signature}.
23348
23349 @item
23350  @code{article-strip-all-blank-lines}---new article command.
23351
23352 @item
23353  A new Message command to kill to the end of the article has
23354 been added.
23355
23356 @item
23357  A minimum adaptive score can be specified by using the
23358 @code{gnus-adaptive-word-minimum} variable.
23359
23360 @item
23361  The "lapsed date" article header can be kept continually
23362 updated by the @code{gnus-start-date-timer} command.
23363
23364 @item
23365  Web listserv archives can be read with the @code{nnlistserv} back end.
23366
23367 @item
23368  Old dejanews archives can now be read by @code{nnweb}.
23369
23370 @end itemize
23371
23372 @node Pterodactyl Gnus
23373 @subsubsection Pterodactyl Gnus
23374
23375 New features in Gnus 5.8:
23376
23377 @itemize @bullet
23378
23379 @item
23380 The mail-fetching functions have changed.  See the manual for the
23381 many details.  In particular, all procmail fetching variables are gone.
23382
23383 If you used procmail like in
23384
23385 @lisp
23386 (setq nnmail-use-procmail t)
23387 (setq nnmail-spool-file 'procmail)
23388 (setq nnmail-procmail-directory "~/mail/incoming/")
23389 (setq nnmail-procmail-suffix "\\.in")
23390 @end lisp
23391
23392 this now has changed to
23393
23394 @lisp
23395 (setq mail-sources
23396       '((directory :path "~/mail/incoming/"
23397                    :suffix ".in")))
23398 @end lisp
23399
23400 More information is available in the info doc at Select Methods ->
23401 Getting Mail -> Mail Sources
23402
23403 @item
23404 Gnus is now a @sc{mime}-capable reader.  This affects many parts of
23405 Gnus, and adds a slew of new commands.  See the manual for details.
23406
23407 @item
23408 Gnus has also been multilingualized.  This also affects too
23409 many parts of Gnus to summarize here, and adds many new variables.
23410
23411 @item
23412 @code{gnus-auto-select-first} can now be a function to be
23413 called to position point.
23414
23415 @item
23416 The user can now decide which extra headers should be included in
23417 summary buffers and @sc{nov} files.
23418
23419 @item
23420 @code{gnus-article-display-hook} has been removed.  Instead, a number
23421 of variables starting with @code{gnus-treat-} have been added.
23422
23423 @item
23424 The Gnus posting styles have been redone again and now works in a
23425 subtly different manner.
23426
23427 @item
23428 New web-based back ends have been added: @code{nnslashdot},
23429 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
23430 again, to keep up with ever-changing layouts.
23431
23432 @item
23433 Gnus can now read @sc{imap} mail via @code{nnimap}.
23434
23435 @end itemize
23436
23437 @iftex
23438
23439 @page
23440 @node The Manual
23441 @section The Manual
23442 @cindex colophon
23443 @cindex manual
23444
23445 This manual was generated from a TeXinfo file and then run through
23446 either @code{texi2dvi}
23447 @iflatex
23448 or my own home-brewed TeXinfo to \LaTeX\ transformer,
23449 and then run through @code{latex} and @code{dvips}
23450 @end iflatex
23451 to get what you hold in your hands now.
23452
23453 The following conventions have been used:
23454
23455 @enumerate
23456
23457 @item
23458 This is a @samp{string}
23459
23460 @item
23461 This is a @kbd{keystroke}
23462
23463 @item
23464 This is a @file{file}
23465
23466 @item
23467 This is a @code{symbol}
23468
23469 @end enumerate
23470
23471 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
23472 mean:
23473
23474 @lisp
23475 (setq flargnoze "yes")
23476 @end lisp
23477
23478 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
23479
23480 @lisp
23481 (setq flumphel 'yes)
23482 @end lisp
23483
23484 @samp{yes} and @code{yes} are two @emph{very} different things---don't
23485 ever get them confused.
23486
23487 @iflatex
23488 @c @head
23489 Of course, everything in this manual is of vital interest, so you should
23490 read it all.  Several times.  However, if you feel like skimming the
23491 manual, look for that gnu head you should see in the margin over
23492 there---it means that what's being discussed is of more importance than
23493 the rest of the stuff.  (On the other hand, if everything is infinitely
23494 important, how can anything be more important than that?  Just one more
23495 of the mysteries of this world, I guess.)
23496 @end iflatex
23497
23498 @end iftex
23499
23500
23501 @node On Writing Manuals
23502 @section On Writing Manuals
23503
23504 I guess most manuals are written after-the-fact; documenting a program
23505 that's already there.  This is not how this manual is written.  When
23506 implementing something, I write the manual entry for that something
23507 straight away.  I then see that it's difficult to explain the
23508 functionality, so I write how it's supposed to be, and then I change the
23509 implementation.  Writing the documentation and writing the code goes
23510 hand in hand.
23511
23512 This, of course, means that this manual has no, or little, flow.  It
23513 documents absolutely everything in Gnus, but often not where you're
23514 looking for it.  It is a reference manual, and not a guide to how to get
23515 started with Gnus.
23516
23517 That would be a totally different book, that should be written using the
23518 reference manual as source material.  It would look quite differently.
23519
23520
23521 @page
23522 @node Terminology
23523 @section Terminology
23524
23525 @cindex terminology
23526 @table @dfn
23527
23528 @item news
23529 @cindex news
23530 This is what you are supposed to use this thing for---reading news.
23531 News is generally fetched from a nearby @sc{nntp} server, and is
23532 generally publicly available to everybody.  If you post news, the entire
23533 world is likely to read just what you have written, and they'll all
23534 snigger mischievously.  Behind your back.
23535
23536 @item mail
23537 @cindex mail
23538 Everything that's delivered to you personally is mail.  Some news/mail
23539 readers (like Gnus) blur the distinction between mail and news, but
23540 there is a difference.  Mail is private.  News is public.  Mailing is
23541 not posting, and replying is not following up.
23542
23543 @item reply
23544 @cindex reply
23545 Send a mail to the person who has written what you are reading.
23546
23547 @item follow up
23548 @cindex follow up
23549 Post an article to the current newsgroup responding to the article you
23550 are reading.
23551
23552 @item back end
23553 @cindex back end
23554 Gnus considers mail and news to be mostly the same, really.  The only
23555 difference is how to access the actual articles.  News articles are
23556 commonly fetched via the protocol NNTP, whereas mail messages could be
23557 read from a file on the local disk.  The internal architecture of Gnus
23558 thus comprises a `front end' and a number of `back ends'.  Internally,
23559 when you enter a group (by hitting @key{RET}, say), you thereby invoke
23560 a function in the front end in Gnus.  The front end then `talks' to a
23561 back end and says things like ``Give me the list of articles in the foo
23562 group'' or ``Show me article number 4711''.
23563
23564 So a back end mainly defines either a protocol (the @code{nntp} back end
23565 accesses news via NNTP, the @code{nnimap} back end accesses mail via
23566 IMAP) or a file format and directory layout (the @code{nnspool} back end
23567 accesses news via the common `spool directory' format, the @code{nnml}
23568 back end access mail via a file format and directory layout that's
23569 quite similar).
23570
23571 Gnus does not handle the underlying media, so to speak---this is all
23572 done by the back ends.  A back end is a collection of functions to
23573 access the articles.
23574
23575 However, sometimes the term `back end' is also used where `server'
23576 would have been more appropriate.  And then there is the term `select
23577 method' which can mean either.  The Gnus terminology can be quite
23578 confusing.
23579
23580 @item native
23581 @cindex native
23582 Gnus will always use one method (and back end) as the @dfn{native}, or
23583 default, way of getting news.
23584
23585 @item foreign
23586 @cindex foreign
23587 You can also have any number of foreign groups active at the same time.
23588 These are groups that use non-native non-secondary back ends for getting
23589 news.
23590
23591 @item secondary
23592 @cindex secondary
23593 Secondary back ends are somewhere half-way between being native and being
23594 foreign, but they mostly act like they are native.
23595
23596 @item article
23597 @cindex article
23598 A message that has been posted as news.
23599
23600 @item mail message
23601 @cindex mail message
23602 A message that has been mailed.
23603
23604 @item message
23605 @cindex message
23606 A mail message or news article
23607
23608 @item head
23609 @cindex head
23610 The top part of a message, where administrative information (etc.) is
23611 put.
23612
23613 @item body
23614 @cindex body
23615 The rest of an article.  Everything not in the head is in the
23616 body.
23617
23618 @item header
23619 @cindex header
23620 A line from the head of an article.
23621
23622 @item headers
23623 @cindex headers
23624 A collection of such lines, or a collection of heads.  Or even a
23625 collection of @sc{nov} lines.
23626
23627 @item @sc{nov}
23628 @cindex nov
23629 When Gnus enters a group, it asks the back end for the headers of all
23630 unread articles in the group.  Most servers support the News OverView
23631 format, which is more compact and much faster to read and parse than the
23632 normal @sc{head} format.
23633
23634 @item level
23635 @cindex levels
23636 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
23637 that have a lower level are ``more'' subscribed than the groups with a
23638 higher level.  In fact, groups on levels 1-5 are considered
23639 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
23640 are @dfn{killed}.  Commands for listing groups and scanning for new
23641 articles will all use the numeric prefix as @dfn{working level}.
23642
23643 @item killed groups
23644 @cindex killed groups
23645 No information on killed groups is stored or updated, which makes killed
23646 groups much easier to handle than subscribed groups.
23647
23648 @item zombie groups
23649 @cindex zombie groups
23650 Just like killed groups, only slightly less dead.
23651
23652 @item active file
23653 @cindex active file
23654 The news server has to keep track of what articles it carries, and what
23655 groups exist.  All this information in stored in the active file, which
23656 is rather large, as you might surmise.
23657
23658 @item bogus groups
23659 @cindex bogus groups
23660 A group that exists in the @file{.newsrc} file, but isn't known to the
23661 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
23662 This means that the group probably doesn't exist (any more).
23663
23664 @item activating
23665 @cindex activating groups
23666 The act of asking the server for info on a group and computing the
23667 number of unread articles is called @dfn{activating the group}.
23668 Un-activated groups are listed with @samp{*} in the group buffer.
23669
23670 @item server
23671 @cindex server
23672 A machine one can connect to and get news (or mail) from.
23673
23674 @item select method
23675 @cindex select method
23676 A structure that specifies the back end, the server and the virtual
23677 server settings.
23678
23679 @item virtual server
23680 @cindex virtual server
23681 A named select method.  Since a select method defines all there is to
23682 know about connecting to a (physical) server, taking the thing as a
23683 whole is a virtual server.
23684
23685 @item washing
23686 @cindex washing
23687 Taking a buffer and running it through a filter of some sort.  The
23688 result will (more often than not) be cleaner and more pleasing than the
23689 original.
23690
23691 @item ephemeral groups
23692 @cindex ephemeral groups
23693 Most groups store data on what articles you have read.  @dfn{Ephemeral}
23694 groups are groups that will have no data stored---when you exit the
23695 group, it'll disappear into the aether.
23696
23697 @item solid groups
23698 @cindex solid groups
23699 This is the opposite of ephemeral groups.  All groups listed in the
23700 group buffer are solid groups.
23701
23702 @item sparse articles
23703 @cindex sparse articles
23704 These are article placeholders shown in the summary buffer when
23705 @code{gnus-build-sparse-threads} has been switched on.
23706
23707 @item threading
23708 @cindex threading
23709 To put responses to articles directly after the articles they respond
23710 to---in a hierarchical fashion.
23711
23712 @item root
23713 @cindex root
23714 @cindex thread root
23715 The first article in a thread is the root.  It is the ancestor of all
23716 articles in the thread.
23717
23718 @item parent
23719 @cindex parent
23720 An article that has responses.
23721
23722 @item child
23723 @cindex child
23724 An article that responds to a different article---its parent.
23725
23726 @item digest
23727 @cindex digest
23728 A collection of messages in one file.  The most common digest format is
23729 specified by RFC 1153.
23730
23731 @end table
23732
23733
23734 @page
23735 @node Customization
23736 @section Customization
23737 @cindex general customization
23738
23739 All variables are properly documented elsewhere in this manual.  This
23740 section is designed to give general pointers on how to customize Gnus
23741 for some quite common situations.
23742
23743 @menu
23744 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
23745 * Slow Terminal Connection::    You run a remote Emacs.
23746 * Little Disk Space::           You feel that having large setup files is icky.
23747 * Slow Machine::                You feel like buying a faster machine.
23748 @end menu
23749
23750
23751 @node Slow/Expensive Connection
23752 @subsection Slow/Expensive NNTP Connection
23753
23754 If you run Emacs on a machine locally, and get your news from a machine
23755 over some very thin strings, you want to cut down on the amount of data
23756 Gnus has to get from the @sc{nntp} server.
23757
23758 @table @code
23759
23760 @item gnus-read-active-file
23761 Set this to @code{nil}, which will inhibit Gnus from requesting the
23762 entire active file from the server.  This file is often v.  large.  You
23763 also have to set @code{gnus-check-new-newsgroups} and
23764 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
23765 doesn't suddenly decide to fetch the active file anyway.
23766
23767 @item gnus-nov-is-evil
23768 This one has to be @code{nil}.  If not, grabbing article headers from
23769 the @sc{nntp} server will not be very fast.  Not all @sc{nntp} servers
23770 support @sc{xover}; Gnus will detect this by itself.
23771 @end table
23772
23773
23774 @node Slow Terminal Connection
23775 @subsection Slow Terminal Connection
23776
23777 Let's say you use your home computer for dialing up the system that runs
23778 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
23779 possible) the amount of data sent over the wires.
23780
23781 @table @code
23782
23783 @item gnus-auto-center-summary
23784 Set this to @code{nil} to inhibit Gnus from re-centering the summary
23785 buffer all the time.  If it is @code{vertical}, do only vertical
23786 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
23787 horizontal and vertical recentering.
23788
23789 @item gnus-visible-headers
23790 Cut down on the headers included in the articles to the
23791 minimum.  You can, in fact, make do without them altogether---most of the
23792 useful data is in the summary buffer, anyway.  Set this variable to
23793 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
23794
23795 Set this hook to all the available hiding commands:
23796 @lisp
23797 (setq gnus-treat-hide-headers 'head
23798       gnus-treat-hide-signature t
23799       gnus-treat-hide-citation t)
23800 @end lisp
23801
23802 @item gnus-use-full-window
23803 By setting this to @code{nil}, you can make all the windows smaller.
23804 While this doesn't really cut down much generally, it means that you
23805 have to see smaller portions of articles before deciding that you didn't
23806 want to read them anyway.
23807
23808 @item gnus-thread-hide-subtree
23809 If this is non-@code{nil}, all threads in the summary buffer will be
23810 hidden initially.
23811
23812
23813 @item gnus-updated-mode-lines
23814 If this is @code{nil}, Gnus will not put information in the buffer mode
23815 lines, which might save some time.
23816 @end table
23817
23818
23819 @node Little Disk Space
23820 @subsection Little Disk Space
23821 @cindex disk space
23822
23823 The startup files can get rather large, so you may want to cut their
23824 sizes a bit if you are running out of space.
23825
23826 @table @code
23827
23828 @item gnus-save-newsrc-file
23829 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
23830 only save @file{.newsrc.eld}.  This means that you will not be able to
23831 use any other newsreaders than Gnus.  This variable is @code{t} by
23832 default.
23833
23834 @item gnus-read-newsrc-file
23835 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
23836 only read @file{.newsrc.eld}.  This means that you will not be able to
23837 use any other newsreaders than Gnus.  This variable is @code{t} by
23838 default.
23839
23840 @item gnus-save-killed-list
23841 If this is @code{nil}, Gnus will not save the list of dead groups.  You
23842 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
23843 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
23844 variable to @code{nil}.  This variable is @code{t} by default.
23845
23846 @end table
23847
23848
23849 @node Slow Machine
23850 @subsection Slow Machine
23851 @cindex slow machine
23852
23853 If you have a slow machine, or are just really impatient, there are a
23854 few things you can do to make Gnus run faster.
23855
23856 Set @code{gnus-check-new-newsgroups} and
23857 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
23858
23859 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
23860 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
23861 summary buffer faster.
23862
23863
23864 @page
23865 @node Troubleshooting
23866 @section Troubleshooting
23867 @cindex troubleshooting
23868
23869 Gnus works @emph{so} well straight out of the box---I can't imagine any
23870 problems, really.
23871
23872 Ahem.
23873
23874 @enumerate
23875
23876 @item
23877 Make sure your computer is switched on.
23878
23879 @item
23880 Make sure that you really load the current Gnus version.  If you have
23881 been running @sc{gnus}, you need to exit Emacs and start it up again before
23882 Gnus will work.
23883
23884 @item
23885 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
23886 like @samp{T-gnus 6.15.* (based on Oort Gnus v0.*; for SEMI 1.1*, FLIM
23887 1.1*)} you have the right files loaded.  If, on the other hand, you get
23888 something like @samp{NNTP 3.x} or @samp{nntp flee}, you have some old
23889 @file{.el} files lying around.  Delete these.
23890
23891 @item
23892 Read the help group (@kbd{G h} in the group buffer) for a FAQ and a
23893 how-to.
23894
23895 @item
23896 @vindex max-lisp-eval-depth
23897 Gnus works on many recursive structures, and in some extreme (and very
23898 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
23899 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
23900 something like that.
23901 @end enumerate
23902
23903 If all else fails, report the problem as a bug.
23904
23905 @cindex bugs
23906 @cindex reporting bugs
23907
23908 @kindex M-x gnus-bug
23909 @findex gnus-bug
23910 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
23911 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
23912 me the backtrace.  I will fix bugs, but I can only fix them if you send
23913 me a precise description as to how to reproduce the bug.
23914
23915 You really can never be too detailed in a bug report.  Always use the
23916 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
23917 a 10Kb mail each time you use it, and even if you have sent me your
23918 environment 500 times before.  I don't care.  I want the full info each
23919 time.
23920
23921 It is also important to remember that I have no memory whatsoever.  If
23922 you send a bug report, and I send you a reply, and then you just send
23923 back ``No, it's not! Moron!'', I will have no idea what you are
23924 insulting me about.  Always over-explain everything.  It's much easier
23925 for all of us---if I don't have all the information I need, I will just
23926 mail you and ask for more info, and everything takes more time.
23927
23928 If the problem you're seeing is very visual, and you can't quite explain
23929 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
23930 it somewhere it can be reached, and include the URL of the picture in
23931 the bug report.
23932
23933 @cindex patches
23934 If you would like to contribute a patch to fix bugs or make
23935 improvements, please produce the patch using @samp{diff -u}.
23936
23937 @cindex edebug
23938 If you want to debug your problem further before reporting, possibly
23939 in order to solve the problem yourself and send a patch, you can use
23940 edebug.  Debugging lisp code is documented in the Elisp manual
23941 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
23942 Lisp Reference Manual}).  To get you started with edebug, consider if
23943 you discover some weird behaviour when pressing @kbd{c}, the first
23944 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
23945 the documentation buffer that leads you to the function definition,
23946 then press @kbd{M-x edebug-defun RET} with point inside that function,
23947 return to Gnus and press @kbd{c} to invoke the code.  You will be
23948 placed in the lisp buffer and can single step using @kbd{SPC} and
23949 evaluate expressions using @kbd{M-:} or inspect variables using
23950 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
23951 @kbd{c} or @kbd{g}.
23952
23953 @cindex elp
23954 @cindex profile
23955 @cindex slow
23956 Sometimes, a problem do not directly generate a elisp error but
23957 manifests itself by causing Gnus to be very slow.  In these cases, you
23958 can use @kbd{M-x toggle-debug-on-quit} and press C-j when things are
23959 slow, and then try to analyze the backtrace (repeating the procedure
23960 helps isolating the real problem areas).  A fancier approach is to use
23961 the elisp profiler, ELP.  The profiler is (or should be) fully
23962 documented elsewhere, but to get you started there are a few steps
23963 that need to be followed.  First, instrument the part of Gnus you are
23964 interested in for profiling, e.g. @kbd{M-x elp-instrument-package RET
23965 gnus} or @kbd{M-x elp-instrument-packagre RET message}.  Then perform
23966 the operation that is slow and press @kbd{M-x elp-results}.  You will
23967 then see which operations that takes time, and can debug them further.
23968 If the entire operation takes much longer than the time spent in the
23969 slowest function in the profiler output, you probably profiled the
23970 wrong part of Gnus.  To reset profiling statistics, use @kbd{M-x
23971 elp-reset-all}.  @kbd{M-x elp-restore-all} is supposed to remove
23972 profiling, but given the complexities and dynamic code generation in
23973 Gnus, it might not always work perfectly.
23974
23975 If you just need help, you are better off asking on
23976 @samp{gnu.emacs.gnus}.  I'm not very helpful.
23977
23978 @cindex gnu.emacs.gnus
23979 @cindex ding mailing list
23980 You can also ask on the ding mailing list---@samp{ding@@gnus.org}.
23981 Write to @samp{ding-request@@gnus.org} to subscribe.
23982
23983
23984 @page
23985 @node Gnus Reference Guide
23986 @section Gnus Reference Guide
23987
23988 It is my hope that other people will figure out smart stuff that Gnus
23989 can do, and that other people will write those smart things as well.  To
23990 facilitate that I thought it would be a good idea to describe the inner
23991 workings of Gnus.  And some of the not-so-inner workings, while I'm at
23992 it.
23993
23994 You can never expect the internals of a program not to change, but I
23995 will be defining (in some details) the interface between Gnus and its
23996 back ends (this is written in stone), the format of the score files
23997 (ditto), data structures (some are less likely to change than others)
23998 and general methods of operation.
23999
24000 @menu
24001 * Gnus Utility Functions::      Common functions and variable to use.
24002 * Back End Interface::          How Gnus communicates with the servers.
24003 * Score File Syntax::           A BNF definition of the score file standard.
24004 * Headers::                     How Gnus stores headers internally.
24005 * Ranges::                      A handy format for storing mucho numbers.
24006 * Group Info::                  The group info format.
24007 * Extended Interactive::        Symbolic prefixes and stuff.
24008 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
24009 * Various File Formats::        Formats of files that Gnus use.
24010 @end menu
24011
24012
24013 @node Gnus Utility Functions
24014 @subsection Gnus Utility Functions
24015 @cindex Gnus utility functions
24016 @cindex utility functions
24017 @cindex functions
24018 @cindex internal variables
24019
24020 When writing small functions to be run from hooks (and stuff), it's
24021 vital to have access to the Gnus internal functions and variables.
24022 Below is a list of the most common ones.
24023
24024 @table @code
24025
24026 @item gnus-newsgroup-name
24027 @vindex gnus-newsgroup-name
24028 This variable holds the name of the current newsgroup.
24029
24030 @item gnus-find-method-for-group
24031 @findex gnus-find-method-for-group
24032 A function that returns the select method for @var{group}.
24033
24034 @item gnus-group-real-name
24035 @findex gnus-group-real-name
24036 Takes a full (prefixed) Gnus group name, and returns the unprefixed
24037 name.
24038
24039 @item gnus-group-prefixed-name
24040 @findex gnus-group-prefixed-name
24041 Takes an unprefixed group name and a select method, and returns the full
24042 (prefixed) Gnus group name.
24043
24044 @item gnus-get-info
24045 @findex gnus-get-info
24046 Returns the group info list for @var{group}.
24047
24048 @item gnus-group-unread
24049 @findex gnus-group-unread
24050 The number of unread articles in @var{group}, or @code{t} if that is
24051 unknown.
24052
24053 @item gnus-active
24054 @findex gnus-active
24055 The active entry for @var{group}.
24056
24057 @item gnus-set-active
24058 @findex gnus-set-active
24059 Set the active entry for @var{group}.
24060
24061 @item gnus-add-current-to-buffer-list
24062 @findex gnus-add-current-to-buffer-list
24063 Adds the current buffer to the list of buffers to be killed on Gnus
24064 exit.
24065
24066 @item gnus-continuum-version
24067 @findex gnus-continuum-version
24068 Takes a Gnus version string as a parameter and returns a floating point
24069 number.  Earlier versions will always get a lower number than later
24070 versions.
24071
24072 @item gnus-group-read-only-p
24073 @findex gnus-group-read-only-p
24074 Says whether @var{group} is read-only or not.
24075
24076 @item gnus-news-group-p
24077 @findex gnus-news-group-p
24078 Says whether @var{group} came from a news back end.
24079
24080 @item gnus-ephemeral-group-p
24081 @findex gnus-ephemeral-group-p
24082 Says whether @var{group} is ephemeral or not.
24083
24084 @item gnus-server-to-method
24085 @findex gnus-server-to-method
24086 Returns the select method corresponding to @var{server}.
24087
24088 @item gnus-server-equal
24089 @findex gnus-server-equal
24090 Says whether two virtual servers are equal.
24091
24092 @item gnus-group-native-p
24093 @findex gnus-group-native-p
24094 Says whether @var{group} is native or not.
24095
24096 @item gnus-group-secondary-p
24097 @findex gnus-group-secondary-p
24098 Says whether @var{group} is secondary or not.
24099
24100 @item gnus-group-foreign-p
24101 @findex gnus-group-foreign-p
24102 Says whether @var{group} is foreign or not.
24103
24104 @item group-group-find-parameter
24105 @findex group-group-find-parameter
24106 Returns the parameter list of @var{group}.  If given a second parameter,
24107 returns the value of that parameter for @var{group}.
24108
24109 @item gnus-group-set-parameter
24110 @findex gnus-group-set-parameter
24111 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
24112
24113 @item gnus-narrow-to-body
24114 @findex gnus-narrow-to-body
24115 Narrows the current buffer to the body of the article.
24116
24117 @item gnus-check-backend-function
24118 @findex gnus-check-backend-function
24119 Takes two parameters, @var{function} and @var{group}.  If the back end
24120 @var{group} comes from supports @var{function}, return non-@code{nil}.
24121
24122 @lisp
24123 (gnus-check-backend-function "request-scan" "nnml:misc")
24124 @result{} t
24125 @end lisp
24126
24127 @item gnus-read-method
24128 @findex gnus-read-method
24129 Prompts the user for a select method.
24130
24131 @end table
24132
24133
24134 @node Back End Interface
24135 @subsection Back End Interface
24136
24137 Gnus doesn't know anything about @sc{nntp}, spools, mail or virtual
24138 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
24139 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
24140 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
24141 examples of the latter we have @code{nntp-port-number} and
24142 @code{nnmbox-directory}.
24143
24144 When Gnus asks for information from a back end---say @code{nntp}---on
24145 something, it will normally include a virtual server name in the
24146 function parameters.  (If not, the back end should use the ``current''
24147 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
24148 server as its only (optional) parameter.  If this virtual server hasn't
24149 been opened, the function should fail.
24150
24151 Note that a virtual server name has no relation to some physical server
24152 name.  Take this example:
24153
24154 @lisp
24155 (nntp "odd-one"
24156       (nntp-address "ifi.uio.no")
24157       (nntp-port-number 4324))
24158 @end lisp
24159
24160 Here the virtual server name is @samp{odd-one} while the name of
24161 the physical server is @samp{ifi.uio.no}.
24162
24163 The back ends should be able to switch between several virtual servers.
24164 The standard back ends implement this by keeping an alist of virtual
24165 server environments that they pull down/push up when needed.
24166
24167 There are two groups of interface functions: @dfn{required functions},
24168 which must be present, and @dfn{optional functions}, which Gnus will
24169 always check for presence before attempting to call 'em.
24170
24171 All these functions are expected to return data in the buffer
24172 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
24173 unfortunately named, but we'll have to live with it.  When I talk about
24174 @dfn{resulting data}, I always refer to the data in that buffer.  When I
24175 talk about @dfn{return value}, I talk about the function value returned by
24176 the function call.  Functions that fail should return @code{nil} as the
24177 return value.
24178
24179 Some back ends could be said to be @dfn{server-forming} back ends, and
24180 some might be said not to be.  The latter are back ends that generally
24181 only operate on one group at a time, and have no concept of ``server''
24182 -- they have a group, and they deliver info on that group and nothing
24183 more.
24184
24185 Gnus identifies each message by way of group name and article number.  A
24186 few remarks about these article numbers might be useful.  First of all,
24187 the numbers are positive integers.  Secondly, it is normally not
24188 possible for later articles to `re-use' older article numbers without
24189 confusing Gnus.  That is, if a group has ever contained a message
24190 numbered 42, then no other message may get that number, or Gnus will get
24191 mightily confused.@footnote{See the function
24192 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
24193 Third, article numbers must be assigned in order of arrival in the
24194 group; this is not necessarily the same as the date of the message.
24195
24196 The previous paragraph already mentions all the `hard' restrictions that
24197 article numbers must fulfill.  But it seems that it might be useful to
24198 assign @emph{consecutive} article numbers, for Gnus gets quite confused
24199 if there are holes in the article numbering sequence.  However, due to
24200 the `no-reuse' restriction, holes cannot be avoided altogether.  It's
24201 also useful for the article numbers to start at 1 to avoid running out
24202 of numbers as long as possible.
24203
24204 Note that by convention, backends are named @code{nnsomething}, but
24205 Gnus also comes with some @code{nnnotbackends}, such as
24206 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
24207
24208 In the examples and definitions I will refer to the imaginary back end
24209 @code{nnchoke}.
24210
24211 @cindex @code{nnchoke}
24212
24213 @menu
24214 * Required Back End Functions::  Functions that must be implemented.
24215 * Optional Back End Functions::  Functions that need not be implemented.
24216 * Error Messaging::             How to get messages and report errors.
24217 * Writing New Back Ends::       Extending old back ends.
24218 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
24219 * Mail-like Back Ends::         Some tips on mail back ends.
24220 @end menu
24221
24222
24223 @node Required Back End Functions
24224 @subsubsection Required Back End Functions
24225
24226 @table @code
24227
24228 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
24229
24230 @var{articles} is either a range of article numbers or a list of
24231 @code{Message-ID}s.  Current back ends do not fully support either---only
24232 sequences (lists) of article numbers, and most back ends do not support
24233 retrieval of @code{Message-ID}s.  But they should try for both.
24234
24235 The result data should either be HEADs or @sc{nov} lines, and the result
24236 value should either be @code{headers} or @code{nov} to reflect this.
24237 This might later be expanded to @code{various}, which will be a mixture
24238 of HEADs and @sc{nov} lines, but this is currently not supported by Gnus.
24239
24240 If @var{fetch-old} is non-@code{nil} it says to try fetching "extra
24241 headers", in some meaning of the word.  This is generally done by
24242 fetching (at most) @var{fetch-old} extra headers less than the smallest
24243 article number in @code{articles}, and filling the gaps as well.  The
24244 presence of this parameter can be ignored if the back end finds it
24245 cumbersome to follow the request.  If this is non-@code{nil} and not a
24246 number, do maximum fetches.
24247
24248 Here's an example HEAD:
24249
24250 @example
24251 221 1056 Article retrieved.
24252 Path: ifi.uio.no!sturles
24253 From: sturles@@ifi.uio.no (Sturle Sunde)
24254 Newsgroups: ifi.discussion
24255 Subject: Re: Something very droll
24256 Date: 27 Oct 1994 14:02:57 +0100
24257 Organization: Dept. of Informatics, University of Oslo, Norway
24258 Lines: 26
24259 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
24260 References: <38jdmq$4qu@@visbur.ifi.uio.no>
24261 NNTP-Posting-Host: holmenkollen.ifi.uio.no
24262 .
24263 @end example
24264
24265 So a @code{headers} return value would imply that there's a number of
24266 these in the data buffer.
24267
24268 Here's a BNF definition of such a buffer:
24269
24270 @example
24271 headers        = *head
24272 head           = error / valid-head
24273 error-message  = [ "4" / "5" ] 2number " " <error message> eol
24274 valid-head     = valid-message *header "." eol
24275 valid-message  = "221 " <number> " Article retrieved." eol
24276 header         = <text> eol
24277 @end example
24278
24279 If the return value is @code{nov}, the data buffer should contain
24280 @dfn{network overview database} lines.  These are basically fields
24281 separated by tabs.
24282
24283 @example
24284 nov-buffer = *nov-line
24285 nov-line   = 8*9 [ field <TAB> ] eol
24286 field      = <text except TAB>
24287 @end example
24288
24289 For a closer look at what should be in those fields,
24290 @pxref{Headers}.
24291
24292
24293 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
24294
24295 @var{server} is here the virtual server name.  @var{definitions} is a
24296 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
24297
24298 If the server can't be opened, no error should be signaled.  The back end
24299 may then choose to refuse further attempts at connecting to this
24300 server.  In fact, it should do so.
24301
24302 If the server is opened already, this function should return a
24303 non-@code{nil} value.  There should be no data returned.
24304
24305
24306 @item (nnchoke-close-server &optional SERVER)
24307
24308 Close connection to @var{server} and free all resources connected
24309 to it.  Return @code{nil} if the server couldn't be closed for some
24310 reason.
24311
24312 There should be no data returned.
24313
24314
24315 @item (nnchoke-request-close)
24316
24317 Close connection to all servers and free all resources that the back end
24318 have reserved.  All buffers that have been created by that back end
24319 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
24320 function is generally only called when Gnus is shutting down.
24321
24322 There should be no data returned.
24323
24324
24325 @item (nnchoke-server-opened &optional SERVER)
24326
24327 If @var{server} is the current virtual server, and the connection to the
24328 physical server is alive, then this function should return a
24329 non-@code{nil} vlue.  This function should under no circumstances
24330 attempt to reconnect to a server we have lost connection to.
24331
24332 There should be no data returned.
24333
24334
24335 @item (nnchoke-status-message &optional SERVER)
24336
24337 This function should return the last error message from @var{server}.
24338
24339 There should be no data returned.
24340
24341
24342 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
24343
24344 The result data from this function should be the article specified by
24345 @var{article}.  This might either be a @code{Message-ID} or a number.
24346 It is optional whether to implement retrieval by @code{Message-ID}, but
24347 it would be nice if that were possible.
24348
24349 If @var{to-buffer} is non-@code{nil}, the result data should be returned
24350 in this buffer instead of the normal data buffer.  This is to make it
24351 possible to avoid copying large amounts of data from one buffer to
24352 another, while Gnus mainly requests articles to be inserted directly
24353 into its article buffer.
24354
24355 If it is at all possible, this function should return a cons cell where
24356 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
24357 the article number.  This will enable Gnus to find out what the real
24358 group and article numbers are when fetching articles by
24359 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
24360 on successful article retrieval.
24361
24362
24363 @item (nnchoke-request-group GROUP &optional SERVER FAST)
24364
24365 Get data on @var{group}.  This function also has the side effect of
24366 making @var{group} the current group.
24367
24368 If @var{fast}, don't bother to return useful data, just make @var{group}
24369 the current group.
24370
24371 Here's an example of some result data and a definition of the same:
24372
24373 @example
24374 211 56 1000 1059 ifi.discussion
24375 @end example
24376
24377 The first number is the status, which should be 211.  Next is the
24378 total number of articles in the group, the lowest article number, the
24379 highest article number, and finally the group name.  Note that the total
24380 number of articles may be less than one might think while just
24381 considering the highest and lowest article numbers, but some articles
24382 may have been canceled.  Gnus just discards the total-number, so
24383 whether one should take the bother to generate it properly (if that is a
24384 problem) is left as an exercise to the reader.  If the group contains no
24385 articles, the lowest article number should be reported as 1 and the
24386 highest as 0.
24387
24388 @example
24389 group-status = [ error / info ] eol
24390 error        = [ "4" / "5" ] 2<number> " " <Error message>
24391 info         = "211 " 3* [ <number> " " ] <string>
24392 @end example
24393
24394
24395 @item (nnchoke-close-group GROUP &optional SERVER)
24396
24397 Close @var{group} and free any resources connected to it.  This will be
24398 a no-op on most back ends.
24399
24400 There should be no data returned.
24401
24402
24403 @item (nnchoke-request-list &optional SERVER)
24404
24405 Return a list of all groups available on @var{server}.  And that means
24406 @emph{all}.
24407
24408 Here's an example from a server that only carries two groups:
24409
24410 @example
24411 ifi.test 0000002200 0000002000 y
24412 ifi.discussion 3324 3300 n
24413 @end example
24414
24415 On each line we have a group name, then the highest article number in
24416 that group, the lowest article number, and finally a flag.  If the group
24417 contains no articles, the lowest article number should be reported as 1
24418 and the highest as 0.
24419
24420 @example
24421 active-file = *active-line
24422 active-line = name " " <number> " " <number> " " flags eol
24423 name        = <string>
24424 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
24425 @end example
24426
24427 The flag says whether the group is read-only (@samp{n}), is moderated
24428 (@samp{m}), is dead (@samp{x}), is aliased to some other group
24429 (@samp{=other-group}) or none of the above (@samp{y}).
24430
24431
24432 @item (nnchoke-request-post &optional SERVER)
24433
24434 This function should post the current buffer.  It might return whether
24435 the posting was successful or not, but that's not required.  If, for
24436 instance, the posting is done asynchronously, it has generally not been
24437 completed by the time this function concludes.  In that case, this
24438 function should set up some kind of sentinel to beep the user loud and
24439 clear if the posting could not be completed.
24440
24441 There should be no result data from this function.
24442
24443 @end table
24444
24445
24446 @node Optional Back End Functions
24447 @subsubsection Optional Back End Functions
24448
24449 @table @code
24450
24451 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
24452
24453 @var{groups} is a list of groups, and this function should request data
24454 on all those groups.  How it does it is of no concern to Gnus, but it
24455 should attempt to do this in a speedy fashion.
24456
24457 The return value of this function can be either @code{active} or
24458 @code{group}, which says what the format of the result data is.  The
24459 former is in the same format as the data from
24460 @code{nnchoke-request-list}, while the latter is a buffer full of lines
24461 in the same format as @code{nnchoke-request-group} gives.
24462
24463 @example
24464 group-buffer = *active-line / *group-status
24465 @end example
24466
24467
24468 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
24469
24470 A Gnus group info (@pxref{Group Info}) is handed to the back end for
24471 alterations.  This comes in handy if the back end really carries all the
24472 information (as is the case with virtual and imap groups).  This
24473 function should destructively alter the info to suit its needs, and
24474 should return a non-nil value.
24475
24476 There should be no result data from this function.
24477
24478
24479 @item (nnchoke-request-type GROUP &optional ARTICLE)
24480
24481 When the user issues commands for ``sending news'' (@kbd{F} in the
24482 summary buffer, for instance), Gnus has to know whether the article the
24483 user is following up on is news or mail.  This function should return
24484 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
24485 is mail and @code{unknown} if the type can't be decided.  (The
24486 @var{article} parameter is necessary in @code{nnvirtual} groups which
24487 might very well combine mail groups and news groups.)  Both @var{group}
24488 and @var{article} may be @code{nil}.
24489
24490 There should be no result data from this function.
24491
24492
24493 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
24494
24495 Set/remove/add marks on articles.  Normally Gnus handles the article
24496 marks (such as read, ticked, expired etc) internally, and store them in
24497 @code{~/.newsrc.eld}.  Some back ends (such as @sc{imap}) however carry
24498 all information about the articles on the server, so Gnus need to
24499 propagate the mark information to the server.
24500
24501 ACTION is a list of mark setting requests, having this format:
24502
24503 @example
24504 (RANGE ACTION MARK)
24505 @end example
24506
24507 RANGE is a range of articles you wish to update marks on.  ACTION is
24508 @code{add} or @code{del}, used to add marks or remove marks
24509 (preserving all marks not mentioned).  MARK is a list of marks; where
24510 each mark is a symbol.  Currently used marks are @code{read},
24511 @code{tick}, @code{reply}, @code{expire}, @code{killed},
24512 @code{dormant}, @code{save}, @code{download}, @code{unsend},
24513 @code{forward} and @code{recent}, but your back end should, if
24514 possible, not limit itself to these.
24515
24516 Given contradictory actions, the last action in the list should be the
24517 effective one.  That is, if your action contains a request to add the
24518 @code{tick} mark on article 1 and, later in the list, a request to
24519 remove the mark on the same article, the mark should in fact be removed.
24520
24521 An example action list:
24522
24523 @example
24524 (((5 12 30) 'del '(tick))
24525  ((10 . 90) 'add '(read expire))
24526  ((92 94) 'del '(read)))
24527 @end example
24528
24529 The function should return a range of articles it wasn't able to set the
24530 mark on (currently not used for anything).
24531
24532 There should be no result data from this function.
24533
24534 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
24535
24536 If the user tries to set a mark that the back end doesn't like, this
24537 function may change the mark.  Gnus will use whatever this function
24538 returns as the mark for @var{article} instead of the original
24539 @var{mark}.  If the back end doesn't care, it must return the original
24540 @var{mark}, and not @code{nil} or any other type of garbage.
24541
24542 The only use for this I can see is what @code{nnvirtual} does with
24543 it---if a component group is auto-expirable, marking an article as read
24544 in the virtual group should result in the article being marked as
24545 expirable.
24546
24547 There should be no result data from this function.
24548
24549
24550 @item (nnchoke-request-scan &optional GROUP SERVER)
24551
24552 This function may be called at any time (by Gnus or anything else) to
24553 request that the back end check for incoming articles, in one way or
24554 another.  A mail back end will typically read the spool file or query the
24555 POP server when this function is invoked.  The @var{group} doesn't have
24556 to be heeded---if the back end decides that it is too much work just
24557 scanning for a single group, it may do a total scan of all groups.  It
24558 would be nice, however, to keep things local if that's practical.
24559
24560 There should be no result data from this function.
24561
24562
24563 @item (nnchoke-request-group-description GROUP &optional SERVER)
24564
24565 The result data from this function should be a description of
24566 @var{group}.
24567
24568 @example
24569 description-line = name <TAB> description eol
24570 name             = <string>
24571 description      = <text>
24572 @end example
24573
24574 @item (nnchoke-request-list-newsgroups &optional SERVER)
24575
24576 The result data from this function should be the description of all
24577 groups available on the server.
24578
24579 @example
24580 description-buffer = *description-line
24581 @end example
24582
24583
24584 @item (nnchoke-request-newgroups DATE &optional SERVER)
24585
24586 The result data from this function should be all groups that were
24587 created after @samp{date}, which is in normal human-readable date format
24588 (i.e., the date format used in mail and news headers, and returned by
24589 the function @code{message-make-date} by default).  The data should be
24590 in the active buffer format.
24591
24592 It is okay for this function to return `too many' groups; some back ends
24593 might find it cheaper to return the full list of groups, rather than
24594 just the new groups.  But don't do this for back ends with many groups.
24595 Normally, if the user creates the groups herself, there won't be too
24596 many groups, so @code{nnml} and the like are probably safe.  But for
24597 back ends like @code{nntp}, where the groups have been created by the
24598 server, it is quite likely that there can be many groups.
24599
24600
24601 @item (nnchoke-request-create-group GROUP &optional SERVER)
24602
24603 This function should create an empty group with name @var{group}.
24604
24605 There should be no return data.
24606
24607
24608 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
24609
24610 This function should run the expiry process on all articles in the
24611 @var{articles} range (which is currently a simple list of article
24612 numbers.)  It is left up to the back end to decide how old articles
24613 should be before they are removed by this function.  If @var{force} is
24614 non-@code{nil}, all @var{articles} should be deleted, no matter how new
24615 they are.
24616
24617 This function should return a list of articles that it did not/was not
24618 able to delete.
24619
24620 There should be no result data returned.
24621
24622
24623 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM
24624 &optional LAST)
24625
24626 This function should move @var{article} (which is a number) from
24627 @var{group} by calling @var{accept-form}.
24628
24629 This function should ready the article in question for moving by
24630 removing any header lines it has added to the article, and generally
24631 should ``tidy up'' the article.  Then it should @code{eval}
24632 @var{accept-form} in the buffer where the ``tidy'' article is.  This
24633 will do the actual copying.  If this @code{eval} returns a
24634 non-@code{nil} value, the article should be removed.
24635
24636 If @var{last} is @code{nil}, that means that there is a high likelihood
24637 that there will be more requests issued shortly, so that allows some
24638 optimizations.
24639
24640 The function should return a cons where the @code{car} is the group name and
24641 the @code{cdr} is the article number that the article was entered as.
24642
24643 There should be no data returned.
24644
24645
24646 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
24647
24648 This function takes the current buffer and inserts it into @var{group}.
24649 If @var{last} in @code{nil}, that means that there will be more calls to
24650 this function in short order.
24651
24652 The function should return a cons where the @code{car} is the group name and
24653 the @code{cdr} is the article number that the article was entered as.
24654
24655 There should be no data returned.
24656
24657
24658 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
24659
24660 This function should remove @var{article} (which is a number) from
24661 @var{group} and insert @var{buffer} there instead.
24662
24663 There should be no data returned.
24664
24665
24666 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
24667
24668 This function should delete @var{group}.  If @var{force}, it should
24669 really delete all the articles in the group, and then delete the group
24670 itself.  (If there is such a thing as ``the group itself''.)
24671
24672 There should be no data returned.
24673
24674
24675 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
24676
24677 This function should rename @var{group} into @var{new-name}.  All
24678 articles in @var{group} should move to @var{new-name}.
24679
24680 There should be no data returned.
24681
24682 @end table
24683
24684
24685 @node Error Messaging
24686 @subsubsection Error Messaging
24687
24688 @findex nnheader-report
24689 @findex nnheader-get-report
24690 The back ends should use the function @code{nnheader-report} to report
24691 error conditions---they should not raise errors when they aren't able to
24692 perform a request.  The first argument to this function is the back end
24693 symbol, and the rest are interpreted as arguments to @code{format} if
24694 there are multiple of them, or just a string if there is one of them.
24695 This function must always returns @code{nil}.
24696
24697 @lisp
24698 (nnheader-report 'nnchoke "You did something totally bogus")
24699
24700 (nnheader-report 'nnchoke "Could not request group %s" group)
24701 @end lisp
24702
24703 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
24704 @code{nil} back from a server, and this function returns the most
24705 recently reported message for the back end in question.  This function
24706 takes one argument---the server symbol.
24707
24708 Internally, these functions access @var{back-end}@code{-status-string},
24709 so the @code{nnchoke} back end will have its error message stored in
24710 @code{nnchoke-status-string}.
24711
24712
24713 @node Writing New Back Ends
24714 @subsubsection Writing New Back Ends
24715
24716 Many back ends are quite similar.  @code{nnml} is just like
24717 @code{nnspool}, but it allows you to edit the articles on the server.
24718 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
24719 and it doesn't maintain overview databases.  @code{nndir} is just like
24720 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
24721 editing articles.
24722
24723 It would make sense if it were possible to ``inherit'' functions from
24724 back ends when writing new back ends.  And, indeed, you can do that if you
24725 want to.  (You don't have to if you don't want to, of course.)
24726
24727 All the back ends declare their public variables and functions by using a
24728 package called @code{nnoo}.
24729
24730 To inherit functions from other back ends (and allow other back ends to
24731 inherit functions from the current back end), you should use the
24732 following macros:
24733
24734 @table @code
24735
24736 @item nnoo-declare
24737 This macro declares the first parameter to be a child of the subsequent
24738 parameters.  For instance:
24739
24740 @lisp
24741 (nnoo-declare nndir
24742   nnml nnmh)
24743 @end lisp
24744
24745 @code{nndir} has declared here that it intends to inherit functions from
24746 both @code{nnml} and @code{nnmh}.
24747
24748 @item defvoo
24749 This macro is equivalent to @code{defvar}, but registers the variable as
24750 a public server variable.  Most state-oriented variables should be
24751 declared with @code{defvoo} instead of @code{defvar}.
24752
24753 In addition to the normal @code{defvar} parameters, it takes a list of
24754 variables in the parent back ends to map the variable to when executing
24755 a function in those back ends.
24756
24757 @lisp
24758 (defvoo nndir-directory nil
24759   "Where nndir will look for groups."
24760   nnml-current-directory nnmh-current-directory)
24761 @end lisp
24762
24763 This means that @code{nnml-current-directory} will be set to
24764 @code{nndir-directory} when an @code{nnml} function is called on behalf
24765 of @code{nndir}.  (The same with @code{nnmh}.)
24766
24767 @item nnoo-define-basics
24768 This macro defines some common functions that almost all back ends should
24769 have.
24770
24771 @example
24772 (nnoo-define-basics nndir)
24773 @end example
24774
24775 @item deffoo
24776 This macro is just like @code{defun} and takes the same parameters.  In
24777 addition to doing the normal @code{defun} things, it registers the
24778 function as being public so that other back ends can inherit it.
24779
24780 @item nnoo-map-functions
24781 This macro allows mapping of functions from the current back end to
24782 functions from the parent back ends.
24783
24784 @example
24785 (nnoo-map-functions nndir
24786   (nnml-retrieve-headers 0 nndir-current-group 0 0)
24787   (nnmh-request-article 0 nndir-current-group 0 0))
24788 @end example
24789
24790 This means that when @code{nndir-retrieve-headers} is called, the first,
24791 third, and fourth parameters will be passed on to
24792 @code{nnml-retrieve-headers}, while the second parameter is set to the
24793 value of @code{nndir-current-group}.
24794
24795 @item nnoo-import
24796 This macro allows importing functions from back ends.  It should be the
24797 last thing in the source file, since it will only define functions that
24798 haven't already been defined.
24799
24800 @example
24801 (nnoo-import nndir
24802   (nnmh
24803    nnmh-request-list
24804    nnmh-request-newgroups)
24805   (nnml))
24806 @end example
24807
24808 This means that calls to @code{nndir-request-list} should just be passed
24809 on to @code{nnmh-request-list}, while all public functions from
24810 @code{nnml} that haven't been defined in @code{nndir} yet should be
24811 defined now.
24812
24813 @end table
24814
24815 Below is a slightly shortened version of the @code{nndir} back end.
24816
24817 @lisp
24818 ;;; nndir.el --- single directory newsgroup access for Gnus
24819 ;; Copyright (C) 1995,96 Free Software Foundation, Inc.
24820
24821 ;;; Code:
24822
24823 (require 'nnheader)
24824 (require 'nnmh)
24825 (require 'nnml)
24826 (require 'nnoo)
24827 (eval-when-compile (require 'cl))
24828
24829 (nnoo-declare nndir
24830   nnml nnmh)
24831
24832 (defvoo nndir-directory nil
24833   "Where nndir will look for groups."
24834   nnml-current-directory nnmh-current-directory)
24835
24836 (defvoo nndir-nov-is-evil nil
24837   "*Non-nil means that nndir will never retrieve NOV headers."
24838   nnml-nov-is-evil)
24839
24840 (defvoo nndir-current-group ""
24841   nil
24842   nnml-current-group nnmh-current-group)
24843 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
24844 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
24845
24846 (defvoo nndir-status-string "" nil nnmh-status-string)
24847 (defconst nndir-version "nndir 1.0")
24848
24849 ;;; Interface functions.
24850
24851 (nnoo-define-basics nndir)
24852
24853 (deffoo nndir-open-server (server &optional defs)
24854   (setq nndir-directory
24855         (or (cadr (assq 'nndir-directory defs))
24856             server))
24857   (unless (assq 'nndir-directory defs)
24858     (push `(nndir-directory ,server) defs))
24859   (push `(nndir-current-group
24860           ,(file-name-nondirectory
24861             (directory-file-name nndir-directory)))
24862         defs)
24863   (push `(nndir-top-directory
24864           ,(file-name-directory (directory-file-name nndir-directory)))
24865         defs)
24866   (nnoo-change-server 'nndir server defs))
24867
24868 (nnoo-map-functions nndir
24869   (nnml-retrieve-headers 0 nndir-current-group 0 0)
24870   (nnmh-request-article 0 nndir-current-group 0 0)
24871   (nnmh-request-group nndir-current-group 0 0)
24872   (nnmh-close-group nndir-current-group 0))
24873
24874 (nnoo-import nndir
24875   (nnmh
24876    nnmh-status-message
24877    nnmh-request-list
24878    nnmh-request-newgroups))
24879
24880 (provide 'nndir)
24881 @end lisp
24882
24883
24884 @node Hooking New Back Ends Into Gnus
24885 @subsubsection Hooking New Back Ends Into Gnus
24886
24887 @vindex gnus-valid-select-methods
24888 @findex gnus-declare-backend
24889 Having Gnus start using your new back end is rather easy---you just
24890 declare it with the @code{gnus-declare-backend} functions.  This will
24891 enter the back end into the @code{gnus-valid-select-methods} variable.
24892
24893 @code{gnus-declare-backend} takes two parameters---the back end name and
24894 an arbitrary number of @dfn{abilities}.
24895
24896 Here's an example:
24897
24898 @lisp
24899 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
24900 @end lisp
24901
24902 The above line would then go in the @file{nnchoke.el} file.
24903
24904 The abilities can be:
24905
24906 @table @code
24907 @item mail
24908 This is a mailish back end---followups should (probably) go via mail.
24909 @item post
24910 This is a newsish back end---followups should (probably) go via news.
24911 @item post-mail
24912 This back end supports both mail and news.
24913 @item none
24914 This is neither a post nor mail back end---it's something completely
24915 different.
24916 @item respool
24917 It supports respooling---or rather, it is able to modify its source
24918 articles and groups.
24919 @item address
24920 The name of the server should be in the virtual server name.  This is
24921 true for almost all back ends.
24922 @item prompt-address
24923 The user should be prompted for an address when doing commands like
24924 @kbd{B} in the group buffer.  This is true for back ends like
24925 @code{nntp}, but not @code{nnmbox}, for instance.
24926 @end table
24927
24928
24929 @node Mail-like Back Ends
24930 @subsubsection Mail-like Back Ends
24931
24932 One of the things that separate the mail back ends from the rest of the
24933 back ends is the heavy dependence by most of the mail back ends on
24934 common functions in @file{nnmail.el}.  For instance, here's the
24935 definition of @code{nnml-request-scan}:
24936
24937 @lisp
24938 (deffoo nnml-request-scan (&optional group server)
24939   (setq nnml-article-file-alist nil)
24940   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
24941 @end lisp
24942
24943 It simply calls @code{nnmail-get-new-mail} with a few parameters,
24944 and @code{nnmail} takes care of all the moving and splitting of the
24945 mail.
24946
24947 This function takes four parameters.
24948
24949 @table @var
24950 @item method
24951 This should be a symbol to designate which back end is responsible for
24952 the call.
24953
24954 @item exit-function
24955 This function should be called after the splitting has been performed.
24956
24957 @item temp-directory
24958 Where the temporary files should be stored.
24959
24960 @item group
24961 This optional argument should be a group name if the splitting is to be
24962 performed for one group only.
24963 @end table
24964
24965 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
24966 save each article.  @var{back-end}@code{-active-number} will be called to
24967 find the article number assigned to this article.
24968
24969 The function also uses the following variables:
24970 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
24971 this back end); and @var{back-end}@code{-group-alist} and
24972 @var{back-end}@code{-active-file} to generate the new active file.
24973 @var{back-end}@code{-group-alist} should be a group-active alist, like
24974 this:
24975
24976 @example
24977 (("a-group" (1 . 10))
24978  ("some-group" (34 . 39)))
24979 @end example
24980
24981
24982 @node Score File Syntax
24983 @subsection Score File Syntax
24984
24985 Score files are meant to be easily parseable, but yet extremely
24986 mallable.   It was decided that something that had the same read syntax
24987 as an Emacs Lisp list would fit that spec.
24988
24989 Here's a typical score file:
24990
24991 @lisp
24992 (("summary"
24993   ("win95" -10000 nil s)
24994   ("Gnus"))
24995  ("from"
24996   ("Lars" -1000))
24997  (mark -100))
24998 @end lisp
24999
25000 BNF definition of a score file:
25001
25002 @example
25003 score-file      = "" / "(" *element ")"
25004 element         = rule / atom
25005 rule            = string-rule / number-rule / date-rule
25006 string-rule     = "(" quote string-header quote space *string-match ")"
25007 number-rule     = "(" quote number-header quote space *number-match ")"
25008 date-rule       = "(" quote date-header quote space *date-match ")"
25009 quote           = <ascii 34>
25010 string-header   = "subject" / "from" / "references" / "message-id" /
25011                   "xref" / "body" / "head" / "all" / "followup"
25012 number-header   = "lines" / "chars"
25013 date-header     = "date"
25014 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
25015                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
25016 score           = "nil" / <integer>
25017 date            = "nil" / <natural number>
25018 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
25019                   "r" / "regex" / "R" / "Regex" /
25020                   "e" / "exact" / "E" / "Exact" /
25021                   "f" / "fuzzy" / "F" / "Fuzzy"
25022 number-match    = "(" <integer> [ "" / [ space score [ "" /
25023                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
25024 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
25025 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
25026                   space date [ "" / [ space date-match-t ] ] ] ] ")"
25027 date-match-t    = "nil" / "at" / "before" / "after"
25028 atom            = "(" [ required-atom / optional-atom ] ")"
25029 required-atom   = mark / expunge / mark-and-expunge / files /
25030                   exclude-files / read-only / touched
25031 optional-atom   = adapt / local / eval
25032 mark            = "mark" space nil-or-number
25033 nil-or-number   = "nil" / <integer>
25034 expunge         = "expunge" space nil-or-number
25035 mark-and-expunge = "mark-and-expunge" space nil-or-number
25036 files           = "files" *[ space <string> ]
25037 exclude-files   = "exclude-files" *[ space <string> ]
25038 read-only       = "read-only" [ space "nil" / space "t" ]
25039 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
25040 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
25041 local           = "local" *[ space "(" <string> space <form> ")" ]
25042 eval            = "eval" space <form>
25043 space           = *[ " " / <TAB> / <NEWLINE> ]
25044 @end example
25045
25046 Any unrecognized elements in a score file should be ignored, but not
25047 discarded.
25048
25049 As you can see, white space is needed, but the type and amount of white
25050 space is irrelevant.  This means that formatting of the score file is
25051 left up to the programmer---if it's simpler to just spew it all out on
25052 one looong line, then that's ok.
25053
25054 The meaning of the various atoms are explained elsewhere in this
25055 manual (@pxref{Score File Format}).
25056
25057
25058 @node Headers
25059 @subsection Headers
25060
25061 Internally Gnus uses a format for storing article headers that
25062 corresponds to the @sc{nov} format in a mysterious fashion.  One could
25063 almost suspect that the author looked at the @sc{nov} specification and
25064 just shamelessly @emph{stole} the entire thing, and one would be right.
25065
25066 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
25067 RFC 1036 to talk about lines in the head of an article (e.g.,
25068 @code{From}).  It is used by many people as a synonym for
25069 ``head''---``the header and the body''.  (That should be avoided, in my
25070 opinion.)  And Gnus uses a format internally that it calls ``header'',
25071 which is what I'm talking about here.  This is a 9-element vector,
25072 basically, with each header (ouch) having one slot.
25073
25074 These slots are, in order: @code{number}, @code{subject}, @code{from},
25075 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
25076 @code{xref}, and @code{extra}.  There are macros for accessing and
25077 setting these slots---they all have predictable names beginning with
25078 @code{mail-header-} and @code{mail-header-set-}, respectively.
25079
25080 All these slots contain strings, except the @code{extra} slot, which
25081 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
25082
25083
25084 @node Ranges
25085 @subsection Ranges
25086
25087 @sc{gnus} introduced a concept that I found so useful that I've started
25088 using it a lot and have elaborated on it greatly.
25089
25090 The question is simple: If you have a large amount of objects that are
25091 identified by numbers (say, articles, to take a @emph{wild} example)
25092 that you want to qualify as being ``included'', a normal sequence isn't
25093 very useful.  (A 200,000 length sequence is a bit long-winded.)
25094
25095 The solution is as simple as the question: You just collapse the
25096 sequence.
25097
25098 @example
25099 (1 2 3 4 5 6 10 11 12)
25100 @end example
25101
25102 is transformed into
25103
25104 @example
25105 ((1 . 6) (10 . 12))
25106 @end example
25107
25108 To avoid having those nasty @samp{(13 . 13)} elements to denote a
25109 lonesome object, a @samp{13} is a valid element:
25110
25111 @example
25112 ((1 . 6) 7 (10 . 12))
25113 @end example
25114
25115 This means that comparing two ranges to find out whether they are equal
25116 is slightly tricky:
25117
25118 @example
25119 ((1 . 5) 7 8 (10 . 12))
25120 @end example
25121
25122 and
25123
25124 @example
25125 ((1 . 5) (7 . 8) (10 . 12))
25126 @end example
25127
25128 are equal.  In fact, any non-descending list is a range:
25129
25130 @example
25131 (1 2 3 4 5)
25132 @end example
25133
25134 is a perfectly valid range, although a pretty long-winded one.  This is
25135 also valid:
25136
25137 @example
25138 (1 . 5)
25139 @end example
25140
25141 and is equal to the previous range.
25142
25143 Here's a BNF definition of ranges.  Of course, one must remember the
25144 semantic requirement that the numbers are non-descending.  (Any number
25145 of repetition of the same number is allowed, but apt to disappear in
25146 range handling.)
25147
25148 @example
25149 range           = simple-range / normal-range
25150 simple-range    = "(" number " . " number ")"
25151 normal-range    = "(" start-contents ")"
25152 contents        = "" / simple-range *[ " " contents ] /
25153                   number *[ " " contents ]
25154 @end example
25155
25156 Gnus currently uses ranges to keep track of read articles and article
25157 marks.  I plan on implementing a number of range operators in C if The
25158 Powers That Be are willing to let me.  (I haven't asked yet, because I
25159 need to do some more thinking on what operators I need to make life
25160 totally range-based without ever having to convert back to normal
25161 sequences.)
25162
25163
25164 @node Group Info
25165 @subsection Group Info
25166
25167 Gnus stores all permanent info on groups in a @dfn{group info} list.
25168 This list is from three to six elements (or more) long and exhaustively
25169 describes the group.
25170
25171 Here are two example group infos; one is a very simple group while the
25172 second is a more complex one:
25173
25174 @example
25175 ("no.group" 5 ((1 . 54324)))
25176
25177 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
25178                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
25179                 (nnml "")
25180                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
25181 @end example
25182
25183 The first element is the @dfn{group name}---as Gnus knows the group,
25184 anyway.  The second element is the @dfn{subscription level}, which
25185 normally is a small integer.  (It can also be the @dfn{rank}, which is a
25186 cons cell where the @code{car} is the level and the @code{cdr} is the
25187 score.)  The third element is a list of ranges of read articles.  The
25188 fourth element is a list of lists of article marks of various kinds.
25189 The fifth element is the select method (or virtual server, if you like).
25190 The sixth element is a list of @dfn{group parameters}, which is what
25191 this section is about.
25192
25193 Any of the last three elements may be missing if they are not required.
25194 In fact, the vast majority of groups will normally only have the first
25195 three elements, which saves quite a lot of cons cells.
25196
25197 Here's a BNF definition of the group info format:
25198
25199 @example
25200 info          = "(" group space ralevel space read
25201                 [ "" / [ space marks-list [ "" / [ space method [ "" /
25202                 space parameters ] ] ] ] ] ")"
25203 group         = quote <string> quote
25204 ralevel       = rank / level
25205 level         = <integer in the range of 1 to inf>
25206 rank          = "(" level "." score ")"
25207 score         = <integer in the range of 1 to inf>
25208 read          = range
25209 marks-lists   = nil / "(" *marks ")"
25210 marks         = "(" <string> range ")"
25211 method        = "(" <string> *elisp-forms ")"
25212 parameters    = "(" *elisp-forms ")"
25213 @end example
25214
25215 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
25216 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
25217 in pseudo-BNF.
25218
25219 If you have a Gnus info and want to access the elements, Gnus offers a
25220 series of macros for getting/setting these elements.
25221
25222 @table @code
25223 @item gnus-info-group
25224 @itemx gnus-info-set-group
25225 @findex gnus-info-group
25226 @findex gnus-info-set-group
25227 Get/set the group name.
25228
25229 @item gnus-info-rank
25230 @itemx gnus-info-set-rank
25231 @findex gnus-info-rank
25232 @findex gnus-info-set-rank
25233 Get/set the group rank (@pxref{Group Score}).
25234
25235 @item gnus-info-level
25236 @itemx gnus-info-set-level
25237 @findex gnus-info-level
25238 @findex gnus-info-set-level
25239 Get/set the group level.
25240
25241 @item gnus-info-score
25242 @itemx gnus-info-set-score
25243 @findex gnus-info-score
25244 @findex gnus-info-set-score
25245 Get/set the group score (@pxref{Group Score}).
25246
25247 @item gnus-info-read
25248 @itemx gnus-info-set-read
25249 @findex gnus-info-read
25250 @findex gnus-info-set-read
25251 Get/set the ranges of read articles.
25252
25253 @item gnus-info-marks
25254 @itemx gnus-info-set-marks
25255 @findex gnus-info-marks
25256 @findex gnus-info-set-marks
25257 Get/set the lists of ranges of marked articles.
25258
25259 @item gnus-info-method
25260 @itemx gnus-info-set-method
25261 @findex gnus-info-method
25262 @findex gnus-info-set-method
25263 Get/set the group select method.
25264
25265 @item gnus-info-params
25266 @itemx gnus-info-set-params
25267 @findex gnus-info-params
25268 @findex gnus-info-set-params
25269 Get/set the group parameters.
25270 @end table
25271
25272 All the getter functions take one parameter---the info list.  The setter
25273 functions take two parameters---the info list and the new value.
25274
25275 The last three elements in the group info aren't mandatory, so it may be
25276 necessary to extend the group info before setting the element.  If this
25277 is necessary, you can just pass on a non-@code{nil} third parameter to
25278 the three final setter functions to have this happen automatically.
25279
25280
25281 @node Extended Interactive
25282 @subsection Extended Interactive
25283 @cindex interactive
25284 @findex gnus-interactive
25285
25286 Gnus extends the standard Emacs @code{interactive} specification
25287 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
25288 Prefixes}).  Here's an example of how this is used:
25289
25290 @lisp
25291 (defun gnus-summary-increase-score (&optional score symp)
25292   (interactive (gnus-interactive "P\ny"))
25293   ...
25294   )
25295 @end lisp
25296
25297 The best thing to do would have been to implement
25298 @code{gnus-interactive} as a macro which would have returned an
25299 @code{interactive} form, but this isn't possible since Emacs checks
25300 whether a function is interactive or not by simply doing an @code{assq}
25301 on the lambda form.  So, instead we have @code{gnus-interactive}
25302 function that takes a string and returns values that are usable to
25303 @code{interactive}.
25304
25305 This function accepts (almost) all normal @code{interactive} specs, but
25306 adds a few more.
25307
25308 @table @samp
25309 @item y
25310 @vindex gnus-current-prefix-symbol
25311 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
25312 variable.
25313
25314 @item Y
25315 @vindex gnus-current-prefix-symbols
25316 A list of the current symbolic prefixes---the
25317 @code{gnus-current-prefix-symbol} variable.
25318
25319 @item A
25320 The current article number---the @code{gnus-summary-article-number}
25321 function.
25322
25323 @item H
25324 The current article header---the @code{gnus-summary-article-header}
25325 function.
25326
25327 @item g
25328 The current group name---the @code{gnus-group-group-name}
25329 function.
25330
25331 @end table
25332
25333
25334 @node Emacs/XEmacs Code
25335 @subsection Emacs/XEmacs Code
25336 @cindex XEmacs
25337 @cindex Emacsen
25338
25339 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
25340 platforms must be the primary one.  I chose Emacs.  Not because I don't
25341 like XEmacs or Mule, but because it comes first alphabetically.
25342
25343 This means that Gnus will byte-compile under Emacs with nary a warning,
25344 while XEmacs will pump out gigabytes of warnings while byte-compiling.
25345 As I use byte-compilation warnings to help me root out trivial errors in
25346 Gnus, that's very useful.
25347
25348 I've also consistently used Emacs function interfaces, but have used
25349 Gnusey aliases for the functions.  To take an example:  Emacs defines a
25350 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
25351 function.  I then define a function called @code{gnus-run-at-time} that
25352 takes the same parameters as the Emacs @code{run-at-time}.  When running
25353 Gnus under Emacs, the former function is just an alias for the latter.
25354 However, when running under XEmacs, the former is an alias for the
25355 following function:
25356
25357 @lisp
25358 (defun gnus-xmas-run-at-time (time repeat function &rest args)
25359   (start-itimer
25360    "gnus-run-at-time"
25361    `(lambda ()
25362       (,function ,@@args))
25363    time repeat))
25364 @end lisp
25365
25366 This sort of thing has been done for bunches of functions.  Gnus does
25367 not redefine any native Emacs functions while running under XEmacs---it
25368 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
25369 all over.
25370
25371 In the cases where the XEmacs function interface was obviously cleaner,
25372 I used it instead.  For example @code{gnus-region-active-p} is an alias
25373 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
25374
25375 Of course, I could have chosen XEmacs as my native platform and done
25376 mapping functions the other way around.  But I didn't.  The performance
25377 hit these indirections impose on Gnus under XEmacs should be slight.
25378
25379
25380 @node Various File Formats
25381 @subsection Various File Formats
25382
25383 @menu
25384 * Active File Format::          Information on articles and groups available.
25385 * Newsgroups File Format::      Group descriptions.
25386 @end menu
25387
25388
25389 @node Active File Format
25390 @subsubsection Active File Format
25391
25392 The active file lists all groups available on the server in
25393 question.  It also lists the highest and lowest current article numbers
25394 in each group.
25395
25396 Here's an excerpt from a typical active file:
25397
25398 @example
25399 soc.motss 296030 293865 y
25400 alt.binaries.pictures.fractals 3922 3913 n
25401 comp.sources.unix 1605 1593 m
25402 comp.binaries.ibm.pc 5097 5089 y
25403 no.general 1000 900 y
25404 @end example
25405
25406 Here's a pseudo-BNF definition of this file:
25407
25408 @example
25409 active      = *group-line
25410 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
25411 group       = <non-white-space string>
25412 spc         = " "
25413 high-number = <non-negative integer>
25414 low-number  = <positive integer>
25415 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
25416 @end example
25417
25418 For a full description of this file, see the manual pages for
25419 @samp{innd}, in particular @samp{active(5)}.
25420
25421
25422 @node Newsgroups File Format
25423 @subsubsection Newsgroups File Format
25424
25425 The newsgroups file lists groups along with their descriptions.  Not all
25426 groups on the server have to be listed,  and not all groups in the file
25427 have to exist on the server.  The file is meant purely as information to
25428 the user.
25429
25430 The format is quite simple; a group name, a tab, and the description.
25431 Here's the definition:
25432
25433 @example
25434 newsgroups    = *line
25435 line          = group tab description <NEWLINE>
25436 group         = <non-white-space string>
25437 tab           = <TAB>
25438 description   = <string>
25439 @end example
25440
25441
25442 @page
25443 @node Emacs for Heathens
25444 @section Emacs for Heathens
25445
25446 Believe it or not, but some people who use Gnus haven't really used
25447 Emacs much before they embarked on their journey on the Gnus Love Boat.
25448 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
25449 region'', and ``set @code{gnus-flargblossen} to an alist where the key
25450 is a regexp that is used for matching on the group name'' are magical
25451 phrases with little or no meaning, then this appendix is for you.  If
25452 you are already familiar with Emacs, just ignore this and go fondle your
25453 cat instead.
25454
25455 @menu
25456 * Keystrokes::                  Entering text and executing commands.
25457 * Emacs Lisp::                  The built-in Emacs programming language.
25458 @end menu
25459
25460
25461 @node Keystrokes
25462 @subsection Keystrokes
25463
25464 @itemize @bullet
25465 @item
25466 Q: What is an experienced Emacs user?
25467
25468 @item
25469 A: A person who wishes that the terminal had pedals.
25470 @end itemize
25471
25472 Yes, when you use Emacs, you are apt to use the control key, the shift
25473 key and the meta key a lot.  This is very annoying to some people
25474 (notably @code{vi}le users), and the rest of us just love the hell out
25475 of it.  Just give up and submit.  Emacs really does stand for
25476 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
25477 may have heard from other disreputable sources (like the Emacs author).
25478
25479 The shift keys are normally located near your pinky fingers, and are
25480 normally used to get capital letters and stuff.  You probably use it all
25481 the time.  The control key is normally marked ``CTRL'' or something like
25482 that.  The meta key is, funnily enough, never marked as such on any
25483 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
25484 which is the meta key on this keyboard.  It's usually located somewhere
25485 to the left hand side of the keyboard, usually on the bottom row.
25486
25487 Now, us Emacs people don't say ``press the meta-control-m key'',
25488 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
25489 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
25490 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
25491 down the control key, and hold it down while you press @kbd{k}''.
25492 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
25493 the control key and then press @kbd{k}''.  Simple, ay?
25494
25495 This is somewhat complicated by the fact that not all keyboards have a
25496 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
25497 means ``press escape, release escape, press @kbd{k}''.  That's much more
25498 work than if you have a meta key, so if that's the case, I respectfully
25499 suggest you get a real keyboard with a meta key.  You can't live without
25500 it.
25501
25502
25503
25504 @node Emacs Lisp
25505 @subsection Emacs Lisp
25506
25507 Emacs is the King of Editors because it's really a Lisp interpreter.
25508 Each and every key you tap runs some Emacs Lisp code snippet, and since
25509 Emacs Lisp is an interpreted language, that means that you can configure
25510 any key to run any arbitrary code.  You just, like, do it.
25511
25512 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
25513 functions.  (These are byte-compiled for speed, but it's still
25514 interpreted.)  If you decide that you don't like the way Gnus does
25515 certain things, it's trivial to have it do something a different way.
25516 (Well, at least if you know how to write Lisp code.)  However, that's
25517 beyond the scope of this manual, so we are simply going to talk about
25518 some common constructs that you normally use in your @file{.emacs} file
25519 to customize Gnus.
25520
25521 If you want to set the variable @code{gnus-florgbnize} to four (4), you
25522 write the following:
25523
25524 @lisp
25525 (setq gnus-florgbnize 4)
25526 @end lisp
25527
25528 This function (really ``special form'') @code{setq} is the one that can
25529 set a variable to some value.  This is really all you need to know.  Now
25530 you can go and fill your @code{.emacs} file with lots of these to change
25531 how Gnus works.
25532
25533 If you have put that thing in your @code{.emacs} file, it will be read
25534 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
25535 start Emacs.  If you want to change the variable right away, simply say
25536 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
25537 previous ``form'', which is a simple @code{setq} statement here.
25538
25539 Go ahead---just try it, if you're located at your Emacs.  After you
25540 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
25541 is the return value of the form you @code{eval}ed.
25542
25543 Some pitfalls:
25544
25545 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
25546 that means:
25547
25548 @lisp
25549 (setq gnus-read-active-file 'some)
25550 @end lisp
25551
25552 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
25553 @samp{nntp.ifi.uio.no}'', that means:
25554
25555 @lisp
25556 (setq gnus-nntp-server "nntp.ifi.uio.no")
25557 @end lisp
25558
25559 So be careful not to mix up strings (the latter) with symbols (the
25560 former).  The manual is unambiguous, but it can be confusing.
25561
25562 @page
25563 @include gnus-faq.texi
25564
25565 @node Index
25566 @chapter Index
25567 @printindex cp
25568
25569 @node Key Index
25570 @chapter Key Index
25571 @printindex ky
25572
25573 @summarycontents
25574 @contents
25575 @bye
25576
25577 @iftex
25578 @iflatex
25579 \end{document}
25580 @end iflatex
25581 @end iftex
25582
25583 @c Local Variables:
25584 @c mode: texinfo
25585 @c coding: iso-8859-1
25586 @c End:
25587 % LocalWords:  BNF mucho detailmenu cindex kindex kbd
25588 % LocalWords:  findex Gnusae vindex dfn dfn samp nntp setq nnspool nntpserver
25589 % LocalWords:  nnmbox newusers Blllrph NEWGROUPS dingnusdingnusdingnus
25590 % LocalWords:  pre fab rec comp nnslashdot regex ga ga sci nnml nnbabyl nnmh
25591 % LocalWords:  nnfolder emph looong eld newsreaders defun init elc pxref