5a055c61cb3c0f60b000f14f24b4b9c3206d922a
[gnus] / texi / gnus.texi
1 \input texinfo
2
3 @setfilename gnus
4 @settitle Gnus Manual
5 @syncodeindex fn cp
6 @syncodeindex vr cp
7 @syncodeindex 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}{Gnus v5.10.2}
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{\gnusenv}[1]{\gnustt{#1}}
57 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
58 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
59 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
60 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
61 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
62 \newcommand{\gnusdfn}[1]{\textit{#1}}
63 \newcommand{\gnusi}[1]{\textit{#1}}
64 \newcommand{\gnusr}[1]{\textrm{#1}}
65 \newcommand{\gnusstrong}[1]{\textbf{#1}}
66 \newcommand{\gnusemph}[1]{\textit{#1}}
67 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
68 \newcommand{\gnussc}[1]{\textsc{#1}}
69 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
70 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
71 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
72 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
73 \newcommand{\gnusacronym}[1]{\textsc{#1}}
74 \newcommand{\gnusemail}[1]{\textit{#1}}
75
76 \newcommand{\gnusbullet}{{${\bullet}$}}
77 \newcommand{\gnusdollar}{\$}
78 \newcommand{\gnusampersand}{\&}
79 \newcommand{\gnuspercent}{\%}
80 \newcommand{\gnushash}{\#}
81 \newcommand{\gnushat}{\symbol{"5E}}
82 \newcommand{\gnusunderline}{\symbol{"5F}}
83 \newcommand{\gnusnot}{$\neg$}
84 \newcommand{\gnustilde}{\symbol{"7E}}
85 \newcommand{\gnusless}{{$<$}}
86 \newcommand{\gnusgreater}{{$>$}}
87 \newcommand{\gnusbraceleft}{{$>$}}
88 \newcommand{\gnusbraceright}{{$>$}}
89
90 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
91 \newcommand{\gnusinteresting}{
92 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
93 }
94
95 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
96
97 \newcommand{\gnuspagechapter}[1]{
98 {\mbox{}}
99 }
100
101 \newdimen{\gnusdimen}
102 \gnusdimen 0pt
103
104 \newcommand{\gnuschapter}[2]{
105 \gnuscleardoublepage
106 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
107 \chapter{#2}
108 \renewcommand{\gnussectionname}{}
109 \renewcommand{\gnuschaptername}{#2}
110 \thispagestyle{empty}
111 \hspace*{-2cm}
112 \begin{picture}(500,500)(0,0)
113 \put(480,350){\makebox(0,0)[tr]{#1}}
114 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
115 \end{picture}
116 \clearpage
117 }
118
119 \newcommand{\gnusfigure}[3]{
120 \begin{figure}
121 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
122 #3
123 \end{picture}
124 \caption{#1}
125 \end{figure}
126 }
127
128 \newcommand{\gnusicon}[1]{
129 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
130 }
131
132 \newcommand{\gnuspicon}[1]{
133 \margindex{\epsfig{figure=#1,width=2cm}}
134 }
135
136 \newcommand{\gnusxface}[2]{
137 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
138 }
139
140 \newcommand{\gnussmiley}[2]{
141 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
142 }
143
144 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
145
146 \newcommand{\gnussection}[1]{
147 \renewcommand{\gnussectionname}{#1}
148 \section{#1}
149 }
150
151 \newenvironment{codelist}%
152 {\begin{list}{}{
153 }
154 }{\end{list}}
155
156 \newenvironment{kbdlist}%
157 {\begin{list}{}{
158 \labelwidth=0cm
159 }
160 }{\end{list}}
161
162 \newenvironment{dfnlist}%
163 {\begin{list}{}{
164 }
165 }{\end{list}}
166
167 \newenvironment{stronglist}%
168 {\begin{list}{}{
169 }
170 }{\end{list}}
171
172 \newenvironment{samplist}%
173 {\begin{list}{}{
174 }
175 }{\end{list}}
176
177 \newenvironment{varlist}%
178 {\begin{list}{}{
179 }
180 }{\end{list}}
181
182 \newenvironment{emphlist}%
183 {\begin{list}{}{
184 }
185 }{\end{list}}
186
187 \newlength\gnusheadtextwidth
188 \setlength{\gnusheadtextwidth}{\headtextwidth}
189 \addtolength{\gnusheadtextwidth}{1cm}
190
191 \newpagestyle{gnuspreamble}%
192 {
193 {
194 \ifodd\count0
195 {
196 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
197 }
198 \else
199 {
200 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
201 }
202 }
203 \fi
204 }
205 }
206 {
207 \ifodd\count0
208 \mbox{} \hfill
209 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
210 \else
211 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
212 \hfill \mbox{}
213 \fi
214 }
215
216 \newpagestyle{gnusindex}%
217 {
218 {
219 \ifodd\count0
220 {
221 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
222 }
223 \else
224 {
225 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
226 }
227 \fi
228 }
229 }
230 {
231 \ifodd\count0
232 \mbox{} \hfill
233 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
234 \else
235 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
236 \hfill \mbox{}
237 \fi
238 }
239
240 \newpagestyle{gnus}%
241 {
242 {
243 \ifodd\count0
244 {
245 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
246 }
247 \else
248 {
249 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
250 }
251 \fi
252 }
253 }
254 {
255 \ifodd\count0
256 \mbox{} \hfill
257 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
258 \else
259 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
260 \hfill \mbox{}
261 \fi
262 }
263
264 \pagenumbering{roman}
265 \pagestyle{gnuspreamble}
266
267 @end iflatex
268 @end iftex
269
270 @iftex
271 @iflatex
272 \begin{titlepage}
273 {
274
275 %\addtolength{\oddsidemargin}{-5cm}
276 %\addtolength{\evensidemargin}{-5cm}
277 \parindent=0cm
278 \addtolength{\textheight}{2cm}
279
280 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
281 \rule{15cm}{1mm}\\
282 \vfill
283 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
284 \vfill
285 \rule{15cm}{1mm}\\
286 \gnusauthor{by Lars Magne Ingebrigtsen}
287 \newpage
288 }
289
290 \mbox{}
291 \vfill
292
293 \thispagestyle{empty}
294
295 Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
296 2002, 2003
297 Free Software Foundation, Inc.
298
299
300 Permission is granted to copy, distribute and/or modify this document
301 under the terms of the GNU Free Documentation License, Version 1.1 or
302 any later version published by the Free Software Foundation; with no
303 Invariant Sections, with the Front-Cover texts being ``A GNU
304 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
305 license is included in the section entitled ``GNU Free Documentation
306 License'' in the Emacs manual.
307
308 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
309 this GNU Manual, like GNU software.  Copies published by the Free
310 Software Foundation raise funds for GNU development.''
311
312 This document is part of a collection distributed under the GNU Free
313 Documentation License.  If you want to distribute this document
314 separately from the collection, you can do so by adding a copy of the
315 license to the document, as described in section 6 of the license.
316 \newpage
317 \end{titlepage}
318 @end iflatex
319 @end iftex
320
321 @ifnottex
322
323 This file documents Gnus, the GNU Emacs newsreader.
324
325 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
326         Free Software Foundation, Inc.
327
328 Permission is granted to copy, distribute and/or modify this document
329 under the terms of the GNU Free Documentation License, Version 1.1 or
330 any later version published by the Free Software Foundation; with the
331 Invariant Sections being none, with the Front-Cover texts being ``A GNU
332 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
333 license is included in the section entitled ``GNU Free Documentation
334 License'' in the Emacs manual.
335
336 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
337 this GNU Manual, like GNU software.  Copies published by the Free
338 Software Foundation raise funds for GNU development.''
339
340 This document is part of a collection distributed under the GNU Free
341 Documentation License.  If you want to distribute this document
342 separately from the collection, you can do so by adding a copy of the
343 license to the document, as described in section 6 of the license.
344 @end ifnottex
345
346 @tex
347
348 @titlepage
349 @title Gnus Manual
350
351 @author by Lars Magne Ingebrigtsen
352 @page
353
354 @vskip 0pt plus 1filll
355 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
356 2002, 2003
357         Free Software Foundation, Inc.
358
359 Permission is granted to copy, distribute and/or modify this document
360 under the terms of the GNU Free Documentation License, Version 1.1 or
361 any later version published by the Free Software Foundation; with no
362 Invariant Sections, with the Front-Cover texts being ``A GNU
363 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
364 license is included in the section entitled ``GNU Free Documentation
365 License'' in the Emacs manual.
366
367 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
368 this GNU Manual, like GNU software.  Copies published by the Free
369 Software Foundation raise funds for GNU development.''
370
371 This document is part of a collection distributed under the GNU Free
372 Documentation License.  If you want to distribute this document
373 separately from the collection, you can do so by adding a copy of the
374 license to the document, as described in section 6 of the license.
375
376 @end titlepage
377 @page
378
379 @end tex
380
381
382 @node Top
383 @top The Gnus Newsreader
384
385 @ifinfo
386
387 You can read news (and mail) from within Emacs by using Gnus.  The news
388 can be gotten by any nefarious means you can think of---@acronym{NNTP}, local
389 spool or your mbox file.  All at the same time, if you want to push your
390 luck.
391
392 This manual corresponds to Gnus v5.10.2.
393
394 @end ifinfo
395
396 @iftex
397
398 @iflatex
399 \tableofcontents
400 \gnuscleardoublepage
401 @end iflatex
402
403 Gnus is the advanced, self-documenting, customizable, extensible
404 unreal-time newsreader for GNU Emacs.
405
406 Oops.  That sounds oddly familiar, so let's start over again to avoid
407 being accused of plagiarism:
408
409 Gnus is a message-reading laboratory.  It will let you look at just
410 about anything as if it were a newsgroup.  You can read mail with it,
411 you can browse directories with it, you can @code{ftp} with it---you
412 can even read news with it!
413
414 Gnus tries to empower people who read news the same way Emacs empowers
415 people who edit text.  Gnus sets no limits to what the user should be
416 allowed to do.  Users are encouraged to extend Gnus to make it behave
417 like they want it to behave.  A program should not control people;
418 people should be empowered to do what they want by using (or abusing)
419 the program.
420
421 @end iftex
422
423 @menu
424 * Starting Up::                 Finding news can be a pain.
425 * Group Buffer::                Selecting, subscribing and killing groups.
426 * Summary Buffer::              Reading, saving and posting articles.
427 * Article Buffer::              Displaying and handling articles.
428 * Composing Messages::          Information on sending mail and news.
429 * Select Methods::              Gnus reads all messages from various select methods.
430 * Scoring::                     Assigning values to articles.
431 * Various::                     General purpose settings.
432 * The End::                     Farewell and goodbye.
433 * Appendices::                  Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
434 * Index::                       Variable, function and concept index.
435 * Key Index::                   Key Index.
436
437 Other related manuals
438
439 * Message:(message).            Composing messages.
440 * Emacs-MIME:(emacs-mime).      Composing messages; @acronym{MIME}-specific parts.
441 * Sieve:(sieve).                Managing Sieve scripts in Emacs.
442 * PGG:(pgg).                    @acronym{PGP/MIME} with Gnus.
443
444 @detailmenu
445  --- The Detailed Node Listing ---
446
447 Starting Gnus
448
449 * Finding the News::            Choosing a method for getting news.
450 * The First Time::              What does Gnus do the first time you start it?
451 * The Server is Down::          How can I read my mail then?
452 * Slave Gnusae::                You can have more than one Gnus active at a time.
453 * Fetching a Group::            Starting Gnus just to read a group.
454 * New Groups::                  What is Gnus supposed to do with new groups?
455 * Changing Servers::            You may want to move from one server to another.
456 * Startup Files::               Those pesky startup files---@file{.newsrc}.
457 * Auto Save::                   Recovering from a crash.
458 * The Active File::             Reading the active file over a slow line Takes Time.
459 * Startup Variables::           Other variables you might change.
460
461 New Groups
462
463 * Checking New Groups::         Determining what groups are new.
464 * Subscription Methods::        What Gnus should do with new groups.
465 * Filtering New Groups::        Making Gnus ignore certain new groups.
466
467 Group Buffer
468
469 * Group Buffer Format::         Information listed and how you can change it.
470 * Group Maneuvering::           Commands for moving in the group buffer.
471 * Selecting a Group::           Actually reading news.
472 * Subscription Commands::       Unsubscribing, killing, subscribing.
473 * Group Data::                  Changing the info for a group.
474 * Group Levels::                Levels? What are those, then?
475 * Group Score::                 A mechanism for finding out what groups you like.
476 * Marking Groups::              You can mark groups for later processing.
477 * Foreign Groups::              Creating and editing groups.
478 * Group Parameters::            Each group may have different parameters set.
479 * Listing Groups::              Gnus can list various subsets of the groups.
480 * Sorting Groups::              Re-arrange the group order.
481 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
482 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
483 * Exiting Gnus::                Stop reading news and get some work done.
484 * Group Topics::                A folding group mode divided into topics.
485 * Misc Group Stuff::            Other stuff that you can to do.
486
487 Group Buffer Format
488
489 * Group Line Specification::    Deciding how the group buffer is to look.
490 * Group Mode Line Specification::  The group buffer mode line.
491 * Group Highlighting::          Having nice colors in the group buffer.
492
493 Group Topics
494
495 * Topic Commands::              Interactive E-Z commands.
496 * Topic Variables::             How to customize the topics the Lisp Way.
497 * Topic Sorting::               Sorting each topic individually.
498 * Topic Topology::              A map of the world.
499 * Topic Parameters::            Parameters that apply to all groups in a topic.
500
501 Misc Group Stuff
502
503 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
504 * Group Information::           Information and help on groups and Gnus.
505 * Group Timestamp::             Making Gnus keep track of when you last read a group.
506 * File Commands::               Reading and writing the Gnus files.
507 * Sieve Commands::              Managing Sieve scripts.
508
509 Summary Buffer
510
511 * Summary Buffer Format::       Deciding how the summary buffer is to look.
512 * Summary Maneuvering::         Moving around the summary buffer.
513 * Choosing Articles::           Reading articles.
514 * Paging the Article::          Scrolling the current article.
515 * Reply Followup and Post::     Posting articles.
516 * Delayed Articles::            Send articles at a later time.
517 * Marking Articles::            Marking articles as read, expirable, etc.
518 * Limiting::                    You can limit the summary buffer.
519 * Threading::                   How threads are made.
520 * Sorting the Summary Buffer::  How articles and threads are sorted.
521 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
522 * Article Caching::             You may store articles in a cache.
523 * Persistent Articles::         Making articles expiry-resistant.
524 * Article Backlog::             Having already read articles hang around.
525 * Saving Articles::             Ways of customizing article saving.
526 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
527 * Article Treatment::           The article buffer can be mangled at will.
528 * MIME Commands::               Doing MIMEy things with the articles.
529 * Charsets::                    Character set issues.
530 * Article Commands::            Doing various things with the article buffer.
531 * Summary Sorting::             Sorting the summary buffer in various ways.
532 * Finding the Parent::          No child support? Get the parent.
533 * Alternative Approaches::      Reading using non-default summaries.
534 * Tree Display::                A more visual display of threads.
535 * Mail Group Commands::         Some commands can only be used in mail groups.
536 * Various Summary Stuff::       What didn't fit anywhere else.
537 * Exiting the Summary Buffer::  Returning to the Group buffer,
538                                 or reselecting the current group.
539 * Crosspost Handling::          How crossposted articles are dealt with.
540 * Duplicate Suppression::       An alternative when crosspost handling fails.
541 * Security::                    Decrypt and Verify.
542 * Mailing List::                Mailing list minor mode.
543
544 Summary Buffer Format
545
546 * Summary Buffer Lines::        You can specify how summary lines should look.
547 * To From Newsgroups::          How to not display your own name.
548 * Summary Buffer Mode Line::    You can say how the mode line should look.
549 * Summary Highlighting::        Making the summary buffer all pretty and nice.
550
551 Choosing Articles
552
553 * Choosing Commands::           Commands for choosing articles.
554 * Choosing Variables::          Variables that influence these commands.
555
556 Reply, Followup and Post
557
558 * Summary Mail Commands::       Sending mail.
559 * Summary Post Commands::       Sending news.
560 * Summary Message Commands::    Other Message-related commands.
561 * Canceling and Superseding::   
562
563 Marking Articles
564
565 * Unread Articles::             Marks for unread articles.
566 * Read Articles::               Marks for read articles.
567 * Other Marks::                 Marks that do not affect readedness.
568 * Setting Marks::               
569 * Generic Marking Commands::    
570 * Setting Process Marks::       
571
572 Marking Articles
573
574 * Setting Marks::             How to set and remove marks.
575 * Generic Marking Commands::  How to customize the marking.
576 * Setting Process Marks::     How to mark articles for later processing.
577
578 Threading
579
580 * Customizing Threading::       Variables you can change to affect the threading.
581 * Thread Commands::             Thread based commands in the summary buffer.
582
583 Customizing Threading
584
585 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
586 * Filling In Threads::          Making the threads displayed look fuller.
587 * More Threading::              Even more variables for fiddling with threads.
588 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
589
590 Decoding Articles
591
592 * Uuencoded Articles::          Uudecode articles.
593 * Shell Archives::              Unshar articles.
594 * PostScript Files::            Split PostScript.
595 * Other Files::                 Plain save and binhex.
596 * Decoding Variables::          Variables for a happy decoding.
597 * Viewing Files::               You want to look at the result of the decoding?
598
599 Decoding Variables
600
601 * Rule Variables::              Variables that say how a file is to be viewed.
602 * Other Decode Variables::      Other decode variables.
603 * Uuencoding and Posting::      Variables for customizing uuencoding.
604
605 Article Treatment
606
607 * Article Highlighting::        You want to make the article look like fruit salad.
608 * Article Fontisizing::         Making emphasized text look nice.
609 * Article Hiding::              You also want to make certain info go away.
610 * Article Washing::             Lots of way-neat functions to make life better.
611 * Article Header::              Doing various header transformations.
612 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
613 * Article Button Levels::       Controlling appearance of buttons.
614 * Article Date::                Grumble, UT!
615 * Article Display::             Display various stuff---X-Face, Picons, Smileys
616 * Article Signature::           What is a signature?
617 * Article Miscellanea::         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 @acronym{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 @acronym{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 @acronym{NNTP} server.
674 * News Spool::                  Reading news from the local spool.
675
676 @acronym{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 cruft 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 * Maildir::                     Another one-file-per-message format.
711 * Mail Folders::                Having one file for each group.
712 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
713
714 Browsing the Web
715
716 * Archiving Mail::              
717 * Web Searches::                Creating groups from articles that match a string.
718 * Slashdot::                    Reading the Slashdot comments.
719 * Ultimate::                    The Ultimate Bulletin Board systems.
720 * Web Archive::                 Reading mailing list archived on web.
721 * RSS::                         Reading RDF site summary.
722 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
723
724 @acronym{IMAP}
725
726 * Splitting in IMAP::           Splitting mail with nnimap.
727 * Expiring in IMAP::            Expiring mail with nnimap.
728 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
729 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
730 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
731
732 Other Sources
733
734 * Directory Groups::            You can read a directory as if it was a newsgroup.
735 * Anything Groups::             Dired?  Who needs dired?
736 * Document Groups::             Single files can be the basis of a group.
737 * SOUP::                        Reading @sc{soup} packets ``offline''.
738 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
739
740 Document Groups
741
742 * Document Server Internals::   How to add your own document types.
743
744 SOUP
745
746 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
747 * SOUP Groups::                 A back end for reading @sc{soup} packets.
748 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
749
750 Combined Groups
751
752 * Virtual Groups::              Combining articles from many groups.
753 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
754
755 Gnus Unplugged
756
757 * Agent Basics::                How it all is supposed to work.
758 * Agent Categories::            How to tell the Gnus Agent what to download.
759 * Agent Commands::              New commands for all the buffers.
760 * Agent Visuals::               Ways that the agent may effect your summary buffer.
761 * Agent as Cache::              The Agent is a big cache too.
762 * Agent Expiry::                How to make old articles go away.
763 * Agent Regeneration::          How to recover from lost connections and other accidents.
764 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
765 * Outgoing Messages::           What happens when you post/mail something?
766 * Agent Variables::             Customizing is fun.
767 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
768 * Batching Agents::             How to fetch news from a @code{cron} job.
769 * Agent Caveats::               What you think it'll do and what it does.
770
771 Agent Categories
772
773 * Category Syntax::             What a category looks like.
774 * Category Buffer::             A buffer for maintaining categories.
775 * Category Variables::          Customize'r'Us.
776
777 Agent Commands
778
779 * Group Agent Commands::        Configure groups and fetch their contents.
780 * Summary Agent Commands::      Manually select then fetch specific articles.
781 * Server Agent Commands::       Select the servers that are supported by the agent.
782
783 Scoring
784
785 * Summary Score Commands::      Adding score entries for the current group.
786 * Group Score Commands::        General score commands.
787 * Score Variables::             Customize your scoring.  (My, what terminology).
788 * Score File Format::           What a score file may contain.
789 * Score File Editing::          You can edit score files by hand as well.
790 * Adaptive Scoring::            Big Sister Gnus knows what you read.
791 * Home Score File::             How to say where new score entries are to go.
792 * Followups To Yourself::       Having Gnus notice when people answer you.
793 * Scoring On Other Headers::    Scoring on non-standard headers.
794 * Scoring Tips::                How to score effectively.
795 * Reverse Scoring::             That problem child of old is not problem.
796 * Global Score Files::          Earth-spanning, ear-splitting score files.
797 * Kill Files::                  They are still here, but they can be ignored.
798 * Converting Kill Files::       Translating kill files to score files.
799 * GroupLens::                   Getting predictions on what you like to read.
800 * Advanced Scoring::            Using logical expressions to build score rules.
801 * Score Decays::                It can be useful to let scores wither away.
802
803 GroupLens
804
805 * Using GroupLens::             How to make Gnus use GroupLens.
806 * Rating Articles::             Letting GroupLens know how you rate articles.
807 * Displaying Predictions::      Displaying predictions given by GroupLens.
808 * GroupLens Variables::         Customizing GroupLens.
809
810 Advanced Scoring
811
812 * Advanced Scoring Syntax::     A definition.
813 * Advanced Scoring Examples::   What they look like.
814 * Advanced Scoring Tips::       Getting the most out of it.
815
816 Various
817
818 * Process/Prefix::              A convention used by many treatment commands.
819 * Interactive::                 Making Gnus ask you many questions.
820 * Symbolic Prefixes::           How to supply some Gnus functions with options.
821 * Formatting Variables::        You can specify what buffers should look like.
822 * Window Layout::               Configuring the Gnus buffer windows.
823 * Faces and Fonts::             How to change how faces look.
824 * Compilation::                 How to speed Gnus up.
825 * Mode Lines::                  Displaying information in the mode lines.
826 * Highlighting and Menus::      Making buffers look all nice and cozy.
827 * Buttons::                     Get tendinitis in ten easy steps!
828 * Daemons::                     Gnus can do things behind your back.
829 * NoCeM::                       How to avoid spam and other fatty foods.
830 * Undo::                        Some actions can be undone.
831 * Predicate Specifiers::        Specifying predicates.
832 * Moderation::                  What to do if you're a moderator.
833 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
834 * Fuzzy Matching::              What's the big fuzz?
835 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
836 * Various Various::             Things that are really various.
837
838 Formatting Variables
839
840 * Formatting Basics::           A formatting variable is basically a format string.
841 * Mode Line Formatting::        Some rules about mode line formatting variables.
842 * Advanced Formatting::         Modifying output in various ways.
843 * User-Defined Specs::          Having Gnus call your own functions.
844 * Formatting Fonts::            Making the formatting look colorful and nice.
845 * Positioning Point::           Moving point to a position after an operation.
846 * Tabulation::                  Tabulating your output.
847 * Wide Characters::             Dealing with wide characters.
848
849 Image Enhancements
850
851 * Picons::                      How to display pictures of what you're reading.
852 * Smileys::                     Show all those happy faces the way they were meant to be shown.
853 * X-Face::                      Display a funky, teensy black-and-white image.
854 * XVarious::                    Other XEmacsy Gnusey variables.
855
856 Thwarting Email Spam
857
858 * The problem of spam::         Some background, and some solutions
859 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
860 * SpamAssassin::                How to use external anti-spam tools.
861 * Hashcash::                    Reduce spam by burning CPU time.
862 * Filtering Spam Using The Spam ELisp Package::  
863 * Filtering Spam Using Statistics with spam-stat::  
864
865 Appendices
866
867 * XEmacs::                      Requirements for installing under XEmacs.
868 * History::                     How Gnus got where it is today.
869 * On Writing Manuals::          Why this is not a beginner's guide.
870 * Terminology::                 We use really difficult, like, words here.
871 * Customization::               Tailoring Gnus to your needs.
872 * Troubleshooting::             What you might try if things do not work.
873 * Gnus Reference Guide::        Rilly, rilly technical stuff.
874 * Emacs for Heathens::          A short introduction to Emacsian terms.
875 * Frequently Asked Questions::  The Gnus FAQ.
876
877 History
878
879 * Gnus Versions::               What Gnus versions have been released.
880 * Other Gnus Versions::         Other Gnus versions that also have been released.
881 * Why?::                        What's the point of Gnus?
882 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
883 * Conformity::                  Gnus tries to conform to all standards.
884 * Emacsen::                     Gnus can be run on a few modern Emacsen.
885 * Gnus Development::            How Gnus is developed.
886 * Contributors::                Oodles of people.
887 * New Features::                Pointers to some of the new stuff in Gnus.
888
889 New Features
890
891 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
892 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
893 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
894 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
895 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
896 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
897
898 Customization
899
900 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
901 * Slow Terminal Connection::    You run a remote Emacs.
902 * Little Disk Space::           You feel that having large setup files is icky.
903 * Slow Machine::                You feel like buying a faster machine.
904
905 Gnus Reference Guide
906
907 * Gnus Utility Functions::      Common functions and variable to use.
908 * Back End Interface::          How Gnus communicates with the servers.
909 * Score File Syntax::           A BNF definition of the score file standard.
910 * Headers::                     How Gnus stores headers internally.
911 * Ranges::                      A handy format for storing mucho numbers.
912 * Group Info::                  The group info format.
913 * Extended Interactive::        Symbolic prefixes and stuff.
914 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
915 * Various File Formats::        Formats of files that Gnus use.
916
917 Back End Interface
918
919 * Required Back End Functions::  Functions that must be implemented.
920 * Optional Back End Functions::  Functions that need not be implemented.
921 * Error Messaging::             How to get messages and report errors.
922 * Writing New Back Ends::       Extending old back ends.
923 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
924 * Mail-like Back Ends::         Some tips on mail back ends.
925
926 Various File Formats
927
928 * Active File Format::          Information on articles and groups available.
929 * Newsgroups File Format::      Group descriptions.
930
931 Emacs for Heathens
932
933 * Keystrokes::                  Entering text and executing commands.
934 * Emacs Lisp::                  The built-in Emacs programming language.
935
936 @end detailmenu
937 @end menu
938
939 @node Starting Up
940 @chapter Starting Gnus
941 @cindex starting up
942
943 @kindex M-x gnus
944 @findex gnus
945 If your system administrator has set things up properly, starting Gnus
946 and reading news is extremely easy---you just type @kbd{M-x gnus} in
947 your Emacs.
948
949 @findex gnus-other-frame
950 @kindex M-x gnus-other-frame
951 If you want to start Gnus in a different frame, you can use the command
952 @kbd{M-x gnus-other-frame} instead.
953
954 If things do not go smoothly at startup, you have to twiddle some
955 variables in your @file{~/.gnus.el} file.  This file is similar to
956 @file{~/.emacs}, but is read when gnus starts.
957
958 If you puzzle at any terms used in this manual, please refer to the
959 terminology section (@pxref{Terminology}).
960
961 @menu
962 * Finding the News::            Choosing a method for getting news.
963 * The First Time::              What does Gnus do the first time you start it?
964 * The Server is Down::          How can I read my mail then?
965 * Slave Gnusae::                You can have more than one Gnus active at a time.
966 * Fetching a Group::            Starting Gnus just to read a group.
967 * New Groups::                  What is Gnus supposed to do with new groups?
968 * Changing Servers::            You may want to move from one server to another.
969 * Startup Files::               Those pesky startup files---@file{.newsrc}.
970 * Auto Save::                   Recovering from a crash.
971 * The Active File::             Reading the active file over a slow line Takes Time.
972 * Startup Variables::           Other variables you might change.
973 @end menu
974
975
976 @node Finding the News
977 @section Finding the News
978 @cindex finding news
979
980 @vindex gnus-select-method
981 @c @head
982 The @code{gnus-select-method} variable says where Gnus should look for
983 news.  This variable should be a list where the first element says
984 @dfn{how} and the second element says @dfn{where}.  This method is your
985 native method.  All groups not fetched with this method are
986 foreign groups.
987
988 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
989 you want to get your daily dosage of news from, you'd say:
990
991 @lisp
992 (setq gnus-select-method '(nntp "news.somewhere.edu"))
993 @end lisp
994
995 If you want to read directly from the local spool, say:
996
997 @lisp
998 (setq gnus-select-method '(nnspool ""))
999 @end lisp
1000
1001 If you can use a local spool, you probably should, as it will almost
1002 certainly be much faster.  But do not use the local spool if your
1003 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
1004
1005 @vindex gnus-nntpserver-file
1006 @cindex NNTPSERVER
1007 @cindex @acronym{NNTP} server
1008 If this variable is not set, Gnus will take a look at the
1009 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1010 Gnus will see whether @code{gnus-nntpserver-file}
1011 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1012 If that fails as well, Gnus will try to use the machine running Emacs
1013 as an @acronym{NNTP} server.  That's a long shot, though.
1014
1015 @vindex gnus-nntp-server
1016 If @code{gnus-nntp-server} is set, this variable will override
1017 @code{gnus-select-method}.  You should therefore set
1018 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1019
1020 @vindex gnus-secondary-servers
1021 @vindex gnus-nntp-server
1022 You can also make Gnus prompt you interactively for the name of an
1023 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1024 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
1025 in the @code{gnus-secondary-servers} list (if any).  You can also just
1026 type in the name of any server you feel like visiting.  (Note that this
1027 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1028 gnus} later in the same Emacs session, Gnus will contact the same
1029 server.)
1030
1031 @findex gnus-group-browse-foreign-server
1032 @kindex B (Group)
1033 However, if you use one @acronym{NNTP} server regularly and are just
1034 interested in a couple of groups from a different server, you would be
1035 better served by using the @kbd{B} command in the group buffer.  It will
1036 let you have a look at what groups are available, and you can subscribe
1037 to any of the groups you want to.  This also makes @file{.newsrc}
1038 maintenance much tidier.  @xref{Foreign Groups}.
1039
1040 @vindex gnus-secondary-select-methods
1041 @c @head
1042 A slightly different approach to foreign groups is to set the
1043 @code{gnus-secondary-select-methods} variable.  The select methods
1044 listed in this variable are in many ways just as native as the
1045 @code{gnus-select-method} server.  They will also be queried for active
1046 files during startup (if that's required), and new newsgroups that
1047 appear on these servers will be subscribed (or not) just as native
1048 groups are.
1049
1050 For instance, if you use the @code{nnmbox} back end to read your mail,
1051 you would typically set this variable to
1052
1053 @lisp
1054 (setq gnus-secondary-select-methods '((nnmbox "")))
1055 @end lisp
1056
1057
1058 @node The First Time
1059 @section The First Time
1060 @cindex first time usage
1061
1062 If no startup files exist, Gnus will try to determine what groups should
1063 be subscribed by default.
1064
1065 @vindex gnus-default-subscribed-newsgroups
1066 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
1067 will subscribe you to just those groups in that list, leaving the rest
1068 killed.  Your system administrator should have set this variable to
1069 something useful.
1070
1071 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
1072 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1073 here as @dfn{whatever Lars thinks you should read}.)
1074
1075 You'll also be subscribed to the Gnus documentation group, which should
1076 help you with most common problems.
1077
1078 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
1079 use the normal functions for handling new groups, and not do anything
1080 special.
1081
1082
1083 @node The Server is Down
1084 @section The Server is Down
1085 @cindex server errors
1086
1087 If the default server is down, Gnus will understandably have some
1088 problems starting.  However, if you have some mail groups in addition to
1089 the news groups, you may want to start Gnus anyway.
1090
1091 Gnus, being the trusting sort of program, will ask whether to proceed
1092 without a native select method if that server can't be contacted.  This
1093 will happen whether the server doesn't actually exist (i.e., you have
1094 given the wrong address) or the server has just momentarily taken ill
1095 for some reason or other.  If you decide to continue and have no foreign
1096 groups, you'll find it difficult to actually do anything in the group
1097 buffer.  But, hey, that's your problem.  Blllrph!
1098
1099 @findex gnus-no-server
1100 @kindex M-x gnus-no-server
1101 @c @head
1102 If you know that the server is definitely down, or you just want to read
1103 your mail without bothering with the server at all, you can use the
1104 @code{gnus-no-server} command to start Gnus.  That might come in handy
1105 if you're in a hurry as well.  This command will not attempt to contact
1106 your primary server---instead, it will just activate all groups on level
1107 1 and 2.  (You should preferably keep no native groups on those two
1108 levels.) Also @pxref{Group Levels}.
1109
1110
1111 @node Slave Gnusae
1112 @section Slave Gnusae
1113 @cindex slave
1114
1115 You might want to run more than one Emacs with more than one Gnus at the
1116 same time.  If you are using different @file{.newsrc} files (e.g., if you
1117 are using the two different Gnusae to read from two different servers),
1118 that is no problem whatsoever.  You just do it.
1119
1120 The problem appears when you want to run two Gnusae that use the same
1121 @file{.newsrc} file.
1122
1123 To work around that problem some, we here at the Think-Tank at the Gnus
1124 Towers have come up with a new concept: @dfn{Masters} and
1125 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1126 taken out a copyright on those words.  If you wish to use those words in
1127 conjunction with each other, you have to send $1 per usage instance to
1128 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1129 Applications}) will be much more expensive, of course.)
1130
1131 @findex gnus-slave
1132 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1133 however you do it).  Each subsequent slave Gnusae should be started with
1134 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1135 files, but instead save @dfn{slave files} that contain information only
1136 on what groups have been read in the slave session.  When a master Gnus
1137 starts, it will read (and delete) these slave files, incorporating all
1138 information from them.  (The slave files will be read in the sequence
1139 they were created, so the latest changes will have precedence.)
1140
1141 Information from the slave files has, of course, precedence over the
1142 information in the normal (i.e., master) @file{.newsrc} file.
1143
1144 If the @file{.newsrc*} files have not been saved in the master when the
1145 slave starts, you may be prompted as to whether to read an auto-save
1146 file.  If you answer ``yes'', the unsaved changes to the master will be
1147 incorporated into the slave.  If you answer ``no'', the slave may see some
1148 messages as unread that have been read in the master.
1149
1150 @node Fetching a Group
1151 @section Fetching a Group
1152 @cindex fetching a group
1153
1154 @findex gnus-fetch-group
1155 It is sometimes convenient to be able to just say ``I want to read this
1156 group and I don't care whether Gnus has been started or not''.  This is
1157 perhaps more useful for people who write code than for users, but the
1158 command @code{gnus-fetch-group} provides this functionality in any case.
1159 It takes the group name as a parameter.
1160
1161
1162 @node New Groups
1163 @section New Groups
1164 @cindex new groups
1165 @cindex subscription
1166
1167 @vindex gnus-check-new-newsgroups
1168 If you are satisfied that you really never want to see any new groups,
1169 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1170 also save you some time at startup.  Even if this variable is
1171 @code{nil}, you can always subscribe to the new groups just by pressing
1172 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1173 is @code{ask-server} by default.  If you set this variable to
1174 @code{always}, then Gnus will query the back ends for new groups even
1175 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1176
1177 @menu
1178 * Checking New Groups::         Determining what groups are new.
1179 * Subscription Methods::        What Gnus should do with new groups.
1180 * Filtering New Groups::        Making Gnus ignore certain new groups.
1181 @end menu
1182
1183
1184 @node Checking New Groups
1185 @subsection Checking New Groups
1186
1187 Gnus normally determines whether a group is new or not by comparing the
1188 list of groups from the active file(s) with the lists of subscribed and
1189 dead groups.  This isn't a particularly fast method.  If
1190 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
1191 server for new groups since the last time.  This is both faster and
1192 cheaper.  This also means that you can get rid of the list of killed
1193 groups altogether, so you may set @code{gnus-save-killed-list} to
1194 @code{nil}, which will save time both at startup, at exit, and all over.
1195 Saves disk space, too.  Why isn't this the default, then?
1196 Unfortunately, not all servers support this command.
1197
1198 I bet I know what you're thinking now: How do I find out whether my
1199 server supports @code{ask-server}?  No?  Good, because I don't have a
1200 fail-safe answer.  I would suggest just setting this variable to
1201 @code{ask-server} and see whether any new groups appear within the next
1202 few days.  If any do, then it works.  If none do, then it doesn't
1203 work.  I could write a function to make Gnus guess whether the server
1204 supports @code{ask-server}, but it would just be a guess.  So I won't.
1205 You could @code{telnet} to the server and say @code{HELP} and see
1206 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1207 it does, then it might work.  (But there are servers that lists
1208 @samp{NEWGROUPS} without supporting the function properly.)
1209
1210 This variable can also be a list of select methods.  If so, Gnus will
1211 issue an @code{ask-server} command to each of the select methods, and
1212 subscribe them (or not) using the normal methods.  This might be handy
1213 if you are monitoring a few servers for new groups.  A side effect is
1214 that startup will take much longer, so you can meditate while waiting.
1215 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1216
1217
1218 @node Subscription Methods
1219 @subsection Subscription Methods
1220
1221 @vindex gnus-subscribe-newsgroup-method
1222 What Gnus does when it encounters a new group is determined by the
1223 @code{gnus-subscribe-newsgroup-method} variable.
1224
1225 This variable should contain a function.  This function will be called
1226 with the name of the new group as the only parameter.
1227
1228 Some handy pre-fab functions are:
1229
1230 @table @code
1231
1232 @item gnus-subscribe-zombies
1233 @vindex gnus-subscribe-zombies
1234 Make all new groups zombies.  This is the default.  You can browse the
1235 zombies later (with @kbd{A z}) and either kill them all off properly
1236 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1237
1238 @item gnus-subscribe-randomly
1239 @vindex gnus-subscribe-randomly
1240 Subscribe all new groups in arbitrary order.  This really means that all
1241 new groups will be added at ``the top'' of the group buffer.
1242
1243 @item gnus-subscribe-alphabetically
1244 @vindex gnus-subscribe-alphabetically
1245 Subscribe all new groups in alphabetical order.
1246
1247 @item gnus-subscribe-hierarchically
1248 @vindex gnus-subscribe-hierarchically
1249 Subscribe all new groups hierarchically.  The difference between this
1250 function and @code{gnus-subscribe-alphabetically} is slight.
1251 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1252 alphabetical fashion, while this function will enter groups into its
1253 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1254 @samp{comp} hierarchy, this function will not mess that configuration
1255 up.  Or something like that.
1256
1257 @item gnus-subscribe-interactively
1258 @vindex gnus-subscribe-interactively
1259 Subscribe new groups interactively.  This means that Gnus will ask
1260 you about @strong{all} new groups.  The groups you choose to subscribe
1261 to will be subscribed hierarchically.
1262
1263 @item gnus-subscribe-killed
1264 @vindex gnus-subscribe-killed
1265 Kill all new groups.
1266
1267 @item gnus-subscribe-topics
1268 @vindex gnus-subscribe-topics
1269 Put the groups into the topic that has a matching @code{subscribe} topic
1270 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1271 topic parameter that looks like
1272
1273 @example
1274 "nnslashdot"
1275 @end example
1276
1277 will mean that all groups that match that regex will be subscribed under
1278 that topic.
1279
1280 If no topics match the groups, the groups will be subscribed in the
1281 top-level topic.
1282
1283 @end table
1284
1285 @vindex gnus-subscribe-hierarchical-interactive
1286 A closely related variable is
1287 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1288 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
1289 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1290 will ask you for each sub-hierarchy whether you want to descend the
1291 hierarchy or not.
1292
1293 One common mistake is to set the variable a few paragraphs above
1294 (@code{gnus-subscribe-newsgroup-method}) to
1295 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1296 will not work.  This is ga-ga.  So don't do it.
1297
1298
1299 @node Filtering New Groups
1300 @subsection Filtering New Groups
1301
1302 A nice and portable way to control which new newsgroups should be
1303 subscribed (or ignored) is to put an @dfn{options} line at the start of
1304 the @file{.newsrc} file.  Here's an example:
1305
1306 @example
1307 options -n !alt.all !rec.all sci.all
1308 @end example
1309
1310 @vindex gnus-subscribe-options-newsgroup-method
1311 This line obviously belongs to a serious-minded intellectual scientific
1312 person (or she may just be plain old boring), because it says that all
1313 groups that have names beginning with @samp{alt} and @samp{rec} should
1314 be ignored, and all groups with names beginning with @samp{sci} should
1315 be subscribed.  Gnus will not use the normal subscription method for
1316 subscribing these groups.
1317 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1318 variable defaults to @code{gnus-subscribe-alphabetically}.
1319
1320 @vindex gnus-options-not-subscribe
1321 @vindex gnus-options-subscribe
1322 If you don't want to mess with your @file{.newsrc} file, you can just
1323 set the two variables @code{gnus-options-subscribe} and
1324 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1325 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1326 and if the new group matches the former, it will be unconditionally
1327 subscribed, and if it matches the latter, it will be ignored.
1328
1329 @vindex gnus-auto-subscribed-groups
1330 Yet another variable that meddles here is
1331 @code{gnus-auto-subscribed-groups}.  It works exactly like
1332 @code{gnus-options-subscribe}, and is therefore really superfluous, but I
1333 thought it would be nice to have two of these.  This variable is more
1334 meant for setting some ground rules, while the other variable is used
1335 more for user fiddling.  By default this variable makes all new groups
1336 that come from mail back ends (@code{nnml}, @code{nnbabyl},
1337 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1338 subscribed.  If you don't like that, just set this variable to
1339 @code{nil}.
1340
1341 New groups that match this regexp are subscribed using
1342 @code{gnus-subscribe-options-newsgroup-method}.
1343
1344
1345 @node Changing Servers
1346 @section Changing Servers
1347 @cindex changing servers
1348
1349 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1350 This happens very rarely, but perhaps you change jobs, or one server is
1351 very flaky and you want to use another.
1352
1353 Changing the server is pretty easy, right?  You just change
1354 @code{gnus-select-method} to point to the new server?
1355
1356 @emph{Wrong!}
1357
1358 Article numbers are not (in any way) kept synchronized between different
1359 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1360 you have read is by keeping track of article numbers.  So when you
1361 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1362 worthless.
1363
1364 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1365 file from one server to another.  They all have one thing in
1366 common---they take a looong time to run.  You don't want to use these
1367 functions more than absolutely necessary.
1368
1369 @kindex M-x gnus-change-server
1370 @findex gnus-change-server
1371 If you have access to both servers, Gnus can request the headers for all
1372 the articles you have read and compare @code{Message-ID}s and map the
1373 article numbers of the read articles and article marks.  The @kbd{M-x
1374 gnus-change-server} command will do this for all your native groups.  It
1375 will prompt for the method you want to move to.
1376
1377 @kindex M-x gnus-group-move-group-to-server
1378 @findex gnus-group-move-group-to-server
1379 You can also move individual groups with the @kbd{M-x
1380 gnus-group-move-group-to-server} command.  This is useful if you want to
1381 move a (foreign) group from one server to another.
1382
1383 @kindex M-x gnus-group-clear-data-on-native-groups
1384 @findex gnus-group-clear-data-on-native-groups
1385 If you don't have access to both the old and new server, all your marks
1386 and read ranges have become worthless.  You can use the @kbd{M-x
1387 gnus-group-clear-data-on-native-groups} command to clear out all data
1388 that you have on your native groups.  Use with caution.
1389
1390 @kindex M-x gnus-group-clear-data
1391 @findex gnus-group-clear-data
1392 Clear the data from the current group only---nix out marks and the
1393 list of read articles (@code{gnus-group-clear-data}).
1394
1395 After changing servers, you @strong{must} move the cache hierarchy away,
1396 since the cached articles will have wrong article numbers, which will
1397 affect which articles Gnus thinks are read.
1398 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1399 to have it done automatically; for @code{gnus-group-clear-data}, you
1400 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1401 cache for all groups).
1402
1403
1404 @node Startup Files
1405 @section Startup Files
1406 @cindex startup files
1407 @cindex .newsrc
1408 @cindex .newsrc.el
1409 @cindex .newsrc.eld
1410
1411 Now, you all know about the @file{.newsrc} file.  All subscription
1412 information is traditionally stored in this file.
1413
1414 Things got a bit more complicated with @sc{gnus}.  In addition to
1415 keeping the @file{.newsrc} file updated, it also used a file called
1416 @file{.newsrc.el} for storing all the information that didn't fit into
1417 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1418 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1419 files was the most recently saved, which enabled people to swap between
1420 @sc{gnus} and other newsreaders.
1421
1422 That was kinda silly, so Gnus went one better: In addition to the
1423 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1424 @file{.newsrc.eld}.  It will read whichever of these files that are most
1425 recent, but it will never write a @file{.newsrc.el} file.  You should
1426 never delete the @file{.newsrc.eld} file---it contains much information
1427 not stored in the @file{.newsrc} file.
1428
1429 @vindex gnus-save-newsrc-file
1430 @vindex gnus-read-newsrc-file
1431 You can turn off writing the @file{.newsrc} file by setting
1432 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1433 the file and save some space, as well as exiting from Gnus faster.
1434 However, this will make it impossible to use other newsreaders than
1435 Gnus.  But hey, who would want to, right?  Similarly, setting
1436 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1437 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1438 convenient if you have a tendency to use Netscape once in a while.
1439
1440 @vindex gnus-save-killed-list
1441 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1442 will not save the list of killed groups to the startup file.  This will
1443 save both time (when starting and quitting) and space (on disk).  It
1444 will also mean that Gnus has no record of what groups are new or old,
1445 so the automatic new groups subscription methods become meaningless.
1446 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1447 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1448 Groups}).  This variable can also be a regular expression.  If that's
1449 the case, remove all groups that do not match this regexp before
1450 saving.  This can be useful in certain obscure situations that involve
1451 several servers where not all servers support @code{ask-server}.
1452
1453 @vindex gnus-startup-file
1454 @vindex gnus-backup-startup-file
1455 @vindex version-control
1456 The @code{gnus-startup-file} variable says where the startup files are.
1457 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1458 file being whatever that one is, with a @samp{.eld} appended.
1459 If you want version control for this file, set
1460 @code{gnus-backup-startup-file}.  It respects the same values as the
1461 @code{version-control} variable.
1462
1463 @vindex gnus-save-newsrc-hook
1464 @vindex gnus-save-quick-newsrc-hook
1465 @vindex gnus-save-standard-newsrc-hook
1466 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1467 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1468 saving the @file{.newsrc.eld} file, and
1469 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1470 @file{.newsrc} file.  The latter two are commonly used to turn version
1471 control on or off.  Version control is on by default when saving the
1472 startup files.  If you want to turn backup creation off, say something like:
1473
1474 @lisp
1475 (defun turn-off-backup ()
1476   (set (make-local-variable 'backup-inhibited) t))
1477
1478 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1479 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1480 @end lisp
1481
1482 @vindex gnus-init-file
1483 @vindex gnus-site-init-file
1484 When Gnus starts, it will read the @code{gnus-site-init-file}
1485 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1486 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1487 and can be used to avoid cluttering your @file{~/.emacs} and
1488 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1489 with the same names as these, but with @file{.elc} and @file{.el}
1490 suffixes.  In other words, if you have set @code{gnus-init-file} to
1491 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1492 and finally @file{~/.gnus} (in this order).
1493
1494
1495
1496 @node Auto Save
1497 @section Auto Save
1498 @cindex dribble file
1499 @cindex auto-save
1500
1501 Whenever you do something that changes the Gnus data (reading articles,
1502 catching up, killing/subscribing groups), the change is added to a
1503 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1504 Emacs way.  If your Emacs should crash before you have saved the
1505 @file{.newsrc} files, all changes you have made can be recovered from
1506 this file.
1507
1508 If Gnus detects this file at startup, it will ask the user whether to
1509 read it.  The auto save file is deleted whenever the real startup file is
1510 saved.
1511
1512 @vindex gnus-use-dribble-file
1513 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1514 maintain a dribble buffer.  The default is @code{t}.
1515
1516 @vindex gnus-dribble-directory
1517 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1518 this variable is @code{nil}, which it is by default, Gnus will dribble
1519 into the directory where the @file{.newsrc} file is located.  (This is
1520 normally the user's home directory.)  The dribble file will get the same
1521 file permissions as the @file{.newsrc} file.
1522
1523 @vindex gnus-always-read-dribble-file
1524 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1525 read the dribble file on startup without querying the user.
1526
1527
1528 @node The Active File
1529 @section The Active File
1530 @cindex active file
1531 @cindex ignored groups
1532
1533 When Gnus starts, or indeed whenever it tries to determine whether new
1534 articles have arrived, it reads the active file.  This is a very large
1535 file that lists all the active groups and articles on the server.
1536
1537 @vindex gnus-ignored-newsgroups
1538 Before examining the active file, Gnus deletes all lines that match the
1539 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1540 any groups with bogus names, but you can use this variable to make Gnus
1541 ignore hierarchies you aren't ever interested in.  However, this is not
1542 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1543 Groups} for an overview of other variables that can be used instead.
1544
1545 @c This variable is
1546 @c @code{nil} by default, and will slow down active file handling somewhat
1547 @c if you set it to anything else.
1548
1549 @vindex gnus-read-active-file
1550 @c @head
1551 The active file can be rather Huge, so if you have a slow network, you
1552 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1553 reading the active file.  This variable is @code{some} by default.
1554
1555 Gnus will try to make do by getting information just on the groups that
1556 you actually subscribe to.
1557
1558 Note that if you subscribe to lots and lots of groups, setting this
1559 variable to @code{nil} will probably make Gnus slower, not faster.  At
1560 present, having this variable @code{nil} will slow Gnus down
1561 considerably, unless you read news over a 2400 baud modem.
1562
1563 This variable can also have the value @code{some}.  Gnus will then
1564 attempt to read active info only on the subscribed groups.  On some
1565 servers this is quite fast (on sparkling, brand new INN servers that
1566 support the @code{LIST ACTIVE group} command), on others this isn't fast
1567 at all.  In any case, @code{some} should be faster than @code{nil}, and
1568 is certainly faster than @code{t} over slow lines.
1569
1570 Some news servers (old versions of Leafnode and old versions of INN, for
1571 instance) do not support the @code{LIST ACTIVE group}.  For these
1572 servers, @code{nil} is probably the most efficient value for this
1573 variable.
1574
1575 If this variable is @code{nil}, Gnus will ask for group info in total
1576 lock-step, which isn't very fast.  If it is @code{some} and you use an
1577 @acronym{NNTP} server, Gnus will pump out commands as fast as it can, and
1578 read all the replies in one swoop.  This will normally result in better
1579 performance, but if the server does not support the aforementioned
1580 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1581
1582 If you think that starting up Gnus takes too long, try all the three
1583 different values for this variable and see what works best for you.
1584
1585 In any case, if you use @code{some} or @code{nil}, you should definitely
1586 kill all groups that you aren't interested in to speed things up.
1587
1588 Note that this variable also affects active file retrieval from
1589 secondary select methods.
1590
1591
1592 @node Startup Variables
1593 @section Startup Variables
1594
1595 @table @code
1596
1597 @item gnus-load-hook
1598 @vindex gnus-load-hook
1599 A hook run while Gnus is being loaded.  Note that this hook will
1600 normally be run just once in each Emacs session, no matter how many
1601 times you start Gnus.
1602
1603 @item gnus-before-startup-hook
1604 @vindex gnus-before-startup-hook
1605 A hook run after starting up Gnus successfully.
1606
1607 @item gnus-startup-hook
1608 @vindex gnus-startup-hook
1609 A hook run as the very last thing after starting up Gnus
1610
1611 @item gnus-started-hook
1612 @vindex gnus-started-hook
1613 A hook that is run as the very last thing after starting up Gnus
1614 successfully.
1615
1616 @item gnus-setup-news-hook
1617 @vindex gnus-setup-news-hook
1618 A hook that is run after reading the @file{.newsrc} file(s), but before
1619 generating the group buffer.
1620
1621 @item gnus-check-bogus-newsgroups
1622 @vindex gnus-check-bogus-newsgroups
1623 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1624 startup.  A @dfn{bogus group} is a group that you have in your
1625 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1626 bogus groups can take quite a while, so to save time and resources it's
1627 best to leave this option off, and do the checking for bogus groups once
1628 in a while from the group buffer instead (@pxref{Group Maintenance}).
1629
1630 @item gnus-inhibit-startup-message
1631 @vindex gnus-inhibit-startup-message
1632 If non-@code{nil}, the startup message won't be displayed.  That way,
1633 your boss might not notice as easily that you are reading news instead
1634 of doing your job.  Note that this variable is used before
1635 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1636
1637 @item gnus-no-groups-message
1638 @vindex gnus-no-groups-message
1639 Message displayed by Gnus when no groups are available.
1640
1641 @item gnus-play-startup-jingle
1642 @vindex gnus-play-startup-jingle
1643 If non-@code{nil}, play the Gnus jingle at startup.
1644
1645 @item gnus-startup-jingle
1646 @vindex gnus-startup-jingle
1647 Jingle to be played if the above variable is non-@code{nil}.  The
1648 default is @samp{Tuxedomoon.Jingle4.au}.
1649
1650 @end table
1651
1652
1653 @node Group Buffer
1654 @chapter Group Buffer
1655 @cindex group buffer
1656
1657 @c Alex Schroeder suggests to rearrange this as follows:
1658 @c
1659 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1660 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1661 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1662 @c   7. Group Score, 8. Group Buffer Format
1663 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1664 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1665 @c <kensanata> First, "Gnus considers groups... (default 9)."
1666 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1667 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1668 @c <kensanata> Then expand the next paragraph or add some more to it.
1669 @c    This short one sentence explains levels 1 and 2, therefore I understand
1670 @c    that I should keep important news at 3 and boring news at 4.
1671 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1672 @c    Maybe keep those that you don't want to read temporarily at 6,
1673 @c    those that you never want to read at 8, those that offend your
1674 @c    human rights at 9...
1675
1676
1677 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1678 is the first buffer shown when Gnus starts, and will never be killed as
1679 long as Gnus is active.
1680
1681 @iftex
1682 @iflatex
1683 \gnusfigure{The Group Buffer}{320}{
1684 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1685 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1686 \put(120,38){\vector(1,2){10}}
1687 \put(40,60){\makebox(0,0)[r]{Mode line}}
1688 \put(40,58){\vector(1,0){30}}
1689 \put(200,28){\makebox(0,0)[t]{Native select method}}
1690 \put(200,26){\vector(-1,2){15}}
1691 }
1692 @end iflatex
1693 @end iftex
1694
1695 @menu
1696 * Group Buffer Format::         Information listed and how you can change it.
1697 * Group Maneuvering::           Commands for moving in the group buffer.
1698 * Selecting a Group::           Actually reading news.
1699 * Subscription Commands::       Unsubscribing, killing, subscribing.
1700 * Group Data::                  Changing the info for a group.
1701 * Group Levels::                Levels? What are those, then?
1702 * Group Score::                 A mechanism for finding out what groups you like.
1703 * Marking Groups::              You can mark groups for later processing.
1704 * Foreign Groups::              Creating and editing groups.
1705 * Group Parameters::            Each group may have different parameters set.
1706 * Listing Groups::              Gnus can list various subsets of the groups.
1707 * Sorting Groups::              Re-arrange the group order.
1708 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1709 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1710 * Exiting Gnus::                Stop reading news and get some work done.
1711 * Group Topics::                A folding group mode divided into topics.
1712 * Misc Group Stuff::            Other stuff that you can to do.
1713 @end menu
1714
1715
1716 @node Group Buffer Format
1717 @section Group Buffer Format
1718
1719 @menu
1720 * Group Line Specification::    Deciding how the group buffer is to look.
1721 * Group Mode Line Specification::  The group buffer mode line.
1722 * Group Highlighting::          Having nice colors in the group buffer.
1723 @end menu
1724
1725
1726 @node Group Line Specification
1727 @subsection Group Line Specification
1728 @cindex group buffer format
1729
1730 The default format of the group buffer is nice and dull, but you can
1731 make it as exciting and ugly as you feel like.
1732
1733 Here's a couple of example group lines:
1734
1735 @example
1736      25: news.announce.newusers
1737  *    0: alt.fan.andrea-dworkin
1738 @end example
1739
1740 Quite simple, huh?
1741
1742 You can see that there are 25 unread articles in
1743 @samp{news.announce.newusers}.  There are no unread articles, but some
1744 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1745 asterisk at the beginning of the line?).
1746
1747 @vindex gnus-group-line-format
1748 You can change that format to whatever you want by fiddling with the
1749 @code{gnus-group-line-format} variable.  This variable works along the
1750 lines of a @code{format} specification, which is pretty much the same as
1751 a @code{printf} specifications, for those of you who use (feh!) C.
1752 @xref{Formatting Variables}.
1753
1754 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1755
1756 There should always be a colon on the line; the cursor always moves to
1757 the colon after performing an operation.  @xref{Positioning
1758 Point}. Nothing else is required---not even the group name.  All
1759 displayed text is just window dressing, and is never examined by Gnus.
1760 Gnus stores all real information it needs using text properties.
1761
1762 (Note that if you make a really strange, wonderful, spreadsheet-like
1763 layout, everybody will believe you are hard at work with the accounting
1764 instead of wasting time reading news.)
1765
1766 Here's a list of all available format characters:
1767
1768 @table @samp
1769
1770 @item M
1771 An asterisk if the group only has marked articles.
1772
1773 @item S
1774 Whether the group is subscribed.
1775
1776 @item L
1777 Level of subscribedness.
1778
1779 @item N
1780 Number of unread articles.
1781
1782 @item I
1783 Number of dormant articles.
1784
1785 @item T
1786 Number of ticked articles.
1787
1788 @item R
1789 Number of read articles.
1790
1791 @item U
1792 Number of unseen articles.
1793
1794 @item t
1795 Estimated total number of articles.  (This is really @var{max-number}
1796 minus @var{min-number} plus 1.)
1797
1798 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1799 efficient access to @var{max-number} and @var{min-number} but getting
1800 the true unread message count is not possible efficiently.  For
1801 hysterical raisins, even the mail back ends, where the true number of
1802 unread messages might be available efficiently, use the same limited
1803 interface.  To remove this restriction from Gnus means that the back
1804 end interface has to be changed, which is not an easy job.  If you
1805 want to work on this, please contact the Gnus mailing list.
1806
1807 @item y
1808 Number of unread, unticked, non-dormant articles.
1809
1810 @item i
1811 Number of ticked and dormant articles.
1812
1813 @item g
1814 Full group name.
1815
1816 @item G
1817 Group name.
1818
1819 @item C
1820 Group comment (@pxref{Group Parameters}) or group name if there is no
1821 comment element in the group parameters.
1822
1823 @item D
1824 Newsgroup description.  You need to read the group descriptions
1825 before these will appear, and to do that, you either have to set
1826 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1827 command. 
1828
1829 @item o
1830 @samp{m} if moderated.
1831
1832 @item O
1833 @samp{(m)} if moderated.
1834
1835 @item s
1836 Select method.
1837
1838 @item B
1839 If the summary buffer for the group is open or not.
1840
1841 @item n
1842 Select from where.
1843
1844 @item z
1845 A string that looks like @samp{<%s:%n>} if a foreign select method is
1846 used.
1847
1848 @item P
1849 Indentation based on the level of the topic (@pxref{Group Topics}).
1850
1851 @item c
1852 @vindex gnus-group-uncollapsed-levels
1853 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1854 variable says how many levels to leave at the end of the group name.
1855 The default is 1---this will mean that group names like
1856 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1857
1858 @item m
1859 @vindex gnus-new-mail-mark
1860 @cindex %
1861 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1862 the group lately.
1863
1864 @item p
1865 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1866
1867 @item d
1868 A string that says when you last read the group (@pxref{Group
1869 Timestamp}).
1870
1871 @item u
1872 User defined specifier.  The next character in the format string should
1873 be a letter.  Gnus will call the function
1874 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1875 following @samp{%u}.  The function will be passed a single dummy
1876 parameter as argument.  The function should return a string, which will
1877 be inserted into the buffer just like information from any other
1878 specifier.
1879 @end table
1880
1881 @cindex *
1882 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1883 if no info is available---for instance, if it is a non-activated foreign
1884 group, or a bogus native group.
1885
1886
1887 @node Group Mode Line Specification
1888 @subsection Group Mode Line Specification
1889 @cindex group mode line
1890
1891 @vindex gnus-group-mode-line-format
1892 The mode line can be changed by setting
1893 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1894 doesn't understand that many format specifiers:
1895
1896 @table @samp
1897 @item S
1898 The native news server.
1899 @item M
1900 The native select method.
1901 @end table
1902
1903
1904 @node Group Highlighting
1905 @subsection Group Highlighting
1906 @cindex highlighting
1907 @cindex group highlighting
1908
1909 @vindex gnus-group-highlight
1910 Highlighting in the group buffer is controlled by the
1911 @code{gnus-group-highlight} variable.  This is an alist with elements
1912 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1913 something non-@code{nil}, the @var{face} will be used on the line.
1914
1915 Here's an example value for this variable that might look nice if the
1916 background is dark:
1917
1918 @lisp
1919 (cond (window-system
1920        (setq custom-background-mode 'light)
1921        (defface my-group-face-1
1922          '((t (:foreground "Red" :bold t))) "First group face")
1923        (defface my-group-face-2
1924          '((t (:foreground "DarkSeaGreen4" :bold t))) 
1925          "Second group face")
1926        (defface my-group-face-3
1927          '((t (:foreground "Green4" :bold t))) "Third group face")
1928        (defface my-group-face-4
1929          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1930        (defface my-group-face-5
1931          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1932
1933 (setq gnus-group-highlight
1934       '(((> unread 200) . my-group-face-1)
1935         ((and (< level 3) (zerop unread)) . my-group-face-2)
1936         ((< level 3) . my-group-face-3)
1937         ((zerop unread) . my-group-face-4)
1938         (t . my-group-face-5)))
1939 @end lisp
1940
1941 Also @pxref{Faces and Fonts}.
1942
1943 Variables that are dynamically bound when the forms are evaluated
1944 include:
1945
1946 @table @code
1947 @item group
1948 The group name.
1949 @item unread
1950 The number of unread articles in the group.
1951 @item method
1952 The select method.
1953 @item mailp
1954 Whether the group is a mail group.
1955 @item level
1956 The level of the group.
1957 @item score
1958 The score of the group.
1959 @item ticked
1960 The number of ticked articles in the group.
1961 @item total
1962 The total number of articles in the group.  Or rather,
1963 @var{max-number} minus @var{min-number} plus one.
1964 @item topic
1965 When using the topic minor mode, this variable is bound to the current
1966 topic being inserted.
1967 @end table
1968
1969 When the forms are @code{eval}ed, point is at the beginning of the line
1970 of the group in question, so you can use many of the normal Gnus
1971 functions for snarfing info on the group.
1972
1973 @vindex gnus-group-update-hook
1974 @findex gnus-group-highlight-line
1975 @code{gnus-group-update-hook} is called when a group line is changed.
1976 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
1977 calls @code{gnus-group-highlight-line} by default.
1978
1979
1980 @node Group Maneuvering
1981 @section Group Maneuvering
1982 @cindex group movement
1983
1984 All movement commands understand the numeric prefix and will behave as
1985 expected, hopefully.
1986
1987 @table @kbd
1988
1989 @item n
1990 @kindex n (Group)
1991 @findex gnus-group-next-unread-group
1992 Go to the next group that has unread articles
1993 (@code{gnus-group-next-unread-group}).
1994
1995 @item p
1996 @itemx DEL
1997 @kindex DEL (Group)
1998 @kindex p (Group)
1999 @findex gnus-group-prev-unread-group
2000 Go to the previous group that has unread articles
2001 (@code{gnus-group-prev-unread-group}).
2002
2003 @item N
2004 @kindex N (Group)
2005 @findex gnus-group-next-group
2006 Go to the next group (@code{gnus-group-next-group}).
2007
2008 @item P
2009 @kindex P (Group)
2010 @findex gnus-group-prev-group
2011 Go to the previous group (@code{gnus-group-prev-group}).
2012
2013 @item M-n
2014 @kindex M-n (Group)
2015 @findex gnus-group-next-unread-group-same-level
2016 Go to the next unread group on the same (or lower) level
2017 (@code{gnus-group-next-unread-group-same-level}).
2018
2019 @item M-p
2020 @kindex M-p (Group)
2021 @findex gnus-group-prev-unread-group-same-level
2022 Go to the previous unread group on the same (or lower) level
2023 (@code{gnus-group-prev-unread-group-same-level}).
2024 @end table
2025
2026 Three commands for jumping to groups:
2027
2028 @table @kbd
2029
2030 @item j
2031 @kindex j (Group)
2032 @findex gnus-group-jump-to-group
2033 Jump to a group (and make it visible if it isn't already)
2034 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2035 like living groups.
2036
2037 @item ,
2038 @kindex , (Group)
2039 @findex gnus-group-best-unread-group
2040 Jump to the unread group with the lowest level
2041 (@code{gnus-group-best-unread-group}).
2042
2043 @item .
2044 @kindex . (Group)
2045 @findex gnus-group-first-unread-group
2046 Jump to the first group with unread articles
2047 (@code{gnus-group-first-unread-group}).
2048 @end table
2049
2050 @vindex gnus-group-goto-unread
2051 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2052 commands will move to the next group, not the next unread group.  Even
2053 the commands that say they move to the next unread group.  The default
2054 is @code{t}.
2055
2056
2057 @node Selecting a Group
2058 @section Selecting a Group
2059 @cindex group selection
2060
2061 @table @kbd
2062
2063 @item SPACE
2064 @kindex SPACE (Group)
2065 @findex gnus-group-read-group
2066 Select the current group, switch to the summary buffer and display the
2067 first unread article (@code{gnus-group-read-group}).  If there are no
2068 unread articles in the group, or if you give a non-numerical prefix to
2069 this command, Gnus will offer to fetch all the old articles in this
2070 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2071 determines the number of articles Gnus will fetch.  If @var{n} is
2072 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2073 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2074
2075 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2076 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2077 - 4 2 SPC} fetches the 42 oldest ones.
2078
2079 When you are in the group (in the Summary buffer), you can type
2080 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2081 ones.
2082
2083 @item RET
2084 @kindex RET (Group)
2085 @findex gnus-group-select-group
2086 Select the current group and switch to the summary buffer
2087 (@code{gnus-group-select-group}).  Takes the same arguments as
2088 @code{gnus-group-read-group}---the only difference is that this command
2089 does not display the first unread article automatically upon group
2090 entry.
2091
2092 @item M-RET
2093 @kindex M-RET (Group)
2094 @findex gnus-group-quick-select-group
2095 This does the same as the command above, but tries to do it with the
2096 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2097 scoring/killing will be performed, there will be no highlights and no
2098 expunging.  This might be useful if you're in a real hurry and have to
2099 enter some humongous group.  If you give a 0 prefix to this command
2100 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2101 which is useful if you want to toggle threading before generating the
2102 summary buffer (@pxref{Summary Generation Commands}).
2103
2104 @item M-SPACE
2105 @kindex M-SPACE (Group)
2106 @findex gnus-group-visible-select-group
2107 This is yet one more command that does the same as the @kbd{RET}
2108 command, but this one does it without expunging and hiding dormants
2109 (@code{gnus-group-visible-select-group}).
2110
2111 @item C-M-RET
2112 @kindex C-M-RET (Group)
2113 @findex gnus-group-select-group-ephemerally
2114 Finally, this command selects the current group ephemerally without
2115 doing any processing of its contents
2116 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2117 turned off.  Everything you do in the group after selecting it in this
2118 manner will have no permanent effects.
2119
2120 @end table
2121
2122 @vindex gnus-large-newsgroup
2123 The @code{gnus-large-newsgroup} variable says what Gnus should
2124 consider to be a big group.  If it is @code{nil}, no groups are
2125 considered big.  The default value is 200.  If the group has more
2126 (unread and/or ticked) articles than this, Gnus will query the user
2127 before entering the group.  The user can then specify how many
2128 articles should be fetched from the server.  If the user specifies a
2129 negative number (@var{-n}), the @var{n} oldest articles will be
2130 fetched.  If it is positive, the @var{n} articles that have arrived
2131 most recently will be fetched.
2132
2133 @vindex gnus-large-ephemeral-newsgroup
2134 @code{gnus-large-ephemeral-newsgroup} is the same as
2135 @code{gnus-large-newsgroup}, but is only used for ephemeral
2136 newsgroups.
2137
2138 @vindex gnus-select-group-hook
2139 @vindex gnus-auto-select-first
2140 @vindex gnus-auto-select-subject
2141 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2142 automatically when entering a group with the @kbd{SPACE} command.
2143 Which article this is is controlled by the
2144 @code{gnus-auto-select-subject} variable.  Valid values for this
2145 variable is:
2146
2147 @table @code
2148
2149 @item unread
2150 Place point on the subject line of the first unread article.
2151
2152 @item first
2153 Place point on the subject line of the first article.
2154
2155 @item unseen
2156 Place point on the subject line of the first unseen article.
2157
2158 @item unseen-or-unread
2159 Place point on the subject line of the first unseen article, and if
2160 there is no such article, place point on the subject line of the first
2161 unread article.
2162
2163 @item best
2164 Place point on the subject line of the highest-scored unread article.
2165
2166 @end table
2167
2168 This variable can also be a function.  In that case, that function
2169 will be called to place point on a subject line.
2170
2171 If you want to prevent automatic selection in some group (say, in a
2172 binary group with Huge articles) you can set the
2173 @code{gnus-auto-select-first} variable to @code{nil} in
2174 @code{gnus-select-group-hook}, which is called when a group is
2175 selected.
2176
2177
2178 @node Subscription Commands
2179 @section Subscription Commands
2180 @cindex subscription
2181
2182 @table @kbd
2183
2184 @item S t
2185 @itemx u
2186 @kindex S t (Group)
2187 @kindex u (Group)
2188 @findex gnus-group-unsubscribe-current-group
2189 @c @icon{gnus-group-unsubscribe}
2190 Toggle subscription to the current group
2191 (@code{gnus-group-unsubscribe-current-group}).
2192
2193 @item S s
2194 @itemx U
2195 @kindex S s (Group)
2196 @kindex U (Group)
2197 @findex gnus-group-unsubscribe-group
2198 Prompt for a group to subscribe, and then subscribe it.  If it was
2199 subscribed already, unsubscribe it instead
2200 (@code{gnus-group-unsubscribe-group}).
2201
2202 @item S k
2203 @itemx C-k
2204 @kindex S k (Group)
2205 @kindex C-k (Group)
2206 @findex gnus-group-kill-group
2207 @c @icon{gnus-group-kill-group}
2208 Kill the current group (@code{gnus-group-kill-group}).
2209
2210 @item S y
2211 @itemx C-y
2212 @kindex S y (Group)
2213 @kindex C-y (Group)
2214 @findex gnus-group-yank-group
2215 Yank the last killed group (@code{gnus-group-yank-group}).
2216
2217 @item C-x C-t
2218 @kindex C-x C-t (Group)
2219 @findex gnus-group-transpose-groups
2220 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2221 really a subscription command, but you can use it instead of a
2222 kill-and-yank sequence sometimes.
2223
2224 @item S w
2225 @itemx C-w
2226 @kindex S w (Group)
2227 @kindex C-w (Group)
2228 @findex gnus-group-kill-region
2229 Kill all groups in the region (@code{gnus-group-kill-region}).
2230
2231 @item S z
2232 @kindex S z (Group)
2233 @findex gnus-group-kill-all-zombies
2234 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2235
2236 @item S C-k
2237 @kindex S C-k (Group)
2238 @findex gnus-group-kill-level
2239 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2240 These groups can't be yanked back after killing, so this command should
2241 be used with some caution.  The only time where this command comes in
2242 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2243 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2244 kill off all unsubscribed groups that do not have message numbers in the
2245 @file{.newsrc} file.
2246
2247 @end table
2248
2249 Also @pxref{Group Levels}.
2250
2251
2252 @node Group Data
2253 @section Group Data
2254
2255 @table @kbd
2256
2257 @item c
2258 @kindex c (Group)
2259 @findex gnus-group-catchup-current
2260 @vindex gnus-group-catchup-group-hook
2261 @c @icon{gnus-group-catchup-current}
2262 Mark all unticked articles in this group as read
2263 (@code{gnus-group-catchup-current}).
2264 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2265 the group buffer.
2266
2267 @item C
2268 @kindex C (Group)
2269 @findex gnus-group-catchup-current-all
2270 Mark all articles in this group, even the ticked ones, as read
2271 (@code{gnus-group-catchup-current-all}).
2272
2273 @item M-c
2274 @kindex M-c (Group)
2275 @findex gnus-group-clear-data
2276 Clear the data from the current group---nix out marks and the list of
2277 read articles (@code{gnus-group-clear-data}).
2278
2279 @item M-x gnus-group-clear-data-on-native-groups
2280 @kindex M-x gnus-group-clear-data-on-native-groups
2281 @findex gnus-group-clear-data-on-native-groups
2282 If you have switched from one @acronym{NNTP} server to another, all your marks
2283 and read ranges have become worthless.  You can use this command to
2284 clear out all data that you have on your native groups.  Use with
2285 caution.
2286
2287 @end table
2288
2289
2290 @node Group Levels
2291 @section Group Levels
2292 @cindex group level
2293 @cindex level
2294
2295 All groups have a level of @dfn{subscribedness}.  For instance, if a
2296 group is on level 2, it is more subscribed than a group on level 5.  You
2297 can ask Gnus to just list groups on a given level or lower
2298 (@pxref{Listing Groups}), or to just check for new articles in groups on
2299 a given level or lower (@pxref{Scanning New Messages}).
2300
2301 Remember:  The higher the level of the group, the less important it is.
2302
2303 @table @kbd
2304
2305 @item S l
2306 @kindex S l (Group)
2307 @findex gnus-group-set-current-level
2308 Set the level of the current group.  If a numeric prefix is given, the
2309 next @var{n} groups will have their levels set.  The user will be
2310 prompted for a level.
2311 @end table
2312
2313 @vindex gnus-level-killed
2314 @vindex gnus-level-zombie
2315 @vindex gnus-level-unsubscribed
2316 @vindex gnus-level-subscribed
2317 Gnus considers groups from levels 1 to
2318 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2319 @code{gnus-level-subscribed} (exclusive) and
2320 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2321 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2322 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2323 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2324 same, but zombie and killed groups have no information on what articles
2325 you have read, etc, stored.  This distinction between dead and living
2326 groups isn't done because it is nice or clever, it is done purely for
2327 reasons of efficiency.
2328
2329 It is recommended that you keep all your mail groups (if any) on quite
2330 low levels (e.g. 1 or 2).
2331
2332 Maybe the following description of the default behavior of Gnus helps to
2333 understand what these levels are all about.  By default, Gnus shows you
2334 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2335 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2336 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2337 groups are hidden, in a way.
2338
2339 Zombie and killed groups are similar to unsubscribed groups in that they
2340 are hidden by default.  But they are different from subscribed and
2341 unsubscribed groups in that Gnus doesn't ask the news server for
2342 information (number of messages, number of unread messages) on zombie
2343 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2344 aren't interested in.  If most groups are killed, Gnus is faster.
2345
2346 Why does Gnus distinguish between zombie and killed groups?  Well, when
2347 a new group arrives on the server, Gnus by default makes it a zombie
2348 group.  This means that you are normally not bothered with new groups,
2349 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2350 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2351 list of killed groups.)
2352
2353 If you want to play with the level variables, you should show some care.
2354 Set them once, and don't touch them ever again.  Better yet, don't touch
2355 them at all unless you know exactly what you're doing.
2356
2357 @vindex gnus-level-default-unsubscribed
2358 @vindex gnus-level-default-subscribed
2359 Two closely related variables are @code{gnus-level-default-subscribed}
2360 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2361 which are the levels that new groups will be put on if they are
2362 (un)subscribed.  These two variables should, of course, be inside the
2363 relevant valid ranges.
2364
2365 @vindex gnus-keep-same-level
2366 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2367 will only move to groups of the same level (or lower).  In
2368 particular, going from the last article in one group to the next group
2369 will go to the next group of the same level (or lower).  This might be
2370 handy if you want to read the most important groups before you read the
2371 rest.
2372
2373 If this variable is @code{best}, Gnus will make the next newsgroup the
2374 one with the best level.
2375
2376 @vindex gnus-group-default-list-level
2377 All groups with a level less than or equal to
2378 @code{gnus-group-default-list-level} will be listed in the group buffer
2379 by default.
2380
2381 @vindex gnus-group-list-inactive-groups
2382 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2383 groups will be listed along with the unread groups.  This variable is
2384 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2385 listed.
2386
2387 @vindex gnus-group-use-permanent-levels
2388 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2389 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2390 use this level as the ``work'' level.
2391
2392 @vindex gnus-activate-level
2393 Gnus will normally just activate (i. e., query the server about) groups
2394 on level @code{gnus-activate-level} or less.  If you don't want to
2395 activate unsubscribed groups, for instance, you might set this variable
2396 to 5.  The default is 6.
2397
2398
2399 @node Group Score
2400 @section Group Score
2401 @cindex group score
2402 @cindex group rank
2403 @cindex rank
2404
2405 You would normally keep important groups on high levels, but that scheme
2406 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2407 group buffer according to how often you read groups, perhaps?  Within
2408 reason?
2409
2410 This is what @dfn{group score} is for.  You can have Gnus assign a score
2411 to each group through the mechanism described below.  You can then sort
2412 the group buffer based on this score.  Alternatively, you can sort on
2413 score and then level.  (Taken together, the level and the score is
2414 called the @dfn{rank} of the group.  A group that is on level 4 and has
2415 a score of 1 has a higher rank than a group on level 5 that has a score
2416 of 300.  (The level is the most significant part and the score is the
2417 least significant part.))
2418
2419 @findex gnus-summary-bubble-group
2420 If you want groups you read often to get higher scores than groups you
2421 read seldom you can add the @code{gnus-summary-bubble-group} function to
2422 the @code{gnus-summary-exit-hook} hook.  This will result (after
2423 sorting) in a bubbling sort of action.  If you want to see that in
2424 action after each summary exit, you can add
2425 @code{gnus-group-sort-groups-by-rank} or
2426 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2427 slow things down somewhat.
2428
2429
2430 @node Marking Groups
2431 @section Marking Groups
2432 @cindex marking groups
2433
2434 If you want to perform some command on several groups, and they appear
2435 subsequently in the group buffer, you would normally just give a
2436 numerical prefix to the command.  Most group commands will then do your
2437 bidding on those groups.
2438
2439 However, if the groups are not in sequential order, you can still
2440 perform a command on several groups.  You simply mark the groups first
2441 with the process mark and then execute the command.
2442
2443 @table @kbd
2444
2445 @item #
2446 @kindex # (Group)
2447 @itemx M m
2448 @kindex M m (Group)
2449 @findex gnus-group-mark-group
2450 Set the mark on the current group (@code{gnus-group-mark-group}).
2451
2452 @item M-#
2453 @kindex M-# (Group)
2454 @itemx M u
2455 @kindex M u (Group)
2456 @findex gnus-group-unmark-group
2457 Remove the mark from the current group
2458 (@code{gnus-group-unmark-group}).
2459
2460 @item M U
2461 @kindex M U (Group)
2462 @findex gnus-group-unmark-all-groups
2463 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2464
2465 @item M w
2466 @kindex M w (Group)
2467 @findex gnus-group-mark-region
2468 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2469
2470 @item M b
2471 @kindex M b (Group)
2472 @findex gnus-group-mark-buffer
2473 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2474
2475 @item M r
2476 @kindex M r (Group)
2477 @findex gnus-group-mark-regexp
2478 Mark all groups that match some regular expression
2479 (@code{gnus-group-mark-regexp}).
2480 @end table
2481
2482 Also @pxref{Process/Prefix}.
2483
2484 @findex gnus-group-universal-argument
2485 If you want to execute some command on all groups that have been marked
2486 with the process mark, you can use the @kbd{M-&}
2487 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2488 the command to be executed.
2489
2490
2491 @node Foreign Groups
2492 @section Foreign Groups
2493 @cindex foreign groups
2494
2495 Below are some group mode commands for making and editing general foreign
2496 groups, as well as commands to ease the creation of a few
2497 special-purpose groups.  All these commands insert the newly created
2498 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2499 consulted.
2500
2501 @table @kbd
2502
2503 @item G m
2504 @kindex G m (Group)
2505 @findex gnus-group-make-group
2506 @cindex making groups
2507 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2508 for a name, a method and possibly an @dfn{address}.  For an easier way
2509 to subscribe to @acronym{NNTP} groups, @pxref{Browse Foreign Server}.
2510
2511 @item G r
2512 @kindex G r (Group)
2513 @findex gnus-group-rename-group
2514 @cindex renaming groups
2515 Rename the current group to something else
2516 (@code{gnus-group-rename-group}).  This is valid only on some
2517 groups---mail groups mostly.  This command might very well be quite slow
2518 on some back ends.
2519
2520 @item G c
2521 @kindex G c (Group)
2522 @cindex customizing
2523 @findex gnus-group-customize
2524 Customize the group parameters (@code{gnus-group-customize}).
2525
2526 @item G e
2527 @kindex G e (Group)
2528 @findex gnus-group-edit-group-method
2529 @cindex renaming groups
2530 Enter a buffer where you can edit the select method of the current
2531 group (@code{gnus-group-edit-group-method}).
2532
2533 @item G p
2534 @kindex G p (Group)
2535 @findex gnus-group-edit-group-parameters
2536 Enter a buffer where you can edit the group parameters
2537 (@code{gnus-group-edit-group-parameters}).
2538
2539 @item G E
2540 @kindex G E (Group)
2541 @findex gnus-group-edit-group
2542 Enter a buffer where you can edit the group info
2543 (@code{gnus-group-edit-group}).
2544
2545 @item G d
2546 @kindex G d (Group)
2547 @findex gnus-group-make-directory-group
2548 @cindex nndir
2549 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2550 for a directory name (@code{gnus-group-make-directory-group}).
2551
2552 @item G h
2553 @kindex G h (Group)
2554 @cindex help group
2555 @findex gnus-group-make-help-group
2556 Make the Gnus help group (@code{gnus-group-make-help-group}).
2557
2558 @item G a
2559 @kindex G a (Group)
2560 @cindex (ding) archive
2561 @cindex archive group
2562 @findex gnus-group-make-archive-group
2563 @vindex gnus-group-archive-directory
2564 @vindex gnus-group-recent-archive-directory
2565 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
2566 default a group pointing to the most recent articles will be created
2567 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2568 group will be created from @code{gnus-group-archive-directory}.
2569
2570 @item G k
2571 @kindex G k (Group)
2572 @findex gnus-group-make-kiboze-group
2573 @cindex nnkiboze
2574 Make a kiboze group.  You will be prompted for a name, for a regexp to
2575 match groups to be ``included'' in the kiboze group, and a series of
2576 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2577 @xref{Kibozed Groups}.
2578
2579 @item G D
2580 @kindex G D (Group)
2581 @findex gnus-group-enter-directory
2582 @cindex nneething
2583 Read an arbitrary directory as if it were a newsgroup with the
2584 @code{nneething} back end (@code{gnus-group-enter-directory}).
2585 @xref{Anything Groups}.
2586
2587 @item G f
2588 @kindex G f (Group)
2589 @findex gnus-group-make-doc-group
2590 @cindex ClariNet Briefs
2591 @cindex nndoc
2592 Make a group based on some file or other
2593 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2594 command, you will be prompted for a file name and a file type.
2595 Currently supported types are @code{mbox}, @code{babyl},
2596 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2597 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2598 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2599 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2600 you run this command without a prefix, Gnus will guess at the file
2601 type.  @xref{Document Groups}.
2602
2603 @item G u
2604 @kindex G u (Group)
2605 @vindex gnus-useful-groups
2606 @findex gnus-group-make-useful-group
2607 Create one of the groups mentioned in @code{gnus-useful-groups}
2608 (@code{gnus-group-make-useful-group}).
2609
2610 @item G w
2611 @kindex G w (Group)
2612 @findex gnus-group-make-web-group
2613 @cindex Google
2614 @cindex nnweb
2615 @cindex gmane
2616 Make an ephemeral group based on a web search
2617 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2618 command, make a solid group instead.  You will be prompted for the
2619 search engine type and the search string.  Valid search engine types
2620 include @code{google}, @code{dejanews}, and @code{gmane}.
2621 @xref{Web Searches}.
2622
2623 If you use the @code{google} search engine, you can limit the search
2624 to a particular group by using a match string like
2625 @samp{shaving group:alt.sysadmin.recovery}.
2626
2627 @item G DEL
2628 @kindex G DEL (Group)
2629 @findex gnus-group-delete-group
2630 This function will delete the current group
2631 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2632 actually delete all the articles in the group, and forcibly remove the
2633 group itself from the face of the Earth.  Use a prefix only if you are
2634 absolutely sure of what you are doing.  This command can't be used on
2635 read-only groups (like @code{nntp} group), though.
2636
2637 @item G V
2638 @kindex G V (Group)
2639 @findex gnus-group-make-empty-virtual
2640 Make a new, fresh, empty @code{nnvirtual} group
2641 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2642
2643 @item G v
2644 @kindex G v (Group)
2645 @findex gnus-group-add-to-virtual
2646 Add the current group to an @code{nnvirtual} group
2647 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2648 @end table
2649
2650 @xref{Select Methods}, for more information on the various select
2651 methods.
2652
2653 @vindex gnus-activate-foreign-newsgroups
2654 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2655 Gnus will check all foreign groups with this level or lower at startup.
2656 This might take quite a while, especially if you subscribe to lots of
2657 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2658 @code{gnus-activate-level} also affects activation of foreign
2659 newsgroups.
2660
2661
2662 @node Group Parameters
2663 @section Group Parameters
2664 @cindex group parameters
2665
2666 The group parameters store information local to a particular group.
2667 Here's an example group parameter list:
2668
2669 @example
2670 ((to-address . "ding@@gnus.org")
2671  (auto-expire . t))
2672 @end example
2673
2674 We see that each element consists of a ``dotted pair''---the thing before
2675 the dot is the key, while the thing after the dot is the value.  All the
2676 parameters have this form @emph{except} local variable specs, which are
2677 not dotted pairs, but proper lists.
2678
2679 Some parameters have correspondent customizable variables, each of which
2680 is an alist of regexps and values.
2681
2682 The following group parameters can be used:
2683
2684 @table @code
2685 @item to-address
2686 @cindex to-address
2687 Address used by when doing followups and new posts.
2688
2689 @example
2690 (to-address . "some@@where.com")
2691 @end example
2692
2693 This is primarily useful in mail groups that represent closed mailing
2694 lists---mailing lists where it's expected that everybody that writes to
2695 the mailing list is subscribed to it.  Since using this parameter
2696 ensures that the mail only goes to the mailing list itself, it means
2697 that members won't receive two copies of your followups.
2698
2699 Using @code{to-address} will actually work whether the group is foreign
2700 or not.  Let's say there's a group on the server that is called
2701 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2702 the articles from a mail-to-news gateway.  Posting directly to this
2703 group is therefore impossible---you have to send mail to the mailing
2704 list address instead.
2705
2706 See also @code{gnus-parameter-to-address-alist}.
2707
2708 @item to-list
2709 @cindex to-list
2710 Address used when doing @kbd{a} in that group.
2711
2712 @example
2713 (to-list . "some@@where.com")
2714 @end example
2715
2716 It is totally ignored
2717 when doing a followup---except that if it is present in a news group,
2718 you'll get mail group semantics when doing @kbd{f}.
2719
2720 If you do an @kbd{a} command in a mail group and you have neither a
2721 @code{to-list} group parameter nor a @code{to-address} group parameter,
2722 then a @code{to-list} group parameter will be added automatically upon
2723 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2724 @vindex gnus-add-to-list
2725
2726 If you do an @kbd{a} command in a mail group and you don't have a
2727 @code{to-list} group parameter, one will be added automatically upon
2728 sending the message.
2729
2730 @findex gnus-mailing-list-mode
2731 @cindex mail list groups
2732 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2733 entering summary buffer.
2734
2735 See also @code{gnus-parameter-to-list-alist}.
2736
2737 @anchor{subscribed}
2738 @item subscribed
2739 @cindex subscribed
2740 If this parameter is set to @code{t}, Gnus will consider the
2741 to-address and to-list parameters for this group as addresses of
2742 mailing lists you are subscribed to.  Giving Gnus this information is
2743 (only) a first step in getting it to generate correct Mail-Followup-To
2744 headers for your posts to these lists.  Look here @pxref{Mailing
2745 Lists, , Mailing Lists, message, The Message Manual} for a complete
2746 treatment of available MFT support.
2747
2748 See also @code{gnus-find-subscribed-addresses}, the function that
2749 directly uses this group parameter.
2750
2751 @item visible
2752 @cindex visible
2753 If the group parameter list has the element @code{(visible . t)},
2754 that group will always be visible in the Group buffer, regardless
2755 of whether it has any unread articles.
2756
2757 @item broken-reply-to
2758 @cindex broken-reply-to
2759 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2760 headers in this group are to be ignored, and for the header to be hidden
2761 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2762 can be useful if you're reading a mailing list group where the listserv
2763 has inserted @code{Reply-To} headers that point back to the listserv
2764 itself.  That is broken behavior.  So there!
2765
2766 @item to-group
2767 @cindex to-group
2768 Elements like @code{(to-group . "some.group.name")} means that all
2769 posts in that group will be sent to @code{some.group.name}.
2770
2771 @item newsgroup
2772 @cindex newsgroup
2773 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2774 will treat all responses as if they were responses to news articles.
2775 This can be useful if you have a mail group that's really a mirror of a
2776 news group.
2777
2778 @item gcc-self
2779 @cindex gcc-self
2780 If @code{(gcc-self . t)} is present in the group parameter list, newly
2781 composed messages will be @code{Gcc}'d to the current group.  If
2782 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2783 generated, if @code{(gcc-self . "string")} is present, this string will
2784 be inserted literally as a @code{gcc} header.  This parameter takes
2785 precedence over any default @code{Gcc} rules as described later
2786 (@pxref{Archived Messages}).  CAVEAT:: It yields an error putting
2787 @code{(gcc-self . t)} in groups of a @code{nntp} server or so, because
2788 a @code{nntp} server doesn't accept articles.
2789
2790 @item auto-expire
2791 @cindex auto-expire
2792 If the group parameter has an element that looks like @code{(auto-expire
2793 . t)}, all articles read will be marked as expirable.  For an
2794 alternative approach, @pxref{Expiring Mail}.
2795
2796 See also @code{gnus-auto-expirable-newsgroups}.
2797
2798 @item total-expire
2799 @cindex total-expire
2800 If the group parameter has an element that looks like
2801 @code{(total-expire . t)}, all read articles will be put through the
2802 expiry process, even if they are not marked as expirable.  Use with
2803 caution.  Unread, ticked and dormant articles are not eligible for
2804 expiry.
2805
2806 See also @code{gnus-total-expirable-newsgroups}.
2807
2808 @item expiry-wait
2809 @cindex expiry-wait
2810 @vindex nnmail-expiry-wait-function
2811 If the group parameter has an element that looks like
2812 @code{(expiry-wait . 10)}, this value will override any
2813 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2814 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2815 can either be a number of days (not necessarily an integer) or the
2816 symbols @code{never} or @code{immediate}.
2817
2818 @item score-file
2819 @cindex score file group parameter
2820 Elements that look like @code{(score-file . "file")} will make
2821 @file{file} into the current score file for the group in question.  All
2822 interactive score entries will be put into this file.
2823
2824 @item adapt-file
2825 @cindex adapt file group parameter
2826 Elements that look like @code{(adapt-file . "file")} will make
2827 @file{file} into the current adaptive file for the group in question.
2828 All adaptive score entries will be put into this file.
2829
2830 @item admin-address
2831 @cindex admin-address
2832 When unsubscribing from a mailing list you should never send the
2833 unsubscription notice to the mailing list itself.  Instead, you'd send
2834 messages to the administrative address.  This parameter allows you to
2835 put the admin address somewhere convenient.
2836
2837 @item display
2838 @cindex display
2839 Elements that look like @code{(display . MODE)} say which articles to
2840 display on entering the group.  Valid values are:
2841
2842 @table @code
2843 @item all
2844 Display all articles, both read and unread.
2845
2846 @item an integer
2847 Display the last @var{integer} articles in the group.  This is the same as
2848 entering the group with @kbd{C-u @var{integer}}.
2849
2850 @item default
2851 Display the default visible articles, which normally includes unread and
2852 ticked articles.
2853
2854 @item an array
2855 Display articles that satisfy a predicate.
2856
2857 Here are some examples:
2858
2859 @table @code
2860 @item [unread]
2861 Display only unread articles.
2862
2863 @item [not expire]
2864 Display everything except expirable articles.
2865
2866 @item [and (not reply) (not expire)]
2867 Display everything except expirable and articles you've already
2868 responded to.
2869 @end table
2870
2871 The available operators are @code{not}, @code{and} and @code{or}.
2872 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2873 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2874 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2875 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2876
2877 @end table
2878
2879 The @code{display} parameter works by limiting the summary buffer to
2880 the subset specified.  You can pop the limit by using the @kbd{/ w}
2881 command (@pxref{Limiting}).
2882
2883 @item comment
2884 @cindex comment
2885 Elements that look like @code{(comment . "This is a comment")} are
2886 arbitrary comments on the group.  You can display comments in the
2887 group line (@pxref{Group Line Specification}).
2888
2889 @item charset
2890 @cindex charset
2891 Elements that look like @code{(charset . iso-8859-1)} will make
2892 @code{iso-8859-1} the default charset; that is, the charset that will be
2893 used for all articles that do not specify a charset.
2894
2895 See also @code{gnus-group-charset-alist}.
2896
2897 @item ignored-charsets
2898 @cindex ignored-charset
2899 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2900 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2901 default charset will be used for decoding articles.
2902
2903 See also @code{gnus-group-ignored-charsets-alist}.
2904
2905 @item posting-style
2906 @cindex posting-style
2907 You can store additional posting style information for this group
2908 here (@pxref{Posting Styles}).  The format is that of an entry in the
2909 @code{gnus-posting-styles} alist, except that there's no regexp matching
2910 the group name (of course).  Style elements in this group parameter will
2911 take precedence over the ones found in @code{gnus-posting-styles}.
2912
2913 For instance, if you want a funky name and signature in this group only,
2914 instead of hacking @code{gnus-posting-styles}, you could put something
2915 like this in the group parameters:
2916
2917 @example
2918 (posting-style
2919   (name "Funky Name")
2920   ("X-My-Header" "Funky Value")
2921   (signature "Funky Signature"))
2922 @end example
2923
2924 @item post-method
2925 @cindex post-method
2926 If it is set, the value is used as the method for posting message
2927 instead of @code{gnus-post-method}.
2928
2929 @item banner
2930 @cindex banner
2931 An item like @code{(banner . @var{regexp})} causes any part of an article
2932 that matches the regular expression @var{regexp} to be stripped. Instead of
2933 @var{regexp}, you can also use the symbol @code{signature} which strips the
2934 last signature or any of the elements of the alist
2935 @code{gnus-article-banner-alist}.
2936
2937 @item sieve
2938 @cindex sieve
2939 This parameter contains a Sieve test that should match incoming mail
2940 that should be placed in this group.  From this group parameter, a
2941 Sieve @samp{IF} control structure is generated, having the test as the
2942 condition and @samp{fileinto "group.name";} as the body.
2943
2944 For example, if the INBOX.list.sieve group has the @code{(sieve
2945 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2946 translating the group parameter into a Sieve script (@pxref{Sieve
2947 Commands}) the following Sieve code is generated:
2948
2949 @example
2950 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2951         fileinto \"INBOX.list.sieve\";
2952 @}
2953 @end example
2954
2955 The Sieve language is described in RFC 3028. @xref{Top, , Top, sieve,
2956 Emacs Sieve}.
2957
2958 @item (@var{variable} @var{form})
2959 You can use the group parameters to set variables local to the group you
2960 are entering.  If you want to turn threading off in @samp{news.answers},
2961 you could put @code{(gnus-show-threads nil)} in the group parameters of
2962 that group.  @code{gnus-show-threads} will be made into a local variable
2963 in the summary buffer you enter, and the form @code{nil} will be
2964 @code{eval}ed there.
2965
2966 Note that this feature sets the variable locally to the summary buffer.
2967 But some variables are evaluated in the article buffer, or in the
2968 message buffer (of a reply or followup or otherwise newly created
2969 message).  As a workaround, it might help to add the variable in
2970 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
2971 Stuff}.  So if you want to set @code{message-from-style} via the group
2972 parameters, then you may need the following statement elsewhere in your
2973 @file{~/.gnus} file:
2974 @lisp
2975 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
2976 @end lisp
2977
2978 @vindex gnus-list-identifiers
2979 A use for this feature is to remove a mailing list identifier tag in
2980 the subject fields of articles.   E.g. if the news group
2981 @example
2982 nntp+news.gnus.org:gmane.text.docbook.apps
2983 @end example
2984 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
2985 tag can be removed from the article subjects in the summary buffer for
2986 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
2987 into the group parameters for the group.
2988
2989 This can also be used as a group-specific hook function, if you'd like.
2990 If you want to hear a beep when you enter a group, you could put
2991 something like @code{(dummy-variable (ding))} in the parameters of that
2992 group.  @code{dummy-variable} will be set to the result of the
2993 @code{(ding)} form, but who cares?
2994
2995 @end table
2996
2997 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2998 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2999 presents you with a Customize-like interface.  The latter helps avoid
3000 silly Lisp errors.)  You might also be interested in reading about topic
3001 parameters (@pxref{Topic Parameters}).
3002
3003 @vindex gnus-parameters
3004 Group parameters can be set via the @code{gnus-parameters} variable too.
3005 But some variables, such as @code{visible}, have no effect.  For
3006 example:
3007
3008 @lisp
3009 (setq gnus-parameters
3010       '(("mail\\..*"
3011          (gnus-show-threads nil)
3012          (gnus-use-scoring nil)
3013          (gnus-summary-line-format
3014           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3015          (gcc-self . t)
3016          (display . all))
3017
3018         ("^nnimap:\\(foo.bar\\)$"
3019          (to-group . "\\1"))
3020
3021         ("mail\\.me"
3022          (gnus-use-scoring  t))
3023
3024         ("list\\..*"
3025          (total-expire . t)
3026          (broken-reply-to . t))))
3027 @end lisp
3028
3029 String value of parameters will be subjected to regexp substitution, as
3030 the @code{to-group} example shows.
3031
3032
3033 @node Listing Groups
3034 @section Listing Groups
3035 @cindex group listing
3036
3037 These commands all list various slices of the groups available.
3038
3039 @table @kbd
3040
3041 @item l
3042 @itemx A s
3043 @kindex A s (Group)
3044 @kindex l (Group)
3045 @findex gnus-group-list-groups
3046 List all groups that have unread articles
3047 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3048 command will list only groups of level ARG and lower.  By default, it
3049 only lists groups of level five (i.e.,
3050 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3051 groups).
3052
3053 @item L
3054 @itemx A u
3055 @kindex A u (Group)
3056 @kindex L (Group)
3057 @findex gnus-group-list-all-groups
3058 List all groups, whether they have unread articles or not
3059 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3060 this command will list only groups of level ARG and lower.  By default,
3061 it lists groups of level seven or lower (i.e., just subscribed and
3062 unsubscribed groups).
3063
3064 @item A l
3065 @kindex A l (Group)
3066 @findex gnus-group-list-level
3067 List all unread groups on a specific level
3068 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3069 with no unread articles.
3070
3071 @item A k
3072 @kindex A k (Group)
3073 @findex gnus-group-list-killed
3074 List all killed groups (@code{gnus-group-list-killed}).  If given a
3075 prefix argument, really list all groups that are available, but aren't
3076 currently (un)subscribed.  This could entail reading the active file
3077 from the server.
3078
3079 @item A z
3080 @kindex A z (Group)
3081 @findex gnus-group-list-zombies
3082 List all zombie groups (@code{gnus-group-list-zombies}).
3083
3084 @item A m
3085 @kindex A m (Group)
3086 @findex gnus-group-list-matching
3087 List all unread, subscribed groups with names that match a regexp
3088 (@code{gnus-group-list-matching}).
3089
3090 @item A M
3091 @kindex A M (Group)
3092 @findex gnus-group-list-all-matching
3093 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3094
3095 @item A A
3096 @kindex A A (Group)
3097 @findex gnus-group-list-active
3098 List absolutely all groups in the active file(s) of the
3099 server(s) you are connected to (@code{gnus-group-list-active}).  This
3100 might very well take quite a while.  It might actually be a better idea
3101 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3102 thing to match on.  Also note that this command may list groups that
3103 don't exist (yet)---these will be listed as if they were killed groups.
3104 Take the output with some grains of salt.
3105
3106 @item A a
3107 @kindex A a (Group)
3108 @findex gnus-group-apropos
3109 List all groups that have names that match a regexp
3110 (@code{gnus-group-apropos}).
3111
3112 @item A d
3113 @kindex A d (Group)
3114 @findex gnus-group-description-apropos
3115 List all groups that have names or descriptions that match a regexp
3116 (@code{gnus-group-description-apropos}).
3117
3118 @item A c
3119 @kindex A c (Group)
3120 @findex gnus-group-list-cached
3121 List all groups with cached articles (@code{gnus-group-list-cached}).
3122
3123 @item A ?
3124 @kindex A ? (Group)
3125 @findex gnus-group-list-dormant
3126 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3127
3128 @item A /
3129 @kindex A / (Group)
3130 @findex gnus-group-list-limit
3131 List groups limited within the current selection
3132 (@code{gnus-group-list-limit}).
3133
3134 @item A f
3135 @kindex A f (Group)
3136 @findex gnus-group-list-flush
3137 Flush groups from the current selection (@code{gnus-group-list-flush}).
3138
3139 @item A p
3140 @kindex A p (Group)
3141 @findex gnus-group-list-plus
3142 List groups plus the current selection (@code{gnus-group-list-plus}).
3143
3144 @end table
3145
3146 @vindex gnus-permanently-visible-groups
3147 @cindex visible group parameter
3148 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3149 always be shown, whether they have unread articles or not.  You can also
3150 add the @code{visible} element to the group parameters in question to
3151 get the same effect.
3152
3153 @vindex gnus-list-groups-with-ticked-articles
3154 Groups that have just ticked articles in it are normally listed in the
3155 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3156 @code{nil}, these groups will be treated just like totally empty
3157 groups.  It is @code{t} by default.
3158
3159
3160 @node Sorting Groups
3161 @section Sorting Groups
3162 @cindex sorting groups
3163
3164 @kindex C-c C-s (Group)
3165 @findex gnus-group-sort-groups
3166 @vindex gnus-group-sort-function
3167 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3168 group buffer according to the function(s) given by the
3169 @code{gnus-group-sort-function} variable.  Available sorting functions
3170 include:
3171
3172 @table @code
3173
3174 @item gnus-group-sort-by-alphabet
3175 @findex gnus-group-sort-by-alphabet
3176 Sort the group names alphabetically.  This is the default.
3177
3178 @item gnus-group-sort-by-real-name
3179 @findex gnus-group-sort-by-real-name
3180 Sort the group alphabetically on the real (unprefixed) group names.
3181
3182 @item gnus-group-sort-by-level
3183 @findex gnus-group-sort-by-level
3184 Sort by group level.
3185
3186 @item gnus-group-sort-by-score
3187 @findex gnus-group-sort-by-score
3188 Sort by group score.  @xref{Group Score}.
3189
3190 @item gnus-group-sort-by-rank
3191 @findex gnus-group-sort-by-rank
3192 Sort by group score and then the group level.  The level and the score
3193 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3194
3195 @item gnus-group-sort-by-unread
3196 @findex gnus-group-sort-by-unread
3197 Sort by number of unread articles.
3198
3199 @item gnus-group-sort-by-method
3200 @findex gnus-group-sort-by-method
3201 Sort alphabetically on the select method.
3202
3203 @item gnus-group-sort-by-server
3204 @findex gnus-group-sort-by-server
3205 Sort alphabetically on the Gnus server name.
3206
3207
3208 @end table
3209
3210 @code{gnus-group-sort-function} can also be a list of sorting
3211 functions.  In that case, the most significant sort key function must be
3212 the last one.
3213
3214
3215 There are also a number of commands for sorting directly according to
3216 some sorting criteria:
3217
3218 @table @kbd
3219 @item G S a
3220 @kindex G S a (Group)
3221 @findex gnus-group-sort-groups-by-alphabet
3222 Sort the group buffer alphabetically by group name
3223 (@code{gnus-group-sort-groups-by-alphabet}).
3224
3225 @item G S u
3226 @kindex G S u (Group)
3227 @findex gnus-group-sort-groups-by-unread
3228 Sort the group buffer by the number of unread articles
3229 (@code{gnus-group-sort-groups-by-unread}).
3230
3231 @item G S l
3232 @kindex G S l (Group)
3233 @findex gnus-group-sort-groups-by-level
3234 Sort the group buffer by group level
3235 (@code{gnus-group-sort-groups-by-level}).
3236
3237 @item G S v
3238 @kindex G S v (Group)
3239 @findex gnus-group-sort-groups-by-score
3240 Sort the group buffer by group score
3241 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3242
3243 @item G S r
3244 @kindex G S r (Group)
3245 @findex gnus-group-sort-groups-by-rank
3246 Sort the group buffer by group rank
3247 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3248
3249 @item G S m
3250 @kindex G S m (Group)
3251 @findex gnus-group-sort-groups-by-method
3252 Sort the group buffer alphabetically by back end name@*
3253 (@code{gnus-group-sort-groups-by-method}).
3254
3255 @item G S n
3256 @kindex G S n (Group)
3257 @findex gnus-group-sort-groups-by-real-name
3258 Sort the group buffer alphabetically by real (unprefixed) group name
3259 (@code{gnus-group-sort-groups-by-real-name}).
3260
3261 @end table
3262
3263 All the commands below obey the process/prefix convention
3264 (@pxref{Process/Prefix}).
3265
3266 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3267 commands will sort in reverse order.
3268
3269 You can also sort a subset of the groups:
3270
3271 @table @kbd
3272 @item G P a
3273 @kindex G P a (Group)
3274 @findex gnus-group-sort-selected-groups-by-alphabet
3275 Sort the groups alphabetically by group name
3276 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3277
3278 @item G P u
3279 @kindex G P u (Group)
3280 @findex gnus-group-sort-selected-groups-by-unread
3281 Sort the groups by the number of unread articles
3282 (@code{gnus-group-sort-selected-groups-by-unread}).
3283
3284 @item G P l
3285 @kindex G P l (Group)
3286 @findex gnus-group-sort-selected-groups-by-level
3287 Sort the groups by group level
3288 (@code{gnus-group-sort-selected-groups-by-level}).
3289
3290 @item G P v
3291 @kindex G P v (Group)
3292 @findex gnus-group-sort-selected-groups-by-score
3293 Sort the groups by group score
3294 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3295
3296 @item G P r
3297 @kindex G P r (Group)
3298 @findex gnus-group-sort-selected-groups-by-rank
3299 Sort the groups by group rank
3300 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3301
3302 @item G P m
3303 @kindex G P m (Group)
3304 @findex gnus-group-sort-selected-groups-by-method
3305 Sort the groups alphabetically by back end name@*
3306 (@code{gnus-group-sort-selected-groups-by-method}).
3307
3308 @item G P n
3309 @kindex G P n (Group)
3310 @findex gnus-group-sort-selected-groups-by-real-name
3311 Sort the groups alphabetically by real (unprefixed) group name
3312 (@code{gnus-group-sort-selected-groups-by-real-name}).
3313
3314 @item G P s
3315 @kindex G P s (Group)
3316 @findex gnus-group-sort-selected-groups
3317 Sort the groups according to @code{gnus-group-sort-function}.
3318
3319 @end table
3320
3321 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3322 move groups around.
3323
3324
3325 @node Group Maintenance
3326 @section Group Maintenance
3327 @cindex bogus groups
3328
3329 @table @kbd
3330 @item b
3331 @kindex b (Group)
3332 @findex gnus-group-check-bogus-groups
3333 Find bogus groups and delete them
3334 (@code{gnus-group-check-bogus-groups}).
3335
3336 @item F
3337 @kindex F (Group)
3338 @findex gnus-group-find-new-groups
3339 Find new groups and process them (@code{gnus-group-find-new-groups}).
3340 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3341 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3342 to query the server for new groups, and subscribe the new groups as
3343 zombies.
3344
3345 @item C-c C-x
3346 @kindex C-c C-x (Group)
3347 @findex gnus-group-expire-articles
3348 Run all expirable articles in the current group through the expiry
3349 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3350 all expirable articles in the group that have been around for a while.
3351 (@pxref{Expiring Mail}).
3352
3353 @item C-c C-M-x
3354 @kindex C-c C-M-x (Group)
3355 @findex gnus-group-expire-all-groups
3356 Run all expirable articles in all groups through the expiry process
3357 (@code{gnus-group-expire-all-groups}).
3358
3359 @end table
3360
3361
3362 @node Browse Foreign Server
3363 @section Browse Foreign Server
3364 @cindex foreign servers
3365 @cindex browsing servers
3366
3367 @table @kbd
3368 @item B
3369 @kindex B (Group)
3370 @findex gnus-group-browse-foreign-server
3371 You will be queried for a select method and a server name.  Gnus will
3372 then attempt to contact this server and let you browse the groups there
3373 (@code{gnus-group-browse-foreign-server}).
3374 @end table
3375
3376 @findex gnus-browse-mode
3377 A new buffer with a list of available groups will appear.  This buffer
3378 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3379 a lot) like a normal group buffer.
3380
3381 Here's a list of keystrokes available in the browse mode:
3382
3383 @table @kbd
3384 @item n
3385 @kindex n (Browse)
3386 @findex gnus-group-next-group
3387 Go to the next group (@code{gnus-group-next-group}).
3388
3389 @item p
3390 @kindex p (Browse)
3391 @findex gnus-group-prev-group
3392 Go to the previous group (@code{gnus-group-prev-group}).
3393
3394 @item SPACE
3395 @kindex SPACE (Browse)
3396 @findex gnus-browse-read-group
3397 Enter the current group and display the first article
3398 (@code{gnus-browse-read-group}).
3399
3400 @item RET
3401 @kindex RET (Browse)
3402 @findex gnus-browse-select-group
3403 Enter the current group (@code{gnus-browse-select-group}).
3404
3405 @item u
3406 @kindex u (Browse)
3407 @findex gnus-browse-unsubscribe-current-group
3408 Unsubscribe to the current group, or, as will be the case here,
3409 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3410
3411 @item l
3412 @itemx q
3413 @kindex q (Browse)
3414 @kindex l (Browse)
3415 @findex gnus-browse-exit
3416 Exit browse mode (@code{gnus-browse-exit}).
3417
3418 @item d
3419 @kindex d (Browse)
3420 @findex gnus-browse-describe-group
3421 Describe the current group (@code{gnus-browse-describe-group}).
3422
3423 @item ?
3424 @kindex ? (Browse)
3425 @findex gnus-browse-describe-briefly
3426 Describe browse mode briefly (well, there's not much to describe, is
3427 there) (@code{gnus-browse-describe-briefly}).
3428 @end table
3429
3430
3431 @node Exiting Gnus
3432 @section Exiting Gnus
3433 @cindex exiting Gnus
3434
3435 Yes, Gnus is ex(c)iting.
3436
3437 @table @kbd
3438 @item z
3439 @kindex z (Group)
3440 @findex gnus-group-suspend
3441 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3442 but it kills all buffers except the Group buffer.  I'm not sure why this
3443 is a gain, but then who am I to judge?
3444
3445 @item q
3446 @kindex q (Group)
3447 @findex gnus-group-exit
3448 @c @icon{gnus-group-exit}
3449 Quit Gnus (@code{gnus-group-exit}).
3450
3451 @item Q
3452 @kindex Q (Group)
3453 @findex gnus-group-quit
3454 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3455 The dribble file will be saved, though (@pxref{Auto Save}).
3456 @end table
3457
3458 @vindex gnus-exit-gnus-hook
3459 @vindex gnus-suspend-gnus-hook
3460 @vindex gnus-after-exiting-gnus-hook
3461 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3462 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3463 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3464 exiting Gnus.
3465
3466 Note:
3467
3468 @quotation
3469 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3470 numbly heavy and herself fall into a hazy trance as the boy sitting
3471 behind her drew repeated lines with his pencil across the back of her
3472 plastic chair.
3473 @end quotation
3474
3475
3476 @node Group Topics
3477 @section Group Topics
3478 @cindex topics
3479
3480 If you read lots and lots of groups, it might be convenient to group
3481 them hierarchically according to topics.  You put your Emacs groups over
3482 here, your sex groups over there, and the rest (what, two groups or so?)
3483 you put in some misc section that you never bother with anyway.  You can
3484 even group the Emacs sex groups as a sub-topic to either the Emacs
3485 groups or the sex groups---or both!  Go wild!
3486
3487 @iftex
3488 @iflatex
3489 \gnusfigure{Group Topics}{400}{
3490 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3491 }
3492 @end iflatex
3493 @end iftex
3494
3495 Here's an example:
3496
3497 @example
3498 Gnus
3499   Emacs -- I wuw it!
3500      3: comp.emacs
3501      2: alt.religion.emacs
3502     Naughty Emacs
3503      452: alt.sex.emacs
3504        0: comp.talk.emacs.recovery
3505   Misc
3506      8: comp.binaries.fractals
3507     13: comp.sources.unix
3508 @end example
3509
3510 @findex gnus-topic-mode
3511 @kindex t (Group)
3512 To get this @emph{fab} functionality you simply turn on (ooh!) the
3513 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3514 is a toggling command.)
3515
3516 Go ahead, just try it.  I'll still be here when you get back.  La de
3517 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3518 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3519 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3520 Hot and bothered?
3521
3522 If you want this permanently enabled, you should add that minor mode to
3523 the hook for the group mode.  Put the following line in your
3524 @file{~/.gnus.el} file:
3525
3526 @lisp
3527 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3528 @end lisp
3529
3530 @menu
3531 * Topic Commands::              Interactive E-Z commands.
3532 * Topic Variables::             How to customize the topics the Lisp Way.
3533 * Topic Sorting::               Sorting each topic individually.
3534 * Topic Topology::              A map of the world.
3535 * Topic Parameters::            Parameters that apply to all groups in a topic.
3536 @end menu
3537
3538
3539 @node Topic Commands
3540 @subsection Topic Commands
3541 @cindex topic commands
3542
3543 When the topic minor mode is turned on, a new @kbd{T} submap will be
3544 available.  In addition, a few of the standard keys change their
3545 definitions slightly.
3546
3547 In general, the following kinds of operations are possible on topics.
3548 First of all, you want to create topics.  Secondly, you want to put
3549 groups in topics and to move them around until you have an order you
3550 like.  The third kind of operation is to show/hide parts of the whole
3551 shebang.  You might want to hide a topic including its subtopics and
3552 groups, to get a better overview of the other groups.
3553
3554 Here is a list of the basic keys that you might need to set up topics
3555 the way you like.
3556
3557 @table @kbd
3558
3559 @item T n
3560 @kindex T n (Topic)
3561 @findex gnus-topic-create-topic
3562 Prompt for a new topic name and create it
3563 (@code{gnus-topic-create-topic}).
3564
3565 @item T TAB
3566 @itemx TAB
3567 @kindex T TAB (Topic)
3568 @kindex TAB (Topic)
3569 @findex gnus-topic-indent
3570 ``Indent'' the current topic so that it becomes a sub-topic of the
3571 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3572 ``un-indent'' the topic instead.
3573
3574 @item M-TAB
3575 @kindex M-TAB (Topic)
3576 @findex gnus-topic-unindent
3577 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3578 parent of its current parent (@code{gnus-topic-unindent}).
3579
3580 @end table
3581
3582 The following two keys can be used to move groups and topics around.
3583 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3584 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3585 kill and yank rather than cut and paste.
3586
3587 @table @kbd
3588
3589 @item C-k
3590 @kindex C-k (Topic)
3591 @findex gnus-topic-kill-group
3592 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3593 topic will be removed along with the topic.
3594
3595 @item C-y
3596 @kindex C-y (Topic)
3597 @findex gnus-topic-yank-group
3598 Yank the previously killed group or topic
3599 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3600 before all groups.
3601
3602 So, to move a topic to the beginning of the list of topics, just hit
3603 @kbd{C-k} on it.  This is like the `cut' part of cut and paste.  Then,
3604 move the cursor to the beginning of the buffer (just below the `Gnus'
3605 topic) and hit @kbd{C-y}.  This is like the `paste' part of cut and
3606 paste.  Like I said -- E-Z.
3607
3608 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3609 you can move topics around as well as groups.
3610
3611 @end table
3612
3613 After setting up the topics the way you like them, you might wish to
3614 hide a topic, or to show it again.  That's why we have the following
3615 key.
3616
3617 @table @kbd
3618
3619 @item RET
3620 @kindex RET (Topic)
3621 @findex gnus-topic-select-group
3622 @itemx SPACE
3623 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3624 When you perform this command on a group, you'll enter the group, as
3625 usual.  When done on a topic line, the topic will be folded (if it was
3626 visible) or unfolded (if it was folded already).  So it's basically a
3627 toggling command on topics.  In addition, if you give a numerical
3628 prefix, group on that level (and lower) will be displayed.
3629
3630 @end table
3631
3632 Now for a list of other commands, in no particular order.
3633
3634 @table @kbd
3635
3636 @item T m
3637 @kindex T m (Topic)
3638 @findex gnus-topic-move-group
3639 Move the current group to some other topic
3640 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3641 convention (@pxref{Process/Prefix}).
3642
3643 @item T j
3644 @kindex T j (Topic)
3645 @findex gnus-topic-jump-to-topic
3646 Go to a topic (@code{gnus-topic-jump-to-topic}).
3647
3648 @item T c
3649 @kindex T c (Topic)
3650 @findex gnus-topic-copy-group
3651 Copy the current group to some other topic
3652 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3653 convention (@pxref{Process/Prefix}).
3654
3655 @item T h
3656 @kindex T h (Topic)
3657 @findex gnus-topic-hide-topic
3658 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3659 a prefix, hide the topic permanently.
3660
3661 @item T s
3662 @kindex T s (Topic)
3663 @findex gnus-topic-show-topic
3664 Show the current topic (@code{gnus-topic-show-topic}).  If given
3665 a prefix, show the topic permanently.
3666
3667 @item T D
3668 @kindex T D (Topic)
3669 @findex gnus-topic-remove-group
3670 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3671 This command is mainly useful if you have the same group in several
3672 topics and wish to remove it from one of the topics.  You may also
3673 remove a group from all topics, but in that case, Gnus will add it to
3674 the root topic the next time you start Gnus.  In fact, all new groups
3675 (which, naturally, don't belong to any topic) will show up in the root
3676 topic.
3677
3678 This command uses the process/prefix convention
3679 (@pxref{Process/Prefix}).
3680
3681 @item T M
3682 @kindex T M (Topic)
3683 @findex gnus-topic-move-matching
3684 Move all groups that match some regular expression to a topic
3685 (@code{gnus-topic-move-matching}).
3686
3687 @item T C
3688 @kindex T C (Topic)
3689 @findex gnus-topic-copy-matching
3690 Copy all groups that match some regular expression to a topic
3691 (@code{gnus-topic-copy-matching}).
3692
3693 @item T H
3694 @kindex T H (Topic)
3695 @findex gnus-topic-toggle-display-empty-topics
3696 Toggle hiding empty topics
3697 (@code{gnus-topic-toggle-display-empty-topics}).
3698
3699 @item T #
3700 @kindex T # (Topic)
3701 @findex gnus-topic-mark-topic
3702 Mark all groups in the current topic with the process mark
3703 (@code{gnus-topic-mark-topic}).  This command works recursively on
3704 sub-topics unless given a prefix.
3705
3706 @item T M-#
3707 @kindex T M-# (Topic)
3708 @findex gnus-topic-unmark-topic
3709 Remove the process mark from all groups in the current topic
3710 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3711 sub-topics unless given a prefix.
3712
3713 @item C-c C-x
3714 @kindex C-c C-x (Topic)
3715 @findex gnus-topic-expire-articles
3716 Run all expirable articles in the current group or topic through the
3717 expiry process (if any)
3718 (@code{gnus-topic-expire-articles}). (@pxref{Expiring Mail}).
3719
3720 @item T r
3721 @kindex T r (Topic)
3722 @findex gnus-topic-rename
3723 Rename a topic (@code{gnus-topic-rename}).
3724
3725 @item T DEL
3726 @kindex T DEL (Topic)
3727 @findex gnus-topic-delete
3728 Delete an empty topic (@code{gnus-topic-delete}).
3729
3730 @item A T
3731 @kindex A T (Topic)
3732 @findex gnus-topic-list-active
3733 List all groups that Gnus knows about in a topics-ified way
3734 (@code{gnus-topic-list-active}).
3735
3736 @item T M-n
3737 @kindex T M-n (Topic)
3738 @findex gnus-topic-goto-next-topic
3739 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3740
3741 @item T M-p
3742 @kindex T M-p (Topic)
3743 @findex gnus-topic-goto-previous-topic
3744 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3745
3746 @item G p
3747 @kindex G p (Topic)
3748 @findex gnus-topic-edit-parameters
3749 @cindex group parameters
3750 @cindex topic parameters
3751 @cindex parameters
3752 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3753 @xref{Topic Parameters}.
3754
3755 @end table
3756
3757
3758 @node Topic Variables
3759 @subsection Topic Variables
3760 @cindex topic variables
3761
3762 The previous section told you how to tell Gnus which topics to display.
3763 This section explains how to tell Gnus what to display about each topic.
3764
3765 @vindex gnus-topic-line-format
3766 The topic lines themselves are created according to the
3767 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3768 Valid elements are:
3769
3770 @table @samp
3771 @item i
3772 Indentation.
3773 @item n
3774 Topic name.
3775 @item v
3776 Visibility.
3777 @item l
3778 Level.
3779 @item g
3780 Number of groups in the topic.
3781 @item a
3782 Number of unread articles in the topic.
3783 @item A
3784 Number of unread articles in the topic and all its subtopics.
3785 @end table
3786
3787 @vindex gnus-topic-indent-level
3788 Each sub-topic (and the groups in the sub-topics) will be indented with
3789 @code{gnus-topic-indent-level} times the topic level number of spaces.
3790 The default is 2.
3791
3792 @vindex gnus-topic-mode-hook
3793 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3794
3795 @vindex gnus-topic-display-empty-topics
3796 The @code{gnus-topic-display-empty-topics} says whether to display even
3797 topics that have no unread articles in them.  The default is @code{t}.
3798
3799
3800 @node Topic Sorting
3801 @subsection Topic Sorting
3802 @cindex topic sorting
3803
3804 You can sort the groups in each topic individually with the following
3805 commands:
3806
3807
3808 @table @kbd
3809 @item T S a
3810 @kindex T S a (Topic)
3811 @findex gnus-topic-sort-groups-by-alphabet
3812 Sort the current topic alphabetically by group name
3813 (@code{gnus-topic-sort-groups-by-alphabet}).
3814
3815 @item T S u
3816 @kindex T S u (Topic)
3817 @findex gnus-topic-sort-groups-by-unread
3818 Sort the current topic by the number of unread articles
3819 (@code{gnus-topic-sort-groups-by-unread}).
3820
3821 @item T S l
3822 @kindex T S l (Topic)
3823 @findex gnus-topic-sort-groups-by-level
3824 Sort the current topic by group level
3825 (@code{gnus-topic-sort-groups-by-level}).
3826
3827 @item T S v
3828 @kindex T S v (Topic)
3829 @findex gnus-topic-sort-groups-by-score
3830 Sort the current topic by group score
3831 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3832
3833 @item T S r
3834 @kindex T S r (Topic)
3835 @findex gnus-topic-sort-groups-by-rank
3836 Sort the current topic by group rank
3837 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3838
3839 @item T S m
3840 @kindex T S m (Topic)
3841 @findex gnus-topic-sort-groups-by-method
3842 Sort the current topic alphabetically by back end name
3843 (@code{gnus-topic-sort-groups-by-method}).
3844
3845 @item T S e
3846 @kindex T S e (Topic)
3847 @findex gnus-topic-sort-groups-by-server
3848 Sort the current topic alphabetically by server name
3849 (@code{gnus-topic-sort-groups-by-server}).
3850
3851 @item T S s
3852 @kindex T S s
3853 @findex gnus-topic-sort-groups
3854 Sort the current topic according to the function(s) given by the
3855 @code{gnus-group-sort-function} variable
3856 (@code{gnus-topic-sort-groups}).
3857
3858 @end table
3859
3860 When given a prefix argument, all these commands will sort in reverse
3861 order.  @xref{Sorting Groups}, for more information about group
3862 sorting.
3863
3864
3865 @node Topic Topology
3866 @subsection Topic Topology
3867 @cindex topic topology
3868 @cindex topology
3869
3870 So, let's have a look at an example group buffer:
3871
3872 @example
3873 @group
3874 Gnus
3875   Emacs -- I wuw it!
3876      3: comp.emacs
3877      2: alt.religion.emacs
3878     Naughty Emacs
3879      452: alt.sex.emacs
3880        0: comp.talk.emacs.recovery
3881   Misc
3882      8: comp.binaries.fractals
3883     13: comp.sources.unix
3884 @end group
3885 @end example
3886
3887 So, here we have one top-level topic (@samp{Gnus}), two topics under
3888 that, and one sub-topic under one of the sub-topics.  (There is always
3889 just one (1) top-level topic).  This topology can be expressed as
3890 follows:
3891
3892 @lisp
3893 (("Gnus" visible)
3894  (("Emacs -- I wuw it!" visible)
3895   (("Naughty Emacs" visible)))
3896  (("Misc" visible)))
3897 @end lisp
3898
3899 @vindex gnus-topic-topology
3900 This is in fact how the variable @code{gnus-topic-topology} would look
3901 for the display above.  That variable is saved in the @file{.newsrc.eld}
3902 file, and shouldn't be messed with manually---unless you really want
3903 to.  Since this variable is read from the @file{.newsrc.eld} file,
3904 setting it in any other startup files will have no effect.
3905
3906 This topology shows what topics are sub-topics of what topics (right),
3907 and which topics are visible.  Two settings are currently
3908 allowed---@code{visible} and @code{invisible}.
3909
3910
3911 @node Topic Parameters
3912 @subsection Topic Parameters
3913 @cindex topic parameters
3914
3915 All groups in a topic will inherit group parameters from the parent (and
3916 ancestor) topic parameters.  All valid group parameters are valid topic
3917 parameters (@pxref{Group Parameters}).
3918
3919 In addition, the following parameters are only valid as topic
3920 parameters:
3921
3922 @table @code
3923 @item subscribe
3924 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3925 @code{subscribe} topic parameter says what groups go in what topic.  Its
3926 value should be a regexp to match the groups that should go in that
3927 topic.
3928
3929 @item subscribe-level
3930 When subscribing new groups by topic (see the @code{subscribe} parameter),
3931 the group will be subscribed with the level specified in the
3932 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3933
3934 @end table
3935
3936 Group parameters (of course) override topic parameters, and topic
3937 parameters in sub-topics override topic parameters in super-topics.  You
3938 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3939 verb, although you may feel free to disagree with me here.)
3940
3941 @example
3942 Gnus
3943   Emacs
3944      3: comp.emacs
3945      2: alt.religion.emacs
3946    452: alt.sex.emacs
3947     Relief
3948      452: alt.sex.emacs
3949        0: comp.talk.emacs.recovery
3950   Misc
3951      8: comp.binaries.fractals
3952     13: comp.sources.unix
3953    452: alt.sex.emacs
3954 @end example
3955
3956 The @samp{Emacs} topic has the topic parameter @code{(score-file
3957 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
3958 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
3959 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
3960 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
3961 . "religion.SCORE")}.
3962
3963 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
3964 will get the @file{relief.SCORE} home score file.  If you enter the same
3965 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
3966 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
3967 get the @file{religion.SCORE} home score file.
3968
3969 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
3970 there are some problems, especially with the @code{total-expiry}
3971 parameter.  Say you have a mail group in two topics; one with
3972 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
3973 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
3974 of these topics you mean to expire articles from, so anything may
3975 happen.  In fact, I hereby declare that it is @dfn{undefined} what
3976 happens.  You just have to be careful if you do stuff like that.
3977
3978
3979 @node Misc Group Stuff
3980 @section Misc Group Stuff
3981
3982 @menu
3983 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
3984 * Group Information::           Information and help on groups and Gnus.
3985 * Group Timestamp::             Making Gnus keep track of when you last read a group.
3986 * File Commands::               Reading and writing the Gnus files.
3987 * Sieve Commands::              Managing Sieve scripts.
3988 @end menu
3989
3990 @table @kbd
3991
3992 @item ^
3993 @kindex ^ (Group)
3994 @findex gnus-group-enter-server-mode
3995 Enter the server buffer (@code{gnus-group-enter-server-mode}).
3996 @xref{Server Buffer}.
3997
3998 @item a
3999 @kindex a (Group)
4000 @findex gnus-group-post-news
4001 Start composing a message (a news by default)
4002 (@code{gnus-group-post-news}).  If given a prefix, post to the group
4003 under the point.  If the prefix is 1, prompt for a group to post to.
4004 Contrary to what the name of this function suggests, the prepared
4005 article might be a mail instead of a news, if a mail group is specified
4006 with the prefix argument.  @xref{Composing Messages}.
4007
4008 @item m
4009 @kindex m (Group)
4010 @findex gnus-group-mail
4011 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
4012 use the posting style of the group under the point.  If the prefix is 1,
4013 prompt for a group name to find the posting style.
4014 @xref{Composing Messages}.
4015
4016 @item i
4017 @kindex i (Group)
4018 @findex gnus-group-news
4019 Start composing a news (@code{gnus-group-news}).  If given a prefix,
4020 post to the group under the point.  If the prefix is 1, prompt
4021 for group to post to.  @xref{Composing Messages}.
4022
4023 This function actually prepares a news even when using mail groups.
4024 This is useful for ``posting'' messages to mail groups without actually
4025 sending them over the network: they're just saved directly to the group
4026 in question.  The corresponding back end must have a request-post method
4027 for this to work though.
4028
4029 @end table
4030
4031 Variables for the group buffer:
4032
4033 @table @code
4034
4035 @item gnus-group-mode-hook
4036 @vindex gnus-group-mode-hook
4037 is called after the group buffer has been
4038 created.
4039
4040 @item gnus-group-prepare-hook
4041 @vindex gnus-group-prepare-hook
4042 is called after the group buffer is
4043 generated.  It may be used to modify the buffer in some strange,
4044 unnatural way.
4045
4046 @item gnus-group-prepared-hook
4047 @vindex gnus-group-prepare-hook
4048 is called as the very last thing after the group buffer has been
4049 generated.  It may be used to move point around, for instance.
4050
4051 @item gnus-permanently-visible-groups
4052 @vindex gnus-permanently-visible-groups
4053 Groups matching this regexp will always be listed in the group buffer,
4054 whether they are empty or not.
4055
4056 @item gnus-group-name-charset-method-alist
4057 @vindex gnus-group-name-charset-method-alist
4058 An alist of method and the charset for group names. It is used to show
4059 non-@acronym{ASCII} group names.
4060
4061 For example:
4062 @lisp
4063 (setq gnus-group-name-charset-method-alist
4064     '(((nntp "news.com.cn") . cn-gb-2312)))
4065 @end lisp
4066
4067 @item gnus-group-name-charset-group-alist
4068 @cindex UTF-8 group names
4069 @vindex gnus-group-name-charset-group-alist
4070 An alist of regexp of group name and the charset for group names.  It
4071 is used to show non-@acronym{ASCII} group names.  @code{((".*"
4072 utf-8))} is the default value if UTF-8 is supported, otherwise the
4073 default is @code{nil}.
4074
4075 For example:
4076 @lisp
4077 (setq gnus-group-name-charset-group-alist
4078     '(("\\.com\\.cn:" . cn-gb-2312)))
4079 @end lisp
4080
4081 @end table
4082
4083 @node Scanning New Messages
4084 @subsection Scanning New Messages
4085 @cindex new messages
4086 @cindex scanning new news
4087
4088 @table @kbd
4089
4090 @item g
4091 @kindex g (Group)
4092 @findex gnus-group-get-new-news
4093 @c @icon{gnus-group-get-new-news}
4094 Check the server(s) for new articles.  If the numerical prefix is used,
4095 this command will check only groups of level @var{arg} and lower
4096 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4097 command will force a total re-reading of the active file(s) from the
4098 back end(s).
4099
4100 @item M-g
4101 @kindex M-g (Group)
4102 @findex gnus-group-get-new-news-this-group
4103 @vindex gnus-goto-next-group-when-activating
4104 @c @icon{gnus-group-get-new-news-this-group}
4105 Check whether new articles have arrived in the current group
4106 (@code{gnus-group-get-new-news-this-group}).
4107 @code{gnus-goto-next-group-when-activating} says whether this command is
4108 to move point to the next group or not.  It is @code{t} by default.
4109
4110 @findex gnus-activate-all-groups
4111 @cindex activating groups
4112 @item C-c M-g
4113 @kindex C-c M-g (Group)
4114 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4115
4116 @item R
4117 @kindex R (Group)
4118 @cindex restarting
4119 @findex gnus-group-restart
4120 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4121 file(s), closes the connection to all servers, clears up all run-time
4122 Gnus variables, and then starts Gnus all over again.
4123
4124 @end table
4125
4126 @vindex gnus-get-new-news-hook
4127 @code{gnus-get-new-news-hook} is run just before checking for new news.
4128
4129 @vindex gnus-after-getting-new-news-hook
4130 @code{gnus-after-getting-new-news-hook} is run after checking for new
4131 news.
4132
4133
4134 @node Group Information
4135 @subsection Group Information
4136 @cindex group information
4137 @cindex information on groups
4138
4139 @table @kbd
4140
4141
4142 @item H f
4143 @kindex H f (Group)
4144 @findex gnus-group-fetch-faq
4145 @vindex gnus-group-faq-directory
4146 @cindex FAQ
4147 @cindex ange-ftp
4148 Try to fetch the @acronym{FAQ} for the current group
4149 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
4150 from @code{gnus-group-faq-directory}, which is usually a directory on
4151 a remote machine.  This variable can also be a list of directories.
4152 In that case, giving a prefix to this command will allow you to choose
4153 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
4154 used for fetching the file.
4155
4156 If fetching from the first site is unsuccessful, Gnus will attempt to go
4157 through @code{gnus-group-faq-directory} and try to open them one by one.
4158
4159 @item H c
4160 @kindex H c (Group)
4161 @findex gnus-group-fetch-charter
4162 @vindex gnus-group-charter-alist
4163 @cindex charter
4164 Try to open the charter for the current group in a web browser
4165 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4166 prefix argument.
4167
4168 Gnus will use @code{gnus-group-charter-alist} to find the location of
4169 the charter.  If no location is known, Gnus will fetch the control
4170 messages for the group, which in some cases includes the charter.
4171
4172 @item H C
4173 @kindex H C (Group)
4174 @findex gnus-group-fetch-control
4175 @vindex gnus-group-fetch-control-use-browse-url
4176 @cindex control message
4177 Fetch the control messages for the group from the archive at
4178 @code{ftp.isc.org} (@code{gnus-group-fetch-control}). Query for a
4179 group if given a prefix argument.
4180
4181 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
4182 Gnus will open the control messages in a browser using
4183 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
4184 and displayed in an ephemeral group.
4185
4186 Note that the control messages are compressed.  To use this command
4187 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
4188 Files, ,Compressed Files, emacs, The Emacs Manual}).
4189
4190 @item H d
4191 @itemx C-c C-d
4192 @c @icon{gnus-group-describe-group}
4193 @kindex H d (Group)
4194 @kindex C-c C-d (Group)
4195 @cindex describing groups
4196 @cindex group description
4197 @findex gnus-group-describe-group
4198 Describe the current group (@code{gnus-group-describe-group}).  If given
4199 a prefix, force Gnus to re-read the description from the server.
4200
4201 @item M-d
4202 @kindex M-d (Group)
4203 @findex gnus-group-describe-all-groups
4204 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4205 prefix, force Gnus to re-read the description file from the server.
4206
4207 @item H v
4208 @itemx V
4209 @kindex V (Group)
4210 @kindex H v (Group)
4211 @cindex version
4212 @findex gnus-version
4213 Display current Gnus version numbers (@code{gnus-version}).
4214
4215 @item ?
4216 @kindex ? (Group)
4217 @findex gnus-group-describe-briefly
4218 Give a very short help message (@code{gnus-group-describe-briefly}).
4219
4220 @item C-c C-i
4221 @kindex C-c C-i (Group)
4222 @cindex info
4223 @cindex manual
4224 @findex gnus-info-find-node
4225 Go to the Gnus info node (@code{gnus-info-find-node}).
4226 @end table
4227
4228
4229 @node Group Timestamp
4230 @subsection Group Timestamp
4231 @cindex timestamps
4232 @cindex group timestamps
4233
4234 It can be convenient to let Gnus keep track of when you last read a
4235 group.  To set the ball rolling, you should add
4236 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4237
4238 @lisp
4239 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4240 @end lisp
4241
4242 After doing this, each time you enter a group, it'll be recorded.
4243
4244 This information can be displayed in various ways---the easiest is to
4245 use the @samp{%d} spec in the group line format:
4246
4247 @lisp
4248 (setq gnus-group-line-format
4249       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4250 @end lisp
4251
4252 This will result in lines looking like:
4253
4254 @example
4255 *        0: mail.ding                                19961002T012943
4256          0: custom                                   19961002T012713
4257 @end example
4258
4259 As you can see, the date is displayed in compact ISO 8601 format.  This
4260 may be a bit too much, so to just display the date, you could say
4261 something like:
4262
4263 @lisp
4264 (setq gnus-group-line-format
4265       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4266 @end lisp
4267
4268 If you would like greater control of the time format, you can use a
4269 user-defined format spec.  Something like the following should do the
4270 trick:
4271
4272 @lisp
4273 (setq gnus-group-line-format
4274       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4275 (defun gnus-user-format-function-d (headers)
4276   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4277     (if time
4278         (format-time-string "%b %d  %H:%M" time)
4279       "")))
4280 @end lisp
4281
4282
4283 @node File Commands
4284 @subsection File Commands
4285 @cindex file commands
4286
4287 @table @kbd
4288
4289 @item r
4290 @kindex r (Group)
4291 @findex gnus-group-read-init-file
4292 @vindex gnus-init-file
4293 @cindex reading init file
4294 Re-read the init file (@code{gnus-init-file}, which defaults to
4295 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
4296
4297 @item s
4298 @kindex s (Group)
4299 @findex gnus-group-save-newsrc
4300 @cindex saving .newsrc
4301 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4302 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4303 file(s) whether Gnus thinks it is necessary or not.
4304
4305 @c @item Z
4306 @c @kindex Z (Group)
4307 @c @findex gnus-group-clear-dribble
4308 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4309
4310 @end table
4311
4312
4313 @node Sieve Commands
4314 @subsection Sieve Commands
4315 @cindex group sieve commands
4316
4317 Sieve is a server-side mail filtering language.  In Gnus you can use
4318 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4319 sieve rules that should apply to each group.  Gnus provides two
4320 commands to translate all these group parameters into a proper Sieve
4321 script that can be transfered to the server somehow.
4322
4323 @vindex gnus-sieve-file
4324 @vindex gnus-sieve-region-start
4325 @vindex gnus-sieve-region-end
4326 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4327 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4328 between two delimiters, @code{gnus-sieve-region-start} and
4329 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4330 outside these delimiters that will not be removed the next time you
4331 regenerate the Sieve script.
4332
4333 @vindex gnus-sieve-crosspost
4334 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4335 is generated.  If it is non-@code{nil} (the default) articles is
4336 placed in all groups that have matching rules, otherwise the article
4337 is only placed in the group with the first matching rule.  For
4338 example, the group parameter @samp{(sieve address "sender"
4339 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4340 code if @code{gnus-sieve-crosspost} is @code{nil}. (When
4341 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4342 except that the line containing the call to @code{stop} is removed.)
4343
4344 @example
4345 if address "sender" "owner-ding@@hpc.uh.edu" @{
4346         fileinto "INBOX.ding";
4347         stop;
4348 @}
4349 @end example
4350
4351 @xref{Top, ,Top, sieve, Emacs Sieve}.
4352
4353 @table @kbd
4354
4355 @item D g
4356 @kindex D g (Group)
4357 @findex gnus-sieve-generate
4358 @vindex gnus-sieve-file
4359 @cindex generating sieve script
4360 Regenerate a Sieve script from the @code{sieve} group parameters and
4361 put you into the @code{gnus-sieve-file} without saving it.
4362
4363 @item D u
4364 @kindex D u (Group)
4365 @findex gnus-sieve-update
4366 @vindex gnus-sieve-file
4367 @cindex updating sieve script
4368 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4369 @code{sieve} group parameters, save the file and upload it to the
4370 server using the @code{sieveshell} program.
4371
4372 @end table
4373
4374
4375 @node Summary Buffer
4376 @chapter Summary Buffer
4377 @cindex summary buffer
4378
4379 A line for each article is displayed in the summary buffer.  You can
4380 move around, read articles, post articles and reply to articles.
4381
4382 The most common way to a summary buffer is to select a group from the
4383 group buffer (@pxref{Selecting a Group}).
4384
4385 You can have as many summary buffers open as you wish.
4386
4387 @menu
4388 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4389 * Summary Maneuvering::         Moving around the summary buffer.
4390 * Choosing Articles::           Reading articles.
4391 * Paging the Article::          Scrolling the current article.
4392 * Reply Followup and Post::     Posting articles.
4393 * Delayed Articles::            Send articles at a later time.
4394 * Marking Articles::            Marking articles as read, expirable, etc.
4395 * Limiting::                    You can limit the summary buffer.
4396 * Threading::                   How threads are made.
4397 * Sorting the Summary Buffer::  How articles and threads are sorted.
4398 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4399 * Article Caching::             You may store articles in a cache.
4400 * Persistent Articles::         Making articles expiry-resistant.
4401 * Article Backlog::             Having already read articles hang around.
4402 * Saving Articles::             Ways of customizing article saving.
4403 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4404 * Article Treatment::           The article buffer can be mangled at will.
4405 * MIME Commands::               Doing MIMEy things with the articles.
4406 * Charsets::                    Character set issues.
4407 * Article Commands::            Doing various things with the article buffer.
4408 * Summary Sorting::             Sorting the summary buffer in various ways.
4409 * Finding the Parent::          No child support? Get the parent.
4410 * Alternative Approaches::      Reading using non-default summaries.
4411 * Tree Display::                A more visual display of threads.
4412 * Mail Group Commands::         Some commands can only be used in mail groups.
4413 * Various Summary Stuff::       What didn't fit anywhere else.
4414 * Exiting the Summary Buffer::  Returning to the Group buffer,
4415                                 or reselecting the current group.
4416 * Crosspost Handling::          How crossposted articles are dealt with.
4417 * Duplicate Suppression::       An alternative when crosspost handling fails.
4418 * Security::                    Decrypt and Verify.
4419 * Mailing List::                Mailing list minor mode.
4420 @end menu
4421
4422
4423 @node Summary Buffer Format
4424 @section Summary Buffer Format
4425 @cindex summary buffer format
4426
4427 @iftex
4428 @iflatex
4429 \gnusfigure{The Summary Buffer}{180}{
4430 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4431 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4432 }
4433 @end iflatex
4434 @end iftex
4435
4436 @menu
4437 * Summary Buffer Lines::        You can specify how summary lines should look.
4438 * To From Newsgroups::          How to not display your own name.
4439 * Summary Buffer Mode Line::    You can say how the mode line should look.
4440 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4441 @end menu
4442
4443 @findex mail-extract-address-components
4444 @findex gnus-extract-address-components
4445 @vindex gnus-extract-address-components
4446 Gnus will use the value of the @code{gnus-extract-address-components}
4447 variable as a function for getting the name and address parts of a
4448 @code{From} header.  Two pre-defined functions exist:
4449 @code{gnus-extract-address-components}, which is the default, quite
4450 fast, and too simplistic solution; and
4451 @code{mail-extract-address-components}, which works very nicely, but is
4452 slower.  The default function will return the wrong answer in 5% of the
4453 cases.  If this is unacceptable to you, use the other function instead:
4454
4455 @lisp
4456 (setq gnus-extract-address-components
4457       'mail-extract-address-components)
4458 @end lisp
4459
4460 @vindex gnus-summary-same-subject
4461 @code{gnus-summary-same-subject} is a string indicating that the current
4462 article has the same subject as the previous.  This string will be used
4463 with those specs that require it.  The default is @code{""}.
4464
4465
4466 @node Summary Buffer Lines
4467 @subsection Summary Buffer Lines
4468
4469 @vindex gnus-summary-line-format
4470 You can change the format of the lines in the summary buffer by changing
4471 the @code{gnus-summary-line-format} variable.  It works along the same
4472 lines as a normal @code{format} string, with some extensions
4473 (@pxref{Formatting Variables}).
4474
4475 There should always be a colon or a point position marker on the line;
4476 the cursor always moves to the point position marker or the colon after
4477 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4478 possible to change this.  Just write a new function
4479 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4480 @xref{Positioning Point}.
4481
4482 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4483
4484 The following format specification characters and extended format
4485 specification(s) are understood:
4486
4487 @table @samp
4488 @item N
4489 Article number.
4490 @item S
4491 Subject string.  List identifiers stripped,
4492 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4493 @item s
4494 Subject if the article is the root of the thread or the previous article
4495 had a different subject, @code{gnus-summary-same-subject} otherwise.
4496 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4497 @item F
4498 Full @code{From} header.
4499 @item n
4500 The name (from the @code{From} header).
4501 @item f
4502 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4503 From Newsgroups}).
4504 @item a
4505 The name (from the @code{From} header).  This differs from the @code{n}
4506 spec in that it uses the function designated by the
4507 @code{gnus-extract-address-components} variable, which is slower, but
4508 may be more thorough.
4509 @item A
4510 The address (from the @code{From} header).  This works the same way as
4511 the @code{a} spec.
4512 @item L
4513 Number of lines in the article.
4514 @item c
4515 Number of characters in the article. This specifier is not supported
4516 in some methods (like nnfolder).
4517 @item k
4518 Pretty-printed version of the number of characters in the article;
4519 for example, @samp{1.2k} or @samp{0.4M}.
4520 @item I
4521 Indentation based on thread level (@pxref{Customizing Threading}).
4522 @item B
4523 A complex trn-style thread tree, showing response-connecting trace
4524 lines.  A thread could be drawn like this:
4525
4526 @example
4527 >
4528 +->
4529 | +->
4530 | | \->
4531 | |   \->
4532 | \->
4533 +->
4534 \->
4535 @end example
4536
4537 You can customize the appearance with the following options.  Note
4538 that it is possible to make the thread display look really neat by
4539 replacing the default @acronym{ASCII} characters with graphic
4540 line-drawing glyphs.
4541 @table @code
4542 @item gnus-sum-thread-tree-root
4543 @vindex gnus-sum-thread-tree-root
4544 Used for the root of a thread.  If @code{nil}, use subject
4545 instead.  The default is @samp{> }.
4546
4547 @item gnus-sum-thread-tree-false-root
4548 @vindex gnus-sum-thread-tree-false-root
4549 Used for the false root of a thread (@pxref{Loose Threads}).  If
4550 @code{nil}, use subject instead.  The default is @samp{> }.
4551
4552 @item gnus-sum-thread-tree-single-indent
4553 @vindex gnus-sum-thread-tree-single-indent
4554 Used for a thread with just one message.  If @code{nil}, use subject
4555 instead.  The default is @samp{}.
4556
4557 @item gnus-sum-thread-tree-vertical
4558 @vindex gnus-sum-thread-tree-vertical
4559 Used for drawing a vertical line.  The default is @samp{| }.
4560
4561 @item gnus-sum-thread-tree-indent
4562 @vindex gnus-sum-thread-tree-indent
4563 Used for indenting.  The default is @samp{  }. 
4564
4565 @item gnus-sum-thread-tree-leaf-with-other
4566 @vindex gnus-sum-thread-tree-leaf-with-other
4567 Used for a leaf with brothers.  The default is @samp{+-> }.
4568
4569 @item gnus-sum-thread-tree-single-leaf
4570 @vindex gnus-sum-thread-tree-single-leaf
4571 Used for a leaf without brothers.  The default is @samp{\-> }
4572
4573 @end table
4574
4575 @item T
4576 Nothing if the article is a root and lots of spaces if it isn't (it
4577 pushes everything after it off the screen).
4578 @item [
4579 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4580 for adopted articles (@pxref{Customizing Threading}).
4581 @item ]
4582 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4583 for adopted articles.
4584 @item >
4585 One space for each thread level.
4586 @item <
4587 Twenty minus thread level spaces.
4588 @item U
4589 Unread. @xref{Read Articles}.
4590
4591 @item R
4592 This misleadingly named specifier is the @dfn{secondary mark}.  This
4593 mark will say whether the article has been replied to, has been cached,
4594 or has been saved.  @xref{Other Marks}.
4595
4596 @item i
4597 Score as a number (@pxref{Scoring}).
4598 @item z
4599 @vindex gnus-summary-zcore-fuzz
4600 Zcore, @samp{+} if above the default level and @samp{-} if below the
4601 default level.  If the difference between
4602 @code{gnus-summary-default-score} and the score is less than
4603 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4604 @item V
4605 Total thread score.
4606 @item x
4607 @code{Xref}.
4608 @item D
4609 @code{Date}.
4610 @item d
4611 The @code{Date} in @code{DD-MMM} format.
4612 @item o
4613 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4614 @item M
4615 @code{Message-ID}.
4616 @item r
4617 @code{References}.
4618 @item t
4619 Number of articles in the current sub-thread.  Using this spec will slow
4620 down summary buffer generation somewhat.
4621 @item e
4622 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4623 article has any children.
4624 @item P
4625 The line number.
4626 @item O
4627 Download mark.
4628 @item &user-date;
4629 Age sensitive date format.  Various date format is defined in
4630 @code{gnus-user-date-format-alist}.
4631 @item u
4632 User defined specifier.  The next character in the format string should
4633 be a letter.  Gnus will call the function
4634 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
4635 following @samp{%u}.  The function will be passed the current header as
4636 argument.  The function should return a string, which will be inserted
4637 into the summary just like information from any other summary specifier.
4638 @end table
4639
4640 Text between @samp{%(} and @samp{%)} will be highlighted with
4641 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4642 There can only be one such area.
4643
4644 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4645 have to be handled with care.  For reasons of efficiency, Gnus will
4646 compute what column these characters will end up in, and ``hard-code''
4647 that.  This means that it is invalid to have these specs after a
4648 variable-length spec.  Well, you might not be arrested, but your summary
4649 buffer will look strange, which is bad enough.
4650
4651 The smart choice is to have these specs as far to the left as possible.
4652 (Isn't that the case with everything, though?  But I digress.)
4653
4654 This restriction may disappear in later versions of Gnus.
4655
4656
4657 @node To From Newsgroups
4658 @subsection To From Newsgroups
4659 @cindex To
4660 @cindex Newsgroups
4661
4662 In some groups (particularly in archive groups), the @code{From} header
4663 isn't very interesting, since all the articles there are written by
4664 you.  To display the information in the @code{To} or @code{Newsgroups}
4665 headers instead, you need to decide three things: What information to
4666 gather; where to display it; and when to display it.
4667
4668 @enumerate
4669 @item
4670 @vindex gnus-extra-headers
4671 The reading of extra header information is controlled by the
4672 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4673 instance:
4674
4675 @lisp
4676 (setq gnus-extra-headers
4677       '(To Newsgroups X-Newsreader))
4678 @end lisp
4679
4680 This will result in Gnus trying to obtain these three headers, and
4681 storing it in header structures for later easy retrieval.
4682
4683 @item
4684 @findex gnus-extra-header
4685 The value of these extra headers can be accessed via the
4686 @code{gnus-extra-header} function.  Here's a format line spec that will
4687 access the @code{X-Newsreader} header:
4688
4689 @example
4690 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4691 @end example
4692
4693 @item
4694 @vindex gnus-ignored-from-addresses
4695 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4696 summary line spec returns the @code{To}, @code{Newsreader} or
4697 @code{From} header.  If this regexp matches the contents of the
4698 @code{From} header, the value of the @code{To} or @code{Newsreader}
4699 headers are used instead.
4700
4701 @end enumerate
4702
4703 @vindex nnmail-extra-headers
4704 A related variable is @code{nnmail-extra-headers}, which controls when
4705 to include extra headers when generating overview (@acronym{NOV}) files.
4706 If you have old overview files, you should regenerate them after
4707 changing this variable, by entering the server buffer using @kbd{^},
4708 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
4709 regeneration.
4710
4711 @vindex gnus-summary-line-format
4712 You also have to instruct Gnus to display the data by changing the
4713 @code{%n} spec to the @code{%f} spec in the
4714 @code{gnus-summary-line-format} variable.
4715
4716 In summary, you'd typically put something like the following in
4717 @file{~/.gnus.el}:
4718
4719 @lisp
4720 (setq gnus-extra-headers
4721       '(To Newsgroups))
4722 (setq nnmail-extra-headers gnus-extra-headers)
4723 (setq gnus-summary-line-format
4724       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4725 (setq gnus-ignored-from-addresses
4726       "Your Name Here")
4727 @end lisp
4728
4729 (The values listed above are the default values in Gnus.  Alter them
4730 to fit your needs.)
4731
4732 A note for news server administrators, or for users who wish to try to
4733 convince their news server administrator to provide some additional
4734 support:
4735
4736 The above is mostly useful for mail groups, where you have control over
4737 the @acronym{NOV} files that are created.  However, if you can persuade your
4738 nntp admin to add (in the usual implementation, notably INN):
4739
4740 @example
4741 Newsgroups:full
4742 @end example
4743
4744 to the end of her @file{overview.fmt} file, then you can use that just
4745 as you would the extra headers from the mail groups.
4746
4747
4748 @node Summary Buffer Mode Line
4749 @subsection Summary Buffer Mode Line
4750
4751 @vindex gnus-summary-mode-line-format
4752 You can also change the format of the summary mode bar (@pxref{Mode Line
4753 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4754 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4755
4756 Here are the elements you can play with:
4757
4758 @table @samp
4759 @item G
4760 Group name.
4761 @item p
4762 Unprefixed group name.
4763 @item A
4764 Current article number.
4765 @item z
4766 Current article score.
4767 @item V
4768 Gnus version.
4769 @item U
4770 Number of unread articles in this group.
4771 @item e
4772 Number of unread articles in this group that aren't displayed in the
4773 summary buffer.
4774 @item Z
4775 A string with the number of unread and unselected articles represented
4776 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4777 articles, and just as @samp{<%U more>} if there are just unread articles
4778 and no unselected ones.
4779 @item g
4780 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4781 shortened to @samp{r.a.anime}.
4782 @item S
4783 Subject of the current article.
4784 @item u
4785 User-defined spec (@pxref{User-Defined Specs}).
4786 @item s
4787 Name of the current score file (@pxref{Scoring}).
4788 @item d
4789 Number of dormant articles (@pxref{Unread Articles}).
4790 @item t
4791 Number of ticked articles (@pxref{Unread Articles}).
4792 @item r
4793 Number of articles that have been marked as read in this session.
4794 @item E
4795 Number of articles expunged by the score files.
4796 @end table
4797
4798
4799 @node Summary Highlighting
4800 @subsection Summary Highlighting
4801
4802 @table @code
4803
4804 @item gnus-visual-mark-article-hook
4805 @vindex gnus-visual-mark-article-hook
4806 This hook is run after selecting an article.  It is meant to be used for
4807 highlighting the article in some way.  It is not run if
4808 @code{gnus-visual} is @code{nil}.
4809
4810 @item gnus-summary-update-hook
4811 @vindex gnus-summary-update-hook
4812 This hook is called when a summary line is changed.  It is not run if
4813 @code{gnus-visual} is @code{nil}.
4814
4815 @item gnus-summary-selected-face
4816 @vindex gnus-summary-selected-face
4817 This is the face (or @dfn{font} as some people call it) used to
4818 highlight the current article in the summary buffer.
4819
4820 @item gnus-summary-highlight
4821 @vindex gnus-summary-highlight
4822 Summary lines are highlighted according to this variable, which is a
4823 list where the elements are of the format @code{(@var{form}
4824 . @var{face})}.  If you would, for instance, like ticked articles to be
4825 italic and high-scored articles to be bold, you could set this variable
4826 to something like
4827 @lisp
4828 (((eq mark gnus-ticked-mark) . italic)
4829  ((> score default) . bold))
4830 @end lisp
4831 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4832 @var{face} will be applied to the line.
4833 @end table
4834
4835
4836 @node Summary Maneuvering
4837 @section Summary Maneuvering
4838 @cindex summary movement
4839
4840 All the straight movement commands understand the numeric prefix and
4841 behave pretty much as you'd expect.
4842
4843 None of these commands select articles.
4844
4845 @table @kbd
4846 @item G M-n
4847 @itemx M-n
4848 @kindex M-n (Summary)
4849 @kindex G M-n (Summary)
4850 @findex gnus-summary-next-unread-subject
4851 Go to the next summary line of an unread article
4852 (@code{gnus-summary-next-unread-subject}).
4853
4854 @item G M-p
4855 @itemx M-p
4856 @kindex M-p (Summary)
4857 @kindex G M-p (Summary)
4858 @findex gnus-summary-prev-unread-subject
4859 Go to the previous summary line of an unread article
4860 (@code{gnus-summary-prev-unread-subject}).
4861
4862 @item G g
4863 @kindex G g (Summary)
4864 @findex gnus-summary-goto-subject
4865 Ask for an article number and then go to the summary line of that article
4866 without displaying the article (@code{gnus-summary-goto-subject}).
4867 @end table
4868
4869 If Gnus asks you to press a key to confirm going to the next group, you
4870 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4871 buffer, searching for the next group to read without actually returning
4872 to the group buffer.
4873
4874 Variables related to summary movement:
4875
4876 @table @code
4877
4878 @vindex gnus-auto-select-next
4879 @item gnus-auto-select-next
4880 If you issue one of the movement commands (like @kbd{n}) and there are
4881 no more unread articles after the current one, Gnus will offer to go to
4882 the next group.  If this variable is @code{t} and the next group is
4883 empty, Gnus will exit summary mode and return to the group buffer.  If
4884 this variable is neither @code{t} nor @code{nil}, Gnus will select the
4885 next group with unread articles.  As a special case, if this variable
4886 is @code{quietly}, Gnus will select the next group without asking for
4887 confirmation.  If this variable is @code{almost-quietly}, the same
4888 will happen only if you are located on the last article in the group.
4889 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4890 command will go to the next group without confirmation.  Also
4891 @pxref{Group Levels}.
4892
4893 @item gnus-auto-select-same
4894 @vindex gnus-auto-select-same
4895 If non-@code{nil}, all the movement commands will try to go to the next
4896 article with the same subject as the current.  (@dfn{Same} here might
4897 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4898 for details (@pxref{Customizing Threading}).)  If there are no more
4899 articles with the same subject, go to the first unread article.
4900
4901 This variable is not particularly useful if you use a threaded display.
4902
4903 @item gnus-summary-check-current
4904 @vindex gnus-summary-check-current
4905 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4906 to the next (or previous) article if the current article is unread.
4907 Instead, they will choose the current article.
4908
4909 @item gnus-auto-center-summary
4910 @vindex gnus-auto-center-summary
4911 If non-@code{nil}, Gnus will keep the point in the summary buffer
4912 centered at all times.  This makes things quite tidy, but if you have a
4913 slow network connection, or simply do not like this un-Emacsism, you can
4914 set this variable to @code{nil} to get the normal Emacs scrolling
4915 action.  This will also inhibit horizontal re-centering of the summary
4916 buffer, which might make it more inconvenient to read extremely long
4917 threads.
4918
4919 This variable can also be a number.  In that case, center the window at
4920 the given number of lines from the top.
4921
4922 @end table
4923
4924
4925 @node Choosing Articles
4926 @section Choosing Articles
4927 @cindex selecting articles
4928
4929 @menu
4930 * Choosing Commands::           Commands for choosing articles.
4931 * Choosing Variables::          Variables that influence these commands.
4932 @end menu
4933
4934
4935 @node Choosing Commands
4936 @subsection Choosing Commands
4937
4938 None of the following movement commands understand the numeric prefix,
4939 and they all select and display an article.
4940
4941 If you want to fetch new articles or redisplay the group, see
4942 @ref{Exiting the Summary Buffer}.
4943
4944 @table @kbd
4945 @item SPACE
4946 @kindex SPACE (Summary)
4947 @findex gnus-summary-next-page
4948 Select the current article, or, if that one's read already, the next
4949 unread article (@code{gnus-summary-next-page}).
4950
4951 If you have an article window open already and you press @kbd{SPACE}
4952 again, the article will be scrolled.  This lets you conveniently
4953 @kbd{SPACE} through an entire newsgroup.  @pxref{Paging the Article}.
4954
4955 @item G n
4956 @itemx n
4957 @kindex n (Summary)
4958 @kindex G n (Summary)
4959 @findex gnus-summary-next-unread-article
4960 @c @icon{gnus-summary-next-unread}
4961 Go to next unread article (@code{gnus-summary-next-unread-article}).
4962
4963 @item G p
4964 @itemx p
4965 @kindex p (Summary)
4966 @findex gnus-summary-prev-unread-article
4967 @c @icon{gnus-summary-prev-unread}
4968 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
4969
4970 @item G N
4971 @itemx N
4972 @kindex N (Summary)
4973 @kindex G N (Summary)
4974 @findex gnus-summary-next-article
4975 Go to the next article (@code{gnus-summary-next-article}).
4976
4977 @item G P
4978 @itemx P
4979 @kindex P (Summary)
4980 @kindex G P (Summary)
4981 @findex gnus-summary-prev-article
4982 Go to the previous article (@code{gnus-summary-prev-article}).
4983
4984 @item G C-n
4985 @kindex G C-n (Summary)
4986 @findex gnus-summary-next-same-subject
4987 Go to the next article with the same subject
4988 (@code{gnus-summary-next-same-subject}).
4989
4990 @item G C-p
4991 @kindex G C-p (Summary)
4992 @findex gnus-summary-prev-same-subject
4993 Go to the previous article with the same subject
4994 (@code{gnus-summary-prev-same-subject}).
4995
4996 @item G f
4997 @itemx .
4998 @kindex G f  (Summary)
4999 @kindex .  (Summary)
5000 @findex gnus-summary-first-unread-article
5001 Go to the first unread article
5002 (@code{gnus-summary-first-unread-article}).
5003
5004 @item G b
5005 @itemx ,
5006 @kindex G b (Summary)
5007 @kindex , (Summary)
5008 @findex gnus-summary-best-unread-article
5009 Go to the unread article with the highest score
5010 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
5011 go to the first unread article that has a score over the default score.
5012
5013 @item G l
5014 @itemx l
5015 @kindex l (Summary)
5016 @kindex G l (Summary)
5017 @findex gnus-summary-goto-last-article
5018 Go to the previous article read (@code{gnus-summary-goto-last-article}).
5019
5020 @item G o
5021 @kindex G o (Summary)
5022 @findex gnus-summary-pop-article
5023 @cindex history
5024 @cindex article history
5025 Pop an article off the summary history and go to this article
5026 (@code{gnus-summary-pop-article}).  This command differs from the
5027 command above in that you can pop as many previous articles off the
5028 history as you like, while @kbd{l} toggles the two last read articles.
5029 For a somewhat related issue (if you use these commands a lot),
5030 @pxref{Article Backlog}.
5031
5032 @item G j
5033 @itemx j
5034 @kindex j (Summary)
5035 @kindex G j (Summary)
5036 @findex gnus-summary-goto-article
5037 Ask for an article number or @code{Message-ID}, and then go to that
5038 article (@code{gnus-summary-goto-article}).
5039
5040 @end table
5041
5042
5043 @node Choosing Variables
5044 @subsection Choosing Variables
5045
5046 Some variables relevant for moving and selecting articles:
5047
5048 @table @code
5049 @item gnus-auto-extend-newsgroup
5050 @vindex gnus-auto-extend-newsgroup
5051 All the movement commands will try to go to the previous (or next)
5052 article, even if that article isn't displayed in the Summary buffer if
5053 this variable is non-@code{nil}.  Gnus will then fetch the article from
5054 the server and display it in the article buffer.
5055
5056 @item gnus-select-article-hook
5057 @vindex gnus-select-article-hook
5058 This hook is called whenever an article is selected.  By default it
5059 exposes any threads hidden under the selected article.  If you would 
5060 like each article to be saved in the Agent as you read it, putting
5061 @code{gnus-agent-fetch-selected-article} on this hook will do so.
5062
5063 @item gnus-mark-article-hook
5064 @vindex gnus-mark-article-hook
5065 @findex gnus-summary-mark-unread-as-read
5066 @findex gnus-summary-mark-read-and-unread-as-read
5067 @findex gnus-unread-mark
5068 This hook is called whenever an article is selected.  It is intended to
5069 be used for marking articles as read.  The default value is
5070 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5071 mark of almost any article you read to @code{gnus-unread-mark}.  The
5072 only articles not affected by this function are ticked, dormant, and
5073 expirable articles.  If you'd instead like to just have unread articles
5074 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5075 instead.  It will leave marks like @code{gnus-low-score-mark},
5076 @code{gnus-del-mark} (and so on) alone.
5077
5078 @end table
5079
5080
5081 @node Paging the Article
5082 @section Scrolling the Article
5083 @cindex article scrolling
5084
5085 @table @kbd
5086
5087 @item SPACE
5088 @kindex SPACE (Summary)
5089 @findex gnus-summary-next-page
5090 Pressing @kbd{SPACE} will scroll the current article forward one page,
5091 or, if you have come to the end of the current article, will choose the
5092 next article (@code{gnus-summary-next-page}).
5093
5094 @vindex gnus-article-boring-faces
5095 @vindex gnus-article-skip-boring
5096 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
5097 the article consists only of citations and signature, then it will be
5098 skipped; the next article will be shown instead.  You can customize
5099 what is considered uninteresting with
5100 @code{gnus-article-boring-faces}.  You can manually view the article's
5101 pages, no matter how boring, using @kbd{C-M-v}.
5102
5103 @item DEL
5104 @kindex DEL (Summary)
5105 @findex gnus-summary-prev-page
5106 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5107
5108 @item RET
5109 @kindex RET (Summary)
5110 @findex gnus-summary-scroll-up
5111 Scroll the current article one line forward
5112 (@code{gnus-summary-scroll-up}).
5113
5114 @item M-RET
5115 @kindex M-RET (Summary)
5116 @findex gnus-summary-scroll-down
5117 Scroll the current article one line backward
5118 (@code{gnus-summary-scroll-down}).
5119
5120 @item A g
5121 @itemx g
5122 @kindex A g (Summary)
5123 @kindex g (Summary)
5124 @findex gnus-summary-show-article
5125 @vindex gnus-summary-show-article-charset-alist
5126 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5127 given a prefix, fetch the current article, but don't run any of the
5128 article treatment functions.  This will give you a ``raw'' article, just
5129 the way it came from the server.
5130
5131 If given a numerical prefix, you can do semi-manual charset stuff.
5132 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5133 encoded in the @code{cn-gb-2312} charset.  If you have
5134
5135 @lisp
5136 (setq gnus-summary-show-article-charset-alist
5137       '((1 . cn-gb-2312)
5138         (2 . big5)))
5139 @end lisp
5140
5141 then you can say @kbd{C-u 1 g} to get the same effect.
5142
5143 @item A <
5144 @itemx <
5145 @kindex < (Summary)
5146 @kindex A < (Summary)
5147 @findex gnus-summary-beginning-of-article
5148 Scroll to the beginning of the article
5149 (@code{gnus-summary-beginning-of-article}).
5150
5151 @item A >
5152 @itemx >
5153 @kindex > (Summary)
5154 @kindex A > (Summary)
5155 @findex gnus-summary-end-of-article
5156 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5157
5158 @item A s
5159 @itemx s
5160 @kindex A s (Summary)
5161 @kindex s (Summary)
5162 @findex gnus-summary-isearch-article
5163 Perform an isearch in the article buffer
5164 (@code{gnus-summary-isearch-article}).
5165
5166 @item h
5167 @kindex h (Summary)
5168 @findex gnus-summary-select-article-buffer
5169 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5170
5171 @end table
5172
5173
5174 @node Reply Followup and Post
5175 @section Reply, Followup and Post
5176
5177 @menu
5178 * Summary Mail Commands::       Sending mail.
5179 * Summary Post Commands::       Sending news.
5180 * Summary Message Commands::    Other Message-related commands.
5181 * Canceling and Superseding::   
5182 @end menu
5183
5184
5185 @node Summary Mail Commands
5186 @subsection Summary Mail Commands
5187 @cindex mail
5188 @cindex composing mail
5189
5190 Commands for composing a mail message:
5191
5192 @table @kbd
5193
5194 @item S r
5195 @itemx r
5196 @kindex S r (Summary)
5197 @kindex r (Summary)
5198 @findex gnus-summary-reply
5199 @c @icon{gnus-summary-mail-reply}
5200 @c @icon{gnus-summary-reply}
5201 Mail a reply to the author of the current article
5202 (@code{gnus-summary-reply}).
5203
5204 @item S R
5205 @itemx R
5206 @kindex R (Summary)
5207 @kindex S R (Summary)
5208 @findex gnus-summary-reply-with-original
5209 @c @icon{gnus-summary-reply-with-original}
5210 Mail a reply to the author of the current article and include the
5211 original message (@code{gnus-summary-reply-with-original}).  This
5212 command uses the process/prefix convention.
5213
5214 @item S w
5215 @kindex S w (Summary)
5216 @findex gnus-summary-wide-reply
5217 Mail a wide reply to the author of the current article
5218 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5219 goes out to all people listed in the @code{To}, @code{From} (or
5220 @code{Reply-to}) and @code{Cc} headers.
5221
5222 @item S W
5223 @kindex S W (Summary)
5224 @findex gnus-summary-wide-reply-with-original
5225 Mail a wide reply to the current article and include the original
5226 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5227 the process/prefix convention.
5228
5229 @item S v
5230 @kindex S v (Summary)
5231 @findex gnus-summary-very-wide-reply
5232 Mail a very wide reply to the author of the current article
5233 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5234 that goes out to all people listed in the @code{To}, @code{From} (or
5235 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5236 articles.  This command uses the process/prefix convention.
5237
5238 @item S V
5239 @kindex S V (Summary)
5240 @findex gnus-summary-very-wide-reply-with-original
5241 Mail a very wide reply to the author of the current article and include the
5242 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5243 command uses the process/prefix convention.
5244
5245 @item S B r
5246 @kindex S B r (Summary)
5247 @findex gnus-summary-reply-broken-reply-to
5248 Mail a reply to the author of the current article but ignore the
5249 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5250 If you need this because a mailing list incorrectly sets a
5251 @code{Reply-To} header pointing to the list, you probably want to set
5252 the @code{broken-reply-to} group parameter instead, so things will work
5253 correctly.  @xref{Group Parameters}.
5254
5255 @item S B R
5256 @kindex S B R (Summary)
5257 @findex gnus-summary-reply-broken-reply-to-with-original
5258 Mail a reply to the author of the current article and include the
5259 original message but ignore the @code{Reply-To} field
5260 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5261
5262 @item S o m
5263 @itemx C-c C-f
5264 @kindex S o m (Summary)
5265 @kindex C-c C-f (Summary)
5266 @findex gnus-summary-mail-forward
5267 @c @icon{gnus-summary-mail-forward}
5268 Forward the current article to some other person
5269 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
5270 is forwarded according to the value of (@code{message-forward-as-mime})
5271 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
5272 message and forward directly inline; if the prefix is 2, forward message
5273 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5274 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5275 directly inline; otherwise, the message is forwarded as no prefix given
5276 but use the flipped value of (@code{message-forward-as-mime}).  By
5277 default, the message is decoded and forwarded as an rfc822 @acronym{MIME}
5278 section.
5279
5280 @item S m
5281 @itemx m
5282 @kindex m (Summary)
5283 @kindex S m (Summary)
5284 @findex gnus-summary-mail-other-window
5285 @c @icon{gnus-summary-mail-originate}
5286 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5287 the posting style of the current group.  If given a prefix, disable that.
5288 If the prefix is 1, prompt for a group name to find the posting style.
5289
5290 @item S i
5291 @itemx i
5292 @kindex i (Summary)
5293 @kindex S i (Summary)
5294 @findex gnus-summary-news-other-window
5295 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5296 post to the current group.  If given a prefix, disable that.  If the
5297 prefix is 1, prompt for a group to post to.
5298
5299 This function actually prepares a news even when using mail groups.
5300 This is useful for ``posting'' messages to mail groups without actually
5301 sending them over the network: they're just saved directly to the group
5302 in question.  The corresponding back end must have a request-post method
5303 for this to work though.
5304
5305 @item S D b
5306 @kindex S D b (Summary)
5307 @findex gnus-summary-resend-bounced-mail
5308 @cindex bouncing mail
5309 If you have sent a mail, but the mail was bounced back to you for some
5310 reason (wrong address, transient failure), you can use this command to
5311 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5312 will be popped into a mail buffer where you can edit the headers before
5313 sending the mail off again.  If you give a prefix to this command, and
5314 the bounced mail is a reply to some other mail, Gnus will try to fetch
5315 that mail and display it for easy perusal of its headers.  This might
5316 very well fail, though.
5317
5318 @item S D r
5319 @kindex S D r (Summary)
5320 @findex gnus-summary-resend-message
5321 Not to be confused with the previous command,
5322 @code{gnus-summary-resend-message} will prompt you for an address to
5323 send the current message off to, and then send it to that place.  The
5324 headers of the message won't be altered---but lots of headers that say
5325 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5326 means that you actually send a mail to someone that has a @code{To}
5327 header that (probably) points to yourself.  This will confuse people.
5328 So, natcherly you'll only do that if you're really eVIl.
5329
5330 This command is mainly used if you have several accounts and want to
5331 ship a mail to a different account of yours.  (If you're both
5332 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5333 to the @code{root} account, you may want to resend it to
5334 @code{postmaster}.  Ordnung muss sein!
5335
5336 This command understands the process/prefix convention
5337 (@pxref{Process/Prefix}).
5338
5339 @item S O m
5340 @kindex S O m (Summary)
5341 @findex gnus-uu-digest-mail-forward
5342 Digest the current series (@pxref{Decoding Articles}) and forward the
5343 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
5344 uses the process/prefix convention (@pxref{Process/Prefix}).
5345
5346 @item S M-c
5347 @kindex S M-c (Summary)
5348 @findex gnus-summary-mail-crosspost-complaint
5349 @cindex crossposting
5350 @cindex excessive crossposting
5351 Send a complaint about excessive crossposting to the author of the
5352 current article (@code{gnus-summary-mail-crosspost-complaint}).
5353
5354 @findex gnus-crosspost-complaint
5355 This command is provided as a way to fight back against the current
5356 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5357 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5358 command understands the process/prefix convention
5359 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5360
5361 @end table
5362
5363 Also @xref{Header Commands, ,Header Commands, message, The Message
5364 Manual}, for more information.
5365
5366
5367 @node Summary Post Commands
5368 @subsection Summary Post Commands
5369 @cindex post
5370 @cindex composing news
5371
5372 Commands for posting a news article:
5373
5374 @table @kbd
5375 @item S p
5376 @itemx a
5377 @kindex a (Summary)
5378 @kindex S p (Summary)
5379 @findex gnus-summary-post-news
5380 @c @icon{gnus-summary-post-news}
5381 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5382 default, post to the current group.  If given a prefix, disable that.
5383 If the prefix is 1, prompt for another group instead.
5384
5385 @item S f
5386 @itemx f
5387 @kindex f (Summary)
5388 @kindex S f (Summary)
5389 @findex gnus-summary-followup
5390 @c @icon{gnus-summary-followup}
5391 Post a followup to the current article (@code{gnus-summary-followup}).
5392
5393 @item S F
5394 @itemx F
5395 @kindex S F (Summary)
5396 @kindex F (Summary)
5397 @c @icon{gnus-summary-followup-with-original}
5398 @findex gnus-summary-followup-with-original
5399 Post a followup to the current article and include the original message
5400 (@code{gnus-summary-followup-with-original}).   This command uses the
5401 process/prefix convention.
5402
5403 @item S n
5404 @kindex S n (Summary)
5405 @findex gnus-summary-followup-to-mail
5406 Post a followup to the current article via news, even if you got the
5407 message through mail (@code{gnus-summary-followup-to-mail}).
5408
5409 @item S N
5410 @kindex S N (Summary)
5411 @findex gnus-summary-followup-to-mail-with-original
5412 Post a followup to the current article via news, even if you got the
5413 message through mail and include the original message
5414 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5415 the process/prefix convention.
5416
5417 @item S o p
5418 @kindex S o p (Summary)
5419 @findex gnus-summary-post-forward
5420 Forward the current article to a newsgroup
5421 (@code{gnus-summary-post-forward}).
5422  If no prefix is given, the message is forwarded according to the value
5423 of (@code{message-forward-as-mime}) and
5424 (@code{message-forward-show-mml}); if the prefix is 1, decode the
5425 message and forward directly inline; if the prefix is 2, forward message
5426 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5427 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5428 directly inline; otherwise, the message is forwarded as no prefix given
5429 but use the flipped value of (@code{message-forward-as-mime}).  By
5430 default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section.
5431
5432 @item S O p
5433 @kindex S O p (Summary)
5434 @findex gnus-uu-digest-post-forward
5435 @cindex digests
5436 @cindex making digests
5437 Digest the current series and forward the result to a newsgroup
5438 (@code{gnus-uu-digest-mail-forward}).  This command uses the
5439 process/prefix convention.
5440
5441 @item S u
5442 @kindex S u (Summary)
5443 @findex gnus-uu-post-news
5444 @c @icon{gnus-uu-post-news}
5445 Uuencode a file, split it into parts, and post it as a series
5446 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5447 @end table
5448
5449 Also @xref{Header Commands, ,Header Commands, message, The Message
5450 Manual}, for more information.
5451
5452
5453 @node Summary Message Commands
5454 @subsection Summary Message Commands
5455
5456 @table @kbd
5457 @item S y
5458 @kindex S y (Summary)
5459 @findex gnus-summary-yank-message
5460 Yank the current article into an already existing Message composition
5461 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5462 what message buffer you want to yank into, and understands the
5463 process/prefix convention (@pxref{Process/Prefix}).
5464
5465 @end table
5466
5467
5468 @node Canceling and Superseding
5469 @subsection Canceling Articles
5470 @cindex canceling articles
5471 @cindex superseding articles
5472
5473 Have you ever written something, and then decided that you really,
5474 really, really wish you hadn't posted that?
5475
5476 Well, you can't cancel mail, but you can cancel posts.
5477
5478 @findex gnus-summary-cancel-article
5479 @kindex C (Summary)
5480 @c @icon{gnus-summary-cancel-article}
5481 Find the article you wish to cancel (you can only cancel your own
5482 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5483 c} (@code{gnus-summary-cancel-article}).  Your article will be
5484 canceled---machines all over the world will be deleting your article.
5485 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5486
5487 Be aware, however, that not all sites honor cancels, so your article may
5488 live on here and there, while most sites will delete the article in
5489 question.
5490
5491 Gnus will use the ``current'' select method when canceling.  If you
5492 want to use the standard posting method, use the @samp{a} symbolic
5493 prefix (@pxref{Symbolic Prefixes}).
5494
5495 If you discover that you have made some mistakes and want to do some
5496 corrections, you can post a @dfn{superseding} article that will replace
5497 your original article.
5498
5499 @findex gnus-summary-supersede-article
5500 @kindex S (Summary)
5501 Go to the original article and press @kbd{S s}
5502 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5503 where you can edit the article all you want before sending it off the
5504 usual way.
5505
5506 The same goes for superseding as for canceling, only more so: Some
5507 sites do not honor superseding.  On those sites, it will appear that you
5508 have posted almost the same article twice.
5509
5510 If you have just posted the article, and change your mind right away,
5511 there is a trick you can use to cancel/supersede the article without
5512 waiting for the article to appear on your site first.  You simply return
5513 to the post buffer (which is called @code{*sent ...*}).  There you will
5514 find the article you just posted, with all the headers intact.  Change
5515 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5516 header by substituting one of those words for the word
5517 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5518 you would do normally.  The previous article will be
5519 canceled/superseded.
5520
5521 Just remember, kids: There is no 'c' in 'supersede'.
5522
5523 @node Delayed Articles
5524 @section Delayed Articles
5525 @cindex delayed sending
5526 @cindex send delayed
5527
5528 Sometimes, you might wish to delay the sending of a message.  For
5529 example, you might wish to arrange for a message to turn up just in time
5530 to remind your about the birthday of your Significant Other.  For this,
5531 there is the @code{gnus-delay} package.  Setup is simple:
5532
5533 @lisp
5534 (gnus-delay-initialize)
5535 @end lisp
5536
5537 @findex gnus-delay-article
5538 Normally, to send a message you use the @kbd{C-c C-c} command from
5539 Message mode.  To delay a message, use @kbd{C-c C-j}
5540 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5541 message should be delayed.  Possible answers are:
5542
5543 @itemize @bullet
5544 @item
5545 A time span.  Consists of an integer and a letter.  For example,
5546 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5547 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5548 (months) and @code{Y} (years).
5549
5550 @item
5551 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
5552 delayed until that day, at a specific time (eight o'clock by default).
5553 See also @code{gnus-delay-default-hour}.
5554
5555 @item
5556 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5557 stuff.  The deadline will be at that time today, except if that time has
5558 already passed, then it's at the given time tomorrow.  So if it's ten
5559 o'clock in the morning and you specify @code{11:15}, then the deadline
5560 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5561 that means a time tomorrow.
5562 @end itemize
5563
5564 The action of the @code{gnus-delay-article} command is influenced by a
5565 couple of variables:
5566
5567 @table @code
5568 @item gnus-delay-default-hour
5569 @vindex gnus-delay-default-hour
5570 When you specify a specific date, the message will be due on that hour
5571 on the given date.  Possible values are integers 0 through 23.
5572
5573 @item gnus-delay-default-delay
5574 @vindex gnus-delay-default-delay
5575 This is a string and gives the default delay.  It can be of any of the
5576 formats described above.
5577
5578 @item gnus-delay-group
5579 @vindex gnus-delay-group
5580 Delayed articles will be kept in this group on the drafts server until
5581 they are due.  You probably don't need to change this.  The default
5582 value is @code{"delayed"}.
5583
5584 @item gnus-delay-header
5585 @vindex gnus-delay-header
5586 The deadline for each article will be stored in a header.  This variable
5587 is a string and gives the header name.  You probably don't need to
5588 change this.  The default value is @code{"X-Gnus-Delayed"}.
5589 @end table
5590
5591 The way delaying works is like this: when you use the
5592 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5593 calculates the deadline of the message and stores it in the
5594 @code{X-Gnus-Delayed} header and puts the message in the
5595 @code{nndraft:delayed} group.
5596
5597 @findex gnus-delay-send-queue
5598 And whenever you get new news, Gnus looks through the group for articles
5599 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5600 function for this.  By default, this function is added to the hook
5601 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5602 Maybe you want to use the demon to send drafts?  Just tell the demon to
5603 execute the @code{gnus-delay-send-queue} function.
5604
5605 @table @code
5606 @item gnus-delay-initialize
5607 @findex gnus-delay-initialize
5608 By default, this function installs @code{gnus-delay-send-queue} in
5609 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5610 argument @code{no-check}.  If it is non-@code{nil},
5611 @code{gnus-get-new-news-hook} is not changed.  The optional first
5612 argument is ignored.
5613
5614 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5615 Presumably, you want to use the demon for sending due delayed articles.
5616 Just don't forget to set that up :-)
5617 @end table
5618
5619
5620 @node Marking Articles
5621 @section Marking Articles
5622 @cindex article marking
5623 @cindex article ticking
5624 @cindex marks
5625
5626 There are several marks you can set on an article.
5627
5628 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5629 neologism ohoy!) of the article.  Alphabetic marks generally mean
5630 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5631
5632 In addition, you also have marks that do not affect readedness.
5633
5634 @menu
5635 * Unread Articles::             Marks for unread articles.
5636 * Read Articles::               Marks for read articles.
5637 * Other Marks::                 Marks that do not affect readedness.
5638 @end menu
5639
5640 @ifinfo
5641 There's a plethora of commands for manipulating these marks:
5642 @end ifinfo
5643
5644 @menu
5645 * Setting Marks::             How to set and remove marks.
5646 * Generic Marking Commands::  How to customize the marking.
5647 * Setting Process Marks::     How to mark articles for later processing.
5648 @end menu
5649
5650
5651 @node Unread Articles
5652 @subsection Unread Articles
5653
5654 The following marks mark articles as (kinda) unread, in one form or
5655 other.
5656
5657 @table @samp
5658 @item !
5659 @vindex gnus-ticked-mark
5660 Marked as ticked (@code{gnus-ticked-mark}).
5661
5662 @dfn{Ticked articles} are articles that will remain visible always.  If
5663 you see an article that you find interesting, or you want to put off
5664 reading it, or replying to it, until sometime later, you'd typically
5665 tick it.  However, articles can be expired (from news servers by the
5666 news server software, Gnus itself never expires ticked messages), so if
5667 you want to keep an article forever, you'll have to make it persistent
5668 (@pxref{Persistent Articles}).
5669
5670 @item ?
5671 @vindex gnus-dormant-mark
5672 Marked as dormant (@code{gnus-dormant-mark}).
5673
5674 @dfn{Dormant articles} will only appear in the summary buffer if there
5675 are followups to it.  If you want to see them even if they don't have
5676 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5677 Otherwise (except for the visibility issue), they are just like ticked
5678 messages.
5679
5680 @item SPACE
5681 @vindex gnus-unread-mark
5682 Marked as unread (@code{gnus-unread-mark}).
5683
5684 @dfn{Unread articles} are articles that haven't been read at all yet.
5685 @end table
5686
5687
5688 @node Read Articles
5689 @subsection Read Articles
5690 @cindex expirable mark
5691
5692 All the following marks mark articles as read.
5693
5694 @table @samp
5695
5696 @item r
5697 @vindex gnus-del-mark
5698 These are articles that the user has marked as read with the @kbd{d}
5699 command manually, more or less (@code{gnus-del-mark}).
5700
5701 @item R
5702 @vindex gnus-read-mark
5703 Articles that have actually been read (@code{gnus-read-mark}).
5704
5705 @item O
5706 @vindex gnus-ancient-mark
5707 Articles that were marked as read in previous sessions and are now
5708 @dfn{old} (@code{gnus-ancient-mark}).
5709
5710 @item K
5711 @vindex gnus-killed-mark
5712 Marked as killed (@code{gnus-killed-mark}).
5713
5714 @item X
5715 @vindex gnus-kill-file-mark
5716 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5717
5718 @item Y
5719 @vindex gnus-low-score-mark
5720 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5721
5722 @item C
5723 @vindex gnus-catchup-mark
5724 Marked as read by a catchup (@code{gnus-catchup-mark}).
5725
5726 @item G
5727 @vindex gnus-canceled-mark
5728 Canceled article (@code{gnus-canceled-mark})
5729
5730 @item F
5731 @vindex gnus-souped-mark
5732 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5733
5734 @item Q
5735 @vindex gnus-sparse-mark
5736 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5737 Threading}.
5738
5739 @item M
5740 @vindex gnus-duplicate-mark
5741 Article marked as read by duplicate suppression
5742 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5743
5744 @end table
5745
5746 All these marks just mean that the article is marked as read, really.
5747 They are interpreted differently when doing adaptive scoring, though.
5748
5749 One more special mark, though:
5750
5751 @table @samp
5752 @item E
5753 @vindex gnus-expirable-mark
5754 Marked as expirable (@code{gnus-expirable-mark}).
5755
5756 Marking articles as @dfn{expirable} (or have them marked as such
5757 automatically) doesn't make much sense in normal groups---a user doesn't
5758 control expiring of news articles, but in mail groups, for instance,
5759 articles marked as @dfn{expirable} can be deleted by Gnus at
5760 any time.
5761 @end table
5762
5763
5764 @node Other Marks
5765 @subsection Other Marks
5766 @cindex process mark
5767 @cindex bookmarks
5768
5769 There are some marks that have nothing to do with whether the article is
5770 read or not.
5771
5772 @itemize @bullet
5773
5774 @item
5775 You can set a bookmark in the current article.  Say you are reading a
5776 long thesis on cats' urinary tracts, and have to go home for dinner
5777 before you've finished reading the thesis.  You can then set a bookmark
5778 in the article, and Gnus will jump to this bookmark the next time it
5779 encounters the article.  @xref{Setting Marks}.
5780
5781 @item
5782 @vindex gnus-replied-mark
5783 All articles that you have replied to or made a followup to (i.e., have
5784 answered) will be marked with an @samp{A} in the second column
5785 (@code{gnus-replied-mark}).
5786
5787 @item
5788 @vindex gnus-forwarded-mark
5789 All articles that you have forwarded will be marked with an @samp{F} in
5790 the second column (@code{gnus-forwarded-mark}).
5791
5792 @item
5793 @vindex gnus-cached-mark
5794 Articles stored in the article cache will be marked with an @samp{*} in
5795 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5796
5797 @item
5798 @vindex gnus-saved-mark
5799 Articles ``saved'' (in some manner or other; not necessarily
5800 religiously) are marked with an @samp{S} in the second column
5801 (@code{gnus-saved-mark}).
5802
5803 @item
5804 @vindex gnus-recent-mark
5805 Articles that according to the server haven't been shown to the user
5806 before are marked with a @samp{N} in the second column
5807 (@code{gnus-recent-mark}).  Note that not all servers support this
5808 mark, in which case it simply never appears. Compare with
5809 @code{gnus-unseen-mark}.
5810
5811 @item
5812 @vindex gnus-unseen-mark
5813 Articles that haven't been seen before in Gnus by the user are marked
5814 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5815 Compare with @code{gnus-recent-mark}.
5816
5817 @item
5818 @vindex gnus-downloaded-mark
5819 When using the Gnus agent @pxref{Agent Basics}, articles may be
5820 downloaded for unplugged (offline) viewing.  If you are using the
5821 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
5822 (The variable @code{gnus-downloaded-mark} controls which character to
5823 use.)
5824
5825 @item
5826 @vindex gnus-undownloaded-mark
5827 When using the Gnus agent @pxref{Agent Basics}, some articles might
5828 not have been downloaded.  Such articles cannot be viewed while you
5829 are unplugged (offline).  If you are using the @samp{%O} spec, these
5830 articles get the @samp{-} mark in that spec.  (The variable
5831 @code{gnus-undownloaded-mark} controls which character to use.)
5832
5833 @item
5834 @vindex gnus-downloadable-mark
5835 The Gnus agent @pxref{Agent Basics} downloads some articles
5836 automatically, but it is also possible to explicitly mark articles for
5837 download, even if they would not be downloaded automatically.  Such
5838 explicitly-marked articles get the @samp{%} mark in the first column.
5839 (The variable @code{gnus-downloadable-mark} controls which character to
5840 use.)
5841
5842 @item
5843 @vindex gnus-not-empty-thread-mark
5844 @vindex gnus-empty-thread-mark
5845 If the @samp{%e} spec is used, the presence of threads or not will be
5846 marked with @code{gnus-not-empty-thread-mark} and
5847 @code{gnus-empty-thread-mark} in the third column, respectively.
5848
5849 @item
5850 @vindex gnus-process-mark
5851 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5852 variety of commands react to the presence of the process mark.  For
5853 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5854 all articles that have been marked with the process mark.  Articles
5855 marked with the process mark have a @samp{#} in the second column.
5856
5857 @end itemize
5858
5859 You might have noticed that most of these ``non-readedness'' marks
5860 appear in the second column by default.  So if you have a cached, saved,
5861 replied article that you have process-marked, what will that look like?
5862
5863 Nothing much.  The precedence rules go as follows: process -> cache ->
5864 replied -> saved.  So if the article is in the cache and is replied,
5865 you'll only see the cache mark and not the replied mark.
5866
5867
5868 @node Setting Marks
5869 @subsection Setting Marks
5870 @cindex setting marks
5871
5872 All the marking commands understand the numeric prefix.
5873
5874 @table @kbd
5875 @item M c
5876 @itemx M-u
5877 @kindex M c (Summary)
5878 @kindex M-u (Summary)
5879 @findex gnus-summary-clear-mark-forward
5880 @cindex mark as unread
5881 Clear all readedness-marks from the current article
5882 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5883 article as unread.
5884
5885 @item M t
5886 @itemx !
5887 @kindex ! (Summary)
5888 @kindex M t (Summary)
5889 @findex gnus-summary-tick-article-forward
5890 Tick the current article (@code{gnus-summary-tick-article-forward}).
5891 @xref{Article Caching}.
5892
5893 @item M ?
5894 @itemx ?
5895 @kindex ? (Summary)
5896 @kindex M ? (Summary)
5897 @findex gnus-summary-mark-as-dormant
5898 Mark the current article as dormant
5899 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5900
5901 @item M d
5902 @itemx d
5903 @kindex M d (Summary)
5904 @kindex d (Summary)
5905 @findex gnus-summary-mark-as-read-forward
5906 Mark the current article as read
5907 (@code{gnus-summary-mark-as-read-forward}).
5908
5909 @item D
5910 @kindex D (Summary)
5911 @findex gnus-summary-mark-as-read-backward
5912 Mark the current article as read and move point to the previous line
5913 (@code{gnus-summary-mark-as-read-backward}).
5914
5915 @item M k
5916 @itemx k
5917 @kindex k (Summary)
5918 @kindex M k (Summary)
5919 @findex gnus-summary-kill-same-subject-and-select
5920 Mark all articles that have the same subject as the current one as read,
5921 and then select the next unread article
5922 (@code{gnus-summary-kill-same-subject-and-select}).
5923
5924 @item M K
5925 @itemx C-k
5926 @kindex M K (Summary)
5927 @kindex C-k (Summary)
5928 @findex gnus-summary-kill-same-subject
5929 Mark all articles that have the same subject as the current one as read
5930 (@code{gnus-summary-kill-same-subject}).
5931
5932 @item M C
5933 @kindex M C (Summary)
5934 @findex gnus-summary-catchup
5935 @c @icon{gnus-summary-catchup}
5936 Mark all unread articles as read (@code{gnus-summary-catchup}).
5937
5938 @item M C-c
5939 @kindex M C-c (Summary)
5940 @findex gnus-summary-catchup-all
5941 Mark all articles in the group as read---even the ticked and dormant
5942 articles (@code{gnus-summary-catchup-all}).
5943
5944 @item M H
5945 @kindex M H (Summary)
5946 @findex gnus-summary-catchup-to-here
5947 Catchup the current group to point (before the point)
5948 (@code{gnus-summary-catchup-to-here}).
5949
5950 @item M h
5951 @kindex M h (Summary)
5952 @findex gnus-summary-catchup-from-here
5953 Catchup the current group from point (after the point)
5954 (@code{gnus-summary-catchup-from-here}).
5955
5956 @item C-w
5957 @kindex C-w (Summary)
5958 @findex gnus-summary-mark-region-as-read
5959 Mark all articles between point and mark as read
5960 (@code{gnus-summary-mark-region-as-read}).
5961
5962 @item M V k
5963 @kindex M V k (Summary)
5964 @findex gnus-summary-kill-below
5965 Kill all articles with scores below the default score (or below the
5966 numeric prefix) (@code{gnus-summary-kill-below}).
5967
5968 @item M e
5969 @itemx E
5970 @kindex M e (Summary)
5971 @kindex E (Summary)
5972 @findex gnus-summary-mark-as-expirable
5973 Mark the current article as expirable
5974 (@code{gnus-summary-mark-as-expirable}).
5975
5976 @item M b
5977 @kindex M b (Summary)
5978 @findex gnus-summary-set-bookmark
5979 Set a bookmark in the current article
5980 (@code{gnus-summary-set-bookmark}).
5981
5982 @item M B
5983 @kindex M B (Summary)
5984 @findex gnus-summary-remove-bookmark
5985 Remove the bookmark from the current article
5986 (@code{gnus-summary-remove-bookmark}).
5987
5988 @item M V c
5989 @kindex M V c (Summary)
5990 @findex gnus-summary-clear-above
5991 Clear all marks from articles with scores over the default score (or
5992 over the numeric prefix) (@code{gnus-summary-clear-above}).
5993
5994 @item M V u
5995 @kindex M V u (Summary)
5996 @findex gnus-summary-tick-above
5997 Tick all articles with scores over the default score (or over the
5998 numeric prefix) (@code{gnus-summary-tick-above}).
5999
6000 @item M V m
6001 @kindex M V m (Summary)
6002 @findex gnus-summary-mark-above
6003 Prompt for a mark, and mark all articles with scores over the default
6004 score (or over the numeric prefix) with this mark
6005 (@code{gnus-summary-clear-above}).
6006 @end table
6007
6008 @vindex gnus-summary-goto-unread
6009 The @code{gnus-summary-goto-unread} variable controls what action should
6010 be taken after setting a mark.  If non-@code{nil}, point will move to
6011 the next/previous unread article.  If @code{nil}, point will just move
6012 one line up or down.  As a special case, if this variable is
6013 @code{never}, all the marking commands as well as other commands (like
6014 @kbd{SPACE}) will move to the next article, whether it is unread or not.
6015 The default is @code{t}.
6016
6017
6018 @node Generic Marking Commands
6019 @subsection Generic Marking Commands
6020
6021 Some people would like the command that ticks an article (@kbd{!}) go to
6022 the next article.  Others would like it to go to the next unread
6023 article.  Yet others would like it to stay on the current article.  And
6024 even though I haven't heard of anybody wanting it to go to the
6025 previous (unread) article, I'm sure there are people that want that as
6026 well.
6027
6028 Multiply these five behaviors with five different marking commands, and
6029 you get a potentially complex set of variable to control what each
6030 command should do.
6031
6032 To sidestep that mess, Gnus provides commands that do all these
6033 different things.  They can be found on the @kbd{M M} map in the summary
6034 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
6035 to list in this manual.
6036
6037 While you can use these commands directly, most users would prefer
6038 altering the summary mode keymap.  For instance, if you would like the
6039 @kbd{!} command to go to the next article instead of the next unread
6040 article, you could say something like:
6041
6042 @lisp
6043 @group
6044 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
6045 (defun my-alter-summary-map ()
6046   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
6047 @end group
6048 @end lisp
6049
6050 @noindent
6051 or
6052
6053 @lisp
6054 (defun my-alter-summary-map ()
6055   (local-set-key "!" "MM!n"))
6056 @end lisp
6057
6058
6059 @node Setting Process Marks
6060 @subsection Setting Process Marks
6061 @cindex setting process marks
6062
6063 Process marks are displayed as @code{#} in the summary buffer, and are
6064 used for marking articles in such a way that other commands will
6065 process these articles.  For instance, if you process mark four
6066 articles and then use the @kbd{*} command, Gnus will enter these four
6067 commands into the cache.  For more information,
6068 @pxref{Process/Prefix}.
6069
6070 @table @kbd
6071
6072 @item M P p
6073 @itemx #
6074 @kindex # (Summary)
6075 @kindex M P p (Summary)
6076 @findex gnus-summary-mark-as-processable
6077 Mark the current article with the process mark
6078 (@code{gnus-summary-mark-as-processable}).
6079 @findex gnus-summary-unmark-as-processable
6080
6081 @item M P u
6082 @itemx M-#
6083 @kindex M P u (Summary)
6084 @kindex M-# (Summary)
6085 Remove the process mark, if any, from the current article
6086 (@code{gnus-summary-unmark-as-processable}).
6087
6088 @item M P U
6089 @kindex M P U (Summary)
6090 @findex gnus-summary-unmark-all-processable
6091 Remove the process mark from all articles
6092 (@code{gnus-summary-unmark-all-processable}).
6093
6094 @item M P i
6095 @kindex M P i (Summary)
6096 @findex gnus-uu-invert-processable
6097 Invert the list of process marked articles
6098 (@code{gnus-uu-invert-processable}).
6099
6100 @item M P R
6101 @kindex M P R (Summary)
6102 @findex gnus-uu-mark-by-regexp
6103 Mark articles that have a @code{Subject} header that matches a regular
6104 expression (@code{gnus-uu-mark-by-regexp}).
6105
6106 @item M P G
6107 @kindex M P G (Summary)
6108 @findex gnus-uu-unmark-by-regexp
6109 Unmark articles that have a @code{Subject} header that matches a regular
6110 expression (@code{gnus-uu-unmark-by-regexp}).
6111
6112 @item M P r
6113 @kindex M P r (Summary)
6114 @findex gnus-uu-mark-region
6115 Mark articles in region (@code{gnus-uu-mark-region}).
6116
6117 @item M P g
6118 @kindex M P g
6119 @findex gnus-uu-unmark-region
6120 Unmark articles in region (@code{gnus-uu-unmark-region}).
6121
6122 @item M P t
6123 @kindex M P t (Summary)
6124 @findex gnus-uu-mark-thread
6125 Mark all articles in the current (sub)thread
6126 (@code{gnus-uu-mark-thread}).
6127
6128 @item M P T
6129 @kindex M P T (Summary)
6130 @findex gnus-uu-unmark-thread
6131 Unmark all articles in the current (sub)thread
6132 (@code{gnus-uu-unmark-thread}).
6133
6134 @item M P v
6135 @kindex M P v (Summary)
6136 @findex gnus-uu-mark-over
6137 Mark all articles that have a score above the prefix argument
6138 (@code{gnus-uu-mark-over}).
6139
6140 @item M P s
6141 @kindex M P s (Summary)
6142 @findex gnus-uu-mark-series
6143 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6144
6145 @item M P S
6146 @kindex M P S (Summary)
6147 @findex gnus-uu-mark-sparse
6148 Mark all series that have already had some articles marked
6149 (@code{gnus-uu-mark-sparse}).
6150
6151 @item M P a
6152 @kindex M P a (Summary)
6153 @findex gnus-uu-mark-all
6154 Mark all articles in series order (@code{gnus-uu-mark-series}).
6155
6156 @item M P b
6157 @kindex M P b (Summary)
6158 @findex gnus-uu-mark-buffer
6159 Mark all articles in the buffer in the order they appear
6160 (@code{gnus-uu-mark-buffer}).
6161
6162 @item M P k
6163 @kindex M P k (Summary)
6164 @findex gnus-summary-kill-process-mark
6165 Push the current process mark set onto the stack and unmark all articles
6166 (@code{gnus-summary-kill-process-mark}).
6167
6168 @item M P y
6169 @kindex M P y (Summary)
6170 @findex gnus-summary-yank-process-mark
6171 Pop the previous process mark set from the stack and restore it
6172 (@code{gnus-summary-yank-process-mark}).
6173
6174 @item M P w
6175 @kindex M P w (Summary)
6176 @findex gnus-summary-save-process-mark
6177 Push the current process mark set onto the stack
6178 (@code{gnus-summary-save-process-mark}).
6179
6180 @end table
6181
6182 Also see the @kbd{&} command in @pxref{Searching for Articles} for how to
6183 set process marks based on article body contents.
6184
6185
6186 @node Limiting
6187 @section Limiting
6188 @cindex limiting
6189
6190 It can be convenient to limit the summary buffer to just show some
6191 subset of the articles currently in the group.  The effect most limit
6192 commands have is to remove a few (or many) articles from the summary
6193 buffer.
6194
6195 All limiting commands work on subsets of the articles already fetched
6196 from the servers.  None of these commands query the server for
6197 additional articles.
6198
6199 @table @kbd
6200
6201 @item / /
6202 @itemx / s
6203 @kindex / / (Summary)
6204 @findex gnus-summary-limit-to-subject
6205 Limit the summary buffer to articles that match some subject
6206 (@code{gnus-summary-limit-to-subject}). If given a prefix, exclude
6207 matching articles.
6208
6209 @item / a
6210 @kindex / a (Summary)
6211 @findex gnus-summary-limit-to-author
6212 Limit the summary buffer to articles that match some author
6213 (@code{gnus-summary-limit-to-author}). If given a prefix, exclude
6214 matching articles.
6215
6216 @item / x
6217 @kindex / x (Summary)
6218 @findex gnus-summary-limit-to-extra
6219 Limit the summary buffer to articles that match one of the ``extra''
6220 headers (@pxref{To From Newsgroups})
6221 (@code{gnus-summary-limit-to-extra}). If given a prefix, exclude
6222 matching articles.
6223
6224 @item / u
6225 @itemx x
6226 @kindex / u (Summary)
6227 @kindex x (Summary)
6228 @findex gnus-summary-limit-to-unread
6229 Limit the summary buffer to articles not marked as read
6230 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6231 buffer to articles strictly unread.  This means that ticked and
6232 dormant articles will also be excluded.
6233
6234 @item / m
6235 @kindex / m (Summary)
6236 @findex gnus-summary-limit-to-marks
6237 Ask for a mark and then limit to all articles that have been marked
6238 with that mark (@code{gnus-summary-limit-to-marks}).
6239
6240 @item / t
6241 @kindex / t (Summary)
6242 @findex gnus-summary-limit-to-age
6243 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6244 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6245 articles younger than that number of days.
6246
6247 @item / n
6248 @kindex / n (Summary)
6249 @findex gnus-summary-limit-to-articles
6250 Limit the summary buffer to the current article
6251 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6252 convention (@pxref{Process/Prefix}).
6253
6254 @item / w
6255 @kindex / w (Summary)
6256 @findex gnus-summary-pop-limit
6257 Pop the previous limit off the stack and restore it
6258 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6259 the stack.
6260
6261 @item / .
6262 @kindex / . (Summary)
6263 @findex gnus-summary-limit-to-unseen
6264 Limit the summary buffer to the unseen articles
6265 (@code{gnus-summary-limit-to-unseen}).
6266
6267 @item / v
6268 @kindex / v (Summary)
6269 @findex gnus-summary-limit-to-score
6270 Limit the summary buffer to articles that have a score at or above some
6271 score (@code{gnus-summary-limit-to-score}).
6272
6273 @item / p
6274 @kindex / p (Summary)
6275 @findex gnus-summary-limit-to-display-predicate
6276 Limit the summary buffer to articles that satisfy the @code{display}
6277 group parameter predicate
6278 (@code{gnus-summary-limit-to-display-predicate}).  See @pxref{Group
6279 Parameters} for more on this predicate.
6280
6281 @item / E
6282 @itemx M S
6283 @kindex M S (Summary)
6284 @kindex / E (Summary)
6285 @findex gnus-summary-limit-include-expunged
6286 Include all expunged articles in the limit
6287 (@code{gnus-summary-limit-include-expunged}).
6288
6289 @item / D
6290 @kindex / D (Summary)
6291 @findex gnus-summary-limit-include-dormant
6292 Include all dormant articles in the limit
6293 (@code{gnus-summary-limit-include-dormant}).
6294
6295 @item / *
6296 @kindex / * (Summary)
6297 @findex gnus-summary-limit-include-cached
6298 Include all cached articles in the limit
6299 (@code{gnus-summary-limit-include-cached}).
6300
6301 @item / d
6302 @kindex / d (Summary)
6303 @findex gnus-summary-limit-exclude-dormant
6304 Exclude all dormant articles from the limit
6305 (@code{gnus-summary-limit-exclude-dormant}).
6306
6307 @item / M
6308 @kindex / M (Summary)
6309 @findex gnus-summary-limit-exclude-marks
6310 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6311
6312 @item / T
6313 @kindex / T (Summary)
6314 @findex gnus-summary-limit-include-thread
6315 Include all the articles in the current thread in the limit.
6316
6317 @item / c
6318 @kindex / c (Summary)
6319 @findex gnus-summary-limit-exclude-childless-dormant
6320 Exclude all dormant articles that have no children from the limit@*
6321 (@code{gnus-summary-limit-exclude-childless-dormant}).
6322
6323 @item / C
6324 @kindex / C (Summary)
6325 @findex gnus-summary-limit-mark-excluded-as-read
6326 Mark all excluded unread articles as read
6327 (@code{gnus-summary-limit-mark-excluded-as-read}).   If given a prefix,
6328 also mark excluded ticked and dormant articles as read.
6329
6330 @item / N
6331 @kindex / N (Summary)
6332 @findex gnus-summary-insert-new-articles
6333 Insert all new articles in the summary buffer. It scans for new emails
6334 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6335
6336 @item / o
6337 @kindex / o (Summary)
6338 @findex gnus-summary-insert-old-articles
6339 Insert all old articles in the summary buffer. If given a numbered
6340 prefix, fetch this number of articles.
6341
6342 @end table
6343
6344
6345 @node Threading
6346 @section Threading
6347 @cindex threading
6348 @cindex article threading
6349
6350 Gnus threads articles by default.  @dfn{To thread} is to put responses
6351 to articles directly after the articles they respond to---in a
6352 hierarchical fashion.
6353
6354 Threading is done by looking at the @code{References} headers of the
6355 articles.  In a perfect world, this would be enough to build pretty
6356 trees, but unfortunately, the @code{References} header is often broken
6357 or simply missing.  Weird news propagation exacerbates the problem,
6358 so one has to employ other heuristics to get pleasing results.  A
6359 plethora of approaches exists, as detailed in horrible detail in
6360 @pxref{Customizing Threading}.
6361
6362 First, a quick overview of the concepts:
6363
6364 @table @dfn
6365 @item root
6366 The top-most article in a thread; the first article in the thread.
6367
6368 @item thread
6369 A tree-like article structure.
6370
6371 @item sub-thread
6372 A small(er) section of this tree-like structure.
6373
6374 @item loose threads
6375 Threads often lose their roots due to article expiry, or due to the root
6376 already having been read in a previous session, and not displayed in the
6377 summary buffer.  We then typically have many sub-threads that really
6378 belong to one thread, but are without connecting roots.  These are
6379 called loose threads.
6380
6381 @item thread gathering
6382 An attempt to gather loose threads into bigger threads.
6383
6384 @item sparse threads
6385 A thread where the missing articles have been ``guessed'' at, and are
6386 displayed as empty lines in the summary buffer.
6387
6388 @end table
6389
6390
6391 @menu
6392 * Customizing Threading::       Variables you can change to affect the threading.
6393 * Thread Commands::             Thread based commands in the summary buffer.
6394 @end menu
6395
6396
6397 @node Customizing Threading
6398 @subsection Customizing Threading
6399 @cindex customizing threading
6400
6401 @menu
6402 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6403 * Filling In Threads::          Making the threads displayed look fuller.
6404 * More Threading::              Even more variables for fiddling with threads.
6405 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
6406 @end menu
6407
6408
6409 @node Loose Threads
6410 @subsubsection Loose Threads
6411 @cindex <
6412 @cindex >
6413 @cindex loose threads
6414
6415 @table @code
6416 @item gnus-summary-make-false-root
6417 @vindex gnus-summary-make-false-root
6418 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
6419 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6420 Yup.)  Loose subtrees occur when the real root has expired, or you've
6421 read or killed the root in a previous session.
6422
6423 When there is no real root of a thread, Gnus will have to fudge
6424 something.  This variable says what fudging method Gnus should use.
6425 There are four possible values:
6426
6427 @iftex
6428 @iflatex
6429 \gnusfigure{The Summary Buffer}{390}{
6430 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6431 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6432 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6433 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6434 }
6435 @end iflatex
6436 @end iftex
6437
6438 @cindex adopting articles
6439
6440 @table @code
6441
6442 @item adopt
6443 Gnus will make the first of the orphaned articles the parent.  This
6444 parent will adopt all the other articles.  The adopted articles will be
6445 marked as such by pointy brackets (@samp{<>}) instead of the standard
6446 square brackets (@samp{[]}).  This is the default method.
6447
6448 @item dummy
6449 @vindex gnus-summary-dummy-line-format
6450 @vindex gnus-summary-make-false-root-always
6451 Gnus will create a dummy summary line that will pretend to be the
6452 parent.  This dummy line does not correspond to any real article, so
6453 selecting it will just select the first real article after the dummy
6454 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6455 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6456 which is the subject of the article.  @xref{Formatting Variables}.
6457 If you want all threads to have a dummy root, even the non-gathered
6458 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6459
6460 @item empty
6461 Gnus won't actually make any article the parent, but simply leave the
6462 subject field of all orphans except the first empty.  (Actually, it will
6463 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6464 Buffer Format}).)
6465
6466 @item none
6467 Don't make any article parent at all.  Just gather the threads and
6468 display them after one another.
6469
6470 @item nil
6471 Don't gather loose threads.
6472 @end table
6473
6474 @item gnus-summary-gather-subject-limit
6475 @vindex gnus-summary-gather-subject-limit
6476 Loose threads are gathered by comparing subjects of articles.  If this
6477 variable is @code{nil}, Gnus requires an exact match between the
6478 subjects of the loose threads before gathering them into one big
6479 super-thread.  This might be too strict a requirement, what with the
6480 presence of stupid newsreaders that chop off long subject lines.  If
6481 you think so, set this variable to, say, 20 to require that only the
6482 first 20 characters of the subjects have to match.  If you set this
6483 variable to a really low number, you'll find that Gnus will gather
6484 everything in sight into one thread, which isn't very helpful.
6485
6486 @cindex fuzzy article gathering
6487 If you set this variable to the special value @code{fuzzy}, Gnus will
6488 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6489 Matching}).
6490
6491 @item gnus-simplify-subject-fuzzy-regexp
6492 @vindex gnus-simplify-subject-fuzzy-regexp
6493 This can either be a regular expression or list of regular expressions
6494 that match strings that will be removed from subjects if fuzzy subject
6495 simplification is used.
6496
6497 @item gnus-simplify-ignored-prefixes
6498 @vindex gnus-simplify-ignored-prefixes
6499 If you set @code{gnus-summary-gather-subject-limit} to something as low
6500 as 10, you might consider setting this variable to something sensible:
6501
6502 @c Written by Michael Ernst <mernst@cs.rice.edu>
6503 @lisp
6504 (setq gnus-simplify-ignored-prefixes
6505       (concat
6506        "\\`\\[?\\("
6507        (mapconcat
6508         'identity
6509         '("looking"
6510           "wanted" "followup" "summary\\( of\\)?"
6511           "help" "query" "problem" "question"
6512           "answer" "reference" "announce"
6513           "How can I" "How to" "Comparison of"
6514           ;; ...
6515           )
6516         "\\|")
6517        "\\)\\s *\\("
6518        (mapconcat 'identity
6519                   '("for" "for reference" "with" "about")
6520                   "\\|")
6521        "\\)?\\]?:?[ \t]*"))
6522 @end lisp
6523
6524 All words that match this regexp will be removed before comparing two
6525 subjects.
6526
6527 @item gnus-simplify-subject-functions
6528 @vindex gnus-simplify-subject-functions
6529 If non-@code{nil}, this variable overrides
6530 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6531 list of functions to apply to the @code{Subject} string iteratively to
6532 arrive at the simplified version of the string.
6533
6534 Useful functions to put in this list include:
6535
6536 @table @code
6537 @item gnus-simplify-subject-re
6538 @findex gnus-simplify-subject-re
6539 Strip the leading @samp{Re:}.
6540
6541 @item gnus-simplify-subject-fuzzy
6542 @findex gnus-simplify-subject-fuzzy
6543 Simplify fuzzily.
6544
6545 @item gnus-simplify-whitespace
6546 @findex gnus-simplify-whitespace
6547 Remove excessive whitespace.
6548
6549 @item gnus-simplify-all-whitespace
6550 @findex gnus-simplify-all-whitespace
6551 Remove all whitespace.
6552 @end table
6553
6554 You may also write your own functions, of course.
6555
6556
6557 @item gnus-summary-gather-exclude-subject
6558 @vindex gnus-summary-gather-exclude-subject
6559 Since loose thread gathering is done on subjects only, that might lead
6560 to many false hits, especially with certain common subjects like
6561 @samp{} and @samp{(none)}.  To make the situation slightly better,
6562 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6563 what subjects should be excluded from the gathering process.@*
6564 The default is @samp{^ *$\\|^(none)$}.
6565
6566 @item gnus-summary-thread-gathering-function
6567 @vindex gnus-summary-thread-gathering-function
6568 Gnus gathers threads by looking at @code{Subject} headers.  This means
6569 that totally unrelated articles may end up in the same ``thread'', which
6570 is confusing.  An alternate approach is to look at all the
6571 @code{Message-ID}s in all the @code{References} headers to find matches.
6572 This will ensure that no gathered threads ever include unrelated
6573 articles, but it also means that people who have posted with broken
6574 newsreaders won't be gathered properly.  The choice is yours---plague or
6575 cholera:
6576
6577 @table @code
6578 @item gnus-gather-threads-by-subject
6579 @findex gnus-gather-threads-by-subject
6580 This function is the default gathering function and looks at
6581 @code{Subject}s exclusively.
6582
6583 @item gnus-gather-threads-by-references
6584 @findex gnus-gather-threads-by-references
6585 This function looks at @code{References} headers exclusively.
6586 @end table
6587
6588 If you want to test gathering by @code{References}, you could say
6589 something like:
6590
6591 @lisp
6592 (setq gnus-summary-thread-gathering-function
6593       'gnus-gather-threads-by-references)
6594 @end lisp
6595
6596 @end table
6597
6598
6599 @node Filling In Threads
6600 @subsubsection Filling In Threads
6601
6602 @table @code
6603 @item gnus-fetch-old-headers
6604 @vindex gnus-fetch-old-headers
6605 If non-@code{nil}, Gnus will attempt to build old threads by fetching
6606 more old headers---headers to articles marked as read.  If you
6607 would like to display as few summary lines as possible, but still
6608 connect as many loose threads as possible, you should set this variable
6609 to @code{some} or a number.  If you set it to a number, no more than
6610 that number of extra old headers will be fetched.  In either case,
6611 fetching old headers only works if the back end you are using carries
6612 overview files---this would normally be @code{nntp}, @code{nnspool},
6613 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6614 the thread has been expired by the server, there's not much Gnus can do
6615 about that.
6616
6617 This variable can also be set to @code{invisible}.  This won't have any
6618 visible effects, but is useful if you use the @kbd{A T} command a lot
6619 (@pxref{Finding the Parent}).
6620
6621 @item gnus-fetch-old-ephemeral-headers
6622 @vindex gnus-fetch-old-ephemeral-headers
6623 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
6624 newsgroups.
6625
6626 @item gnus-build-sparse-threads
6627 @vindex gnus-build-sparse-threads
6628 Fetching old headers can be slow.  A low-rent similar effect can be
6629 gotten by setting this variable to @code{some}.  Gnus will then look at
6630 the complete @code{References} headers of all articles and try to string
6631 together articles that belong in the same thread.  This will leave
6632 @dfn{gaps} in the threading display where Gnus guesses that an article
6633 is missing from the thread.  (These gaps appear like normal summary
6634 lines.  If you select a gap, Gnus will try to fetch the article in
6635 question.)  If this variable is @code{t}, Gnus will display all these
6636 ``gaps'' without regard for whether they are useful for completing the
6637 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
6638 off sparse leaf nodes that don't lead anywhere.  This variable is
6639 @code{nil} by default.
6640
6641 @item gnus-read-all-available-headers
6642 @vindex gnus-read-all-available-headers
6643 This is a rather obscure variable that few will find useful.  It's
6644 intended for those non-news newsgroups where the back end has to fetch
6645 quite a lot to present the summary buffer, and where it's impossible to
6646 go back to parents of articles.  This is mostly the case in the
6647 web-based groups, like the @code{nnultimate} groups.
6648
6649 If you don't use those, then it's safe to leave this as the default
6650 @code{nil}.  If you want to use this variable, it should be a regexp
6651 that matches the group name, or @code{t} for all groups.
6652
6653 @end table
6654
6655
6656 @node More Threading
6657 @subsubsection More Threading
6658
6659 @table @code
6660 @item gnus-show-threads
6661 @vindex gnus-show-threads
6662 If this variable is @code{nil}, no threading will be done, and all of
6663 the rest of the variables here will have no effect.  Turning threading
6664 off will speed group selection up a bit, but it is sure to make reading
6665 slower and more awkward.
6666
6667 @item gnus-thread-hide-subtree
6668 @vindex gnus-thread-hide-subtree
6669 If non-@code{nil}, all threads will be hidden when the summary buffer is
6670 generated.
6671
6672 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6673 Available predicates are @code{gnus-article-unread-p} and
6674 @code{gnus-article-unseen-p}.
6675
6676 Here's an example:
6677
6678 @lisp
6679 (setq gnus-thread-hide-subtree
6680       '(or gnus-article-unread-p
6681            gnus-article-unseen-p))
6682 @end lisp
6683
6684 (It's a pretty nonsensical example, since all unseen articles are also
6685 unread, but you get my drift.)
6686
6687
6688 @item gnus-thread-expunge-below
6689 @vindex gnus-thread-expunge-below
6690 All threads that have a total score (as defined by
6691 @code{gnus-thread-score-function}) less than this number will be
6692 expunged.  This variable is @code{nil} by default, which means that no
6693 threads are expunged.
6694
6695 @item gnus-thread-hide-killed
6696 @vindex gnus-thread-hide-killed
6697 if you kill a thread and this variable is non-@code{nil}, the subtree
6698 will be hidden.
6699
6700 @item gnus-thread-ignore-subject
6701 @vindex gnus-thread-ignore-subject
6702 Sometimes somebody changes the subject in the middle of a thread.  If
6703 this variable is non-@code{nil}, which is the default, the subject
6704 change is ignored.  If it is @code{nil}, a change in the subject will
6705 result in a new thread.
6706
6707 @item gnus-thread-indent-level
6708 @vindex gnus-thread-indent-level
6709 This is a number that says how much each sub-thread should be indented.
6710 The default is 4.
6711
6712 @item gnus-sort-gathered-threads-function
6713 @vindex gnus-sort-gathered-threads-function
6714 Sometimes, particularly with mailing lists, the order in which mails
6715 arrive locally is not necessarily the same as the order in which they
6716 arrived on the mailing list.  Consequently, when sorting sub-threads
6717 using the default @code{gnus-thread-sort-by-number}, responses can end
6718 up appearing before the article to which they are responding to.
6719 Setting this variable to an alternate value
6720 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6721 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6722 more logical sub-thread ordering in such instances.
6723
6724 @end table
6725
6726
6727 @node Low-Level Threading
6728 @subsubsection Low-Level Threading
6729
6730 @table @code
6731
6732 @item gnus-parse-headers-hook
6733 @vindex gnus-parse-headers-hook
6734 Hook run before parsing any headers.
6735
6736 @item gnus-alter-header-function
6737 @vindex gnus-alter-header-function
6738 If non-@code{nil}, this function will be called to allow alteration of
6739 article header structures.  The function is called with one parameter,
6740 the article header vector, which it may alter in any way.  For instance,
6741 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6742 in systematic ways (by adding prefixes and such), you can use this
6743 variable to un-scramble the @code{Message-ID}s so that they are more
6744 meaningful.  Here's one example:
6745
6746 @lisp
6747 (setq gnus-alter-header-function 'my-alter-message-id)
6748
6749 (defun my-alter-message-id (header)
6750   (let ((id (mail-header-id header)))
6751     (when (string-match
6752            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6753       (mail-header-set-id
6754        (concat (match-string 1 id) "@@" (match-string 2 id))
6755        header))))
6756 @end lisp
6757
6758 @end table
6759
6760
6761 @node Thread Commands
6762 @subsection Thread Commands
6763 @cindex thread commands
6764
6765 @table @kbd
6766
6767 @item T k
6768 @itemx C-M-k
6769 @kindex T k (Summary)
6770 @kindex C-M-k (Summary)
6771 @findex gnus-summary-kill-thread
6772 Mark all articles in the current (sub-)thread as read
6773 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6774 remove all marks instead.  If the prefix argument is negative, tick
6775 articles instead.
6776
6777 @item T l
6778 @itemx C-M-l
6779 @kindex T l (Summary)
6780 @kindex C-M-l (Summary)
6781 @findex gnus-summary-lower-thread
6782 Lower the score of the current (sub-)thread
6783 (@code{gnus-summary-lower-thread}).
6784
6785 @item T i
6786 @kindex T i (Summary)
6787 @findex gnus-summary-raise-thread
6788 Increase the score of the current (sub-)thread
6789 (@code{gnus-summary-raise-thread}).
6790
6791 @item T #
6792 @kindex T # (Summary)
6793 @findex gnus-uu-mark-thread
6794 Set the process mark on the current (sub-)thread
6795 (@code{gnus-uu-mark-thread}).
6796
6797 @item T M-#
6798 @kindex T M-# (Summary)
6799 @findex gnus-uu-unmark-thread
6800 Remove the process mark from the current (sub-)thread
6801 (@code{gnus-uu-unmark-thread}).
6802
6803 @item T T
6804 @kindex T T (Summary)
6805 @findex gnus-summary-toggle-threads
6806 Toggle threading (@code{gnus-summary-toggle-threads}).
6807
6808 @item T s
6809 @kindex T s (Summary)
6810 @findex gnus-summary-show-thread
6811 Expose the (sub-)thread hidden under the current article, if any@*
6812 (@code{gnus-summary-show-thread}).
6813
6814 @item T h
6815 @kindex T h (Summary)
6816 @findex gnus-summary-hide-thread
6817 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6818
6819 @item T S
6820 @kindex T S (Summary)
6821 @findex gnus-summary-show-all-threads
6822 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6823
6824 @item T H
6825 @kindex T H (Summary)
6826 @findex gnus-summary-hide-all-threads
6827 Hide all threads (@code{gnus-summary-hide-all-threads}).
6828
6829 @item T t
6830 @kindex T t (Summary)
6831 @findex gnus-summary-rethread-current
6832 Re-thread the current article's thread
6833 (@code{gnus-summary-rethread-current}).  This works even when the
6834 summary buffer is otherwise unthreaded.
6835
6836 @item T ^
6837 @kindex T ^ (Summary)
6838 @findex gnus-summary-reparent-thread
6839 Make the current article the child of the marked (or previous) article
6840 (@code{gnus-summary-reparent-thread}).
6841
6842 @end table
6843
6844 The following commands are thread movement commands.  They all
6845 understand the numeric prefix.
6846
6847 @table @kbd
6848
6849 @item T n
6850 @kindex T n (Summary)
6851 @itemx C-M-f
6852 @kindex C-M-n (Summary)
6853 @itemx M-down
6854 @kindex M-down (Summary)
6855 @findex gnus-summary-next-thread
6856 Go to the next thread (@code{gnus-summary-next-thread}).
6857
6858 @item T p
6859 @kindex T p (Summary)
6860 @itemx C-M-b
6861 @kindex C-M-p (Summary)
6862 @itemx M-up
6863 @kindex M-up (Summary)
6864 @findex gnus-summary-prev-thread
6865 Go to the previous thread (@code{gnus-summary-prev-thread}).
6866
6867 @item T d
6868 @kindex T d (Summary)
6869 @findex gnus-summary-down-thread
6870 Descend the thread (@code{gnus-summary-down-thread}).
6871
6872 @item T u
6873 @kindex T u (Summary)
6874 @findex gnus-summary-up-thread
6875 Ascend the thread (@code{gnus-summary-up-thread}).
6876
6877 @item T o
6878 @kindex T o (Summary)
6879 @findex gnus-summary-top-thread
6880 Go to the top of the thread (@code{gnus-summary-top-thread}).
6881 @end table
6882
6883 @vindex gnus-thread-operation-ignore-subject
6884 If you ignore subject while threading, you'll naturally end up with
6885 threads that have several different subjects in them.  If you then issue
6886 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
6887 wish to kill the entire thread, but just those parts of the thread that
6888 have the same subject as the current article.  If you like this idea,
6889 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6890 is non-@code{nil} (which it is by default), subjects will be ignored
6891 when doing thread commands.  If this variable is @code{nil}, articles in
6892 the same thread with different subjects will not be included in the
6893 operation in question.  If this variable is @code{fuzzy}, only articles
6894 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6895 Matching}).
6896
6897
6898 @node Sorting the Summary Buffer
6899 @section Sorting the Summary Buffer
6900
6901 @findex gnus-thread-sort-by-total-score
6902 @findex gnus-thread-sort-by-date
6903 @findex gnus-thread-sort-by-score
6904 @findex gnus-thread-sort-by-subject
6905 @findex gnus-thread-sort-by-author
6906 @findex gnus-thread-sort-by-number
6907 @findex gnus-thread-sort-by-random
6908 @vindex gnus-thread-sort-functions
6909 @findex gnus-thread-sort-by-most-recent-thread
6910 If you are using a threaded summary display, you can sort the threads by
6911 setting @code{gnus-thread-sort-functions}, which can be either a single
6912 function, a list of functions, or a list containing functions and
6913 @code{(not some-function)} elements.
6914
6915 By default, sorting is done on article numbers.  Ready-made sorting
6916 predicate functions include @code{gnus-thread-sort-by-number},
6917 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
6918 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
6919 @code{gnus-thread-sort-by-most-recent-number},
6920 @code{gnus-thread-sort-by-most-recent-date},
6921 @code{gnus-thread-sort-by-random} and
6922 @code{gnus-thread-sort-by-total-score}.
6923
6924 Each function takes two threads and returns non-@code{nil} if the first
6925 thread should be sorted before the other.  Note that sorting really is
6926 normally done by looking only at the roots of each thread.
6927
6928 If you use more than one function, the primary sort key should be the
6929 last function in the list.  You should probably always include
6930 @code{gnus-thread-sort-by-number} in the list of sorting
6931 functions---preferably first.  This will ensure that threads that are
6932 equal with respect to the other sort criteria will be displayed in
6933 ascending article order.
6934
6935 If you would like to sort by reverse score, then by subject, and finally
6936 by number, you could do something like:
6937
6938 @lisp
6939 (setq gnus-thread-sort-functions
6940       '(gnus-thread-sort-by-number
6941         gnus-thread-sort-by-subject
6942         (not gnus-thread-sort-by-total-score)))
6943 @end lisp
6944
6945 The threads that have highest score will be displayed first in the
6946 summary buffer.  When threads have the same score, they will be sorted
6947 alphabetically.  The threads that have the same score and the same
6948 subject will be sorted by number, which is (normally) the sequence in
6949 which the articles arrived.
6950
6951 If you want to sort by score and then reverse arrival order, you could
6952 say something like:
6953
6954 @lisp
6955 (setq gnus-thread-sort-functions
6956       '((lambda (t1 t2)
6957           (not (gnus-thread-sort-by-number t1 t2)))
6958         gnus-thread-sort-by-score))
6959 @end lisp
6960
6961 @vindex gnus-thread-score-function
6962 The function in the @code{gnus-thread-score-function} variable (default
6963 @code{+}) is used for calculating the total score of a thread.  Useful
6964 functions might be @code{max}, @code{min}, or squared means, or whatever
6965 tickles your fancy.
6966
6967 @findex gnus-article-sort-functions
6968 @findex gnus-article-sort-by-date
6969 @findex gnus-article-sort-by-score
6970 @findex gnus-article-sort-by-subject
6971 @findex gnus-article-sort-by-author
6972 @findex gnus-article-sort-by-random
6973 @findex gnus-article-sort-by-number
6974 If you are using an unthreaded display for some strange reason or
6975 other, you have to fiddle with the @code{gnus-article-sort-functions}
6976 variable.  It is very similar to the
6977 @code{gnus-thread-sort-functions}, except that it uses slightly
6978 different functions for article comparison.  Available sorting
6979 predicate functions are @code{gnus-article-sort-by-number},
6980 @code{gnus-article-sort-by-author},
6981 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
6982 @code{gnus-article-sort-by-random}, and
6983 @code{gnus-article-sort-by-score}.
6984
6985 If you want to sort an unthreaded summary display by subject, you could
6986 say something like:
6987
6988 @lisp
6989 (setq gnus-article-sort-functions
6990       '(gnus-article-sort-by-number
6991         gnus-article-sort-by-subject))
6992 @end lisp
6993
6994
6995
6996 @node Asynchronous Fetching
6997 @section Asynchronous Article Fetching
6998 @cindex asynchronous article fetching
6999 @cindex article pre-fetch
7000 @cindex pre-fetch
7001
7002 If you read your news from an @acronym{NNTP} server that's far away, the
7003 network latencies may make reading articles a chore.  You have to wait
7004 for a while after pressing @kbd{n} to go to the next article before the
7005 article appears.  Why can't Gnus just go ahead and fetch the article
7006 while you are reading the previous one?  Why not, indeed.
7007
7008 First, some caveats.  There are some pitfalls to using asynchronous
7009 article fetching, especially the way Gnus does it.
7010
7011 Let's say you are reading article 1, which is short, and article 2 is
7012 quite long, and you are not interested in reading that.  Gnus does not
7013 know this, so it goes ahead and fetches article 2.  You decide to read
7014 article 3, but since Gnus is in the process of fetching article 2, the
7015 connection is blocked.
7016
7017 To avoid these situations, Gnus will open two (count 'em two)
7018 connections to the server.  Some people may think this isn't a very nice
7019 thing to do, but I don't see any real alternatives.  Setting up that
7020 extra connection takes some time, so Gnus startup will be slower.
7021
7022 Gnus will fetch more articles than you will read.  This will mean that
7023 the link between your machine and the @acronym{NNTP} server will become more
7024 loaded than if you didn't use article pre-fetch.  The server itself will
7025 also become more loaded---both with the extra article requests, and the
7026 extra connection.
7027
7028 Ok, so now you know that you shouldn't really use this thing@dots{} unless
7029 you really want to.
7030
7031 @vindex gnus-asynchronous
7032 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
7033 happen automatically.
7034
7035 @vindex gnus-use-article-prefetch
7036 You can control how many articles are to be pre-fetched by setting
7037 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
7038 that when you read an article in the group, the back end will pre-fetch
7039 the next 30 articles.  If this variable is @code{t}, the back end will
7040 pre-fetch all the articles it can without bound.  If it is
7041 @code{nil}, no pre-fetching will be done.
7042
7043 @vindex gnus-async-prefetch-article-p
7044 @findex gnus-async-read-p
7045 There are probably some articles that you don't want to pre-fetch---read
7046 articles, for instance.  The @code{gnus-async-prefetch-article-p}
7047 variable controls whether an article is to be pre-fetched.  This
7048 function should return non-@code{nil} when the article in question is
7049 to be pre-fetched.  The default is @code{gnus-async-read-p}, which
7050 returns @code{nil} on read articles.  The function is called with an
7051 article data structure as the only parameter.
7052
7053 If, for instance, you wish to pre-fetch only unread articles shorter
7054 than 100 lines, you could say something like:
7055
7056 @lisp
7057 (defun my-async-short-unread-p (data)
7058   "Return non-nil for short, unread articles."
7059   (and (gnus-data-unread-p data)
7060        (< (mail-header-lines (gnus-data-header data))
7061           100)))
7062
7063 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7064 @end lisp
7065
7066 These functions will be called many, many times, so they should
7067 preferably be short and sweet to avoid slowing down Gnus too much.
7068 It's probably a good idea to byte-compile things like this.
7069
7070 @vindex gnus-prefetched-article-deletion-strategy
7071 Articles have to be removed from the asynch buffer sooner or later.  The
7072 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7073 articles.  This is a list that may contain the following elements:
7074
7075 @table @code
7076 @item read
7077 Remove articles when they are read.
7078
7079 @item exit
7080 Remove articles when exiting the group.
7081 @end table
7082
7083 The default value is @code{(read exit)}.
7084
7085 @c @vindex gnus-use-header-prefetch
7086 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7087 @c from the next group.
7088
7089
7090 @node Article Caching
7091 @section Article Caching
7092 @cindex article caching
7093 @cindex caching
7094
7095 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
7096 consider turning article caching on.  Each article will then be stored
7097 locally under your home directory.  As you may surmise, this could
7098 potentially use @emph{huge} amounts of disk space, as well as eat up all
7099 your inodes so fast it will make your head swim.  In vodka.
7100
7101 Used carefully, though, it could be just an easier way to save articles.
7102
7103 @vindex gnus-use-long-file-name
7104 @vindex gnus-cache-directory
7105 @vindex gnus-use-cache
7106 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7107 all articles ticked or marked as dormant will then be copied
7108 over to your local cache (@code{gnus-cache-directory}).  Whether this
7109 cache is flat or hierarchical is controlled by the
7110 @code{gnus-use-long-file-name} variable, as usual.
7111
7112 When re-selecting a ticked or dormant article, it will be fetched from the
7113 cache instead of from the server.  As articles in your cache will never
7114 expire, this might serve as a method of saving articles while still
7115 keeping them where they belong.  Just mark all articles you want to save
7116 as dormant, and don't worry.
7117
7118 When an article is marked as read, is it removed from the cache.
7119
7120 @vindex gnus-cache-remove-articles
7121 @vindex gnus-cache-enter-articles
7122 The entering/removal of articles from the cache is controlled by the
7123 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7124 variables.  Both are lists of symbols.  The first is @code{(ticked
7125 dormant)} by default, meaning that ticked and dormant articles will be
7126 put in the cache.  The latter is @code{(read)} by default, meaning that
7127 articles marked as read are removed from the cache.  Possibly
7128 symbols in these two lists are @code{ticked}, @code{dormant},
7129 @code{unread} and @code{read}.
7130
7131 @findex gnus-jog-cache
7132 So where does the massive article-fetching and storing come into the
7133 picture?  The @code{gnus-jog-cache} command will go through all
7134 subscribed newsgroups, request all unread articles, score them, and
7135 store them in the cache.  You should only ever, ever ever ever, use this
7136 command if 1) your connection to the @acronym{NNTP} server is really, really,
7137 really slow and 2) you have a really, really, really huge disk.
7138 Seriously.  One way to cut down on the number of articles downloaded is
7139 to score unwanted articles down and have them marked as read.  They will
7140 not then be downloaded by this command.
7141
7142 @vindex gnus-uncacheable-groups
7143 @vindex gnus-cacheable-groups
7144 It is likely that you do not want caching on all groups.  For instance,
7145 if your @code{nnml} mail is located under your home directory, it makes no
7146 sense to cache it somewhere else under your home directory.  Unless you
7147 feel that it's neat to use twice as much space.
7148
7149 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7150 regexp of groups to cache, @samp{^nntp} for instance, or set the
7151 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7152 Both variables are @code{nil} by default.  If a group matches both
7153 variables, the group is not cached.
7154
7155 @findex gnus-cache-generate-nov-databases
7156 @findex gnus-cache-generate-active
7157 @vindex gnus-cache-active-file
7158 The cache stores information on what articles it contains in its active
7159 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7160 of the cache) becomes all messed up for some reason or other, Gnus
7161 offers two functions that will try to set things right.  @kbd{M-x
7162 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
7163 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7164 file.
7165
7166 @findex gnus-cache-move-cache
7167 @code{gnus-cache-move-cache} will move your whole
7168 @code{gnus-cache-directory} to some other location. You get asked to
7169 where, isn't that cool?
7170
7171 @node Persistent Articles
7172 @section Persistent Articles
7173 @cindex persistent articles
7174
7175 Closely related to article caching, we have @dfn{persistent articles}.
7176 In fact, it's just a different way of looking at caching, and much more
7177 useful in my opinion.
7178
7179 Say you're reading a newsgroup, and you happen on to some valuable gem
7180 that you want to keep and treasure forever.  You'd normally just save it
7181 (using one of the many saving commands) in some file.  The problem with
7182 that is that it's just, well, yucky.  Ideally you'd prefer just having
7183 the article remain in the group where you found it forever; untouched by
7184 the expiry going on at the news server.
7185
7186 This is what a @dfn{persistent article} is---an article that just won't
7187 be deleted.  It's implemented using the normal cache functions, but
7188 you use two explicit commands for managing persistent articles:
7189
7190 @table @kbd
7191
7192 @item *
7193 @kindex * (Summary)
7194 @findex gnus-cache-enter-article
7195 Make the current article persistent (@code{gnus-cache-enter-article}).
7196
7197 @item M-*
7198 @kindex M-* (Summary)
7199 @findex gnus-cache-remove-article
7200 Remove the current article from the persistent articles
7201 (@code{gnus-cache-remove-article}).  This will normally delete the
7202 article.
7203 @end table
7204
7205 Both these commands understand the process/prefix convention.
7206
7207 To avoid having all ticked articles (and stuff) entered into the cache,
7208 you should set @code{gnus-use-cache} to @code{passive} if you're just
7209 interested in persistent articles:
7210
7211 @lisp
7212 (setq gnus-use-cache 'passive)
7213 @end lisp
7214
7215
7216 @node Article Backlog
7217 @section Article Backlog
7218 @cindex backlog
7219 @cindex article backlog
7220
7221 If you have a slow connection, but the idea of using caching seems
7222 unappealing to you (and it is, really), you can help the situation some
7223 by switching on the @dfn{backlog}.  This is where Gnus will buffer
7224 already read articles so that it doesn't have to re-fetch articles
7225 you've already read.  This only helps if you are in the habit of
7226 re-selecting articles you've recently read, of course.  If you never do
7227 that, turning the backlog on will slow Gnus down a little bit, and
7228 increase memory usage some.
7229
7230 @vindex gnus-keep-backlog
7231 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
7232 at most @var{n} old articles in a buffer for later re-fetching.  If this
7233 variable is non-@code{nil} and is not a number, Gnus will store
7234 @emph{all} read articles, which means that your Emacs will grow without
7235 bound before exploding and taking your machine down with you.  I put
7236 that in there just to keep y'all on your toes.
7237
7238 The default value is 20.
7239
7240
7241 @node Saving Articles
7242 @section Saving Articles
7243 @cindex saving articles
7244
7245 Gnus can save articles in a number of ways.  Below is the documentation
7246 for saving articles in a fairly straight-forward fashion (i.e., little
7247 processing of the article is done before it is saved).  For a different
7248 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7249 (@pxref{Decoding Articles}).
7250
7251 For the commands listed here, the target is a file.  If you want to
7252 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7253 command (@pxref{Mail Group Commands}).
7254
7255 @vindex gnus-save-all-headers
7256 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
7257 unwanted headers before saving the article.
7258
7259 @vindex gnus-saved-headers
7260 If the preceding variable is @code{nil}, all headers that match the
7261 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7262 deleted before saving.
7263
7264 @table @kbd
7265
7266 @item O o
7267 @itemx o
7268 @kindex O o (Summary)
7269 @kindex o (Summary)
7270 @findex gnus-summary-save-article
7271 @c @icon{gnus-summary-save-article}
7272 Save the current article using the default article saver
7273 (@code{gnus-summary-save-article}).
7274
7275 @item O m
7276 @kindex O m (Summary)
7277 @findex gnus-summary-save-article-mail
7278 Save the current article in mail format
7279 (@code{gnus-summary-save-article-mail}).
7280
7281 @item O r
7282 @kindex O r (Summary)
7283 @findex gnus-summary-save-article-rmail
7284 Save the current article in Rmail format
7285 (@code{gnus-summary-save-article-rmail}).
7286
7287 @item O f
7288 @kindex O f (Summary)
7289 @findex gnus-summary-save-article-file
7290 @c @icon{gnus-summary-save-article-file}
7291 Save the current article in plain file format
7292 (@code{gnus-summary-save-article-file}).
7293
7294 @item O F
7295 @kindex O F (Summary)
7296 @findex gnus-summary-write-article-file
7297 Write the current article in plain file format, overwriting any previous
7298 file contents (@code{gnus-summary-write-article-file}).
7299
7300 @item O b
7301 @kindex O b (Summary)
7302 @findex gnus-summary-save-article-body-file
7303 Save the current article body in plain file format
7304 (@code{gnus-summary-save-article-body-file}).
7305
7306 @item O h
7307 @kindex O h (Summary)
7308 @findex gnus-summary-save-article-folder
7309 Save the current article in mh folder format
7310 (@code{gnus-summary-save-article-folder}).
7311
7312 @item O v
7313 @kindex O v (Summary)
7314 @findex gnus-summary-save-article-vm
7315 Save the current article in a VM folder
7316 (@code{gnus-summary-save-article-vm}).
7317
7318 @item O p
7319 @itemx |
7320 @kindex O p (Summary)
7321 @kindex | (Summary)
7322 @findex gnus-summary-pipe-output
7323 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7324 the current article to a process (@code{gnus-summary-pipe-output}).
7325 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7326 complete headers in the piped output.
7327
7328 @item O P
7329 @kindex O P (Summary)
7330 @findex gnus-summary-muttprint
7331 @vindex gnus-summary-muttprint-program
7332 Save the current article into muttprint. That is, print it using the
7333 external program @uref{http://muttprint.sourceforge.net/,
7334 Muttprint}. The program name and options to use is controlled by the
7335 variable @code{gnus-summary-muttprint-program}.
7336 (@code{gnus-summary-muttprint}).
7337
7338 @end table
7339
7340 @vindex gnus-prompt-before-saving
7341 All these commands use the process/prefix convention
7342 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7343 functions, you might get tired of being prompted for files to save each
7344 and every article in.  The prompting action is controlled by
7345 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7346 default, giving you that excessive prompting action you know and
7347 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7348 just once for each series of articles you save.  If you like to really
7349 have Gnus do all your thinking for you, you can even set this variable
7350 to @code{nil}, which means that you will never be prompted for files to
7351 save articles in.  Gnus will simply save all the articles in the default
7352 files.
7353
7354
7355 @vindex gnus-default-article-saver
7356 You can customize the @code{gnus-default-article-saver} variable to make
7357 Gnus do what you want it to.  You can use any of the six ready-made
7358 functions below, or you can create your own.
7359
7360 @table @code
7361
7362 @item gnus-summary-save-in-rmail
7363 @findex gnus-summary-save-in-rmail
7364 @vindex gnus-rmail-save-name
7365 @findex gnus-plain-save-name
7366 This is the default format, @dfn{Babyl}.  Uses the function in the
7367 @code{gnus-rmail-save-name} variable to get a file name to save the
7368 article in.  The default is @code{gnus-plain-save-name}.
7369
7370 @item gnus-summary-save-in-mail
7371 @findex gnus-summary-save-in-mail
7372 @vindex gnus-mail-save-name
7373 Save in a Unix mail (mbox) file.  Uses the function in the
7374 @code{gnus-mail-save-name} variable to get a file name to save the
7375 article in.  The default is @code{gnus-plain-save-name}.
7376
7377 @item gnus-summary-save-in-file
7378 @findex gnus-summary-save-in-file
7379 @vindex gnus-file-save-name
7380 @findex gnus-numeric-save-name
7381 Append the article straight to an ordinary file.  Uses the function in
7382 the @code{gnus-file-save-name} variable to get a file name to save the
7383 article in.  The default is @code{gnus-numeric-save-name}.
7384
7385 @item gnus-summary-write-to-file
7386 @findex gnus-summary-write-to-file
7387 Write the article straight to an ordinary file.  The file is
7388 overwritten if it exists.  Uses the function in the
7389 @code{gnus-file-save-name} variable to get a file name to save the
7390 article in.  The default is @code{gnus-numeric-save-name}.
7391
7392 @item gnus-summary-save-body-in-file
7393 @findex gnus-summary-save-body-in-file
7394 Append the article body to an ordinary file.  Uses the function in the
7395 @code{gnus-file-save-name} variable to get a file name to save the
7396 article in.  The default is @code{gnus-numeric-save-name}.
7397
7398 @item gnus-summary-save-in-folder
7399 @findex gnus-summary-save-in-folder
7400 @findex gnus-folder-save-name
7401 @findex gnus-Folder-save-name
7402 @vindex gnus-folder-save-name
7403 @cindex rcvstore
7404 @cindex MH folders
7405 Save the article to an MH folder using @code{rcvstore} from the MH
7406 library.  Uses the function in the @code{gnus-folder-save-name} variable
7407 to get a file name to save the article in.  The default is
7408 @code{gnus-folder-save-name}, but you can also use
7409 @code{gnus-Folder-save-name}, which creates capitalized names.
7410
7411 @item gnus-summary-save-in-vm
7412 @findex gnus-summary-save-in-vm
7413 Save the article in a VM folder.  You have to have the VM mail
7414 reader to use this setting.
7415 @end table
7416
7417 @vindex gnus-article-save-directory
7418 All of these functions, except for the last one, will save the article
7419 in the @code{gnus-article-save-directory}, which is initialized from the
7420 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
7421 default.
7422
7423 As you can see above, the functions use different functions to find a
7424 suitable name of a file to save the article in.  Below is a list of
7425 available functions that generate names:
7426
7427 @table @code
7428
7429 @item gnus-Numeric-save-name
7430 @findex gnus-Numeric-save-name
7431 File names like @file{~/News/Alt.andrea-dworkin/45}.
7432
7433 @item gnus-numeric-save-name
7434 @findex gnus-numeric-save-name
7435 File names like @file{~/News/alt.andrea-dworkin/45}.
7436
7437 @item gnus-Plain-save-name
7438 @findex gnus-Plain-save-name
7439 File names like @file{~/News/Alt.andrea-dworkin}.
7440
7441 @item gnus-plain-save-name
7442 @findex gnus-plain-save-name
7443 File names like @file{~/News/alt.andrea-dworkin}.
7444
7445 @item gnus-sender-save-name
7446 @findex gnus-sender-save-name
7447 File names like @file{~/News/larsi}.
7448 @end table
7449
7450 @vindex gnus-split-methods
7451 You can have Gnus suggest where to save articles by plonking a regexp into
7452 the @code{gnus-split-methods} alist.  For instance, if you would like to
7453 save articles related to Gnus in the file @file{gnus-stuff}, and articles
7454 related to VM in @file{vm-stuff}, you could set this variable to something
7455 like:
7456
7457 @lisp
7458 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7459  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7460  (my-choosing-function "../other-dir/my-stuff")
7461  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7462 @end lisp
7463
7464 We see that this is a list where each element is a list that has two
7465 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7466 a string (in which case it is used as a regexp to match on the article
7467 head); it can be a symbol (which will be called as a function with the
7468 group name as a parameter); or it can be a list (which will be
7469 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7470 the @dfn{file} will be used as a default prompt.  In addition, the
7471 result of the operation itself will be used if the function or form
7472 called returns a string or a list of strings.
7473
7474 You basically end up with a list of file names that might be used when
7475 saving the current article.  (All ``matches'' will be used.)  You will
7476 then be prompted for what you really want to use as a name, with file
7477 name completion over the results from applying this variable.
7478
7479 This variable is @code{((gnus-article-archive-name))} by default, which
7480 means that Gnus will look at the articles it saves for an
7481 @code{Archive-name} line and use that as a suggestion for the file
7482 name.
7483
7484 Here's an example function to clean up file names somewhat.  If you have
7485 lots of mail groups called things like
7486 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7487 these group names before creating the file name to save to.  The
7488 following will do just that:
7489
7490 @lisp
7491 (defun my-save-name (group)
7492   (when (string-match "^nnml:mail." group)
7493     (substring group (match-end 0))))
7494
7495 (setq gnus-split-methods
7496       '((gnus-article-archive-name)
7497         (my-save-name)))
7498 @end lisp
7499
7500
7501 @vindex gnus-use-long-file-name
7502 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7503 @code{nil}, all the preceding functions will replace all periods
7504 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7505 the functions will generate hierarchies of directories instead of having
7506 all the files in the top level directory
7507 (@file{~/News/alt/andrea-dworkin} instead of
7508 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7509 on most systems.  However, for historical reasons, this is @code{nil} on
7510 Xenix and usg-unix-v machines by default.
7511
7512 This function also affects kill and score file names.  If this variable
7513 is a list, and the list contains the element @code{not-score}, long file
7514 names will not be used for score files, if it contains the element
7515 @code{not-save}, long file names will not be used for saving, and if it
7516 contains the element @code{not-kill}, long file names will not be used
7517 for kill files.
7518
7519 If you'd like to save articles in a hierarchy that looks something like
7520 a spool, you could
7521
7522 @lisp
7523 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
7524 (setq gnus-default-article-saver
7525       'gnus-summary-save-in-file)          ; @r{no encoding}
7526 @end lisp
7527
7528 Then just save with @kbd{o}.  You'd then read this hierarchy with
7529 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7530 the top level directory as the argument (@file{~/News/}).  Then just walk
7531 around to the groups/directories with @code{nneething}.
7532
7533
7534 @node Decoding Articles
7535 @section Decoding Articles
7536 @cindex decoding articles
7537
7538 Sometime users post articles (or series of articles) that have been
7539 encoded in some way or other.  Gnus can decode them for you.
7540
7541 @menu
7542 * Uuencoded Articles::          Uudecode articles.
7543 * Shell Archives::              Unshar articles.
7544 * PostScript Files::            Split PostScript.
7545 * Other Files::                 Plain save and binhex.
7546 * Decoding Variables::          Variables for a happy decoding.
7547 * Viewing Files::               You want to look at the result of the decoding?
7548 @end menu
7549
7550 @cindex series
7551 @cindex article series
7552 All these functions use the process/prefix convention
7553 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7554 the extension that a ``single article'' means ``a single series''.  Gnus
7555 can find out by itself what articles belong to a series, decode all the
7556 articles and unpack/view/save the resulting file(s).
7557
7558 Gnus guesses what articles are in the series according to the following
7559 simplish rule: The subjects must be (nearly) identical, except for the
7560 last two numbers of the line.  (Spaces are largely ignored, however.)
7561
7562 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
7563 will find all the articles that match the regexp @samp{^cat.gif
7564 ([0-9]+/[0-9]+).*$}.
7565
7566 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7567 series}, will not be properly recognized by any of the automatic viewing
7568 commands, and you have to mark the articles manually with @kbd{#}.
7569
7570
7571 @node Uuencoded Articles
7572 @subsection Uuencoded Articles
7573 @cindex uudecode
7574 @cindex uuencoded articles
7575
7576 @table @kbd
7577
7578 @item X u
7579 @kindex X u (Summary)
7580 @findex gnus-uu-decode-uu
7581 @c @icon{gnus-uu-decode-uu}
7582 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7583
7584 @item X U
7585 @kindex X U (Summary)
7586 @findex gnus-uu-decode-uu-and-save
7587 Uudecodes and saves the current series
7588 (@code{gnus-uu-decode-uu-and-save}).
7589
7590 @item X v u
7591 @kindex X v u (Summary)
7592 @findex gnus-uu-decode-uu-view
7593 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7594
7595 @item X v U
7596 @kindex X v U (Summary)
7597 @findex gnus-uu-decode-uu-and-save-view
7598 Uudecodes, views and saves the current series
7599 (@code{gnus-uu-decode-uu-and-save-view}).
7600
7601 @end table
7602
7603 Remember that these all react to the presence of articles marked with
7604 the process mark.  If, for instance, you'd like to decode and save an
7605 entire newsgroup, you'd typically do @kbd{M P a}
7606 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7607 (@code{gnus-uu-decode-uu-and-save}).
7608
7609 All this is very much different from how @code{gnus-uu} worked with
7610 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7611 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7612 articles in some way (@pxref{Setting Process Marks}) and then press
7613 @kbd{X u}.
7614
7615 @vindex gnus-uu-notify-files
7616 Note: When trying to decode articles that have names matching
7617 @code{gnus-uu-notify-files}, which is hard-coded to
7618 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7619 automatically post an article on @samp{comp.unix.wizards} saying that
7620 you have just viewed the file in question.  This feature can't be turned
7621 off.
7622
7623
7624 @node Shell Archives
7625 @subsection Shell Archives
7626 @cindex unshar
7627 @cindex shell archives
7628 @cindex shared articles
7629
7630 Shell archives (``shar files'') used to be a popular way to distribute
7631 sources, but it isn't used all that much today.  In any case, we have
7632 some commands to deal with these:
7633
7634 @table @kbd
7635
7636 @item X s
7637 @kindex X s (Summary)
7638 @findex gnus-uu-decode-unshar
7639 Unshars the current series (@code{gnus-uu-decode-unshar}).
7640
7641 @item X S
7642 @kindex X S (Summary)
7643 @findex gnus-uu-decode-unshar-and-save
7644 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7645
7646 @item X v s
7647 @kindex X v s (Summary)
7648 @findex gnus-uu-decode-unshar-view
7649 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7650
7651 @item X v S
7652 @kindex X v S (Summary)
7653 @findex gnus-uu-decode-unshar-and-save-view
7654 Unshars, views and saves the current series
7655 (@code{gnus-uu-decode-unshar-and-save-view}).
7656 @end table
7657
7658
7659 @node PostScript Files
7660 @subsection PostScript Files
7661 @cindex PostScript
7662
7663 @table @kbd
7664
7665 @item X p
7666 @kindex X p (Summary)
7667 @findex gnus-uu-decode-postscript
7668 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7669
7670 @item X P
7671 @kindex X P (Summary)
7672 @findex gnus-uu-decode-postscript-and-save
7673 Unpack and save the current PostScript series
7674 (@code{gnus-uu-decode-postscript-and-save}).
7675
7676 @item X v p
7677 @kindex X v p (Summary)
7678 @findex gnus-uu-decode-postscript-view
7679 View the current PostScript series
7680 (@code{gnus-uu-decode-postscript-view}).
7681
7682 @item X v P
7683 @kindex X v P (Summary)
7684 @findex gnus-uu-decode-postscript-and-save-view
7685 View and save the current PostScript series
7686 (@code{gnus-uu-decode-postscript-and-save-view}).
7687 @end table
7688
7689
7690 @node Other Files
7691 @subsection Other Files
7692
7693 @table @kbd
7694 @item X o
7695 @kindex X o (Summary)
7696 @findex gnus-uu-decode-save
7697 Save the current series
7698 (@code{gnus-uu-decode-save}).
7699
7700 @item X b
7701 @kindex X b (Summary)
7702 @findex gnus-uu-decode-binhex
7703 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7704 doesn't really work yet.
7705 @end table
7706
7707
7708 @node Decoding Variables
7709 @subsection Decoding Variables
7710
7711 Adjective, not verb.
7712
7713 @menu
7714 * Rule Variables::              Variables that say how a file is to be viewed.
7715 * Other Decode Variables::      Other decode variables.
7716 * Uuencoding and Posting::      Variables for customizing uuencoding.
7717 @end menu
7718
7719
7720 @node Rule Variables
7721 @subsubsection Rule Variables
7722 @cindex rule variables
7723
7724 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7725 variables are of the form
7726
7727 @lisp
7728       (list '(regexp1 command2)
7729             '(regexp2 command2)
7730             ...)
7731 @end lisp
7732
7733 @table @code
7734
7735 @item gnus-uu-user-view-rules
7736 @vindex gnus-uu-user-view-rules
7737 @cindex sox
7738 This variable is consulted first when viewing files.  If you wish to use,
7739 for instance, @code{sox} to convert an @file{.au} sound file, you could
7740 say something like:
7741 @lisp
7742 (setq gnus-uu-user-view-rules
7743       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7744 @end lisp
7745
7746 @item gnus-uu-user-view-rules-end
7747 @vindex gnus-uu-user-view-rules-end
7748 This variable is consulted if Gnus couldn't make any matches from the
7749 user and default view rules.
7750
7751 @item gnus-uu-user-archive-rules
7752 @vindex gnus-uu-user-archive-rules
7753 This variable can be used to say what commands should be used to unpack
7754 archives.
7755 @end table
7756
7757
7758 @node Other Decode Variables
7759 @subsubsection Other Decode Variables
7760
7761 @table @code
7762 @vindex gnus-uu-grabbed-file-functions
7763
7764 @item gnus-uu-grabbed-file-functions
7765 All functions in this list will be called right after each file has been
7766 successfully decoded---so that you can move or view files right away,
7767 and don't have to wait for all files to be decoded before you can do
7768 anything.  Ready-made functions you can put in this list are:
7769
7770 @table @code
7771
7772 @item gnus-uu-grab-view
7773 @findex gnus-uu-grab-view
7774 View the file.
7775
7776 @item gnus-uu-grab-move
7777 @findex gnus-uu-grab-move
7778 Move the file (if you're using a saving function.)
7779 @end table
7780
7781 @item gnus-uu-be-dangerous
7782 @vindex gnus-uu-be-dangerous
7783 Specifies what to do if unusual situations arise during decoding.  If
7784 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7785 that didn't work, and overwrite existing files.  Otherwise, ask each
7786 time.
7787
7788 @item gnus-uu-ignore-files-by-name
7789 @vindex gnus-uu-ignore-files-by-name
7790 Files with name matching this regular expression won't be viewed.
7791
7792 @item gnus-uu-ignore-files-by-type
7793 @vindex gnus-uu-ignore-files-by-type
7794 Files with a @acronym{MIME} type matching this variable won't be viewed.
7795 Note that Gnus tries to guess what type the file is based on the name.
7796 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
7797 kludgey.
7798
7799 @item gnus-uu-tmp-dir
7800 @vindex gnus-uu-tmp-dir
7801 Where @code{gnus-uu} does its work.
7802
7803 @item gnus-uu-do-not-unpack-archives
7804 @vindex gnus-uu-do-not-unpack-archives
7805 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7806 looking for files to display.
7807
7808 @item gnus-uu-view-and-save
7809 @vindex gnus-uu-view-and-save
7810 Non-@code{nil} means that the user will always be asked to save a file
7811 after viewing it.
7812
7813 @item gnus-uu-ignore-default-view-rules
7814 @vindex gnus-uu-ignore-default-view-rules
7815 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7816 rules.
7817
7818 @item gnus-uu-ignore-default-archive-rules
7819 @vindex gnus-uu-ignore-default-archive-rules
7820 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7821 unpacking commands.
7822
7823 @item gnus-uu-kill-carriage-return
7824 @vindex gnus-uu-kill-carriage-return
7825 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7826 from articles.
7827
7828 @item gnus-uu-unmark-articles-not-decoded
7829 @vindex gnus-uu-unmark-articles-not-decoded
7830 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7831 decoded articles as unread.
7832
7833 @item gnus-uu-correct-stripped-uucode
7834 @vindex gnus-uu-correct-stripped-uucode
7835 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7836 uuencoded files that have had trailing spaces deleted.
7837
7838 @item gnus-uu-pre-uudecode-hook
7839 @vindex gnus-uu-pre-uudecode-hook
7840 Hook run before sending a message to @code{uudecode}.
7841
7842 @item gnus-uu-view-with-metamail
7843 @vindex gnus-uu-view-with-metamail
7844 @cindex metamail
7845 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7846 commands defined by the rule variables and just fudge a @acronym{MIME}
7847 content type based on the file name.  The result will be fed to
7848 @code{metamail} for viewing.
7849
7850 @item gnus-uu-save-in-digest
7851 @vindex gnus-uu-save-in-digest
7852 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7853 decoding, will save in digests.  If this variable is @code{nil},
7854 @code{gnus-uu} will just save everything in a file without any
7855 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7856 to specify any meaningful volume and issue numbers were found, so I
7857 simply dropped them.
7858
7859 @end table
7860
7861
7862 @node Uuencoding and Posting
7863 @subsubsection Uuencoding and Posting
7864
7865 @table @code
7866
7867 @item gnus-uu-post-include-before-composing
7868 @vindex gnus-uu-post-include-before-composing
7869 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7870 before you compose the article.  If this variable is @code{t}, you can
7871 either include an encoded file with @kbd{C-c C-i} or have one included
7872 for you when you post the article.
7873
7874 @item gnus-uu-post-length
7875 @vindex gnus-uu-post-length
7876 Maximum length of an article.  The encoded file will be split into how
7877 many articles it takes to post the entire file.
7878
7879 @item gnus-uu-post-threaded
7880 @vindex gnus-uu-post-threaded
7881 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7882 thread.  This may not be smart, as no other decoder I have seen is able
7883 to follow threads when collecting uuencoded articles.  (Well, I have
7884 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7885 think that counts@dots{}) Default is @code{nil}.
7886
7887 @item gnus-uu-post-separate-description
7888 @vindex gnus-uu-post-separate-description
7889 Non-@code{nil} means that the description will be posted in a separate
7890 article.  The first article will typically be numbered (0/x).  If this
7891 variable is @code{nil}, the description the user enters will be included
7892 at the beginning of the first article, which will be numbered (1/x).
7893 Default is @code{t}.
7894
7895 @end table
7896
7897
7898 @node Viewing Files
7899 @subsection Viewing Files
7900 @cindex viewing files
7901 @cindex pseudo-articles
7902
7903 After decoding, if the file is some sort of archive, Gnus will attempt
7904 to unpack the archive and see if any of the files in the archive can be
7905 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7906 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
7907 uncompress and de-tar the main file, and then view the two pictures.
7908 This unpacking process is recursive, so if the archive contains archives
7909 of archives, it'll all be unpacked.
7910
7911 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
7912 extracted file into the summary buffer.  If you go to these
7913 ``articles'', you will be prompted for a command to run (usually Gnus
7914 will make a suggestion), and then the command will be run.
7915
7916 @vindex gnus-view-pseudo-asynchronously
7917 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
7918 until the viewing is done before proceeding.
7919
7920 @vindex gnus-view-pseudos
7921 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
7922 the pseudo-articles into the summary buffer, but view them
7923 immediately.  If this variable is @code{not-confirm}, the user won't even
7924 be asked for a confirmation before viewing is done.
7925
7926 @vindex gnus-view-pseudos-separately
7927 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
7928 pseudo-article will be created for each file to be viewed.  If
7929 @code{nil}, all files that use the same viewing command will be given as
7930 a list of parameters to that command.
7931
7932 @vindex gnus-insert-pseudo-articles
7933 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
7934 pseudo-articles when decoding.  It is @code{t} by default.
7935
7936 So; there you are, reading your @emph{pseudo-articles} in your
7937 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
7938 Why isn't anything real anymore? How did we get here?
7939
7940
7941 @node Article Treatment
7942 @section Article Treatment
7943
7944 Reading through this huge manual, you may have quite forgotten that the
7945 object of newsreaders is to actually, like, read what people have
7946 written.  Reading articles.  Unfortunately, people are quite bad at
7947 writing, so there are tons of functions and variables to make reading
7948 these articles easier.
7949
7950 @menu
7951 * Article Highlighting::        You want to make the article look like fruit salad.
7952 * Article Fontisizing::         Making emphasized text look nice.
7953 * Article Hiding::              You also want to make certain info go away.
7954 * Article Washing::             Lots of way-neat functions to make life better.
7955 * Article Header::              Doing various header transformations.
7956 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
7957 * Article Button Levels::       Controlling appearance of buttons.
7958 * Article Date::                Grumble, UT!
7959 * Article Display::             Display various stuff---X-Face, Picons, Smileys
7960 * Article Signature::           What is a signature?
7961 * Article Miscellanea::         Various other stuff.
7962 @end menu
7963
7964
7965 @node Article Highlighting
7966 @subsection Article Highlighting
7967 @cindex highlighting
7968
7969 Not only do you want your article buffer to look like fruit salad, but
7970 you want it to look like technicolor fruit salad.
7971
7972 @table @kbd
7973
7974 @item W H a
7975 @kindex W H a (Summary)
7976 @findex gnus-article-highlight
7977 @findex gnus-article-maybe-highlight
7978 Do much highlighting of the current article
7979 (@code{gnus-article-highlight}).  This function highlights header, cited
7980 text, the signature, and adds buttons to the body and the head.
7981
7982 @item W H h
7983 @kindex W H h (Summary)
7984 @findex gnus-article-highlight-headers
7985 @vindex gnus-header-face-alist
7986 Highlight the headers (@code{gnus-article-highlight-headers}).  The
7987 highlighting will be done according to the @code{gnus-header-face-alist}
7988 variable, which is a list where each element has the form
7989 @code{(@var{regexp} @var{name} @var{content})}.
7990 @var{regexp} is a regular expression for matching the
7991 header, @var{name} is the face used for highlighting the header name
7992 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
7993 the header value.  The first match made will be used.  Note that
7994 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
7995
7996 @item W H c
7997 @kindex W H c (Summary)
7998 @findex gnus-article-highlight-citation
7999 Highlight cited text (@code{gnus-article-highlight-citation}).
8000
8001 Some variables to customize the citation highlights:
8002
8003 @table @code
8004 @vindex gnus-cite-parse-max-size
8005
8006 @item gnus-cite-parse-max-size
8007 If the article size if bigger than this variable (which is 25000 by
8008 default), no citation highlighting will be performed.
8009
8010 @item gnus-cite-max-prefix
8011 @vindex gnus-cite-max-prefix
8012 Maximum possible length for a citation prefix (default 20).
8013
8014 @item gnus-cite-face-list
8015 @vindex gnus-cite-face-list
8016 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
8017 When there are citations from multiple articles in the same message,
8018 Gnus will try to give each citation from each article its own face.
8019 This should make it easier to see who wrote what.
8020
8021 @item gnus-supercite-regexp
8022 @vindex gnus-supercite-regexp
8023 Regexp matching normal Supercite attribution lines.
8024
8025 @item gnus-supercite-secondary-regexp
8026 @vindex gnus-supercite-secondary-regexp
8027 Regexp matching mangled Supercite attribution lines.
8028
8029 @item gnus-cite-minimum-match-count
8030 @vindex gnus-cite-minimum-match-count
8031 Minimum number of identical prefixes we have to see before we believe
8032 that it's a citation.
8033
8034 @item gnus-cite-attribution-prefix
8035 @vindex gnus-cite-attribution-prefix
8036 Regexp matching the beginning of an attribution line.
8037
8038 @item gnus-cite-attribution-suffix
8039 @vindex gnus-cite-attribution-suffix
8040 Regexp matching the end of an attribution line.
8041
8042 @item gnus-cite-attribution-face
8043 @vindex gnus-cite-attribution-face
8044 Face used for attribution lines.  It is merged with the face for the
8045 cited text belonging to the attribution.
8046
8047 @end table
8048
8049
8050 @item W H s
8051 @kindex W H s (Summary)
8052 @vindex gnus-signature-separator
8053 @vindex gnus-signature-face
8054 @findex gnus-article-highlight-signature
8055 Highlight the signature (@code{gnus-article-highlight-signature}).
8056 Everything after @code{gnus-signature-separator} (@pxref{Article
8057 Signature}) in an article will be considered a signature and will be
8058 highlighted with @code{gnus-signature-face}, which is @code{italic} by
8059 default.
8060
8061 @end table
8062
8063 @xref{Customizing Articles}, for how to highlight articles automatically.
8064
8065
8066 @node Article Fontisizing
8067 @subsection Article Fontisizing
8068 @cindex emphasis
8069 @cindex article emphasis
8070
8071 @findex gnus-article-emphasize
8072 @kindex W e (Summary)
8073 People commonly add emphasis to words in news articles by writing things
8074 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
8075 this look nicer by running the article through the @kbd{W e}
8076 (@code{gnus-article-emphasize}) command.
8077
8078 @vindex gnus-emphasis-alist
8079 How the emphasis is computed is controlled by the
8080 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8081 element is a regular expression to be matched.  The second is a number
8082 that says what regular expression grouping is used to find the entire
8083 emphasized word.  The third is a number that says what regexp grouping
8084 should be displayed and highlighted.  (The text between these two
8085 groupings will be hidden.)  The fourth is the face used for
8086 highlighting.
8087
8088 @lisp
8089 (setq gnus-emphasis-alist
8090       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8091         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8092 @end lisp
8093
8094 @cindex slash
8095 @cindex asterisk
8096 @cindex underline
8097 @cindex /
8098 @cindex *
8099
8100 @vindex gnus-emphasis-underline
8101 @vindex gnus-emphasis-bold
8102 @vindex gnus-emphasis-italic
8103 @vindex gnus-emphasis-underline-bold
8104 @vindex gnus-emphasis-underline-italic
8105 @vindex gnus-emphasis-bold-italic
8106 @vindex gnus-emphasis-underline-bold-italic
8107 By default, there are seven rules, and they use the following faces:
8108 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8109 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8110 @code{gnus-emphasis-underline-italic},
8111 @code{gnus-emphasis-underline-bold}, and
8112 @code{gnus-emphasis-underline-bold-italic}.
8113
8114 If you want to change these faces, you can either use @kbd{M-x
8115 customize}, or you can use @code{copy-face}.  For instance, if you want
8116 to make @code{gnus-emphasis-italic} use a red face instead, you could
8117 say something like:
8118
8119 @lisp
8120 (copy-face 'red 'gnus-emphasis-italic)
8121 @end lisp
8122
8123 @vindex gnus-group-highlight-words-alist
8124
8125 If you want to highlight arbitrary words, you can use the
8126 @code{gnus-group-highlight-words-alist} variable, which uses the same
8127 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8128 parameter (@pxref{Group Parameters}) can also be used.
8129
8130 @xref{Customizing Articles}, for how to fontize articles automatically.
8131
8132
8133 @node Article Hiding
8134 @subsection Article Hiding
8135 @cindex article hiding
8136
8137 Or rather, hiding certain things in each article.  There usually is much
8138 too much cruft in most articles.
8139
8140 @table @kbd
8141
8142 @item W W a
8143 @kindex W W a (Summary)
8144 @findex gnus-article-hide
8145 Do quite a lot of hiding on the article buffer
8146 (@kbd{gnus-article-hide}).  In particular, this function will hide
8147 headers, @acronym{PGP}, cited text and the signature.
8148
8149 @item W W h
8150 @kindex W W h (Summary)
8151 @findex gnus-article-hide-headers
8152 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8153 Headers}.
8154
8155 @item W W b
8156 @kindex W W b (Summary)
8157 @findex gnus-article-hide-boring-headers
8158 Hide headers that aren't particularly interesting
8159 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8160
8161 @item W W s
8162 @kindex W W s (Summary)
8163 @findex gnus-article-hide-signature
8164 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8165 Signature}.
8166
8167 @item W W l
8168 @kindex W W l (Summary)
8169 @findex gnus-article-hide-list-identifiers
8170 @vindex gnus-list-identifiers
8171 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8172 are strings some mailing list servers add to the beginning of all
8173 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8174 @samp{Re: } is skipped before stripping. @code{gnus-list-identifiers}
8175 may not contain @code{\\(..\\)}.
8176
8177 @table @code
8178
8179 @item gnus-list-identifiers
8180 @vindex gnus-list-identifiers
8181 A regular expression that matches list identifiers to be removed from
8182 subject.  This can also be a list of regular expressions.
8183
8184 @end table
8185
8186 @item W W P
8187 @kindex W W P (Summary)
8188 @findex gnus-article-hide-pem
8189 Hide @acronym{PEM} (privacy enhanced messages) cruft
8190 (@code{gnus-article-hide-pem}).
8191
8192 @item W W B
8193 @kindex W W B (Summary)
8194 @findex gnus-article-strip-banner
8195 @vindex gnus-article-banner-alist
8196 @vindex gnus-article-address-banner-alist
8197 @cindex banner
8198 @cindex OneList
8199 @cindex stripping advertisements
8200 @cindex advertisements
8201 Strip the banner specified by the @code{banner} group parameter
8202 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8203 annoying banners and/or signatures that some mailing lists and moderated
8204 groups adds to all the messages.  The way to use this function is to add
8205 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8206 group you want banners stripped from.  The parameter either be a string,
8207 which will be interpreted as a regular expression matching text to be
8208 removed, or the symbol @code{signature}, meaning that the (last)
8209 signature should be removed, or other symbol, meaning that the
8210 corresponding regular expression in @code{gnus-article-banner-alist} is
8211 used.
8212
8213 Regardless of a group, you can hide things like advertisements only when
8214 the sender of an article has a certain mail address specified in
8215 @code{gnus-article-address-banner-alist}.
8216
8217 @table @code
8218
8219 @item gnus-article-address-banner-alist
8220 @vindex gnus-article-address-banner-alist
8221 Alist of mail addresses and banners.  Each element has the form
8222 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
8223 matching a mail address in the From header, @var{banner} is one of a
8224 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
8225 a regexp and @code{nil}.  If @var{address} matches author's mail
8226 address, it will remove things like advertisements.  For example, if a
8227 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
8228 banner something like @samp{Do You Yoo-hoo!?} in all articles he
8229 sends, you can use the following element to remove them:
8230
8231 @lisp
8232 ("@@yoo-hoo\\.co\\.jp\\'" . 
8233  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8234 @end lisp
8235
8236 @end table
8237
8238 @item W W c
8239 @kindex W W c (Summary)
8240 @findex gnus-article-hide-citation
8241 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8242 customizing the hiding:
8243
8244 @table @code
8245
8246 @item gnus-cited-opened-text-button-line-format
8247 @itemx gnus-cited-closed-text-button-line-format
8248 @vindex gnus-cited-closed-text-button-line-format
8249 @vindex gnus-cited-opened-text-button-line-format
8250 Gnus adds buttons to show where the cited text has been hidden, and to
8251 allow toggle hiding the text.  The format of the variable is specified
8252 by these format-like variable (@pxref{Formatting Variables}).  These
8253 specs are valid:
8254
8255 @table @samp
8256 @item b
8257 Starting point of the hidden text.
8258 @item e
8259 Ending point of the hidden text.
8260 @item l
8261 Number of characters in the hidden region.
8262 @item n
8263 Number of lines of hidden text.
8264 @end table
8265
8266 @item gnus-cited-lines-visible
8267 @vindex gnus-cited-lines-visible
8268 The number of lines at the beginning of the cited text to leave
8269 shown. This can also be a cons cell with the number of lines at the top
8270 and bottom of the text, respectively, to remain visible.
8271
8272 @end table
8273
8274 @item W W C-c
8275 @kindex W W C-c (Summary)
8276 @findex gnus-article-hide-citation-maybe
8277
8278 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8279 following two variables:
8280
8281 @table @code
8282 @item gnus-cite-hide-percentage
8283 @vindex gnus-cite-hide-percentage
8284 If the cited text is of a bigger percentage than this variable (default
8285 50), hide the cited text.
8286
8287 @item gnus-cite-hide-absolute
8288 @vindex gnus-cite-hide-absolute
8289 The cited text must have at least this length (default 10) before it
8290 is hidden.
8291 @end table
8292
8293 @item W W C
8294 @kindex W W C (Summary)
8295 @findex gnus-article-hide-citation-in-followups
8296 Hide cited text in articles that aren't roots
8297 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8298 useful as an interactive command, but might be a handy function to stick
8299 have happen automatically (@pxref{Customizing Articles}).
8300
8301 @end table
8302
8303 All these ``hiding'' commands are toggles, but if you give a negative
8304 prefix to these commands, they will show what they have previously
8305 hidden.  If you give a positive prefix, they will always hide.
8306
8307 Also @pxref{Article Highlighting} for further variables for
8308 citation customization.
8309
8310 @xref{Customizing Articles}, for how to hide article elements
8311 automatically.
8312
8313
8314 @node Article Washing
8315 @subsection Article Washing
8316 @cindex washing
8317 @cindex article washing
8318
8319 We call this ``article washing'' for a really good reason.  Namely, the
8320 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8321
8322 @dfn{Washing} is defined by us as ``changing something from something to
8323 something else'', but normally results in something looking better.
8324 Cleaner, perhaps.
8325
8326 @xref{Customizing Articles}, if you want to change how Gnus displays
8327 articles by default.
8328
8329 @table @kbd
8330
8331 @item C-u g
8332 This is not really washing, it's sort of the opposite of washing.  If
8333 you type this, you see the article exactly as it exists on disk or on
8334 the server.
8335
8336 @item g
8337 Force redisplaying of the current article
8338 (@code{gnus-summary-show-article}).  This is also not really washing.
8339 If you type this, you see the article without any previously applied
8340 interactive Washing functions but with all default treatments
8341 (@pxref{Customizing Articles}).
8342
8343 @item W l
8344 @kindex W l (Summary)
8345 @findex gnus-summary-stop-page-breaking
8346 Remove page breaks from the current article
8347 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8348 delimiters.
8349
8350 @item W r
8351 @kindex W r (Summary)
8352 @findex gnus-summary-caesar-message
8353 @c @icon{gnus-summary-caesar-message}
8354 Do a Caesar rotate (rot13) on the article buffer
8355 (@code{gnus-summary-caesar-message}).
8356 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8357 (Typically offensive jokes and such.)
8358
8359 It's commonly called ``rot13'' because each letter is rotated 13
8360 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8361 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8362 is rumored to have employed this form of, uh, somewhat weak encryption.
8363
8364 @item W m
8365 @kindex W m (Summary)
8366 @findex gnus-summary-morse-message
8367 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8368
8369 @item W t
8370 @item t
8371 @kindex W t (Summary)
8372 @kindex t (Summary)
8373 @findex gnus-summary-toggle-header
8374 Toggle whether to display all headers in the article buffer
8375 (@code{gnus-summary-toggle-header}).
8376
8377 @item W v
8378 @kindex W v (Summary)
8379 @findex gnus-summary-verbose-headers
8380 Toggle whether to display all headers in the article buffer permanently
8381 (@code{gnus-summary-verbose-headers}).
8382
8383 @item W o
8384 @kindex W o (Summary)
8385 @findex gnus-article-treat-overstrike
8386 Treat overstrike (@code{gnus-article-treat-overstrike}).
8387
8388 @item W d
8389 @kindex W d (Summary)
8390 @findex gnus-article-treat-dumbquotes
8391 @vindex gnus-article-dumbquotes-map
8392 @cindex Smartquotes
8393 @cindex M****s*** sm*rtq**t*s
8394 @cindex Latin 1
8395 Treat M****s*** sm*rtq**t*s according to
8396 @code{gnus-article-dumbquotes-map}
8397 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8398 whether a character is a sm*rtq**t* or not, so it should only be used
8399 interactively.
8400
8401 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8402 an attempt to provide more quoting characters.  If you see something
8403 like @code{\222} or @code{\264} where you're expecting some kind of
8404 apostrophe or quotation mark, then try this wash.
8405
8406 @item W Y f
8407 @kindex W Y f (Summary)
8408 @findex gnus-article-outlook-deuglify-article
8409 @cindex Outlook Express
8410 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
8411 unwrap lines, repair attribution and rearrange citation.
8412 (@code{gnus-article-outlook-deuglify-article}).
8413
8414 @item W Y u
8415 @kindex W Y u (Summary)
8416 @findex gnus-article-outlook-unwrap-lines
8417 @vindex gnus-outlook-deuglify-unwrap-min
8418 @vindex gnus-outlook-deuglify-unwrap-max
8419 Unwrap lines that appear to be wrapped citation lines.  You can control
8420 what lines will be unwrapped by frobbing
8421 @code{gnus-outlook-deuglify-unwrap-min} and
8422 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
8423 maximum length of an unwrapped citation line.
8424 (@code{gnus-article-outlook-unwrap-lines}).
8425
8426 @item W Y a
8427 @kindex W Y a (Summary)
8428 @findex gnus-article-outlook-repair-attribution
8429 Repair a broken attribution line.@*
8430 (@code{gnus-article-outlook-repair-attribution}).
8431
8432 @item W Y c
8433 @kindex W Y c (Summary)
8434 @findex gnus-article-outlook-rearrange-citation
8435 Repair broken citations by rearranging the text.
8436 (@code{gnus-article-outlook-rearrange-citation}).
8437
8438 @item W w
8439 @kindex W w (Summary)
8440 @findex gnus-article-fill-cited-article
8441 Do word wrap (@code{gnus-article-fill-cited-article}).
8442
8443 You can give the command a numerical prefix to specify the width to use
8444 when filling.
8445
8446 @item W Q
8447 @kindex W Q (Summary)
8448 @findex gnus-article-fill-long-lines
8449 Fill long lines (@code{gnus-article-fill-long-lines}).
8450
8451 @item W C
8452 @kindex W C (Summary)
8453 @findex gnus-article-capitalize-sentences
8454 Capitalize the first word in each sentence
8455 (@code{gnus-article-capitalize-sentences}).
8456
8457 @item W c
8458 @kindex W c (Summary)
8459 @findex gnus-article-remove-cr
8460 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8461 (this takes care of DOS line endings), and then translate any remaining
8462 CRs into LF (this takes care of Mac line endings)
8463 (@code{gnus-article-remove-cr}).
8464
8465 @item W q
8466 @kindex W q (Summary)
8467 @findex gnus-article-de-quoted-unreadable
8468 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
8469 Quoted-Printable is one common @acronym{MIME} encoding employed when
8470 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
8471 makes strings like @samp{déjà vu} look like @samp{d=E9j=E0 vu}, which
8472 doesn't look very readable to me.  Note that this is usually done
8473 automatically by Gnus if the message in question has a
8474 @code{Content-Transfer-Encoding} header that says that this encoding
8475 has been done.  If a prefix is given, a charset will be asked for.
8476
8477 @item W 6
8478 @kindex W 6 (Summary)
8479 @findex gnus-article-de-base64-unreadable
8480 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
8481 one common @acronym{MIME} encoding employed when sending
8482 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
8483 usually done automatically by Gnus if the message in question has a
8484 @code{Content-Transfer-Encoding} header that says that this encoding
8485 has been done.  If a prefix is given, a charset will be asked for.
8486
8487 @item W Z
8488 @kindex W Z (Summary)
8489 @findex gnus-article-decode-HZ
8490 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8491 common encoding employed when sending Chinese articles.  It typically
8492 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8493
8494 @item W u
8495 @kindex W u (Summary)
8496 @findex gnus-article-unsplit-urls
8497 Remove newlines from within URLs.  Some mailers insert newlines into
8498 outgoing email messages to keep lines short.  This reformatting can
8499 split long URLs onto multiple lines.  Repair those URLs by removing
8500 the newlines (@code{gnus-article-unsplit-urls}).
8501
8502 @item W h
8503 @kindex W h (Summary)
8504 @findex gnus-article-wash-html
8505 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
8506 usually done automatically by Gnus if the message in question has a
8507 @code{Content-Type} header that says that the message is @acronym{HTML}.
8508
8509 If a prefix is given, a charset will be asked for.
8510
8511 @vindex gnus-article-wash-function
8512 The default is to use the function specified by
8513 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
8514 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
8515 @acronym{HTML}, but this is controlled by the
8516 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8517 can use include:
8518
8519 @table @code
8520 @item w3
8521 Use Emacs/w3.
8522
8523 @item w3m
8524 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
8525
8526 @item links
8527 Use @uref{http://links.sf.net/, Links}.
8528
8529 @item lynx
8530 Use @uref{http://lynx.isc.org/, Lynx}.
8531
8532 @item html2text
8533 Use html2text---a simple @acronym{HTML} converter included with Gnus.
8534
8535 @end table
8536
8537 @item W b
8538 @kindex W b (Summary)
8539 @findex gnus-article-add-buttons
8540 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8541 @xref{Article Buttons}.
8542
8543 @item W B
8544 @kindex W B (Summary)
8545 @findex gnus-article-add-buttons-to-head
8546 Add clickable buttons to the article headers
8547 (@code{gnus-article-add-buttons-to-head}).
8548
8549 @item W p
8550 @kindex W p (Summary)
8551 @findex gnus-article-verify-x-pgp-sig
8552 Verify a signed control message
8553 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
8554 @code{newgroup} and @code{checkgroups} are usually signed by the
8555 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
8556 the maintainer to your keyring to verify the
8557 message.@footnote{@acronym{PGP} keys for many hierarchies are
8558 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8559
8560 @item W s
8561 @kindex W s (Summary)
8562 @findex gnus-summary-force-verify-and-decrypt
8563 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
8564 @acronym{S/MIME}) message
8565 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8566
8567 @item W a
8568 @kindex W a (Summary)
8569 @findex gnus-article-strip-headers-in-body
8570 Strip headers like the @code{X-No-Archive} header from the beginning of
8571 article bodies (@code{gnus-article-strip-headers-in-body}).
8572
8573 @item W E l
8574 @kindex W E l (Summary)
8575 @findex gnus-article-strip-leading-blank-lines
8576 Remove all blank lines from the beginning of the article
8577 (@code{gnus-article-strip-leading-blank-lines}).
8578
8579 @item W E m
8580 @kindex W E m (Summary)
8581 @findex gnus-article-strip-multiple-blank-lines
8582 Replace all blank lines with empty lines and then all multiple empty
8583 lines with a single empty line.
8584 (@code{gnus-article-strip-multiple-blank-lines}).
8585
8586 @item W E t
8587 @kindex W E t (Summary)
8588 @findex gnus-article-remove-trailing-blank-lines
8589 Remove all blank lines at the end of the article
8590 (@code{gnus-article-remove-trailing-blank-lines}).
8591
8592 @item W E a
8593 @kindex W E a (Summary)
8594 @findex gnus-article-strip-blank-lines
8595 Do all the three commands above
8596 (@code{gnus-article-strip-blank-lines}).
8597
8598 @item W E A
8599 @kindex W E A (Summary)
8600 @findex gnus-article-strip-all-blank-lines
8601 Remove all blank lines
8602 (@code{gnus-article-strip-all-blank-lines}).
8603
8604 @item W E s
8605 @kindex W E s (Summary)
8606 @findex gnus-article-strip-leading-space
8607 Remove all white space from the beginning of all lines of the article
8608 body (@code{gnus-article-strip-leading-space}).
8609
8610 @item W E e
8611 @kindex W E e (Summary)
8612 @findex gnus-article-strip-trailing-space
8613 Remove all white space from the end of all lines of the article
8614 body (@code{gnus-article-strip-trailing-space}).
8615
8616 @end table
8617
8618 @xref{Customizing Articles}, for how to wash articles automatically.
8619
8620
8621 @node Article Header
8622 @subsection Article Header
8623
8624 These commands perform various transformations of article header.
8625
8626 @table @kbd
8627
8628 @item W G u
8629 @kindex W G u (Summary)
8630 @findex gnus-article-treat-unfold-headers
8631 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8632
8633 @item W G n
8634 @kindex W G n (Summary)
8635 @findex gnus-article-treat-fold-newsgroups
8636 Fold the @code{Newsgroups} and @code{Followup-To} headers
8637 (@code{gnus-article-treat-fold-newsgroups}).
8638
8639 @item W G f
8640 @kindex W G f (Summary)
8641 @findex gnus-article-treat-fold-headers
8642 Fold all the message headers
8643 (@code{gnus-article-treat-fold-headers}).
8644
8645 @item W E w
8646 @kindex W E w
8647 @findex gnus-article-remove-leading-whitespace
8648 Remove excessive whitespace from all headers
8649 (@code{gnus-article-remove-leading-whitespace}).
8650
8651 @end table
8652
8653
8654 @node Article Buttons
8655 @subsection Article Buttons
8656 @cindex buttons
8657
8658 People often include references to other stuff in articles, and it would
8659 be nice if Gnus could just fetch whatever it is that people talk about
8660 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8661 button on these references.
8662
8663 @vindex gnus-button-man-handler
8664 Gnus adds @dfn{buttons} to certain standard references by default:
8665 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
8666 Emacs or Gnus related references.  This is controlled by two variables,
8667 one that handles article bodies and one that handles article heads:
8668
8669 @table @code
8670
8671 @item gnus-button-alist
8672 @vindex gnus-button-alist
8673 This is an alist where each entry has this form:
8674
8675 @lisp
8676 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8677 @end lisp
8678
8679 @table @var
8680
8681 @item regexp
8682 All text that match this regular expression (case insensitive) will be
8683 considered an external reference.  Here's a typical regexp that matches
8684 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8685 variable containing a regexp, useful variables to use include
8686 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
8687
8688 @item button-par
8689 Gnus has to know which parts of the matches is to be highlighted.  This
8690 is a number that says what sub-expression of the regexp is to be
8691 highlighted.  If you want it all highlighted, you use 0 here.
8692
8693 @item use-p
8694 This form will be @code{eval}ed, and if the result is non-@code{nil},
8695 this is considered a match.  This is useful if you want extra sifting to
8696 avoid false matches.  Often variables named
8697 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
8698 Levels}, but any other form may be used too.
8699
8700 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
8701
8702 @item function
8703 This function will be called when you click on this button.
8704
8705 @item data-par
8706 As with @var{button-par}, this is a sub-expression number, but this one
8707 says which part of the match is to be sent as data to @var{function}.
8708
8709 @end table
8710
8711 So the full entry for buttonizing URLs is then
8712
8713 @lisp
8714 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8715 @end lisp
8716
8717 @item gnus-header-button-alist
8718 @vindex gnus-header-button-alist
8719 This is just like the other alist, except that it is applied to the
8720 article head only, and that each entry has an additional element that is
8721 used to say what headers to apply the buttonize coding to:
8722
8723 @lisp
8724 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8725 @end lisp
8726
8727 @var{header} is a regular expression.
8728 @end table
8729
8730 @subsubsection Related variables and functions
8731
8732 @table @code
8733 @item gnus-button-@var{*}-level
8734 @xref{Article Button Levels}.
8735
8736 @c Stuff related to gnus-button-browse-level
8737
8738 @item gnus-button-url-regexp
8739 @vindex gnus-button-url-regexp
8740 A regular expression that matches embedded URLs.  It is used in the
8741 default values of the variables above.
8742
8743 @c Stuff related to gnus-button-man-level
8744
8745 @item gnus-button-man-handler
8746 @vindex gnus-button-man-handler
8747 The function to use for displaying man pages.  It must take at least one
8748 argument with a string naming the man page.
8749
8750 @c Stuff related to gnus-button-message-level
8751
8752 @item gnus-button-mid-or-mail-regexp
8753 @vindex gnus-button-mid-or-mail-regexp
8754 Regular expression that matches a message ID or a mail address.
8755
8756 @item gnus-button-prefer-mid-or-mail
8757 @vindex gnus-button-prefer-mid-or-mail
8758 This variable determines what to do when the button on a string as
8759 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
8760 message ID or a mail address.  If it is one of the symbols @code{mid} or
8761 @code{mail}, Gnus will always assume that the string is a message ID or
8762 a mail address, respectively.  If this variable is set to the symbol
8763 @code{ask}, always query the user what do do.  If it is a function, this
8764 function will be called with the string as its only argument.  The
8765 function must return @code{mid}, @code{mail}, @code{invalid} or
8766 @code{ask}.  The default value is the function
8767 @code{gnus-button-mid-or-mail-heuristic}.
8768
8769 @item gnus-button-mid-or-mail-heuristic
8770 @findex gnus-button-mid-or-mail-heuristic
8771 Function that guesses whether its argument is a message ID or a mail
8772 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
8773 it's a mail address, @code{ask} if unsure and @code{invalid} if the
8774 string is invalid.
8775
8776 @item gnus-button-mid-or-mail-heuristic-alist
8777 @vindex gnus-button-mid-or-mail-heuristic-alist
8778 An alist of @code{(RATE . REGEXP)} pairs used by the function
8779 @code{gnus-button-mid-or-mail-heuristic}.
8780
8781 @c Stuff related to gnus-button-tex-level
8782
8783 @item gnus-button-ctan-handler
8784 @findex gnus-button-ctan-handler
8785 The function to use for displaying CTAN links.  It must take one
8786 argument, the string naming the URL.
8787
8788 @item gnus-ctan-url
8789 @vindex gnus-ctan-url
8790 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
8791 by @code{gnus-button-ctan-handler}.
8792
8793 @c Misc stuff
8794
8795 @item gnus-article-button-face
8796 @vindex gnus-article-button-face
8797 Face used on buttons.
8798
8799 @item gnus-article-mouse-face
8800 @vindex gnus-article-mouse-face
8801 Face used when the mouse cursor is over a button.
8802
8803 @end table
8804
8805 @xref{Customizing Articles}, for how to buttonize articles automatically.
8806
8807
8808 @node Article Button Levels
8809 @subsection Article button levels
8810 @cindex button levels
8811 The higher the value of the variables @code{gnus-button-@var{*}-level},
8812 the more buttons will appear.  If the level is zero, no corresponding
8813 buttons are displayed.  With the default value (which is 5) you should
8814 already see quite a lot of buttons.  With higher levels, you will see
8815 more buttons, but you may also get more false positives.  To avoid them,
8816 you can set the variables @code{gnus-button-@var{*}-level} local to
8817 specific groups (@pxref{Group Parameters}).  Here's an example for the
8818 variable @code{gnus-parameters}:
8819
8820 @lisp
8821 ;; @r{increase @code{gnus-button-*-level} in some groups:}
8822 (setq gnus-parameters
8823       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
8824         ("\\<unix\\>"               (gnus-button-man-level 10))
8825         ("\\<tex\\>"                (gnus-button-tex-level 10))))
8826 @end lisp
8827
8828 @table @code
8829
8830 @item gnus-button-browse-level
8831 @vindex gnus-button-browse-level
8832 Controls the display of references to message IDs, mail addresses and
8833 news URLs.  Related variables and functions include
8834 @code{gnus-button-url-regexp}, @code{browse-url}, and
8835 @code{browse-url-browser-function}.
8836
8837 @item gnus-button-emacs-level
8838 @vindex gnus-button-emacs-level
8839 Controls the display of Emacs or Gnus references.  Related functions are
8840 @code{gnus-button-handle-custom},
8841 @code{gnus-button-handle-describe-function},
8842 @code{gnus-button-handle-describe-variable},
8843 @code{gnus-button-handle-symbol},
8844 @code{gnus-button-handle-describe-key},
8845 @code{gnus-button-handle-apropos},
8846 @code{gnus-button-handle-apropos-command},
8847 @code{gnus-button-handle-apropos-variable},
8848 @code{gnus-button-handle-apropos-documentation}, and
8849 @code{gnus-button-handle-library}.
8850
8851 @item gnus-button-man-level
8852 @vindex gnus-button-man-level
8853 Controls the display of references to (Unix) man pages.
8854 See @code{gnus-button-man-handler}.
8855
8856 @item gnus-button-message-level
8857 @vindex gnus-button-message-level
8858 Controls the display of message IDs, mail addresses and news URLs.
8859 Related variables and functions include
8860 @code{gnus-button-mid-or-mail-regexp},
8861 @code{gnus-button-prefer-mid-or-mail},
8862 @code{gnus-button-mid-or-mail-heuristic}, and
8863 @code{gnus-button-mid-or-mail-heuristic-alist}.
8864
8865 @item gnus-button-tex-level
8866 @vindex gnus-button-tex-level
8867 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
8868 URLs.  See the variables @code{gnus-ctan-url},
8869 @code{gnus-button-ctan-handler},
8870 @code{gnus-button-ctan-directory-regexp}, and
8871 @code{gnus-button-handle-ctan-bogus-regexp}.
8872
8873 @end table
8874
8875
8876 @node Article Date
8877 @subsection Article Date
8878
8879 The date is most likely generated in some obscure timezone you've never
8880 heard of, so it's quite nice to be able to find out what the time was
8881 when the article was sent.
8882
8883 @table @kbd
8884
8885 @item W T u
8886 @kindex W T u (Summary)
8887 @findex gnus-article-date-ut
8888 Display the date in UT (aka. GMT, aka ZULU)
8889 (@code{gnus-article-date-ut}).
8890
8891 @item W T i
8892 @kindex W T i (Summary)
8893 @findex gnus-article-date-iso8601
8894 @cindex ISO 8601
8895 Display the date in international format, aka. ISO 8601
8896 (@code{gnus-article-date-iso8601}).
8897
8898 @item W T l
8899 @kindex W T l (Summary)
8900 @findex gnus-article-date-local
8901 Display the date in the local timezone (@code{gnus-article-date-local}).
8902
8903 @item W T p
8904 @kindex W T p (Summary)
8905 @findex gnus-article-date-english
8906 Display the date in a format that's easily pronounceable in English
8907 (@code{gnus-article-date-english}).
8908
8909 @item W T s
8910 @kindex W T s (Summary)
8911 @vindex gnus-article-time-format
8912 @findex gnus-article-date-user
8913 @findex format-time-string
8914 Display the date using a user-defined format
8915 (@code{gnus-article-date-user}).  The format is specified by the
8916 @code{gnus-article-time-format} variable, and is a string that's passed
8917 to @code{format-time-string}.  See the documentation of that variable
8918 for a list of possible format specs.
8919
8920 @item W T e
8921 @kindex W T e (Summary)
8922 @findex gnus-article-date-lapsed
8923 @findex gnus-start-date-timer
8924 @findex gnus-stop-date-timer
8925 Say how much time has elapsed between the article was posted and now
8926 (@code{gnus-article-date-lapsed}).  It looks something like:
8927
8928 @example
8929 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
8930 @end example
8931
8932 @vindex gnus-article-date-lapsed-new-header
8933 The value of @code{gnus-article-date-lapsed-new-header} determines
8934 whether this header will just be added below the old Date one, or will
8935 replace it.
8936
8937 An advantage of using Gnus to read mail is that it converts simple bugs
8938 into wonderful absurdities.
8939
8940 If you want to have this line updated continually, you can put
8941
8942 @lisp
8943 (gnus-start-date-timer)
8944 @end lisp
8945
8946 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
8947 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
8948 command.
8949
8950 @item W T o
8951 @kindex W T o (Summary)
8952 @findex gnus-article-date-original
8953 Display the original date (@code{gnus-article-date-original}).  This can
8954 be useful if you normally use some other conversion function and are
8955 worried that it might be doing something totally wrong.  Say, claiming
8956 that the article was posted in 1854.  Although something like that is
8957 @emph{totally} impossible.  Don't you trust me? *titter*
8958
8959 @end table
8960
8961 @xref{Customizing Articles}, for how to display the date in your
8962 preferred format automatically.
8963
8964
8965 @node Article Display
8966 @subsection Article Display
8967 @cindex picons
8968 @cindex x-face
8969 @cindex smileys
8970
8971 These commands add various frivolous display gimmicks to the article
8972 buffer in Emacs versions that support them.
8973
8974 @code{X-Face} headers are small black-and-white images supplied by the
8975 message headers (@pxref{X-Face}).
8976
8977 Picons, on the other hand, reside on your own system, and Gnus will
8978 try to match the headers to what you have (@pxref{Picons}).
8979
8980 Smileys are those little @samp{:-)} symbols that people like to litter
8981 their messages with (@pxref{Smileys}).
8982
8983 All these functions are toggles---if the elements already exist,
8984 they'll be removed.
8985
8986 @table @kbd
8987 @item W D x
8988 @kindex W D x (Summary)
8989 @findex gnus-article-display-x-face
8990 Display an @code{X-Face} in the @code{From} header.
8991 (@code{gnus-article-display-x-face}).
8992
8993 @item W D d
8994 @kindex W D d (Summary)
8995 @findex gnus-article-display-face
8996 Display a @code{Face} in the @code{From} header.
8997 (@code{gnus-article-display-face}).
8998
8999 @item W D s
9000 @kindex W D s (Summary)
9001 @findex gnus-treat-smiley
9002 Display smileys (@code{gnus-treat-smiley}).
9003
9004 @item W D f
9005 @kindex W D f (Summary)
9006 @findex gnus-treat-from-picon
9007 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
9008
9009 @item W D m
9010 @kindex W D m (Summary)
9011 @findex gnus-treat-mail-picon
9012 Piconify all mail headers (i. e., @code{Cc}, @code{To})
9013 (@code{gnus-treat-mail-picon}).
9014
9015 @item W D n
9016 @kindex W D n (Summary)
9017 @findex gnus-treat-newsgroups-picon
9018 Piconify all news headers (i. e., @code{Newsgroups} and
9019 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
9020
9021 @item W D D
9022 @kindex W D D (Summary)
9023 @findex gnus-article-remove-images
9024 Remove all images from the article buffer
9025 (@code{gnus-article-remove-images}).
9026
9027 @end table
9028
9029
9030
9031 @node Article Signature
9032 @subsection Article Signature
9033 @cindex signatures
9034 @cindex article signature
9035
9036 @vindex gnus-signature-separator
9037 Each article is divided into two parts---the head and the body.  The
9038 body can be divided into a signature part and a text part.  The variable
9039 that says what is to be considered a signature is
9040 @code{gnus-signature-separator}.  This is normally the standard
9041 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
9042 non-standard signature separators, so this variable can also be a list
9043 of regular expressions to be tested, one by one.  (Searches are done
9044 from the end of the body towards the beginning.)  One likely value is:
9045
9046 @lisp
9047 (setq gnus-signature-separator
9048       '("^-- $"         ; @r{The standard}
9049         "^-- *$"        ; @r{A common mangling}
9050         "^-------*$"    ; @r{Many people just use a looong}
9051                         ; @r{line of dashes.  Shame!}
9052         "^ *--------*$" ; @r{Double-shame!}
9053         "^________*$"   ; @r{Underscores are also popular}
9054         "^========*$")) ; @r{Pervert!}
9055 @end lisp
9056
9057 The more permissive you are, the more likely it is that you'll get false
9058 positives.
9059
9060 @vindex gnus-signature-limit
9061 @code{gnus-signature-limit} provides a limit to what is considered a
9062 signature when displaying articles.
9063
9064 @enumerate
9065 @item
9066 If it is an integer, no signature may be longer (in characters) than
9067 that integer.
9068 @item
9069 If it is a floating point number, no signature may be longer (in lines)
9070 than that number.
9071 @item
9072 If it is a function, the function will be called without any parameters,
9073 and if it returns @code{nil}, there is no signature in the buffer.
9074 @item
9075 If it is a string, it will be used as a regexp.  If it matches, the text
9076 in question is not a signature.
9077 @end enumerate
9078
9079 This variable can also be a list where the elements may be of the types
9080 listed above.  Here's an example:
9081
9082 @lisp
9083 (setq gnus-signature-limit
9084       '(200.0 "^---*Forwarded article"))
9085 @end lisp
9086
9087 This means that if there are more than 200 lines after the signature
9088 separator, or the text after the signature separator is matched by
9089 the regular expression @samp{^---*Forwarded article}, then it isn't a
9090 signature after all.
9091
9092
9093 @node Article Miscellanea
9094 @subsection Article Miscellanea
9095
9096 @table @kbd
9097 @item A t
9098 @kindex A t (Summary)
9099 @findex gnus-article-babel
9100 Translate the article from one language to another
9101 (@code{gnus-article-babel}).
9102
9103 @end table
9104
9105
9106 @node MIME Commands
9107 @section MIME Commands
9108 @cindex MIME decoding
9109 @cindex attachments
9110 @cindex viewing attachments
9111
9112 The following commands all understand the numerical prefix.  For
9113 instance, @kbd{3 b} means ``view the third @acronym{MIME} part''.
9114
9115 @table @kbd
9116 @item b
9117 @itemx K v
9118 @kindex b (Summary)
9119 @kindex K v (Summary)
9120 View the @acronym{MIME} part.
9121
9122 @item K o
9123 @kindex K o (Summary)
9124 Save the @acronym{MIME} part.
9125
9126 @item K c
9127 @kindex K c (Summary)
9128 Copy the @acronym{MIME} part.
9129
9130 @item K e
9131 @kindex K e (Summary)
9132 View the @acronym{MIME} part externally.
9133
9134 @item K i
9135 @kindex K i (Summary)
9136 View the @acronym{MIME} part internally.
9137
9138 @item K |
9139 @kindex K | (Summary)
9140 Pipe the @acronym{MIME} part to an external command.
9141 @end table
9142
9143 The rest of these @acronym{MIME} commands do not use the numerical prefix in
9144 the same manner:
9145
9146 @table @kbd
9147 @item K b
9148 @kindex K b (Summary)
9149 Make all the @acronym{MIME} parts have buttons in front of them.  This is
9150 mostly useful if you wish to save (or perform other actions) on inlined
9151 parts.
9152
9153 @item K m
9154 @kindex K m (Summary)
9155 @findex gnus-summary-repair-multipart
9156 Some multipart messages are transmitted with missing or faulty headers.
9157 This command will attempt to ``repair'' these messages so that they can
9158 be viewed in a more pleasant manner
9159 (@code{gnus-summary-repair-multipart}).
9160
9161 @item X m
9162 @kindex X m (Summary)
9163 @findex gnus-summary-save-parts
9164 Save all parts matching a @acronym{MIME} type to a directory
9165 (@code{gnus-summary-save-parts}).  Understands the process/prefix
9166 convention (@pxref{Process/Prefix}).
9167
9168 @item M-t
9169 @kindex M-t (Summary)
9170 @findex gnus-summary-toggle-display-buttonized
9171 Toggle the buttonized display of the article buffer
9172 (@code{gnus-summary-toggle-display-buttonized}).
9173
9174 @item W M w
9175 @kindex W M w (Summary)
9176 @findex gnus-article-decode-mime-words
9177 Decode RFC 2047-encoded words in the article headers
9178 (@code{gnus-article-decode-mime-words}).
9179
9180 @item W M c
9181 @kindex W M c (Summary)
9182 @findex gnus-article-decode-charset
9183 Decode encoded article bodies as well as charsets
9184 (@code{gnus-article-decode-charset}).
9185
9186 This command looks in the @code{Content-Type} header to determine the
9187 charset.  If there is no such header in the article, you can give it a
9188 prefix, which will prompt for the charset to decode as.  In regional
9189 groups where people post using some common encoding (but do not
9190 include @acronym{MIME} headers), you can set the @code{charset} group/topic
9191 parameter to the required charset (@pxref{Group Parameters}).
9192
9193 @item W M v
9194 @kindex W M v (Summary)
9195 @findex gnus-mime-view-all-parts
9196 View all the @acronym{MIME} parts in the current article
9197 (@code{gnus-mime-view-all-parts}).
9198
9199 @end table
9200
9201 Relevant variables:
9202
9203 @table @code
9204 @item gnus-ignored-mime-types
9205 @vindex gnus-ignored-mime-types
9206 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9207 this list will be completely ignored by Gnus.  The default value is
9208 @code{nil}.
9209
9210 To have all Vcards be ignored, you'd say something like this:
9211
9212 @lisp
9213 (setq gnus-ignored-mime-types
9214       '("text/x-vcard"))
9215 @end lisp
9216
9217 @item gnus-article-loose-mime
9218 @vindex gnus-article-loose-mime
9219 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
9220 before interpreting the message as a @acronym{MIME} message.  This helps
9221 when reading messages from certain broken mail user agents.  The
9222 default is @code{nil}.
9223
9224 @item gnus-article-emulate-mime
9225 @vindex gnus-article-emulate-mime
9226 There are other, non-@acronym{MIME} encoding methods used.  The most common
9227 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9228 this variable is non-@code{nil}, Gnus will look in message bodies to
9229 see if it finds these encodings, and if so, it'll run them through the
9230 Gnus @acronym{MIME} machinery.  The default is @code{t}.
9231
9232 @item gnus-unbuttonized-mime-types
9233 @vindex gnus-unbuttonized-mime-types
9234 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9235 this list won't have @acronym{MIME} buttons inserted unless they aren't
9236 displayed or this variable is overridden by
9237 @code{gnus-buttonized-mime-types}.  The default value is
9238 @code{(".*/.*")}.  This variable is only used when
9239 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
9240
9241 @item gnus-buttonized-mime-types
9242 @vindex gnus-buttonized-mime-types
9243 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9244 this list will have @acronym{MIME} buttons inserted unless they aren't
9245 displayed.  This variable overrides
9246 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9247 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9248 is @code{nil}.
9249
9250 To see e.g. security buttons but no other buttons, you could set this
9251 variable to @code{("multipart/signed")} and leave
9252 @code{gnus-unbuttonized-mime-types} at the default value.
9253
9254 @item gnus-inhibit-mime-unbuttonizing
9255 @vindex gnus-inhibit-mime-unbuttonizing
9256 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
9257 default value is @code{nil}.
9258
9259 @item gnus-article-mime-part-function
9260 @vindex gnus-article-mime-part-function
9261 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
9262 handle as the parameter.  The function is meant to be used to allow
9263 users to gather information from the article (e. g., add Vcard info to
9264 the bbdb database) or to do actions based on parts (e. g., automatically
9265 save all jpegs into some directory).
9266
9267 Here's an example function the does the latter:
9268
9269 @lisp
9270 (defun my-save-all-jpeg-parts (handle)
9271   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9272     (with-temp-buffer
9273       (insert (mm-get-part handle))
9274       (write-region (point-min) (point-max)
9275                     (read-file-name "Save jpeg to: ")))))
9276 (setq gnus-article-mime-part-function
9277       'my-save-all-jpeg-parts)
9278 @end lisp
9279
9280 @vindex gnus-mime-multipart-functions
9281 @item gnus-mime-multipart-functions
9282 Alist of @acronym{MIME} multipart types and functions to handle them.
9283
9284 @vindex mm-file-name-rewrite-functions
9285 @item mm-file-name-rewrite-functions
9286 List of functions used for rewriting file names of @acronym{MIME} parts.
9287 Each function takes a file name as input and returns a file name.
9288
9289 Ready-made functions include@*
9290 @code{mm-file-name-delete-whitespace},
9291 @code{mm-file-name-trim-whitespace},
9292 @code{mm-file-name-collapse-whitespace}, and
9293 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9294 the variable @code{mm-file-name-replace-whitespace} to replace each
9295 whitespace character in a file name with that string; default value
9296 is @code{"_"} (a single underscore).
9297 @findex mm-file-name-delete-whitespace
9298 @findex mm-file-name-trim-whitespace
9299 @findex mm-file-name-collapse-whitespace
9300 @findex mm-file-name-replace-whitespace
9301 @vindex mm-file-name-replace-whitespace
9302
9303 The standard functions @code{capitalize}, @code{downcase},
9304 @code{upcase}, and @code{upcase-initials} may be useful, too.
9305
9306 Everybody knows that whitespace characters in file names are evil,
9307 except those who don't know.  If you receive lots of attachments from
9308 such unenlightened users, you can make live easier by adding
9309
9310 @lisp
9311 (setq mm-file-name-rewrite-functions
9312       '(mm-file-name-trim-whitespace
9313         mm-file-name-collapse-whitespace
9314         mm-file-name-replace-whitespace))
9315 @end lisp
9316
9317 @noindent
9318 to your @file{~/.gnus.el} file.
9319
9320 @end table
9321
9322
9323 @node Charsets
9324 @section Charsets
9325 @cindex charsets
9326
9327 People use different charsets, and we have @acronym{MIME} to let us know what
9328 charsets they use.  Or rather, we wish we had.  Many people use
9329 newsreaders and mailers that do not understand or use @acronym{MIME}, and
9330 just send out messages without saying what character sets they use.  To
9331 help a bit with this, some local news hierarchies have policies that say
9332 what character set is the default.  For instance, the @samp{fj}
9333 hierarchy uses @code{iso-2022-jp-2}.
9334
9335 @vindex gnus-group-charset-alist
9336 This knowledge is encoded in the @code{gnus-group-charset-alist}
9337 variable, which is an alist of regexps (use the first item to match full
9338 group names) and default charsets to be used when reading these groups.
9339
9340 @vindex gnus-newsgroup-ignored-charsets
9341 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
9342 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9343 even if they really are in @code{koi-8}.  To help here, the
9344 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9345 charsets that are listed here will be ignored.  The variable can be
9346 set on a group-by-group basis using the group parameters (@pxref{Group
9347 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9348 which includes values some agents insist on having in there.
9349
9350 @vindex gnus-group-posting-charset-alist
9351 When posting, @code{gnus-group-posting-charset-alist} is used to
9352 determine which charsets should not be encoded using the @acronym{MIME}
9353 encodings.  For instance, some hierarchies discourage using
9354 quoted-printable header encoding.
9355
9356 This variable is an alist of regexps and permitted unencoded charsets
9357 for posting.  Each element of the alist has the form @code{(}@var{test
9358 header body-list}@code{)}, where:
9359
9360 @table @var
9361 @item test
9362 is either a regular expression matching the newsgroup header or a
9363 variable to query,
9364 @item header
9365 is the charset which may be left unencoded in the header (@code{nil}
9366 means encode all charsets),
9367 @item body-list
9368 is a list of charsets which may be encoded using 8bit content-transfer
9369 encoding in the body, or one of the special values @code{nil} (always
9370 encode using quoted-printable) or @code{t} (always use 8bit).
9371 @end table
9372
9373 @cindex Russian
9374 @cindex koi8-r
9375 @cindex koi8-u
9376 @cindex iso-8859-5
9377 @cindex coding system aliases
9378 @cindex preferred charset
9379
9380 Other charset tricks that may be useful, although not Gnus-specific:
9381
9382 If there are several @acronym{MIME} charsets that encode the same Emacs
9383 charset, you can choose what charset to use by saying the following:
9384
9385 @lisp
9386 (put-charset-property 'cyrillic-iso8859-5
9387                       'preferred-coding-system 'koi8-r)
9388 @end lisp
9389
9390 This means that Russian will be encoded using @code{koi8-r} instead of
9391 the default @code{iso-8859-5} @acronym{MIME} charset.
9392
9393 If you want to read messages in @code{koi8-u}, you can cheat and say
9394
9395 @lisp
9396 (define-coding-system-alias 'koi8-u 'koi8-r)
9397 @end lisp
9398
9399 This will almost do the right thing.
9400
9401 And finally, to read charsets like @code{windows-1251}, you can say
9402 something like
9403
9404 @lisp
9405 (codepage-setup 1251)
9406 (define-coding-system-alias 'windows-1251 'cp1251)
9407 @end lisp
9408
9409
9410 @node Article Commands
9411 @section Article Commands
9412
9413 @table @kbd
9414
9415 @item A P
9416 @cindex PostScript
9417 @cindex printing
9418 @kindex A P (Summary)
9419 @vindex gnus-ps-print-hook
9420 @findex gnus-summary-print-article
9421 Generate and print a PostScript image of the article buffer
9422 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9423 be run just before printing the buffer.  An alternative way to print
9424 article is to use Muttprint (@pxref{Saving Articles}).
9425
9426 @end table
9427
9428
9429 @node Summary Sorting
9430 @section Summary Sorting
9431 @cindex summary sorting
9432
9433 You can have the summary buffer sorted in various ways, even though I
9434 can't really see why you'd want that.
9435
9436 @table @kbd
9437
9438 @item C-c C-s C-n
9439 @kindex C-c C-s C-n (Summary)
9440 @findex gnus-summary-sort-by-number
9441 Sort by article number (@code{gnus-summary-sort-by-number}).
9442
9443 @item C-c C-s C-a
9444 @kindex C-c C-s C-a (Summary)
9445 @findex gnus-summary-sort-by-author
9446 Sort by author (@code{gnus-summary-sort-by-author}).
9447
9448 @item C-c C-s C-s
9449 @kindex C-c C-s C-s (Summary)
9450 @findex gnus-summary-sort-by-subject
9451 Sort by subject (@code{gnus-summary-sort-by-subject}).
9452
9453 @item C-c C-s C-d
9454 @kindex C-c C-s C-d (Summary)
9455 @findex gnus-summary-sort-by-date
9456 Sort by date (@code{gnus-summary-sort-by-date}).
9457
9458 @item C-c C-s C-l
9459 @kindex C-c C-s C-l (Summary)
9460 @findex gnus-summary-sort-by-lines
9461 Sort by lines (@code{gnus-summary-sort-by-lines}).
9462
9463 @item C-c C-s C-c
9464 @kindex C-c C-s C-c (Summary)
9465 @findex gnus-summary-sort-by-chars
9466 Sort by article length (@code{gnus-summary-sort-by-chars}).
9467
9468 @item C-c C-s C-i
9469 @kindex C-c C-s C-i (Summary)
9470 @findex gnus-summary-sort-by-score
9471 Sort by score (@code{gnus-summary-sort-by-score}).
9472
9473 @item C-c C-s C-r
9474 @kindex C-c C-s C-r (Summary)
9475 @findex gnus-summary-sort-by-random
9476 Randomize (@code{gnus-summary-sort-by-random}).
9477
9478 @item C-c C-s C-o
9479 @kindex C-c C-s C-o (Summary)
9480 @findex gnus-summary-sort-by-original
9481 Sort using the default sorting method
9482 (@code{gnus-summary-sort-by-original}).
9483 @end table
9484
9485 These functions will work both when you use threading and when you don't
9486 use threading.  In the latter case, all summary lines will be sorted,
9487 line by line.  In the former case, sorting will be done on a
9488 root-by-root basis, which might not be what you were looking for.  To
9489 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9490 Commands}).
9491
9492
9493 @node Finding the Parent
9494 @section Finding the Parent
9495 @cindex parent articles
9496 @cindex referring articles
9497
9498 @table @kbd
9499 @item ^
9500 @kindex ^ (Summary)
9501 @findex gnus-summary-refer-parent-article
9502 If you'd like to read the parent of the current article, and it is not
9503 displayed in the summary buffer, you might still be able to.  That is,
9504 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
9505 and the @code{References} in the current article are not mangled, you
9506 can just press @kbd{^} or @kbd{A r}
9507 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9508 you'll get the parent.  If the parent is already displayed in the
9509 summary buffer, point will just move to this article.
9510
9511 If given a positive numerical prefix, fetch that many articles back into
9512 the ancestry.  If given a negative numerical prefix, fetch just that
9513 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
9514 grandparent and the grandgrandparent of the current article.  If you say
9515 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
9516 article.
9517
9518 @item A R (Summary)
9519 @findex gnus-summary-refer-references
9520 @kindex A R (Summary)
9521 Fetch all articles mentioned in the @code{References} header of the
9522 article (@code{gnus-summary-refer-references}).
9523
9524 @item A T (Summary)
9525 @findex gnus-summary-refer-thread
9526 @kindex A T (Summary)
9527 Display the full thread where the current article appears
9528 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9529 headers in the current group to work, so it usually takes a while.  If
9530 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9531 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9532 visible effects normally, but it'll make this command work a whole lot
9533 faster.  Of course, it'll make group entry somewhat slow.
9534
9535 @vindex gnus-refer-thread-limit
9536 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9537 articles before the first displayed in the current group) headers to
9538 fetch when doing this command.  The default is 200.  If @code{t}, all
9539 the available headers will be fetched.  This variable can be overridden
9540 by giving the @kbd{A T} command a numerical prefix.
9541
9542 @item M-^ (Summary)
9543 @findex gnus-summary-refer-article
9544 @kindex M-^ (Summary)
9545 @cindex Message-ID
9546 @cindex fetching by Message-ID
9547 You can also ask the @acronym{NNTP} server for an arbitrary article, no
9548 matter what group it belongs to.  @kbd{M-^}
9549 (@code{gnus-summary-refer-article}) will ask you for a
9550 @code{Message-ID}, which is one of those long, hard-to-read thingies
9551 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9552 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9553 @end table
9554
9555 The current select method will be used when fetching by
9556 @code{Message-ID} from non-news select method, but you can override this
9557 by giving this command a prefix.
9558
9559 @vindex gnus-refer-article-method
9560 If the group you are reading is located on a back end that does not
9561 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9562 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
9563 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
9564 updating the spool you are reading from, but that's not really
9565 necessary.
9566
9567 It can also be a list of select methods, as well as the special symbol
9568 @code{current}, which means to use the current select method.  If it
9569 is a list, Gnus will try all the methods in the list until it finds a
9570 match.
9571
9572 Here's an example setting that will first try the current method, and
9573 then ask Google if that fails:
9574
9575 @lisp
9576 (setq gnus-refer-article-method
9577       '(current
9578         (nnweb "google" (nnweb-type google))))
9579 @end lisp
9580
9581 Most of the mail back ends support fetching by @code{Message-ID}, but
9582 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9583 @code{nnbabyl}, and @code{nnmaildir} are able to locate articles from
9584 any groups, while @code{nnml}, @code{nnfolder}, and @code{nnimap} are
9585 only able to locate articles that have been posted to the current group.
9586 (Anything else would be too time consuming.)  @code{nnmh} does not
9587 support this at all.
9588
9589
9590 @node Alternative Approaches
9591 @section Alternative Approaches
9592
9593 Different people like to read news using different methods.  This being
9594 Gnus, we offer a small selection of minor modes for the summary buffers.
9595
9596 @menu
9597 * Pick and Read::               First mark articles and then read them.
9598 * Binary Groups::               Auto-decode all articles.
9599 @end menu
9600
9601
9602 @node Pick and Read
9603 @subsection Pick and Read
9604 @cindex pick and read
9605
9606 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9607 a two-phased reading interface.  The user first marks in a summary
9608 buffer the articles she wants to read.  Then she starts reading the
9609 articles with just an article buffer displayed.
9610
9611 @findex gnus-pick-mode
9612 @kindex M-x gnus-pick-mode
9613 Gnus provides a summary buffer minor mode that allows
9614 this---@code{gnus-pick-mode}.  This basically means that a few process
9615 mark commands become one-keystroke commands to allow easy marking, and
9616 it provides one additional command for switching to the summary buffer.
9617
9618 Here are the available keystrokes when using pick mode:
9619
9620 @table @kbd
9621 @item .
9622 @kindex . (Pick)
9623 @findex gnus-pick-article-or-thread
9624 Pick the article or thread on the current line
9625 (@code{gnus-pick-article-or-thread}).  If the variable
9626 @code{gnus-thread-hide-subtree} is true, then this key selects the
9627 entire thread when used at the first article of the thread.  Otherwise,
9628 it selects just the article.  If given a numerical prefix, go to that
9629 thread or article and pick it.  (The line number is normally displayed
9630 at the beginning of the summary pick lines.)
9631
9632 @item SPACE
9633 @kindex SPACE (Pick)
9634 @findex gnus-pick-next-page
9635 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9636 at the end of the buffer, start reading the picked articles.
9637
9638 @item u
9639 @kindex u (Pick)
9640 @findex gnus-pick-unmark-article-or-thread.
9641 Unpick the thread or article
9642 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9643 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9644 thread if used at the first article of the thread.  Otherwise it unpicks
9645 just the article.  You can give this key a numerical prefix to unpick
9646 the thread or article at that line.
9647
9648 @item RET
9649 @kindex RET (Pick)
9650 @findex gnus-pick-start-reading
9651 @vindex gnus-pick-display-summary
9652 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9653 given a prefix, mark all unpicked articles as read first.  If
9654 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9655 will still be visible when you are reading.
9656
9657 @end table
9658
9659 All the normal summary mode commands are still available in the
9660 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9661 which is mapped to the same function
9662 @code{gnus-summary-tick-article-forward}.
9663
9664 If this sounds like a good idea to you, you could say:
9665
9666 @lisp
9667 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9668 @end lisp
9669
9670 @vindex gnus-pick-mode-hook
9671 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9672
9673 @vindex gnus-mark-unpicked-articles-as-read
9674 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9675 all unpicked articles as read.  The default is @code{nil}.
9676
9677 @vindex gnus-summary-pick-line-format
9678 The summary line format in pick mode is slightly different from the
9679 standard format.  At the beginning of each line the line number is
9680 displayed.  The pick mode line format is controlled by the
9681 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9682 Variables}).  It accepts the same format specs that
9683 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9684
9685
9686 @node Binary Groups
9687 @subsection Binary Groups
9688 @cindex binary groups
9689
9690 @findex gnus-binary-mode
9691 @kindex M-x gnus-binary-mode
9692 If you spend much time in binary groups, you may grow tired of hitting
9693 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9694 is a minor mode for summary buffers that makes all ordinary Gnus article
9695 selection functions uudecode series of articles and display the result
9696 instead of just displaying the articles the normal way.
9697
9698 @kindex g (Binary)
9699 @findex gnus-binary-show-article
9700 The only way, in fact, to see the actual articles is the @kbd{g}
9701 command, when you have turned on this mode
9702 (@code{gnus-binary-show-article}).
9703
9704 @vindex gnus-binary-mode-hook
9705 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9706
9707
9708 @node Tree Display
9709 @section Tree Display
9710 @cindex trees
9711
9712 @vindex gnus-use-trees
9713 If you don't like the normal Gnus summary display, you might try setting
9714 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9715 additional @dfn{tree buffer}.  You can execute all summary mode commands
9716 in the tree buffer.
9717
9718 There are a few variables to customize the tree display, of course:
9719
9720 @table @code
9721 @item gnus-tree-mode-hook
9722 @vindex gnus-tree-mode-hook
9723 A hook called in all tree mode buffers.
9724
9725 @item gnus-tree-mode-line-format
9726 @vindex gnus-tree-mode-line-format
9727 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9728 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9729 of valid specs, @pxref{Summary Buffer Mode Line}.
9730
9731 @item gnus-selected-tree-face
9732 @vindex gnus-selected-tree-face
9733 Face used for highlighting the selected article in the tree buffer.  The
9734 default is @code{modeline}.
9735
9736 @item gnus-tree-line-format
9737 @vindex gnus-tree-line-format
9738 A format string for the tree nodes.  The name is a bit of a misnomer,
9739 though---it doesn't define a line, but just the node.  The default value
9740 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9741 the name of the poster.  It is vital that all nodes are of the same
9742 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9743
9744 Valid specs are:
9745
9746 @table @samp
9747 @item n
9748 The name of the poster.
9749 @item f
9750 The @code{From} header.
9751 @item N
9752 The number of the article.
9753 @item [
9754 The opening bracket.
9755 @item ]
9756 The closing bracket.
9757 @item s
9758 The subject.
9759 @end table
9760
9761 @xref{Formatting Variables}.
9762
9763 Variables related to the display are:
9764
9765 @table @code
9766 @item gnus-tree-brackets
9767 @vindex gnus-tree-brackets
9768 This is used for differentiating between ``real'' articles and
9769 ``sparse'' articles.  The format is 
9770 @example
9771 ((@var{real-open} . @var{real-close}) 
9772  (@var{sparse-open} . @var{sparse-close}) 
9773  (@var{dummy-open} . @var{dummy-close}))
9774 @end example
9775 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9776
9777 @item gnus-tree-parent-child-edges
9778 @vindex gnus-tree-parent-child-edges
9779 This is a list that contains the characters used for connecting parent
9780 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9781
9782 @end table
9783
9784 @item gnus-tree-minimize-window
9785 @vindex gnus-tree-minimize-window
9786 If this variable is non-@code{nil}, Gnus will try to keep the tree
9787 buffer as small as possible to allow more room for the other Gnus
9788 windows.  If this variable is a number, the tree buffer will never be
9789 higher than that number.  The default is @code{t}.  Note that if you
9790 have several windows displayed side-by-side in a frame and the tree
9791 buffer is one of these, minimizing the tree window will also resize all
9792 other windows displayed next to it.
9793
9794 You may also wish to add the following hook to keep the window minimized
9795 at all times:
9796
9797 @lisp
9798 (add-hook 'gnus-configure-windows-hook
9799           'gnus-tree-perhaps-minimize)
9800 @end lisp
9801
9802 @item gnus-generate-tree-function
9803 @vindex gnus-generate-tree-function
9804 @findex gnus-generate-horizontal-tree
9805 @findex gnus-generate-vertical-tree
9806 The function that actually generates the thread tree.  Two predefined
9807 functions are available: @code{gnus-generate-horizontal-tree} and
9808 @code{gnus-generate-vertical-tree} (which is the default).
9809
9810 @end table
9811
9812 Here's an example from a horizontal tree buffer:
9813
9814 @example
9815 @{***@}-(***)-[odd]-[Gun]
9816      |      \[Jan]
9817      |      \[odd]-[Eri]
9818      |      \(***)-[Eri]
9819      |            \[odd]-[Paa]
9820      \[Bjo]
9821      \[Gun]
9822      \[Gun]-[Jor]
9823 @end example
9824
9825 Here's the same thread displayed in a vertical tree buffer:
9826
9827 @example
9828 @group
9829 @{***@}
9830   |--------------------------\-----\-----\
9831 (***)                         [Bjo] [Gun] [Gun]
9832   |--\-----\-----\                          |
9833 [odd] [Jan] [odd] (***)                   [Jor]
9834   |           |     |--\
9835 [Gun]       [Eri] [Eri] [odd]
9836                           |
9837                         [Paa]
9838 @end group
9839 @end example
9840
9841 If you're using horizontal trees, it might be nice to display the trees
9842 side-by-side with the summary buffer.  You could add something like the
9843 following to your @file{~/.gnus.el} file:
9844
9845 @lisp
9846 (setq gnus-use-trees t
9847       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9848       gnus-tree-minimize-window nil)
9849 (gnus-add-configuration
9850  '(article
9851    (vertical 1.0
9852              (horizontal 0.25
9853                          (summary 0.75 point)
9854                          (tree 1.0))
9855              (article 1.0))))
9856 @end lisp
9857
9858 @xref{Window Layout}.
9859
9860
9861 @node Mail Group Commands
9862 @section Mail Group Commands
9863 @cindex mail group commands
9864
9865 Some commands only make sense in mail groups.  If these commands are
9866 invalid in the current group, they will raise a hell and let you know.
9867
9868 All these commands (except the expiry and edit commands) use the
9869 process/prefix convention (@pxref{Process/Prefix}).
9870
9871 @table @kbd
9872
9873 @item B e
9874 @kindex B e (Summary)
9875 @findex gnus-summary-expire-articles
9876 Run all expirable articles in the current group through the expiry
9877 process (@code{gnus-summary-expire-articles}).  That is, delete all
9878 expirable articles in the group that have been around for a while.
9879 (@pxref{Expiring Mail}).
9880
9881 @item B C-M-e
9882 @kindex B C-M-e (Summary)
9883 @findex gnus-summary-expire-articles-now
9884 Delete all the expirable articles in the group
9885 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9886 articles eligible for expiry in the current group will
9887 disappear forever into that big @file{/dev/null} in the sky.
9888
9889 @item B DEL
9890 @kindex B DEL (Summary)
9891 @findex gnus-summary-delete-article
9892 @c @icon{gnus-summary-mail-delete}
9893 Delete the mail article.  This is ``delete'' as in ``delete it from your
9894 disk forever and ever, never to return again.'' Use with caution.
9895 (@code{gnus-summary-delete-article}).
9896
9897 @item B m
9898 @kindex B m (Summary)
9899 @cindex move mail
9900 @findex gnus-summary-move-article
9901 @vindex gnus-preserve-marks
9902 Move the article from one mail group to another
9903 (@code{gnus-summary-move-article}).  Marks will be preserved if
9904 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9905
9906 @item B c
9907 @kindex B c (Summary)
9908 @cindex copy mail
9909 @findex gnus-summary-copy-article
9910 @c @icon{gnus-summary-mail-copy}
9911 Copy the article from one group (mail group or not) to a mail group
9912 (@code{gnus-summary-copy-article}).  Marks will be preserved if
9913 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9914
9915 @item B B
9916 @kindex B B (Summary)
9917 @cindex crosspost mail
9918 @findex gnus-summary-crosspost-article
9919 Crosspost the current article to some other group
9920 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
9921 the article in the other group, and the Xref headers of the article will
9922 be properly updated.
9923
9924 @item B i
9925 @kindex B i (Summary)
9926 @findex gnus-summary-import-article
9927 Import an arbitrary file into the current mail newsgroup
9928 (@code{gnus-summary-import-article}).  You will be prompted for a file
9929 name, a @code{From} header and a @code{Subject} header.
9930
9931 @item B I
9932 @kindex B I (Summary)
9933 @findex gnus-summary-create-article
9934 Create an empty article in the current mail newsgroups
9935 (@code{gnus-summary-create-article}).  You will be prompted for a
9936 @code{From} header and a @code{Subject} header.
9937
9938 @item B r
9939 @kindex B r (Summary)
9940 @findex gnus-summary-respool-article
9941 @vindex gnus-summary-respool-default-method
9942 Respool the mail article (@code{gnus-summary-respool-article}).
9943 @code{gnus-summary-respool-default-method} will be used as the default
9944 select method when respooling.  This variable is @code{nil} by default,
9945 which means that the current group select method will be used instead.
9946 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
9947 (which is the default).
9948
9949 @item B w
9950 @itemx e
9951 @kindex B w (Summary)
9952 @kindex e (Summary)
9953 @findex gnus-summary-edit-article
9954 @kindex C-c C-c (Article)
9955 @findex gnus-summary-edit-article-done
9956 Edit the current article (@code{gnus-summary-edit-article}).  To finish
9957 editing and make the changes permanent, type @kbd{C-c C-c}
9958 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
9959 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
9960
9961 @item B q
9962 @kindex B q (Summary)
9963 @findex gnus-summary-respool-query
9964 If you want to re-spool an article, you might be curious as to what group
9965 the article will end up in before you do the re-spooling.  This command
9966 will tell you (@code{gnus-summary-respool-query}).
9967
9968 @item B t
9969 @kindex B t (Summary)
9970 @findex gnus-summary-respool-trace
9971 Similarly, this command will display all fancy splitting patterns used
9972 when respooling, if any (@code{gnus-summary-respool-trace}).
9973
9974 @item B p
9975 @kindex B p (Summary)
9976 @findex gnus-summary-article-posted-p
9977 Some people have a tendency to send you ``courtesy'' copies when they
9978 follow up to articles you have posted.  These usually have a
9979 @code{Newsgroups} header in them, but not always.  This command
9980 (@code{gnus-summary-article-posted-p}) will try to fetch the current
9981 article from your news server (or rather, from
9982 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
9983 report back whether it found the article or not.  Even if it says that
9984 it didn't find the article, it may have been posted anyway---mail
9985 propagation is much faster than news propagation, and the news copy may
9986 just not have arrived yet.
9987
9988 @item K E
9989 @kindex K E (Summary)
9990 @findex gnus-article-encrypt-body
9991 @vindex gnus-article-encrypt-protocol
9992 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
9993 The body is encrypted with the encryption protocol specified by the
9994 variable @code{gnus-article-encrypt-protocol}.
9995
9996 @end table
9997
9998 @vindex gnus-move-split-methods
9999 @cindex moving articles
10000 If you move (or copy) articles regularly, you might wish to have Gnus
10001 suggest where to put the articles.  @code{gnus-move-split-methods} is a
10002 variable that uses the same syntax as @code{gnus-split-methods}
10003 (@pxref{Saving Articles}).  You may customize that variable to create
10004 suggestions you find reasonable.  (Note that
10005 @code{gnus-move-split-methods} uses group names where
10006 @code{gnus-split-methods} uses file names.)
10007
10008 @lisp
10009 (setq gnus-move-split-methods
10010       '(("^From:.*Lars Magne" "nnml:junk")
10011         ("^Subject:.*gnus" "nnfolder:important")
10012         (".*" "nnml:misc")))
10013 @end lisp
10014
10015
10016 @node Various Summary Stuff
10017 @section Various Summary Stuff
10018
10019 @menu
10020 * Summary Group Information::   Information oriented commands.
10021 * Searching for Articles::      Multiple article commands.
10022 * Summary Generation Commands::  
10023 * Really Various Summary Commands::  Those pesky non-conformant commands.
10024 @end menu
10025
10026 @table @code
10027 @vindex gnus-summary-display-while-building
10028 @item gnus-summary-display-while-building
10029 If non-@code{nil}, show and update the summary buffer as it's being
10030 built.  If @code{t}, update the buffer after every line is inserted.
10031 If the value is an integer, @var{n}, update the display every @var{n}
10032 lines.  The default is @code{nil}.
10033
10034 @vindex gnus-summary-display-arrow
10035 @item gnus-summary-display-arrow
10036 If non-@code{nil}, display an arrow in the fringe to indicate the
10037 current article.
10038
10039 @vindex gnus-summary-mode-hook
10040 @item gnus-summary-mode-hook
10041 This hook is called when creating a summary mode buffer.
10042
10043 @vindex gnus-summary-generate-hook
10044 @item gnus-summary-generate-hook
10045 This is called as the last thing before doing the threading and the
10046 generation of the summary buffer.  It's quite convenient for customizing
10047 the threading variables based on what data the newsgroup has.  This hook
10048 is called from the summary buffer after most summary buffer variables
10049 have been set.
10050
10051 @vindex gnus-summary-prepare-hook
10052 @item gnus-summary-prepare-hook
10053 It is called after the summary buffer has been generated.  You might use
10054 it to, for instance, highlight lines or modify the look of the buffer in
10055 some other ungodly manner.  I don't care.
10056
10057 @vindex gnus-summary-prepared-hook
10058 @item gnus-summary-prepared-hook
10059 A hook called as the very last thing after the summary buffer has been
10060 generated.
10061
10062 @vindex gnus-summary-ignore-duplicates
10063 @item gnus-summary-ignore-duplicates
10064 When Gnus discovers two articles that have the same @code{Message-ID},
10065 it has to do something drastic.  No articles are allowed to have the
10066 same @code{Message-ID}, but this may happen when reading mail from some
10067 sources.  Gnus allows you to customize what happens with this variable.
10068 If it is @code{nil} (which is the default), Gnus will rename the
10069 @code{Message-ID} (for display purposes only) and display the article as
10070 any other article.  If this variable is @code{t}, it won't display the
10071 article---it'll be as if it never existed.
10072
10073 @vindex gnus-alter-articles-to-read-function
10074 @item gnus-alter-articles-to-read-function
10075 This function, which takes two parameters (the group name and the list
10076 of articles to be selected), is called to allow the user to alter the
10077 list of articles to be selected.
10078
10079 For instance, the following function adds the list of cached articles to
10080 the list in one particular group:
10081
10082 @lisp
10083 (defun my-add-cached-articles (group articles)
10084   (if (string= group "some.group")
10085       (append gnus-newsgroup-cached articles)
10086     articles))
10087 @end lisp
10088
10089 @vindex gnus-newsgroup-variables
10090 @item gnus-newsgroup-variables
10091 A list of newsgroup (summary buffer) local variables, or cons of
10092 variables and their default values (when the default values are not
10093 @code{nil}), that should be made global while the summary buffer is
10094 active.  These variables can be used to set variables in the group
10095 parameters while still allowing them to affect operations done in
10096 other buffers. For example:
10097
10098 @lisp
10099 (setq gnus-newsgroup-variables
10100       '(message-use-followup-to
10101         (gnus-visible-headers .
10102  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10103 @end lisp
10104
10105 @end table
10106
10107
10108 @node Summary Group Information
10109 @subsection Summary Group Information
10110
10111 @table @kbd
10112
10113 @item H f
10114 @kindex H f (Summary)
10115 @findex gnus-summary-fetch-faq
10116 @vindex gnus-group-faq-directory
10117 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
10118 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
10119 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
10120 is usually a directory on a remote machine.  This variable can also be
10121 a list of directories.  In that case, giving a prefix to this command
10122 will allow you to choose between the various sites.  @code{ange-ftp}
10123 or @code{efs} will probably be used for fetching the file.
10124
10125 @item H d
10126 @kindex H d (Summary)
10127 @findex gnus-summary-describe-group
10128 Give a brief description of the current group
10129 (@code{gnus-summary-describe-group}).  If given a prefix, force
10130 rereading the description from the server.
10131
10132 @item H h
10133 @kindex H h (Summary)
10134 @findex gnus-summary-describe-briefly
10135 Give an extremely brief description of the most important summary
10136 keystrokes (@code{gnus-summary-describe-briefly}).
10137
10138 @item H i
10139 @kindex H i (Summary)
10140 @findex gnus-info-find-node
10141 Go to the Gnus info node (@code{gnus-info-find-node}).
10142 @end table
10143
10144
10145 @node Searching for Articles
10146 @subsection Searching for Articles
10147
10148 @table @kbd
10149
10150 @item M-s
10151 @kindex M-s (Summary)
10152 @findex gnus-summary-search-article-forward
10153 Search through all subsequent (raw) articles for a regexp
10154 (@code{gnus-summary-search-article-forward}).
10155
10156 @item M-r
10157 @kindex M-r (Summary)
10158 @findex gnus-summary-search-article-backward
10159 Search through all previous (raw) articles for a regexp
10160 (@code{gnus-summary-search-article-backward}).
10161
10162 @item &
10163 @kindex & (Summary)
10164 @findex gnus-summary-execute-command
10165 This command will prompt you for a header, a regular expression to match
10166 on this field, and a command to be executed if the match is made
10167 (@code{gnus-summary-execute-command}).  If the header is an empty
10168 string, the match is done on the entire article.  If given a prefix,
10169 search backward instead.
10170
10171 For instance, @kbd{& RET some.*string #} will put the process mark on
10172 all articles that have heads or bodies that match @samp{some.*string}.
10173
10174 @item M-&
10175 @kindex M-& (Summary)
10176 @findex gnus-summary-universal-argument
10177 Perform any operation on all articles that have been marked with
10178 the process mark (@code{gnus-summary-universal-argument}).
10179 @end table
10180
10181 @node Summary Generation Commands
10182 @subsection Summary Generation Commands
10183
10184 @table @kbd
10185
10186 @item Y g
10187 @kindex Y g (Summary)
10188 @findex gnus-summary-prepare
10189 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
10190
10191 @item Y c
10192 @kindex Y c (Summary)
10193 @findex gnus-summary-insert-cached-articles
10194 Pull all cached articles (for the current group) into the summary buffer
10195 (@code{gnus-summary-insert-cached-articles}).
10196
10197 @item Y d
10198 @kindex Y d (Summary)
10199 @findex gnus-summary-insert-dormant-articles
10200 Pull all dormant articles (for the current group) into the summary buffer
10201 (@code{gnus-summary-insert-dormant-articles}).
10202
10203 @end table
10204
10205
10206 @node Really Various Summary Commands
10207 @subsection Really Various Summary Commands
10208
10209 @table @kbd
10210
10211 @item A D
10212 @itemx C-d
10213 @kindex C-d (Summary)
10214 @kindex A D (Summary)
10215 @findex gnus-summary-enter-digest-group
10216 If the current article is a collection of other articles (for instance,
10217 a digest), you might use this command to enter a group based on the that
10218 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
10219 guess what article type is currently displayed unless you give a prefix
10220 to this command, which forces a ``digest'' interpretation.  Basically,
10221 whenever you see a message that is a collection of other messages of
10222 some format, you @kbd{C-d} and read these messages in a more convenient
10223 fashion.
10224
10225 @item C-M-d
10226 @kindex C-M-d (Summary)
10227 @findex gnus-summary-read-document
10228 This command is very similar to the one above, but lets you gather
10229 several documents into one biiig group
10230 (@code{gnus-summary-read-document}).  It does this by opening several
10231 @code{nndoc} groups for each document, and then opening an
10232 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
10233 command understands the process/prefix convention
10234 (@pxref{Process/Prefix}).
10235
10236 @item C-t
10237 @kindex C-t (Summary)
10238 @findex gnus-summary-toggle-truncation
10239 Toggle truncation of summary lines
10240 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10241 line centering function in the summary buffer, so it's not a good idea
10242 to have truncation switched off while reading articles.
10243
10244 @item =
10245 @kindex = (Summary)
10246 @findex gnus-summary-expand-window
10247 Expand the summary buffer window (@code{gnus-summary-expand-window}).
10248 If given a prefix, force an @code{article} window configuration.
10249
10250 @item C-M-e
10251 @kindex C-M-e (Summary)
10252 @findex gnus-summary-edit-parameters
10253 Edit the group parameters (@pxref{Group Parameters}) of the current
10254 group (@code{gnus-summary-edit-parameters}).
10255
10256 @item C-M-a
10257 @kindex C-M-a (Summary)
10258 @findex gnus-summary-customize-parameters
10259 Customize the group parameters (@pxref{Group Parameters}) of the current
10260 group (@code{gnus-summary-customize-parameters}).
10261
10262 @end table
10263
10264
10265 @node Exiting the Summary Buffer
10266 @section Exiting the Summary Buffer
10267 @cindex summary exit
10268 @cindex exiting groups
10269
10270 Exiting from the summary buffer will normally update all info on the
10271 group and return you to the group buffer.
10272
10273 @table @kbd
10274
10275 @item Z Z
10276 @itemx q
10277 @kindex Z Z (Summary)
10278 @kindex q (Summary)
10279 @findex gnus-summary-exit
10280 @vindex gnus-summary-exit-hook
10281 @vindex gnus-summary-prepare-exit-hook
10282 @vindex gnus-group-no-more-groups-hook
10283 @c @icon{gnus-summary-exit}
10284 Exit the current group and update all information on the group
10285 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
10286 called before doing much of the exiting, which calls
10287 @code{gnus-summary-expire-articles} by default.
10288 @code{gnus-summary-exit-hook} is called after finishing the exit
10289 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
10290 group mode having no more (unread) groups.
10291
10292 @item Z E
10293 @itemx Q
10294 @kindex Z E (Summary)
10295 @kindex Q (Summary)
10296 @findex gnus-summary-exit-no-update
10297 Exit the current group without updating any information on the group
10298 (@code{gnus-summary-exit-no-update}).
10299
10300 @item Z c
10301 @itemx c
10302 @kindex Z c (Summary)
10303 @kindex c (Summary)
10304 @findex gnus-summary-catchup-and-exit
10305 @c @icon{gnus-summary-catchup-and-exit}
10306 Mark all unticked articles in the group as read and then exit
10307 (@code{gnus-summary-catchup-and-exit}).
10308
10309 @item Z C
10310 @kindex Z C (Summary)
10311 @findex gnus-summary-catchup-all-and-exit
10312 Mark all articles, even the ticked ones, as read and then exit
10313 (@code{gnus-summary-catchup-all-and-exit}).
10314
10315 @item Z n
10316 @kindex Z n (Summary)
10317 @findex gnus-summary-catchup-and-goto-next-group
10318 Mark all articles as read and go to the next group
10319 (@code{gnus-summary-catchup-and-goto-next-group}).
10320
10321 @item Z R
10322 @kindex Z R (Summary)
10323 @findex gnus-summary-reselect-current-group
10324 Exit this group, and then enter it again
10325 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10326 all articles, both read and unread.
10327
10328 @item Z G
10329 @itemx M-g
10330 @kindex Z G (Summary)
10331 @kindex M-g (Summary)
10332 @findex gnus-summary-rescan-group
10333 @c @icon{gnus-summary-mail-get}
10334 Exit the group, check for new articles in the group, and select the
10335 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10336 articles, both read and unread.
10337
10338 @item Z N
10339 @kindex Z N (Summary)
10340 @findex gnus-summary-next-group
10341 Exit the group and go to the next group
10342 (@code{gnus-summary-next-group}).
10343
10344 @item Z P
10345 @kindex Z P (Summary)
10346 @findex gnus-summary-prev-group
10347 Exit the group and go to the previous group
10348 (@code{gnus-summary-prev-group}).
10349
10350 @item Z s
10351 @kindex Z s (Summary)
10352 @findex gnus-summary-save-newsrc
10353 Save the current number of read/marked articles in the dribble buffer
10354 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10355 given a prefix, also save the @file{.newsrc} file(s).  Using this
10356 command will make exit without updating (the @kbd{Q} command) worthless.
10357 @end table
10358
10359 @vindex gnus-exit-group-hook
10360 @code{gnus-exit-group-hook} is called when you exit the current group
10361 with an ``updating'' exit.  For instance @kbd{Q}
10362 (@code{gnus-summary-exit-no-update}) does not call this hook.
10363
10364 @findex gnus-summary-wake-up-the-dead
10365 @findex gnus-dead-summary-mode
10366 @vindex gnus-kill-summary-on-exit
10367 If you're in the habit of exiting groups, and then changing your mind
10368 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10369 If you do that, Gnus won't kill the summary buffer when you exit it.
10370 (Quelle surprise!)  Instead it will change the name of the buffer to
10371 something like @samp{*Dead Summary ... *} and install a minor mode
10372 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10373 buffer, you'll find that all keys are mapped to a function called
10374 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10375 summary buffer will result in a live, normal summary buffer.
10376
10377 There will never be more than one dead summary buffer at any one time.
10378
10379 @vindex gnus-use-cross-reference
10380 The data on the current group will be updated (which articles you have
10381 read, which articles you have replied to, etc.) when you exit the
10382 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10383 @code{t} (which is the default), articles that are cross-referenced to
10384 this group and are marked as read, will also be marked as read in the
10385 other subscribed groups they were cross-posted to.  If this variable is
10386 neither @code{nil} nor @code{t}, the article will be marked as read in
10387 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10388
10389
10390 @node Crosspost Handling
10391 @section Crosspost Handling
10392
10393 @cindex velveeta
10394 @cindex spamming
10395 Marking cross-posted articles as read ensures that you'll never have to
10396 read the same article more than once.  Unless, of course, somebody has
10397 posted it to several groups separately.  Posting the same article to
10398 several groups (not cross-posting) is called @dfn{spamming}, and you are
10399 by law required to send nasty-grams to anyone who perpetrates such a
10400 heinous crime.  You may want to try NoCeM handling to filter out spam
10401 (@pxref{NoCeM}).
10402
10403 Remember: Cross-posting is kinda ok, but posting the same article
10404 separately to several groups is not.  Massive cross-posting (aka.
10405 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10406 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10407 excessive crossposting (@pxref{Summary Mail Commands}).
10408
10409 @cindex cross-posting
10410 @cindex Xref
10411 @cindex @acronym{NOV}
10412 One thing that may cause Gnus to not do the cross-posting thing
10413 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
10414 (which is very nice, because it speeds things up considerably) which
10415 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
10416 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10417 even with @sc{xover} by registering the @code{Xref} lines of all
10418 articles you actually read, but if you kill the articles, or just mark
10419 them as read without reading them, Gnus will not get a chance to snoop
10420 the @code{Xref} lines out of these articles, and will be unable to use
10421 the cross reference mechanism.
10422
10423 @cindex LIST overview.fmt
10424 @cindex overview.fmt
10425 To check whether your @acronym{NNTP} server includes the @code{Xref} header
10426 in its overview files, try @samp{telnet your.nntp.server nntp},
10427 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10428 overview.fmt}.  This may not work, but if it does, and the last line you
10429 get does not read @samp{Xref:full}, then you should shout and whine at
10430 your news admin until she includes the @code{Xref} header in the
10431 overview files.
10432
10433 @vindex gnus-nov-is-evil
10434 If you want Gnus to get the @code{Xref}s right all the time, you have to
10435 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10436 considerably.
10437
10438 C'est la vie.
10439
10440 For an alternative approach, @pxref{Duplicate Suppression}.
10441
10442
10443 @node Duplicate Suppression
10444 @section Duplicate Suppression
10445
10446 By default, Gnus tries to make sure that you don't have to read the same
10447 article more than once by utilizing the crossposting mechanism
10448 (@pxref{Crosspost Handling}).  However, that simple and efficient
10449 approach may not work satisfactory for some users for various
10450 reasons.
10451
10452 @enumerate
10453 @item
10454 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
10455 is evil and not very common.
10456
10457 @item
10458 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
10459 @file{.overview} data bases.  This is evil and all too common, alas.
10460
10461 @item
10462 You may be reading the same group (or several related groups) from
10463 different @acronym{NNTP} servers.
10464
10465 @item
10466 You may be getting mail that duplicates articles posted to groups.
10467 @end enumerate
10468
10469 I'm sure there are other situations where @code{Xref} handling fails as
10470 well, but these four are the most common situations.
10471
10472 If, and only if, @code{Xref} handling fails for you, then you may
10473 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10474 will remember the @code{Message-ID}s of all articles you have read or
10475 otherwise marked as read, and then, as if by magic, mark them as read
10476 all subsequent times you see them---in @emph{all} groups.  Using this
10477 mechanism is quite likely to be somewhat inefficient, but not overly
10478 so.  It's certainly preferable to reading the same articles more than
10479 once.
10480
10481 Duplicate suppression is not a very subtle instrument.  It's more like a
10482 sledge hammer than anything else.  It works in a very simple
10483 fashion---if you have marked an article as read, it adds this Message-ID
10484 to a cache.  The next time it sees this Message-ID, it will mark the
10485 article as read with the @samp{M} mark.  It doesn't care what group it
10486 saw the article in.
10487
10488 @table @code
10489 @item gnus-suppress-duplicates
10490 @vindex gnus-suppress-duplicates
10491 If non-@code{nil}, suppress duplicates.
10492
10493 @item gnus-save-duplicate-list
10494 @vindex gnus-save-duplicate-list
10495 If non-@code{nil}, save the list of duplicates to a file.  This will
10496 make startup and shutdown take longer, so the default is @code{nil}.
10497 However, this means that only duplicate articles read in a single Gnus
10498 session are suppressed.
10499
10500 @item gnus-duplicate-list-length
10501 @vindex gnus-duplicate-list-length
10502 This variable says how many @code{Message-ID}s to keep in the duplicate
10503 suppression list.  The default is 10000.
10504
10505 @item gnus-duplicate-file
10506 @vindex gnus-duplicate-file
10507 The name of the file to store the duplicate suppression list in.  The
10508 default is @file{~/News/suppression}.
10509 @end table
10510
10511 If you have a tendency to stop and start Gnus often, setting
10512 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10513 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
10514 the other hand, saving the list makes startup and shutdown much slower,
10515 so that means that if you stop and start Gnus often, you should set
10516 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10517 to you to figure out, I think.
10518
10519 @node Security
10520 @section Security
10521
10522 Gnus is able to verify signed messages or decrypt encrypted messages.
10523 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
10524 and @acronym{S/MIME}, however you need some external programs to get
10525 things to work:
10526
10527 @enumerate
10528 @item
10529 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
10530 install an OpenPGP implementation such as GnuPG.  The Lisp interface
10531 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
10532 Manual}), but Mailcrypt and gpg.el are also supported.
10533
10534 @item
10535 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
10536 or newer is recommended.
10537
10538 @end enumerate
10539
10540 More information on how to set things up can be found in the message
10541 manual (@pxref{Security, ,Security, message, Message Manual}).
10542
10543 @table @code
10544 @item mm-verify-option
10545 @vindex mm-verify-option
10546 Option of verifying signed parts.  @code{never}, not verify;
10547 @code{always}, always verify; @code{known}, only verify known
10548 protocols. Otherwise, ask user.
10549
10550 @item mm-decrypt-option
10551 @vindex mm-decrypt-option
10552 Option of decrypting encrypted parts.  @code{never}, no decryption;
10553 @code{always}, always decrypt; @code{known}, only decrypt known
10554 protocols. Otherwise, ask user.
10555
10556 @item mml1991-use
10557 @vindex mml1991-use
10558 Symbol indicating elisp interface to OpenPGP implementation for
10559 @acronym{PGP} messages.  The default is @code{pgg}, but
10560 @code{mailcrypt} and @code{gpg} are also supported although
10561 deprecated.
10562
10563 @item mml2015-use
10564 @vindex mml2015-use
10565 Symbol indicating elisp interface to OpenPGP implementation for
10566 @acronym{PGP/MIME} messages.  The default is @code{pgg}, but
10567 @code{mailcrypt} and @code{gpg} are also supported although
10568 deprecated.
10569
10570 @end table
10571
10572 @cindex snarfing keys
10573 @cindex importing PGP keys
10574 @cindex PGP key ring import
10575 Snarfing OpenPGP keys (i.e., importing keys from articles into your
10576 key ring) is not supported explicitly through a menu item or command,
10577 rather Gnus do detect and label keys as @samp{application/pgp-keys},
10578 allowing you to specify whatever action you think is appropriate
10579 through the usual @acronym{MIME} infrastructure.  You can use a
10580 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
10581 Emacs MIME Manual}) such as the following to import keys using GNU
10582 Privacy Guard when you click on the @acronym{MIME} button
10583 (@pxref{Using MIME}).
10584
10585 @example
10586 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
10587 @end example
10588 @noindent
10589 This happens to also be the default action defined in
10590 @code{mailcap-mime-data}.
10591
10592 @node Mailing List
10593 @section Mailing List
10594 @cindex mailing list
10595 @cindex RFC 2396
10596
10597 @kindex A M (summary)
10598 @findex gnus-mailing-list-insinuate
10599 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10600 add a @code{to-list} group parameter (@pxref{Group Parameters}),
10601 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10602 summary buffer.
10603
10604 That enables the following commands to the summary buffer:
10605
10606 @table @kbd
10607
10608 @item C-c C-n h
10609 @kindex C-c C-n h (Summary)
10610 @findex gnus-mailing-list-help
10611 Send a message to fetch mailing list help, if List-Help field exists.
10612
10613 @item C-c C-n s
10614 @kindex C-c C-n s (Summary)
10615 @findex gnus-mailing-list-subscribe
10616 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10617
10618 @item C-c C-n u
10619 @kindex C-c C-n u (Summary)
10620 @findex gnus-mailing-list-unsubscribe
10621 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10622 field exists.
10623
10624 @item C-c C-n p
10625 @kindex C-c C-n p (Summary)
10626 @findex gnus-mailing-list-post
10627 Post to the mailing list, if List-Post field exists.
10628
10629 @item C-c C-n o
10630 @kindex C-c C-n o (Summary)
10631 @findex gnus-mailing-list-owner
10632 Send a message to the mailing list owner, if List-Owner field exists.
10633
10634 @item C-c C-n a
10635 @kindex C-c C-n a (Summary)
10636 @findex gnus-mailing-list-owner
10637 Browse the mailing list archive, if List-Archive field exists.
10638
10639 @end table
10640
10641
10642 @node Article Buffer
10643 @chapter Article Buffer
10644 @cindex article buffer
10645
10646 The articles are displayed in the article buffer, of which there is only
10647 one.  All the summary buffers share the same article buffer unless you
10648 tell Gnus otherwise.
10649
10650 @menu
10651 * Hiding Headers::              Deciding what headers should be displayed.
10652 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
10653 * Customizing Articles::        Tailoring the look of the articles.
10654 * Article Keymap::              Keystrokes available in the article buffer.
10655 * Misc Article::                Other stuff.
10656 @end menu
10657
10658
10659 @node Hiding Headers
10660 @section Hiding Headers
10661 @cindex hiding headers
10662 @cindex deleting headers
10663
10664 The top section of each article is the @dfn{head}.  (The rest is the
10665 @dfn{body}, but you may have guessed that already.)
10666
10667 @vindex gnus-show-all-headers
10668 There is a lot of useful information in the head: the name of the person
10669 who wrote the article, the date it was written and the subject of the
10670 article.  That's well and nice, but there's also lots of information
10671 most people do not want to see---what systems the article has passed
10672 through before reaching you, the @code{Message-ID}, the
10673 @code{References}, etc. ad nauseam---and you'll probably want to get rid
10674 of some of those lines.  If you want to keep all those lines in the
10675 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10676
10677 Gnus provides you with two variables for sifting headers:
10678
10679 @table @code
10680
10681 @item gnus-visible-headers
10682 @vindex gnus-visible-headers
10683 If this variable is non-@code{nil}, it should be a regular expression
10684 that says what headers you wish to keep in the article buffer.  All
10685 headers that do not match this variable will be hidden.
10686
10687 For instance, if you only want to see the name of the person who wrote
10688 the article and the subject, you'd say:
10689
10690 @lisp
10691 (setq gnus-visible-headers "^From:\\|^Subject:")
10692 @end lisp
10693
10694 This variable can also be a list of regexps to match headers to
10695 remain visible.
10696
10697 @item gnus-ignored-headers
10698 @vindex gnus-ignored-headers
10699 This variable is the reverse of @code{gnus-visible-headers}.  If this
10700 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10701 should be a regular expression that matches all lines that you want to
10702 hide.  All lines that do not match this variable will remain visible.
10703
10704 For instance, if you just want to get rid of the @code{References} line
10705 and the @code{Xref} line, you might say:
10706
10707 @lisp
10708 (setq gnus-ignored-headers "^References:\\|^Xref:")
10709 @end lisp
10710
10711 This variable can also be a list of regexps to match headers to
10712 be removed.
10713
10714 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10715 variable will have no effect.
10716
10717 @end table
10718
10719 @vindex gnus-sorted-header-list
10720 Gnus can also sort the headers for you.  (It does this by default.)  You
10721 can control the sorting by setting the @code{gnus-sorted-header-list}
10722 variable.  It is a list of regular expressions that says in what order
10723 the headers are to be displayed.
10724
10725 For instance, if you want the name of the author of the article first,
10726 and then the subject, you might say something like:
10727
10728 @lisp
10729 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10730 @end lisp
10731
10732 Any headers that are to remain visible, but are not listed in this
10733 variable, will be displayed in random order after all the headers listed in this variable.
10734
10735 @findex gnus-article-hide-boring-headers
10736 @vindex gnus-boring-article-headers
10737 You can hide further boring headers by setting
10738 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10739 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10740 list, but this list doesn't actually contain header names.  Instead is
10741 lists various @dfn{boring conditions} that Gnus can check and remove
10742 from sight.
10743
10744 These conditions are:
10745 @table @code
10746 @item empty
10747 Remove all empty headers.
10748 @item followup-to
10749 Remove the @code{Followup-To} header if it is identical to the
10750 @code{Newsgroups} header.
10751 @item reply-to
10752 Remove the @code{Reply-To} header if it lists the same address as the
10753 @code{From} header, or if the @code{broken-reply-to} group parameter is
10754 set.
10755 @item newsgroups
10756 Remove the @code{Newsgroups} header if it only contains the current group
10757 name.
10758 @item to-address
10759 Remove the @code{To} header if it only contains the address identical to
10760 the current group's @code{to-address} parameter.
10761 @item to-list
10762 Remove the @code{To} header if it only contains the address identical to
10763 the current group's @code{to-list} parameter.
10764 @item cc-list
10765 Remove the @code{CC} header if it only contains the address identical to
10766 the current group's @code{to-list} parameter.
10767 @item date
10768 Remove the @code{Date} header if the article is less than three days
10769 old.
10770 @item long-to
10771 Remove the @code{To} header if it is very long.
10772 @item many-to
10773 Remove all @code{To} headers if there are more than one.
10774 @end table
10775
10776 To include these three elements, you could say something like:
10777
10778 @lisp
10779 (setq gnus-boring-article-headers
10780       '(empty followup-to reply-to))
10781 @end lisp
10782
10783 This is also the default value for this variable.
10784
10785
10786 @node Using MIME
10787 @section Using MIME
10788 @cindex @acronym{MIME}
10789
10790 Mime is a standard for waving your hands through the air, aimlessly,
10791 while people stand around yawning.
10792
10793 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
10794 while all newsreaders die of fear.
10795
10796 @acronym{MIME} may specify what character set the article uses, the encoding
10797 of the characters, and it also makes it possible to embed pictures and
10798 other naughty stuff in innocent-looking articles.
10799
10800 @vindex gnus-display-mime-function
10801 @findex gnus-display-mime
10802 Gnus pushes @acronym{MIME} articles through @code{gnus-display-mime-function}
10803 to display the @acronym{MIME} parts.  This is @code{gnus-display-mime} by
10804 default, which creates a bundle of clickable buttons that can be used to
10805 display, save and manipulate the @acronym{MIME} objects.
10806
10807 The following commands are available when you have placed point over a
10808 @acronym{MIME} button:
10809
10810 @table @kbd
10811 @findex gnus-article-press-button
10812 @item RET (Article)
10813 @kindex RET (Article)
10814 @itemx BUTTON-2 (Article)
10815 Toggle displaying of the @acronym{MIME} object
10816 (@code{gnus-article-press-button}). If built-in viewers can not display
10817 the object, Gnus resorts to external viewers in the @file{mailcap}
10818 files.  If a viewer has the @samp{copiousoutput} specification, the
10819 object is displayed inline.
10820
10821 @findex gnus-mime-view-part
10822 @item M-RET (Article)
10823 @kindex M-RET (Article)
10824 @itemx v (Article)
10825 Prompt for a method, and then view the @acronym{MIME} object using this
10826 method (@code{gnus-mime-view-part}).
10827
10828 @findex gnus-mime-view-part-as-type
10829 @item t (Article)
10830 @kindex t (Article)
10831 View the @acronym{MIME} object as if it were a different @acronym{MIME} media type
10832 (@code{gnus-mime-view-part-as-type}).
10833
10834 @findex gnus-mime-view-part-as-charset
10835 @item C (Article)
10836 @kindex C (Article)
10837 Prompt for a charset, and then view the @acronym{MIME} object using this
10838 charset (@code{gnus-mime-view-part-as-charset}).
10839
10840 @findex gnus-mime-save-part
10841 @item o (Article)
10842 @kindex o (Article)
10843 Prompt for a file name, and then save the @acronym{MIME} object
10844 (@code{gnus-mime-save-part}).
10845
10846 @findex gnus-mime-save-part-and-strip
10847 @item C-o (Article)
10848 @kindex C-o (Article)
10849 Prompt for a file name, then save the @acronym{MIME} object and strip it from
10850 the article.  Then proceed to article editing, where a reasonable
10851 suggestion is being made on how the altered article should look
10852 like.  The stripped @acronym{MIME} object will be referred via the
10853 message/external-body @acronym{MIME} type.
10854 (@code{gnus-mime-save-part-and-strip}).
10855
10856 @findex gnus-mime-delete-part
10857 @item d (Article)
10858 @kindex d (Article)
10859 Delete the @acronym{MIME} object from the article and replace it with some
10860 information about the removed @acronym{MIME} object
10861 (@code{gnus-mime-delete-part}).
10862
10863 @findex gnus-mime-copy-part
10864 @item c (Article)
10865 @kindex c (Article)
10866 Copy the @acronym{MIME} object to a fresh buffer and display this buffer
10867 (@code{gnus-mime-copy-part}).  Compressed files like @file{.gz} and
10868 @file{.bz2} are automatically decompressed if
10869 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
10870 Accessing Compressed Files, emacs, The Emacs Editor}).
10871
10872 @findex gnus-mime-print-part
10873 @item p (Article)
10874 @kindex p (Article)
10875 Print the @acronym{MIME} object (@code{gnus-mime-print-part}).  This
10876 command respects the @samp{print=} specifications in the
10877 @file{.mailcap} file.
10878
10879 @findex gnus-mime-inline-part
10880 @item i (Article)
10881 @kindex i (Article)
10882 Insert the contents of the @acronym{MIME} object into the buffer
10883 (@code{gnus-mime-inline-part}) as text/plain.  If given a prefix, insert
10884 the raw contents without decoding.  If given a numerical prefix, you can
10885 do semi-manual charset stuff (see
10886 @code{gnus-summary-show-article-charset-alist} in @pxref{Paging the
10887 Article}).
10888
10889 @findex gnus-mime-view-part-internally
10890 @item E (Article)
10891 @kindex E (Article)
10892 View the @acronym{MIME} object with an internal viewer.  If no internal
10893 viewer is available, use an external viewer
10894 (@code{gnus-mime-view-part-internally}).
10895
10896 @findex gnus-mime-view-part-externally
10897 @item e (Article)
10898 @kindex e (Article)
10899 View the @acronym{MIME} object with an external viewer.
10900 (@code{gnus-mime-view-part-externally}).
10901
10902 @findex gnus-mime-pipe-part
10903 @item | (Article)
10904 @kindex | (Article)
10905 Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}).
10906
10907 @findex gnus-mime-action-on-part
10908 @item . (Article)
10909 @kindex . (Article)
10910 Interactively run an action on the @acronym{MIME} object
10911 (@code{gnus-mime-action-on-part}).
10912
10913 @end table
10914
10915 Gnus will display some @acronym{MIME} objects automatically.  The way Gnus
10916 determines which parts to do this with is described in the Emacs
10917 @acronym{MIME} manual.
10918
10919 It might be best to just use the toggling functions from the article
10920 buffer to avoid getting nasty surprises.  (For instance, you enter the
10921 group @samp{alt.sing-a-long} and, before you know it, @acronym{MIME} has
10922 decoded the sound file in the article and some horrible sing-a-long song
10923 comes screaming out your speakers, and you can't find the volume button,
10924 because there isn't one, and people are starting to look at you, and you
10925 try to stop the program, but you can't, and you can't find the program
10926 to control the volume, and everybody else in the room suddenly decides
10927 to look at you disdainfully, and you'll feel rather stupid.)
10928
10929 Any similarity to real events and people is purely coincidental.  Ahem.
10930
10931 Also see @pxref{MIME Commands}.
10932
10933
10934 @node Customizing Articles
10935 @section Customizing Articles
10936 @cindex article customization
10937
10938 A slew of functions for customizing how the articles are to look like
10939 exist.  You can call these functions interactively
10940 (@pxref{Article Washing}), or you can have them
10941 called automatically when you select the articles.
10942
10943 To have them called automatically, you should set the corresponding
10944 ``treatment'' variable.  For instance, to have headers hidden, you'd set
10945 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
10946 be set, but first we discuss the values these variables can have.
10947
10948 Note: Some values, while valid, make little sense.  Check the list below
10949 for sensible values.
10950
10951 @enumerate
10952 @item
10953 @code{nil}: Don't do this treatment.
10954
10955 @item
10956 @code{t}: Do this treatment on all body parts.
10957
10958 @item
10959 @code{head}: Do the treatment on the headers.
10960
10961 @item
10962 @code{last}: Do this treatment on the last part.
10963
10964 @item
10965 An integer: Do this treatment on all body parts that have a length less
10966 than this number.
10967
10968 @item
10969 A list of strings: Do this treatment on all body parts that are in
10970 articles that are read in groups that have names that match one of the
10971 regexps in the list.
10972
10973 @item
10974 A list where the first element is not a string:
10975
10976 The list is evaluated recursively.  The first element of the list is a
10977 predicate.  The following predicates are recognized: @code{or},
10978 @code{and}, @code{not} and @code{typep}.  Here's an example:
10979
10980 @lisp
10981 (or last
10982     (typep "text/x-vcard"))
10983 @end lisp
10984
10985 @end enumerate
10986
10987 You may have noticed that the word @dfn{part} is used here.  This refers
10988 to the fact that some messages are @acronym{MIME} multipart articles that may
10989 be divided into several parts.  Articles that are not multiparts are
10990 considered to contain just a single part.
10991
10992 @vindex gnus-article-treat-types
10993 Are the treatments applied to all sorts of multipart parts?  Yes, if you
10994 want to, but by default, only @samp{text/plain} parts are given the
10995 treatment.  This is controlled by the @code{gnus-article-treat-types}
10996 variable, which is a list of regular expressions that are matched to the
10997 type of the part.  This variable is ignored if the value of the
10998 controlling variable is a predicate list, as described above.
10999
11000 The following treatment options are available.  The easiest way to
11001 customize this is to examine the @code{gnus-article-treat} customization
11002 group.  Values in parenthesis are suggested sensible values.  Others are
11003 possible but those listed are probably sufficient for most people.
11004
11005 @table @code
11006 @item gnus-treat-buttonize (t, integer)
11007 @item gnus-treat-buttonize-head (head)
11008
11009 @xref{Article Buttons}.
11010
11011 @item gnus-treat-capitalize-sentences (t, integer)
11012 @item gnus-treat-overstrike (t, integer)
11013 @item gnus-treat-strip-cr (t, integer)
11014 @item gnus-treat-strip-headers-in-body (t, integer)
11015 @item gnus-treat-strip-leading-blank-lines (t, integer)
11016 @item gnus-treat-strip-multiple-blank-lines (t, integer)
11017 @item gnus-treat-strip-pem (t, last, integer)
11018 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
11019 @item gnus-treat-unsplit-urls (t, integer)
11020 @item gnus-treat-wash-html (t, integer)
11021
11022 @xref{Article Washing}.
11023
11024 @item gnus-treat-date-english (head)
11025 @item gnus-treat-date-iso8601 (head)
11026 @item gnus-treat-date-lapsed (head)
11027 @item gnus-treat-date-local (head)
11028 @item gnus-treat-date-original (head)
11029 @item gnus-treat-date-user-defined (head)
11030 @item gnus-treat-date-ut (head)
11031
11032 @xref{Article Date}.
11033
11034 @item gnus-treat-from-picon (head)
11035 @item gnus-treat-mail-picon (head)
11036 @item gnus-treat-newsgroups-picon (head)
11037
11038 @xref{Picons}.
11039
11040 @item gnus-treat-display-smileys (t, integer)
11041
11042 @item gnus-treat-body-boundary (head)
11043
11044 @vindex gnus-body-boundary-delimiter
11045 Adds a delimiter between header and body, the string used as delimiter
11046 is controlled by @code{gnus-body-boundary-delimiter}.
11047
11048 @xref{Smileys}.
11049
11050 @item gnus-treat-display-xface (head)
11051
11052 @xref{X-Face}.
11053
11054 @item gnus-treat-emphasize (t, head, integer)
11055 @item gnus-treat-fill-article (t, integer)
11056 @item gnus-treat-fill-long-lines (t, integer)
11057 @item gnus-treat-hide-boring-headers (head)
11058 @item gnus-treat-hide-citation (t, integer)
11059 @item gnus-treat-hide-citation-maybe (t, integer)
11060 @item gnus-treat-hide-headers (head)
11061 @item gnus-treat-hide-signature (t, last)
11062 @item gnus-treat-strip-banner (t, last)
11063 @item gnus-treat-strip-list-identifiers (head)
11064
11065 @xref{Article Hiding}.
11066
11067 @item gnus-treat-highlight-citation (t, integer)
11068 @item gnus-treat-highlight-headers (head)
11069 @item gnus-treat-highlight-signature (t, last, integer)
11070
11071 @xref{Article Highlighting}.
11072
11073 @item gnus-treat-play-sounds
11074 @item gnus-treat-translate
11075 @item gnus-treat-x-pgp-sig (head)
11076
11077 @item gnus-treat-unfold-headers (head)
11078 @item gnus-treat-fold-headers (head)
11079 @item gnus-treat-fold-newsgroups (head)
11080 @item gnus-treat-leading-whitespace (head)
11081
11082 @xref{Article Header}.
11083
11084
11085 @end table
11086
11087 @vindex gnus-part-display-hook
11088 You can, of course, write your own functions to be called from
11089 @code{gnus-part-display-hook}.  The functions are called narrowed to the
11090 part, and you can do anything you like, pretty much.  There is no
11091 information that you have to keep in the buffer---you can change
11092 everything.
11093
11094
11095 @node Article Keymap
11096 @section Article Keymap
11097
11098 Most of the keystrokes in the summary buffer can also be used in the
11099 article buffer.  They should behave as if you typed them in the summary
11100 buffer, which means that you don't actually have to have a summary
11101 buffer displayed while reading.  You can do it all from the article
11102 buffer.
11103
11104 A few additional keystrokes are available:
11105
11106 @table @kbd
11107
11108 @item SPACE
11109 @kindex SPACE (Article)
11110 @findex gnus-article-next-page
11111 Scroll forwards one page (@code{gnus-article-next-page}).
11112 This is exactly the same as @kbd{h SPACE h}.
11113
11114 @item DEL
11115 @kindex DEL (Article)
11116 @findex gnus-article-prev-page
11117 Scroll backwards one page (@code{gnus-article-prev-page}).
11118 This is exactly the same as @kbd{h DEL h}.
11119
11120 @item C-c ^
11121 @kindex C-c ^ (Article)
11122 @findex gnus-article-refer-article
11123 If point is in the neighborhood of a @code{Message-ID} and you press
11124 @kbd{C-c ^}, Gnus will try to get that article from the server
11125 (@code{gnus-article-refer-article}).
11126
11127 @item C-c C-m
11128 @kindex C-c C-m (Article)
11129 @findex gnus-article-mail
11130 Send a reply to the address near point (@code{gnus-article-mail}).  If
11131 given a prefix, include the mail.
11132
11133 @item s
11134 @kindex s (Article)
11135 @findex gnus-article-show-summary
11136 Reconfigure the buffers so that the summary buffer becomes visible
11137 (@code{gnus-article-show-summary}).
11138
11139 @item ?
11140 @kindex ? (Article)
11141 @findex gnus-article-describe-briefly
11142 Give a very brief description of the available keystrokes
11143 (@code{gnus-article-describe-briefly}).
11144
11145 @item TAB
11146 @kindex TAB (Article)
11147 @findex gnus-article-next-button
11148 Go to the next button, if any (@code{gnus-article-next-button}).  This
11149 only makes sense if you have buttonizing turned on.
11150
11151 @item M-TAB
11152 @kindex M-TAB (Article)
11153 @findex gnus-article-prev-button
11154 Go to the previous button, if any (@code{gnus-article-prev-button}).
11155
11156 @item R
11157 @kindex R (Article)
11158 @findex gnus-article-reply-with-original
11159 Send a reply to the current article and yank the current article
11160 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
11161 wide reply.  If the region is active, only yank the text in the
11162 region.
11163
11164 @item F
11165 @kindex F (Article)
11166 @findex gnus-article-followup-with-original
11167 Send a followup to the current article and yank the current article
11168 (@code{gnus-article-followup-with-original}).  If given a prefix, make
11169 a wide reply.  If the region is active, only yank the text in the
11170 region.
11171
11172
11173 @end table
11174
11175
11176 @node Misc Article
11177 @section Misc Article
11178
11179 @table @code
11180
11181 @item gnus-single-article-buffer
11182 @vindex gnus-single-article-buffer
11183 If non-@code{nil}, use the same article buffer for all the groups.
11184 (This is the default.)  If @code{nil}, each group will have its own
11185 article buffer.
11186
11187 @vindex gnus-article-decode-hook
11188 @item gnus-article-decode-hook
11189 @cindex @acronym{MIME}
11190 Hook used to decode @acronym{MIME} articles.  The default value is
11191 @code{(article-decode-charset article-decode-encoded-words)}
11192
11193 @vindex gnus-article-prepare-hook
11194 @item gnus-article-prepare-hook
11195 This hook is called right after the article has been inserted into the
11196 article buffer.  It is mainly intended for functions that do something
11197 depending on the contents; it should probably not be used for changing
11198 the contents of the article buffer.
11199
11200 @item gnus-article-mode-hook
11201 @vindex gnus-article-mode-hook
11202 Hook called in article mode buffers.
11203
11204 @item gnus-article-mode-syntax-table
11205 @vindex gnus-article-mode-syntax-table
11206 Syntax table used in article buffers.  It is initialized from
11207 @code{text-mode-syntax-table}.
11208
11209 @vindex gnus-article-over-scroll
11210 @item gnus-article-over-scroll
11211 If non-@code{nil}, allow scrolling the article buffer even when there
11212 no more new text to scroll in.  The default is @code{nil}.
11213
11214 @vindex gnus-article-mode-line-format
11215 @item gnus-article-mode-line-format
11216 This variable is a format string along the same lines as
11217 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
11218 accepts the same format specifications as that variable, with two
11219 extensions:
11220
11221 @table @samp
11222
11223 @item w
11224 The @dfn{wash status} of the article.  This is a short string with one
11225 character for each possible article wash operation that may have been
11226 performed.  The characters and their meaning:
11227
11228 @table @samp
11229
11230 @item c
11231 Displayed when cited text may be hidden in the article buffer.
11232
11233 @item h
11234 Displayed when headers are hidden in the article buffer.
11235
11236 @item p
11237 Displayed when article is digitally signed or encrypted, and Gnus has
11238 hidden the security headers.  (N.B. does not tell anything about
11239 security status, i.e. good or bad signature.)
11240
11241 @item s
11242 Displayed when the signature has been hidden in the Article buffer.
11243
11244 @item o
11245 Displayed when Gnus has treated overstrike characters in the article buffer.
11246
11247 @item e
11248 Displayed when Gnus has treated emphasised strings in the article buffer.
11249
11250 @end table
11251
11252 @item m
11253 The number of @acronym{MIME} parts in the article.
11254
11255 @end table
11256
11257 @vindex gnus-break-pages
11258
11259 @item gnus-break-pages
11260 Controls whether @dfn{page breaking} is to take place.  If this variable
11261 is non-@code{nil}, the articles will be divided into pages whenever a
11262 page delimiter appears in the article.  If this variable is @code{nil},
11263 paging will not be done.
11264
11265 @item gnus-page-delimiter
11266 @vindex gnus-page-delimiter
11267 This is the delimiter mentioned above.  By default, it is @samp{^L}
11268 (formfeed).
11269
11270 @cindex IDNA
11271 @cindex internationalized domain names
11272 @vindex gnus-use-idna
11273 @item gnus-use-idna
11274 This variable controls whether Gnus performs IDNA decoding of
11275 internationalized domain names inside @samp{From}, @samp{To} and
11276 @samp{Cc} headers.  This requires
11277 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
11278 variable is only enabled if you have installed it.
11279
11280 @end table
11281
11282
11283 @node Composing Messages
11284 @chapter Composing Messages
11285 @cindex composing messages
11286 @cindex messages
11287 @cindex mail
11288 @cindex sending mail
11289 @cindex reply
11290 @cindex followup
11291 @cindex post
11292 @cindex using gpg
11293 @cindex using s/mime
11294 @cindex using smime
11295
11296 @kindex C-c C-c (Post)
11297 All commands for posting and mailing will put you in a message buffer
11298 where you can edit the article all you like, before you send the
11299 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
11300 Message Manual}.  Where the message will be posted/mailed to depends
11301 on your setup (@pxref{Posting Server}).
11302
11303 @menu
11304 * Mail::                        Mailing and replying.
11305 * Posting Server::              What server should you post and mail via?
11306 * Mail and Post::               Mailing and posting at the same time.
11307 * Archived Messages::           Where Gnus stores the messages you've sent.
11308 * Posting Styles::              An easier way to specify who you are.
11309 * Drafts::                      Postponing messages and rejected messages.
11310 * Rejected Articles::           What happens if the server doesn't like your article?
11311 * Signing and encrypting::      How to compose secure messages.
11312 @end menu
11313
11314 Also see @pxref{Canceling and Superseding} for information on how to
11315 remove articles you shouldn't have posted.
11316
11317
11318 @node Mail
11319 @section Mail
11320
11321 Variables for customizing outgoing mail:
11322
11323 @table @code
11324 @item gnus-uu-digest-headers
11325 @vindex gnus-uu-digest-headers
11326 List of regexps to match headers included in digested messages.  The
11327 headers will be included in the sequence they are matched.  If
11328 @code{nil} include all headers.
11329
11330 @item gnus-add-to-list
11331 @vindex gnus-add-to-list
11332 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
11333 that have none when you do a @kbd{a}.
11334
11335 @item gnus-confirm-mail-reply-to-news
11336 @vindex gnus-confirm-mail-reply-to-news
11337 This can also be a function receiving the group name as the only
11338 parameter which should return non-@code{nil} if a confirmation is
11339 needed, or a regular expression matching group names, where
11340 confirmation is should be asked for.
11341
11342 If you find yourself never wanting to reply to mail, but occasionally
11343 press R anyway, this variable might be for you.
11344
11345 @item gnus-confirm-treat-mail-like-news
11346 @vindex gnus-confirm-treat-mail-like-news
11347 If non-@code{nil}, Gnus also requests confirmation according to
11348 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
11349 useful for treating mailing lists like newsgroups.
11350  
11351 @end table
11352
11353
11354 @node Posting Server
11355 @section Posting Server
11356
11357 When you press those magical @kbd{C-c C-c} keys to ship off your latest
11358 (extremely intelligent, of course) article, where does it go?
11359
11360 Thank you for asking.  I hate you.
11361
11362 It can be quite complicated.
11363
11364 @vindex gnus-post-method
11365 When posting news, Message usually invokes @code{message-send-news}
11366 (@pxref{News Variables, , News Variables, message, Message Manual}).
11367 Normally, Gnus will post using the same select method as you're
11368 reading from (which might be convenient if you're reading lots of
11369 groups from different private servers).  However.  If the server
11370 you're reading from doesn't allow posting, just reading, you probably
11371 want to use some other server to post your (extremely intelligent and
11372 fabulously interesting) articles.  You can then set the
11373 @code{gnus-post-method} to some other method:
11374
11375 @lisp
11376 (setq gnus-post-method '(nnspool ""))
11377 @end lisp
11378
11379 Now, if you've done this, and then this server rejects your article, or
11380 this server is down, what do you do then?  To override this variable you
11381 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
11382 the ``current'' server, to get back the default behavior, for posting.
11383
11384 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
11385 Gnus will prompt you for what method to use for posting.
11386
11387 You can also set @code{gnus-post-method} to a list of select methods.
11388 If that's the case, Gnus will always prompt you for what method to use
11389 for posting.
11390
11391 Finally, if you want to always post using the native select method,
11392 you can set this variable to @code{native}.
11393
11394 When sending mail, Message invokes @code{message-send-mail-function}.
11395 The default function, @code{message-send-mail-with-sendmail}, pipes
11396 your article to the @code{sendmail} binary for further queuing and
11397 sending.  When your local system is not configured for sending mail
11398 using @code{sendmail}, and you have access to a remote @acronym{SMTP}
11399 server, you can set @code{message-send-mail-function} to
11400 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
11401 package correctly.  An example:
11402
11403 @lisp
11404 (setq message-send-mail-function 'smtpmail-send-it
11405       smtpmail-default-smtp-server "YOUR SMTP HOST")
11406 @end lisp
11407
11408 To the thing similar to this, there is
11409 @code{message-smtpmail-send-it}.  It is useful if your ISP requires
11410 the @acronym{POP}-before-@acronym{SMTP} authentication.  See the
11411 documentation for the function @code{mail-source-touch-pop}.
11412
11413 Other possible choices for @code{message-send-mail-function} includes
11414 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11415 and @code{feedmail-send-it}.
11416
11417 @node Mail and Post
11418 @section Mail and Post
11419
11420 Here's a list of variables relevant to both mailing and
11421 posting:
11422
11423 @table @code
11424 @item gnus-mailing-list-groups
11425 @findex gnus-mailing-list-groups
11426 @cindex mailing lists
11427
11428 If your news server offers groups that are really mailing lists
11429 gatewayed to the @acronym{NNTP} server, you can read those groups without
11430 problems, but you can't post/followup to them without some difficulty.
11431 One solution is to add a @code{to-address} to the group parameters
11432 (@pxref{Group Parameters}).  An easier thing to do is set the
11433 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11434 really are mailing lists.  Then, at least, followups to the mailing
11435 lists will work most of the time.  Posting to these groups (@kbd{a}) is
11436 still a pain, though.
11437
11438 @item gnus-user-agent
11439 @vindex gnus-user-agent
11440 @cindex User-Agent
11441
11442 This variable controls which information should be exposed in the
11443 User-Agent header.  It can be one of the symbols @code{gnus} (show only
11444 Gnus version), @code{emacs-gnus} (show only Emacs and Gnus versions),
11445 @code{emacs-gnus-config} (same as @code{emacs-gnus} plus system
11446 configuration), @code{emacs-gnus-type} (same as @code{emacs-gnus} plus
11447 system type) or a custom string.  If you set it to a string, be sure to
11448 use a valid format, see RFC 2616.
11449
11450 @end table
11451
11452 You may want to do spell-checking on messages that you send out.  Or, if
11453 you don't want to spell-check by hand, you could add automatic
11454 spell-checking via the @code{ispell} package:
11455
11456 @cindex ispell
11457 @findex ispell-message
11458 @lisp
11459 (add-hook 'message-send-hook 'ispell-message)
11460 @end lisp
11461
11462 If you want to change the @code{ispell} dictionary based on what group
11463 you're in, you could say something like the following:
11464
11465 @lisp
11466 (add-hook 'gnus-select-group-hook
11467           (lambda ()
11468             (cond
11469              ((string-match
11470                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11471               (ispell-change-dictionary "deutsch"))
11472              (t
11473               (ispell-change-dictionary "english")))))
11474 @end lisp
11475
11476 Modify to suit your needs.
11477
11478
11479 @node Archived Messages
11480 @section Archived Messages
11481 @cindex archived messages
11482 @cindex sent messages
11483
11484 Gnus provides a few different methods for storing the mail and news you
11485 send.  The default method is to use the @dfn{archive virtual server} to
11486 store the messages.  If you want to disable this completely, the
11487 @code{gnus-message-archive-group} variable should be @code{nil}, which
11488 is the default.
11489
11490 For archiving interesting messages in a group you read, see the
11491 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11492 Group Commands}).
11493
11494 @vindex gnus-message-archive-method
11495 @code{gnus-message-archive-method} says what virtual server Gnus is to
11496 use to store sent messages.  The default is:
11497
11498 @lisp
11499 (nnfolder "archive"
11500           (nnfolder-directory   "~/Mail/archive")
11501           (nnfolder-active-file "~/Mail/archive/active")
11502           (nnfolder-get-new-mail nil)
11503           (nnfolder-inhibit-expiry t))
11504 @end lisp
11505
11506 You can, however, use any mail select method (@code{nnml},
11507 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11508 for doing this sort of thing, though.  If you don't like the default
11509 directory chosen, you could say something like:
11510
11511 @lisp
11512 (setq gnus-message-archive-method
11513       '(nnfolder "archive"
11514                  (nnfolder-inhibit-expiry t)
11515                  (nnfolder-active-file "~/News/sent-mail/active")
11516                  (nnfolder-directory "~/News/sent-mail/")))
11517 @end lisp
11518
11519 @vindex gnus-message-archive-group
11520 @cindex Gcc
11521 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11522 to one or more group(s) on that server.  Which group to use is
11523 determined by the @code{gnus-message-archive-group} variable.
11524
11525 This variable can be used to do the following:
11526
11527 @itemize @bullet
11528 @item
11529 a string
11530 Messages will be saved in that group.
11531
11532 Note that you can include a select method in the group name, then the
11533 message will not be stored in the select method given by
11534 @code{gnus-message-archive-method}, but in the select method specified
11535 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11536 has the default value shown above.  Then setting
11537 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11538 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11539 value @code{"nnml:foo"}, then outgoing messages will be stored in
11540 @samp{nnml:foo}.
11541 @item
11542 a list of strings
11543 Messages will be saved in all those groups.
11544 @item
11545 an alist of regexps, functions and forms
11546 When a key ``matches'', the result is used.
11547 @item
11548 @code{nil}
11549 No message archiving will take place.  This is the default.
11550 @end itemize
11551
11552 Let's illustrate:
11553
11554 Just saving to a single group called @samp{MisK}:
11555 @lisp
11556 (setq gnus-message-archive-group "MisK")
11557 @end lisp
11558
11559 Saving to two groups, @samp{MisK} and @samp{safe}:
11560 @lisp
11561 (setq gnus-message-archive-group '("MisK" "safe"))
11562 @end lisp
11563
11564 Save to different groups based on what group you are in:
11565 @lisp
11566 (setq gnus-message-archive-group
11567       '(("^alt" "sent-to-alt")
11568         ("mail" "sent-to-mail")
11569         (".*" "sent-to-misc")))
11570 @end lisp
11571
11572 More complex stuff:
11573 @lisp
11574 (setq gnus-message-archive-group
11575       '((if (message-news-p)
11576             "misc-news"
11577           "misc-mail")))
11578 @end lisp
11579
11580 How about storing all news messages in one file, but storing all mail
11581 messages in one file per month:
11582
11583 @lisp
11584 (setq gnus-message-archive-group
11585       '((if (message-news-p)
11586             "misc-news"
11587           (concat "mail." (format-time-string "%Y-%m")))))
11588 @end lisp
11589
11590 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11591 @c use a different value for @code{gnus-message-archive-group} there.)
11592
11593 Now, when you send a message off, it will be stored in the appropriate
11594 group.  (If you want to disable storing for just one particular message,
11595 you can just remove the @code{Gcc} header that has been inserted.)  The
11596 archive group will appear in the group buffer the next time you start
11597 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
11598 enter it and read the articles in it just like you'd read any other
11599 group.  If the group gets really big and annoying, you can simply rename
11600 if (using @kbd{G r} in the group buffer) to something
11601 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11602 continue to be stored in the old (now empty) group.
11603
11604 That's the default method of archiving sent messages.  Gnus offers a
11605 different way for the people who don't like the default method.  In that
11606 case you should set @code{gnus-message-archive-group} to @code{nil};
11607 this will disable archiving.
11608
11609 @table @code
11610 @item gnus-outgoing-message-group
11611 @vindex gnus-outgoing-message-group
11612 All outgoing messages will be put in this group.  If you want to store
11613 all your outgoing mail and articles in the group @samp{nnml:archive},
11614 you set this variable to that value.  This variable can also be a list of
11615 group names.
11616
11617 If you want to have greater control over what group to put each
11618 message in, you can set this variable to a function that checks the
11619 current newsgroup name and then returns a suitable group name (or list
11620 of names).
11621
11622 This variable can be used instead of @code{gnus-message-archive-group},
11623 but the latter is the preferred method.
11624
11625 @item gnus-gcc-mark-as-read
11626 @vindex gnus-gcc-mark-as-read
11627 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11628
11629 @item gnus-gcc-externalize-attachments
11630 @vindex gnus-gcc-externalize-attachments
11631 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11632 and matches the Gcc group name, attach files as external parts; if it is
11633 @code{all}, attach local files as external parts; if it is other
11634 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11635 changed in the future.
11636
11637 @end table
11638
11639
11640 @node Posting Styles
11641 @section Posting Styles
11642 @cindex posting styles
11643 @cindex styles
11644
11645 All them variables, they make my head swim.
11646
11647 So what if you want a different @code{Organization} and signature based
11648 on what groups you post to?  And you post both from your home machine
11649 and your work machine, and you want different @code{From} lines, and so
11650 on?
11651
11652 @vindex gnus-posting-styles
11653 One way to do stuff like that is to write clever hooks that change the
11654 variables you need to have changed.  That's a bit boring, so somebody
11655 came up with the bright idea of letting the user specify these things in
11656 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11657 variable:
11658
11659 @lisp
11660 ((".*"
11661   (signature "Peace and happiness")
11662   (organization "What me?"))
11663  ("^comp"
11664   (signature "Death to everybody"))
11665  ("comp.emacs.i-love-it"
11666   (organization "Emacs is it")))
11667 @end lisp
11668
11669 As you might surmise from this example, this alist consists of several
11670 @dfn{styles}.  Each style will be applicable if the first element
11671 ``matches'', in some form or other.  The entire alist will be iterated
11672 over, from the beginning towards the end, and each match will be
11673 applied, which means that attributes in later styles that match override
11674 the same attributes in earlier matching styles.  So
11675 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11676 signature and the @samp{What me?} @code{Organization} header.
11677
11678 The first element in each style is called the @code{match}.  If it's a
11679 string, then Gnus will try to regexp match it against the group name.
11680 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
11681 will look in the original article for a header whose name is
11682 @var{match} and compare that @var{regexp}.  @var{match} and
11683 @var{regexp} are strings.  (There original article is the one you are
11684 replying or following up to.  If you are not composing a reply or a
11685 followup, then there is nothing to match against.)  If the
11686 @code{match} is a function symbol, that function will be called with
11687 no arguments.  If it's a variable symbol, then the variable will be
11688 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11689 any case, if this returns a non-@code{nil} value, then the style is
11690 said to @dfn{match}.
11691
11692 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11693 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11694 attribute name can be one of @code{signature}, @code{signature-file},
11695 @code{x-face-file}, @code{address} (overriding
11696 @code{user-mail-address}), @code{name} (overriding
11697 @code{(user-full-name)}) or @code{body}.  The attribute name can also
11698 be a string or a symbol.  In that case, this will be used as a header
11699 name, and the value will be inserted in the headers of the article; if
11700 the value is @code{nil}, the header name will be removed.  If the
11701 attribute name is @code{eval}, the form is evaluated, and the result
11702 is thrown away.
11703
11704 The attribute value can be a string (used verbatim), a function with
11705 zero arguments (the return value will be used), a variable (its value
11706 will be used) or a list (it will be @code{eval}ed and the return value
11707 will be used).  The functions and sexps are called/@code{eval}ed in the
11708 message buffer that is being set up.  The headers of the current article
11709 are available through the @code{message-reply-headers} variable, which
11710 is a vector of the following headers: number subject from date id
11711 references chars lines xref extra.
11712
11713 @vindex message-reply-headers
11714
11715 If you wish to check whether the message you are about to compose is
11716 meant to be a news article or a mail message, you can check the values
11717 of the @code{message-news-p} and @code{message-mail-p} functions.
11718
11719 @findex message-mail-p
11720 @findex message-news-p
11721
11722 So here's a new example:
11723
11724 @lisp
11725 (setq gnus-posting-styles
11726       '((".*"
11727          (signature-file "~/.signature")
11728          (name "User Name")
11729          ("X-Home-Page" (getenv "WWW_HOME"))
11730          (organization "People's Front Against MWM"))
11731         ("^rec.humor"
11732          (signature my-funny-signature-randomizer))
11733         ((equal (system-name) "gnarly")  ;; @r{A form}
11734          (signature my-quote-randomizer))
11735         (message-news-p        ;; @r{A function symbol}
11736          (signature my-news-signature))
11737         (window-system         ;; @r{A value symbol}
11738          ("X-Window-System" (format "%s" window-system)))
11739         ;; @r{If I'm replying to Larsi, set the Organization header.}
11740         ((header "from" "larsi.*org")
11741          (Organization "Somewhere, Inc."))
11742         ((posting-from-work-p) ;; @r{A user defined function}
11743          (signature-file "~/.work-signature")
11744          (address "user@@bar.foo")
11745          (body "You are fired.\n\nSincerely, your boss.")
11746          (organization "Important Work, Inc"))
11747         ("nnml:.*"
11748          (From (save-excursion
11749                  (set-buffer gnus-article-buffer)
11750                  (message-fetch-field "to"))))
11751         ("^nn.+:"
11752          (signature-file "~/.mail-signature"))))
11753 @end lisp
11754
11755 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11756 @code{From} address in all your outgoing replies, which might be handy
11757 if you fill many roles.
11758
11759
11760 @node Drafts
11761 @section Drafts
11762 @cindex drafts
11763
11764 If you are writing a message (mail or news) and suddenly remember that
11765 you have a steak in the oven (or some pesto in the food processor, you
11766 craaazy vegetarians), you'll probably wish there was a method to save
11767 the message you are writing so that you can continue editing it some
11768 other day, and send it when you feel its finished.
11769
11770 Well, don't worry about it.  Whenever you start composing a message of
11771 some sort using the Gnus mail and post commands, the buffer you get will
11772 automatically associate to an article in a special @dfn{draft} group.
11773 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11774 article will be saved there.  (Auto-save files also go to the draft
11775 group.)
11776
11777 @cindex nndraft
11778 @vindex nndraft-directory
11779 The draft group is a special group (which is implemented as an
11780 @code{nndraft} group, if you absolutely have to know) called
11781 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11782 @code{nndraft} is to store its files.  What makes this group special is
11783 that you can't tick any articles in it or mark any articles as
11784 read---all articles in the group are permanently unread.
11785
11786 If the group doesn't exist, it will be created and you'll be subscribed
11787 to it.  The only way to make it disappear from the Group buffer is to
11788 unsubscribe it.  The special properties of the draft group comes from
11789 a group property (@pxref{Group Parameters}), and if lost the group
11790 behaves like any other group.  This means the commands below will not
11791 be available.  To restore the special properties of the group, the
11792 simplest way is to kill the group, using @kbd{C-k}, and restart
11793 Gnus.  The group is automatically created again with the
11794 correct parameters.  The content of the group is not lost.
11795
11796 @c @findex gnus-dissociate-buffer-from-draft
11797 @c @kindex C-c M-d (Mail)
11798 @c @kindex C-c M-d (Post)
11799 @c @findex gnus-associate-buffer-with-draft
11800 @c @kindex C-c C-d (Mail)
11801 @c @kindex C-c C-d (Post)
11802 @c If you're writing some super-secret message that you later want to
11803 @c encode with PGP before sending, you may wish to turn the auto-saving
11804 @c (and association with the draft group) off.  You never know who might be
11805 @c interested in reading all your extremely valuable and terribly horrible
11806 @c and interesting secrets.  The @kbd{C-c M-d}
11807 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11808 @c If you change your mind and want to turn the auto-saving back on again,
11809 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11810 @c
11811 @c @vindex gnus-use-draft
11812 @c To leave association with the draft group off by default, set
11813 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11814
11815 @findex gnus-draft-edit-message
11816 @kindex D e (Draft)
11817 When you want to continue editing the article, you simply enter the
11818 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11819 that.  You will be placed in a buffer where you left off.
11820
11821 Rejected articles will also be put in this draft group (@pxref{Rejected
11822 Articles}).
11823
11824 @findex gnus-draft-send-all-messages
11825 @kindex D s (Draft)
11826 @findex gnus-draft-send-message
11827 @kindex D S (Draft)
11828 If you have lots of rejected messages you want to post (or mail) without
11829 doing further editing, you can use the @kbd{D s} command
11830 (@code{gnus-draft-send-message}).  This command understands the
11831 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11832 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11833 in the buffer.
11834
11835 @findex gnus-draft-toggle-sending
11836 @kindex D t (Draft)
11837 If you have some messages that you wish not to send, you can use the
11838 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11839 as unsendable.  This is a toggling command.
11840
11841
11842 @node Rejected Articles
11843 @section Rejected Articles
11844 @cindex rejected articles
11845
11846 Sometimes a news server will reject an article.  Perhaps the server
11847 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11848 @emph{there be demons}.  Perhaps you have included too much cited text.
11849 Perhaps the disk is full.  Perhaps the server is down.
11850
11851 These situations are, of course, totally beyond the control of Gnus.
11852 (Gnus, of course, loves the way you look, always feels great, has angels
11853 fluttering around inside of it, doesn't care about how much cited text
11854 you include, never runs full and never goes down.)  So Gnus saves these
11855 articles until some later time when the server feels better.
11856
11857 The rejected articles will automatically be put in a special draft group
11858 (@pxref{Drafts}).  When the server comes back up again, you'd then
11859 typically enter that group and send all the articles off.
11860
11861 @node Signing and encrypting
11862 @section Signing and encrypting
11863 @cindex using gpg
11864 @cindex using s/mime
11865 @cindex using smime
11866
11867 Gnus can digitally sign and encrypt your messages, using vanilla
11868 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
11869 decoding such messages, see the @code{mm-verify-option} and
11870 @code{mm-decrypt-option} options (@pxref{Security}).
11871
11872 @vindex gnus-message-replysign
11873 @vindex gnus-message-replyencrypt
11874 @vindex gnus-message-replysignencrypted
11875 Often, you would like to sign replies to people who send you signed
11876 messages.  Even more often, you might want to encrypt messages which
11877 are in reply to encrypted messages.  Gnus offers
11878 @code{gnus-message-replysign} to enable the former, and
11879 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11880 @code{gnus-message-replysignencrypted} (on by default) will sign
11881 automatically encrypted messages.
11882
11883 Instructing MML to perform security operations on a @acronym{MIME} part is
11884 done using the @kbd{C-c C-m s} key map for signing and the @kbd{C-c
11885 C-m c} key map for encryption, as follows.
11886
11887 @table @kbd
11888
11889 @item C-c C-m s s
11890 @kindex C-c C-m s s
11891 @findex mml-secure-message-sign-smime
11892
11893 Digitally sign current message using @acronym{S/MIME}.
11894
11895 @item C-c C-m s o
11896 @kindex C-c C-m s o
11897 @findex mml-secure-message-sign-pgp
11898
11899 Digitally sign current message using @acronym{PGP}.
11900
11901 @item C-c C-m s p
11902 @kindex C-c C-m s p
11903 @findex mml-secure-message-sign-pgp
11904
11905 Digitally sign current message using @acronym{PGP/MIME}.
11906
11907 @item C-c C-m c s
11908 @kindex C-c C-m c s
11909 @findex mml-secure-message-encrypt-smime
11910
11911 Digitally encrypt current message using @acronym{S/MIME}.
11912
11913 @item C-c C-m c o
11914 @kindex C-c C-m c o
11915 @findex mml-secure-message-encrypt-pgp
11916
11917 Digitally encrypt current message using @acronym{PGP}.
11918
11919 @item C-c C-m c p
11920 @kindex C-c C-m c p
11921 @findex mml-secure-message-encrypt-pgpmime
11922
11923 Digitally encrypt current message using @acronym{PGP/MIME}.
11924
11925 @item C-c C-m C-n
11926 @kindex C-c C-m C-n
11927 @findex mml-unsecure-message
11928 Remove security related MML tags from message.
11929
11930 @end table
11931
11932 @xref{Security, ,Security, message, Message Manual}, for more information.
11933
11934 @node Select Methods
11935 @chapter Select Methods
11936 @cindex foreign groups
11937 @cindex select methods
11938
11939 A @dfn{foreign group} is a group not read by the usual (or
11940 default) means.  It could be, for instance, a group from a different
11941 @acronym{NNTP} server, it could be a virtual group, or it could be your own
11942 personal mail group.
11943
11944 A foreign group (or any group, really) is specified by a @dfn{name} and
11945 a @dfn{select method}.  To take the latter first, a select method is a
11946 list where the first element says what back end to use (e.g. @code{nntp},
11947 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
11948 name}.  There may be additional elements in the select method, where the
11949 value may have special meaning for the back end in question.
11950
11951 One could say that a select method defines a @dfn{virtual server}---so
11952 we do just that (@pxref{Server Buffer}).
11953
11954 The @dfn{name} of the group is the name the back end will recognize the
11955 group as.
11956
11957 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
11958 @samp{some.where.edu} will have the name @samp{soc.motss} and select
11959 method @code{(nntp "some.where.edu")}.  Gnus will call this group
11960 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
11961 back end just knows this group as @samp{soc.motss}.
11962
11963 The different methods all have their peculiarities, of course.
11964
11965 @menu
11966 * Server Buffer::               Making and editing virtual servers.
11967 * Getting News::                Reading USENET news with Gnus.
11968 * Getting Mail::                Reading your personal mail with Gnus.
11969 * Browsing the Web::            Getting messages from a plethora of Web sources.
11970 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
11971 * Other Sources::               Reading directories, files, SOUP packets.
11972 * Combined Groups::             Combining groups into one group.
11973 * Gnus Unplugged::              Reading news and mail offline.
11974 @end menu
11975
11976
11977 @node Server Buffer
11978 @section Server Buffer
11979
11980 Traditionally, a @dfn{server} is a machine or a piece of software that
11981 one connects to, and then requests information from.  Gnus does not
11982 connect directly to any real servers, but does all transactions through
11983 one back end or other.  But that's just putting one layer more between
11984 the actual media and Gnus, so we might just as well say that each
11985 back end represents a virtual server.
11986
11987 For instance, the @code{nntp} back end may be used to connect to several
11988 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
11989 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
11990 use, and what parameters to set by specifying a @dfn{select method}.
11991
11992 These select method specifications can sometimes become quite
11993 complicated---say, for instance, that you want to read from the
11994 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
11995 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
11996 Anyway, if you had to specify that for each group that used this
11997 server, that would be too much work, so Gnus offers a way of naming
11998 select methods, which is what you do in the server buffer.
11999
12000 To enter the server buffer, use the @kbd{^}
12001 (@code{gnus-group-enter-server-mode}) command in the group buffer.
12002
12003 @menu
12004 * Server Buffer Format::        You can customize the look of this buffer.
12005 * Server Commands::             Commands to manipulate servers.
12006 * Example Methods::             Examples server specifications.
12007 * Creating a Virtual Server::   An example session.
12008 * Server Variables::            Which variables to set.
12009 * Servers and Methods::         You can use server names as select methods.
12010 * Unavailable Servers::         Some servers you try to contact may be down.
12011 @end menu
12012
12013 @vindex gnus-server-mode-hook
12014 @code{gnus-server-mode-hook} is run when creating the server buffer.
12015
12016
12017 @node Server Buffer Format
12018 @subsection Server Buffer Format
12019 @cindex server buffer format
12020
12021 @vindex gnus-server-line-format
12022 You can change the look of the server buffer lines by changing the
12023 @code{gnus-server-line-format} variable.  This is a @code{format}-like
12024 variable, with some simple extensions:
12025
12026 @table @samp
12027
12028 @item h
12029 How the news is fetched---the back end name.
12030
12031 @item n
12032 The name of this server.
12033
12034 @item w
12035 Where the news is to be fetched from---the address.
12036
12037 @item s
12038 The opened/closed/denied status of the server.
12039 @end table
12040
12041 @vindex gnus-server-mode-line-format
12042 The mode line can also be customized by using the
12043 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
12044 Formatting}).  The following specs are understood:
12045
12046 @table @samp
12047 @item S
12048 Server name.
12049
12050 @item M
12051 Server method.
12052 @end table
12053
12054 Also @pxref{Formatting Variables}.
12055
12056
12057 @node Server Commands
12058 @subsection Server Commands
12059 @cindex server commands
12060
12061 @table @kbd
12062
12063 @item a
12064 @kindex a (Server)
12065 @findex gnus-server-add-server
12066 Add a new server (@code{gnus-server-add-server}).
12067
12068 @item e
12069 @kindex e (Server)
12070 @findex gnus-server-edit-server
12071 Edit a server (@code{gnus-server-edit-server}).
12072
12073 @item SPACE
12074 @kindex SPACE (Server)
12075 @findex gnus-server-read-server
12076 Browse the current server (@code{gnus-server-read-server}).
12077
12078 @item q
12079 @kindex q (Server)
12080 @findex gnus-server-exit
12081 Return to the group buffer (@code{gnus-server-exit}).
12082
12083 @item k
12084 @kindex k (Server)
12085 @findex gnus-server-kill-server
12086 Kill the current server (@code{gnus-server-kill-server}).
12087
12088 @item y
12089 @kindex y (Server)
12090 @findex gnus-server-yank-server
12091 Yank the previously killed server (@code{gnus-server-yank-server}).
12092
12093 @item c
12094 @kindex c (Server)
12095 @findex gnus-server-copy-server
12096 Copy the current server (@code{gnus-server-copy-server}).
12097
12098 @item l
12099 @kindex l (Server)
12100 @findex gnus-server-list-servers
12101 List all servers (@code{gnus-server-list-servers}).
12102
12103 @item s
12104 @kindex s (Server)
12105 @findex gnus-server-scan-server
12106 Request that the server scan its sources for new articles
12107 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
12108 servers.
12109
12110 @item g
12111 @kindex g (Server)
12112 @findex gnus-server-regenerate-server
12113 Request that the server regenerate all its data structures
12114 (@code{gnus-server-regenerate-server}).  This can be useful if you have
12115 a mail back end that has gotten out of sync.
12116
12117 @end table
12118
12119
12120 @node Example Methods
12121 @subsection Example Methods
12122
12123 Most select methods are pretty simple and self-explanatory:
12124
12125 @lisp
12126 (nntp "news.funet.fi")
12127 @end lisp
12128
12129 Reading directly from the spool is even simpler:
12130
12131 @lisp
12132 (nnspool "")
12133 @end lisp
12134
12135 As you can see, the first element in a select method is the name of the
12136 back end, and the second is the @dfn{address}, or @dfn{name}, if you
12137 will.
12138
12139 After these two elements, there may be an arbitrary number of
12140 @code{(@var{variable} @var{form})} pairs.
12141
12142 To go back to the first example---imagine that you want to read from
12143 port 15 on that machine.  This is what the select method should
12144 look like then:
12145
12146 @lisp
12147 (nntp "news.funet.fi" (nntp-port-number 15))
12148 @end lisp
12149
12150 You should read the documentation to each back end to find out what
12151 variables are relevant, but here's an @code{nnmh} example:
12152
12153 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
12154 you have two structures that you wish to access: One is your private
12155 mail spool, and the other is a public one.  Here's the possible spec for
12156 your private mail:
12157
12158 @lisp
12159 (nnmh "private" (nnmh-directory "~/private/mail/"))
12160 @end lisp
12161
12162 (This server is then called @samp{private}, but you may have guessed
12163 that.)
12164
12165 Here's the method for a public spool:
12166
12167 @lisp
12168 (nnmh "public"
12169       (nnmh-directory "/usr/information/spool/")
12170       (nnmh-get-new-mail nil))
12171 @end lisp
12172
12173 @cindex proxy
12174 @cindex firewall
12175
12176 If you are behind a firewall and only have access to the @acronym{NNTP}
12177 server from the firewall machine, you can instruct Gnus to @code{rlogin}
12178 on the firewall machine and telnet from there to the @acronym{NNTP} server.
12179 Doing this can be rather fiddly, but your virtual server definition
12180 should probably look something like this:
12181
12182 @lisp
12183 (nntp "firewall"
12184       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
12185       (nntp-via-address "the.firewall.machine")
12186       (nntp-address "the.real.nntp.host")
12187       (nntp-end-of-line "\n"))
12188 @end lisp
12189
12190 If you want to use the wonderful @code{ssh} program to provide a
12191 compressed connection over the modem line, you could add the following
12192 configuration to the example above:
12193
12194 @lisp
12195       (nntp-via-rlogin-command "ssh")
12196 @end lisp
12197
12198 See also @code{nntp-via-rlogin-command-switches}.
12199
12200 If you're behind a firewall, but have direct access to the outside world
12201 through a wrapper command like "runsocks", you could open a socksified
12202 telnet connection to the news server as follows:
12203
12204 @lisp
12205 (nntp "outside"
12206       (nntp-pre-command "runsocks")
12207       (nntp-open-connection-function nntp-open-via-telnet)
12208       (nntp-address "the.news.server")
12209       (nntp-end-of-line "\n"))
12210 @end lisp
12211
12212 This means that you have to have set up @code{ssh-agent} correctly to
12213 provide automatic authorization, of course.  And to get a compressed
12214 connection, you have to have the @samp{Compression} option in the
12215 @code{ssh} @file{config} file.
12216
12217
12218 @node Creating a Virtual Server
12219 @subsection Creating a Virtual Server
12220
12221 If you're saving lots of articles in the cache by using persistent
12222 articles, you may want to create a virtual server to read the cache.
12223
12224 First you need to add a new server.  The @kbd{a} command does that.  It
12225 would probably be best to use @code{nnspool} to read the cache.  You
12226 could also use @code{nnml} or @code{nnmh}, though.
12227
12228 Type @kbd{a nnspool RET cache RET}.
12229
12230 You should now have a brand new @code{nnspool} virtual server called
12231 @samp{cache}.  You now need to edit it to have the right definitions.
12232 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
12233 will contain the following:
12234
12235 @lisp
12236 (nnspool "cache")
12237 @end lisp
12238
12239 Change that to:
12240
12241 @lisp
12242 (nnspool "cache"
12243          (nnspool-spool-directory "~/News/cache/")
12244          (nnspool-nov-directory "~/News/cache/")
12245          (nnspool-active-file "~/News/cache/active"))
12246 @end lisp
12247
12248 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
12249 @kbd{RET} over this virtual server, you should be entered into a browse
12250 buffer, and you should be able to enter any of the groups displayed.
12251
12252
12253 @node Server Variables
12254 @subsection Server Variables
12255 @cindex server variables
12256 @cindex server parameters
12257
12258 One sticky point when defining variables (both on back ends and in Emacs
12259 in general) is that some variables are typically initialized from other
12260 variables when the definition of the variables is being loaded.  If you
12261 change the ``base'' variable after the variables have been loaded, you
12262 won't change the ``derived'' variables.
12263
12264 This typically affects directory and file variables.  For instance,
12265 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
12266 directory variables are initialized from that variable, so
12267 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
12268 new virtual @code{nnml} server, it will @emph{not} suffice to set just
12269 @code{nnml-directory}---you have to explicitly set all the file
12270 variables to be what you want them to be.  For a complete list of
12271 variables for each back end, see each back end's section later in this
12272 manual, but here's an example @code{nnml} definition:
12273
12274 @lisp
12275 (nnml "public"
12276       (nnml-directory "~/my-mail/")
12277       (nnml-active-file "~/my-mail/active")
12278       (nnml-newsgroups-file "~/my-mail/newsgroups"))
12279 @end lisp
12280
12281 Server variables are often called @dfn{server parameters}.
12282
12283 @node Servers and Methods
12284 @subsection Servers and Methods
12285
12286 Wherever you would normally use a select method
12287 (e.g. @code{gnus-secondary-select-method}, in the group select method,
12288 when browsing a foreign server) you can use a virtual server name
12289 instead.  This could potentially save lots of typing.  And it's nice all
12290 over.
12291
12292
12293 @node Unavailable Servers
12294 @subsection Unavailable Servers
12295
12296 If a server seems to be unreachable, Gnus will mark that server as
12297 @code{denied}.  That means that any subsequent attempt to make contact
12298 with that server will just be ignored.  ``It can't be opened,'' Gnus
12299 will tell you, without making the least effort to see whether that is
12300 actually the case or not.
12301
12302 That might seem quite naughty, but it does make sense most of the time.
12303 Let's say you have 10 groups subscribed to on server
12304 @samp{nephelococcygia.com}.  This server is located somewhere quite far
12305 away from you and the machine is quite slow, so it takes 1 minute just
12306 to find out that it refuses connection to you today.  If Gnus were to
12307 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
12308 attempt to do that.  Once it has gotten a single ``connection refused'',
12309 it will regard that server as ``down''.
12310
12311 So, what happens if the machine was only feeling unwell temporarily?
12312 How do you test to see whether the machine has come up again?
12313
12314 You jump to the server buffer (@pxref{Server Buffer}) and poke it
12315 with the following commands:
12316
12317 @table @kbd
12318
12319 @item O
12320 @kindex O (Server)
12321 @findex gnus-server-open-server
12322 Try to establish connection to the server on the current line
12323 (@code{gnus-server-open-server}).
12324
12325 @item C
12326 @kindex C (Server)
12327 @findex gnus-server-close-server
12328 Close the connection (if any) to the server
12329 (@code{gnus-server-close-server}).
12330
12331 @item D
12332 @kindex D (Server)
12333 @findex gnus-server-deny-server
12334 Mark the current server as unreachable
12335 (@code{gnus-server-deny-server}).
12336
12337 @item M-o
12338 @kindex M-o (Server)
12339 @findex gnus-server-open-all-servers
12340 Open the connections to all servers in the buffer
12341 (@code{gnus-server-open-all-servers}).
12342
12343 @item M-c
12344 @kindex M-c (Server)
12345 @findex gnus-server-close-all-servers
12346 Close the connections to all servers in the buffer
12347 (@code{gnus-server-close-all-servers}).
12348
12349 @item R
12350 @kindex R (Server)
12351 @findex gnus-server-remove-denials
12352 Remove all marks to whether Gnus was denied connection from any servers
12353 (@code{gnus-server-remove-denials}).
12354
12355 @item L
12356 @kindex L (Server)
12357 @findex gnus-server-offline-server
12358 Set server status to offline (@code{gnus-server-offline-server}).
12359
12360 @end table
12361
12362
12363 @node Getting News
12364 @section Getting News
12365 @cindex reading news
12366 @cindex news back ends
12367
12368 A newsreader is normally used for reading news.  Gnus currently provides
12369 only two methods of getting news---it can read from an @acronym{NNTP} server,
12370 or it can read from a local spool.
12371
12372 @menu
12373 * NNTP::                        Reading news from an @acronym{NNTP} server.
12374 * News Spool::                  Reading news from the local spool.
12375 @end menu
12376
12377
12378 @node NNTP
12379 @subsection NNTP
12380 @cindex nntp
12381
12382 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
12383 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
12384 server as the, uhm, address.
12385
12386 If the @acronym{NNTP} server is located at a non-standard port, setting the
12387 third element of the select method to this port number should allow you
12388 to connect to the right port.  You'll have to edit the group info for
12389 that (@pxref{Foreign Groups}).
12390
12391 The name of the foreign group can be the same as a native group.  In
12392 fact, you can subscribe to the same group from as many different servers
12393 you feel like.  There will be no name collisions.
12394
12395 The following variables can be used to create a virtual @code{nntp}
12396 server:
12397
12398 @table @code
12399
12400 @item nntp-server-opened-hook
12401 @vindex nntp-server-opened-hook
12402 @cindex @sc{mode reader}
12403 @cindex authinfo
12404 @cindex authentification
12405 @cindex nntp authentification
12406 @findex nntp-send-authinfo
12407 @findex nntp-send-mode-reader
12408 is run after a connection has been made.  It can be used to send
12409 commands to the @acronym{NNTP} server after it has been contacted.  By
12410 default it sends the command @code{MODE READER} to the server with the
12411 @code{nntp-send-mode-reader} function.  This function should always be
12412 present in this hook.
12413
12414 @item nntp-authinfo-function
12415 @vindex nntp-authinfo-function
12416 @findex nntp-send-authinfo
12417 @vindex nntp-authinfo-file
12418 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
12419 server.  The default function is @code{nntp-send-authinfo}, which looks
12420 through your @file{~/.authinfo} (or whatever you've set the
12421 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
12422 are found, it will prompt you for a login name and a password.  The
12423 format of the @file{~/.authinfo} file is (almost) the same as the
12424 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
12425 manual page, but here are the salient facts:
12426
12427 @enumerate
12428 @item
12429 The file contains one or more line, each of which define one server.
12430
12431 @item
12432 Each line may contain an arbitrary number of token/value pairs.
12433
12434 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12435 @samp{default}.  In addition Gnus introduces two new tokens, not present
12436 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12437 @samp{force}.  (This is the only way the @file{.authinfo} file format
12438 deviates from the @file{.netrc} file format.)  @samp{port} is used to
12439 indicate what port on the server the credentials apply to and
12440 @samp{force} is explained below.
12441
12442 @end enumerate
12443
12444 Here's an example file:
12445
12446 @example
12447 machine news.uio.no login larsi password geheimnis
12448 machine nntp.ifi.uio.no login larsi force yes
12449 @end example
12450
12451 The token/value pairs may appear in any order; @samp{machine} doesn't
12452 have to be first, for instance.
12453
12454 In this example, both login name and password have been supplied for the
12455 former server, while the latter has only the login name listed, and the
12456 user will be prompted for the password.  The latter also has the
12457 @samp{force} tag, which means that the authinfo will be sent to the
12458 @var{nntp} server upon connection; the default (i.e., when there is not
12459 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12460 until the @var{nntp} server asks for it.
12461
12462 You can also add @samp{default} lines that will apply to all servers
12463 that don't have matching @samp{machine} lines.
12464
12465 @example
12466 default force yes
12467 @end example
12468
12469 This will force sending @samp{AUTHINFO} commands to all servers not
12470 previously mentioned.
12471
12472 Remember to not leave the @file{~/.authinfo} file world-readable.
12473
12474 @item nntp-server-action-alist
12475 @vindex nntp-server-action-alist
12476 This is a list of regexps to match on server types and actions to be
12477 taken when matches are made.  For instance, if you want Gnus to beep
12478 every time you connect to innd, you could say something like:
12479
12480 @lisp
12481 (setq nntp-server-action-alist
12482       '(("innd" (ding))))
12483 @end lisp
12484
12485 You probably don't want to do that, though.
12486
12487 The default value is
12488
12489 @lisp
12490 '(("nntpd 1\\.5\\.11t"
12491    (remove-hook 'nntp-server-opened-hook
12492                 'nntp-send-mode-reader)))
12493 @end lisp
12494
12495 This ensures that Gnus doesn't send the @code{MODE READER} command to
12496 nntpd 1.5.11t, since that command chokes that server, I've been told.
12497
12498 @item nntp-maximum-request
12499 @vindex nntp-maximum-request
12500 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
12501 will collect headers by sending a series of @code{head} commands.  To
12502 speed things up, the back end sends lots of these commands without
12503 waiting for reply, and then reads all the replies.  This is controlled
12504 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12505 your network is buggy, you should set this to 1.
12506
12507 @item nntp-connection-timeout
12508 @vindex nntp-connection-timeout
12509 If you have lots of foreign @code{nntp} groups that you connect to
12510 regularly, you're sure to have problems with @acronym{NNTP} servers not
12511 responding properly, or being too loaded to reply within reasonable
12512 time.  This is can lead to awkward problems, which can be helped
12513 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12514 that says how many seconds the @code{nntp} back end should wait for a
12515 connection before giving up.  If it is @code{nil}, which is the default,
12516 no timeouts are done.
12517
12518 @c @item nntp-command-timeout
12519 @c @vindex nntp-command-timeout
12520 @c @cindex PPP connections
12521 @c @cindex dynamic IP addresses
12522 @c If you're running Gnus on a machine that has a dynamically assigned
12523 @c address, Gnus may become confused.  If the address of your machine
12524 @c changes after connecting to the @acronym{NNTP} server, Gnus will simply sit
12525 @c waiting forever for replies from the server.  To help with this
12526 @c unfortunate problem, you can set this command to a number.  Gnus will
12527 @c then, if it sits waiting for a reply from the server longer than that
12528 @c number of seconds, shut down the connection, start a new one, and resend
12529 @c the command.  This should hopefully be transparent to the user.  A
12530 @c likely number is 30 seconds.
12531 @c
12532 @c @item nntp-retry-on-break
12533 @c @vindex nntp-retry-on-break
12534 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12535 @c hangs.  This will have much the same effect as the command timeout
12536 @c described above.
12537
12538 @item nntp-server-hook
12539 @vindex nntp-server-hook
12540 This hook is run as the last step when connecting to an @acronym{NNTP}
12541 server.
12542
12543 @item nntp-buggy-select
12544 @vindex nntp-buggy-select
12545 Set this to non-@code{nil} if your select routine is buggy.
12546
12547 @item nntp-nov-is-evil
12548 @vindex nntp-nov-is-evil
12549 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
12550 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
12551 can be used.
12552
12553 @item nntp-xover-commands
12554 @vindex nntp-xover-commands
12555 @cindex @acronym{NOV}
12556 @cindex XOVER
12557 List of strings used as commands to fetch @acronym{NOV} lines from a
12558 server.  The default value of this variable is @code{("XOVER"
12559 "XOVERVIEW")}.
12560
12561 @item nntp-nov-gap
12562 @vindex nntp-nov-gap
12563 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
12564 the server.  The server responds with one huge list of lines.  However,
12565 if you have read articles 2-5000 in the group, and only want to read
12566 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
12567 lines that you will not need.  This variable says how
12568 big a gap between two consecutive articles is allowed to be before the
12569 @code{XOVER} request is split into several request.  Note that if your
12570 network is fast, setting this variable to a really small number means
12571 that fetching will probably be slower.  If this variable is @code{nil},
12572 @code{nntp} will never split requests.  The default is 5.
12573
12574 @item nntp-prepare-server-hook
12575 @vindex nntp-prepare-server-hook
12576 A hook run before attempting to connect to an @acronym{NNTP} server.
12577
12578 @item nntp-warn-about-losing-connection
12579 @vindex nntp-warn-about-losing-connection
12580 If this variable is non-@code{nil}, some noise will be made when a
12581 server closes connection.
12582
12583 @item nntp-record-commands
12584 @vindex nntp-record-commands
12585 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12586 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
12587 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
12588 that doesn't seem to work.
12589
12590 @item nntp-open-connection-function
12591 @vindex nntp-open-connection-function
12592 It is possible to customize how the connection to the nntp server will
12593 be opened.  If you specify an @code{nntp-open-connection-function}
12594 parameter, Gnus will use that function to establish the connection.
12595 Five pre-made functions are supplied.  These functions can be grouped in
12596 two categories: direct connection functions (three pre-made), and
12597 indirect ones (two pre-made).
12598
12599 @item nntp-prepare-post-hook
12600 @vindex nntp-prepare-post-hook
12601 A hook run just before posting an article.  If there is no
12602 @code{Message-ID} header in the article and the news server provides the
12603 recommended ID, it will be added to the article before running this
12604 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12605 inhibit Gnus to add a @code{Message-ID} header, you could say:
12606
12607 @lisp
12608 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12609 @end lisp
12610
12611 Note that not all servers support the recommended ID.  This works for
12612 INN versions 2.3.0 and later, for instance.
12613
12614 @item nntp-read-timeout
12615 @vindex nntp-read-timeout
12616 How long nntp should wait between checking for the end of output.
12617 Shorter values mean quicker response, but is more CPU intensive.  The
12618 default is 0.1 seconds.  If you have a slow line to the server (and
12619 don't like to see Emacs eat your available CPU power), you might set
12620 this to, say, 1.
12621
12622 @end table
12623
12624 @menu
12625 * Direct Functions::            Connecting directly to the server.
12626 * Indirect Functions::          Connecting indirectly to the server.
12627 * Common Variables::            Understood by several connection functions.
12628 @end menu
12629
12630
12631 @node Direct Functions
12632 @subsubsection Direct Functions
12633 @cindex direct connection functions
12634
12635 These functions are called direct because they open a direct connection
12636 between your machine and the @acronym{NNTP} server.  The behavior of these
12637 functions is also affected by commonly understood variables
12638 (@pxref{Common Variables}).
12639
12640 @table @code
12641 @findex nntp-open-network-stream
12642 @item nntp-open-network-stream
12643 This is the default, and simply connects to some port or other on the
12644 remote system.
12645
12646 @findex nntp-open-tls-stream
12647 @item nntp-open-tls-stream
12648 Opens a connection to a server over a @dfn{secure} channel.  To use
12649 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
12650 installed.  You then define a server as follows:
12651
12652 @lisp
12653 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
12654 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
12655 ;;
12656 (nntp "snews.bar.com"
12657       (nntp-open-connection-function nntp-open-tls-stream)
12658       (nntp-port-number )
12659       (nntp-address "snews.bar.com"))
12660 @end lisp
12661
12662 @findex nntp-open-ssl-stream
12663 @item nntp-open-ssl-stream
12664 Opens a connection to a server over a @dfn{secure} channel.  To use
12665 this you must have @uref{http://www.openssl.org, OpenSSL} or
12666 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
12667 then define a server as follows:
12668
12669 @lisp
12670 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
12671 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
12672 ;;
12673 (nntp "snews.bar.com"
12674       (nntp-open-connection-function nntp-open-ssl-stream)
12675       (nntp-port-number 563)
12676       (nntp-address "snews.bar.com"))
12677 @end lisp
12678
12679 @findex nntp-open-telnet-stream
12680 @item nntp-open-telnet-stream
12681 Opens a connection to an @acronym{NNTP} server by simply @samp{telnet}'ing
12682 it.  You might wonder why this function exists, since we have the
12683 default @code{nntp-open-network-stream} which would do the job.  (One
12684 of) the reason(s) is that if you are behind a firewall but have direct
12685 connections to the outside world thanks to a command wrapper like
12686 @code{runsocks}, you can use it like this:
12687
12688 @lisp
12689 (nntp "socksified"
12690       (nntp-pre-command "runsocks")
12691       (nntp-open-connection-function nntp-open-telnet-stream)
12692       (nntp-address "the.news.server"))
12693 @end lisp
12694
12695 With the default method, you would need to wrap your whole Emacs
12696 session, which is not a good idea.
12697 @end table
12698
12699
12700 @node Indirect Functions
12701 @subsubsection Indirect Functions
12702 @cindex indirect connection functions
12703
12704 These functions are called indirect because they connect to an
12705 intermediate host before actually connecting to the @acronym{NNTP} server.
12706 All of these functions and related variables are also said to belong to
12707 the ``via'' family of connection: they're all prefixed with ``via'' to make
12708 things cleaner.  The behavior of these functions is also affected by
12709 commonly understood variables (@pxref{Common Variables}).
12710
12711 @table @code
12712 @item nntp-open-via-rlogin-and-telnet
12713 @findex nntp-open-via-rlogin-and-telnet
12714 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12715 to the real @acronym{NNTP} server from there.  This is useful for instance if
12716 you need to connect to a firewall machine first.
12717
12718 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12719
12720 @table @code
12721 @item nntp-via-rlogin-command
12722 @vindex nntp-via-rlogin-command
12723 Command used to log in on the intermediate host.  The default is
12724 @samp{rsh}, but @samp{ssh} is a popular alternative.
12725
12726 @item nntp-via-rlogin-command-switches
12727 @vindex nntp-via-rlogin-command-switches
12728 List of strings to be used as the switches to
12729 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12730 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
12731 @samp{("-C")} in order to compress all data connections, otherwise set
12732 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
12733 the telnet command requires a pseudo-tty allocation on an intermediate
12734 host.
12735 @end table
12736
12737 @item nntp-open-via-telnet-and-telnet
12738 @findex nntp-open-via-telnet-and-telnet
12739 Does essentially the same, but uses @samp{telnet} instead of
12740 @samp{rlogin} to connect to the intermediate host.
12741
12742 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12743
12744 @table @code
12745 @item nntp-via-telnet-command
12746 @vindex nntp-via-telnet-command
12747 Command used to @code{telnet} the intermediate host.  The default is
12748 @samp{telnet}.
12749
12750 @item nntp-via-telnet-switches
12751 @vindex nntp-via-telnet-switches
12752 List of strings to be used as the switches to the
12753 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12754
12755 @item nntp-via-user-password
12756 @vindex nntp-via-user-password
12757 Password to use when logging in on the intermediate host.
12758
12759 @item nntp-via-envuser
12760 @vindex nntp-via-envuser
12761 If non-@code{nil}, the intermediate @code{telnet} session (client and
12762 server both) will support the @code{ENVIRON} option and not prompt for
12763 login name. This works for Solaris @code{telnet}, for instance.
12764
12765 @item nntp-via-shell-prompt
12766 @vindex nntp-via-shell-prompt
12767 Regexp matching the shell prompt on the intermediate host.  The default
12768 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12769
12770 @end table
12771
12772 @end table
12773
12774
12775 Here are some additional variables that are understood by all the above
12776 functions:
12777
12778 @table @code
12779
12780 @item nntp-via-user-name
12781 @vindex nntp-via-user-name
12782 User name to use when connecting to the intermediate host.
12783
12784 @item nntp-via-address
12785 @vindex nntp-via-address
12786 Address of the intermediate host to connect to.
12787
12788 @end table
12789
12790
12791 @node Common Variables
12792 @subsubsection Common Variables
12793
12794 The following variables affect the behavior of all, or several of the
12795 pre-made connection functions. When not specified, all functions are
12796 affected.
12797
12798 @table @code
12799
12800 @item nntp-pre-command
12801 @vindex nntp-pre-command
12802 A command wrapper to use when connecting through a non native
12803 connection function (all except @code{nntp-open-network-stream},
12804 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}.  This is
12805 where you would put a @samp{SOCKS} wrapper for instance.
12806
12807 @item nntp-address
12808 @vindex nntp-address
12809 The address of the @acronym{NNTP} server.
12810
12811 @item nntp-port-number
12812 @vindex nntp-port-number
12813 Port number to connect to the @acronym{NNTP} server.  The default is
12814 @samp{nntp}.  If you use @acronym{NNTP} over
12815 @acronym{tls}/@acronym{ssl}, you may want to use integer ports rather
12816 than named ports (i.e, use @samp{563} instead of @samp{snews} or
12817 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
12818 not work with named ports.
12819
12820 @item nntp-end-of-line
12821 @vindex nntp-end-of-line
12822 String to use as end-of-line marker when talking to the @acronym{NNTP}
12823 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12824 using a non native connection function.
12825
12826 @item nntp-telnet-command
12827 @vindex nntp-telnet-command
12828 Command to use when connecting to the @acronym{NNTP} server through
12829 @samp{telnet}.  This is @emph{not} for an intermediate host.  This is
12830 just for the real @acronym{NNTP} server.  The default is
12831 @samp{telnet}.
12832
12833 @item nntp-telnet-switches
12834 @vindex nntp-telnet-switches
12835 A list of switches to pass to @code{nntp-telnet-command}.  The default
12836 is @samp{("-8")}.
12837
12838 @end table
12839
12840
12841 @node News Spool
12842 @subsection News Spool
12843 @cindex nnspool
12844 @cindex news spool
12845
12846 Subscribing to a foreign group from the local spool is extremely easy,
12847 and might be useful, for instance, to speed up reading groups that
12848 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12849 instance.
12850
12851 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12852 anything else) as the address.
12853
12854 If you have access to a local spool, you should probably use that as the
12855 native select method (@pxref{Finding the News}).  It is normally faster
12856 than using an @code{nntp} select method, but might not be.  It depends.
12857 You just have to try to find out what's best at your site.
12858
12859 @table @code
12860
12861 @item nnspool-inews-program
12862 @vindex nnspool-inews-program
12863 Program used to post an article.
12864
12865 @item nnspool-inews-switches
12866 @vindex nnspool-inews-switches
12867 Parameters given to the inews program when posting an article.
12868
12869 @item nnspool-spool-directory
12870 @vindex nnspool-spool-directory
12871 Where @code{nnspool} looks for the articles.  This is normally
12872 @file{/usr/spool/news/}.
12873
12874 @item nnspool-nov-directory
12875 @vindex nnspool-nov-directory
12876 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
12877 @file{/usr/spool/news/over.view/}.
12878
12879 @item nnspool-lib-dir
12880 @vindex nnspool-lib-dir
12881 Where the news lib dir is (@file{/usr/lib/news/} by default).
12882
12883 @item nnspool-active-file
12884 @vindex nnspool-active-file
12885 The name of the active file.
12886
12887 @item nnspool-newsgroups-file
12888 @vindex nnspool-newsgroups-file
12889 The name of the group descriptions file.
12890
12891 @item nnspool-history-file
12892 @vindex nnspool-history-file
12893 The name of the news history file.
12894
12895 @item nnspool-active-times-file
12896 @vindex nnspool-active-times-file
12897 The name of the active date file.
12898
12899 @item nnspool-nov-is-evil
12900 @vindex nnspool-nov-is-evil
12901 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
12902 that it finds.
12903
12904 @item nnspool-sift-nov-with-sed
12905 @vindex nnspool-sift-nov-with-sed
12906 @cindex sed
12907 If non-@code{nil}, which is the default, use @code{sed} to get the
12908 relevant portion from the overview file.  If @code{nil},
12909 @code{nnspool} will load the entire file into a buffer and process it
12910 there.
12911
12912 @end table
12913
12914
12915 @node Getting Mail
12916 @section Getting Mail
12917 @cindex reading mail
12918 @cindex mail
12919
12920 Reading mail with a newsreader---isn't that just plain WeIrD? But of
12921 course.
12922
12923 @menu
12924 * Mail in a Newsreader::        Important introductory notes.
12925 * Getting Started Reading Mail::  A simple cookbook example.
12926 * Splitting Mail::              How to create mail groups.
12927 * Mail Sources::                How to tell Gnus where to get mail from.
12928 * Mail Back End Variables::     Variables for customizing mail handling.
12929 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
12930 * Group Mail Splitting::        Use group customize to drive mail splitting.
12931 * Incorporating Old Mail::      What about the old mail you have?
12932 * Expiring Mail::               Getting rid of unwanted mail.
12933 * Washing Mail::                Removing cruft from the mail you get.
12934 * Duplicates::                  Dealing with duplicated mail.
12935 * Not Reading Mail::            Using mail back ends for reading other files.
12936 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
12937 @end menu
12938
12939
12940 @node Mail in a Newsreader
12941 @subsection Mail in a Newsreader
12942
12943 If you are used to traditional mail readers, but have decided to switch
12944 to reading mail with Gnus, you may find yourself experiencing something
12945 of a culture shock.
12946
12947 Gnus does not behave like traditional mail readers.  If you want to make
12948 it behave that way, you can, but it's an uphill battle.
12949
12950 Gnus, by default, handles all its groups using the same approach.  This
12951 approach is very newsreaderly---you enter a group, see the new/unread
12952 messages, and when you read the messages, they get marked as read, and
12953 you don't see them any more.  (Unless you explicitly ask for them.)
12954
12955 In particular, you do not do anything explicitly to delete messages.
12956
12957 Does this mean that all the messages that have been marked as read are
12958 deleted?  How awful!
12959
12960 But, no, it means that old messages are @dfn{expired} according to some
12961 scheme or other.  For news messages, the expire process is controlled by
12962 the news administrator; for mail, the expire process is controlled by
12963 you.  The expire process for mail is covered in depth in @pxref{Expiring
12964 Mail}.
12965
12966 What many Gnus users find, after using it a while for both news and
12967 mail, is that the transport mechanism has very little to do with how
12968 they want to treat a message.
12969
12970 Many people subscribe to several mailing lists.  These are transported
12971 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
12972 answering, or even reading these messages very carefully.  We may not
12973 need to save them because if we should need to read one again, they are
12974 archived somewhere else.
12975
12976 Some people have local news groups which have only a handful of readers.
12977 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
12978 to read and answer a large fraction of the messages very carefully in
12979 order to do our work.  And there may not be an archive, so we may need
12980 to save the interesting messages the same way we would personal mail.
12981
12982 The important distinction turns out to be not the transport mechanism,
12983 but other factors such as how interested we are in the subject matter,
12984 or how easy it is to retrieve the message if we need to read it again.
12985
12986 Gnus provides many options for sorting mail into ``groups'' which behave
12987 like newsgroups, and for treating each group (whether mail or news)
12988 differently.
12989
12990 Some users never get comfortable using the Gnus (ahem) paradigm and wish
12991 that Gnus should grow up and be a male, er, mail reader.  It is possible
12992 to whip Gnus into a more mailreaderly being, but, as said before, it's
12993 not easy.  People who prefer proper mail readers should try @sc{vm}
12994 instead, which is an excellent, and proper, mail reader.
12995
12996 I don't mean to scare anybody off, but I want to make it clear that you
12997 may be required to learn a new way of thinking about messages.  After
12998 you've been subjected to The Gnus Way, you will come to love it.  I can
12999 guarantee it.  (At least the guy who sold me the Emacs Subliminal
13000 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
13001 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
13002 You Do.)
13003
13004
13005 @node Getting Started Reading Mail
13006 @subsection Getting Started Reading Mail
13007
13008 It's quite easy to use Gnus to read your new mail.  You just plonk the
13009 mail back end of your choice into @code{gnus-secondary-select-methods},
13010 and things will happen automatically.
13011
13012 For instance, if you want to use @code{nnml} (which is a ``one file per
13013 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
13014
13015 @lisp
13016 (setq gnus-secondary-select-methods '((nnml "")))
13017 @end lisp
13018
13019 Now, the next time you start Gnus, this back end will be queried for new
13020 articles, and it will move all the messages in your spool file to its
13021 directory, which is @file{~/Mail/} by default.  The new group that will
13022 be created (@samp{mail.misc}) will be subscribed, and you can read it
13023 like any other group.
13024
13025 You will probably want to split the mail into several groups, though:
13026
13027 @lisp
13028 (setq nnmail-split-methods
13029       '(("junk" "^From:.*Lars Ingebrigtsen")
13030         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
13031         ("other" "")))
13032 @end lisp
13033
13034 This will result in three new @code{nnml} mail groups being created:
13035 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
13036 mail that doesn't fit into the first two groups will be placed in the
13037 last group.
13038
13039 This should be sufficient for reading mail with Gnus.  You might want to
13040 give the other sections in this part of the manual a perusal, though.
13041 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
13042
13043
13044 @node Splitting Mail
13045 @subsection Splitting Mail
13046 @cindex splitting mail
13047 @cindex mail splitting
13048
13049 @vindex nnmail-split-methods
13050 The @code{nnmail-split-methods} variable says how the incoming mail is
13051 to be split into groups.
13052
13053 @lisp
13054 (setq nnmail-split-methods
13055   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
13056     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
13057     ("mail.other" "")))
13058 @end lisp
13059
13060 This variable is a list of lists, where the first element of each of
13061 these lists is the name of the mail group (they do not have to be called
13062 something beginning with @samp{mail}, by the way), and the second
13063 element is a regular expression used on the header of each mail to
13064 determine if it belongs in this mail group.  The first string may
13065 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
13066 insert sub-expressions from the matched text.  For instance:
13067
13068 @lisp
13069 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
13070 @end lisp
13071
13072 The second element can also be a function.  In that case, it will be
13073 called narrowed to the headers with the first element of the rule as the
13074 argument.  It should return a non-@code{nil} value if it thinks that the
13075 mail belongs in that group.
13076
13077 The last of these groups should always be a general one, and the regular
13078 expression should @emph{always} be @samp{*} so that it matches any mails
13079 that haven't been matched by any of the other regexps.  (These rules are
13080 processed from the beginning of the alist toward the end.  The first
13081 rule to make a match will ``win'', unless you have crossposting enabled.
13082 In that case, all matching rules will ``win''.)
13083
13084 If you like to tinker with this yourself, you can set this variable to a
13085 function of your choice.  This function will be called without any
13086 arguments in a buffer narrowed to the headers of an incoming mail
13087 message.  The function should return a list of group names that it
13088 thinks should carry this mail message.
13089
13090 Note that the mail back ends are free to maul the poor, innocent,
13091 incoming headers all they want to.  They all add @code{Lines} headers;
13092 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
13093 @code{From<SPACE>} line to something else.
13094
13095 @vindex nnmail-crosspost
13096 The mail back ends all support cross-posting.  If several regexps match,
13097 the mail will be ``cross-posted'' to all those groups.
13098 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
13099 that no articles are crossposted to the general (@samp{*}) group.
13100
13101 @vindex nnmail-crosspost-link-function
13102 @cindex crosspost
13103 @cindex links
13104 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
13105 the crossposted articles.  However, not all file systems support hard
13106 links.  If that's the case for you, set
13107 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
13108 variable is @code{add-name-to-file} by default.)
13109
13110 @kindex M-x nnmail-split-history
13111 @findex nnmail-split-history
13112 If you wish to see where the previous mail split put the messages, you
13113 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
13114 where re-spooling messages would put the messages, you can use
13115 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
13116 Group Commands}).
13117
13118 @vindex nnmail-split-header-length-limit
13119 Header lines longer than the value of
13120 @code{nnmail-split-header-length-limit} are excluded from the split
13121 function.
13122
13123 @vindex nnmail-mail-splitting-charset
13124 @vindex nnmail-mail-splitting-decodes
13125 By default the splitting codes @acronym{MIME} decodes headers so you
13126 can match on non-@acronym{ASCII} strings.  The
13127 @code{nnmail-mail-splitting-charset} variable specifies the default
13128 charset for decoding.  The behaviour can be turned off completely by
13129 binding @code{nnmail-mail-splitting-decodes} to @code{nil}, which is
13130 useful if you want to match articles based on the raw header data.
13131
13132 @vindex nnmail-resplit-incoming
13133 By default, splitting is performed on all incoming messages.  If you
13134 specify a @code{directory} entry for the variable @code{mail-sources}
13135 @pxref{Mail Source Specifiers}, however, then splitting does
13136 @emph{not} happen by default.  You can set the variable
13137 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
13138 splitting happen even in this case.  (This variable has no effect on
13139 other kinds of entries.)
13140
13141 Gnus gives you all the opportunity you could possibly want for shooting
13142 yourself in the foot.  Let's say you create a group that will contain
13143 all the mail you get from your boss.  And then you accidentally
13144 unsubscribe from the group.  Gnus will still put all the mail from your
13145 boss in the unsubscribed group, and so, when your boss mails you ``Have
13146 that report ready by Monday or you're fired!'', you'll never see it and,
13147 come Tuesday, you'll still believe that you're gainfully employed while
13148 you really should be out collecting empty bottles to save up for next
13149 month's rent money.
13150
13151
13152 @node Mail Sources
13153 @subsection Mail Sources
13154
13155 Mail can be gotten from many different sources---the mail spool, from
13156 a @acronym{POP} mail server, from a procmail directory, or from a
13157 maildir, for instance.
13158
13159 @menu
13160 * Mail Source Specifiers::      How to specify what a mail source is.
13161 * Mail Source Customization::   Some variables that influence things.
13162 * Fetching Mail::               Using the mail source specifiers.
13163 @end menu
13164
13165
13166 @node Mail Source Specifiers
13167 @subsubsection Mail Source Specifiers
13168 @cindex POP
13169 @cindex mail server
13170 @cindex procmail
13171 @cindex mail spool
13172 @cindex mail source
13173
13174 You tell Gnus how to fetch mail by setting @code{mail-sources}
13175 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
13176
13177 Here's an example:
13178
13179 @lisp
13180 (pop :server "pop3.mailserver.com" :user "myname")
13181 @end lisp
13182
13183 As can be observed, a mail source specifier is a list where the first
13184 element is a @dfn{mail source type}, followed by an arbitrary number of
13185 @dfn{keywords}.  Keywords that are not explicitly specified are given
13186 default values.
13187
13188 The following mail source types are available:
13189
13190 @table @code
13191 @item file
13192 Get mail from a single file; typically from the mail spool.
13193
13194 Keywords:
13195
13196 @table @code
13197 @item :path
13198 The file name.  Defaults to the value of the @env{MAIL}
13199 environment variable or the value of @code{rmail-spool-directory}
13200 (usually something like @file{/usr/mail/spool/user-name}).
13201
13202 @item :prescript
13203 @itemx :postscript
13204 Script run before/after fetching mail.
13205 @end table
13206
13207 An example file mail source:
13208
13209 @lisp
13210 (file :path "/usr/spool/mail/user-name")
13211 @end lisp
13212
13213 Or using the default file name:
13214
13215 @lisp
13216 (file)
13217 @end lisp
13218
13219 If the mail spool file is not located on the local machine, it's best
13220 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
13221 You can not use ange-ftp file names here---it has no way to lock the
13222 mail spool while moving the mail.
13223
13224 If it's impossible to set up a proper server, you can use ssh instead.
13225
13226 @lisp
13227 (setq mail-sources
13228       '((file :prescript "ssh host bin/getmail >%t")))
13229 @end lisp
13230
13231 The @samp{getmail} script would look something like the following:
13232
13233 @example
13234 #!/bin/sh
13235 #  getmail - move mail from spool to stdout
13236 #  flu@@iki.fi
13237
13238 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
13239 TMP=$HOME/Mail/tmp
13240 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
13241 @end example
13242
13243 Alter this script to fit find the @samp{movemail} you want to use.
13244
13245
13246 @item directory
13247 @vindex nnmail-scan-directory-mail-source-once
13248 Get mail from several files in a directory.  This is typically used
13249 when you have procmail split the incoming mail into several files.
13250 That is, there is a one-to-one correspondence between files in that
13251 directory and groups, so that mail from the file @file{foo.bar.spool}
13252 will be put in the group @code{foo.bar}.  (You can change the suffix
13253 to be used instead of @code{.spool}.)  Setting
13254 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
13255 Gnus to scan the mail source only once.  This is particularly useful
13256 if you want to scan mail groups at a specified level.
13257
13258 @vindex nnmail-resplit-incoming
13259 There is also the variable @code{nnmail-resplit-incoming}, if you set
13260 that to a non-@code{nil} value, then the normal splitting process is
13261 applied to all the files from the directory, @ref{Splitting Mail}.
13262
13263 Keywords:
13264
13265 @table @code
13266 @item :path
13267 The name of the directory where the files are.  There is no default
13268 value.
13269
13270 @item :suffix
13271 Only files ending with this suffix are used.  The default is
13272 @samp{.spool}.
13273
13274 @item :predicate
13275 Only files that have this predicate return non-@code{nil} are returned.
13276 The default is @code{identity}.  This is used as an additional
13277 filter---only files that have the right suffix @emph{and} satisfy this
13278 predicate are considered.
13279
13280 @item :prescript
13281 @itemx :postscript
13282 Script run before/after fetching mail.
13283
13284 @end table
13285
13286 An example directory mail source:
13287
13288 @lisp
13289 (directory :path "/home/user-name/procmail-dir/"
13290            :suffix ".prcml")
13291 @end lisp
13292
13293 @item pop
13294 Get mail from a @acronym{POP} server.
13295
13296 Keywords:
13297
13298 @table @code
13299 @item :server
13300 The name of the @acronym{POP} server.  The default is taken from the
13301 @env{MAILHOST} environment variable.
13302
13303 @item :port
13304 The port number of the @acronym{POP} server.  This can be a number (eg,
13305 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
13306 string, it should be a service name as listed in @file{/etc/services} on
13307 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
13308 need to specify it as @samp{"pop-3"} instead.
13309
13310 @item :user
13311 The user name to give to the @acronym{POP} server.  The default is the login
13312 name.
13313
13314 @item :password
13315 The password to give to the @acronym{POP} server.  If not specified,
13316 the user is prompted.
13317
13318 @item :program
13319 The program to use to fetch mail from the @acronym{POP} server.  This
13320 should be a @code{format}-like string.  Here's an example:
13321
13322 @example
13323 fetchmail %u@@%s -P %p %t
13324 @end example
13325
13326 The valid format specifier characters are:
13327
13328 @table @samp
13329 @item t
13330 The name of the file the mail is to be moved to.  This must always be
13331 included in this string.
13332
13333 @item s
13334 The name of the server.
13335
13336 @item P
13337 The port number of the server.
13338
13339 @item u
13340 The user name to use.
13341
13342 @item p
13343 The password to use.
13344 @end table
13345
13346 The values used for these specs are taken from the values you give the
13347 corresponding keywords.
13348
13349 @item :prescript
13350 A script to be run before fetching the mail.  The syntax is the same as
13351 the @code{:program} keyword.  This can also be a function to be run.
13352
13353 @item :postscript
13354 A script to be run after fetching the mail.  The syntax is the same as
13355 the @code{:program} keyword.  This can also be a function to be run.
13356
13357 @item :function
13358 The function to use to fetch mail from the @acronym{POP} server.  The
13359 function is called with one parameter---the name of the file where the
13360 mail should be moved to.
13361
13362 @item :authentication
13363 This can be either the symbol @code{password} or the symbol @code{apop}
13364 and says what authentication scheme to use.  The default is
13365 @code{password}.
13366
13367 @end table
13368
13369 If the @code{:program} and @code{:function} keywords aren't specified,
13370 @code{pop3-movemail} will be used.
13371
13372 Here are some examples.  Fetch from the default @acronym{POP} server,
13373 using the default user name, and default fetcher:
13374
13375 @lisp
13376 (pop)
13377 @end lisp
13378
13379 Fetch from a named server with a named user and password:
13380
13381 @lisp
13382 (pop :server "my.pop.server"
13383      :user "user-name" :password "secret")
13384 @end lisp
13385
13386 Use @samp{movemail} to move the mail:
13387
13388 @lisp
13389 (pop :program "movemail po:%u %t %p")
13390 @end lisp
13391
13392 @item maildir
13393 Get mail from a maildir.  This is a type of mailbox that is supported by
13394 at least qmail and postfix, where each file in a special directory
13395 contains exactly one mail.
13396
13397 Keywords:
13398
13399 @table @code
13400 @item :path
13401 The name of the directory where the mails are stored.  The default is
13402 taken from the @env{MAILDIR} environment variable or
13403 @file{~/Maildir/}.
13404 @item :subdirs
13405 The subdirectories of the Maildir.  The default is
13406 @samp{("new" "cur")}.
13407
13408 @c If you sometimes look at your mail through a pop3 daemon before fetching
13409 @c them with Gnus, you may also have to fetch your mails from the
13410 @c @code{cur} directory inside the maildir, like in the first example
13411 @c below.
13412
13413 You can also get mails from remote hosts (because maildirs don't suffer
13414 from locking problems).
13415
13416 @end table
13417
13418 Two example maildir mail sources:
13419
13420 @lisp
13421 (maildir :path "/home/user-name/Maildir/"
13422          :subdirs ("cur" "new"))
13423 @end lisp
13424
13425 @lisp
13426 (maildir :path "/user@@remotehost.org:~/Maildir/"
13427          :subdirs ("new"))
13428 @end lisp
13429
13430 @item imap
13431 Get mail from a @acronym{IMAP} server.  If you don't want to use
13432 @acronym{IMAP} as intended, as a network mail reading protocol (ie
13433 with nnimap), for some reason or other, Gnus let you treat it similar
13434 to a @acronym{POP} server and fetches articles from a given
13435 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
13436
13437 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
13438 may need external programs and libraries, @xref{IMAP}.
13439
13440 Keywords:
13441
13442 @table @code
13443 @item :server
13444 The name of the @acronym{IMAP} server.  The default is taken from the
13445 @env{MAILHOST} environment variable.
13446
13447 @item :port
13448 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
13449 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
13450
13451 @item :user
13452 The user name to give to the @acronym{IMAP} server.  The default is the login
13453 name.
13454
13455 @item :password
13456 The password to give to the @acronym{IMAP} server.  If not specified, the user is
13457 prompted.
13458
13459 @item :stream
13460 What stream to use for connecting to the server, this is one of the
13461 symbols in @code{imap-stream-alist}.  Right now, this means
13462 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
13463 @samp{ssl}, @samp{shell} or the default @samp{network}.
13464
13465 @item :authentication
13466 Which authenticator to use for authenticating to the server, this is
13467 one of the symbols in @code{imap-authenticator-alist}.  Right now,
13468 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13469 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13470
13471 @item :program
13472 When using the `shell' :stream, the contents of this variable is
13473 mapped into the @code{imap-shell-program} variable.  This should be a
13474 @code{format}-like string (or list of strings).  Here's an example:
13475
13476 @example
13477 ssh %s imapd
13478 @end example
13479
13480 The valid format specifier characters are:
13481
13482 @table @samp
13483 @item s
13484 The name of the server.
13485
13486 @item l
13487 User name from @code{imap-default-user}.
13488
13489 @item p
13490 The port number of the server.
13491 @end table
13492
13493 The values used for these specs are taken from the values you give the
13494 corresponding keywords.
13495
13496 @item :mailbox
13497 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13498 which normally is the mailbox which receive incoming mail.
13499
13500 @item :predicate
13501 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13502 UNDELETED}, is probably the best choice for most people, but if you
13503 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
13504 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13505 Then all articles in the mailbox is fetched, no matter what.  For a
13506 complete list of predicates, see RFC 2060 section 6.4.4.
13507
13508 @item :fetchflag
13509 How to flag fetched articles on the server, the default @samp{\Deleted}
13510 will mark them as deleted, an alternative would be @samp{\Seen} which
13511 would simply mark them as read.  These are the two most likely choices,
13512 but more flags are defined in RFC 2060 section 2.3.2.
13513
13514 @item :dontexpunge
13515 If non-@code{nil}, don't remove all articles marked as deleted in the
13516 mailbox after finishing the fetch.
13517
13518 @end table
13519
13520 An example @acronym{IMAP} mail source:
13521
13522 @lisp
13523 (imap :server "mail.mycorp.com"
13524       :stream kerberos4
13525       :fetchflag "\\Seen")
13526 @end lisp
13527
13528 @item webmail
13529 Get mail from a webmail server, such as @uref{www.hotmail.com},
13530 @uref{webmail.netscape.com}, @uref{www.netaddress.com},
13531 @uref{mail.yahoo.com}.
13532
13533 NOTE: Webmail largely depends cookies. A "one-line-cookie" patch is
13534 required for url "4.0pre.46".
13535
13536 WARNING: Mails may be lost.  NO WARRANTY.
13537
13538 Keywords:
13539
13540 @table @code
13541 @item :subtype
13542 The type of the webmail server.  The default is @code{hotmail}.  The
13543 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13544
13545 @item :user
13546 The user name to give to the webmail server.  The default is the login
13547 name.
13548
13549 @item :password
13550 The password to give to the webmail server.  If not specified, the user is
13551 prompted.
13552
13553 @item :dontexpunge
13554 If non-@code{nil}, only fetch unread articles and don't move them to
13555 trash folder after finishing the fetch.
13556
13557 @end table
13558
13559 An example webmail source:
13560
13561 @lisp
13562 (webmail :subtype 'hotmail
13563          :user "user-name"
13564          :password "secret")
13565 @end lisp
13566 @end table
13567
13568 @table @dfn
13569 @item Common Keywords
13570 Common keywords can be used in any type of mail source.
13571
13572 Keywords:
13573
13574 @table @code
13575 @item :plugged
13576 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
13577 use directory source to get mail, you can specify it as in this
13578 example:
13579
13580 @lisp
13581 (setq mail-sources
13582       '((directory :path "/home/pavel/.Spool/"
13583                    :suffix ""
13584                    :plugged t)))
13585 @end lisp
13586
13587 Gnus will then fetch your mail even when you are unplugged.  This is
13588 useful when you use local mail and news.
13589
13590 @end table
13591 @end table
13592
13593 @subsubsection Function Interface
13594
13595 Some of the above keywords specify a Lisp function to be executed.
13596 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13597 the value of the keyword while the function is executing.  For example,
13598 consider the following mail-source setting:
13599
13600 @lisp
13601 (setq mail-sources '((pop :user "jrl"
13602                           :server "pophost" :function fetchfunc)))
13603 @end lisp
13604
13605 While the function @code{fetchfunc} is executing, the symbol @code{user}
13606 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13607 @code{"pophost"}.  The symbols @code{port}, @code{password},
13608 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13609 and @code{authentication} are also bound (to their default values).
13610
13611 See above for a list of keywords for each type of mail source.
13612
13613
13614 @node Mail Source Customization
13615 @subsubsection Mail Source Customization
13616
13617 The following is a list of variables that influence how the mail is
13618 fetched.  You would normally not need to set or change any of these
13619 variables.
13620
13621 @table @code
13622 @item mail-source-crash-box
13623 @vindex mail-source-crash-box
13624 File where mail will be stored while processing it.  The default is@*
13625 @file{~/.emacs-mail-crash-box}.
13626
13627 @item mail-source-delete-incoming
13628 @vindex mail-source-delete-incoming
13629 If non-@code{nil}, delete incoming files after handling them.  If
13630 @code{t}, delete the files immediately, if @code{nil}, never delete any
13631 files.  If a positive number, delete files older than number of days
13632 (This will only happen, when receiving new mail).  You may also set
13633 @code{mail-source-delete-incoming} to @code{nil} and call
13634 @code{mail-source-delete-old-incoming} from a hook or interactively.
13635
13636 @item mail-source-delete-old-incoming-confirm
13637 @vindex mail-source-delete-old-incoming-confirm
13638 If non-@code{nil}, ask for for confirmation before deleting old incoming
13639 files.  This variable only applies when
13640 @code{mail-source-delete-incoming} is a positive number.
13641
13642 @item mail-source-ignore-errors
13643 @vindex mail-source-ignore-errors
13644 If non-@code{nil}, ignore errors when reading mail from a mail source.
13645
13646 @item mail-source-directory
13647 @vindex mail-source-directory
13648 Directory where files (if any) will be stored.  The default is
13649 @file{~/Mail/}.  At present, the only thing this is used for is to say
13650 where the incoming files will be stored if the previous variable is
13651 @code{nil}.
13652
13653 @item mail-source-incoming-file-prefix
13654 @vindex mail-source-incoming-file-prefix
13655 Prefix for file name for storing incoming mail.  The default is
13656 @file{Incoming}, in which case files will end up with names like
13657 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13658 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13659
13660 @item mail-source-default-file-modes
13661 @vindex mail-source-default-file-modes
13662 All new mail files will get this file mode.  The default is 384.
13663
13664 @item mail-source-movemail-program
13665 @vindex mail-source-movemail-program
13666 If non-@code{nil}, name of program for fetching new mail.  If
13667 @code{nil}, @code{movemail} in @var{exec-directory}.
13668
13669 @end table
13670
13671
13672 @node Fetching Mail
13673 @subsubsection Fetching Mail
13674
13675 @vindex mail-sources
13676 @vindex nnmail-spool-file
13677 The way to actually tell Gnus where to get new mail from is to set
13678 @code{mail-sources} to a list of mail source specifiers
13679 (@pxref{Mail Source Specifiers}).
13680
13681 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13682 @code{nil}, the mail back ends will never attempt to fetch mail by
13683 themselves.
13684
13685 If you want to fetch mail both from your local spool as well as a
13686 @acronym{POP} mail server, you'd say something like:
13687
13688 @lisp
13689 (setq mail-sources
13690       '((file)
13691         (pop :server "pop3.mail.server"
13692              :password "secret")))
13693 @end lisp
13694
13695 Or, if you don't want to use any of the keyword defaults:
13696
13697 @lisp
13698 (setq mail-sources
13699       '((file :path "/var/spool/mail/user-name")
13700         (pop :server "pop3.mail.server"
13701              :user "user-name"
13702              :port "pop3"
13703              :password "secret")))
13704 @end lisp
13705
13706
13707 When you use a mail back end, Gnus will slurp all your mail from your
13708 inbox and plonk it down in your home directory.  Gnus doesn't move any
13709 mail if you're not using a mail back end---you have to do a lot of magic
13710 invocations first.  At the time when you have finished drawing the
13711 pentagram, lightened the candles, and sacrificed the goat, you really
13712 shouldn't be too surprised when Gnus moves your mail.
13713
13714
13715
13716 @node Mail Back End Variables
13717 @subsection Mail Back End Variables
13718
13719 These variables are (for the most part) pertinent to all the various
13720 mail back ends.
13721
13722 @table @code
13723 @vindex nnmail-read-incoming-hook
13724 @item nnmail-read-incoming-hook
13725 The mail back ends all call this hook after reading new mail.  You can
13726 use this hook to notify any mail watch programs, if you want to.
13727
13728 @vindex nnmail-split-hook
13729 @item nnmail-split-hook
13730 @findex gnus-article-decode-encoded-words
13731 @cindex RFC 1522 decoding
13732 @cindex RFC 2047 decoding
13733 Hook run in the buffer where the mail headers of each message is kept
13734 just before the splitting based on these headers is done.  The hook is
13735 free to modify the buffer contents in any way it sees fit---the buffer
13736 is discarded after the splitting has been done, and no changes performed
13737 in the buffer will show up in any files.
13738 @code{gnus-article-decode-encoded-words} is one likely function to add
13739 to this hook.
13740
13741 @vindex nnmail-pre-get-new-mail-hook
13742 @vindex nnmail-post-get-new-mail-hook
13743 @item nnmail-pre-get-new-mail-hook
13744 @itemx nnmail-post-get-new-mail-hook
13745 These are two useful hooks executed when treating new incoming
13746 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13747 starting to handle the new mail) and
13748 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13749 is done).  Here's and example of using these two hooks to change the
13750 default file modes the new mail files get:
13751
13752 @lisp
13753 (add-hook 'nnmail-pre-get-new-mail-hook
13754           (lambda () (set-default-file-modes 511)))
13755
13756 (add-hook 'nnmail-post-get-new-mail-hook
13757           (lambda () (set-default-file-modes 551)))
13758 @end lisp
13759
13760 @item nnmail-use-long-file-names
13761 @vindex nnmail-use-long-file-names
13762 If non-@code{nil}, the mail back ends will use long file and directory
13763 names.  Groups like @samp{mail.misc} will end up in directories
13764 (assuming use of @code{nnml} back end) or files (assuming use of
13765 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13766 the same group will end up in @file{mail/misc}.
13767
13768 @item nnmail-delete-file-function
13769 @vindex nnmail-delete-file-function
13770 @findex delete-file
13771 Function called to delete files.  It is @code{delete-file} by default.
13772
13773 @item nnmail-cache-accepted-message-ids
13774 @vindex nnmail-cache-accepted-message-ids
13775 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13776 the back end (via @code{Gcc}, for instance) into the mail duplication
13777 discovery cache.  The default is @code{nil}.
13778
13779 @item nnmail-cache-ignore-groups
13780 @vindex nnmail-cache-ignore-groups
13781 This can be a regular expression or a list of regular expressions.
13782 Group names that match any of the regular expressions will never be
13783 recorded in the @code{Message-ID} cache.
13784
13785 This can be useful, for example, when using Fancy Splitting
13786 (@pxref{Fancy Mail Splitting}) together with the function
13787 @code{nnmail-split-fancy-with-parent}.
13788
13789 @end table
13790
13791
13792 @node Fancy Mail Splitting
13793 @subsection Fancy Mail Splitting
13794 @cindex mail splitting
13795 @cindex fancy mail splitting
13796
13797 @vindex nnmail-split-fancy
13798 @findex nnmail-split-fancy
13799 If the rather simple, standard method for specifying how to split mail
13800 doesn't allow you to do what you want, you can set
13801 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13802 play with the @code{nnmail-split-fancy} variable.
13803
13804 Let's look at an example value of this variable first:
13805
13806 @lisp
13807 ;; @r{Messages from the mailer daemon are not crossposted to any of}
13808 ;; @r{the ordinary groups.  Warnings are put in a separate group}
13809 ;; @r{from real errors.}
13810 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13811                    "mail.misc"))
13812    ;; @r{Non-error messages are crossposted to all relevant}
13813    ;; @r{groups, but we don't crosspost between the group for the}
13814    ;; @r{(ding) list and the group for other (ding) related mail.}
13815    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13816          ("subject" "ding" "ding.misc"))
13817       ;; @r{Other mailing lists@dots{}}
13818       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13819       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13820       ;; @r{Both lists below have the same suffix, so prevent}
13821       ;; @r{cross-posting to mkpkg.list of messages posted only to}
13822       ;; @r{the bugs- list, but allow cross-posting when the}
13823       ;; @r{message was really cross-posted.}
13824       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13825       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13826       ;; @r{People@dots{}}
13827       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13828    ;; @r{Unmatched mail goes to the catch all group.}
13829    "misc.misc")
13830 @end lisp
13831
13832 This variable has the format of a @dfn{split}.  A split is a (possibly)
13833 recursive structure where each split may contain other splits.  Here are
13834 the five possible split syntaxes:
13835
13836 @enumerate
13837
13838 @item
13839 @samp{group}: If the split is a string, that will be taken as a group
13840 name.  Normal regexp match expansion will be done.  See below for
13841 examples.
13842
13843 @item
13844 @code{(@var{field} @var{value} @code{[-} @var{restrict}
13845 @code{[@dots{}]}@code{]} @var{split})}: If the split is a list, the
13846 first element of which is a string, then store the message as
13847 specified by @var{split}, if header @var{field} (a regexp) contains
13848 @var{value} (also a regexp).  If @var{restrict} (yet another regexp)
13849 matches some string after @var{field} and before the end of the
13850 matched @var{value}, the @var{split} is ignored.  If none of the
13851 @var{restrict} clauses match, @var{split} is processed.
13852
13853 @item
13854 @code{(| @var{split}@dots{})}: If the split is a list, and the first
13855 element is @code{|} (vertical bar), then process each @var{split} until
13856 one of them matches.  A @var{split} is said to match if it will cause
13857 the mail message to be stored in one or more groups.
13858
13859 @item
13860 @code{(& @var{split}@dots{})}: If the split is a list, and the first
13861 element is @code{&}, then process all @var{split}s in the list.
13862
13863 @item
13864 @code{junk}: If the split is the symbol @code{junk}, then don't save
13865 (i.e., delete) this message.  Use with extreme caution.
13866
13867 @item
13868 @code{(: @var{function} @var{arg1} @var{arg2} @dots{})}:  If the split is
13869 a list, and the first element is @code{:}, then the second element will
13870 be called as a function with @var{args} given as arguments.  The
13871 function should return a @var{split}.
13872
13873 @cindex body split
13874 For instance, the following function could be used to split based on the
13875 body of the messages:
13876
13877 @lisp
13878 (defun split-on-body ()
13879   (save-excursion
13880     (set-buffer " *nnmail incoming*")
13881     (goto-char (point-min))
13882     (when (re-search-forward "Some.*string" nil t)
13883       "string.group")))
13884 @end lisp
13885
13886 The @samp{" *nnmail incoming*"} is narrowed to the message in question
13887 when the @code{:} function is run.
13888
13889 @item
13890 @code{(! @var{func} @var{split})}: If the split is a list, and the
13891 first element is @code{!}, then @var{split} will be processed, and
13892 @var{func} will be called as a function with the result of @var{split}
13893 as argument.  @var{func} should return a split.
13894
13895 @item
13896 @code{nil}: If the split is @code{nil}, it is ignored.
13897
13898 @end enumerate
13899
13900 In these splits, @var{field} must match a complete field name.
13901 @var{value} must match a complete word according to the fundamental mode
13902 syntax table.  You can use @code{.*} in the regexps to match partial
13903 field names or words.  In other words, all @var{value}'s are wrapped in
13904 @samp{\<} and @samp{\>} pairs.
13905
13906 @vindex nnmail-split-abbrev-alist
13907 @var{field} and @var{value} can also be Lisp symbols, in that case
13908 they are expanded as specified by the variable
13909 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells,
13910 where the @code{car} of a cell contains the key, and the @code{cdr}
13911 contains the associated value.  Predefined entries in
13912 @code{nnmail-split-abbrev-alist} include:
13913
13914 @table @code
13915 @item from
13916 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
13917 @item to
13918 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
13919 @samp{Resent-To} and @samp{Resent-Cc} fields.
13920 @item any
13921 Is the union of the @code{from} and @code{to} entries.
13922 @end table
13923
13924 @vindex nnmail-split-fancy-syntax-table
13925 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
13926 when all this splitting is performed.
13927
13928 If you want to have Gnus create groups dynamically based on some
13929 information in the headers (i.e., do @code{replace-match}-like
13930 substitutions in the group names), you can say things like:
13931
13932 @example
13933 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
13934 @end example
13935
13936 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
13937 will be filed in @samp{mail.debian.foo}.
13938
13939 If the string contains the element @samp{\&}, then the previously
13940 matched string will be substituted.  Similarly, the elements @samp{\\1}
13941 up to @samp{\\9} will be substituted with the text matched by the
13942 groupings 1 through 9.
13943
13944 @findex nnmail-split-fancy-with-parent
13945 @code{nnmail-split-fancy-with-parent} is a function which allows you to
13946 split followups into the same groups their parents are in.  Sometimes
13947 you can't make splitting rules for all your mail.  For example, your
13948 boss might send you personal mail regarding different projects you are
13949 working on, and as you can't tell your boss to put a distinguishing
13950 string into the subject line, you have to resort to manually moving the
13951 messages into the right group.  With this function, you only have to do
13952 it once per thread.
13953
13954 To use this feature, you have to set @code{nnmail-treat-duplicates}
13955 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
13956 value.  And then you can include @code{nnmail-split-fancy-with-parent}
13957 using the colon feature, like so:
13958 @lisp
13959 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
13960       nnmail-cache-accepted-message-ids t
13961       nnmail-split-fancy
13962       '(| (: nnmail-split-fancy-with-parent)
13963           ;; @r{other splits go here}
13964         ))
13965 @end lisp
13966
13967 This feature works as follows: when @code{nnmail-treat-duplicates} is
13968 non-@code{nil}, Gnus records the message id of every message it sees
13969 in the file specified by the variable
13970 @code{nnmail-message-id-cache-file}, together with the group it is in
13971 (the group is omitted for non-mail messages).  When mail splitting is
13972 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
13973 at the References (and In-Reply-To) header of each message to split
13974 and searches the file specified by @code{nnmail-message-id-cache-file}
13975 for the message ids.  When it has found a parent, it returns the
13976 corresponding group name unless the group name matches the regexp
13977 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
13978 recommended that you set @code{nnmail-message-id-cache-length} to a
13979 somewhat higher number than the default so that the message ids are
13980 still in the cache.  (A value of 5000 appears to create a file some
13981 300 kBytes in size.)
13982 @vindex nnmail-cache-accepted-message-ids
13983 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
13984 also records the message ids of moved articles, so that the followup
13985 messages goes into the new group.
13986
13987 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
13988 want certain groups to be recorded in the cache.  For example, if all
13989 outgoing messages are written to an `outgoing' group, you could set
13990 @code{nnmail-cache-ignore-groups} to match that group name.
13991 Otherwise, answers to all your messages would end up in the
13992 `outgoing' group.
13993
13994
13995 @node Group Mail Splitting
13996 @subsection Group Mail Splitting
13997 @cindex mail splitting
13998 @cindex group mail splitting
13999
14000 @findex gnus-group-split
14001 If you subscribe to dozens of mailing lists but you don't want to
14002 maintain mail splitting rules manually, group mail splitting is for you.
14003 You just have to set @var{to-list} and/or @var{to-address} in group
14004 parameters or group customization and set @code{nnmail-split-methods} to
14005 @code{gnus-group-split}.  This splitting function will scan all groups
14006 for those parameters and split mail accordingly, i.e., messages posted
14007 from or to the addresses specified in the parameters @var{to-list} or
14008 @var{to-address} of a mail group will be stored in that group.
14009
14010 Sometimes, mailing lists have multiple addresses, and you may want mail
14011 splitting to recognize them all: just set the @var{extra-aliases} group
14012 parameter to the list of additional addresses and it's done.  If you'd
14013 rather use a regular expression, set @var{split-regexp}.
14014
14015 All these parameters in a group will be used to create an
14016 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
14017 the @var{value} is a single regular expression that matches
14018 @var{to-list}, @var{to-address}, all of @var{extra-aliases} and all
14019 matches of @var{split-regexp}, and the @var{split} is the name of the
14020 group.  @var{restrict}s are also supported: just set the
14021 @var{split-exclude} parameter to a list of regular expressions.
14022
14023 If you can't get the right split to be generated using all these
14024 parameters, or you just need something fancier, you can set the
14025 parameter @var{split-spec} to an @code{nnmail-split-fancy} split.  In
14026 this case, all other aforementioned parameters will be ignored by
14027 @code{gnus-group-split}.  In particular, @var{split-spec} may be set to
14028 @code{nil}, in which case the group will be ignored by
14029 @code{gnus-group-split}.
14030
14031 @vindex gnus-group-split-default-catch-all-group
14032 @code{gnus-group-split} will do cross-posting on all groups that match,
14033 by defining a single @code{&} fancy split containing one split for each
14034 group.  If a message doesn't match any split, it will be stored in the
14035 group named in @code{gnus-group-split-default-catch-all-group}, unless
14036 some group has @var{split-spec} set to @code{catch-all}, in which case
14037 that group is used as the catch-all group.  Even though this variable is
14038 often used just to name a group, it may also be set to an arbitrarily
14039 complex fancy split (after all, a group name is a fancy split), and this
14040 may be useful to split mail that doesn't go to any mailing list to
14041 personal mail folders.  Note that this fancy split is added as the last
14042 element of a @code{|} split list that also contains a @code{&} split
14043 with the rules extracted from group parameters.
14044
14045 It's time for an example.  Assume the following group parameters have
14046 been defined:
14047
14048 @example
14049 nnml:mail.bar:
14050 ((to-address . "bar@@femail.com")
14051  (split-regexp . ".*@@femail\\.com"))
14052 nnml:mail.foo:
14053 ((to-list . "foo@@nowhere.gov")
14054  (extra-aliases "foo@@localhost" "foo-redist@@home")
14055  (split-exclude "bugs-foo" "rambling-foo")
14056  (admin-address . "foo-request@@nowhere.gov"))
14057 nnml:mail.others:
14058 ((split-spec . catch-all))
14059 @end example
14060
14061 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
14062 behave as if @code{nnmail-split-fancy} had been selected and variable
14063 @code{nnmail-split-fancy} had been set as follows:
14064
14065 @lisp
14066 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
14067       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
14068            - "bugs-foo" - "rambling-foo" "mail.foo"))
14069    "mail.others")
14070 @end lisp
14071
14072 @findex gnus-group-split-fancy
14073 If you'd rather not use group splitting for all your mail groups, you
14074 may use it for only some of them, by using @code{nnmail-split-fancy}
14075 splits like this:
14076
14077 @lisp
14078 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
14079 @end lisp
14080
14081 @var{groups} may be a regular expression or a list of group names whose
14082 parameters will be scanned to generate the output split.
14083 @var{no-crosspost} can be used to disable cross-posting; in this case, a
14084 single @code{|} split will be output.  @var{catch-all} is the fall back
14085 fancy split, used like @var{gnus-group-split-default-catch-all-group}.
14086 If @var{catch-all} is @code{nil}, or if @var{split-regexp} matches the
14087 empty string in any selected group, no catch-all split will be issued.
14088 Otherwise, if some group has @var{split-spec} set to @code{catch-all},
14089 this group will override the value of the @var{catch-all} argument.
14090
14091 @findex gnus-group-split-setup
14092 Unfortunately, scanning all groups and their parameters can be quite
14093 slow, especially considering that it has to be done for every message.
14094 But don't despair!  The function @code{gnus-group-split-setup} can be
14095 used to enable @code{gnus-group-split} in a much more efficient way.  It
14096 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
14097 @code{nnmail-split-fancy} to the split produced by
14098 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
14099 scanned once, no matter how many messages are split.
14100
14101 @findex gnus-group-split-update
14102 However, if you change group parameters, you'd have to update
14103 @code{nnmail-split-fancy} manually.  You can do it by running
14104 @code{gnus-group-split-update}.  If you'd rather have it updated
14105 automatically, just tell @code{gnus-group-split-setup} to do it for
14106 you.  For example, add to your @file{~/.gnus.el}:
14107
14108 @lisp
14109 (gnus-group-split-setup @var{auto-update} @var{catch-all})
14110 @end lisp
14111
14112 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
14113 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
14114 have to worry about updating @code{nnmail-split-fancy} again.  If you
14115 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
14116 @code{gnus-group-split-default-catch-all-group} will be set to its
14117 value.
14118
14119 @vindex gnus-group-split-updated-hook
14120 Because you may want to change @code{nnmail-split-fancy} after it is set
14121 by @code{gnus-group-split-update}, this function will run
14122 @code{gnus-group-split-updated-hook} just before finishing.
14123
14124 @node Incorporating Old Mail
14125 @subsection Incorporating Old Mail
14126 @cindex incorporating old mail
14127 @cindex import old mail
14128
14129 Most people have lots of old mail stored in various file formats.  If
14130 you have set up Gnus to read mail using one of the spiffy Gnus mail
14131 back ends, you'll probably wish to have that old mail incorporated into
14132 your mail groups.
14133
14134 Doing so can be quite easy.
14135
14136 To take an example: You're reading mail using @code{nnml}
14137 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
14138 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
14139 file filled with important, but old, mail.  You want to move it into
14140 your @code{nnml} groups.
14141
14142 Here's how:
14143
14144 @enumerate
14145 @item
14146 Go to the group buffer.
14147
14148 @item
14149 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
14150 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
14151
14152 @item
14153 Type @kbd{SPACE} to enter the newly created group.
14154
14155 @item
14156 Type @kbd{M P b} to process-mark all articles in this group's buffer
14157 (@pxref{Setting Process Marks}).
14158
14159 @item
14160 Type @kbd{B r} to respool all the process-marked articles, and answer
14161 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
14162 @end enumerate
14163
14164 All the mail messages in the mbox file will now also be spread out over
14165 all your @code{nnml} groups.  Try entering them and check whether things
14166 have gone without a glitch.  If things look ok, you may consider
14167 deleting the mbox file, but I wouldn't do that unless I was absolutely
14168 sure that all the mail has ended up where it should be.
14169
14170 Respooling is also a handy thing to do if you're switching from one mail
14171 back end to another.  Just respool all the mail in the old mail groups
14172 using the new mail back end.
14173
14174
14175 @node Expiring Mail
14176 @subsection Expiring Mail
14177 @cindex article expiry
14178
14179 Traditional mail readers have a tendency to remove mail articles when
14180 you mark them as read, in some way.  Gnus takes a fundamentally
14181 different approach to mail reading.
14182
14183 Gnus basically considers mail just to be news that has been received in
14184 a rather peculiar manner.  It does not think that it has the power to
14185 actually change the mail, or delete any mail messages.  If you enter a
14186 mail group, and mark articles as ``read'', or kill them in some other
14187 fashion, the mail articles will still exist on the system.  I repeat:
14188 Gnus will not delete your old, read mail.  Unless you ask it to, of
14189 course.
14190
14191 To make Gnus get rid of your unwanted mail, you have to mark the
14192 articles as @dfn{expirable}.  (With the default key bindings, this means
14193 that you have to type @kbd{E}.)  This does not mean that the articles
14194 will disappear right away, however.  In general, a mail article will be
14195 deleted from your system if, 1) it is marked as expirable, AND 2) it is
14196 more than one week old.  If you do not mark an article as expirable, it
14197 will remain on your system until hell freezes over.  This bears
14198 repeating one more time, with some spurious capitalizations: IF you do
14199 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
14200
14201 You do not have to mark articles as expirable by hand.  Gnus provides
14202 two features, called `auto-expire' and `total-expire', that can help you
14203 with this.  In a nutshell, `auto-expire' means that Gnus hits @kbd{E}
14204 for you when you select an article.  And `total-expire' means that Gnus
14205 considers all articles as expirable that are read.  So, in addition to
14206 the articles marked @samp{E}, also the articles marked @samp{r},
14207 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
14208 expirable.
14209
14210 When should either auto-expire or total-expire be used?  Most people
14211 who are subscribed to mailing lists split each list into its own group
14212 and then turn on auto-expire or total-expire for those groups.
14213 (@xref{Splitting Mail}, for more information on splitting each list
14214 into its own group.)
14215
14216 Which one is better, auto-expire or total-expire?  It's not easy to
14217 answer.  Generally speaking, auto-expire is probably faster.  Another
14218 advantage of auto-expire is that you get more marks to work with: for
14219 the articles that are supposed to stick around, you can still choose
14220 between tick and dormant and read marks.  But with total-expire, you
14221 only have dormant and ticked to choose from.  The advantage of
14222 total-expire is that it works well with adaptive scoring @pxref{Adaptive
14223 Scoring}.  Auto-expire works with normal scoring but not with adaptive
14224 scoring.
14225
14226 @vindex gnus-auto-expirable-newsgroups
14227 Groups that match the regular expression
14228 @code{gnus-auto-expirable-newsgroups} will have all articles that you
14229 read marked as expirable automatically.  All articles marked as
14230 expirable have an @samp{E} in the first column in the summary buffer.
14231
14232 By default, if you have auto expiry switched on, Gnus will mark all the
14233 articles you read as expirable, no matter if they were read or unread
14234 before.  To avoid having articles marked as read marked as expirable
14235 automatically, you can put something like the following in your
14236 @file{~/.gnus.el} file:
14237
14238 @vindex gnus-mark-article-hook
14239 @lisp
14240 (remove-hook 'gnus-mark-article-hook
14241              'gnus-summary-mark-read-and-unread-as-read)
14242 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
14243 @end lisp
14244
14245 Note that making a group auto-expirable doesn't mean that all read
14246 articles are expired---only the articles marked as expirable
14247 will be expired.  Also note that using the @kbd{d} command won't make
14248 articles expirable---only semi-automatic marking of articles as read will
14249 mark the articles as expirable in auto-expirable groups.
14250
14251 Let's say you subscribe to a couple of mailing lists, and you want the
14252 articles you have read to disappear after a while:
14253
14254 @lisp
14255 (setq gnus-auto-expirable-newsgroups
14256       "mail.nonsense-list\\|mail.nice-list")
14257 @end lisp
14258
14259 Another way to have auto-expiry happen is to have the element
14260 @code{auto-expire} in the group parameters of the group.
14261
14262 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
14263 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
14264 don't really mix very well.
14265
14266 @vindex nnmail-expiry-wait
14267 The @code{nnmail-expiry-wait} variable supplies the default time an
14268 expirable article has to live.  Gnus starts counting days from when the
14269 message @emph{arrived}, not from when it was sent.  The default is seven
14270 days.
14271
14272 Gnus also supplies a function that lets you fine-tune how long articles
14273 are to live, based on what group they are in.  Let's say you want to
14274 have one month expiry period in the @samp{mail.private} group, a one day
14275 expiry period in the @samp{mail.junk} group, and a six day expiry period
14276 everywhere else:
14277
14278 @vindex nnmail-expiry-wait-function
14279 @lisp
14280 (setq nnmail-expiry-wait-function
14281       (lambda (group)
14282        (cond ((string= group "mail.private")
14283                31)
14284              ((string= group "mail.junk")
14285                1)
14286              ((string= group "important")
14287                'never)
14288              (t
14289                6))))
14290 @end lisp
14291
14292 The group names this function is fed are ``unadorned'' group
14293 names---no @samp{nnml:} prefixes and the like.
14294
14295 The @code{nnmail-expiry-wait} variable and
14296 @code{nnmail-expiry-wait-function} function can either be a number (not
14297 necessarily an integer) or one of the symbols @code{immediate} or
14298 @code{never}.
14299
14300 You can also use the @code{expiry-wait} group parameter to selectively
14301 change the expiry period (@pxref{Group Parameters}).
14302
14303 @vindex nnmail-expiry-target
14304 The normal action taken when expiring articles is to delete them.
14305 However, in some circumstances it might make more sense to move them
14306 to other groups instead of deleting them.  The variable
14307 @code{nnmail-expiry-target} (and the @code{expiry-target} group
14308 parameter) controls this.  The variable supplies a default value for
14309 all groups, which can be overridden for specific groups by the group
14310 parameter.  default value is @code{delete}, but this can also be a
14311 string (which should be the name of the group the message should be
14312 moved to), or a function (which will be called in a buffer narrowed to
14313 the message in question, and with the name of the group being moved
14314 from as its parameter) which should return a target---either a group
14315 name or @code{delete}.
14316
14317 Here's an example for specifying a group name:
14318 @lisp
14319 (setq nnmail-expiry-target "nnml:expired")
14320 @end lisp
14321
14322 @findex nnmail-fancy-expiry-target
14323 @vindex nnmail-fancy-expiry-targets
14324 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
14325 expire mail to groups according to the variable
14326 @code{nnmail-fancy-expiry-targets}.  Here's an example:
14327
14328 @lisp
14329  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
14330        nnmail-fancy-expiry-targets
14331        '((to-from "boss" "nnfolder:Work")
14332          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
14333          ("from" ".*" "nnfolder:Archive-%Y")))
14334 @end lisp
14335
14336 With this setup, any mail that has @code{IMPORTANT} in its Subject
14337 header and was sent in the year @code{YYYY} and month @code{MMM}, will
14338 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}. If its
14339 From or To header contains the string @code{boss}, it will get expired
14340 to @code{nnfolder:Work}. All other mail will get expired to
14341 @code{nnfolder:Archive-YYYY}.
14342
14343 @vindex nnmail-keep-last-article
14344 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
14345 expire the final article in a mail newsgroup.  This is to make life
14346 easier for procmail users.
14347
14348 @vindex gnus-total-expirable-newsgroups
14349 By the way: That line up there, about Gnus never expiring non-expirable
14350 articles, is a lie.  If you put @code{total-expire} in the group
14351 parameters, articles will not be marked as expirable, but all read
14352 articles will be put through the expiry process.  Use with extreme
14353 caution.  Even more dangerous is the
14354 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
14355 this regexp will have all read articles put through the expiry process,
14356 which means that @emph{all} old mail articles in the groups in question
14357 will be deleted after a while.  Use with extreme caution, and don't come
14358 crying to me when you discover that the regexp you used matched the
14359 wrong group and all your important mail has disappeared.  Be a
14360 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
14361 with!  So there!
14362
14363 Most people make most of their mail groups total-expirable, though.
14364
14365 @vindex gnus-inhibit-user-auto-expire
14366 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
14367 commands will not mark an article as expirable, even if the group has
14368 auto-expire turned on.
14369
14370
14371 @node Washing Mail
14372 @subsection Washing Mail
14373 @cindex mail washing
14374 @cindex list server brain damage
14375 @cindex incoming mail treatment
14376
14377 Mailers and list servers are notorious for doing all sorts of really,
14378 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
14379 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
14380 end of all lines passing through our server, so let's do that!!!!1!''
14381 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
14382 considered to be self-evident were not discussed.  So.  Here we are.
14383
14384 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
14385 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
14386 be shocked and dismayed by this, but I haven't got the energy.  It is to
14387 laugh.
14388
14389 Gnus provides a plethora of functions for washing articles while
14390 displaying them, but it might be nicer to do the filtering before
14391 storing the mail to disk.  For that purpose, we have three hooks and
14392 various functions that can be put in these hooks.
14393
14394 @table @code
14395 @item nnmail-prepare-incoming-hook
14396 @vindex nnmail-prepare-incoming-hook
14397 This hook is called before doing anything with the mail and is meant for
14398 grand, sweeping gestures.  It is called in a buffer that contains all
14399 the new, incoming mail.  Functions to be used include:
14400
14401 @table @code
14402 @item nnheader-ms-strip-cr
14403 @findex nnheader-ms-strip-cr
14404 Remove trailing carriage returns from each line.  This is default on
14405 Emacs running on MS machines.
14406
14407 @end table
14408
14409 @item nnmail-prepare-incoming-header-hook
14410 @vindex nnmail-prepare-incoming-header-hook
14411 This hook is called narrowed to each header.  It can be used when
14412 cleaning up the headers.  Functions that can be used include:
14413
14414 @table @code
14415 @item nnmail-remove-leading-whitespace
14416 @findex nnmail-remove-leading-whitespace
14417 Clear leading white space that ``helpful'' listservs have added to the
14418 headers to make them look nice.  Aaah.
14419
14420 (Note that this function works on both the header on the body of all
14421 messages, so it is a potentially dangerous function to use (if a body
14422 of a message contains something that looks like a header line).  So
14423 rather than fix the bug, it is of course the right solution to make it
14424 into a feature by documenting it.)
14425
14426 @item nnmail-remove-list-identifiers
14427 @findex nnmail-remove-list-identifiers
14428 Some list servers add an identifier---for example, @samp{(idm)}---to the
14429 beginning of all @code{Subject} headers.  I'm sure that's nice for
14430 people who use stone age mail readers.  This function will remove
14431 strings that match the @code{nnmail-list-identifiers} regexp, which can
14432 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
14433 @code{\\(..\\)}.
14434
14435 For instance, if you want to remove the @samp{(idm)} and the
14436 @samp{nagnagnag} identifiers:
14437
14438 @lisp
14439 (setq nnmail-list-identifiers
14440       '("(idm)" "nagnagnag"))
14441 @end lisp
14442
14443 This can also be done non-destructively with
14444 @code{gnus-list-identifiers}, @xref{Article Hiding}.
14445
14446 @item nnmail-remove-tabs
14447 @findex nnmail-remove-tabs
14448 Translate all @samp{TAB} characters into @samp{SPACE} characters.
14449
14450 @item nnmail-fix-eudora-headers
14451 @findex nnmail-fix-eudora-headers
14452 @cindex Eudora
14453 Eudora produces broken @code{References} headers, but OK
14454 @code{In-Reply-To} headers.  This function will get rid of the
14455 @code{References} headers.
14456
14457 @end table
14458
14459 @item nnmail-prepare-incoming-message-hook
14460 @vindex nnmail-prepare-incoming-message-hook
14461 This hook is called narrowed to each message.  Functions to be used
14462 include:
14463
14464 @table @code
14465 @item article-de-quoted-unreadable
14466 @findex article-de-quoted-unreadable
14467 Decode Quoted Readable encoding.
14468
14469 @end table
14470 @end table
14471
14472
14473 @node Duplicates
14474 @subsection Duplicates
14475
14476 @vindex nnmail-treat-duplicates
14477 @vindex nnmail-message-id-cache-length
14478 @vindex nnmail-message-id-cache-file
14479 @cindex duplicate mails
14480 If you are a member of a couple of mailing lists, you will sometimes
14481 receive two copies of the same mail.  This can be quite annoying, so
14482 @code{nnmail} checks for and treats any duplicates it might find.  To do
14483 this, it keeps a cache of old @code{Message-ID}s---
14484 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
14485 default.  The approximate maximum number of @code{Message-ID}s stored
14486 there is controlled by the @code{nnmail-message-id-cache-length}
14487 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
14488 stored.) If all this sounds scary to you, you can set
14489 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14490 default), and @code{nnmail} won't delete duplicate mails.  Instead it
14491 will insert a warning into the head of the mail saying that it thinks
14492 that this is a duplicate of a different message.
14493
14494 This variable can also be a function.  If that's the case, the function
14495 will be called from a buffer narrowed to the message in question with
14496 the @code{Message-ID} as a parameter.  The function must return either
14497 @code{nil}, @code{warn}, or @code{delete}.
14498
14499 You can turn this feature off completely by setting the variable to
14500 @code{nil}.
14501
14502 If you want all the duplicate mails to be put into a special
14503 @dfn{duplicates} group, you could do that using the normal mail split
14504 methods:
14505
14506 @lisp
14507 (setq nnmail-split-fancy
14508       '(| ;; @r{Messages duplicates go to a separate group.}
14509         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14510         ;; @r{Message from daemons, postmaster, and the like to another.}
14511         (any mail "mail.misc")
14512         ;; @r{Other rules.}
14513         [...] ))
14514 @end lisp
14515 @noindent
14516 Or something like:
14517 @lisp
14518 (setq nnmail-split-methods
14519       '(("duplicates" "^Gnus-Warning:.*duplicate")
14520         ;; @r{Other rules.}
14521         [...]))
14522 @end lisp
14523
14524 Here's a neat feature: If you know that the recipient reads her mail
14525 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14526 @code{delete}, you can send her as many insults as you like, just by
14527 using a @code{Message-ID} of a mail that you know that she's already
14528 received.  Think of all the fun!  She'll never see any of it!  Whee!
14529
14530
14531 @node Not Reading Mail
14532 @subsection Not Reading Mail
14533
14534 If you start using any of the mail back ends, they have the annoying
14535 habit of assuming that you want to read mail with them.  This might not
14536 be unreasonable, but it might not be what you want.
14537
14538 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14539 @code{nil}, none of the back ends will ever attempt to read incoming
14540 mail, which should help.
14541
14542 @vindex nnbabyl-get-new-mail
14543 @vindex nnmbox-get-new-mail
14544 @vindex nnml-get-new-mail
14545 @vindex nnmh-get-new-mail
14546 @vindex nnfolder-get-new-mail
14547 This might be too much, if, for instance, you are reading mail quite
14548 happily with @code{nnml} and just want to peek at some old Rmail
14549 file you have stashed away with @code{nnbabyl}.  All back ends have
14550 variables called back-end-@code{get-new-mail}.  If you want to disable
14551 the @code{nnbabyl} mail reading, you edit the virtual server for the
14552 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14553
14554 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14555 narrowed to the article to be saved before saving it when reading
14556 incoming mail.
14557
14558
14559 @node Choosing a Mail Back End
14560 @subsection Choosing a Mail Back End
14561
14562 Gnus will read the mail spool when you activate a mail group.  The mail
14563 file is first copied to your home directory.  What happens after that
14564 depends on what format you want to store your mail in.
14565
14566 There are six different mail back ends in the standard Gnus, and more
14567 back ends are available separately.  The mail back end most people use
14568 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14569 Spool}).
14570
14571 @menu
14572 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14573 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
14574 * Mail Spool::                  Store your mail in a private spool?
14575 * MH Spool::                    An mhspool-like back end.
14576 * Maildir::                     Another one-file-per-message format.
14577 * Mail Folders::                Having one file for each group.
14578 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14579 @end menu
14580
14581
14582 @node Unix Mail Box
14583 @subsubsection Unix Mail Box
14584 @cindex nnmbox
14585 @cindex unix mail box
14586
14587 @vindex nnmbox-active-file
14588 @vindex nnmbox-mbox-file
14589 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14590 mail.  @code{nnmbox} will add extra headers to each mail article to say
14591 which group it belongs in.
14592
14593 Virtual server settings:
14594
14595 @table @code
14596 @item nnmbox-mbox-file
14597 @vindex nnmbox-mbox-file
14598 The name of the mail box in the user's home directory.  Default is
14599 @file{~/mbox}.
14600
14601 @item nnmbox-active-file
14602 @vindex nnmbox-active-file
14603 The name of the active file for the mail box.  Default is
14604 @file{~/.mbox-active}.
14605
14606 @item nnmbox-get-new-mail
14607 @vindex nnmbox-get-new-mail
14608 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14609 into groups.  Default is @code{t}.
14610 @end table
14611
14612
14613 @node Rmail Babyl
14614 @subsubsection Rmail Babyl
14615 @cindex nnbabyl
14616 @cindex Rmail mbox
14617
14618 @vindex nnbabyl-active-file
14619 @vindex nnbabyl-mbox-file
14620 The @dfn{nnbabyl} back end will use a Babyl mail box (aka. @dfn{Rmail
14621 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14622 mail article to say which group it belongs in.
14623
14624 Virtual server settings:
14625
14626 @table @code
14627 @item nnbabyl-mbox-file
14628 @vindex nnbabyl-mbox-file
14629 The name of the Rmail mbox file.  The default is @file{~/RMAIL}
14630
14631 @item nnbabyl-active-file
14632 @vindex nnbabyl-active-file
14633 The name of the active file for the rmail box.  The default is
14634 @file{~/.rmail-active}
14635
14636 @item nnbabyl-get-new-mail
14637 @vindex nnbabyl-get-new-mail
14638 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14639 @code{t}
14640 @end table
14641
14642
14643 @node Mail Spool
14644 @subsubsection Mail Spool
14645 @cindex nnml
14646 @cindex mail @acronym{NOV} spool
14647
14648 The @dfn{nnml} spool mail format isn't compatible with any other known
14649 format.  It should be used with some caution.
14650
14651 @vindex nnml-directory
14652 If you use this back end, Gnus will split all incoming mail into files,
14653 one file for each mail, and put the articles into the corresponding
14654 directories under the directory specified by the @code{nnml-directory}
14655 variable.  The default value is @file{~/Mail/}.
14656
14657 You do not have to create any directories beforehand; Gnus will take
14658 care of all that.
14659
14660 If you have a strict limit as to how many files you are allowed to store
14661 in your account, you should not use this back end.  As each mail gets its
14662 own file, you might very well occupy thousands of inodes within a few
14663 weeks.  If this is no problem for you, and it isn't a problem for you
14664 having your friendly systems administrator walking around, madly,
14665 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14666 know that this is probably the fastest format to use.  You do not have
14667 to trudge through a big mbox file just to read your new mail.
14668
14669 @code{nnml} is probably the slowest back end when it comes to article
14670 splitting.  It has to create lots of files, and it also generates
14671 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
14672 fastest back end when it comes to reading mail.
14673
14674 @cindex self contained nnml servers
14675 @cindex marks
14676 When the marks file is used (which it is by default), @code{nnml}
14677 servers have the property that you may backup them using @code{tar} or
14678 similar, and later be able to restore them into Gnus (by adding the
14679 proper @code{nnml} server) and have all your marks be preserved.  Marks
14680 for a group is usually stored in the @code{.marks} file (but see
14681 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14682 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14683 to restore the group (after restoring the backup into the nnml
14684 directory).
14685
14686 If for some reason you believe your @file{.marks} files are screwed
14687 up, you can just delete them all.  Gnus will then correctly regenerate
14688 them next time it starts.
14689
14690 Virtual server settings:
14691
14692 @table @code
14693 @item nnml-directory
14694 @vindex nnml-directory
14695 All @code{nnml} directories will be placed under this directory.  The
14696 default is the value of @code{message-directory} (whose default value
14697 is @file{~/Mail}).
14698
14699 @item nnml-active-file
14700 @vindex nnml-active-file
14701 The active file for the @code{nnml} server.  The default is
14702 @file{~/Mail/active}.
14703
14704 @item nnml-newsgroups-file
14705 @vindex nnml-newsgroups-file
14706 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14707 Format}.  The default is @file{~/Mail/newsgroups}.
14708
14709 @item nnml-get-new-mail
14710 @vindex nnml-get-new-mail
14711 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14712 @code{t}.
14713
14714 @item nnml-nov-is-evil
14715 @vindex nnml-nov-is-evil
14716 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
14717 default is @code{nil}.
14718
14719 @item nnml-nov-file-name
14720 @vindex nnml-nov-file-name
14721 The name of the @acronym{NOV} files.  The default is @file{.overview}.
14722
14723 @item nnml-prepare-save-mail-hook
14724 @vindex nnml-prepare-save-mail-hook
14725 Hook run narrowed to an article before saving.
14726
14727 @item nnml-marks-is-evil
14728 @vindex nnml-marks-is-evil
14729 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14730 default is @code{nil}.
14731
14732 @item nnml-marks-file-name
14733 @vindex nnml-marks-file-name
14734 The name of the @dfn{marks} files.  The default is @file{.marks}.
14735
14736 @item nnml-use-compressed-files
14737 @vindex nnml-use-compressed-files
14738 If non-@code{nil}, @code{nnml} will allow using compressed message
14739 files.
14740
14741 @end table
14742
14743 @findex nnml-generate-nov-databases
14744 If your @code{nnml} groups and @acronym{NOV} files get totally out of whack,
14745 you can do a complete update by typing @kbd{M-x
14746 nnml-generate-nov-databases}.  This command will trawl through the
14747 entire @code{nnml} hierarchy, looking at each and every article, so it
14748 might take a while to complete.  A better interface to this
14749 functionality can be found in the server buffer (@pxref{Server
14750 Commands}).
14751
14752
14753 @node MH Spool
14754 @subsubsection MH Spool
14755 @cindex nnmh
14756 @cindex mh-e mail spool
14757
14758 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
14759 @acronym{NOV} databases and it doesn't keep an active file or marks file.
14760 This makes @code{nnmh} a @emph{much} slower back end than @code{nnml},
14761 but it also makes it easier to write procmail scripts for.
14762
14763 Virtual server settings:
14764
14765 @table @code
14766 @item nnmh-directory
14767 @vindex nnmh-directory
14768 All @code{nnmh} directories will be located under this directory.  The
14769 default is the value of @code{message-directory} (whose default is
14770 @file{~/Mail})
14771
14772 @item nnmh-get-new-mail
14773 @vindex nnmh-get-new-mail
14774 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
14775 @code{t}.
14776
14777 @item nnmh-be-safe
14778 @vindex nnmh-be-safe
14779 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
14780 sure that the articles in the folder are actually what Gnus thinks they
14781 are.  It will check date stamps and stat everything in sight, so
14782 setting this to @code{t} will mean a serious slow-down.  If you never
14783 use anything but Gnus to read the @code{nnmh} articles, you do not have
14784 to set this variable to @code{t}.  The default is @code{nil}.
14785 @end table
14786
14787
14788 @node Maildir
14789 @subsubsection Maildir
14790 @cindex nnmaildir
14791 @cindex maildir
14792
14793 @code{nnmaildir} stores mail in the maildir format, with each maildir
14794 corresponding to a group in Gnus.  This format is documented here:
14795 @uref{http://cr.yp.to/proto/maildir.html} and here:
14796 @uref{http://www.qmail.org/man/man5/maildir.html}.  nnmaildir also
14797 stores extra information in the @file{.nnmaildir/} directory within a
14798 maildir.
14799
14800 Maildir format was designed to allow concurrent deliveries and
14801 reading, without needing locks.  With other back ends, you would have
14802 your mail delivered to a spool of some kind, and then you would
14803 configure Gnus to split mail from that spool into your groups.  You
14804 can still do that with nnmaildir, but the more common configuration is
14805 to have your mail delivered directly to the maildirs that appear as
14806 group in Gnus.
14807
14808 nnmaildir is designed to be perfectly reliable: @kbd{C-g} will never
14809 corrupt its data in memory, and @code{SIGKILL} will never corrupt its
14810 data in the filesystem.
14811
14812 nnmaildir stores article marks and @acronym{NOV} data in each maildir.  So you
14813 can copy a whole maildir from one Gnus setup to another, and you will
14814 keep your marks.
14815
14816 Virtual server settings:
14817
14818 @table @code
14819 @item directory
14820 For each of your nnmaildir servers (it's very unlikely that you'd need
14821 more than one), you need to create a directory and populate it with
14822 maildirs or symlinks to maildirs (and nothing else; do not choose a
14823 directory already used for other purposes).  Each maildir will be
14824 represented in Gnus as a newsgroup on that server; the filename of the
14825 symlink will be the name of the group.  Any filenames in the directory
14826 starting with `.' are ignored.  The directory is scanned when you
14827 first start Gnus, and each time you type @kbd{g} in the group buffer;
14828 if any maildirs have been removed or added, nnmaildir notices at these
14829 times.
14830
14831 The value of the @code{directory} parameter should be a Lisp form
14832 which is processed by @code{eval} and @code{expand-file-name} to get
14833 the path of the directory for this server.  The form is @code{eval}ed
14834 only when the server is opened; the resulting string is used until the
14835 server is closed.  (If you don't know about forms and @code{eval},
14836 don't worry---a simple string will work.)  This parameter is not
14837 optional; you must specify it.  I don't recommend using
14838 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
14839 use that directory by default for various things, and may get confused
14840 if nnmaildir uses it too.  @code{"~/.nnmaildir"} is a typical value.
14841
14842 @item target-prefix
14843 This should be a Lisp form which is processed by @code{eval} and
14844 @code{expand-file-name}.  The form is @code{eval}ed only when the
14845 server is opened; the resulting string is used until the server is
14846 closed.
14847
14848 When you create a group on an nnmaildir server, the maildir is created
14849 with @code{target-prefix} prepended to its name, and a symlink
14850 pointing to that maildir is created, named with the plain group name.
14851 So if @code{directory} is @code{"~/.nnmaildir"} and
14852 @code{target-prefix} is @code{"../maildirs/"}, then when you create
14853 the group @code{foo}, nnmaildir will create
14854 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
14855 @file{~/.nnmaildir/foo} as a symlink pointing to
14856 @file{../maildirs/foo}.
14857
14858 You can set @code{target-prefix} to a string without any slashes to
14859 create both maildirs and symlinks in the same @code{directory}; in
14860 this case, any maildirs found in @code{directory} whose names start
14861 with @code{target-prefix} will not be listed as groups (but the
14862 symlinks pointing to them will be).
14863
14864 As a special case, if @code{target-prefix} is @code{""} (the default),
14865 then when you create a group, the maildir will be created in
14866 @code{directory} without a corresponding symlink.  Beware that you
14867 cannot use @code{gnus-group-delete-group} on such groups without the
14868 @code{force} argument.
14869
14870 @item directory-files
14871 This should be a function with the same interface as
14872 @code{directory-files} (such as @code{directory-files} itself).  It is
14873 used to scan the server's @code{directory} for maildirs.  This
14874 parameter is optional; the default is
14875 @code{nnheader-directory-files-safe} if
14876 @code{nnheader-directory-files-is-safe} is @code{nil}, and
14877 @code{directory-files} otherwise.
14878 (@code{nnheader-directory-files-is-safe} is checked only once when the
14879 server is opened; if you want to check it each time the directory is
14880 scanned, you'll have to provide your own function that does that.)
14881
14882 @item get-new-mail
14883 If non-@code{nil}, then after scanning for new mail in the group
14884 maildirs themselves as usual, this server will also incorporate mail
14885 the conventional Gnus way, from @code{mail-sources} according to
14886 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
14887 value is @code{nil}.
14888
14889 Do @emph{not} use the same maildir both in @code{mail-sources} and as
14890 an nnmaildir group.  The results might happen to be useful, but that
14891 would be by chance, not by design, and the results might be different
14892 in the future.  If your split rules create new groups, remember to
14893 supply a @code{create-directory} server parameter.
14894 @end table
14895
14896 @subsubsection Group parameters
14897
14898 nnmaildir uses several group parameters.  It's safe to ignore all
14899 this; the default behavior for nnmaildir is the same as the default
14900 behavior for other mail back ends: articles are deleted after one week,
14901 etc.  Except for the expiry parameters, all this functionality is
14902 unique to nnmaildir, so you can ignore it if you're just trying to
14903 duplicate the behavior you already have with another back end.
14904
14905 If the value of any of these parameters is a vector, the first element
14906 is evaluated as a Lisp form and the result is used, rather than the
14907 original value.  If the value is not a vector, the value itself is
14908 evaluated as a Lisp form.  (This is why these parameters use names
14909 different from those of other, similar parameters supported by other
14910 back ends: they have different, though similar, meanings.)  (For
14911 numbers, strings, @code{nil}, and @code{t}, you can ignore the
14912 @code{eval} business again; for other values, remember to use an extra
14913 quote and wrap the value in a vector when appropriate.)
14914
14915 @table @code
14916 @item expire-age
14917 An integer specifying the minimum age, in seconds, of an article before
14918 it will be expired, or the symbol @code{never} to specify that
14919 articles should never be expired.  If this parameter is not set,
14920 nnmaildir falls back to the usual
14921 @code{nnmail-expiry-wait}(@code{-function}) variables (overrideable by
14922 the @code{expiry-wait}(@code{-function}) group parameters.  If you
14923 wanted a value of 3 days, you could use something like @code{[(* 3 24
14924 60 60)]}; nnmaildir will evaluate the form and use the result.  An
14925 article's age is measured starting from the article file's
14926 modification time.  Normally, this is the same as the article's
14927 delivery time, but editing an article makes it younger.  Moving an
14928 article (other than via expiry) may also make an article younger.
14929
14930 @item expire-group
14931 If this is set to a string such as a full Gnus group name, like
14932 @example
14933 "backend+server.address.string:group.name"
14934 @end example
14935 and if it is not the name of the same group that the parameter belongs
14936 to, then articles will be moved to the specified group during expiry
14937 before being deleted.  @emph{If this is set to an nnmaildir group, the
14938 article will be just as old in the destination group as it was in the
14939 source group.}  So be careful with @code{expire-age} in the
14940 destination group.  If this is set to the name of the same group that
14941 the parameter belongs to, then the article is not expired at all.  If
14942 you use the vector form, the first element is evaluated once for each
14943 article.  So that form can refer to
14944 @code{nnmaildir-article-file-name}, etc., to decide where to put the
14945 article.  @emph{If this parameter is not set, nnmaildir does not fall
14946 back to the @code{expiry-target} group parameter or the
14947 @code{nnmail-expiry-target} variable.}
14948
14949 @item read-only
14950 If this is set to @code{t}, nnmaildir will treat the articles in this
14951 maildir as read-only.  This means: articles are not renamed from
14952 @file{new/} into @file{cur/}; articles are only found in @file{new/},
14953 not @file{cur/}; articles are never deleted; articles cannot be
14954 edited.  @file{new/} is expected to be a symlink to the @file{new/}
14955 directory of another maildir---e.g., a system-wide mailbox containing
14956 a mailing list of common interest.  Everything in the maildir outside
14957 @file{new/} is @emph{not} treated as read-only, so for a shared
14958 mailbox, you do still need to set up your own maildir (or have write
14959 permission to the shared mailbox); your maildir just won't contain
14960 extra copies of the articles.
14961
14962 @item directory-files
14963 A function with the same interface as @code{directory-files}.  It is
14964 used to scan the directories in the maildir corresponding to this
14965 group to find articles.  The default is the function specified by the
14966 server's @code{directory-files} parameter.
14967
14968 @item distrust-Lines:
14969 If non-@code{nil}, nnmaildir will always count the lines of an
14970 article, rather than use the @code{Lines:} header field.  If
14971 @code{nil}, the header field will be used if present.
14972
14973 @item always-marks
14974 A list of mark symbols, such as
14975 @code{['(read expire)]}.  Whenever Gnus asks nnmaildir for
14976 article marks, nnmaildir will say that all articles have these
14977 marks, regardless of whether the marks stored in the filesystem
14978 say so.  This is a proof-of-concept feature that will probably be
14979 removed eventually; it ought to be done in Gnus proper, or
14980 abandoned if it's not worthwhile.
14981
14982 @item never-marks
14983 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
14984 Gnus asks nnmaildir for article marks, nnmaildir will say that no
14985 articles have these marks, regardless of whether the marks stored in
14986 the filesystem say so.  @code{never-marks} overrides
14987 @code{always-marks}.  This is a proof-of-concept feature that will
14988 probably be removed eventually; it ought to be done in Gnus proper, or
14989 abandoned if it's not worthwhile.
14990
14991 @item nov-cache-size
14992 An integer specifying the size of the @acronym{NOV} memory cache.  To speed
14993 things up, nnmaildir keeps @acronym{NOV} data in memory for a limited number of
14994 articles in each group.  (This is probably not worthwhile, and will
14995 probably be removed in the future.)  This parameter's value is noticed
14996 only the first time a group is seen after the server is opened---i.e.,
14997 when you first start Gnus, typically.  The @acronym{NOV} cache is never resized
14998 until the server is closed and reopened.  The default is an estimate
14999 of the number of articles that would be displayed in the summary
15000 buffer: a count of articles that are either marked with @code{tick} or
15001 not marked with @code{read}, plus a little extra.
15002 @end table
15003
15004 @subsubsection Article identification
15005 Articles are stored in the @file{cur/} subdirectory of each maildir.
15006 Each article file is named like @code{uniq:info}, where @code{uniq}
15007 contains no colons.  nnmaildir ignores, but preserves, the
15008 @code{:info} part.  (Other maildir readers typically use this part of
15009 the filename to store marks.)  The @code{uniq} part uniquely
15010 identifies the article, and is used in various places in the
15011 @file{.nnmaildir/} subdirectory of the maildir to store information
15012 about the corresponding article.  The full pathname of an article is
15013 available in the variable @code{nnmaildir-article-file-name} after you
15014 request the article in the summary buffer.
15015
15016 @subsubsection NOV data
15017 An article identified by @code{uniq} has its @acronym{NOV} data (used to
15018 generate lines in the summary buffer) stored in
15019 @code{.nnmaildir/nov/uniq}.  There is no
15020 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
15021 need for it---an article's @acronym{NOV} data is updated automatically when the
15022 article or @code{nnmail-extra-headers} has changed.)  You can force
15023 nnmaildir to regenerate the @acronym{NOV} data for a single article simply by
15024 deleting the corresponding @acronym{NOV} file, but @emph{beware}: this will also
15025 cause nnmaildir to assign a new article number for this article, which
15026 may cause trouble with @code{seen} marks, the Agent, and the cache.
15027
15028 @subsubsection Article marks
15029 An article identified by @code{uniq} is considered to have the mark
15030 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
15031 When Gnus asks nnmaildir for a group's marks, nnmaildir looks for such
15032 files and reports the set of marks it finds.  When Gnus asks nnmaildir
15033 to store a new set of marks, nnmaildir creates and deletes the
15034 corresponding files as needed.  (Actually, rather than create a new
15035 file for each mark, it just creates hard links to
15036 @file{.nnmaildir/markfile}, to save inodes.)
15037
15038 You can invent new marks by creating a new directory in
15039 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
15040 your server, untar it later, and keep your marks.  You can add and
15041 remove marks yourself by creating and deleting mark files.  If you do
15042 this while Gnus is running and your nnmaildir server is open, it's
15043 best to exit all summary buffers for nnmaildir groups and type @kbd{s}
15044 in the group buffer first, and to type @kbd{g} or @kbd{M-g} in the
15045 group buffer afterwards.  Otherwise, Gnus might not pick up the
15046 changes, and might undo them.
15047
15048
15049 @node Mail Folders
15050 @subsubsection Mail Folders
15051 @cindex nnfolder
15052 @cindex mbox folders
15053 @cindex mail folders
15054
15055 @code{nnfolder} is a back end for storing each mail group in a separate
15056 file.  Each file is in the standard Un*x mbox format.  @code{nnfolder}
15057 will add extra headers to keep track of article numbers and arrival
15058 dates.
15059
15060 @cindex self contained nnfolder servers
15061 @cindex marks
15062 When the marks file is used (which it is by default), @code{nnfolder}
15063 servers have the property that you may backup them using @code{tar} or
15064 similar, and later be able to restore them into Gnus (by adding the
15065 proper @code{nnfolder} server) and have all your marks be preserved.
15066 Marks for a group is usually stored in a file named as the mbox file
15067 with @code{.mrk} concatenated to it (but see
15068 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder} directory.
15069 Individual @code{nnfolder} groups are also possible to backup, use
15070 @kbd{G m} to restore the group (after restoring the backup into the
15071 @code{nnfolder} directory).
15072
15073 Virtual server settings:
15074
15075 @table @code
15076 @item nnfolder-directory
15077 @vindex nnfolder-directory
15078 All the @code{nnfolder} mail boxes will be stored under this directory.
15079 The default is the value of @code{message-directory} (whose default is
15080 @file{~/Mail})
15081
15082 @item nnfolder-active-file
15083 @vindex nnfolder-active-file
15084 The name of the active file.  The default is @file{~/Mail/active}.
15085
15086 @item nnfolder-newsgroups-file
15087 @vindex nnfolder-newsgroups-file
15088 The name of the group descriptions file.  @xref{Newsgroups File
15089 Format}.  The default is @file{~/Mail/newsgroups}
15090
15091 @item nnfolder-get-new-mail
15092 @vindex nnfolder-get-new-mail
15093 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The default
15094 is @code{t}
15095
15096 @item nnfolder-save-buffer-hook
15097 @vindex nnfolder-save-buffer-hook
15098 @cindex backup files
15099 Hook run before saving the folders.  Note that Emacs does the normal
15100 backup renaming of files even with the @code{nnfolder} buffers.  If you
15101 wish to switch this off, you could say something like the following in
15102 your @file{.emacs} file:
15103
15104 @lisp
15105 (defun turn-off-backup ()
15106   (set (make-local-variable 'backup-inhibited) t))
15107
15108 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
15109 @end lisp
15110
15111 @item nnfolder-delete-mail-hook
15112 @vindex nnfolder-delete-mail-hook
15113 Hook run in a buffer narrowed to the message that is to be deleted.
15114 This function can be used to copy the message to somewhere else, or to
15115 extract some information from it before removing it.
15116
15117 @item nnfolder-nov-is-evil
15118 @vindex nnfolder-nov-is-evil
15119 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
15120 default is @code{nil}.
15121
15122 @item nnfolder-nov-file-suffix
15123 @vindex nnfolder-nov-file-suffix
15124 The extension for @acronym{NOV} files.  The default is @file{.nov}.
15125
15126 @item nnfolder-nov-directory
15127 @vindex nnfolder-nov-directory
15128 The directory where the @acronym{NOV} files should be stored.  If
15129 @code{nil}, @code{nnfolder-directory} is used.
15130
15131 @item nnfolder-marks-is-evil
15132 @vindex nnfolder-marks-is-evil
15133 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
15134 default is @code{nil}.
15135
15136 @item nnfolder-marks-file-suffix
15137 @vindex nnfolder-marks-file-suffix
15138 The extension for @sc{marks} files.  The default is @file{.mrk}.
15139
15140 @item nnfolder-marks-directory
15141 @vindex nnfolder-marks-directory
15142 The directory where the @sc{marks} files should be stored.  If
15143 @code{nil}, @code{nnfolder-directory} is used.
15144
15145 @end table
15146
15147
15148 @findex nnfolder-generate-active-file
15149 @kindex M-x nnfolder-generate-active-file
15150 If you have lots of @code{nnfolder}-like files you'd like to read with
15151 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
15152 command to make @code{nnfolder} aware of all likely files in
15153 @code{nnfolder-directory}.  This only works if you use long file names,
15154 though.
15155
15156 @node Comparing Mail Back Ends
15157 @subsubsection Comparing Mail Back Ends
15158
15159 First, just for terminology, the @dfn{back end} is the common word for a
15160 low-level access method---a transport, if you will, by which something
15161 is acquired.  The sense is that one's mail has to come from somewhere,
15162 and so selection of a suitable back end is required in order to get that
15163 mail within spitting distance of Gnus.
15164
15165 The same concept exists for Usenet itself: Though access to articles is
15166 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
15167 in the world got at Usenet by running a reader on the machine where the
15168 articles lay (the machine which today we call an @acronym{NNTP} server), and
15169 access was by the reader stepping into the articles' directory spool
15170 area directly.  One can still select between either the @code{nntp} or
15171 @code{nnspool} back ends, to select between these methods, if one happens
15172 actually to live on the server (or can see its spool directly, anyway,
15173 via NFS).
15174
15175 The goal in selecting a mail back end is to pick one which
15176 simultaneously represents a suitable way of dealing with the original
15177 format plus leaving mail in a form that is convenient to use in the
15178 future.  Here are some high and low points on each:
15179
15180 @table @code
15181 @item nnmbox
15182
15183 UNIX systems have historically had a single, very common, and well-
15184 defined format.  All messages arrive in a single @dfn{spool file}, and
15185 they are delineated by a line whose regular expression matches
15186 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
15187 to make it clear in this instance that this is not the RFC-specified
15188 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
15189 historically from the Unix environment, it is simplest if one does not
15190 mess a great deal with the original mailbox format, so if one chooses
15191 this back end, Gnus' primary activity in getting mail from the real spool
15192 area to Gnus' preferred directory is simply to copy it, with no
15193 (appreciable) format change in the process.  It is the ``dumbest'' way
15194 to move mail into availability in the Gnus environment.  This makes it
15195 fast to move into place, but slow to parse, when Gnus has to look at
15196 what's where.
15197
15198 @item nnbabyl
15199
15200 Once upon a time, there was the DEC-10 and DEC-20, running operating
15201 systems called TOPS and related things, and the usual (only?) mail
15202 reading environment was a thing called Babyl.  I don't know what format
15203 was used for mail landing on the system, but Babyl had its own internal
15204 format to which mail was converted, primarily involving creating a
15205 spool-file-like entity with a scheme for inserting Babyl-specific
15206 headers and status bits above the top of each message in the file.
15207 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
15208 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
15209 to understand the mail files folks already had in existence.  Gnus (and
15210 VM, for that matter) continue to support this format because it's
15211 perceived as having some good qualities in those mailer-specific
15212 headers/status bits stuff.  Rmail itself still exists as well, of
15213 course, and is still maintained by Stallman.
15214
15215 Both of the above forms leave your mail in a single file on your
15216 file system, and they must parse that entire file each time you take a
15217 look at your mail.
15218
15219 @item nnml
15220
15221 @code{nnml} is the back end which smells the most as though you were
15222 actually operating with an @code{nnspool}-accessed Usenet system.  (In
15223 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
15224 lo these years ago.)  One's mail is taken from the original spool file,
15225 and is then cut up into individual message files, 1:1.  It maintains a
15226 Usenet-style active file (analogous to what one finds in an INN- or
15227 CNews-based news system in (for instance) @file{/var/lib/news/active},
15228 or what is returned via the @samp{NNTP LIST} verb) and also creates
15229 @dfn{overview} files for efficient group entry, as has been defined for
15230 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
15231 due to the creation of lots of files, updates to the @code{nnml} active
15232 file, and additions to overview files on a per-message basis, but it is
15233 extremely fast on access because of what amounts to the indexing support
15234 provided by the active file and overviews.
15235
15236 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
15237 resource which defines available places in the file system to put new
15238 files.  Sysadmins take a dim view of heavy inode occupation within
15239 tight, shared file systems.  But if you live on a personal machine where
15240 the file system is your own and space is not at a premium, @code{nnml}
15241 wins big.
15242
15243 It is also problematic using this back end if you are living in a
15244 FAT16-based Windows world, since much space will be wasted on all these
15245 tiny files.
15246
15247 @item nnmh
15248
15249 The Rand MH mail-reading system has been around UNIX systems for a very
15250 long time; it operates by splitting one's spool file of messages into
15251 individual files, but with little or no indexing support---@code{nnmh}
15252 is considered to be semantically equivalent to ``@code{nnml} without
15253 active file or overviews''.  This is arguably the worst choice, because
15254 one gets the slowness of individual file creation married to the
15255 slowness of access parsing when learning what's new in one's groups.
15256
15257 @item nnfolder
15258
15259 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
15260 method described above) on a per-group basis.  That is, @code{nnmbox}
15261 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
15262 little bit of optimization to this so that each of one's mail groups has
15263 a Unix mail box file.  It's faster than @code{nnmbox} because each group
15264 can be parsed separately, and still provides the simple Unix mail box
15265 format requiring minimal effort in moving the mail around.  In addition,
15266 it maintains an ``active'' file making it much faster for Gnus to figure
15267 out how many messages there are in each separate group.
15268
15269 If you have groups that are expected to have a massive amount of
15270 messages, @code{nnfolder} is not the best choice, but if you receive
15271 only a moderate amount of mail, @code{nnfolder} is probably the most
15272 friendly mail back end all over.
15273
15274 @item nnmaildir
15275
15276 For configuring expiry and other things, @code{nnmaildir} uses
15277 incompatible group parameters, slightly different from those of other
15278 mail back ends.
15279
15280 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
15281 differences.  Each message is stored in a separate file, but the
15282 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
15283 also stores the equivalent of @code{nnml}'s overview files in one file
15284 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
15285 @code{df -i} to see how plentiful your inode supply is.)  If this slows
15286 you down or takes up very much space, consider switching to 
15287 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
15288 file system.
15289
15290 Since maildirs don't require locking for delivery, the maildirs you use
15291 as groups can also be the maildirs your mail is directly delivered to.
15292 This means you can skip Gnus' mail splitting if your mail is already
15293 organized into different mailboxes during delivery.  A @code{directory}
15294 entry in @code{mail-sources} would have a similar effect, but would
15295 require one set of mailboxes for spooling deliveries (in mbox format,
15296 thus damaging message bodies), and another set to be used as groups (in
15297 whatever format you like).  A maildir has a built-in spool, in the
15298 @code{new/} subdirectory.  Beware that currently, mail moved from
15299 @code{new/} to @code{cur/} instead of via mail splitting will not
15300 undergo treatment such as duplicate checking.
15301
15302 @code{nnmaildir} stores article marks for a given group in the
15303 corresponding maildir, in a way designed so that it's easy to manipulate
15304 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
15305 else, and still have your marks.  @code{nnml} also stores marks, but
15306 it's not as easy to work with them from outside Gnus as with
15307 @code{nnmaildir}.
15308
15309 @code{nnmaildir} uses a significant amount of memory to speed things up.
15310 (It keeps in memory some of the things that @code{nnml} stores in files
15311 and that @code{nnmh} repeatedly parses out of message files.)  If this
15312 is a problem for you, you can set the @code{nov-cache-size} group
15313 parameter to something small (0 would probably not work, but 1 probably
15314 would) to make it use less memory.  This caching will probably be
15315 removed in the future.
15316
15317 Startup is likely to be slower with @code{nnmaildir} than with other
15318 back ends.  Everything else is likely to be faster, depending in part
15319 on your file system.
15320
15321 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
15322 to write an @code{nnmaildir}-derived back end.
15323
15324 @end table
15325
15326
15327 @node Browsing the Web
15328 @section Browsing the Web
15329 @cindex web
15330 @cindex browsing the web
15331 @cindex www
15332 @cindex http
15333
15334 Web-based discussion forums are getting more and more popular.  On many
15335 subjects, the web-based forums have become the most important forums,
15336 eclipsing the importance of mailing lists and news groups.  The reason
15337 is easy to understand---they are friendly to new users; you just point
15338 and click, and there's the discussion.  With mailing lists, you have to
15339 go through a cumbersome subscription procedure, and most people don't
15340 even know what a news group is.
15341
15342 The problem with this scenario is that web browsers are not very good at
15343 being newsreaders.  They do not keep track of what articles you've read;
15344 they do not allow you to score on subjects you're interested in; they do
15345 not allow off-line browsing; they require you to click around and drive
15346 you mad in the end.
15347
15348 So---if web browsers suck at reading discussion forums, why not use Gnus
15349 to do it instead?
15350
15351 Gnus has been getting a bit of a collection of back ends for providing
15352 interfaces to these sources.
15353
15354 @menu
15355 * Archiving Mail::              
15356 * Web Searches::                Creating groups from articles that match a string.
15357 * Slashdot::                    Reading the Slashdot comments.
15358 * Ultimate::                    The Ultimate Bulletin Board systems.
15359 * Web Archive::                 Reading mailing list archived on web.
15360 * RSS::                         Reading RDF site summary.
15361 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
15362 @end menu
15363
15364 All the web sources require Emacs/w3 and the url library to work.
15365
15366 The main caveat with all these web sources is that they probably won't
15367 work for a very long time.  Gleaning information from the @acronym{HTML} data
15368 is guesswork at best, and when the layout is altered, the Gnus back end
15369 will fail.  If you have reasonably new versions of these back ends,
15370 though, you should be ok.
15371
15372 One thing all these Web methods have in common is that the Web sources
15373 are often down, unavailable or just plain too slow to be fun.  In those
15374 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
15375 Unplugged}) handle downloading articles, and then you can read them at
15376 leisure from your local disk.  No more World Wide Wait for you.
15377
15378 @node Archiving Mail
15379 @subsection Archiving Mail
15380 @cindex archiving mail
15381 @cindex backup of mail
15382
15383 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
15384 @code{nnmaildir}, now actually store the article marks with each group.
15385 For these servers, archiving and restoring a group while preserving
15386 marks is fairly simple.
15387
15388 (Preserving the group level and group parameters as well still
15389 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
15390 though.)
15391
15392 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
15393 server, take a recursive copy of the server directory.  There is no need
15394 to shut down Gnus, so archiving may be invoked by @code{cron} or
15395 similar.  You restore the data by restoring the directory tree, and
15396 adding a server definition pointing to that directory in Gnus. The
15397 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
15398 might interfere with overwriting data, so you may want to shut down Gnus
15399 before you restore the data.
15400
15401 It is also possible to archive individual @code{nnml},
15402 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
15403 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
15404 directory.  For @code{nnfolder} you need to copy both the base folder
15405 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
15406 this example). Restoring the group is done with @kbd{G m} from the Group
15407 buffer.  The last step makes Gnus notice the new directory.
15408 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
15409 is unnecessary in that case.
15410
15411 @node Web Searches
15412 @subsection Web Searches
15413 @cindex nnweb
15414 @cindex Google
15415 @cindex dejanews
15416 @cindex gmane
15417 @cindex Usenet searches
15418 @cindex searching the Usenet
15419
15420 It's, like, too neat to search the Usenet for articles that match a
15421 string, but it, like, totally @emph{sucks}, like, totally, to use one of
15422 those, like, Web browsers, and you, like, have to, rilly, like, look at
15423 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
15424 searches without having to use a browser.
15425
15426 The @code{nnweb} back end allows an easy interface to the mighty search
15427 engine.  You create an @code{nnweb} group, enter a search pattern, and
15428 then enter the group and read the articles like you would any normal
15429 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
15430 Groups}) will do this in an easy-to-use fashion.
15431
15432 @code{nnweb} groups don't really lend themselves to being solid
15433 groups---they have a very fleeting idea of article numbers.  In fact,
15434 each time you enter an @code{nnweb} group (not even changing the search
15435 pattern), you are likely to get the articles ordered in a different
15436 manner.  Not even using duplicate suppression (@pxref{Duplicate
15437 Suppression}) will help, since @code{nnweb} doesn't even know the
15438 @code{Message-ID} of the articles before reading them using some search
15439 engines (Google, for instance).  The only possible way to keep track
15440 of which articles you've read is by scoring on the @code{Date}
15441 header---mark all articles posted before the last date you read the
15442 group as read.
15443
15444 If the search engine changes its output substantially, @code{nnweb}
15445 won't be able to parse it and will fail.  One could hardly fault the Web
15446 providers if they were to do this---their @emph{raison d'être} is to
15447 make money off of advertisements, not to provide services to the
15448 community.  Since @code{nnweb} washes the ads off all the articles, one
15449 might think that the providers might be somewhat miffed.  We'll see.
15450
15451 You must have the @code{url} and @code{w3} package installed to be able
15452 to use @code{nnweb}.
15453
15454 Virtual server variables:
15455
15456 @table @code
15457 @item nnweb-type
15458 @vindex nnweb-type
15459 What search engine type is being used.  The currently supported types
15460 are @code{google}, @code{dejanews}, and @code{gmane}. Note that
15461 @code{dejanews} is an alias to @code{google}.
15462
15463 @item nnweb-search
15464 @vindex nnweb-search
15465 The search string to feed to the search engine.
15466
15467 @item nnweb-max-hits
15468 @vindex nnweb-max-hits
15469 Advisory maximum number of hits per search to display.  The default is
15470 999.
15471
15472 @item nnweb-type-definition
15473 @vindex nnweb-type-definition
15474 Type-to-definition alist.  This alist says what @code{nnweb} should do
15475 with the various search engine types.  The following elements must be
15476 present:
15477
15478 @table @code
15479 @item article
15480 Function to decode the article and provide something that Gnus
15481 understands.
15482
15483 @item map
15484 Function to create an article number to message header and URL alist.
15485
15486 @item search
15487 Function to send the search string to the search engine.
15488
15489 @item address
15490 The address the aforementioned function should send the search string
15491 to.
15492
15493 @item id
15494 Format string URL to fetch an article by @code{Message-ID}.
15495 @end table
15496
15497 @end table
15498
15499
15500 @node Slashdot
15501 @subsection Slashdot
15502 @cindex Slashdot
15503 @cindex nnslashdot
15504
15505 @uref{http://slashdot.org/, Slashdot} is a popular news site, with
15506 lively discussion following the news articles.  @code{nnslashdot} will
15507 let you read this forum in a convenient manner.
15508
15509 The easiest way to read this source is to put something like the
15510 following in your @file{~/.gnus.el} file:
15511
15512 @lisp
15513 (setq gnus-secondary-select-methods
15514       '((nnslashdot "")))
15515 @end lisp
15516
15517 This will make Gnus query the @code{nnslashdot} back end for new comments
15518 and groups.  The @kbd{F} command will subscribe each new news article as
15519 a new Gnus group, and you can read the comments by entering these
15520 groups.  (Note that the default subscription method is to subscribe new
15521 groups as zombies.  Other methods are available (@pxref{Subscription
15522 Methods}).
15523
15524 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
15525 command is the most handy tool (@pxref{Foreign Groups}).
15526
15527 When following up to @code{nnslashdot} comments (or posting new
15528 comments), some light @acronym{HTML}izations will be performed.  In
15529 particular, text quoted with @samp{> } will be quoted with
15530 @code{blockquote} instead, and signatures will have @code{br} added to
15531 the end of each line.  Other than that, you can just write @acronym{HTML}
15532 directly into the message buffer.  Note that Slashdot filters out some
15533 @acronym{HTML} forms.
15534
15535 The following variables can be altered to change its behavior:
15536
15537 @table @code
15538 @item nnslashdot-threaded
15539 Whether @code{nnslashdot} should display threaded groups or not.  The
15540 default is @code{t}.  To be able to display threads, @code{nnslashdot}
15541 has to retrieve absolutely all comments in a group upon entry.  If a
15542 threaded display is not required, @code{nnslashdot} will only retrieve
15543 the comments that are actually wanted by the user.  Threading is nicer,
15544 but much, much slower than unthreaded.
15545
15546 @item nnslashdot-login-name
15547 @vindex nnslashdot-login-name
15548 The login name to use when posting.
15549
15550 @item nnslashdot-password
15551 @vindex nnslashdot-password
15552 The password to use when posting.
15553
15554 @item nnslashdot-directory
15555 @vindex nnslashdot-directory
15556 Where @code{nnslashdot} will store its files.  The default is
15557 @file{~/News/slashdot/}.
15558
15559 @item nnslashdot-active-url
15560 @vindex nnslashdot-active-url
15561 The @sc{url} format string that will be used to fetch the information on
15562 news articles and comments.  The default is@*
15563 @samp{http://slashdot.org/search.pl?section=&min=%d}.
15564
15565 @item nnslashdot-comments-url
15566 @vindex nnslashdot-comments-url
15567 The @sc{url} format string that will be used to fetch comments.  The
15568 default is
15569 @samp{http://slashdot.org/comments.pl?sid=%s&threshold=%d&commentsort=%d&mode=flat&startat=%d}.
15570
15571 @item nnslashdot-article-url
15572 @vindex nnslashdot-article-url
15573 The @sc{url} format string that will be used to fetch the news article.  The
15574 default is
15575 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
15576
15577 @item nnslashdot-threshold
15578 @vindex nnslashdot-threshold
15579 The score threshold.  The default is -1.
15580
15581 @item nnslashdot-group-number
15582 @vindex nnslashdot-group-number
15583 The number of old groups, in addition to the ten latest, to keep
15584 updated.  The default is 0.
15585
15586 @end table
15587
15588
15589
15590 @node Ultimate
15591 @subsection Ultimate
15592 @cindex nnultimate
15593 @cindex Ultimate Bulletin Board
15594
15595 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
15596 probably the most popular Web bulletin board system used.  It has a
15597 quite regular and nice interface, and it's possible to get the
15598 information Gnus needs to keep groups updated.
15599
15600 The easiest way to get started with @code{nnultimate} is to say
15601 something like the following in the group buffer:  @kbd{B nnultimate RET
15602 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @sc{url}
15603 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
15604 you're interested in; there's quite a list of them on the Ultimate web
15605 site.)  Then subscribe to the groups you're interested in from the
15606 server buffer, and read them from the group buffer.
15607
15608 The following @code{nnultimate} variables can be altered:
15609
15610 @table @code
15611 @item nnultimate-directory
15612 @vindex nnultimate-directory
15613 The directory where @code{nnultimate} stores its files.  The default is@*
15614 @file{~/News/ultimate/}.
15615 @end table
15616
15617
15618 @node Web Archive
15619 @subsection Web Archive
15620 @cindex nnwarchive
15621 @cindex Web Archive
15622
15623 Some mailing lists only have archives on Web servers, such as
15624 @uref{http://www.egroups.com/} and
15625 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
15626 interface, and it's possible to get the information Gnus needs to keep
15627 groups updated.
15628
15629 @findex gnus-group-make-warchive-group
15630 The easiest way to get started with @code{nnwarchive} is to say
15631 something like the following in the group buffer: @kbd{M-x
15632 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
15633 www.egroups.com RET @var{your@@email.address} RET}.  (Substitute the
15634 @var{an_egroup} with the mailing list you subscribed, the
15635 @var{your@@email.address} with your email address.), or to browse the
15636 back end by @kbd{B nnwarchive RET mail-archive RET}.
15637
15638 The following @code{nnwarchive} variables can be altered:
15639
15640 @table @code
15641 @item nnwarchive-directory
15642 @vindex nnwarchive-directory
15643 The directory where @code{nnwarchive} stores its files.  The default is@*
15644 @file{~/News/warchive/}.
15645
15646 @item nnwarchive-login
15647 @vindex nnwarchive-login
15648 The account name on the web server.
15649
15650 @item nnwarchive-passwd
15651 @vindex nnwarchive-passwd
15652 The password for your account on the web server.
15653 @end table
15654
15655 @node RSS
15656 @subsection RSS
15657 @cindex nnrss
15658 @cindex RSS
15659
15660 Some sites have RDF site summary (RSS)
15661 @uref{http://purl.org/rss/1.0/spec}.  It has a quite regular and nice
15662 interface, and it's possible to get the information Gnus needs to keep
15663 groups updated.
15664
15665 The easiest way to get started with @code{nnrss} is to say something
15666 like the following in the group buffer: @kbd{B nnrss RET RET}, then
15667 subscribe groups.
15668
15669 The following @code{nnrss} variables can be altered:
15670
15671 @table @code
15672 @item nnrss-directory
15673 @vindex nnrss-directory
15674 The directory where @code{nnrss} stores its files.  The default is
15675 @file{~/News/rss/}.
15676
15677 @end table
15678
15679 The following code may be helpful, if you want to show the description in
15680 the summary buffer.
15681
15682 @lisp
15683 (add-to-list 'nnmail-extra-headers nnrss-description-field)
15684 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
15685
15686 (defun gnus-user-format-function-X (header)
15687   (let ((descr
15688          (assq nnrss-description-field (mail-header-extra header))))
15689     (if descr (concat "\n\t" (cdr descr)) "")))
15690 @end lisp
15691
15692 The following code may be useful to open an nnrss url directly from the
15693 summary buffer.
15694 @lisp
15695 (require 'browse-url)
15696
15697 (defun browse-nnrss-url( arg )
15698   (interactive "p")
15699   (let ((url (assq nnrss-url-field
15700                    (mail-header-extra
15701                     (gnus-data-header
15702                      (assq (gnus-summary-article-number)
15703                            gnus-newsgroup-data))))))
15704     (if url
15705         (progn
15706           (browse-url (cdr url))
15707           (gnus-summary-mark-as-read-forward 1))
15708       (gnus-summary-scroll-up arg))))
15709
15710 (eval-after-load "gnus"
15711   #'(define-key gnus-summary-mode-map
15712       (kbd "<RET>") 'browse-nnrss-url))
15713 (add-to-list 'nnmail-extra-headers nnrss-url-field)
15714 @end lisp
15715
15716 @node Customizing w3
15717 @subsection Customizing w3
15718 @cindex w3
15719 @cindex html
15720 @cindex url
15721 @cindex Netscape
15722
15723 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
15724 pages.  Emacs/w3 is documented in its own manual, but there are some
15725 things that may be more relevant for Gnus users.
15726
15727 For instance, a common question is how to make Emacs/w3 follow links
15728 using the @code{browse-url} functions (which will call some external web
15729 browser like Netscape).  Here's one way:
15730
15731 @lisp
15732 (eval-after-load "w3"
15733   '(progn
15734     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
15735     (defun w3-fetch (&optional url target)
15736       (interactive (list (w3-read-url-with-default)))
15737       (if (eq major-mode 'gnus-article-mode)
15738           (browse-url url)
15739         (w3-fetch-orig url target)))))
15740 @end lisp
15741
15742 Put that in your @file{.emacs} file, and hitting links in w3-rendered
15743 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
15744 follow the link.
15745
15746
15747 @node IMAP
15748 @section IMAP
15749 @cindex nnimap
15750 @cindex @acronym{IMAP}
15751
15752 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
15753 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
15754 server is much similar to connecting to a news server, you just
15755 specify the network address of the server.
15756
15757 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
15758 everything that @acronym{POP} can, it can hence be viewed as a
15759 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
15760 similar to @acronym{NNTP} being a news storage protocol---however,
15761 @acronym{IMAP} offers more features than @acronym{NNTP} because news
15762 is more or less read-only whereas mail is read-write.
15763
15764 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
15765 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
15766 the @acronym{IMAP} server and store them on the local disk.  This is
15767 not the usage described in this section---@xref{Mail Sources}.
15768
15769 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
15770 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
15771 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
15772 usage explained in this section.
15773
15774 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP} servers
15775 might look something like the following. (Note that for @acronym{TLS}/@acronym{SSL}, you
15776 need external programs and libraries, see below.)
15777
15778 @lisp
15779 (setq gnus-secondary-select-methods
15780       '((nnimap "simpleserver") ; @r{no special configuration}
15781         ; @r{perhaps a ssh port forwarded server:}
15782         (nnimap "dolk"
15783                 (nnimap-address "localhost")
15784                 (nnimap-server-port 1430))
15785         ; @r{a UW server running on localhost}
15786         (nnimap "barbar"
15787                 (nnimap-server-port 143)
15788                 (nnimap-address "localhost")
15789                 (nnimap-list-pattern ("INBOX" "mail/*")))
15790         ; @r{anonymous public cyrus server:}
15791         (nnimap "cyrus.andrew.cmu.edu"
15792                 (nnimap-authenticator anonymous)
15793                 (nnimap-list-pattern "archive.*")
15794                 (nnimap-stream network))
15795         ; @r{a ssl server on a non-standard port:}
15796         (nnimap "vic20"
15797                 (nnimap-address "vic20.somewhere.com")
15798                 (nnimap-server-port 9930)
15799                 (nnimap-stream ssl))))
15800 @end lisp
15801
15802 After defining the new server, you can subscribe to groups on the
15803 server using normal Gnus commands such as @kbd{U} in the Group Buffer
15804 (@pxref{Subscription Commands}) or via the Server Buffer
15805 (@pxref{Server Buffer}).
15806
15807 The following variables can be used to create a virtual @code{nnimap}
15808 server:
15809
15810 @table @code
15811
15812 @item nnimap-address
15813 @vindex nnimap-address
15814
15815 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
15816 server name if not specified.
15817
15818 @item nnimap-server-port
15819 @vindex nnimap-server-port
15820 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
15821
15822 Note that this should be an integer, example server specification:
15823
15824 @lisp
15825 (nnimap "mail.server.com"
15826         (nnimap-server-port 4711))
15827 @end lisp
15828
15829 @item nnimap-list-pattern
15830 @vindex nnimap-list-pattern
15831 String or list of strings of mailboxes to limit available groups to.
15832 This is used when the server has very many mailboxes and you're only
15833 interested in a few---some servers export your home directory via
15834 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
15835 @file{~/Mail/*} then.
15836
15837 The string can also be a cons of REFERENCE and the string as above, what
15838 REFERENCE is used for is server specific, but on the University of
15839 Washington server it's a directory that will be concatenated with the
15840 mailbox.
15841
15842 Example server specification:
15843
15844 @lisp
15845 (nnimap "mail.server.com"
15846         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
15847                                ("~friend/Mail/" . "list/*"))))
15848 @end lisp
15849
15850 @item nnimap-stream
15851 @vindex nnimap-stream
15852 The type of stream used to connect to your server.  By default, nnimap
15853 will detect and automatically use all of the below, with the exception
15854 of @acronym{TLS}/@acronym{SSL}. (@acronym{IMAP} over @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which
15855 can be automatically detected, but it's not widely deployed yet.)
15856
15857 Example server specification:
15858
15859 @lisp
15860 (nnimap "mail.server.com"
15861         (nnimap-stream ssl))
15862 @end lisp
15863
15864 Please note that the value of @code{nnimap-stream} is a symbol!
15865
15866 @itemize @bullet
15867 @item
15868 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5). Requires the
15869 @samp{gsasl} or @samp{imtest} program.
15870 @item
15871 @dfn{kerberos4:} Connect with Kerberos 4. Requires the @samp{imtest} program.
15872 @item
15873 @dfn{starttls:} Connect via the STARTTLS extension (similar to
15874 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
15875 @samp{starttls}.
15876 @item
15877 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
15878 @samp{gnutls-cli}).
15879 @item
15880 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
15881 @samp{openssl}) or SSLeay (@samp{s_client}).
15882 @item
15883 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
15884 @item
15885 @dfn{network:} Plain, TCP/IP network connection.
15886 @end itemize
15887
15888 @vindex imap-kerberos4-program
15889 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
15890 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
15891 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
15892 to make @code{imap.el} use a pty instead of a pipe when communicating
15893 with @samp{imtest}.  You will then suffer from a line length
15894 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
15895 indefinitely if you have many articles in a mailbox.  The variable
15896 @code{imap-kerberos4-program} contain parameters to pass to the imtest
15897 program.
15898
15899 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
15900 needed.  It is available from
15901 @uref{http://www.gnu.org/software/gnutls/}.
15902
15903 @vindex imap-gssapi-program
15904 This parameter specifies a list of command lines that invoke a GSSAPI
15905 authenticated @acronym{IMAP} stream in a subshell.  They are tried
15906 sequentially until a connection is made, or the list has been
15907 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
15908 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
15909 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
15910 tried.
15911
15912 @vindex imap-ssl-program
15913 For @acronym{SSL} connections, the OpenSSL program is available from
15914 @uref{http://www.openssl.org/}. OpenSSL was formerly known as SSLeay,
15915 and nnimap support it too---although the most recent versions of
15916 SSLeay, 0.9.x, are known to have serious bugs making it
15917 useless. Earlier versions, especially 0.8.x, of SSLeay are known to
15918 work. The variable @code{imap-ssl-program} contain parameters to pass
15919 to OpenSSL/SSLeay.
15920
15921 @vindex imap-shell-program
15922 @vindex imap-shell-host
15923 For @acronym{IMAP} connections using the @code{shell} stream, the variable
15924 @code{imap-shell-program} specify what program to call.
15925
15926 @item nnimap-authenticator
15927 @vindex nnimap-authenticator
15928
15929 The authenticator used to connect to the server.  By default, nnimap
15930 will use the most secure authenticator your server is capable of.
15931
15932 Example server specification:
15933
15934 @lisp
15935 (nnimap "mail.server.com"
15936         (nnimap-authenticator anonymous))
15937 @end lisp
15938
15939 Please note that the value of @code{nnimap-authenticator} is a symbol!
15940
15941 @itemize @bullet
15942 @item
15943 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication. Requires
15944 external program @code{gsasl} or @code{imtest}.
15945 @item
15946 @dfn{kerberos4:} Kerberos 4 authentication. Requires external program
15947 @code{imtest}.
15948 @item
15949 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5. Requires
15950 external library @code{digest-md5.el}.
15951 @item
15952 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
15953 @item
15954 @dfn{login:} Plain-text username/password via LOGIN.
15955 @item
15956 @dfn{anonymous:} Login as `anonymous', supplying your email address as password.
15957 @end itemize
15958
15959 @item nnimap-expunge-on-close
15960 @cindex expunging
15961 @vindex nnimap-expunge-on-close
15962 Unlike Parmenides the @acronym{IMAP} designers have decided things that
15963 don't exist actually do exist.  More specifically, @acronym{IMAP} has
15964 this concept of marking articles @code{Deleted} which doesn't actually
15965 delete them, and this (marking them @code{Deleted}, that is) is what
15966 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
15967 similar).
15968
15969 Since the articles aren't really removed when we mark them with the
15970 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
15971 running in circles yet?
15972
15973 Traditionally, nnimap has removed all articles marked as @code{Deleted}
15974 when closing a mailbox but this is now configurable by this server
15975 variable.
15976
15977 The possible options are:
15978
15979 @table @code
15980
15981 @item always
15982 The default behavior, delete all articles marked as ``Deleted'' when
15983 closing a mailbox.
15984 @item never
15985 Never actually delete articles.  Currently there is no way of showing
15986 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
15987 may allow you to do this.  If you ever want to run the EXPUNGE command
15988 manually, @xref{Expunging mailboxes}.
15989 @item ask
15990 When closing mailboxes, nnimap will ask if you wish to expunge deleted
15991 articles or not.
15992
15993 @end table
15994
15995 @item nnimap-importantize-dormant
15996 @vindex nnimap-importantize-dormant
15997
15998 If non-@code{nil} (the default), marks dormant articles as ticked (as
15999 well), for other @acronym{IMAP} clients. Within Gnus, dormant articles will
16000 naturally still (only) be marked as dormant.  This is to make dormant
16001 articles stand out, just like ticked articles, in other @acronym{IMAP}
16002 clients. (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
16003 has only one.)
16004
16005 Probably the only reason for frobing this would be if you're trying
16006 enable per-user persistent dormant flags, using something like:
16007
16008 @lisp
16009 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
16010         (format "gnus-dormant-%s" (user-login-name)))
16011 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
16012         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
16013 @end lisp
16014
16015 In this case, you would not want the per-user dormant flag showing up
16016 as ticked for other users.
16017
16018 @item nnimap-expunge-search-string
16019 @cindex expunging
16020 @vindex nnimap-expunge-search-string
16021
16022 This variable contain the @acronym{IMAP} search command sent to server when
16023 searching for articles eligible for expiring.  The default is
16024 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
16025 UID set and the second @code{%s} is replaced by a date.
16026
16027 Probably the only useful value to change this to is
16028 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
16029 messages instead of the internal article date. See section 6.4.4 of
16030 RFC 2060 for more information on valid strings.
16031
16032 @item nnimap-authinfo-file
16033 @vindex nnimap-authinfo-file
16034
16035 A file containing credentials used to log in on servers.  The format is
16036 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
16037 variable @code{nntp-authinfo-file} for exact syntax; also see
16038 @ref{NNTP}.
16039
16040 @item nnimap-need-unselect-to-notice-new-mail
16041 @vindex nnimap-need-unselect-to-notice-new-mail
16042
16043 Unselect mailboxes before looking for new mail in them.  Some servers
16044 seem to need this under some circumstances; it was reported that
16045 Courier 1.7.1 did.
16046
16047 @end table
16048
16049 @menu
16050 * Splitting in IMAP::           Splitting mail with nnimap.
16051 * Expiring in IMAP::            Expiring mail with nnimap.
16052 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
16053 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
16054 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
16055 @end menu
16056
16057
16058
16059 @node Splitting in IMAP
16060 @subsection Splitting in IMAP
16061 @cindex splitting imap mail
16062
16063 Splitting is something Gnus users has loved and used for years, and now
16064 the rest of the world is catching up.  Yeah, dream on, not many
16065 @acronym{IMAP} server has server side splitting and those that have splitting
16066 seem to use some non-standard protocol.  This means that @acronym{IMAP}
16067 support for Gnus has to do its own splitting.
16068
16069 And it does.
16070
16071 Here are the variables of interest:
16072
16073 @table @code
16074
16075 @item nnimap-split-crosspost
16076 @cindex splitting, crosspost
16077 @cindex crosspost
16078 @vindex nnimap-split-crosspost
16079
16080 If non-@code{nil}, do crossposting if several split methods match the
16081 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
16082 found will be used.
16083
16084 Nnmail equivalent: @code{nnmail-crosspost}.
16085
16086 @item nnimap-split-inbox
16087 @cindex splitting, inbox
16088 @cindex inbox
16089 @vindex nnimap-split-inbox
16090
16091 A string or a list of strings that gives the name(s) of @acronym{IMAP}
16092 mailboxes to split from.  Defaults to @code{nil}, which means that
16093 splitting is disabled!
16094
16095 @lisp
16096 (setq nnimap-split-inbox
16097       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
16098 @end lisp
16099
16100 No nnmail equivalent.
16101
16102 @item nnimap-split-rule
16103 @cindex splitting, rules
16104 @vindex nnimap-split-rule
16105
16106 New mail found in @code{nnimap-split-inbox} will be split according to
16107 this variable.
16108
16109 This variable contains a list of lists, where the first element in the
16110 sublist gives the name of the @acronym{IMAP} mailbox to move articles
16111 matching the regexp in the second element in the sublist.  Got that?
16112 Neither did I, we need examples.
16113
16114 @lisp
16115 (setq nnimap-split-rule
16116       '(("INBOX.nnimap"
16117          "^Sender: owner-nnimap@@vic20.globalcom.se")
16118         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
16119         ("INBOX.private" "")))
16120 @end lisp
16121
16122 This will put all articles from the nnimap mailing list into mailbox
16123 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
16124 into INBOX.junk and everything else in INBOX.private.
16125
16126 The first string may contain `\\1' forms, like the ones used by
16127 replace-match to insert sub-expressions from the matched text.  For
16128 instance:
16129
16130 @lisp
16131 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
16132 @end lisp
16133
16134 The first element can also be the symbol @code{junk} to indicate that
16135 matching messages should simply be deleted.  Use with care.
16136
16137 The second element can also be a function.  In that case, it will be
16138 called with the first element of the rule as the argument, in a buffer
16139 containing the headers of the article.  It should return a
16140 non-@code{nil} value if it thinks that the mail belongs in that group.
16141
16142 Nnmail users might recollect that the last regexp had to be empty to
16143 match all articles (like in the example above).  This is not required in
16144 nnimap.  Articles not matching any of the regexps will not be moved out
16145 of your inbox.  (This might affect performance if you keep lots of
16146 unread articles in your inbox, since the splitting code would go over
16147 them every time you fetch new mail.)
16148
16149 These rules are processed from the beginning of the alist toward the
16150 end.  The first rule to make a match will ``win'', unless you have
16151 crossposting enabled.  In that case, all matching rules will ``win''.
16152
16153 This variable can also have a function as its value, the function will
16154 be called with the headers narrowed and should return a group where it
16155 thinks the article should be split to.  See @code{nnimap-split-fancy}.
16156
16157 The splitting code tries to create mailboxes if it needs to.
16158
16159 To allow for different split rules on different virtual servers, and
16160 even different split rules in different inboxes on the same server,
16161 the syntax of this variable have been extended along the lines of:
16162
16163 @lisp
16164 (setq nnimap-split-rule
16165       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
16166                                ("junk"    "From:.*Simon"))))
16167         ("my2server"    ("INBOX" nnimap-split-fancy))
16168         ("my[34]server" (".*" (("private" "To:.*Simon")
16169                                ("junk"    my-junk-func))))))
16170 @end lisp
16171
16172 The virtual server name is in fact a regexp, so that the same rules
16173 may apply to several servers.  In the example, the servers
16174 @code{my3server} and @code{my4server} both use the same rules.
16175 Similarly, the inbox string is also a regexp.  The actual splitting
16176 rules are as before, either a function, or a list with group/regexp or
16177 group/function elements.
16178
16179 Nnmail equivalent: @code{nnmail-split-methods}.
16180
16181 @item nnimap-split-predicate
16182 @cindex splitting
16183 @vindex nnimap-split-predicate
16184
16185 Mail matching this predicate in @code{nnimap-split-inbox} will be
16186 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
16187
16188 This might be useful if you use another @acronym{IMAP} client to read mail in
16189 your inbox but would like Gnus to split all articles in the inbox
16190 regardless of readedness. Then you might change this to
16191 @samp{UNDELETED}.
16192
16193 @item nnimap-split-fancy
16194 @cindex splitting, fancy
16195 @findex nnimap-split-fancy
16196 @vindex nnimap-split-fancy
16197
16198 It's possible to set @code{nnimap-split-rule} to
16199 @code{nnmail-split-fancy} if you want to use fancy
16200 splitting. @xref{Fancy Mail Splitting}.
16201
16202 However, to be able to have different fancy split rules for nnmail and
16203 nnimap back ends you can set @code{nnimap-split-rule} to
16204 @code{nnimap-split-fancy} and define the nnimap specific fancy split
16205 rule in @code{nnimap-split-fancy}.
16206
16207 Example:
16208
16209 @lisp
16210 (setq nnimap-split-rule 'nnimap-split-fancy
16211       nnimap-split-fancy ...)
16212 @end lisp
16213
16214 Nnmail equivalent: @code{nnmail-split-fancy}.
16215
16216 @item nnimap-split-download-body
16217 @findex nnimap-split-download-body
16218 @vindex nnimap-split-download-body
16219
16220 Set to non-@code{nil} to download entire articles during splitting.
16221 This is generally not required, and will slow things down
16222 considerably.  You may need it if you want to use an advanced
16223 splitting function that analyses the body to split the article.
16224
16225 @end table
16226
16227 @node Expiring in IMAP
16228 @subsection Expiring in IMAP
16229 @cindex expiring imap mail
16230
16231 Even though @code{nnimap} is not a proper @code{nnmail} derived back
16232 end, it supports most features in regular expiring (@pxref{Expiring
16233 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
16234 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
16235 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
16236 follows below are the variables used by the @code{nnimap} expiry
16237 process.
16238
16239 A note on how the expire mark is stored on the @acronym{IMAP} server is
16240 appropriate here as well.  The expire mark is translated into a
16241 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
16242 message.  This means that likely only Gnus will understand and treat
16243 the @code{gnus-expire} mark properly, although other clients may allow
16244 you to view client specific flags on the message.  It also means that
16245 your server must support permanent storage of client specific flags on
16246 messages.  Most do, fortunately.
16247
16248 @table @code
16249
16250 @item nnmail-expiry-wait
16251 @item nnmail-expiry-wait-function
16252
16253 These variables are fully supported.  The expire value can be a
16254 number, the symbol @code{immediate} or @code{never}.
16255
16256 @item nnmail-expiry-target
16257
16258 This variable is supported, and internally implemented by calling the
16259 @code{nnmail} functions that handle this.  It contains an optimization
16260 that if the destination is a @acronym{IMAP} group on the same server, the
16261 article is copied instead of appended (that is, uploaded again).
16262
16263 @end table
16264
16265 @node Editing IMAP ACLs
16266 @subsection Editing IMAP ACLs
16267 @cindex editing imap acls
16268 @cindex Access Control Lists
16269 @cindex Editing @acronym{IMAP} ACLs
16270 @kindex G l
16271 @findex gnus-group-nnimap-edit-acl
16272
16273 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
16274 limiting (or enabling) other users access to your mail boxes.  Not all
16275 @acronym{IMAP} servers support this, this function will give an error if it
16276 doesn't.
16277
16278 To edit an ACL for a mailbox, type @kbd{G l}
16279 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
16280 editing window with detailed instructions.
16281
16282 Some possible uses:
16283
16284 @itemize @bullet
16285 @item
16286 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
16287 on your mailing list mailboxes enables other users on the same server to
16288 follow the list without subscribing to it.
16289 @item
16290 At least with the Cyrus server, you are required to give the user
16291 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
16292 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
16293 INBOX.mailbox).
16294 @end itemize
16295
16296 @node Expunging mailboxes
16297 @subsection Expunging mailboxes
16298 @cindex expunging
16299
16300 @cindex expunge
16301 @cindex manual expunging
16302 @kindex G x
16303 @findex gnus-group-nnimap-expunge
16304
16305 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
16306 you may want the option of expunging all deleted articles in a mailbox
16307 manually.  This is exactly what @kbd{G x} does.
16308
16309 Currently there is no way of showing deleted articles, you can just
16310 delete them.
16311
16312 @node A note on namespaces
16313 @subsection A note on namespaces
16314 @cindex IMAP namespace
16315 @cindex namespaces
16316
16317 The @acronym{IMAP} protocol has a concept called namespaces, described
16318 by the following text in the RFC:
16319
16320 @display
16321 5.1.2.  Mailbox Namespace Naming Convention
16322
16323    By convention, the first hierarchical element of any mailbox name
16324    which begins with "#" identifies the "namespace" of the remainder of
16325    the name.  This makes it possible to disambiguate between different
16326    types of mailbox stores, each of which have their own namespaces.
16327
16328       For example, implementations which offer access to USENET
16329       newsgroups MAY use the "#news" namespace to partition the USENET
16330       newsgroup namespace from that of other mailboxes.  Thus, the
16331       comp.mail.misc newsgroup would have an mailbox name of
16332       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
16333       to a different object (e.g. a user's private mailbox).
16334 @end display
16335
16336 While there is nothing in this text that warrants concern for the
16337 @acronym{IMAP} implementation in Gnus, some servers use namespace
16338 prefixes in a way that does not work with how Gnus uses mailbox names.
16339
16340 Specifically, University of Washington's @acronym{IMAP} server uses
16341 mailbox names like @code{#driver.mbx/read-mail} which are valid only
16342 in the @sc{create} and @sc{append} commands.  After the mailbox is
16343 created (or a messages is appended to a mailbox), it must be accessed
16344 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
16345 not make it possible for the user to guarantee that user entered
16346 mailbox names will only be used with the CREATE and APPEND commands,
16347 you should simply not use the namespace prefixed mailbox names in
16348 Gnus.
16349
16350 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
16351 for more information on how to use the prefixes.  They are a power
16352 tool and should be used only if you are sure what the effects are.
16353
16354 @node Other Sources
16355 @section Other Sources
16356
16357 Gnus can do more than just read news or mail.  The methods described
16358 below allow Gnus to view directories and files as if they were
16359 newsgroups.
16360
16361 @menu
16362 * Directory Groups::            You can read a directory as if it was a newsgroup.
16363 * Anything Groups::             Dired?  Who needs dired?
16364 * Document Groups::             Single files can be the basis of a group.
16365 * SOUP::                        Reading @sc{soup} packets ``offline''.
16366 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
16367 @end menu
16368
16369
16370 @node Directory Groups
16371 @subsection Directory Groups
16372 @cindex nndir
16373 @cindex directory groups
16374
16375 If you have a directory that has lots of articles in separate files in
16376 it, you might treat it as a newsgroup.  The files have to have numerical
16377 names, of course.
16378
16379 This might be an opportune moment to mention @code{ange-ftp} (and its
16380 successor @code{efs}), that most wonderful of all wonderful Emacs
16381 packages.  When I wrote @code{nndir}, I didn't think much about it---a
16382 back end to read directories.  Big deal.
16383
16384 @code{ange-ftp} changes that picture dramatically.  For instance, if you
16385 enter the @code{ange-ftp} file name
16386 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
16387 @code{ange-ftp} or @code{efs} will actually allow you to read this
16388 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
16389
16390 @code{nndir} will use @acronym{NOV} files if they are present.
16391
16392 @code{nndir} is a ``read-only'' back end---you can't delete or expire
16393 articles with this method.  You can use @code{nnmh} or @code{nnml} for
16394 whatever you use @code{nndir} for, so you could switch to any of those
16395 methods if you feel the need to have a non-read-only @code{nndir}.
16396
16397
16398 @node Anything Groups
16399 @subsection Anything Groups
16400 @cindex nneething
16401
16402 From the @code{nndir} back end (which reads a single spool-like
16403 directory), it's just a hop and a skip to @code{nneething}, which
16404 pretends that any arbitrary directory is a newsgroup.  Strange, but
16405 true.
16406
16407 When @code{nneething} is presented with a directory, it will scan this
16408 directory and assign article numbers to each file.  When you enter such
16409 a group, @code{nneething} must create ``headers'' that Gnus can use.
16410 After all, Gnus is a newsreader, in case you're forgetting.
16411 @code{nneething} does this in a two-step process.  First, it snoops each
16412 file in question.  If the file looks like an article (i.e., the first
16413 few lines look like headers), it will use this as the head.  If this is
16414 just some arbitrary file without a head (e.g. a C source file),
16415 @code{nneething} will cobble up a header out of thin air.  It will use
16416 file ownership, name and date and do whatever it can with these
16417 elements.
16418
16419 All this should happen automatically for you, and you will be presented
16420 with something that looks very much like a newsgroup.  Totally like a
16421 newsgroup, to be precise.  If you select an article, it will be displayed
16422 in the article buffer, just as usual.
16423
16424 If you select a line that represents a directory, Gnus will pop you into
16425 a new summary buffer for this @code{nneething} group.  And so on.  You can
16426 traverse the entire disk this way, if you feel like, but remember that
16427 Gnus is not dired, really, and does not intend to be, either.
16428
16429 There are two overall modes to this action---ephemeral or solid.  When
16430 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
16431 will not store information on what files you have read, and what files
16432 are new, and so on.  If you create a solid @code{nneething} group the
16433 normal way with @kbd{G m}, Gnus will store a mapping table between
16434 article numbers and file names, and you can treat this group like any
16435 other groups.  When you activate a solid @code{nneething} group, you will
16436 be told how many unread articles it contains, etc., etc.
16437
16438 Some variables:
16439
16440 @table @code
16441 @item nneething-map-file-directory
16442 @vindex nneething-map-file-directory
16443 All the mapping files for solid @code{nneething} groups will be stored
16444 in this directory, which defaults to @file{~/.nneething/}.
16445
16446 @item nneething-exclude-files
16447 @vindex nneething-exclude-files
16448 All files that match this regexp will be ignored.  Nice to use to exclude
16449 auto-save files and the like, which is what it does by default.
16450
16451 @item nneething-include-files
16452 @vindex nneething-include-files
16453 Regexp saying what files to include in the group.  If this variable is
16454 non-@code{nil}, only files matching this regexp will be included.
16455
16456 @item nneething-map-file
16457 @vindex nneething-map-file
16458 Name of the map files.
16459 @end table
16460
16461
16462 @node Document Groups
16463 @subsection Document Groups
16464 @cindex nndoc
16465 @cindex documentation group
16466 @cindex help group
16467
16468 @code{nndoc} is a cute little thing that will let you read a single file
16469 as a newsgroup.  Several files types are supported:
16470
16471 @table @code
16472 @cindex Babyl
16473 @cindex Rmail mbox
16474
16475 @item babyl
16476 The Babyl (Rmail) mail box.
16477 @cindex mbox
16478 @cindex Unix mbox
16479
16480 @item mbox
16481 The standard Unix mbox file.
16482
16483 @cindex MMDF mail box
16484 @item mmdf
16485 The MMDF mail box format.
16486
16487 @item news
16488 Several news articles appended into a file.
16489
16490 @item rnews
16491 @cindex rnews batch files
16492 The rnews batch transport format.
16493 @cindex forwarded messages
16494
16495 @item forward
16496 Forwarded articles.
16497
16498 @item nsmail
16499 Netscape mail boxes.
16500
16501 @item mime-parts
16502 @acronym{MIME} multipart messages.
16503
16504 @item standard-digest
16505 The standard (RFC 1153) digest format.
16506
16507 @item mime-digest
16508 A @acronym{MIME} digest of messages.
16509
16510 @item lanl-gov-announce
16511 Announcement messages from LANL Gov Announce.
16512
16513 @item rfc822-forward
16514 A message forwarded according to RFC822.
16515
16516 @item outlook
16517 The Outlook mail box.
16518
16519 @item oe-dbx
16520 The Outlook Express dbx mail box.
16521
16522 @item exim-bounce
16523 A bounce message from the Exim MTA.
16524
16525 @item forward
16526 A message forwarded according to informal rules.
16527
16528 @item rfc934
16529 An RFC934-forwarded message.
16530
16531 @item mailman
16532 A mailman digest.
16533
16534 @item clari-briefs
16535 A digest of Clarinet brief news items.
16536
16537 @item slack-digest
16538 Non-standard digest format---matches most things, but does it badly.
16539
16540 @item mail-in-mail
16541 The last resort.
16542 @end table
16543
16544 You can also use the special ``file type'' @code{guess}, which means
16545 that @code{nndoc} will try to guess what file type it is looking at.
16546 @code{digest} means that @code{nndoc} should guess what digest type the
16547 file is.
16548
16549 @code{nndoc} will not try to change the file or insert any extra headers into
16550 it---it will simply, like, let you use the file as the basis for a
16551 group.  And that's it.
16552
16553 If you have some old archived articles that you want to insert into your
16554 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
16555 that.  Say you have an old @file{RMAIL} file with mail that you now want
16556 to split into your new @code{nnml} groups.  You look at that file using
16557 @code{nndoc} (using the @kbd{G f} command in the group buffer
16558 (@pxref{Foreign Groups})), set the process mark on all the articles in
16559 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
16560 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
16561 file is now also stored in lots of @code{nnml} directories, and you can
16562 delete that pesky @file{RMAIL} file.  If you have the guts!
16563
16564 Virtual server variables:
16565
16566 @table @code
16567 @item nndoc-article-type
16568 @vindex nndoc-article-type
16569 This should be one of @code{mbox}, @code{babyl}, @code{digest},
16570 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
16571 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
16572 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
16573 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
16574
16575 @item nndoc-post-type
16576 @vindex nndoc-post-type
16577 This variable says whether Gnus is to consider the group a news group or
16578 a mail group.  There are two valid values:  @code{mail} (the default)
16579 and @code{news}.
16580 @end table
16581
16582 @menu
16583 * Document Server Internals::   How to add your own document types.
16584 @end menu
16585
16586
16587 @node Document Server Internals
16588 @subsubsection Document Server Internals
16589
16590 Adding new document types to be recognized by @code{nndoc} isn't
16591 difficult.  You just have to whip up a definition of what the document
16592 looks like, write a predicate function to recognize that document type,
16593 and then hook into @code{nndoc}.
16594
16595 First, here's an example document type definition:
16596
16597 @example
16598 (mmdf
16599  (article-begin .  "^\^A\^A\^A\^A\n")
16600  (body-end .  "^\^A\^A\^A\^A\n"))
16601 @end example
16602
16603 The definition is simply a unique @dfn{name} followed by a series of
16604 regexp pseudo-variable settings.  Below are the possible
16605 variables---don't be daunted by the number of variables; most document
16606 types can be defined with very few settings:
16607
16608 @table @code
16609 @item first-article
16610 If present, @code{nndoc} will skip past all text until it finds
16611 something that match this regexp.  All text before this will be
16612 totally ignored.
16613
16614 @item article-begin
16615 This setting has to be present in all document type definitions.  It
16616 says what the beginning of each article looks like.
16617
16618 @item head-begin-function
16619 If present, this should be a function that moves point to the head of
16620 the article.
16621
16622 @item nndoc-head-begin
16623 If present, this should be a regexp that matches the head of the
16624 article.
16625
16626 @item nndoc-head-end
16627 This should match the end of the head of the article.  It defaults to
16628 @samp{^$}---the empty line.
16629
16630 @item body-begin-function
16631 If present, this function should move point to the beginning of the body
16632 of the article.
16633
16634 @item body-begin
16635 This should match the beginning of the body of the article.  It defaults
16636 to @samp{^\n}.
16637
16638 @item body-end-function
16639 If present, this function should move point to the end of the body of
16640 the article.
16641
16642 @item body-end
16643 If present, this should match the end of the body of the article.
16644
16645 @item file-end
16646 If present, this should match the end of the file.  All text after this
16647 regexp will be totally ignored.
16648
16649 @end table
16650
16651 So, using these variables @code{nndoc} is able to dissect a document
16652 file into a series of articles, each with a head and a body.  However, a
16653 few more variables are needed since not all document types are all that
16654 news-like---variables needed to transform the head or the body into
16655 something that's palatable for Gnus:
16656
16657 @table @code
16658 @item prepare-body-function
16659 If present, this function will be called when requesting an article.  It
16660 will be called with point at the start of the body, and is useful if the
16661 document has encoded some parts of its contents.
16662
16663 @item article-transform-function
16664 If present, this function is called when requesting an article.  It's
16665 meant to be used for more wide-ranging transformation of both head and
16666 body of the article.
16667
16668 @item generate-head-function
16669 If present, this function is called to generate a head that Gnus can
16670 understand.  It is called with the article number as a parameter, and is
16671 expected to generate a nice head for the article in question.  It is
16672 called when requesting the headers of all articles.
16673
16674 @end table
16675
16676 Let's look at the most complicated example I can come up with---standard
16677 digests:
16678
16679 @example
16680 (standard-digest
16681  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
16682  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
16683  (prepare-body-function . nndoc-unquote-dashes)
16684  (body-end-function . nndoc-digest-body-end)
16685  (head-end . "^ ?$")
16686  (body-begin . "^ ?\n")
16687  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
16688  (subtype digest guess))
16689 @end example
16690
16691 We see that all text before a 70-width line of dashes is ignored; all
16692 text after a line that starts with that @samp{^End of} is also ignored;
16693 each article begins with a 30-width line of dashes; the line separating
16694 the head from the body may contain a single space; and that the body is
16695 run through @code{nndoc-unquote-dashes} before being delivered.
16696
16697 To hook your own document definition into @code{nndoc}, use the
16698 @code{nndoc-add-type} function.  It takes two parameters---the first
16699 is the definition itself and the second (optional) parameter says
16700 where in the document type definition alist to put this definition.
16701 The alist is traversed sequentially, and
16702 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
16703 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
16704 @code{mmdf} type, and so on.  These type predicates should return
16705 @code{nil} if the document is not of the correct type; @code{t} if it
16706 is of the correct type; and a number if the document might be of the
16707 correct type.  A high number means high probability; a low number
16708 means low probability with @samp{0} being the lowest valid number.
16709
16710
16711 @node SOUP
16712 @subsection SOUP
16713 @cindex SOUP
16714 @cindex offline
16715
16716 In the PC world people often talk about ``offline'' newsreaders.  These
16717 are thingies that are combined reader/news transport monstrosities.
16718 With built-in modem programs.  Yecchh!
16719
16720 Of course, us Unix Weenie types of human beans use things like
16721 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
16722 transport things like Ghod intended.  And then we just use normal
16723 newsreaders.
16724
16725 However, it can sometimes be convenient to do something that's a bit
16726 easier on the brain if you have a very slow modem, and you're not really
16727 that interested in doing things properly.
16728
16729 A file format called @sc{soup} has been developed for transporting news
16730 and mail from servers to home machines and back again.  It can be a bit
16731 fiddly.
16732
16733 First some terminology:
16734
16735 @table @dfn
16736
16737 @item server
16738 This is the machine that is connected to the outside world and where you
16739 get news and/or mail from.
16740
16741 @item home machine
16742 This is the machine that you want to do the actual reading and responding
16743 on.  It is typically not connected to the rest of the world in any way.
16744
16745 @item packet
16746 Something that contains messages and/or commands.  There are two kinds
16747 of packets:
16748
16749 @table @dfn
16750 @item message packets
16751 These are packets made at the server, and typically contain lots of
16752 messages for you to read.  These are called @file{SoupoutX.tgz} by
16753 default, where @var{x} is a number.
16754
16755 @item response packets
16756 These are packets made at the home machine, and typically contains
16757 replies that you've written.  These are called @file{SoupinX.tgz} by
16758 default, where @var{x} is a number.
16759
16760 @end table
16761
16762 @end table
16763
16764
16765 @enumerate
16766
16767 @item
16768 You log in on the server and create a @sc{soup} packet.  You can either
16769 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
16770 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
16771 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
16772
16773 @item
16774 You transfer the packet home.  Rail, boat, car or modem will do fine.
16775
16776 @item
16777 You put the packet in your home directory.
16778
16779 @item
16780 You fire up Gnus on your home machine using the @code{nnsoup} back end as
16781 the native or secondary server.
16782
16783 @item
16784 You read articles and mail and answer and followup to the things you
16785 want (@pxref{SOUP Replies}).
16786
16787 @item
16788 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16789 packet.
16790
16791 @item
16792 You transfer this packet to the server.
16793
16794 @item
16795 You use Gnus to mail this packet out with the @kbd{G s s} command.
16796
16797 @item
16798 You then repeat until you die.
16799
16800 @end enumerate
16801
16802 So you basically have a bipartite system---you use @code{nnsoup} for
16803 reading and Gnus for packing/sending these @sc{soup} packets.
16804
16805 @menu
16806 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
16807 * SOUP Groups::                 A back end for reading @sc{soup} packets.
16808 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
16809 @end menu
16810
16811
16812 @node SOUP Commands
16813 @subsubsection SOUP Commands
16814
16815 These are commands for creating and manipulating @sc{soup} packets.
16816
16817 @table @kbd
16818 @item G s b
16819 @kindex G s b (Group)
16820 @findex gnus-group-brew-soup
16821 Pack all unread articles in the current group
16822 (@code{gnus-group-brew-soup}).  This command understands the
16823 process/prefix convention.
16824
16825 @item G s w
16826 @kindex G s w (Group)
16827 @findex gnus-soup-save-areas
16828 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
16829
16830 @item G s s
16831 @kindex G s s (Group)
16832 @findex gnus-soup-send-replies
16833 Send all replies from the replies packet
16834 (@code{gnus-soup-send-replies}).
16835
16836 @item G s p
16837 @kindex G s p (Group)
16838 @findex gnus-soup-pack-packet
16839 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
16840
16841 @item G s r
16842 @kindex G s r (Group)
16843 @findex nnsoup-pack-replies
16844 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
16845
16846 @item O s
16847 @kindex O s (Summary)
16848 @findex gnus-soup-add-article
16849 This summary-mode command adds the current article to a @sc{soup} packet
16850 (@code{gnus-soup-add-article}).  It understands the process/prefix
16851 convention (@pxref{Process/Prefix}).
16852
16853 @end table
16854
16855
16856 There are a few variables to customize where Gnus will put all these
16857 thingies:
16858
16859 @table @code
16860
16861 @item gnus-soup-directory
16862 @vindex gnus-soup-directory
16863 Directory where Gnus will save intermediate files while composing
16864 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
16865
16866 @item gnus-soup-replies-directory
16867 @vindex gnus-soup-replies-directory
16868 This is what Gnus will use as a temporary directory while sending our
16869 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
16870
16871 @item gnus-soup-prefix-file
16872 @vindex gnus-soup-prefix-file
16873 Name of the file where Gnus stores the last used prefix.  The default is
16874 @samp{gnus-prefix}.
16875
16876 @item gnus-soup-packer
16877 @vindex gnus-soup-packer
16878 A format string command for packing a @sc{soup} packet.  The default is
16879 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
16880
16881 @item gnus-soup-unpacker
16882 @vindex gnus-soup-unpacker
16883 Format string command for unpacking a @sc{soup} packet.  The default is
16884 @samp{gunzip -c %s | tar xvf -}.
16885
16886 @item gnus-soup-packet-directory
16887 @vindex gnus-soup-packet-directory
16888 Where Gnus will look for reply packets.  The default is @file{~/}.
16889
16890 @item gnus-soup-packet-regexp
16891 @vindex gnus-soup-packet-regexp
16892 Regular expression matching @sc{soup} reply packets in
16893 @code{gnus-soup-packet-directory}.
16894
16895 @end table
16896
16897
16898 @node SOUP Groups
16899 @subsubsection SOUP Groups
16900 @cindex nnsoup
16901
16902 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
16903 read incoming packets, unpack them, and put them in a directory where
16904 you can read them at leisure.
16905
16906 These are the variables you can use to customize its behavior:
16907
16908 @table @code
16909
16910 @item nnsoup-tmp-directory
16911 @vindex nnsoup-tmp-directory
16912 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
16913 directory.  (@file{/tmp/} by default.)
16914
16915 @item nnsoup-directory
16916 @vindex nnsoup-directory
16917 @code{nnsoup} then moves each message and index file to this directory.
16918 The default is @file{~/SOUP/}.
16919
16920 @item nnsoup-replies-directory
16921 @vindex nnsoup-replies-directory
16922 All replies will be stored in this directory before being packed into a
16923 reply packet.  The default is @file{~/SOUP/replies/}.
16924
16925 @item nnsoup-replies-format-type
16926 @vindex nnsoup-replies-format-type
16927 The @sc{soup} format of the replies packets.  The default is @samp{?n}
16928 (rnews), and I don't think you should touch that variable.  I probably
16929 shouldn't even have documented it.  Drats!  Too late!
16930
16931 @item nnsoup-replies-index-type
16932 @vindex nnsoup-replies-index-type
16933 The index type of the replies packet.  The default is @samp{?n}, which
16934 means ``none''.  Don't fiddle with this one either!
16935
16936 @item nnsoup-active-file
16937 @vindex nnsoup-active-file
16938 Where @code{nnsoup} stores lots of information.  This is not an ``active
16939 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
16940 this file or mess it up in any way, you're dead.  The default is
16941 @file{~/SOUP/active}.
16942
16943 @item nnsoup-packer
16944 @vindex nnsoup-packer
16945 Format string command for packing a reply @sc{soup} packet.  The default
16946 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
16947
16948 @item nnsoup-unpacker
16949 @vindex nnsoup-unpacker
16950 Format string command for unpacking incoming @sc{soup} packets.  The
16951 default is @samp{gunzip -c %s | tar xvf -}.
16952
16953 @item nnsoup-packet-directory
16954 @vindex nnsoup-packet-directory
16955 Where @code{nnsoup} will look for incoming packets.  The default is
16956 @file{~/}.
16957
16958 @item nnsoup-packet-regexp
16959 @vindex nnsoup-packet-regexp
16960 Regular expression matching incoming @sc{soup} packets.  The default is
16961 @samp{Soupout}.
16962
16963 @item nnsoup-always-save
16964 @vindex nnsoup-always-save
16965 If non-@code{nil}, save the replies buffer after each posted message.
16966
16967 @end table
16968
16969
16970 @node SOUP Replies
16971 @subsubsection SOUP Replies
16972
16973 Just using @code{nnsoup} won't mean that your postings and mailings end
16974 up in @sc{soup} reply packets automagically.  You have to work a bit
16975 more for that to happen.
16976
16977 @findex nnsoup-set-variables
16978 The @code{nnsoup-set-variables} command will set the appropriate
16979 variables to ensure that all your followups and replies end up in the
16980 @sc{soup} system.
16981
16982 In specific, this is what it does:
16983
16984 @lisp
16985 (setq message-send-news-function 'nnsoup-request-post)
16986 (setq message-send-mail-function 'nnsoup-request-mail)
16987 @end lisp
16988
16989 And that's it, really.  If you only want news to go into the @sc{soup}
16990 system you just use the first line.  If you only want mail to be
16991 @sc{soup}ed you use the second.
16992
16993
16994 @node Mail-To-News Gateways
16995 @subsection Mail-To-News Gateways
16996 @cindex mail-to-news gateways
16997 @cindex gateways
16998
16999 If your local @code{nntp} server doesn't allow posting, for some reason
17000 or other, you can post using one of the numerous mail-to-news gateways.
17001 The @code{nngateway} back end provides the interface.
17002
17003 Note that you can't read anything from this back end---it can only be
17004 used to post with.
17005
17006 Server variables:
17007
17008 @table @code
17009 @item nngateway-address
17010 @vindex nngateway-address
17011 This is the address of the mail-to-news gateway.
17012
17013 @item nngateway-header-transformation
17014 @vindex nngateway-header-transformation
17015 News headers often have to be transformed in some odd way or other
17016 for the mail-to-news gateway to accept it.  This variable says what
17017 transformation should be called, and defaults to
17018 @code{nngateway-simple-header-transformation}.  The function is called
17019 narrowed to the headers to be transformed and with one parameter---the
17020 gateway address.
17021
17022 This default function just inserts a new @code{To} header based on the
17023 @code{Newsgroups} header and the gateway address.
17024 For instance, an article with this @code{Newsgroups} header:
17025
17026 @example
17027 Newsgroups: alt.religion.emacs
17028 @end example
17029
17030 will get this @code{To} header inserted:
17031
17032 @example
17033 To: alt-religion-emacs@@GATEWAY
17034 @end example
17035
17036 The following pre-defined functions exist:
17037
17038 @findex nngateway-simple-header-transformation
17039 @table @code
17040
17041 @item nngateway-simple-header-transformation
17042 Creates a @code{To} header that looks like
17043 @var{newsgroup}@@@code{nngateway-address}.
17044
17045 @findex nngateway-mail2news-header-transformation
17046
17047 @item nngateway-mail2news-header-transformation
17048 Creates a @code{To} header that looks like
17049 @code{nngateway-address}.
17050 @end table
17051
17052 @end table
17053
17054 Here's an example:
17055
17056 @lisp
17057 (setq gnus-post-method
17058       '(nngateway
17059         "mail2news@@replay.com"
17060         (nngateway-header-transformation
17061          nngateway-mail2news-header-transformation)))
17062 @end lisp
17063
17064 So, to use this, simply say something like:
17065
17066 @lisp
17067 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
17068 @end lisp
17069
17070
17071
17072 @node Combined Groups
17073 @section Combined Groups
17074
17075 Gnus allows combining a mixture of all the other group types into bigger
17076 groups.
17077
17078 @menu
17079 * Virtual Groups::              Combining articles from many groups.
17080 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
17081 @end menu
17082
17083
17084 @node Virtual Groups
17085 @subsection Virtual Groups
17086 @cindex nnvirtual
17087 @cindex virtual groups
17088 @cindex merging groups
17089
17090 An @dfn{nnvirtual group} is really nothing more than a collection of
17091 other groups.
17092
17093 For instance, if you are tired of reading many small groups, you can
17094 put them all in one big group, and then grow tired of reading one
17095 big, unwieldy group.  The joys of computing!
17096
17097 You specify @code{nnvirtual} as the method.  The address should be a
17098 regexp to match component groups.
17099
17100 All marks in the virtual group will stick to the articles in the
17101 component groups.  So if you tick an article in a virtual group, the
17102 article will also be ticked in the component group from whence it
17103 came.  (And vice versa---marks from the component groups will also be
17104 shown in the virtual group.). To create an empty virtual group, run
17105 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
17106 and edit the method regexp with @kbd{M-e}
17107 (@code{gnus-group-edit-group-method})
17108
17109 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
17110 newsgroups into one, big, happy newsgroup:
17111
17112 @lisp
17113 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
17114 @end lisp
17115
17116 The component groups can be native or foreign; everything should work
17117 smoothly, but if your computer explodes, it was probably my fault.
17118
17119 Collecting the same group from several servers might actually be a good
17120 idea if users have set the Distribution header to limit distribution.
17121 If you would like to read @samp{soc.motss} both from a server in Japan
17122 and a server in Norway, you could use the following as the group regexp:
17123
17124 @example
17125 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
17126 @end example
17127
17128 (Remember, though, that if you're creating the group with @kbd{G m}, you
17129 shouldn't double the backslashes, and you should leave off the quote
17130 characters at the beginning and the end of the string.)
17131
17132 This should work kinda smoothly---all articles from both groups should
17133 end up in this one, and there should be no duplicates.  Threading (and
17134 the rest) will still work as usual, but there might be problems with the
17135 sequence of articles.  Sorting on date might be an option here
17136 (@pxref{Selecting a Group}).
17137
17138 One limitation, however---all groups included in a virtual
17139 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
17140 zombie groups can't be component groups for @code{nnvirtual} groups.
17141
17142 @vindex nnvirtual-always-rescan
17143 If the @code{nnvirtual-always-rescan} is non-@code{nil},
17144 @code{nnvirtual} will always scan groups for unread articles when
17145 entering a virtual group.  If this variable is @code{nil} (which is the
17146 default) and you read articles in a component group after the virtual
17147 group has been activated, the read articles from the component group
17148 will show up when you enter the virtual group.  You'll also see this
17149 effect if you have two virtual groups that have a component group in
17150 common.  If that's the case, you should set this variable to @code{t}.
17151 Or you can just tap @code{M-g} on the virtual group every time before
17152 you enter it---it'll have much the same effect.
17153
17154 @code{nnvirtual} can have both mail and news groups as component groups.
17155 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
17156 has to ask the back end of the component group the article comes from
17157 whether it is a news or mail back end.  However, when you do a @kbd{^},
17158 there is typically no sure way for the component back end to know this,
17159 and in that case @code{nnvirtual} tells Gnus that the article came from a
17160 not-news back end.  (Just to be on the safe side.)
17161
17162 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
17163 line from the article you respond to in these cases.
17164
17165 @code{nnvirtual} groups do not inherit anything but articles and marks
17166 from component groups---group parameters, for instance, are not
17167 inherited.
17168
17169
17170 @node Kibozed Groups
17171 @subsection Kibozed Groups
17172 @cindex nnkiboze
17173 @cindex kibozing
17174
17175 @dfn{Kibozing} is defined by @acronym{oed} as ``grepping through (parts of)
17176 the news feed''.  @code{nnkiboze} is a back end that will do this for
17177 you.  Oh joy!  Now you can grind any @acronym{NNTP} server down to a halt
17178 with useless requests!  Oh happiness!
17179
17180 @kindex G k (Group)
17181 To create a kibozed group, use the @kbd{G k} command in the group
17182 buffer.
17183
17184 The address field of the @code{nnkiboze} method is, as with
17185 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
17186 @code{nnkiboze} group.  That's where most similarities between
17187 @code{nnkiboze} and @code{nnvirtual} end.
17188
17189 In addition to this regexp detailing component groups, an
17190 @code{nnkiboze} group must have a score file to say what articles are
17191 to be included in the group (@pxref{Scoring}).
17192
17193 @kindex M-x nnkiboze-generate-groups
17194 @findex nnkiboze-generate-groups
17195 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
17196 @code{nnkiboze} groups you want to have.  This command will take time.
17197 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
17198 headers from all the articles in all the component groups and run them
17199 through the scoring process to determine if there are any articles in
17200 the groups that are to be part of the @code{nnkiboze} groups.
17201
17202 Please limit the number of component groups by using restrictive
17203 regexps.  Otherwise your sysadmin may become annoyed with you, and the
17204 @acronym{NNTP} site may throw you off and never let you back in again.
17205 Stranger things have happened.
17206
17207 @code{nnkiboze} component groups do not have to be alive---they can be dead,
17208 and they can be foreign.  No restrictions.
17209
17210 @vindex nnkiboze-directory
17211 The generation of an @code{nnkiboze} group means writing two files in
17212 @code{nnkiboze-directory}, which is @file{~/News/} by default.  One
17213 contains the @acronym{NOV} header lines for all the articles in the group,
17214 and the other is an additional @file{.newsrc} file to store information
17215 on what groups have been searched through to find component articles.
17216
17217 Articles marked as read in the @code{nnkiboze} group will have
17218 their @acronym{NOV} lines removed from the @acronym{NOV} file.
17219
17220
17221 @node Gnus Unplugged
17222 @section Gnus Unplugged
17223 @cindex offline
17224 @cindex unplugged
17225 @cindex agent
17226 @cindex Gnus agent
17227 @cindex Gnus unplugged
17228
17229 In olden times (ca. February '88), people used to run their newsreaders
17230 on big machines with permanent connections to the net.  News transport
17231 was dealt with by news servers, and all the newsreaders had to do was to
17232 read news.  Believe it or not.
17233
17234 Nowadays most people read news and mail at home, and use some sort of
17235 modem to connect to the net.  To avoid running up huge phone bills, it
17236 would be nice to have a way to slurp down all the news and mail, hang up
17237 the phone, read for several hours, and then upload any responses you
17238 have to make.  And then you repeat the procedure.
17239
17240 Of course, you can use news servers for doing this as well.  I've used
17241 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
17242 for some years, but doing that's a bore.  Moving the news server
17243 functionality up to the newsreader makes sense if you're the only person
17244 reading news on a machine.
17245
17246 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
17247 fact, you don't even have to configure anything.
17248
17249 Of course, to use it as such, you have to learn a few new commands.
17250
17251 @menu
17252 * Agent Basics::                How it all is supposed to work.
17253 * Agent Categories::            How to tell the Gnus Agent what to download.
17254 * Agent Commands::              New commands for all the buffers.
17255 * Agent Visuals::               Ways that the agent may effect your summary buffer.
17256 * Agent as Cache::              The Agent is a big cache too.
17257 * Agent Expiry::                How to make old articles go away.
17258 * Agent Regeneration::          How to recover from lost connections and other accidents.
17259 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
17260 * Outgoing Messages::           What happens when you post/mail something?
17261 * Agent Variables::             Customizing is fun.
17262 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
17263 * Batching Agents::             How to fetch news from a @code{cron} job.
17264 * Agent Caveats::               What you think it'll do and what it does.
17265 @end menu
17266
17267
17268 @node Agent Basics
17269 @subsection Agent Basics
17270
17271 First, let's get some terminology out of the way.
17272
17273 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
17274 connection to the net (and notified the Agent that this is the case).
17275 When the connection to the net is up again (and Gnus knows this), the
17276 Agent is @dfn{plugged}.
17277
17278 The @dfn{local} machine is the one you're running on, and which isn't
17279 connected to the net continuously.
17280
17281 @dfn{Downloading} means fetching things from the net to your local
17282 machine.  @dfn{Uploading} is doing the opposite.
17283
17284 You know that Gnus gives you all the opportunity you'd ever want for
17285 shooting yourself in the foot.  Some people call it flexibility.  Gnus
17286 is also customizable to a great extent, which means that the user has a
17287 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
17288 you in your foot, but with Gnus, you have a choice!
17289
17290 Gnus is never really in plugged or unplugged state.  Rather, it applies
17291 that state to each server individually.  This means that some servers
17292 can be plugged while others can be unplugged.  Additionally, some
17293 servers can be ignored by the Agent altogether (which means that
17294 they're kinda like plugged always).
17295
17296 So when you unplug the Agent and then wonder why is Gnus opening a
17297 connection to the Net, the next step to do is to look whether all
17298 servers are agentized.  If there is an unagentized server, you found
17299 the culprit.
17300
17301 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
17302 reachable.  When Gnus notices this, it asks you whether you want the
17303 server to be switched to offline state.  If you say yes, then the
17304 server will behave somewhat as if it was unplugged, except that Gnus
17305 will ask you whether you want to switch it back online again.
17306
17307 Let's take a typical Gnus session using the Agent.
17308
17309 @itemize @bullet
17310
17311 @item
17312 @findex gnus-unplugged
17313 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
17314 Agent in a disconnected state.  You can read all the news that you have
17315 already fetched while in this mode.
17316
17317 @item
17318 You then decide to see whether any new news has arrived.  You connect
17319 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
17320 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
17321 as usual.  To check for new mail in unplugged mode, see (@pxref{Mail
17322 Source Specifiers}).
17323
17324 @item
17325 You can then read the new news immediately, or you can download the news
17326 onto your local machine.  If you want to do the latter, you press @kbd{g}
17327 to check if there are any new news and then @kbd{J
17328 s} to fetch all the eligible articles in all the groups.  (To let Gnus
17329 know which articles you want to download, @pxref{Agent Categories}.)
17330
17331 @item
17332 After fetching the articles, you press @kbd{J j} to make Gnus become
17333 unplugged again, and you shut down the PPP thing (or whatever).  And
17334 then you read the news offline.
17335
17336 @item
17337 And then you go to step 2.
17338 @end itemize
17339
17340 Here are some things you should do the first time (or so) that you use
17341 the Agent.
17342
17343 @itemize @bullet
17344
17345 @item
17346 Decide which servers should be covered by the Agent.  If you have a mail
17347 back end, it would probably be nonsensical to have it covered by the
17348 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
17349 @kbd{J a} on the server (or servers) that you wish to have covered by the
17350 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
17351 added servers you do not wish to have covered by the Agent.  By default,
17352 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
17353 @code{gnus-secondary-select-methods} are agentized.
17354
17355 @item
17356 Decide on download policy.  It's fairly simple once you decide whether
17357 you are going to use agent categories, topic parameters, and/or group
17358 parameters to implement your policy.  If you're new to gnus, it
17359 is probably best to start with a category @xref{Agent Categories}.
17360
17361 Both topic parameters (@pxref{Topic Parameters}) and agent categories
17362 (@pxref{Agent Categories}) provide for setting a policy that applies
17363 to multiple groups.  Which you use is entirely up to you.  Topic
17364 parameters do override categories so, if you mix the two, you'll have
17365 to take that into account.  If you have a few groups that deviate from
17366 your policy, you can use group parameters (@pxref{Group Parameters}) to
17367 configure them.
17368
17369 @item
17370 Uhm@dots{} that's it.
17371 @end itemize
17372
17373
17374 @node Agent Categories
17375 @subsection Agent Categories
17376
17377 One of the main reasons to integrate the news transport layer into the
17378 newsreader is to allow greater control over what articles to download.
17379 There's not much point in downloading huge amounts of articles, just to
17380 find out that you're not interested in reading any of them.  It's better
17381 to be somewhat more conservative in choosing what to download, and then
17382 mark the articles for downloading manually if it should turn out that
17383 you're interested in the articles anyway.
17384
17385 One of the more effective methods for controlling what is to be
17386 downloaded is to create a @dfn{category} and then assign some (or all)
17387 groups to this category.  Groups that do not belong in any other
17388 category belong to the @code{default} category.  Gnus has its own
17389 buffer for creating and managing categories.
17390
17391 If you prefer, you can also use group parameters (@pxref{Group
17392 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
17393 alternative approach to controlling the agent.  The only real
17394 difference is that categories are specific to the agent (so there is
17395 less to learn) while group and topic parameters include the kitchen
17396 sink.
17397
17398 Since you can set agent parameters in several different places we have
17399 a rule to decide which source to believe.  This rule specifies that
17400 the parameter sources are checked in the following order: group
17401 parameters, topic parameters, agent category, and finally customizable
17402 variables. So you can mix all of these sources to produce a wide range
17403 of behavior, just don't blame me if you don't remember where you put
17404 your settings.
17405
17406 @menu
17407 * Category Syntax::             What a category looks like.
17408 * Category Buffer::             A buffer for maintaining categories.
17409 * Category Variables::          Customize'r'Us.
17410 @end menu
17411
17412
17413 @node Category Syntax
17414 @subsubsection Category Syntax
17415
17416 A category consists of a name, the list of groups belonging to the
17417 category, and a number of optional parameters that override the
17418 customizable variables.  The complete list of agent parameters are
17419 listed below.
17420
17421 @table @code
17422 @item gnus-agent-cat-name
17423 The name of the category.
17424
17425 @item gnus-agent-cat-groups
17426 The list of groups that are in this category.
17427
17428 @item gnus-agent-cat-predicate
17429 A predicate which (generally) gives a rough outline of which articles
17430 are eligible for downloading; and
17431
17432 @item gnus-agent-cat-score-file
17433 a score rule which (generally) gives you a finer granularity when
17434 deciding what articles to download.  (Note that this @dfn{download
17435 score} is not necessarily related to normal scores.)
17436
17437 @item gnus-agent-cat-enable-expiration
17438 a boolean indicating whether the agent should expire old articles in
17439 this group.  Most groups should be expired to conserve disk space.  In
17440 fact, its probably safe to say that the gnus.* hierarchy contains the
17441 only groups that should not be expired.
17442
17443 @item gnus-agent-cat-days-until-old
17444 an integer indicating the number of days that the agent should wait
17445 before deciding that a read article is safe to expire.
17446
17447 @item gnus-agent-cat-low-score
17448 an integer that overrides the value of @code{gnus-agent-low-score}.
17449
17450 @item gnus-agent-cat-high-score
17451 an integer that overrides the value of @code{gnus-agent-high-score}.
17452
17453 @item gnus-agent-cat-length-when-short
17454 an integer that overrides the value of
17455 @code{gnus-agent-short-article}.
17456
17457 @item gnus-agent-cat-length-when-long
17458 an integer that overrides the value of @code{gnus-agent-long-article}.
17459 @end table
17460
17461 The name of a category can not be changed once the category has been
17462 created.
17463
17464 Each category maintains a list of groups that are exclusive members of
17465 that category.  The exclusivity rule is automatically enforced, add a
17466 group to a new category and it is automatically removed from its old
17467 category.
17468
17469 A predicate in its simplest form can be a single predicate such as
17470 @code{true} or @code{false}.  These two will download every available
17471 article or nothing respectively.  In the case of these two special
17472 predicates an additional score rule is superfluous.
17473
17474 Predicates of @code{high} or @code{low} download articles in respect of
17475 their scores in relationship to @code{gnus-agent-high-score} and
17476 @code{gnus-agent-low-score} as described below.
17477
17478 To gain even finer control of what is to be regarded eligible for
17479 download a predicate can consist of a number of predicates with logical
17480 operators sprinkled in between.
17481
17482 Perhaps some examples are in order.
17483
17484 Here's a simple predicate.  (It's the default predicate, in fact, used
17485 for all groups that don't belong to any other category.)
17486
17487 @lisp
17488 short
17489 @end lisp
17490
17491 Quite simple, eh?  This predicate is true if and only if the article is
17492 short (for some value of ``short'').
17493
17494 Here's a more complex predicate:
17495
17496 @lisp
17497 (or high
17498     (and
17499      (not low)
17500      (not long)))
17501 @end lisp
17502
17503 This means that an article should be downloaded if it has a high score,
17504 or if the score is not low and the article is not long.  You get the
17505 drift.
17506
17507 The available logical operators are @code{or}, @code{and} and
17508 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
17509 @samp{|}, @code{&} and @code{!} instead.)
17510
17511 The following predicates are pre-defined, but if none of these fit what
17512 you want to do, you can write your own.
17513
17514 When evaluating each of these predicates, the named constant will be
17515 bound to the value determined by calling
17516 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
17517 example, gnus-agent-short-article will be bound to
17518 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
17519 means that you can specify a predicate in your category then tune that
17520 predicate to individual groups.
17521
17522 @table @code
17523 @item short
17524 True iff the article is shorter than @code{gnus-agent-short-article}
17525 lines; default 100.
17526
17527 @item long
17528 True iff the article is longer than @code{gnus-agent-long-article}
17529 lines; default 200.
17530
17531 @item low
17532 True iff the article has a download score less than
17533 @code{gnus-agent-low-score}; default 0.
17534
17535 @item high
17536 True iff the article has a download score greater than
17537 @code{gnus-agent-high-score}; default 0.
17538
17539 @item spam
17540 True iff the Gnus Agent guesses that the article is spam.  The
17541 heuristics may change over time, but at present it just computes a
17542 checksum and sees whether articles match.
17543
17544 @item true
17545 Always true.
17546
17547 @item false
17548 Always false.
17549 @end table
17550
17551 If you want to create your own predicate function, here's what you have
17552 to know:  The functions are called with no parameters, but the
17553 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
17554 useful values.
17555
17556 For example, you could decide that you don't want to download articles
17557 that were posted more than a certain number of days ago (e.g. posted
17558 more than @code{gnus-agent-expire-days} ago) you might write a function
17559 something along the lines of the following:
17560
17561 @lisp
17562 (defun my-article-old-p ()
17563   "Say whether an article is old."
17564   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
17565      (- (time-to-days (current-time)) gnus-agent-expire-days)))
17566 @end lisp
17567
17568 with the predicate then defined as:
17569
17570 @lisp
17571 (not my-article-old-p)
17572 @end lisp
17573
17574 or you could append your predicate to the predefined
17575 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
17576 wherever.
17577
17578 @lisp
17579 (require 'gnus-agent)
17580 (setq  gnus-category-predicate-alist
17581   (append gnus-category-predicate-alist
17582          '((old . my-article-old-p))))
17583 @end lisp
17584
17585 and simply specify your predicate as:
17586
17587 @lisp
17588 (not old)
17589 @end lisp
17590
17591 If/when using something like the above, be aware that there are many
17592 misconfigured systems/mailers out there and so an article's date is not
17593 always a reliable indication of when it was posted.  Hell, some people
17594 just don't give a damn.
17595
17596 The above predicates apply to @emph{all} the groups which belong to the
17597 category.  However, if you wish to have a specific predicate for an
17598 individual group within a category, or you're just too lazy to set up a
17599 new category, you can enter a group's individual predicate in its group
17600 parameters like so:
17601
17602 @lisp
17603 (agent-predicate . short)
17604 @end lisp
17605
17606 This is the group/topic parameter equivalent of the agent category default.
17607 Note that when specifying a single word predicate like this, the
17608 @code{agent-predicate} specification must be in dotted pair notation.
17609
17610 The equivalent of the longer example from above would be:
17611
17612 @lisp
17613 (agent-predicate or high (and (not low) (not long)))
17614 @end lisp
17615
17616 The outer parenthesis required in the category specification are not
17617 entered here as, not being in dotted pair notation, the value of the
17618 predicate is assumed to be a list.
17619
17620
17621 Now, the syntax of the download score is the same as the syntax of
17622 normal score files, except that all elements that require actually
17623 seeing the article itself are verboten.  This means that only the
17624 following headers can be scored on: @code{Subject}, @code{From},
17625 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
17626 @code{Lines}, and @code{Xref}.
17627
17628 As with predicates, the specification of the @code{download score rule}
17629 to use in respect of a group can be in either the category definition if
17630 it's to be applicable to all groups in therein, or a group's parameters
17631 if it's to be specific to that group.
17632
17633 In both of these places the @code{download score rule} can take one of
17634 three forms:
17635
17636 @enumerate
17637 @item
17638 Score rule
17639
17640 This has the same syntax as a normal gnus score file except only a
17641 subset of scoring keywords are available as mentioned above.
17642
17643 example:
17644
17645 @itemize @bullet
17646 @item
17647 Category specification
17648
17649 @lisp
17650 (("from"
17651        ("Lars Ingebrigtsen" 1000000 nil s))
17652 ("lines"
17653        (500 -100 nil <)))
17654 @end lisp
17655
17656 @item
17657 Group/Topic Parameter specification
17658
17659 @lisp
17660 (agent-score ("from"
17661                    ("Lars Ingebrigtsen" 1000000 nil s))
17662              ("lines"
17663                    (500 -100 nil <)))
17664 @end lisp
17665
17666 Again, note the omission of the outermost parenthesis here.
17667 @end itemize
17668
17669 @item
17670 Agent score file
17671
17672 These score files must @emph{only} contain the permitted scoring
17673 keywords stated above.
17674
17675 example:
17676
17677 @itemize @bullet
17678 @item
17679 Category specification
17680
17681 @lisp
17682 ("~/News/agent.SCORE")
17683 @end lisp
17684
17685 or perhaps
17686
17687 @lisp
17688 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
17689 @end lisp
17690
17691 @item
17692 Group Parameter specification
17693
17694 @lisp
17695 (agent-score "~/News/agent.SCORE")
17696 @end lisp
17697
17698 Additional score files can be specified as above.  Need I say anything
17699 about parenthesis?
17700 @end itemize
17701
17702 @item
17703 Use @code{normal} score files
17704
17705 If you don't want to maintain two sets of scoring rules for a group, and
17706 your desired @code{downloading} criteria for a group are the same as your
17707 @code{reading} criteria then you can tell the agent to refer to your
17708 @code{normal} score files when deciding what to download.
17709
17710 These directives in either the category definition or a group's
17711 parameters will cause the agent to read in all the applicable score
17712 files for a group, @emph{filtering out} those sections that do not
17713 relate to one of the permitted subset of scoring keywords.
17714
17715 @itemize @bullet
17716 @item
17717 Category Specification
17718
17719 @lisp
17720 file
17721 @end lisp
17722
17723 @item
17724 Group Parameter specification
17725
17726 @lisp
17727 (agent-score . file)
17728 @end lisp
17729 @end itemize
17730 @end enumerate
17731
17732 @node Category Buffer
17733 @subsubsection Category Buffer
17734
17735 You'd normally do all category maintenance from the category buffer.
17736 When you enter it for the first time (with the @kbd{J c} command from
17737 the group buffer), you'll only see the @code{default} category.
17738
17739 The following commands are available in this buffer:
17740
17741 @table @kbd
17742 @item q
17743 @kindex q (Category)
17744 @findex gnus-category-exit
17745 Return to the group buffer (@code{gnus-category-exit}).
17746
17747 @item e
17748 @kindex e (Category)
17749 @findex gnus-category-customize-category
17750 Use a customization buffer to set all of the selected category's
17751 parameters at one time (@code{gnus-category-customize-category}).
17752
17753 @item k
17754 @kindex k (Category)
17755 @findex gnus-category-kill
17756 Kill the current category (@code{gnus-category-kill}).
17757
17758 @item c
17759 @kindex c (Category)
17760 @findex gnus-category-copy
17761 Copy the current category (@code{gnus-category-copy}).
17762
17763 @item a
17764 @kindex a (Category)
17765 @findex gnus-category-add
17766 Add a new category (@code{gnus-category-add}).
17767
17768 @item p
17769 @kindex p (Category)
17770 @findex gnus-category-edit-predicate
17771 Edit the predicate of the current category
17772 (@code{gnus-category-edit-predicate}).
17773
17774 @item g
17775 @kindex g (Category)
17776 @findex gnus-category-edit-groups
17777 Edit the list of groups belonging to the current category
17778 (@code{gnus-category-edit-groups}).
17779
17780 @item s
17781 @kindex s (Category)
17782 @findex gnus-category-edit-score
17783 Edit the download score rule of the current category
17784 (@code{gnus-category-edit-score}).
17785
17786 @item l
17787 @kindex l (Category)
17788 @findex gnus-category-list
17789 List all the categories (@code{gnus-category-list}).
17790 @end table
17791
17792
17793 @node Category Variables
17794 @subsubsection Category Variables
17795
17796 @table @code
17797 @item gnus-category-mode-hook
17798 @vindex gnus-category-mode-hook
17799 Hook run in category buffers.
17800
17801 @item gnus-category-line-format
17802 @vindex gnus-category-line-format
17803 Format of the lines in the category buffer (@pxref{Formatting
17804 Variables}).  Valid elements are:
17805
17806 @table @samp
17807 @item c
17808 The name of the category.
17809
17810 @item g
17811 The number of groups in the category.
17812 @end table
17813
17814 @item gnus-category-mode-line-format
17815 @vindex gnus-category-mode-line-format
17816 Format of the category mode line (@pxref{Mode Line Formatting}).
17817
17818 @item gnus-agent-short-article
17819 @vindex gnus-agent-short-article
17820 Articles that have fewer lines than this are short.  Default 100.
17821
17822 @item gnus-agent-long-article
17823 @vindex gnus-agent-long-article
17824 Articles that have more lines than this are long.  Default 200.
17825
17826 @item gnus-agent-low-score
17827 @vindex gnus-agent-low-score
17828 Articles that have a score lower than this have a low score.  Default
17829 0.
17830
17831 @item gnus-agent-high-score
17832 @vindex gnus-agent-high-score
17833 Articles that have a score higher than this have a high score.  Default
17834 0.
17835
17836 @item gnus-agent-expire-days
17837 @vindex gnus-agent-expire-days
17838 The number of days that a @samp{read} article must stay in the agent's
17839 local disk before becoming eligible for expiration (While the name is
17840 the same, this doesn't mean expiring the article on the server.  It
17841 just means deleting the local copy of the article).  What is also
17842 important to understand is that the counter starts with the time the
17843 article was written to the local disk and not the time the article was
17844 read.
17845 Default 7.
17846
17847 @item gnus-agent-enable-expiration
17848 @vindex gnus-agent-enable-expiration
17849 Determines whether articles in a group are, by default, expired or
17850 retained indefinitely.  The default is @code{ENABLE} which means that
17851 you'll have to disable expiration when desired.  On the other hand,
17852 you could set this to @code{DISABLE}.  In that case, you would then
17853 have to enable expiration in selected groups.
17854
17855 @end table
17856
17857
17858 @node Agent Commands
17859 @subsection Agent Commands
17860 @findex gnus-agent-toggle-plugged
17861 @kindex J j (Agent)
17862
17863 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
17864 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
17865 toggles the plugged/unplugged state of the Gnus Agent.
17866
17867
17868 @menu
17869 * Group Agent Commands::        Configure groups and fetch their contents.
17870 * Summary Agent Commands::      Manually select then fetch specific articles.
17871 * Server Agent Commands::       Select the servers that are supported by the agent.
17872 @end menu
17873
17874
17875
17876
17877 @node Group Agent Commands
17878 @subsubsection Group Agent Commands
17879
17880 @table @kbd
17881 @item J u
17882 @kindex J u (Agent Group)
17883 @findex gnus-agent-fetch-groups
17884 Fetch all eligible articles in the current group
17885 (@code{gnus-agent-fetch-groups}).
17886
17887 @item J c
17888 @kindex J c (Agent Group)
17889 @findex gnus-enter-category-buffer
17890 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
17891
17892 @item J s
17893 @kindex J s (Agent Group)
17894 @findex gnus-agent-fetch-session
17895 Fetch all eligible articles in all groups
17896 (@code{gnus-agent-fetch-session}).
17897
17898 @item J S
17899 @kindex J S (Agent Group)
17900 @findex gnus-group-send-queue
17901 Send all sendable messages in the queue group
17902 (@code{gnus-group-send-queue}).  @xref{Drafts}.
17903
17904 @item J a
17905 @kindex J a (Agent Group)
17906 @findex gnus-agent-add-group
17907 Add the current group to an Agent category
17908 (@code{gnus-agent-add-group}).  This command understands the
17909 process/prefix convention (@pxref{Process/Prefix}).
17910
17911 @item J r
17912 @kindex J r (Agent Group)
17913 @findex gnus-agent-remove-group
17914 Remove the current group from its category, if any
17915 (@code{gnus-agent-remove-group}).  This command understands the
17916 process/prefix convention (@pxref{Process/Prefix}).
17917
17918 @item J Y
17919 @kindex J Y (Agent Group)
17920 @findex gnus-agent-synchronize-flags
17921 Synchronize flags changed while unplugged with remote server, if any.
17922
17923
17924 @end table
17925
17926
17927 @node Summary Agent Commands
17928 @subsubsection Summary Agent Commands
17929
17930 @table @kbd
17931 @item J #
17932 @kindex J # (Agent Summary)
17933 @findex gnus-agent-mark-article
17934 Mark the article for downloading (@code{gnus-agent-mark-article}).
17935
17936 @item J M-#
17937 @kindex J M-# (Agent Summary)
17938 @findex gnus-agent-unmark-article
17939 Remove the downloading mark from the article
17940 (@code{gnus-agent-unmark-article}).
17941
17942 @cindex %
17943 @item @@
17944 @kindex @@ (Agent Summary)
17945 @findex gnus-agent-toggle-mark
17946 Toggle whether to download the article
17947 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
17948 default. 
17949
17950 @item J c
17951 @kindex J c (Agent Summary)
17952 @findex gnus-agent-catchup
17953 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
17954
17955 @item J S
17956 @kindex J S (Agent Summary)
17957 @findex gnus-agent-fetch-group
17958 Download all eligible (See @pxref{Agent Categories}) articles in this group.
17959 (@code{gnus-agent-fetch-group}).
17960
17961 @item J s
17962 @kindex J s (Agent Summary)
17963 @findex gnus-agent-fetch-series
17964 Download all processable articles in this group.
17965 (@code{gnus-agent-fetch-series}).
17966
17967 @item J u
17968 @kindex J u (Agent Summary)
17969 @findex gnus-agent-summary-fetch-group
17970 Download all downloadable articles in the current group
17971 (@code{gnus-agent-summary-fetch-group}).
17972
17973 @end table
17974
17975
17976 @node Server Agent Commands
17977 @subsubsection Server Agent Commands
17978
17979 @table @kbd
17980 @item J a
17981 @kindex J a (Agent Server)
17982 @findex gnus-agent-add-server
17983 Add the current server to the list of servers covered by the Gnus Agent
17984 (@code{gnus-agent-add-server}).
17985
17986 @item J r
17987 @kindex J r (Agent Server)
17988 @findex gnus-agent-remove-server
17989 Remove the current server from the list of servers covered by the Gnus
17990 Agent (@code{gnus-agent-remove-server}).
17991
17992 @end table
17993
17994
17995 @node Agent Visuals
17996 @subsection Agent Visuals
17997
17998 If you open a summary while unplugged and, Gnus knows from the group's
17999 active range that there are more articles than the headers currently
18000 stored in the Agent, you may see some articles whose subject looks
18001 something like @samp{[Undownloaded article #####]}.  These are
18002 placeholders for the missing headers.  Aside from setting a mark,
18003 there is not much that can be done with one of these placeholders.
18004 When Gnus finally gets a chance to fetch the group's headers, the
18005 placeholders will automatically be replaced by the actual headers.
18006 You can configure the summary buffer's maneuvering to skip over the
18007 placeholders if you care (See @code{gnus-auto-goto-ignores}).
18008
18009 While it may be obvious to all, the only headers and articles
18010 available while unplugged are those headers and articles that were
18011 fetched into the Agent while previously plugged.  To put it another
18012 way, "If you forget to fetch something while plugged, you might have a
18013 less than satisfying unplugged session".  For this reason, the Agent
18014 adds two visual effects to your summary buffer.  These effects display
18015 the download status of each article so that you always know which
18016 articles will be available when unplugged.
18017
18018 The first visual effect is the @samp{%O} spec.  If you customize
18019 @code{gnus-summary-line-format} to include this specifier, you will add
18020 a single character field that indicates an article's download status.
18021 Articles that have been fetched into either the Agent or the Cache,
18022 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
18023 other articles will display @code{gnus-undownloaded-mark} (defaults to
18024 @samp{-}).  If you open a group that has not been agentized, a space
18025 (@samp{ }) will be displayed.
18026
18027 The second visual effect are the undownloaded faces.  The faces, there
18028 are three indicating the article's score (low, normal, high), seem to
18029 result in a love/hate response from many Gnus users.  The problem is
18030 that the face selection is controlled by a list of condition tests and
18031 face names (See @code{gnus-summary-highlight}).  Each condition is
18032 tested in the order in which it appears in the list so early
18033 conditions have precedence over later conditions.  All of this means
18034 that, if you tick an undownloaded article, the article will continue
18035 to be displayed in the undownloaded face rather than the ticked face.
18036
18037 If you use the Agent as a cache (to avoid downloading the same article
18038 each time you visit it or to minimize your connection time), the
18039 undownloaded face will probably seem like a good idea.  The reason
18040 being that you do all of our work (marking, reading, deleting) with
18041 downloaded articles so the normal faces always appear.
18042
18043 For occasional Agent users, the undownloaded faces may appear to be an
18044 absolutely horrible idea.  The issue being that, since most of their
18045 articles have not been fetched into the Agent, most of the normal
18046 faces will be obscured by the undownloaded faces.  If this is your
18047 situation, you have two choices available.  First, you can completely
18048 disable the undownload faces by customizing
18049 @code{gnus-summary-highlight} to delete the three cons-cells that
18050 refer to the @code{gnus-summary-*-undownloaded-face} faces.  Second, if
18051 you prefer to take a more fine-grained approach, you may set the
18052 @code{agent-disable-undownloaded-faces} group parameter to t.  This
18053 parameter, like all other agent parameters, may be set on an Agent
18054 Category (@pxref{Agent Categories}), a Group Topic (@pxref{Topic
18055 Parameters}), or an individual group (@pxref{Group Parameters}).
18056
18057 @node Agent as Cache
18058 @subsection Agent as Cache
18059
18060 When Gnus is plugged, it is not efficient to download headers or
18061 articles from the server again, if they are already stored in the
18062 Agent.  So, Gnus normally only downloads headers once, and stores them
18063 in the Agent.  These headers are later used when generating the summary
18064 buffer, regardless of whether you are plugged or unplugged.  Articles
18065 are not cached in the Agent by default though (that would potentially
18066 consume lots of disk space), but if you have already downloaded an
18067 article into the Agent, Gnus will not download the article from the
18068 server again but use the locally stored copy instead.
18069
18070 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
18071 @pxref{Agent Variables}) to always download headers and articles while
18072 plugged.  Gnus will almost certainly be slower, but it will be kept
18073 synchronized with the server.  That last point probably won't make any
18074 sense if you are using a nntp or nnimap back end.
18075
18076 @node Agent Expiry
18077 @subsection Agent Expiry
18078
18079 @vindex gnus-agent-expire-days
18080 @findex gnus-agent-expire
18081 @kindex M-x gnus-agent-expire
18082 @kindex M-x gnus-agent-expire-group
18083 @findex gnus-agent-expire-group
18084 @cindex agent expiry
18085 @cindex Gnus agent expiry
18086 @cindex expiry
18087
18088 The Agent back end, @code{nnagent}, doesn't handle expiry. Well, at
18089 least it doesn't handle it like other back ends.  Instead, there are
18090 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
18091 commands that will expire all read articles that are older than
18092 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
18093 that you're running out of space.  Neither are particularly fast or
18094 efficient, and it's not a particularly good idea to interrupt them (with
18095 @kbd{C-g} or anything else) once you've started one of them.
18096
18097 Note that other functions, e.g. @code{gnus-request-expire-articles},
18098 might run @code{gnus-agent-expire} for you to keep the agent 
18099 synchronized with the group.
18100
18101 The agent parameter @code{agent-enable-expiration} may be used to
18102 prevent expiration in selected groups.
18103
18104 @vindex gnus-agent-expire-all
18105 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
18106 expiration commands will expire all articles---unread, read, ticked
18107 and dormant.  If @code{nil} (which is the default), only read articles
18108 are eligible for expiry, and unread, ticked and dormant articles will
18109 be kept indefinitely.
18110
18111 If you find that some articles eligible for expiry are never expired,
18112 perhaps some Gnus Agent files are corrupted.  There's are special
18113 commands, @code{gnus-agent-regenerate} and
18114 @code{gnus-agent-regenerate-group}, to fix possible problems.
18115
18116 @node Agent Regeneration
18117 @subsection Agent Regeneration
18118
18119 @cindex agent regeneration
18120 @cindex Gnus agent regeneration
18121 @cindex regeneration
18122
18123 The local data structures used by @code{nnagent} may become corrupted
18124 due to certain exceptional conditions.  When this happens,
18125 @code{nnagent} functionality may degrade or even fail.  The solution
18126 to this problem is to repair the local data structures by removing all
18127 internal inconsistencies.
18128
18129 For example, if your connection to your server is lost while
18130 downloaded articles into the agent, the local data structures will not
18131 know about articles successfully downloaded prior to the connection
18132 failure.  Running @code{gnus-agent-regenerate} or
18133 @code{gnus-agent-regenerate-group} will update the data structures
18134 such that you don't need to download these articles a second time.
18135
18136 @findex gnus-agent-regenerate
18137 @kindex M-x gnus-agent-regenerate
18138 The command @code{gnus-agent-regenerate} will perform
18139 @code{gnus-agent-regenerate-group} on every agentized group.  While
18140 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
18141 recommended that you first close all summary buffers.
18142
18143 @findex gnus-agent-regenerate-group
18144 @kindex M-x gnus-agent-regenerate-group
18145 The command @code{gnus-agent-regenerate-group} uses the local copies
18146 of individual articles to repair the local @acronym{NOV}(header) database.  It
18147 then updates the internal data structures that document which articles
18148 are stored locally.  An optional argument will mark articles in the
18149 agent as unread.
18150
18151 @node Agent and IMAP
18152 @subsection Agent and IMAP
18153
18154 The Agent works with any Gnus back end, including nnimap.  However,
18155 since there are some conceptual differences between @acronym{NNTP} and
18156 @acronym{IMAP}, this section (should) provide you with some information to
18157 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
18158
18159 The first thing to keep in mind is that all flags (read, ticked, etc)
18160 are kept on the @acronym{IMAP} server, rather than in @file{.newsrc} as is the
18161 case for nntp.  Thus Gnus need to remember flag changes when
18162 disconnected, and synchronize these flags when you plug back in.
18163
18164 Gnus keeps track of flag changes when reading nnimap groups under the
18165 Agent.  When you plug back in, Gnus will check if you have any changed
18166 any flags and ask if you wish to synchronize these with the server.
18167 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
18168
18169 @vindex gnus-agent-synchronize-flags
18170 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
18171 never automatically synchronize flags.  If it is @code{ask}, which is
18172 the default, the Agent will check if you made any changes and if so
18173 ask if you wish to synchronize these when you re-connect.  If it has
18174 any other value, all flags will be synchronized automatically.
18175
18176 If you do not wish to synchronize flags automatically when you
18177 re-connect, you can do it manually with the
18178 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
18179 in the group buffer.
18180
18181 Some things are currently not implemented in the Agent that you'd might
18182 expect from a disconnected @acronym{IMAP} client, including:
18183
18184 @itemize @bullet
18185
18186 @item
18187 Copying/moving articles into nnimap groups when unplugged.
18188
18189 @item
18190 Creating/deleting nnimap groups when unplugged.
18191
18192 @end itemize
18193
18194 Technical note: the synchronization algorithm does not work by ``pushing''
18195 all local flags to the server, but rather incrementally update the
18196 server view of flags by changing only those flags that were changed by
18197 the user.  Thus, if you set one flag on an article, quit the group and
18198 re-select the group and remove the flag; the flag will be set and
18199 removed from the server when you ``synchronize''.  The queued flag
18200 operations can be found in the per-server @code{flags} file in the Agent
18201 directory.  It's emptied when you synchronize flags.
18202
18203
18204 @node Outgoing Messages
18205 @subsection Outgoing Messages
18206
18207 When Gnus is unplugged, all outgoing messages (both mail and news) are
18208 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
18209 them there after posting, and edit them at will.
18210
18211 When Gnus is plugged again, you can send the messages either from the
18212 draft group with the special commands available there, or you can use
18213 the @kbd{J S} command in the group buffer to send all the sendable
18214 messages in the draft group.
18215
18216
18217
18218 @node Agent Variables
18219 @subsection Agent Variables
18220
18221 @table @code
18222 @item gnus-agent-directory
18223 @vindex gnus-agent-directory
18224 Where the Gnus Agent will store its files.  The default is
18225 @file{~/News/agent/}.
18226
18227 @item gnus-agent-handle-level
18228 @vindex gnus-agent-handle-level
18229 Groups on levels (@pxref{Group Levels}) higher than this variable will
18230 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
18231 which means that only subscribed group will be considered by the Agent
18232 by default.
18233
18234 @item gnus-agent-plugged-hook
18235 @vindex gnus-agent-plugged-hook
18236 Hook run when connecting to the network.
18237
18238 @item gnus-agent-unplugged-hook
18239 @vindex gnus-agent-unplugged-hook
18240 Hook run when disconnecting from the network.
18241
18242 @item gnus-agent-fetched-hook
18243 @vindex gnus-agent-fetched-hook
18244 Hook run when finished fetching articles.
18245
18246 @item gnus-agent-cache
18247 @vindex gnus-agent-cache
18248 Variable to control whether use the locally stored @acronym{NOV} and
18249 articles when plugged, e.g. essentially using the Agent as a cache.
18250 The default is non-@code{nil}, which means to use the Agent as a cache.
18251
18252 @item gnus-agent-go-online
18253 @vindex gnus-agent-go-online
18254 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
18255 automatically switch offline servers into online status.  If it is
18256 @code{ask}, the default, the Agent will ask if you wish to switch
18257 offline servers into online status when you re-connect.  If it has any
18258 other value, all offline servers will be automatically switched into
18259 online status.
18260
18261 @item gnus-agent-mark-unread-after-downloaded
18262 @vindex gnus-agent-mark-unread-after-downloaded
18263 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
18264 mark articles as unread after downloading.  This is usually a safe
18265 thing to do as the newly downloaded article has obviously not been
18266 read.  The default is t.
18267
18268 @item gnus-agent-consider-all-articles
18269 @vindex gnus-agent-consider-all-articles
18270 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
18271 agent will fetch all missing headers.  When @code{nil}, the agent will
18272 fetch only new headers. The default is @code{nil}.
18273
18274 @item gnus-agent-max-fetch-size
18275 @vindex gnus-agent-max-fetch-size
18276 The agent fetches articles into a temporary buffer prior to parsing
18277 them into individual files.  To avoid exceeding the max. buffer size,
18278 the agent alternates between fetching and parsing until all articles
18279 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
18280 limit to control how often the cycling occurs.  A large value improves
18281 performance.  A small value minimizes the time lost should the
18282 connection be lost while fetching (You may need to run
18283 @code{gnus-agent-regenerate-group} to update the group's state.
18284 However, all articles parsed prior to loosing the connection will be
18285 available while unplugged).  The default is 10M so it is unusual to
18286 see any cycling.
18287
18288 @item gnus-server-unopen-status
18289 @vindex gnus-server-unopen-status
18290 Perhaps not an Agent variable, but closely related to the Agent, this
18291 variable says what will happen if Gnus cannot open a server.  If the
18292 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
18293 whether to deny the server or whether to unplug the agent.  If the
18294 Agent is disabled, Gnus always simply deny the server.  Other choices
18295 for this variable include @code{denied} and @code{offline} the latter
18296 is only valid if the Agent is used.
18297
18298 @item gnus-auto-goto-ignores
18299 @vindex gnus-auto-goto-ignores
18300 Another variable that isn't an Agent variable, yet so closely related
18301 that most will look for it here, this variable tells the summary
18302 buffer how to maneuver around undownloaded (only headers stored in the
18303 agent) and unfetched (neither article nor headers stored) articles.
18304
18305 The legal values are @code{nil} (maneuver to any article),
18306 @code{undownloaded} (maneuvering while unplugged ignores articles that
18307 have not been fetched), @code{always-undownloaded} (maneuvering always
18308 ignores articles that have not been fetched), @code{unfetched}
18309 (maneuvering ignores articles whose headers have not been fetched).
18310
18311 @end table
18312
18313
18314 @node Example Setup
18315 @subsection Example Setup
18316
18317 If you don't want to read this manual, and you have a fairly standard
18318 setup, you may be able to use something like the following as your
18319 @file{~/.gnus.el} file to get started.
18320
18321 @lisp
18322 ;;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
18323 ;;; @r{from your ISP's server.}
18324 (setq gnus-select-method '(nntp "news.your-isp.com"))
18325
18326 ;;; @r{Define how Gnus is to read your mail.  We read mail from}
18327 ;;; @r{your ISP's @acronym{POP} server.}
18328 (setq mail-sources '((pop :server "pop.your-isp.com")))
18329
18330 ;;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
18331 (setq gnus-secondary-select-methods '((nnml "")))
18332
18333 ;;; @r{Make Gnus into an offline newsreader.}
18334 ;;; (gnus-agentize) ; @r{The obsolete setting.}
18335 ;;; (setq gnus-agent t) ; @r{Now the default.}
18336 @end lisp
18337
18338 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
18339 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
18340 gnus}.
18341
18342 If this is the first time you've run Gnus, you will be subscribed
18343 automatically to a few default newsgroups.  You'll probably want to
18344 subscribe to more groups, and to do that, you have to query the
18345 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
18346 command.  This usually takes quite a while, but you only have to do it
18347 once.
18348
18349 After reading and parsing a while, you'll be presented with a list of
18350 groups.  Subscribe to the ones you want to read with the @kbd{u}
18351 command.  @kbd{l} to make all the killed groups disappear after you've
18352 subscribe to all the groups you want to read.  (@kbd{A k} will bring
18353 back all the killed groups.)
18354
18355 You can now read the groups at once, or you can download the articles
18356 with the @kbd{J s} command.  And then read the rest of this manual to
18357 find out which of the other gazillion things you want to customize.
18358
18359
18360 @node Batching Agents
18361 @subsection Batching Agents
18362 @findex gnus-agent-batch
18363
18364 Having the Gnus Agent fetch articles (and post whatever messages you've
18365 written) is quite easy once you've gotten things set up properly.  The
18366 following shell script will do everything that is necessary:
18367
18368 You can run a complete batch command from the command line with the
18369 following incantation:
18370
18371 @example
18372 #!/bin/sh
18373 emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
18374 @end example
18375
18376
18377 @node Agent Caveats
18378 @subsection Agent Caveats
18379
18380 The Gnus Agent doesn't seem to work like most other offline
18381 newsreaders.  Here are some common questions that some imaginary people
18382 may ask:
18383
18384 @table @dfn
18385 @item If I read an article while plugged, do they get entered into the Agent?
18386
18387 @strong{No}.  If you want this behaviour, add
18388 @code{gnus-agent-fetch-selected-article} to
18389 @code{gnus-select-article-hook}.
18390
18391 @item If I read an article while plugged, and the article already exists in 
18392 the Agent, will it get downloaded once more?
18393
18394 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
18395
18396 @end table
18397
18398 In short, when Gnus is unplugged, it only looks into the locally stored
18399 articles; when it's plugged, it talks to your ISP and may also use the
18400 locally stored articles.
18401
18402
18403 @node Scoring
18404 @chapter Scoring
18405 @cindex scoring
18406
18407 Other people use @dfn{kill files}, but we here at Gnus Towers like
18408 scoring better than killing, so we'd rather switch than fight.  They do
18409 something completely different as well, so sit up straight and pay
18410 attention!
18411
18412 @vindex gnus-summary-mark-below
18413 All articles have a default score (@code{gnus-summary-default-score}),
18414 which is 0 by default.  This score may be raised or lowered either
18415 interactively or by score files.  Articles that have a score lower than
18416 @code{gnus-summary-mark-below} are marked as read.
18417
18418 Gnus will read any @dfn{score files} that apply to the current group
18419 before generating the summary buffer.
18420
18421 There are several commands in the summary buffer that insert score
18422 entries based on the current article.  You can, for instance, ask Gnus to
18423 lower or increase the score of all articles with a certain subject.
18424
18425 There are two sorts of scoring entries: Permanent and temporary.
18426 Temporary score entries are self-expiring entries.  Any entries that are
18427 temporary and have not been used for, say, a week, will be removed
18428 silently to help keep the sizes of the score files down.
18429
18430 @menu
18431 * Summary Score Commands::      Adding score entries for the current group.
18432 * Group Score Commands::        General score commands.
18433 * Score Variables::             Customize your scoring.  (My, what terminology).
18434 * Score File Format::           What a score file may contain.
18435 * Score File Editing::          You can edit score files by hand as well.
18436 * Adaptive Scoring::            Big Sister Gnus knows what you read.
18437 * Home Score File::             How to say where new score entries are to go.
18438 * Followups To Yourself::       Having Gnus notice when people answer you.
18439 * Scoring On Other Headers::    Scoring on non-standard headers.
18440 * Scoring Tips::                How to score effectively.
18441 * Reverse Scoring::             That problem child of old is not problem.
18442 * Global Score Files::          Earth-spanning, ear-splitting score files.
18443 * Kill Files::                  They are still here, but they can be ignored.
18444 * Converting Kill Files::       Translating kill files to score files.
18445 * GroupLens::                   Getting predictions on what you like to read.
18446 * Advanced Scoring::            Using logical expressions to build score rules.
18447 * Score Decays::                It can be useful to let scores wither away.
18448 @end menu
18449
18450
18451 @node Summary Score Commands
18452 @section Summary Score Commands
18453 @cindex score commands
18454
18455 The score commands that alter score entries do not actually modify real
18456 score files.  That would be too inefficient.  Gnus maintains a cache of
18457 previously loaded score files, one of which is considered the
18458 @dfn{current score file alist}.  The score commands simply insert
18459 entries into this list, and upon group exit, this list is saved.
18460
18461 The current score file is by default the group's local score file, even
18462 if no such score file actually exists.  To insert score commands into
18463 some other score file (e.g. @file{all.SCORE}), you must first make this
18464 score file the current one.
18465
18466 General score commands that don't actually change the score file:
18467
18468 @table @kbd
18469
18470 @item V s
18471 @kindex V s (Summary)
18472 @findex gnus-summary-set-score
18473 Set the score of the current article (@code{gnus-summary-set-score}).
18474
18475 @item V S
18476 @kindex V S (Summary)
18477 @findex gnus-summary-current-score
18478 Display the score of the current article
18479 (@code{gnus-summary-current-score}).
18480
18481 @item V t
18482 @kindex V t (Summary)
18483 @findex gnus-score-find-trace
18484 Display all score rules that have been used on the current article
18485 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
18486 can use @kbd{q} to quit.  @kbd{e} edits the corresponding score file.
18487 When point is on a string within the match element, @kbd{e} will try to
18488 bring you to this string in the score file.
18489
18490 @item V w
18491 @kindex V w (Summary)
18492 @findex gnus-score-find-favourite-words
18493 List words used in scoring (@code{gnus-score-find-favourite-words}).
18494
18495 @item V R
18496 @kindex V R (Summary)
18497 @findex gnus-summary-rescore
18498 Run the current summary through the scoring process
18499 (@code{gnus-summary-rescore}).  This might be useful if you're playing
18500 around with your score files behind Gnus' back and want to see the
18501 effect you're having.
18502
18503 @item V c
18504 @kindex V c (Summary)
18505 @findex gnus-score-change-score-file
18506 Make a different score file the current
18507 (@code{gnus-score-change-score-file}).
18508
18509 @item V e
18510 @kindex V e (Summary)
18511 @findex gnus-score-edit-current-scores
18512 Edit the current score file (@code{gnus-score-edit-current-scores}).
18513 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
18514 File Editing}).
18515
18516 @item V f
18517 @kindex V f (Summary)
18518 @findex gnus-score-edit-file
18519 Edit a score file and make this score file the current one
18520 (@code{gnus-score-edit-file}).
18521
18522 @item V F
18523 @kindex V F (Summary)
18524 @findex gnus-score-flush-cache
18525 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
18526 after editing score files.
18527
18528 @item V C
18529 @kindex V C (Summary)
18530 @findex gnus-score-customize
18531 Customize a score file in a visually pleasing manner
18532 (@code{gnus-score-customize}).
18533
18534 @end table
18535
18536 The rest of these commands modify the local score file.
18537
18538 @table @kbd
18539
18540 @item V m
18541 @kindex V m (Summary)
18542 @findex gnus-score-set-mark-below
18543 Prompt for a score, and mark all articles with a score below this as
18544 read (@code{gnus-score-set-mark-below}).
18545
18546 @item V x
18547 @kindex V x (Summary)
18548 @findex gnus-score-set-expunge-below
18549 Prompt for a score, and add a score rule to the current score file to
18550 expunge all articles below this score
18551 (@code{gnus-score-set-expunge-below}).
18552 @end table
18553
18554 The keystrokes for actually making score entries follow a very regular
18555 pattern, so there's no need to list all the commands.  (Hundreds of
18556 them.)
18557
18558 @findex gnus-summary-increase-score
18559 @findex gnus-summary-lower-score
18560
18561 @enumerate
18562 @item
18563 The first key is either @kbd{I} (upper case i) for increasing the score
18564 or @kbd{L} for lowering the score.
18565 @item
18566 The second key says what header you want to score on.  The following
18567 keys are available:
18568 @table @kbd
18569
18570 @item a
18571 Score on the author name.
18572
18573 @item s
18574 Score on the subject line.
18575
18576 @item x
18577 Score on the @code{Xref} line---i.e., the cross-posting line.
18578
18579 @item r
18580 Score on the @code{References} line.
18581
18582 @item d
18583 Score on the date.
18584
18585 @item l
18586 Score on the number of lines.
18587
18588 @item i
18589 Score on the @code{Message-ID} header.
18590
18591 @item e
18592 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
18593 if your @acronym{NNTP} server tracks additional header data in overviews.
18594
18595 @item f
18596 Score on followups---this matches the author name, and adds scores to
18597 the followups to this author.  (Using this key leads to the creation of
18598 @file{ADAPT} files.)
18599
18600 @item b
18601 Score on the body.
18602
18603 @item h
18604 Score on the head.
18605
18606 @item t
18607 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
18608 files.)
18609
18610 @end table
18611
18612 @item
18613 The third key is the match type.  Which match types are valid depends on
18614 what headers you are scoring on.
18615
18616 @table @code
18617
18618 @item strings
18619
18620 @table @kbd
18621
18622 @item e
18623 Exact matching.
18624
18625 @item s
18626 Substring matching.
18627
18628 @item f
18629 Fuzzy matching (@pxref{Fuzzy Matching}).
18630
18631 @item r
18632 Regexp matching
18633 @end table
18634
18635 @item date
18636 @table @kbd
18637
18638 @item b
18639 Before date.
18640
18641 @item a
18642 After date.
18643
18644 @item n
18645 This date.
18646 @end table
18647
18648 @item number
18649 @table @kbd
18650
18651 @item <
18652 Less than number.
18653
18654 @item =
18655 Equal to number.
18656
18657 @item >
18658 Greater than number.
18659 @end table
18660 @end table
18661
18662 @item
18663 The fourth and usually final key says whether this is a temporary (i.e.,
18664 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
18665 or whether it is to be done immediately, without adding to the score
18666 file.
18667 @table @kbd
18668
18669 @item t
18670 Temporary score entry.
18671
18672 @item p
18673 Permanent score entry.
18674
18675 @item i
18676 Immediately scoring.
18677 @end table
18678
18679 @item
18680 If you are scoring on `e' (extra) headers, you will then be prompted for
18681 the header name on which you wish to score.  This must be a header named
18682 in gnus-extra-headers, and @samp{TAB} completion is available.
18683
18684 @end enumerate
18685
18686 So, let's say you want to increase the score on the current author with
18687 exact matching permanently: @kbd{I a e p}.  If you want to lower the
18688 score based on the subject line, using substring matching, and make a
18689 temporary score entry: @kbd{L s s t}.  Pretty easy.
18690
18691 To make things a bit more complicated, there are shortcuts.  If you use
18692 a capital letter on either the second or third keys, Gnus will use
18693 defaults for the remaining one or two keystrokes.  The defaults are
18694 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
18695 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
18696
18697 These functions take both the numerical prefix and the symbolic prefix
18698 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
18699 (or increase) the score of the article.  A symbolic prefix of @code{a}
18700 says to use the @file{all.SCORE} file for the command instead of the
18701 current score file.
18702
18703 @vindex gnus-score-mimic-keymap
18704 The @code{gnus-score-mimic-keymap} says whether these commands will
18705 pretend they are keymaps or not.
18706
18707
18708 @node Group Score Commands
18709 @section Group Score Commands
18710 @cindex group score commands
18711
18712 There aren't many of these as yet, I'm afraid.
18713
18714 @table @kbd
18715
18716 @item W f
18717 @kindex W f (Group)
18718 @findex gnus-score-flush-cache
18719 Gnus maintains a cache of score alists to avoid having to reload them
18720 all the time.  This command will flush the cache
18721 (@code{gnus-score-flush-cache}).
18722
18723 @end table
18724
18725 You can do scoring from the command line by saying something like:
18726
18727 @findex gnus-batch-score
18728 @cindex batch scoring
18729 @example
18730 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
18731 @end example
18732
18733
18734 @node Score Variables
18735 @section Score Variables
18736 @cindex score variables
18737
18738 @table @code
18739
18740 @item gnus-use-scoring
18741 @vindex gnus-use-scoring
18742 If @code{nil}, Gnus will not check for score files, and will not, in
18743 general, do any score-related work.  This is @code{t} by default.
18744
18745 @item gnus-kill-killed
18746 @vindex gnus-kill-killed
18747 If this variable is @code{nil}, Gnus will never apply score files to
18748 articles that have already been through the kill process.  While this
18749 may save you lots of time, it also means that if you apply a kill file
18750 to a group, and then change the kill file and want to run it over you
18751 group again to kill more articles, it won't work.  You have to set this
18752 variable to @code{t} to do that.  (It is @code{t} by default.)
18753
18754 @item gnus-kill-files-directory
18755 @vindex gnus-kill-files-directory
18756 All kill and score files will be stored in this directory, which is
18757 initialized from the @env{SAVEDIR} environment variable by default.
18758 This is @file{~/News/} by default.
18759
18760 @item gnus-score-file-suffix
18761 @vindex gnus-score-file-suffix
18762 Suffix to add to the group name to arrive at the score file name
18763 (@file{SCORE} by default.)
18764
18765 @item gnus-score-uncacheable-files
18766 @vindex gnus-score-uncacheable-files
18767 @cindex score cache
18768 All score files are normally cached to avoid excessive re-loading of
18769 score files.  However, if this might make your Emacs grow big and
18770 bloated, so this regexp can be used to weed out score files unlikely
18771 to be needed again.  It would be a bad idea to deny caching of
18772 @file{all.SCORE}, while it might be a good idea to not cache
18773 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
18774 variable is @samp{ADAPT$} by default, so no adaptive score files will
18775 be cached.
18776
18777 @item gnus-save-score
18778 @vindex gnus-save-score
18779 If you have really complicated score files, and do lots of batch
18780 scoring, then you might set this variable to @code{t}.  This will make
18781 Gnus save the scores into the @file{.newsrc.eld} file.
18782
18783 If you do not set this to @code{t}, then manual scores (like those set
18784 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
18785 across group visits.
18786
18787 @item gnus-score-interactive-default-score
18788 @vindex gnus-score-interactive-default-score
18789 Score used by all the interactive raise/lower commands to raise/lower
18790 score with.  Default is 1000, which may seem excessive, but this is to
18791 ensure that the adaptive scoring scheme gets enough room to play with.
18792 We don't want the small changes from the adaptive scoring to overwrite
18793 manually entered data.
18794
18795 @item gnus-summary-default-score
18796 @vindex gnus-summary-default-score
18797 Default score of an article, which is 0 by default.
18798
18799 @item gnus-summary-expunge-below
18800 @vindex gnus-summary-expunge-below
18801 Don't display the summary lines of articles that have scores lower than
18802 this variable.  This is @code{nil} by default, which means that no
18803 articles will be hidden.  This variable is local to the summary buffers,
18804 and has to be set from @code{gnus-summary-mode-hook}.
18805
18806 @item gnus-score-over-mark
18807 @vindex gnus-score-over-mark
18808 Mark (in the third column) used for articles with a score over the
18809 default.  Default is @samp{+}.
18810
18811 @item gnus-score-below-mark
18812 @vindex gnus-score-below-mark
18813 Mark (in the third column) used for articles with a score below the
18814 default.  Default is @samp{-}.
18815
18816 @item gnus-score-find-score-files-function
18817 @vindex gnus-score-find-score-files-function
18818 Function used to find score files for the current group.  This function
18819 is called with the name of the group as the argument.
18820
18821 Predefined functions available are:
18822 @table @code
18823
18824 @item gnus-score-find-single
18825 @findex gnus-score-find-single
18826 Only apply the group's own score file.
18827
18828 @item gnus-score-find-bnews
18829 @findex gnus-score-find-bnews
18830 Apply all score files that match, using bnews syntax.  This is the
18831 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
18832 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
18833 @file{gnu.all.SCORE} would all apply.  In short, the instances of
18834 @samp{all} in the score file names are translated into @samp{.*}, and
18835 then a regexp match is done.
18836
18837 This means that if you have some score entries that you want to apply to
18838 all groups, then you put those entries in the @file{all.SCORE} file.
18839
18840 The score files are applied in a semi-random order, although Gnus will
18841 try to apply the more general score files before the more specific score
18842 files.  It does this by looking at the number of elements in the score
18843 file names---discarding the @samp{all} elements.
18844
18845 @item gnus-score-find-hierarchical
18846 @findex gnus-score-find-hierarchical
18847 Apply all score files from all the parent groups.  This means that you
18848 can't have score files like @file{all.SCORE}, but you can have
18849 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
18850 server.
18851
18852 @end table
18853 This variable can also be a list of functions.  In that case, all
18854 these functions will be called with the group name as argument, and
18855 all the returned lists of score files will be applied.  These
18856 functions can also return lists of lists of score alists directly.  In
18857 that case, the functions that return these non-file score alists
18858 should probably be placed before the ``real'' score file functions, to
18859 ensure that the last score file returned is the local score file.
18860 Phu.
18861
18862 For example, to do hierarchical scoring but use a non-server-specific
18863 overall score file, you could use the value
18864 @example
18865 (list (lambda (group) ("all.SCORE"))
18866       'gnus-score-find-hierarchical)
18867 @end example
18868
18869 @item gnus-score-expiry-days
18870 @vindex gnus-score-expiry-days
18871 This variable says how many days should pass before an unused score file
18872 entry is expired.  If this variable is @code{nil}, no score file entries
18873 are expired.  It's 7 by default.
18874
18875 @item gnus-update-score-entry-dates
18876 @vindex gnus-update-score-entry-dates
18877 If this variable is non-@code{nil}, temporary score entries that have
18878 been triggered (matched) will have their dates updated.  (This is how Gnus
18879 controls expiry---all non-matched-entries will become too old while
18880 matched entries will stay fresh and young.)  However, if you set this
18881 variable to @code{nil}, even matched entries will grow old and will
18882 have to face that oh-so grim reaper.
18883
18884 @item gnus-score-after-write-file-function
18885 @vindex gnus-score-after-write-file-function
18886 Function called with the name of the score file just written.
18887
18888 @item gnus-score-thread-simplify
18889 @vindex gnus-score-thread-simplify
18890 If this variable is non-@code{nil}, article subjects will be
18891 simplified for subject scoring purposes in the same manner as with
18892 threading---according to the current value of
18893 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
18894 @code{substring} or @code{exact} matching, the match will also be
18895 simplified in this manner.
18896
18897 @end table
18898
18899
18900 @node Score File Format
18901 @section Score File Format
18902 @cindex score file format
18903
18904 A score file is an @code{emacs-lisp} file that normally contains just a
18905 single form.  Casual users are not expected to edit these files;
18906 everything can be changed from the summary buffer.
18907
18908 Anyway, if you'd like to dig into it yourself, here's an example:
18909
18910 @lisp
18911 (("from"
18912   ("Lars Ingebrigtsen" -10000)
18913   ("Per Abrahamsen")
18914   ("larsi\\|lmi" -50000 nil R))
18915  ("subject"
18916   ("Ding is Badd" nil 728373))
18917  ("xref"
18918   ("alt.politics" -1000 728372 s))
18919  ("lines"
18920   (2 -100 nil <))
18921  (mark 0)
18922  (expunge -1000)
18923  (mark-and-expunge -10)
18924  (read-only nil)
18925  (orphan -10)
18926  (adapt t)
18927  (files "/hom/larsi/News/gnu.SCORE")
18928  (exclude-files "all.SCORE")
18929  (local (gnus-newsgroup-auto-expire t)
18930         (gnus-summary-make-false-root empty))
18931  (eval (ding)))
18932 @end lisp
18933
18934 This example demonstrates most score file elements.  For a different
18935 approach, see @pxref{Advanced Scoring}.
18936
18937 Even though this looks much like Lisp code, nothing here is actually
18938 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
18939 has to be valid syntactically, if not semantically.
18940
18941 Six keys are supported by this alist:
18942
18943 @table @code
18944
18945 @item STRING
18946 If the key is a string, it is the name of the header to perform the
18947 match on.  Scoring can only be performed on these eight headers:
18948 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
18949 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
18950 these headers, there are three strings to tell Gnus to fetch the entire
18951 article and do the match on larger parts of the article: @code{Body}
18952 will perform the match on the body of the article, @code{Head} will
18953 perform the match on the head of the article, and @code{All} will
18954 perform the match on the entire article.  Note that using any of these
18955 last three keys will slow down group entry @emph{considerably}.  The
18956 final ``header'' you can score on is @code{Followup}.  These score
18957 entries will result in new score entries being added for all follow-ups
18958 to articles that matches these score entries.
18959
18960 Following this key is an arbitrary number of score entries, where each
18961 score entry has one to four elements.
18962 @enumerate
18963
18964 @item
18965 The first element is the @dfn{match element}.  On most headers this will
18966 be a string, but on the Lines and Chars headers, this must be an
18967 integer.
18968
18969 @item
18970 If the second element is present, it should be a number---the @dfn{score
18971 element}.  This number should be an integer in the neginf to posinf
18972 interval.  This number is added to the score of the article if the match
18973 is successful.  If this element is not present, the
18974 @code{gnus-score-interactive-default-score} number will be used
18975 instead.  This is 1000 by default.
18976
18977 @item
18978 If the third element is present, it should be a number---the @dfn{date
18979 element}.  This date says when the last time this score entry matched,
18980 which provides a mechanism for expiring the score entries.  It this
18981 element is not present, the score entry is permanent.  The date is
18982 represented by the number of days since December 31, 1 BCE.
18983
18984 @item
18985 If the fourth element is present, it should be a symbol---the @dfn{type
18986 element}.  This element specifies what function should be used to see
18987 whether this score entry matches the article.  What match types that can
18988 be used depends on what header you wish to perform the match on.
18989 @table @dfn
18990
18991 @item From, Subject, References, Xref, Message-ID
18992 For most header types, there are the @code{r} and @code{R} (regexp), as
18993 well as @code{s} and @code{S} (substring) types, and @code{e} and
18994 @code{E} (exact match), and @code{w} (word match) types.  If this
18995 element is not present, Gnus will assume that substring matching should
18996 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
18997 that the matches will be done in a case-sensitive manner.  All these
18998 one-letter types are really just abbreviations for the @code{regexp},
18999 @code{string}, @code{exact}, and @code{word} types, which you can use
19000 instead, if you feel like.
19001
19002 @item Extra
19003 Just as for the standard string overview headers, if you are using
19004 gnus-extra-headers, you can score on these headers' values.  In this
19005 case, there is a 5th element in the score entry, being the name of the
19006 header to be scored.  The following entry is useful in your
19007 @file{all.SCORE} file in case of spam attacks from a single origin host,
19008 if your @acronym{NNTP} server tracks NNTP-Posting-Host in overviews:
19009
19010 @lisp
19011 ("111.222.333.444" -1000 nil s "NNTP-Posting-Host")
19012 @end lisp
19013
19014 @item Lines, Chars
19015 These two headers use different match types: @code{<}, @code{>},
19016 @code{=}, @code{>=} and @code{<=}.
19017
19018 These predicates are true if
19019
19020 @example
19021 (PREDICATE HEADER MATCH)
19022 @end example
19023
19024 evaluates to non-@code{nil}.  For instance, the advanced match
19025 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
19026 following form:
19027
19028 @lisp
19029 (< header-value 4)
19030 @end lisp
19031
19032 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
19033 the match, we get the score added if the article has less than 4 lines.
19034 (It's easy to get confused and think it's the other way around.  But
19035 it's not.  I think.)
19036
19037 When matching on @code{Lines}, be careful because some back ends (like
19038 @code{nndir}) do not generate @code{Lines} header, so every article ends
19039 up being marked as having 0 lines.  This can lead to strange results if
19040 you happen to lower score of the articles with few lines.
19041
19042 @item Date
19043 For the Date header we have three kinda silly match types:
19044 @code{before}, @code{at} and @code{after}.  I can't really imagine this
19045 ever being useful, but, like, it would feel kinda silly not to provide
19046 this function.  Just in case.  You never know.  Better safe than sorry.
19047 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
19048 sex on a first date.  (I have been told that at least one person, and I
19049 quote, ``found this function indispensable'', however.)
19050
19051 @cindex ISO8601
19052 @cindex date
19053 A more useful match type is @code{regexp}.  With it, you can match the
19054 date string using a regular expression.  The date is normalized to
19055 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
19056 you want to match all articles that have been posted on April 1st in
19057 every year, you could use @samp{....0401.........} as a match string,
19058 for instance.  (Note that the date is kept in its original time zone, so
19059 this will match articles that were posted when it was April 1st where
19060 the article was posted from.  Time zones are such wholesome fun for the
19061 whole family, eh?)
19062
19063 @item Head, Body, All
19064 These three match keys use the same match types as the @code{From} (etc)
19065 header uses.
19066
19067 @item Followup
19068 This match key is somewhat special, in that it will match the
19069 @code{From} header, and affect the score of not only the matching
19070 articles, but also all followups to the matching articles.  This allows
19071 you e.g. increase the score of followups to your own articles, or
19072 decrease the score of followups to the articles of some known
19073 trouble-maker.  Uses the same match types as the @code{From} header
19074 uses.  (Using this match key will lead to creation of @file{ADAPT}
19075 files.)
19076
19077 @item Thread
19078 This match key works along the same lines as the @code{Followup} match
19079 key.  If you say that you want to score on a (sub-)thread started by an
19080 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
19081 match.  This will add a new @samp{thread} match for each article that
19082 has @var{x} in its @code{References} header.  (These new @samp{thread}
19083 matches will use the @code{Message-ID}s of these matching articles.)
19084 This will ensure that you can raise/lower the score of an entire thread,
19085 even though some articles in the thread may not have complete
19086 @code{References} headers.  Note that using this may lead to
19087 undeterministic scores of the articles in the thread.  (Using this match
19088 key will lead to creation of @file{ADAPT} files.)
19089 @end table
19090 @end enumerate
19091
19092 @cindex score file atoms
19093 @item mark
19094 The value of this entry should be a number.  Any articles with a score
19095 lower than this number will be marked as read.
19096
19097 @item expunge
19098 The value of this entry should be a number.  Any articles with a score
19099 lower than this number will be removed from the summary buffer.
19100
19101 @item mark-and-expunge
19102 The value of this entry should be a number.  Any articles with a score
19103 lower than this number will be marked as read and removed from the
19104 summary buffer.
19105
19106 @item thread-mark-and-expunge
19107 The value of this entry should be a number.  All articles that belong to
19108 a thread that has a total score below this number will be marked as read
19109 and removed from the summary buffer.  @code{gnus-thread-score-function}
19110 says how to compute the total score for a thread.
19111
19112 @item files
19113 The value of this entry should be any number of file names.  These files
19114 are assumed to be score files as well, and will be loaded the same way
19115 this one was.
19116
19117 @item exclude-files
19118 The clue of this entry should be any number of files.  These files will
19119 not be loaded, even though they would normally be so, for some reason or
19120 other.
19121
19122 @item eval
19123 The value of this entry will be @code{eval}el.  This element will be
19124 ignored when handling global score files.
19125
19126 @item read-only
19127 Read-only score files will not be updated or saved.  Global score files
19128 should feature this atom (@pxref{Global Score Files}).  (Note:
19129 @dfn{Global} here really means @dfn{global}; not your personal
19130 apply-to-all-groups score files.)
19131
19132 @item orphan
19133 The value of this entry should be a number.  Articles that do not have
19134 parents will get this number added to their scores.  Imagine you follow
19135 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
19136 will only follow a few of the threads, also want to see any new threads.
19137
19138 You can do this with the following two score file entries:
19139
19140 @example
19141         (orphan -500)
19142         (mark-and-expunge -100)
19143 @end example
19144
19145 When you enter the group the first time, you will only see the new
19146 threads.  You then raise the score of the threads that you find
19147 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
19148 rest.  Next time you enter the group, you will see new articles in the
19149 interesting threads, plus any new threads.
19150
19151 I.e.---the orphan score atom is for high-volume groups where a few
19152 interesting threads which can't be found automatically by ordinary
19153 scoring rules exist.
19154
19155 @item adapt
19156 This entry controls the adaptive scoring.  If it is @code{t}, the
19157 default adaptive scoring rules will be used.  If it is @code{ignore}, no
19158 adaptive scoring will be performed on this group.  If it is a list, this
19159 list will be used as the adaptive scoring rules.  If it isn't present,
19160 or is something other than @code{t} or @code{ignore}, the default
19161 adaptive scoring rules will be used.  If you want to use adaptive
19162 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
19163 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
19164 not want adaptive scoring.  If you only want adaptive scoring in a few
19165 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
19166 insert @code{(adapt t)} in the score files of the groups where you want
19167 it.
19168
19169 @item adapt-file
19170 All adaptive score entries will go to the file named by this entry.  It
19171 will also be applied when entering the group.  This atom might be handy
19172 if you want to adapt on several groups at once, using the same adaptive
19173 file for a number of groups.
19174
19175 @item local
19176 @cindex local variables
19177 The value of this entry should be a list of @code{(@var{var}
19178 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
19179 current summary buffer, and set to the value specified.  This is a
19180 convenient, if somewhat strange, way of setting variables in some
19181 groups if you don't like hooks much.  Note that the @var{value} won't
19182 be evaluated.
19183 @end table
19184
19185
19186 @node Score File Editing
19187 @section Score File Editing
19188
19189 You normally enter all scoring commands from the summary buffer, but you
19190 might feel the urge to edit them by hand as well, so we've supplied you
19191 with a mode for that.
19192
19193 It's simply a slightly customized @code{emacs-lisp} mode, with these
19194 additional commands:
19195
19196 @table @kbd
19197
19198 @item C-c C-c
19199 @kindex C-c C-c (Score)
19200 @findex gnus-score-edit-done
19201 Save the changes you have made and return to the summary buffer
19202 (@code{gnus-score-edit-done}).
19203
19204 @item C-c C-d
19205 @kindex C-c C-d (Score)
19206 @findex gnus-score-edit-insert-date
19207 Insert the current date in numerical format
19208 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
19209 you were wondering.
19210
19211 @item C-c C-p
19212 @kindex C-c C-p (Score)
19213 @findex gnus-score-pretty-print
19214 The adaptive score files are saved in an unformatted fashion.  If you
19215 intend to read one of these files, you want to @dfn{pretty print} it
19216 first.  This command (@code{gnus-score-pretty-print}) does that for
19217 you.
19218
19219 @end table
19220
19221 Type @kbd{M-x gnus-score-mode} to use this mode.
19222
19223 @vindex gnus-score-mode-hook
19224 @code{gnus-score-menu-hook} is run in score mode buffers.
19225
19226 In the summary buffer you can use commands like @kbd{V f} and @kbd{V
19227 e} to begin editing score files.
19228
19229
19230 @node Adaptive Scoring
19231 @section Adaptive Scoring
19232 @cindex adaptive scoring
19233
19234 If all this scoring is getting you down, Gnus has a way of making it all
19235 happen automatically---as if by magic.  Or rather, as if by artificial
19236 stupidity, to be precise.
19237
19238 @vindex gnus-use-adaptive-scoring
19239 When you read an article, or mark an article as read, or kill an
19240 article, you leave marks behind.  On exit from the group, Gnus can sniff
19241 these marks and add score elements depending on what marks it finds.
19242 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
19243 @code{t} or @code{(line)}.  If you want score adaptively on separate
19244 words appearing in the subjects, you should set this variable to
19245 @code{(word)}.  If you want to use both adaptive methods, set this
19246 variable to @code{(word line)}.
19247
19248 @vindex gnus-default-adaptive-score-alist
19249 To give you complete control over the scoring process, you can customize
19250 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
19251 might look something like this:
19252
19253 @lisp
19254 (setq gnus-default-adaptive-score-alist
19255   '((gnus-unread-mark)
19256     (gnus-ticked-mark (from 4))
19257     (gnus-dormant-mark (from 5))
19258     (gnus-del-mark (from -4) (subject -1))
19259     (gnus-read-mark (from 4) (subject 2))
19260     (gnus-expirable-mark (from -1) (subject -1))
19261     (gnus-killed-mark (from -1) (subject -3))
19262     (gnus-kill-file-mark)
19263     (gnus-ancient-mark)
19264     (gnus-low-score-mark)
19265     (gnus-catchup-mark (from -1) (subject -1))))
19266 @end lisp
19267
19268 As you see, each element in this alist has a mark as a key (either a
19269 variable name or a ``real'' mark---a character).  Following this key is
19270 a arbitrary number of header/score pairs.  If there are no header/score
19271 pairs following the key, no adaptive scoring will be done on articles
19272 that have that key as the article mark.  For instance, articles with
19273 @code{gnus-unread-mark} in the example above will not get adaptive score
19274 entries.
19275
19276 Each article can have only one mark, so just a single of these rules
19277 will be applied to each article.
19278
19279 To take @code{gnus-del-mark} as an example---this alist says that all
19280 articles that have that mark (i.e., are marked with @samp{e}) will have a
19281 score entry added to lower based on the @code{From} header by -4, and
19282 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
19283
19284 If you have marked 10 articles with the same subject with
19285 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
19286 That means that that subject will get a score of ten times -1, which
19287 should be, unless I'm much mistaken, -10.
19288
19289 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
19290 the read articles will be marked with the @samp{E} mark.  This'll
19291 probably make adaptive scoring slightly impossible, so auto-expiring and
19292 adaptive scoring doesn't really mix very well.
19293
19294 The headers you can score on are @code{from}, @code{subject},
19295 @code{message-id}, @code{references}, @code{xref}, @code{lines},
19296 @code{chars} and @code{date}.  In addition, you can score on
19297 @code{followup}, which will create an adaptive score entry that matches
19298 on the @code{References} header using the @code{Message-ID} of the
19299 current article, thereby matching the following thread.
19300
19301 If you use this scheme, you should set the score file atom @code{mark}
19302 to something small---like -300, perhaps, to avoid having small random
19303 changes result in articles getting marked as read.
19304
19305 After using adaptive scoring for a week or so, Gnus should start to
19306 become properly trained and enhance the authors you like best, and kill
19307 the authors you like least, without you having to say so explicitly.
19308
19309 You can control what groups the adaptive scoring is to be performed on
19310 by using the score files (@pxref{Score File Format}).  This will also
19311 let you use different rules in different groups.
19312
19313 @vindex gnus-adaptive-file-suffix
19314 The adaptive score entries will be put into a file where the name is the
19315 group name with @code{gnus-adaptive-file-suffix} appended.  The default
19316 is @file{ADAPT}.
19317
19318 @vindex gnus-score-exact-adapt-limit
19319 When doing adaptive scoring, substring or fuzzy matching would probably
19320 give you the best results in most cases.  However, if the header one
19321 matches is short, the possibility for false positives is great, so if
19322 the length of the match is less than
19323 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
19324 this variable is @code{nil}, exact matching will always be used to avoid
19325 this problem.
19326
19327 @vindex gnus-default-adaptive-word-score-alist
19328 As mentioned above, you can adapt either on individual words or entire
19329 headers.  If you adapt on words, the
19330 @code{gnus-default-adaptive-word-score-alist} variable says what score
19331 each instance of a word should add given a mark.
19332
19333 @lisp
19334 (setq gnus-default-adaptive-word-score-alist
19335       `((,gnus-read-mark . 30)
19336         (,gnus-catchup-mark . -10)
19337         (,gnus-killed-mark . -20)
19338         (,gnus-del-mark . -15)))
19339 @end lisp
19340
19341 This is the default value.  If you have adaption on words enabled, every
19342 word that appears in subjects of articles marked with
19343 @code{gnus-read-mark} will result in a score rule that increase the
19344 score with 30 points.
19345
19346 @vindex gnus-default-ignored-adaptive-words
19347 @vindex gnus-ignored-adaptive-words
19348 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
19349 will be ignored.  If you wish to add more words to be ignored, use the
19350 @code{gnus-ignored-adaptive-words} list instead.
19351
19352 @vindex gnus-adaptive-word-length-limit
19353 Some may feel that short words shouldn't count when doing adaptive
19354 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
19355 an integer.  Words shorter than this number will be ignored.  This
19356 variable defaults to @code{nil}.
19357
19358 @vindex gnus-adaptive-word-syntax-table
19359 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
19360 syntax table in effect.  It is similar to the standard syntax table, but
19361 it considers numbers to be non-word-constituent characters.
19362
19363 @vindex gnus-adaptive-word-minimum
19364 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
19365 word scoring process will never bring down the score of an article to
19366 below this number.  The default is @code{nil}.
19367
19368 @vindex gnus-adaptive-word-no-group-words
19369 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
19370 won't adaptively word score any of the words in the group name.  Useful
19371 for groups like @samp{comp.editors.emacs}, where most of the subject
19372 lines contain the word @samp{emacs}.
19373
19374 After using this scheme for a while, it might be nice to write a
19375 @code{gnus-psychoanalyze-user} command to go through the rules and see
19376 what words you like and what words you don't like.  Or perhaps not.
19377
19378 Note that the adaptive word scoring thing is highly experimental and is
19379 likely to change in the future.  Initial impressions seem to indicate
19380 that it's totally useless as it stands.  Some more work (involving more
19381 rigorous statistical methods) will have to be done to make this useful.
19382
19383
19384 @node Home Score File
19385 @section Home Score File
19386
19387 The score file where new score file entries will go is called the
19388 @dfn{home score file}.  This is normally (and by default) the score file
19389 for the group itself.  For instance, the home score file for
19390 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
19391
19392 However, this may not be what you want.  It is often convenient to share
19393 a common home score file among many groups---all @samp{emacs} groups
19394 could perhaps use the same home score file.
19395
19396 @vindex gnus-home-score-file
19397 The variable that controls this is @code{gnus-home-score-file}.  It can
19398 be:
19399
19400 @enumerate
19401 @item
19402 A string.  Then this file will be used as the home score file for all
19403 groups.
19404
19405 @item
19406 A function.  The result of this function will be used as the home score
19407 file.  The function will be called with the name of the group as the
19408 parameter.
19409
19410 @item
19411 A list.  The elements in this list can be:
19412
19413 @enumerate
19414 @item
19415 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
19416 group name, the @var{file-name} will be used as the home score file.
19417
19418 @item
19419 A function.  If the function returns non-@code{nil}, the result will
19420 be used as the home score file.
19421
19422 @item
19423 A string.  Use the string as the home score file.
19424 @end enumerate
19425
19426 The list will be traversed from the beginning towards the end looking
19427 for matches.
19428
19429 @end enumerate
19430
19431 So, if you want to use just a single score file, you could say:
19432
19433 @lisp
19434 (setq gnus-home-score-file
19435       "my-total-score-file.SCORE")
19436 @end lisp
19437
19438 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
19439 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
19440
19441 @findex gnus-hierarchial-home-score-file
19442 @lisp
19443 (setq gnus-home-score-file
19444       'gnus-hierarchial-home-score-file)
19445 @end lisp
19446
19447 This is a ready-made function provided for your convenience.
19448 Other functions include
19449
19450 @table @code
19451 @item gnus-current-home-score-file
19452 @findex gnus-current-home-score-file
19453 Return the ``current'' regular score file.  This will make scoring
19454 commands add entry to the ``innermost'' matching score file.
19455
19456 @end table
19457
19458 If you want to have one score file for the @samp{emacs} groups and
19459 another for the @samp{comp} groups, while letting all other groups use
19460 their own home score files:
19461
19462 @lisp
19463 (setq gnus-home-score-file
19464       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
19465       '(("\\.emacs" "emacs.SCORE")
19466         ;; @r{All the comp groups in one score file}
19467         ("^comp" "comp.SCORE")))
19468 @end lisp
19469
19470 @vindex gnus-home-adapt-file
19471 @code{gnus-home-adapt-file} works exactly the same way as
19472 @code{gnus-home-score-file}, but says what the home adaptive score file
19473 is instead.  All new adaptive file entries will go into the file
19474 specified by this variable, and the same syntax is allowed.
19475
19476 In addition to using @code{gnus-home-score-file} and
19477 @code{gnus-home-adapt-file}, you can also use group parameters
19478 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
19479 Parameters}) to achieve much the same.  Group and topic parameters take
19480 precedence over this variable.
19481
19482
19483 @node Followups To Yourself
19484 @section Followups To Yourself
19485
19486 Gnus offers two commands for picking out the @code{Message-ID} header in
19487 the current buffer.  Gnus will then add a score rule that scores using
19488 this @code{Message-ID} on the @code{References} header of other
19489 articles.  This will, in effect, increase the score of all articles that
19490 respond to the article in the current buffer.  Quite useful if you want
19491 to easily note when people answer what you've said.
19492
19493 @table @code
19494
19495 @item gnus-score-followup-article
19496 @findex gnus-score-followup-article
19497 This will add a score to articles that directly follow up your own
19498 article.
19499
19500 @item gnus-score-followup-thread
19501 @findex gnus-score-followup-thread
19502 This will add a score to all articles that appear in a thread ``below''
19503 your own article.
19504 @end table
19505
19506 @vindex message-sent-hook
19507 These two functions are both primarily meant to be used in hooks like
19508 @code{message-sent-hook}, like this:
19509 @lisp
19510 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
19511 @end lisp
19512
19513
19514 If you look closely at your own @code{Message-ID}, you'll notice that
19515 the first two or three characters are always the same.  Here's two of
19516 mine:
19517
19518 @example
19519 <x6u3u47icf.fsf@@eyesore.no>
19520 <x6sp9o7ibw.fsf@@eyesore.no>
19521 @end example
19522
19523 So ``my'' ident on this machine is @samp{x6}.  This can be
19524 exploited---the following rule will raise the score on all followups to
19525 myself:
19526
19527 @lisp
19528 ("references"
19529  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
19530   1000 nil r))
19531 @end lisp
19532
19533 Whether it's the first two or first three characters that are ``yours''
19534 is system-dependent.
19535
19536
19537 @node Scoring On Other Headers
19538 @section Scoring On Other Headers
19539 @cindex scoring on other headers
19540
19541 Gnus is quite fast when scoring the ``traditional''
19542 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
19543 other headers requires writing a @code{head} scoring rule, which means
19544 that Gnus has to request every single article from the back end to find
19545 matches.  This takes a long time in big groups.
19546
19547 Now, there's not much you can do about this for news groups, but for
19548 mail groups, you have greater control.  In the @pxref{To From
19549 Newsgroups} section of the manual, it's explained in greater detail what
19550 this mechanism does, but here's a cookbook example for @code{nnml} on
19551 how to allow scoring on the @samp{To} and @samp{Cc} headers.
19552
19553 Put the following in your @file{~/.gnus.el} file.
19554
19555 @lisp
19556 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
19557       nnmail-extra-headers gnus-extra-headers)
19558 @end lisp
19559
19560 Restart Gnus and rebuild your @code{nnml} overview files with the
19561 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
19562 time if you have much mail.
19563
19564 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
19565 so: @kbd{I e s p To RET <your name> RET}.
19566
19567 See?  Simple.
19568
19569
19570 @node Scoring Tips
19571 @section Scoring Tips
19572 @cindex scoring tips
19573
19574 @table @dfn
19575
19576 @item Crossposts
19577 @cindex crossposts
19578 @cindex scoring crossposts
19579 If you want to lower the score of crossposts, the line to match on is
19580 the @code{Xref} header.
19581 @lisp
19582 ("xref" (" talk.politics.misc:" -1000))
19583 @end lisp
19584
19585 @item Multiple crossposts
19586 If you want to lower the score of articles that have been crossposted to
19587 more than, say, 3 groups:
19588 @lisp
19589 ("xref"
19590   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
19591    -1000 nil r))
19592 @end lisp
19593
19594 @item Matching on the body
19595 This is generally not a very good idea---it takes a very long time.
19596 Gnus actually has to fetch each individual article from the server.  But
19597 you might want to anyway, I guess.  Even though there are three match
19598 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
19599 and stick with it in each score file.  If you use any two, each article
19600 will be fetched @emph{twice}.  If you want to match a bit on the
19601 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
19602 the matches.
19603
19604 @item Marking as read
19605 You will probably want to mark articles that have scores below a certain
19606 number as read.  This is most easily achieved by putting the following
19607 in your @file{all.SCORE} file:
19608 @lisp
19609 ((mark -100))
19610 @end lisp
19611 You may also consider doing something similar with @code{expunge}.
19612
19613 @item Negated character classes
19614 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
19615 That will match newlines, which might lead to, well, The Unknown.  Say
19616 @code{[^abcd\n]*} instead.
19617 @end table
19618
19619
19620 @node Reverse Scoring
19621 @section Reverse Scoring
19622 @cindex reverse scoring
19623
19624 If you want to keep just articles that have @samp{Sex with Emacs} in the
19625 subject header, and expunge all other articles, you could put something
19626 like this in your score file:
19627
19628 @lisp
19629 (("subject"
19630   ("Sex with Emacs" 2))
19631  (mark 1)
19632  (expunge 1))
19633 @end lisp
19634
19635 So, you raise all articles that match @samp{Sex with Emacs} and mark the
19636 rest as read, and expunge them to boot.
19637
19638
19639 @node Global Score Files
19640 @section Global Score Files
19641 @cindex global score files
19642
19643 Sure, other newsreaders have ``global kill files''.  These are usually
19644 nothing more than a single kill file that applies to all groups, stored
19645 in the user's home directory.  Bah!  Puny, weak newsreaders!
19646
19647 What I'm talking about here are Global Score Files.  Score files from
19648 all over the world, from users everywhere, uniting all nations in one
19649 big, happy score file union!  Ange-score!  New and untested!
19650
19651 @vindex gnus-global-score-files
19652 All you have to do to use other people's score files is to set the
19653 @code{gnus-global-score-files} variable.  One entry for each score file,
19654 or each score file directory.  Gnus will decide by itself what score
19655 files are applicable to which group.
19656
19657 To use the score file
19658 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
19659 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
19660 say this:
19661
19662 @lisp
19663 (setq gnus-global-score-files
19664       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
19665         "/ftp@@ftp.some-where:/pub/score/"))
19666 @end lisp
19667
19668 @findex gnus-score-search-global-directories
19669 @noindent
19670 Simple, eh?  Directory names must end with a @samp{/}.  These
19671 directories are typically scanned only once during each Gnus session.
19672 If you feel the need to manually re-scan the remote directories, you can
19673 use the @code{gnus-score-search-global-directories} command.
19674
19675 Note that, at present, using this option will slow down group entry
19676 somewhat.  (That is---a lot.)
19677
19678 If you want to start maintaining score files for other people to use,
19679 just put your score file up for anonymous ftp and announce it to the
19680 world.  Become a retro-moderator!  Participate in the retro-moderator
19681 wars sure to ensue, where retro-moderators battle it out for the
19682 sympathy of the people, luring them to use their score files on false
19683 premises!  Yay!  The net is saved!
19684
19685 Here are some tips for the would-be retro-moderator, off the top of my
19686 head:
19687
19688 @itemize @bullet
19689
19690 @item
19691 Articles heavily crossposted are probably junk.
19692 @item
19693 To lower a single inappropriate article, lower by @code{Message-ID}.
19694 @item
19695 Particularly brilliant authors can be raised on a permanent basis.
19696 @item
19697 Authors that repeatedly post off-charter for the group can safely be
19698 lowered out of existence.
19699 @item
19700 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
19701 articles completely.
19702
19703 @item
19704 Use expiring score entries to keep the size of the file down.  You
19705 should probably have a long expiry period, though, as some sites keep
19706 old articles for a long time.
19707 @end itemize
19708
19709 @dots{} I wonder whether other newsreaders will support global score files
19710 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
19711 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
19712 holding our breath yet?
19713
19714
19715 @node Kill Files
19716 @section Kill Files
19717 @cindex kill files
19718
19719 Gnus still supports those pesky old kill files.  In fact, the kill file
19720 entries can now be expiring, which is something I wrote before Daniel
19721 Quinlan thought of doing score files, so I've left the code in there.
19722
19723 In short, kill processing is a lot slower (and I do mean @emph{a lot})
19724 than score processing, so it might be a good idea to rewrite your kill
19725 files into score files.
19726
19727 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
19728 forms into this file, which means that you can use kill files as some
19729 sort of primitive hook function to be run on group entry, even though
19730 that isn't a very good idea.
19731
19732 Normal kill files look like this:
19733
19734 @lisp
19735 (gnus-kill "From" "Lars Ingebrigtsen")
19736 (gnus-kill "Subject" "ding")
19737 (gnus-expunge "X")
19738 @end lisp
19739
19740 This will mark every article written by me as read, and remove the
19741 marked articles from the summary buffer.  Very useful, you'll agree.
19742
19743 Other programs use a totally different kill file syntax.  If Gnus
19744 encounters what looks like a @code{rn} kill file, it will take a stab at
19745 interpreting it.
19746
19747 Two summary functions for editing a @sc{gnus} kill file:
19748
19749 @table @kbd
19750
19751 @item M-k
19752 @kindex M-k (Summary)
19753 @findex gnus-summary-edit-local-kill
19754 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
19755
19756 @item M-K
19757 @kindex M-K (Summary)
19758 @findex gnus-summary-edit-global-kill
19759 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
19760 @end table
19761
19762 Two group mode functions for editing the kill files:
19763
19764 @table @kbd
19765
19766 @item M-k
19767 @kindex M-k (Group)
19768 @findex gnus-group-edit-local-kill
19769 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
19770
19771 @item M-K
19772 @kindex M-K (Group)
19773 @findex gnus-group-edit-global-kill
19774 Edit the general kill file (@code{gnus-group-edit-global-kill}).
19775 @end table
19776
19777 Kill file variables:
19778
19779 @table @code
19780 @item gnus-kill-file-name
19781 @vindex gnus-kill-file-name
19782 A kill file for the group @samp{soc.motss} is normally called
19783 @file{soc.motss.KILL}.  The suffix appended to the group name to get
19784 this file name is detailed by the @code{gnus-kill-file-name} variable.
19785 The ``global'' kill file (not in the score file sense of ``global'', of
19786 course) is just called @file{KILL}.
19787
19788 @vindex gnus-kill-save-kill-file
19789 @item gnus-kill-save-kill-file
19790 If this variable is non-@code{nil}, Gnus will save the
19791 kill file after processing, which is necessary if you use expiring
19792 kills.
19793
19794 @item gnus-apply-kill-hook
19795 @vindex gnus-apply-kill-hook
19796 @findex gnus-apply-kill-file-unless-scored
19797 @findex gnus-apply-kill-file
19798 A hook called to apply kill files to a group.  It is
19799 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
19800 kill file if you have a score file for the same group, you can set this
19801 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
19802 kill files to be processed, you should set this variable to @code{nil}.
19803
19804 @item gnus-kill-file-mode-hook
19805 @vindex gnus-kill-file-mode-hook
19806 A hook called in kill-file mode buffers.
19807
19808 @end table
19809
19810
19811 @node Converting Kill Files
19812 @section Converting Kill Files
19813 @cindex kill files
19814 @cindex converting kill files
19815
19816 If you have loads of old kill files, you may want to convert them into
19817 score files.  If they are ``regular'', you can use
19818 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
19819 by hand.
19820
19821 The kill to score conversion package isn't included in Gnus by default.
19822 You can fetch it from
19823 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
19824
19825 If your old kill files are very complex---if they contain more
19826 non-@code{gnus-kill} forms than not, you'll have to convert them by
19827 hand.  Or just let them be as they are.  Gnus will still use them as
19828 before.
19829
19830
19831 @node GroupLens
19832 @section GroupLens
19833 @cindex GroupLens
19834
19835 @uref{http://www.cs.umn.edu/Research/GroupLens/, GroupLens} is a
19836 collaborative filtering system that helps you work together with other
19837 people to find the quality news articles out of the huge volume of
19838 news articles generated every day.
19839
19840 To accomplish this the GroupLens system combines your opinions about
19841 articles you have already read with the opinions of others who have done
19842 likewise and gives you a personalized prediction for each unread news
19843 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
19844 rate articles, and finds other people that rate articles the same way.
19845 Once it has found some people you agree with it tells you, in the form
19846 of a prediction, what they thought of the article.  You can use this
19847 prediction to help you decide whether or not you want to read the
19848 article.
19849
19850 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
19851 so this section is mostly of historical interest.
19852
19853 @menu
19854 * Using GroupLens::             How to make Gnus use GroupLens.
19855 * Rating Articles::             Letting GroupLens know how you rate articles.
19856 * Displaying Predictions::      Displaying predictions given by GroupLens.
19857 * GroupLens Variables::         Customizing GroupLens.
19858 @end menu
19859
19860
19861 @node Using GroupLens
19862 @subsection Using GroupLens
19863
19864 To use GroupLens you must register a pseudonym with your local
19865 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html, Better Bit
19866 Bureau (BBB)} is the only better bit in town at the moment.
19867
19868 Once you have registered you'll need to set a couple of variables.
19869
19870 @table @code
19871
19872 @item gnus-use-grouplens
19873 @vindex gnus-use-grouplens
19874 Setting this variable to a non-@code{nil} value will make Gnus hook into
19875 all the relevant GroupLens functions.
19876
19877 @item grouplens-pseudonym
19878 @vindex grouplens-pseudonym
19879 This variable should be set to the pseudonym you got when registering
19880 with the Better Bit Bureau.
19881
19882 @item grouplens-newsgroups
19883 @vindex grouplens-newsgroups
19884 A list of groups that you want to get GroupLens predictions for.
19885
19886 @end table
19887
19888 That's the minimum of what you need to get up and running with GroupLens.
19889 Once you've registered, GroupLens will start giving you scores for
19890 articles based on the average of what other people think.  But, to get
19891 the real benefit of GroupLens you need to start rating articles
19892 yourself.  Then the scores GroupLens gives you will be personalized for
19893 you, based on how the people you usually agree with have already rated.
19894
19895
19896 @node Rating Articles
19897 @subsection Rating Articles
19898
19899 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
19900 Where 1 means something like this article is a waste of bandwidth and 5
19901 means that the article was really good.  The basic question to ask
19902 yourself is, ``on a scale from 1 to 5 would I like to see more articles
19903 like this one?''
19904
19905 There are four ways to enter a rating for an article in GroupLens.
19906
19907 @table @kbd
19908
19909 @item r
19910 @kindex r (GroupLens)
19911 @findex bbb-summary-rate-article
19912 This function will prompt you for a rating on a scale of one to five.
19913
19914 @item k
19915 @kindex k (GroupLens)
19916 @findex grouplens-score-thread
19917 This function will prompt you for a rating, and rate all the articles in
19918 the thread.  This is really useful for some of those long running giant
19919 threads in rec.humor.
19920
19921 @end table
19922
19923 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
19924 the score of the article you're reading.
19925
19926 @table @kbd
19927
19928 @item 1-5 n
19929 @kindex n (GroupLens)
19930 @findex grouplens-next-unread-article
19931 Rate the article and go to the next unread article.
19932
19933 @item 1-5 ,
19934 @kindex , (GroupLens)
19935 @findex grouplens-best-unread-article
19936 Rate the article and go to the next unread article with the highest score.
19937
19938 @end table
19939
19940 If you want to give the current article a score of 4 and then go to the
19941 next article, just type @kbd{4 n}.
19942
19943
19944 @node Displaying Predictions
19945 @subsection Displaying Predictions
19946
19947 GroupLens makes a prediction for you about how much you will like a
19948 news article.  The predictions from GroupLens are on a scale from 1 to
19949 5, where 1 is the worst and 5 is the best.  You can use the predictions
19950 from GroupLens in one of three ways controlled by the variable
19951 @code{gnus-grouplens-override-scoring}.
19952
19953 @vindex gnus-grouplens-override-scoring
19954 There are three ways to display predictions in grouplens.  You may
19955 choose to have the GroupLens scores contribute to, or override the
19956 regular gnus scoring mechanism.  override is the default; however, some
19957 people prefer to see the Gnus scores plus the grouplens scores.  To get
19958 the separate scoring behavior you need to set
19959 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
19960 GroupLens predictions combined with the grouplens scores set it to
19961 @code{'override} and to combine the scores set
19962 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
19963 the combine option you will also want to set the values for
19964 @code{grouplens-prediction-offset} and
19965 @code{grouplens-score-scale-factor}.
19966
19967 @vindex grouplens-prediction-display
19968 In either case, GroupLens gives you a few choices for how you would like
19969 to see your predictions displayed.  The display of predictions is
19970 controlled by the @code{grouplens-prediction-display} variable.
19971
19972 The following are valid values for that variable.
19973
19974 @table @code
19975 @item prediction-spot
19976 The higher the prediction, the further to the right an @samp{*} is
19977 displayed.
19978
19979 @item confidence-interval
19980 A numeric confidence interval.
19981
19982 @item prediction-bar
19983 The higher the prediction, the longer the bar.
19984
19985 @item confidence-bar
19986 Numerical confidence.
19987
19988 @item confidence-spot
19989 The spot gets bigger with more confidence.
19990
19991 @item prediction-num
19992 Plain-old numeric value.
19993
19994 @item confidence-plus-minus
19995 Prediction +/- confidence.
19996
19997 @end table
19998
19999
20000 @node GroupLens Variables
20001 @subsection GroupLens Variables
20002
20003 @table @code
20004
20005 @item gnus-summary-grouplens-line-format
20006 The summary line format used in GroupLens-enhanced summary buffers.  It
20007 accepts the same specs as the normal summary line format (@pxref{Summary
20008 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
20009 %s\n}.
20010
20011 @item grouplens-bbb-host
20012 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
20013 default.
20014
20015 @item grouplens-bbb-port
20016 Port of the host running the bbbd server.  The default is 9000.
20017
20018 @item grouplens-score-offset
20019 Offset the prediction by this value.  In other words, subtract the
20020 prediction value by this number to arrive at the effective score.  The
20021 default is 0.
20022
20023 @item grouplens-score-scale-factor
20024 This variable allows the user to magnify the effect of GroupLens scores.
20025 The scale factor is applied after the offset.  The default is 1.
20026
20027 @end table
20028
20029
20030 @node Advanced Scoring
20031 @section Advanced Scoring
20032
20033 Scoring on Subjects and From headers is nice enough, but what if you're
20034 really interested in what a person has to say only when she's talking
20035 about a particular subject?  Or what if you really don't want to
20036 read what person A has to say when she's following up to person B, but
20037 want to read what she says when she's following up to person C?
20038
20039 By using advanced scoring rules you may create arbitrarily complex
20040 scoring patterns.
20041
20042 @menu
20043 * Advanced Scoring Syntax::     A definition.
20044 * Advanced Scoring Examples::   What they look like.
20045 * Advanced Scoring Tips::       Getting the most out of it.
20046 @end menu
20047
20048
20049 @node Advanced Scoring Syntax
20050 @subsection Advanced Scoring Syntax
20051
20052 Ordinary scoring rules have a string as the first element in the rule.
20053 Advanced scoring rules have a list as the first element.  The second
20054 element is the score to be applied if the first element evaluated to a
20055 non-@code{nil} value.
20056
20057 These lists may consist of three logical operators, one redirection
20058 operator, and various match operators.
20059
20060 Logical operators:
20061
20062 @table @code
20063 @item &
20064 @itemx and
20065 This logical operator will evaluate each of its arguments until it finds
20066 one that evaluates to @code{false}, and then it'll stop.  If all arguments
20067 evaluate to @code{true} values, then this operator will return
20068 @code{true}.
20069
20070 @item |
20071 @itemx or
20072 This logical operator will evaluate each of its arguments until it finds
20073 one that evaluates to @code{true}.  If no arguments are @code{true},
20074 then this operator will return @code{false}.
20075
20076 @item !
20077 @itemx not
20078 @itemx Â¬
20079 This logical operator only takes a single argument.  It returns the
20080 logical negation of the value of its argument.
20081
20082 @end table
20083
20084 There is an @dfn{indirection operator} that will make its arguments
20085 apply to the ancestors of the current article being scored.  For
20086 instance, @code{1-} will make score rules apply to the parent of the
20087 current article.  @code{2-} will make score rules apply to the
20088 grandparent of the current article.  Alternatively, you can write
20089 @code{^^}, where the number of @code{^}s (carets) says how far back into
20090 the ancestry you want to go.
20091
20092 Finally, we have the match operators.  These are the ones that do the
20093 real work.  Match operators are header name strings followed by a match
20094 and a match type.  A typical match operator looks like @samp{("from"
20095 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
20096 simple scoring, and the match types are also the same.
20097
20098
20099 @node Advanced Scoring Examples
20100 @subsection Advanced Scoring Examples
20101
20102 Please note that the following examples are score file rules.  To
20103 make a complete score file from them, surround them with another pair
20104 of parentheses.
20105
20106 Let's say you want to increase the score of articles written by Lars
20107 when he's talking about Gnus:
20108
20109 @example
20110 @group
20111 ((&
20112   ("from" "Lars Ingebrigtsen")
20113   ("subject" "Gnus"))
20114  1000)
20115 @end group
20116 @end example
20117
20118 Quite simple, huh?
20119
20120 When he writes long articles, he sometimes has something nice to say:
20121
20122 @example
20123 ((&
20124   ("from" "Lars Ingebrigtsen")
20125   (|
20126    ("subject" "Gnus")
20127    ("lines" 100 >)))
20128  1000)
20129 @end example
20130
20131 However, when he responds to things written by Reig Eigil Logge, you
20132 really don't want to read what he's written:
20133
20134 @example
20135 ((&
20136   ("from" "Lars Ingebrigtsen")
20137   (1- ("from" "Reig Eigir Logge")))
20138  -100000)
20139 @end example
20140
20141 Everybody that follows up Redmondo when he writes about disappearing
20142 socks should have their scores raised, but only when they talk about
20143 white socks.  However, when Lars talks about socks, it's usually not
20144 very interesting:
20145
20146 @example
20147 ((&
20148   (1-
20149    (&
20150     ("from" "redmondo@@.*no" r)
20151     ("body" "disappearing.*socks" t)))
20152   (! ("from" "Lars Ingebrigtsen"))
20153   ("body" "white.*socks"))
20154  1000)
20155 @end example
20156
20157 The possibilities are endless.
20158
20159
20160 @node Advanced Scoring Tips
20161 @subsection Advanced Scoring Tips
20162
20163 The @code{&} and @code{|} logical operators do short-circuit logic.
20164 That is, they stop processing their arguments when it's clear what the
20165 result of the operation will be.  For instance, if one of the arguments
20166 of an @code{&} evaluates to @code{false}, there's no point in evaluating
20167 the rest of the arguments.  This means that you should put slow matches
20168 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
20169 @samp{subject}) first.
20170
20171 The indirection arguments (@code{1-} and so on) will make their
20172 arguments work on previous generations of the thread.  If you say
20173 something like:
20174
20175 @example
20176 ...
20177 (1-
20178  (1-
20179   ("from" "lars")))
20180 ...
20181 @end example
20182
20183 Then that means "score on the from header of the grandparent of the
20184 current article".  An indirection is quite fast, but it's better to say:
20185
20186 @example
20187 (1-
20188  (&
20189   ("from" "Lars")
20190   ("subject" "Gnus")))
20191 @end example
20192
20193 than it is to say:
20194
20195 @example
20196 (&
20197  (1- ("from" "Lars"))
20198  (1- ("subject" "Gnus")))
20199 @end example
20200
20201
20202 @node Score Decays
20203 @section Score Decays
20204 @cindex score decays
20205 @cindex decays
20206
20207 You may find that your scores have a tendency to grow without
20208 bounds, especially if you're using adaptive scoring.  If scores get too
20209 big, they lose all meaning---they simply max out and it's difficult to
20210 use them in any sensible way.
20211
20212 @vindex gnus-decay-scores
20213 @findex gnus-decay-score
20214 @vindex gnus-decay-score-function
20215 Gnus provides a mechanism for decaying scores to help with this problem.
20216 When score files are loaded and @code{gnus-decay-scores} is
20217 non-@code{nil}, Gnus will run the score files through the decaying
20218 mechanism thereby lowering the scores of all non-permanent score rules.
20219 The decay itself if performed by the @code{gnus-decay-score-function}
20220 function, which is @code{gnus-decay-score} by default.  Here's the
20221 definition of that function:
20222
20223 @lisp
20224 (defun gnus-decay-score (score)
20225   "Decay SCORE.
20226 This is done according to `gnus-score-decay-constant'
20227 and `gnus-score-decay-scale'."
20228   (floor
20229    (- score
20230       (* (if (< score 0) 1 -1)
20231          (min (abs score)
20232               (max gnus-score-decay-constant
20233                    (* (abs score)
20234                       gnus-score-decay-scale)))))))
20235 @end lisp
20236
20237 @vindex gnus-score-decay-scale
20238 @vindex gnus-score-decay-constant
20239 @code{gnus-score-decay-constant} is 3 by default and
20240 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
20241
20242 @enumerate
20243 @item
20244 Scores between -3 and 3 will be set to 0 when this function is called.
20245
20246 @item
20247 Scores with magnitudes between 3 and 60 will be shrunk by 3.
20248
20249 @item
20250 Scores with magnitudes greater than 60 will be shrunk by 5% of the
20251 score.
20252 @end enumerate
20253
20254 If you don't like this decay function, write your own.  It is called
20255 with the score to be decayed as its only parameter, and it should return
20256 the new score, which should be an integer.
20257
20258 Gnus will try to decay scores once a day.  If you haven't run Gnus for
20259 four days, Gnus will decay the scores four times, for instance.
20260
20261 @iftex
20262 @iflatex
20263 @chapter Message
20264 @include message.texi
20265 @chapter Emacs MIME
20266 @include emacs-mime.texi
20267 @chapter Sieve
20268 @include sieve.texi
20269 @chapter PGG
20270 @include pgg.texi
20271 @end iflatex
20272 @end iftex
20273
20274 @node Various
20275 @chapter Various
20276
20277 @menu
20278 * Process/Prefix::              A convention used by many treatment commands.
20279 * Interactive::                 Making Gnus ask you many questions.
20280 * Symbolic Prefixes::           How to supply some Gnus functions with options.
20281 * Formatting Variables::        You can specify what buffers should look like.
20282 * Window Layout::               Configuring the Gnus buffer windows.
20283 * Faces and Fonts::             How to change how faces look.
20284 * Compilation::                 How to speed Gnus up.
20285 * Mode Lines::                  Displaying information in the mode lines.
20286 * Highlighting and Menus::      Making buffers look all nice and cozy.
20287 * Buttons::                     Get tendinitis in ten easy steps!
20288 * Daemons::                     Gnus can do things behind your back.
20289 * NoCeM::                       How to avoid spam and other fatty foods.
20290 * Undo::                        Some actions can be undone.
20291 * Predicate Specifiers::        Specifying predicates.
20292 * Moderation::                  What to do if you're a moderator.
20293 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
20294 * Fuzzy Matching::              What's the big fuzz?
20295 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
20296 * Various Various::             Things that are really various.
20297 @end menu
20298
20299
20300 @node Process/Prefix
20301 @section Process/Prefix
20302 @cindex process/prefix convention
20303
20304 Many functions, among them functions for moving, decoding and saving
20305 articles, use what is known as the @dfn{Process/Prefix convention}.
20306
20307 This is a method for figuring out what articles the user wants the
20308 command to be performed on.
20309
20310 It goes like this:
20311
20312 If the numeric prefix is N, perform the operation on the next N
20313 articles, starting with the current one.  If the numeric prefix is
20314 negative, perform the operation on the previous N articles, starting
20315 with the current one.
20316
20317 @vindex transient-mark-mode
20318 If @code{transient-mark-mode} in non-@code{nil} and the region is
20319 active, all articles in the region will be worked upon.
20320
20321 If there is no numeric prefix, but some articles are marked with the
20322 process mark, perform the operation on the articles marked with
20323 the process mark.
20324
20325 If there is neither a numeric prefix nor any articles marked with the
20326 process mark, just perform the operation on the current article.
20327
20328 Quite simple, really, but it needs to be made clear so that surprises
20329 are avoided.
20330
20331 Commands that react to the process mark will push the current list of
20332 process marked articles onto a stack and will then clear all process
20333 marked articles.  You can restore the previous configuration with the
20334 @kbd{M P y} command (@pxref{Setting Process Marks}).
20335
20336 @vindex gnus-summary-goto-unread
20337 One thing that seems to shock & horrify lots of people is that, for
20338 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
20339 Since each @kbd{d} (which marks the current article as read) by default
20340 goes to the next unread article after marking, this means that @kbd{3 d}
20341 will mark the next three unread articles as read, no matter what the
20342 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
20343 @code{nil} for a more straightforward action.
20344
20345 Many commands do not use the process/prefix convention.  All commands
20346 that do explicitly say so in this manual.  To apply the process/prefix
20347 convention to commands that do not use it, you can use the @kbd{M-&}
20348 command.  For instance, to mark all the articles in the group as
20349 expirable, you could say @kbd{M P b M-& E}.
20350
20351
20352 @node Interactive
20353 @section Interactive
20354 @cindex interaction
20355
20356 @table @code
20357
20358 @item gnus-novice-user
20359 @vindex gnus-novice-user
20360 If this variable is non-@code{nil}, you are either a newcomer to the
20361 World of Usenet, or you are very cautious, which is a nice thing to be,
20362 really.  You will be given questions of the type ``Are you sure you want
20363 to do this?'' before doing anything dangerous.  This is @code{t} by
20364 default.
20365
20366 @item gnus-expert-user
20367 @vindex gnus-expert-user
20368 If this variable is non-@code{nil}, you will seldom be asked any
20369 questions by Gnus.  It will simply assume you know what you're doing, no
20370 matter how strange.
20371
20372 @item gnus-interactive-catchup
20373 @vindex gnus-interactive-catchup
20374 Require confirmation before catching up a group if non-@code{nil}.  It
20375 is @code{t} by default.
20376
20377 @item gnus-interactive-exit
20378 @vindex gnus-interactive-exit
20379 Require confirmation before exiting Gnus.  This variable is @code{t} by
20380 default.
20381 @end table
20382
20383
20384 @node Symbolic Prefixes
20385 @section Symbolic Prefixes
20386 @cindex symbolic prefixes
20387
20388 Quite a lot of Emacs commands react to the (numeric) prefix.  For
20389 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
20390 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
20391 rule of 900 to the current article.
20392
20393 This is all nice and well, but what if you want to give a command some
20394 additional information?  Well, what most commands do is interpret the
20395 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
20396 doesn't want a backup file to be created when saving the current buffer,
20397 for instance.  But what if you want to save without making a backup
20398 file, and you want Emacs to flash lights and play a nice tune at the
20399 same time?  You can't, and you're probably perfectly happy that way.
20400
20401 @kindex M-i (Summary)
20402 @findex gnus-symbolic-argument
20403 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
20404 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
20405 character typed in is the value.  You can stack as many @kbd{M-i}
20406 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
20407 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
20408 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
20409 @code{b}''.  You get the drift.
20410
20411 Typing in symbolic prefixes to commands that don't accept them doesn't
20412 hurt, but it doesn't do any good either.  Currently not many Gnus
20413 functions make use of the symbolic prefix.
20414
20415 If you're interested in how Gnus implements this, @pxref{Extended
20416 Interactive}.
20417
20418
20419 @node Formatting Variables
20420 @section Formatting Variables
20421 @cindex formatting variables
20422
20423 Throughout this manual you've probably noticed lots of variables called
20424 things like @code{gnus-group-line-format} and
20425 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
20426 output lines in the various buffers.  There's quite a lot of them.
20427 Fortunately, they all use the same syntax, so there's not that much to
20428 be annoyed by.
20429
20430 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
20431 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
20432 lots of percentages everywhere.
20433
20434 @menu
20435 * Formatting Basics::           A formatting variable is basically a format string.
20436 * Mode Line Formatting::        Some rules about mode line formatting variables.
20437 * Advanced Formatting::         Modifying output in various ways.
20438 * User-Defined Specs::          Having Gnus call your own functions.
20439 * Formatting Fonts::            Making the formatting look colorful and nice.
20440 * Positioning Point::           Moving point to a position after an operation.
20441 * Tabulation::                  Tabulating your output.
20442 * Wide Characters::             Dealing with wide characters.
20443 @end menu
20444
20445 Currently Gnus uses the following formatting variables:
20446 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
20447 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
20448 @code{gnus-group-mode-line-format},
20449 @code{gnus-summary-mode-line-format},
20450 @code{gnus-article-mode-line-format},
20451 @code{gnus-server-mode-line-format}, and
20452 @code{gnus-summary-pick-line-format}.
20453
20454 All these format variables can also be arbitrary elisp forms.  In that
20455 case, they will be @code{eval}ed to insert the required lines.
20456
20457 @kindex M-x gnus-update-format
20458 @findex gnus-update-format
20459 Gnus includes a command to help you while creating your own format
20460 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
20461 update the spec in question and pop you to a buffer where you can
20462 examine the resulting Lisp code to be run to generate the line.
20463
20464
20465
20466 @node Formatting Basics
20467 @subsection Formatting Basics
20468
20469 Each @samp{%} element will be replaced by some string or other when the
20470 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
20471 spec, and pad with spaces to get a 5-character field''.
20472
20473 As with normal C and Emacs Lisp formatting strings, the numerical
20474 modifier between the @samp{%} and the formatting type character will
20475 @dfn{pad} the output so that it is always at least that long.
20476 @samp{%5y} will make the field always (at least) five characters wide by
20477 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
20478 the right instead.
20479
20480 You may also wish to limit the length of the field to protect against
20481 particularly wide values.  For that you can say @samp{%4,6y}, which
20482 means that the field will never be more than 6 characters wide and never
20483 less than 4 characters wide.
20484
20485 Also Gnus supports some extended format specifications, such as
20486 @samp{%&user-date;}.
20487
20488
20489 @node Mode Line Formatting
20490 @subsection Mode Line Formatting
20491
20492 Mode line formatting variables (e.g.,
20493 @code{gnus-summary-mode-line-format}) follow the same rules as other,
20494 buffer line oriented formatting variables (@pxref{Formatting Basics})
20495 with the following two differences:
20496
20497 @enumerate
20498
20499 @item
20500 There must be no newline (@samp{\n}) at the end.
20501
20502 @item
20503 The special @samp{%%b} spec can be used to display the buffer name.
20504 Well, it's no spec at all, really---@samp{%%} is just a way to quote
20505 @samp{%} to allow it to pass through the formatting machinery unmangled,
20506 so that Emacs receives @samp{%b}, which is something the Emacs mode line
20507 display interprets to mean ``show the buffer name''.  For a full list of
20508 mode line specs Emacs understands, see the documentation of the
20509 @code{mode-line-format} variable.
20510
20511 @end enumerate
20512
20513
20514 @node Advanced Formatting
20515 @subsection Advanced Formatting
20516
20517 It is frequently useful to post-process the fields in some way.
20518 Padding, limiting, cutting off parts and suppressing certain values can
20519 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
20520 look like @samp{%~(cut 3)~(ignore "0")y}.
20521
20522 These are the valid modifiers:
20523
20524 @table @code
20525 @item pad
20526 @itemx pad-left
20527 Pad the field to the left with spaces until it reaches the required
20528 length.
20529
20530 @item pad-right
20531 Pad the field to the right with spaces until it reaches the required
20532 length.
20533
20534 @item max
20535 @itemx max-left
20536 Cut off characters from the left until it reaches the specified length.
20537
20538 @item max-right
20539 Cut off characters from the right until it reaches the specified
20540 length.
20541
20542 @item cut
20543 @itemx cut-left
20544 Cut off the specified number of characters from the left.
20545
20546 @item cut-right
20547 Cut off the specified number of characters from the right.
20548
20549 @item ignore
20550 Return an empty string if the field is equal to the specified value.
20551
20552 @item form
20553 Use the specified form as the field value when the @samp{@@} spec is
20554 used.
20555
20556 Here's an example:
20557
20558 @lisp
20559 "~(form (current-time-string))@@"
20560 @end lisp
20561
20562 @end table
20563
20564 Let's take an example.  The @samp{%o} spec in the summary mode lines
20565 will return a date in compact ISO8601 format---@samp{19960809T230410}.
20566 This is quite a mouthful, so we want to shave off the century number and
20567 the time, leaving us with a six-character date.  That would be
20568 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
20569 maxing, and we need the padding to ensure that the date is never less
20570 than 6 characters to make it look nice in columns.)
20571
20572 Ignoring is done first; then cutting; then maxing; and then as the very
20573 last operation, padding.
20574
20575 If you use lots of these advanced thingies, you'll find that Gnus gets
20576 quite slow.  This can be helped enormously by running @kbd{M-x
20577 gnus-compile} when you are satisfied with the look of your lines.
20578 @xref{Compilation}.
20579
20580
20581 @node User-Defined Specs
20582 @subsection User-Defined Specs
20583
20584 All the specs allow for inserting user defined specifiers---@samp{u}.
20585 The next character in the format string should be a letter.  Gnus
20586 will call the function @code{gnus-user-format-function-}@samp{X}, where
20587 @samp{X} is the letter following @samp{%u}.  The function will be passed
20588 a single parameter---what the parameter means depends on what buffer
20589 it's being called from.  The function should return a string, which will
20590 be inserted into the buffer just like information from any other
20591 specifier.  This function may also be called with dummy values, so it
20592 should protect against that.
20593
20594 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
20595 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
20596
20597 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
20598 much the same without defining new functions.  Here's an example:
20599 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
20600 given here will be evaluated to yield the current line number, and then
20601 inserted.
20602
20603
20604 @node Formatting Fonts
20605 @subsection Formatting Fonts
20606
20607 There are specs for highlighting, and these are shared by all the format
20608 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
20609 the special @code{mouse-face} property set, which means that it will be
20610 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
20611 over it.
20612
20613 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
20614 normal faces set using @code{gnus-face-0}, which is @code{bold} by
20615 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
20616 and so on.  Create as many faces as you wish.  The same goes for the
20617 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
20618 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
20619
20620 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
20621 special @code{balloon-help} property set to
20622 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
20623 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
20624 variables should be either strings or symbols naming functions that
20625 return a string.  When the mouse passes over text with this property
20626 set, a balloon window will appear and display the string.  Please
20627 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
20628 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
20629 XEmacs) for more information on this.  (For technical reasons, the
20630 guillemets have been approximated as @samp{<<} and @samp{>>} in this
20631 paragraph.)
20632
20633 Here's an alternative recipe for the group buffer:
20634
20635 @lisp
20636 ;; @r{Create three face types.}
20637 (setq gnus-face-1 'bold)
20638 (setq gnus-face-3 'italic)
20639
20640 ;; @r{We want the article count to be in}
20641 ;; @r{a bold and green face.  So we create}
20642 ;; @r{a new face called @code{my-green-bold}.}
20643 (copy-face 'bold 'my-green-bold)
20644 ;; @r{Set the color.}
20645 (set-face-foreground 'my-green-bold "ForestGreen")
20646 (setq gnus-face-2 'my-green-bold)
20647
20648 ;; @r{Set the new & fancy format.}
20649 (setq gnus-group-line-format
20650       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
20651 @end lisp
20652
20653 I'm sure you'll be able to use this scheme to create totally unreadable
20654 and extremely vulgar displays.  Have fun!
20655
20656 Note that the @samp{%(} specs (and friends) do not make any sense on the
20657 mode-line variables.
20658
20659 @node Positioning Point
20660 @subsection Positioning Point
20661
20662 Gnus usually moves point to a pre-defined place on each line in most
20663 buffers.  By default, point move to the first colon character on the
20664 line.  You can customize this behaviour in three different ways.
20665
20666 You can move the colon character to somewhere else on the line.
20667
20668 @findex gnus-goto-colon
20669 You can redefine the function that moves the point to the colon.  The
20670 function is called @code{gnus-goto-colon}.
20671
20672 But perhaps the most convenient way to deal with this, if you don't want
20673 to have a colon in your line, is to use the @samp{%*} specifier.  If you
20674 put a @samp{%*} somewhere in your format line definition, Gnus will
20675 place point there.
20676
20677
20678 @node Tabulation
20679 @subsection Tabulation
20680
20681 You can usually line up your displays by padding and cutting your
20682 strings.  However, when combining various strings of different size, it
20683 can often be more convenient to just output the strings, and then worry
20684 about lining up the following text afterwards.
20685
20686 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
20687 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
20688
20689 @samp{%50=} will insert space characters to pad the line up to column
20690 50.  If the text is already past column 50, nothing will be inserted.
20691 This is the soft tabulator.
20692
20693 @samp{%-50=} will insert space characters to pad the line up to column
20694 50.  If the text is already past column 50, the excess text past column
20695 50 will be removed.  This is the hard tabulator.
20696
20697
20698 @node Wide Characters
20699 @subsection Wide Characters
20700
20701 Fixed width fonts in most countries have characters of the same width.
20702 Some countries, however, use Latin characters mixed with wider
20703 characters---most notable East Asian countries.
20704
20705 The problem is that when formatting, Gnus assumes that if a string is 10
20706 characters wide, it'll be 10 Latin characters wide on the screen.  In
20707 these countries, that's not true.
20708
20709 @vindex gnus-use-correct-string-widths
20710 To help fix this, you can set @code{gnus-use-correct-string-widths} to
20711 @code{t}.  This makes buffer generation slower, but the results will be
20712 prettier.  The default value under XEmacs is @code{t} but @code{nil}
20713 for Emacs.
20714
20715
20716 @node Window Layout
20717 @section Window Layout
20718 @cindex window layout
20719
20720 No, there's nothing here about X, so be quiet.
20721
20722 @vindex gnus-use-full-window
20723 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
20724 other windows and occupy the entire Emacs screen by itself.  It is
20725 @code{t} by default.
20726
20727 Setting this variable to @code{nil} kinda works, but there are
20728 glitches.  Use at your own peril.
20729
20730 @vindex gnus-buffer-configuration
20731 @code{gnus-buffer-configuration} describes how much space each Gnus
20732 buffer should be given.  Here's an excerpt of this variable:
20733
20734 @lisp
20735 ((group (vertical 1.0 (group 1.0 point)
20736                       (if gnus-carpal (group-carpal 4))))
20737  (article (vertical 1.0 (summary 0.25 point)
20738                         (article 1.0))))
20739 @end lisp
20740
20741 This is an alist.  The @dfn{key} is a symbol that names some action or
20742 other.  For instance, when displaying the group buffer, the window
20743 configuration function will use @code{group} as the key.  A full list of
20744 possible names is listed below.
20745
20746 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
20747 should occupy.  To take the @code{article} split as an example -
20748
20749 @lisp
20750 (article (vertical 1.0 (summary 0.25 point)
20751                        (article 1.0)))
20752 @end lisp
20753
20754 This @dfn{split} says that the summary buffer should occupy 25% of upper
20755 half of the screen, and that it is placed over the article buffer.  As
20756 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
20757 reaching for that calculator there).  However, the special number
20758 @code{1.0} is used to signal that this buffer should soak up all the
20759 rest of the space available after the rest of the buffers have taken
20760 whatever they need.  There should be only one buffer with the @code{1.0}
20761 size spec per split.
20762
20763 Point will be put in the buffer that has the optional third element
20764 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
20765 split where the tag @code{frame-focus} is a member (i.e. is the third or
20766 fourth element in the list, depending on whether the @code{point} tag is
20767 present) gets focus.
20768
20769 Here's a more complicated example:
20770
20771 @lisp
20772 (article (vertical 1.0 (group 4)
20773                        (summary 0.25 point)
20774                        (if gnus-carpal (summary-carpal 4))
20775                        (article 1.0)))
20776 @end lisp
20777
20778 If the size spec is an integer instead of a floating point number,
20779 then that number will be used to say how many lines a buffer should
20780 occupy, not a percentage.
20781
20782 If the @dfn{split} looks like something that can be @code{eval}ed (to be
20783 precise---if the @code{car} of the split is a function or a subr), this
20784 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
20785 be used as a split.  This means that there will be three buffers if
20786 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
20787 is non-@code{nil}.
20788
20789 Not complicated enough for you?  Well, try this on for size:
20790
20791 @lisp
20792 (article (horizontal 1.0
20793              (vertical 0.5
20794                  (group 1.0)
20795                  (gnus-carpal 4))
20796              (vertical 1.0
20797                  (summary 0.25 point)
20798                  (summary-carpal 4)
20799                  (article 1.0))))
20800 @end lisp
20801
20802 Whoops.  Two buffers with the mystery 100% tag.  And what's that
20803 @code{horizontal} thingie?
20804
20805 If the first element in one of the split is @code{horizontal}, Gnus will
20806 split the window horizontally, giving you two windows side-by-side.
20807 Inside each of these strips you may carry on all you like in the normal
20808 fashion.  The number following @code{horizontal} says what percentage of
20809 the screen is to be given to this strip.
20810
20811 For each split, there @emph{must} be one element that has the 100% tag.
20812 The splitting is never accurate, and this buffer will eat any leftover
20813 lines from the splits.
20814
20815 To be slightly more formal, here's a definition of what a valid split
20816 may look like:
20817
20818 @example
20819 @group
20820 split      = frame | horizontal | vertical | buffer | form
20821 frame      = "(frame " size *split ")"
20822 horizontal = "(horizontal " size *split ")"
20823 vertical   = "(vertical " size *split ")"
20824 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
20825 size       = number | frame-params
20826 buf-name   = group | article | summary ...
20827 @end group
20828 @end example
20829
20830 The limitations are that the @code{frame} split can only appear as the
20831 top-level split.  @var{form} should be an Emacs Lisp form that should
20832 return a valid split.  We see that each split is fully recursive, and
20833 may contain any number of @code{vertical} and @code{horizontal} splits.
20834
20835 @vindex gnus-window-min-width
20836 @vindex gnus-window-min-height
20837 @cindex window height
20838 @cindex window width
20839 Finding the right sizes can be a bit complicated.  No window may be less
20840 than @code{gnus-window-min-height} (default 1) characters high, and all
20841 windows must be at least @code{gnus-window-min-width} (default 1)
20842 characters wide.  Gnus will try to enforce this before applying the
20843 splits.  If you want to use the normal Emacs window width/height limit,
20844 you can just set these two variables to @code{nil}.
20845
20846 If you're not familiar with Emacs terminology, @code{horizontal} and
20847 @code{vertical} splits may work the opposite way of what you'd expect.
20848 Windows inside a @code{horizontal} split are shown side-by-side, and
20849 windows within a @code{vertical} split are shown above each other.
20850
20851 @findex gnus-configure-frame
20852 If you want to experiment with window placement, a good tip is to call
20853 @code{gnus-configure-frame} directly with a split.  This is the function
20854 that does all the real work when splitting buffers.  Below is a pretty
20855 nonsensical configuration with 5 windows; two for the group buffer and
20856 three for the article buffer.  (I said it was nonsensical.)  If you
20857 @code{eval} the statement below, you can get an idea of how that would
20858 look straight away, without going through the normal Gnus channels.
20859 Play with it until you're satisfied, and then use
20860 @code{gnus-add-configuration} to add your new creation to the buffer
20861 configuration list.
20862
20863 @lisp
20864 (gnus-configure-frame
20865  '(horizontal 1.0
20866     (vertical 10
20867       (group 1.0)
20868       (article 0.3 point))
20869     (vertical 1.0
20870       (article 1.0)
20871       (horizontal 4
20872         (group 1.0)
20873         (article 10)))))
20874 @end lisp
20875
20876 You might want to have several frames as well.  No prob---just use the
20877 @code{frame} split:
20878
20879 @lisp
20880 (gnus-configure-frame
20881  '(frame 1.0
20882          (vertical 1.0
20883                    (summary 0.25 point frame-focus)
20884                    (article 1.0))
20885          (vertical ((height . 5) (width . 15)
20886                     (user-position . t)
20887                     (left . -1) (top . 1))
20888                    (picon 1.0))))
20889
20890 @end lisp
20891
20892 This split will result in the familiar summary/article window
20893 configuration in the first (or ``main'') frame, while a small additional
20894 frame will be created where picons will be shown.  As you can see,
20895 instead of the normal @code{1.0} top-level spec, each additional split
20896 should have a frame parameter alist as the size spec.
20897 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
20898 Reference Manual}.  Under XEmacs, a frame property list will be
20899 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
20900 is such a plist.
20901 The list of all possible keys for @code{gnus-buffer-configuration} can
20902 be found in its default value.
20903
20904 Note that the @code{message} key is used for both
20905 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
20906 it is desirable to distinguish between the two, something like this
20907 might be used:
20908
20909 @lisp
20910 (message (horizontal 1.0
20911                      (vertical 1.0 (message 1.0 point))
20912                      (vertical 0.24
20913                                (if (buffer-live-p gnus-summary-buffer)
20914                                    '(summary 0.5))
20915                                (group 1.0))))
20916 @end lisp
20917
20918 One common desire for a multiple frame split is to have a separate frame
20919 for composing mail and news while leaving the original frame intact.  To
20920 accomplish that, something like the following can be done:
20921
20922 @lisp
20923 (message
20924   (frame 1.0
20925          (if (not (buffer-live-p gnus-summary-buffer))
20926              (car (cdr (assoc 'group gnus-buffer-configuration)))
20927            (car (cdr (assoc 'summary gnus-buffer-configuration))))
20928          (vertical ((user-position . t) (top . 1) (left . 1)
20929                     (name . "Message"))
20930                    (message 1.0 point))))
20931 @end lisp
20932
20933 @findex gnus-add-configuration
20934 Since the @code{gnus-buffer-configuration} variable is so long and
20935 complicated, there's a function you can use to ease changing the config
20936 of a single setting: @code{gnus-add-configuration}.  If, for instance,
20937 you want to change the @code{article} setting, you could say:
20938
20939 @lisp
20940 (gnus-add-configuration
20941  '(article (vertical 1.0
20942                (group 4)
20943                (summary .25 point)
20944                (article 1.0))))
20945 @end lisp
20946
20947 You'd typically stick these @code{gnus-add-configuration} calls in your
20948 @file{~/.gnus.el} file or in some startup hook---they should be run after
20949 Gnus has been loaded.
20950
20951 @vindex gnus-always-force-window-configuration
20952 If all windows mentioned in the configuration are already visible, Gnus
20953 won't change the window configuration.  If you always want to force the
20954 ``right'' window configuration, you can set
20955 @code{gnus-always-force-window-configuration} to non-@code{nil}.
20956
20957 If you're using tree displays (@pxref{Tree Display}), and the tree
20958 window is displayed vertically next to another window, you may also want
20959 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
20960 windows resized.
20961
20962 @subsection Example Window Configurations
20963
20964 @itemize @bullet
20965 @item
20966 Narrow left hand side occupied by group buffer.  Right hand side split
20967 between summary buffer (top one-sixth) and article buffer (bottom).
20968
20969 @ifinfo
20970 @example
20971 +---+---------+
20972 | G | Summary |
20973 | r +---------+
20974 | o |         |
20975 | u | Article |
20976 | p |         |
20977 +---+---------+
20978 @end example
20979 @end ifinfo
20980
20981 @lisp
20982 (gnus-add-configuration
20983  '(article
20984    (horizontal 1.0
20985                (vertical 25 (group 1.0))
20986                (vertical 1.0
20987                          (summary 0.16 point)
20988                          (article 1.0)))))
20989
20990 (gnus-add-configuration
20991  '(summary
20992    (horizontal 1.0
20993                (vertical 25 (group 1.0))
20994                (vertical 1.0 (summary 1.0 point)))))
20995 @end lisp
20996
20997 @end itemize
20998
20999
21000 @node Faces and Fonts
21001 @section Faces and Fonts
21002 @cindex faces
21003 @cindex fonts
21004 @cindex colors
21005
21006 Fiddling with fonts and faces used to be very difficult, but these days
21007 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
21008 the face you want to alter, and alter it via the standard Customize
21009 interface.
21010
21011
21012 @node Compilation
21013 @section Compilation
21014 @cindex compilation
21015 @cindex byte-compilation
21016
21017 @findex gnus-compile
21018
21019 Remember all those line format specification variables?
21020 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
21021 on.  Now, Gnus will of course heed whatever these variables are, but,
21022 unfortunately, changing them will mean a quite significant slow-down.
21023 (The default values of these variables have byte-compiled functions
21024 associated with them, while the user-generated versions do not, of
21025 course.)
21026
21027 To help with this, you can run @kbd{M-x gnus-compile} after you've
21028 fiddled around with the variables and feel that you're (kind of)
21029 satisfied.  This will result in the new specs being byte-compiled, and
21030 you'll get top speed again.  Gnus will save these compiled specs in the
21031 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
21032 this function, though---you should compile them yourself by sticking
21033 them into the @file{~/.gnus.el} file and byte-compiling that file.)
21034
21035
21036 @node Mode Lines
21037 @section Mode Lines
21038 @cindex mode lines
21039
21040 @vindex gnus-updated-mode-lines
21041 @code{gnus-updated-mode-lines} says what buffers should keep their mode
21042 lines updated.  It is a list of symbols.  Supported symbols include
21043 @code{group}, @code{article}, @code{summary}, @code{server},
21044 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
21045 Gnus will keep that mode line updated with information that may be
21046 pertinent.  If this variable is @code{nil}, screen refresh may be
21047 quicker.
21048
21049 @cindex display-time
21050
21051 @vindex gnus-mode-non-string-length
21052 By default, Gnus displays information on the current article in the mode
21053 lines of the summary and article buffers.  The information Gnus wishes
21054 to display (e.g. the subject of the article) is often longer than the
21055 mode lines, and therefore have to be cut off at some point.  The
21056 @code{gnus-mode-non-string-length} variable says how long the other
21057 elements on the line is (i.e., the non-info part).  If you put
21058 additional elements on the mode line (e.g. a clock), you should modify
21059 this variable:
21060
21061 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
21062 @lisp
21063 (add-hook 'display-time-hook
21064           (lambda () (setq gnus-mode-non-string-length
21065                            (+ 21
21066                               (if line-number-mode 5 0)
21067                               (if column-number-mode 4 0)
21068                               (length display-time-string)))))
21069 @end lisp
21070
21071 If this variable is @code{nil} (which is the default), the mode line
21072 strings won't be chopped off, and they won't be padded either.  Note
21073 that the default is unlikely to be desirable, as even the percentage
21074 complete in the buffer may be crowded off the mode line; the user should
21075 configure this variable appropriately for her configuration.
21076
21077
21078 @node Highlighting and Menus
21079 @section Highlighting and Menus
21080 @cindex visual
21081 @cindex highlighting
21082 @cindex menus
21083
21084 @vindex gnus-visual
21085 The @code{gnus-visual} variable controls most of the Gnus-prettifying
21086 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
21087 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
21088 file.
21089
21090 This variable can be a list of visual properties that are enabled.  The
21091 following elements are valid, and are all included by default:
21092
21093 @table @code
21094 @item group-highlight
21095 Do highlights in the group buffer.
21096 @item summary-highlight
21097 Do highlights in the summary buffer.
21098 @item article-highlight
21099 Do highlights in the article buffer.
21100 @item highlight
21101 Turn on highlighting in all buffers.
21102 @item group-menu
21103 Create menus in the group buffer.
21104 @item summary-menu
21105 Create menus in the summary buffers.
21106 @item article-menu
21107 Create menus in the article buffer.
21108 @item browse-menu
21109 Create menus in the browse buffer.
21110 @item server-menu
21111 Create menus in the server buffer.
21112 @item score-menu
21113 Create menus in the score buffers.
21114 @item menu
21115 Create menus in all buffers.
21116 @end table
21117
21118 So if you only want highlighting in the article buffer and menus in all
21119 buffers, you could say something like:
21120
21121 @lisp
21122 (setq gnus-visual '(article-highlight menu))
21123 @end lisp
21124
21125 If you want highlighting only and no menus whatsoever, you'd say:
21126
21127 @lisp
21128 (setq gnus-visual '(highlight))
21129 @end lisp
21130
21131 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
21132 in all Gnus buffers.
21133
21134 Other general variables that influence the look of all buffers include:
21135
21136 @table @code
21137 @item gnus-mouse-face
21138 @vindex gnus-mouse-face
21139 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
21140 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
21141
21142 @end table
21143
21144 There are hooks associated with the creation of all the different menus:
21145
21146 @table @code
21147
21148 @item gnus-article-menu-hook
21149 @vindex gnus-article-menu-hook
21150 Hook called after creating the article mode menu.
21151
21152 @item gnus-group-menu-hook
21153 @vindex gnus-group-menu-hook
21154 Hook called after creating the group mode menu.
21155
21156 @item gnus-summary-menu-hook
21157 @vindex gnus-summary-menu-hook
21158 Hook called after creating the summary mode menu.
21159
21160 @item gnus-server-menu-hook
21161 @vindex gnus-server-menu-hook
21162 Hook called after creating the server mode menu.
21163
21164 @item gnus-browse-menu-hook
21165 @vindex gnus-browse-menu-hook
21166 Hook called after creating the browse mode menu.
21167
21168 @item gnus-score-menu-hook
21169 @vindex gnus-score-menu-hook
21170 Hook called after creating the score mode menu.
21171
21172 @end table
21173
21174
21175 @node Buttons
21176 @section Buttons
21177 @cindex buttons
21178 @cindex mouse
21179 @cindex click
21180
21181 Those new-fangled @dfn{mouse} contraptions is very popular with the
21182 young, hep kids who don't want to learn the proper way to do things
21183 these days.  Why, I remember way back in the summer of '89, when I was
21184 using Emacs on a Tops 20 system.  Three hundred users on one single
21185 machine, and every user was running Simula compilers.  Bah!
21186
21187 Right.
21188
21189 @vindex gnus-carpal
21190 Well, you can make Gnus display bufferfuls of buttons you can click to
21191 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
21192 really.  Tell the chiropractor I sent you.
21193
21194
21195 @table @code
21196
21197 @item gnus-carpal-mode-hook
21198 @vindex gnus-carpal-mode-hook
21199 Hook run in all carpal mode buffers.
21200
21201 @item gnus-carpal-button-face
21202 @vindex gnus-carpal-button-face
21203 Face used on buttons.
21204
21205 @item gnus-carpal-header-face
21206 @vindex gnus-carpal-header-face
21207 Face used on carpal buffer headers.
21208
21209 @item gnus-carpal-group-buffer-buttons
21210 @vindex gnus-carpal-group-buffer-buttons
21211 Buttons in the group buffer.
21212
21213 @item gnus-carpal-summary-buffer-buttons
21214 @vindex gnus-carpal-summary-buffer-buttons
21215 Buttons in the summary buffer.
21216
21217 @item gnus-carpal-server-buffer-buttons
21218 @vindex gnus-carpal-server-buffer-buttons
21219 Buttons in the server buffer.
21220
21221 @item gnus-carpal-browse-buffer-buttons
21222 @vindex gnus-carpal-browse-buffer-buttons
21223 Buttons in the browse buffer.
21224 @end table
21225
21226 All the @code{buttons} variables are lists.  The elements in these list
21227 are either cons cells where the @code{car} contains a text to be displayed and
21228 the @code{cdr} contains a function symbol, or a simple string.
21229
21230
21231 @node Daemons
21232 @section Daemons
21233 @cindex demons
21234 @cindex daemons
21235
21236 Gnus, being larger than any program ever written (allegedly), does lots
21237 of strange stuff that you may wish to have done while you're not
21238 present.  For instance, you may want it to check for new mail once in a
21239 while.  Or you may want it to close down all connections to all servers
21240 when you leave Emacs idle.  And stuff like that.
21241
21242 Gnus will let you do stuff like that by defining various
21243 @dfn{handlers}.  Each handler consists of three elements:  A
21244 @var{function}, a @var{time}, and an @var{idle} parameter.
21245
21246 Here's an example of a handler that closes connections when Emacs has
21247 been idle for thirty minutes:
21248
21249 @lisp
21250 (gnus-demon-close-connections nil 30)
21251 @end lisp
21252
21253 Here's a handler that scans for @acronym{PGP} headers every hour when
21254 Emacs is idle:
21255
21256 @lisp
21257 (gnus-demon-scan-pgp 60 t)
21258 @end lisp
21259
21260 This @var{time} parameter and than @var{idle} parameter work together
21261 in a strange, but wonderful fashion.  Basically, if @var{idle} is
21262 @code{nil}, then the function will be called every @var{time} minutes.
21263
21264 If @var{idle} is @code{t}, then the function will be called after
21265 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
21266 the function will never be called.  But once Emacs goes idle, the
21267 function will be called every @var{time} minutes.
21268
21269 If @var{idle} is a number and @var{time} is a number, the function will
21270 be called every @var{time} minutes only when Emacs has been idle for
21271 @var{idle} minutes.
21272
21273 If @var{idle} is a number and @var{time} is @code{nil}, the function
21274 will be called once every time Emacs has been idle for @var{idle}
21275 minutes.
21276
21277 And if @var{time} is a string, it should look like @samp{07:31}, and
21278 the function will then be called once every day somewhere near that
21279 time.  Modified by the @var{idle} parameter, of course.
21280
21281 @vindex gnus-demon-timestep
21282 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
21283 seconds.  This is 60 by default.  If you change that variable,
21284 all the timings in the handlers will be affected.)
21285
21286 So, if you want to add a handler, you could put something like this in
21287 your @file{~/.gnus.el} file:
21288
21289 @findex gnus-demon-add-handler
21290 @lisp
21291 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
21292 @end lisp
21293
21294 @findex gnus-demon-add-nocem
21295 @findex gnus-demon-add-scanmail
21296 @findex gnus-demon-add-rescan
21297 @findex gnus-demon-add-scan-timestamps
21298 @findex gnus-demon-add-disconnection
21299 Some ready-made functions to do this have been created:
21300 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
21301 @code{gnus-demon-add-nntp-close-connection},
21302 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
21303 @code{gnus-demon-add-scanmail}.  Just put those functions in your
21304 @file{~/.gnus.el} if you want those abilities.
21305
21306 @findex gnus-demon-init
21307 @findex gnus-demon-cancel
21308 @vindex gnus-demon-handlers
21309 If you add handlers to @code{gnus-demon-handlers} directly, you should
21310 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
21311 daemons, you can use the @code{gnus-demon-cancel} function.
21312
21313 Note that adding daemons can be pretty naughty if you over do it.  Adding
21314 functions that scan all news and mail from all servers every two seconds
21315 is a sure-fire way of getting booted off any respectable system.  So
21316 behave.
21317
21318
21319 @node NoCeM
21320 @section NoCeM
21321 @cindex nocem
21322 @cindex spam
21323
21324 @dfn{Spamming} is posting the same article lots and lots of times.
21325 Spamming is bad.  Spamming is evil.
21326
21327 Spamming is usually canceled within a day or so by various anti-spamming
21328 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
21329 NoCeM is pronounced ``no see-'em'', and means what the name
21330 implies---these are messages that make the offending articles, like, go
21331 away.
21332
21333 What use are these NoCeM messages if the articles are canceled anyway?
21334 Some sites do not honor cancel messages and some sites just honor cancels
21335 from a select few people.  Then you may wish to make use of the NoCeM
21336 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
21337
21338 Gnus can read and parse the messages in this group automatically, and
21339 this will make spam disappear.
21340
21341 There are some variables to customize, of course:
21342
21343 @table @code
21344 @item gnus-use-nocem
21345 @vindex gnus-use-nocem
21346 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
21347 by default.
21348
21349 @item gnus-nocem-groups
21350 @vindex gnus-nocem-groups
21351 Gnus will look for NoCeM messages in the groups in this list.  The
21352 default is 
21353 @lisp
21354 ("news.lists.filters" "news.admin.net-abuse.bulletins"
21355  "alt.nocem.misc" "news.admin.net-abuse.announce")
21356 @end lisp
21357
21358 @item gnus-nocem-issuers
21359 @vindex gnus-nocem-issuers
21360 There are many people issuing NoCeM messages.  This list says what
21361 people you want to listen to.  The default is
21362 @lisp
21363 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
21364  "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
21365 @end lisp
21366 fine, upstanding citizens all of them.
21367
21368 Known despammers that you can put in this list are listed at@*
21369 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
21370
21371 You do not have to heed NoCeM messages from all these people---just the
21372 ones you want to listen to.  You also don't have to accept all NoCeM
21373 messages from the people you like.  Each NoCeM message has a @dfn{type}
21374 header that gives the message a (more or less, usually less) rigorous
21375 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
21376 @samp{binary}, and @samp{troll}.  To specify this, you have to use
21377 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
21378 Each condition is either a string (which is a regexp that matches types
21379 you want to use) or a list on the form @code{(not @var{string})}, where
21380 @var{string} is a regexp that matches types you don't want to use.
21381
21382 For instance, if you want all NoCeM messages from Chris Lewis except his
21383 @samp{troll} messages, you'd say:
21384
21385 @lisp
21386 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
21387 @end lisp
21388
21389 On the other hand, if you just want nothing but his @samp{spam} and
21390 @samp{spew} messages, you'd say:
21391
21392 @lisp
21393 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
21394 @end lisp
21395
21396 The specs are applied left-to-right.
21397
21398
21399 @item gnus-nocem-verifyer
21400 @vindex gnus-nocem-verifyer
21401 @findex mc-verify
21402 This should be a function for verifying that the NoCeM issuer is who she
21403 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
21404 function.  If this is too slow and you don't care for verification
21405 (which may be dangerous), you can set this variable to @code{nil}.
21406
21407 If you want signed NoCeM messages to be verified and unsigned messages
21408 not to be verified (but used anyway), you could do something like:
21409
21410 @lisp
21411 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
21412
21413 (defun my-gnus-mc-verify ()
21414   (not (eq 'forged
21415            (ignore-errors
21416              (if (mc-verify)
21417                  t
21418                'forged)))))
21419 @end lisp
21420
21421 This might be dangerous, though.
21422
21423 @item gnus-nocem-directory
21424 @vindex gnus-nocem-directory
21425 This is where Gnus will store its NoCeM cache files.  The default is@*
21426 @file{~/News/NoCeM/}.
21427
21428 @item gnus-nocem-expiry-wait
21429 @vindex gnus-nocem-expiry-wait
21430 The number of days before removing old NoCeM entries from the cache.
21431 The default is 15.  If you make it shorter Gnus will be faster, but you
21432 might then see old spam.
21433
21434 @item gnus-nocem-check-from
21435 @vindex gnus-nocem-check-from
21436 Non-@code{nil} means check for valid issuers in message bodies.
21437 Otherwise don't bother fetching articles unless their author matches a
21438 valid issuer; that is much faster if you are selective about the
21439 issuers.
21440
21441 @item gnus-nocem-check-article-limit
21442 @vindex gnus-nocem-check-article-limit
21443 If non-@code{nil}, the maximum number of articles to check in any NoCeM
21444 group.  NoCeM groups can be huge and very slow to process.
21445
21446 @end table
21447
21448 Using NoCeM could potentially be a memory hog.  If you have many living
21449 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
21450 big.  If this is a problem, you should kill off all (or most) of your
21451 unsubscribed groups (@pxref{Subscription Commands}).
21452
21453
21454 @node Undo
21455 @section Undo
21456 @cindex undo
21457
21458 It is very useful to be able to undo actions one has done.  In normal
21459 Emacs buffers, it's easy enough---you just push the @code{undo} button.
21460 In Gnus buffers, however, it isn't that simple.
21461
21462 The things Gnus displays in its buffer is of no value whatsoever to
21463 Gnus---it's all just data designed to look nice to the user.
21464 Killing a group in the group buffer with @kbd{C-k} makes the line
21465 disappear, but that's just a side-effect of the real action---the
21466 removal of the group in question from the internal Gnus structures.
21467 Undoing something like that can't be done by the normal Emacs
21468 @code{undo} function.
21469
21470 Gnus tries to remedy this somewhat by keeping track of what the user
21471 does and coming up with actions that would reverse the actions the user
21472 takes.  When the user then presses the @code{undo} key, Gnus will run
21473 the code to reverse the previous action, or the previous actions.
21474 However, not all actions are easily reversible, so Gnus currently offers
21475 a few key functions to be undoable.  These include killing groups,
21476 yanking groups, and changing the list of read articles of groups.
21477 That's it, really.  More functions may be added in the future, but each
21478 added function means an increase in data to be stored, so Gnus will
21479 never be totally undoable.
21480
21481 @findex gnus-undo-mode
21482 @vindex gnus-use-undo
21483 @findex gnus-undo
21484 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
21485 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
21486 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
21487 command, which should feel kinda like the normal Emacs @code{undo}
21488 command.
21489
21490
21491 @node Predicate Specifiers
21492 @section Predicate Specifiers
21493 @cindex predicate specifiers
21494
21495 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
21496 form that allows flexible specification of predicates without having
21497 to type all that much.
21498
21499 These specifiers are lists consisting of functions, symbols and lists.
21500
21501 Here's an example:
21502
21503 @lisp
21504 (or gnus-article-unseen-p
21505     gnus-article-unread-p)
21506 @end lisp
21507
21508 The available symbols are @code{or}, @code{and} and @code{not}.  The
21509 functions all take one parameter.
21510
21511 @findex gnus-make-predicate
21512 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
21513 to create a function that can be called.  This input parameter to this
21514 function will be passed along to all the functions in the predicate
21515 specifier.
21516
21517
21518 @node Moderation
21519 @section Moderation
21520 @cindex moderation
21521
21522 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
21523 It is not included in the standard Gnus package.  Write a mail to
21524 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
21525 get a copy.
21526
21527 The moderation package is implemented as a minor mode for summary
21528 buffers.  Put
21529
21530 @lisp
21531 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
21532 @end lisp
21533
21534 in your @file{~/.gnus.el} file.
21535
21536 If you are the moderator of @samp{rec.zoofle}, this is how it's
21537 supposed to work:
21538
21539 @enumerate
21540 @item
21541 You split your incoming mail by matching on
21542 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
21543 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
21544
21545 @item
21546 You enter that group once in a while and post articles using the @kbd{e}
21547 (edit-and-post) or @kbd{s} (just send unedited) commands.
21548
21549 @item
21550 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
21551 articles that weren't approved by you, you can cancel them with the
21552 @kbd{c} command.
21553 @end enumerate
21554
21555 To use moderation mode in these two groups, say:
21556
21557 @lisp
21558 (setq gnus-moderated-list
21559       "^nnml:rec.zoofle$\\|^rec.zoofle$")
21560 @end lisp
21561
21562
21563 @node Image Enhancements
21564 @section Image Enhancements
21565
21566 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
21567 support images yet.}, is able to display pictures and stuff, so Gnus has
21568 taken advantage of that.
21569
21570 @menu
21571 * Picons::                      How to display pictures of what you're reading.
21572 * Smileys::                     Show all those happy faces the way they were meant to be shown.
21573 * X-Face::                      Display a funky, teensy black-and-white image.
21574 * XVarious::                    Other XEmacsy Gnusey variables.
21575 @end menu
21576
21577
21578 @node Picons
21579 @subsection Picons
21580
21581 @iftex
21582 @iflatex
21583 \include{picons}
21584 @end iflatex
21585 @end iftex
21586
21587 So@dots{}  You want to slow down your news reader even more!  This is a
21588 good way to do so.  It's also a great way to impress people staring
21589 over your shoulder as you read news.
21590
21591 What are Picons?  To quote directly from the Picons Web site:
21592
21593 @iftex
21594 @iflatex
21595 \margindex{}
21596 @end iflatex
21597 @end iftex
21598
21599 @quotation
21600 @dfn{Picons} is short for ``personal icons''.  They're small,
21601 constrained images used to represent users and domains on the net,
21602 organized into databases so that the appropriate image for a given
21603 e-mail address can be found.  Besides users and domains, there are picon
21604 databases for Usenet newsgroups and weather forecasts.  The picons are
21605 in either monochrome @code{XBM} format or color @code{XPM} and
21606 @code{GIF} formats.
21607 @end quotation
21608
21609 @vindex gnus-picon-databases
21610 For instructions on obtaining and installing the picons databases,
21611 point your Web browser at
21612 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
21613
21614 If you are using Debian GNU/Linux, saying @samp{apt-get install
21615 picons.*} will install the picons where Gnus can find them.
21616
21617 To enable displaying picons, simply make sure that
21618 @code{gnus-picon-databases} points to the directory containing the
21619 Picons databases.
21620
21621 The following variables offer control over where things are located.
21622
21623 @table @code
21624
21625 @item gnus-picon-databases
21626 @vindex gnus-picon-databases
21627 The location of the picons database.  This is a list of directories
21628 containing the @file{news}, @file{domains}, @file{users} (and so on)
21629 subdirectories.  Defaults to @code{("/usr/lib/picon"
21630 "/usr/local/faces")}.
21631
21632 @item gnus-picon-news-directories
21633 @vindex gnus-picon-news-directories
21634 List of subdirectories to search in @code{gnus-picon-databases} for
21635 newsgroups faces.  @code{("news")} is the default.
21636
21637 @item gnus-picon-user-directories
21638 @vindex gnus-picon-user-directories
21639 List of subdirectories to search in @code{gnus-picon-databases} for user
21640 faces.  @code{("users" "usenix" "local" "misc")} is the default.
21641
21642 @item gnus-picon-domain-directories
21643 @vindex gnus-picon-domain-directories
21644 List of subdirectories to search in @code{gnus-picon-databases} for
21645 domain name faces.  Defaults to @code{("domains")}.  Some people may
21646 want to add @samp{"unknown"} to this list.
21647
21648 @item gnus-picon-file-types
21649 @vindex gnus-picon-file-types
21650 Ordered list of suffixes on picon file names to try.  Defaults to
21651 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
21652
21653 @end table
21654
21655 @node Smileys
21656 @subsection Smileys
21657 @cindex smileys
21658
21659 @iftex
21660 @iflatex
21661 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
21662 \input{smiley}
21663 @end iflatex
21664 @end iftex
21665
21666 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
21667 currently the only package that uses Smiley, it is documented here.
21668
21669 In short---to use Smiley in Gnus, put the following in your
21670 @file{~/.gnus.el} file:
21671
21672 @lisp
21673 (setq gnus-treat-display-smileys t)
21674 @end lisp
21675
21676 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
21677 the like---to pictures and displays those instead of the text smiley
21678 faces.  The conversion is controlled by a list of regexps that matches
21679 text and maps that to file names.
21680
21681 @vindex smiley-regexp-alist
21682 The alist used is specified by the @code{smiley-regexp-alist}
21683 variable.  The first item in each element is the regexp to be matched;
21684 the second element is the regexp match group that is to be replaced by
21685 the picture; and the third element is the name of the file to be
21686 displayed.
21687
21688 The following variables customize where Smiley will look for these
21689 files:
21690
21691 @table @code
21692
21693 @item smiley-data-directory
21694 @vindex smiley-data-directory
21695 Where Smiley will look for smiley faces files.
21696
21697 @item gnus-smiley-file-types
21698 @vindex gnus-smiley-file-types
21699 List of suffixes on smiley file names to try.
21700
21701 @end table
21702
21703
21704 @node X-Face
21705 @subsection X-Face
21706 @cindex x-face
21707
21708 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
21709 depth) image that's supposed to represent the author of the message.
21710 It seems to be supported by an ever-growing number of mail and news
21711 readers.
21712
21713 @cindex x-face
21714 @findex gnus-article-display-x-face
21715 @findex gnus-article-x-face-command
21716 @vindex gnus-article-x-face-command
21717 @vindex gnus-article-x-face-too-ugly
21718 @iftex
21719 @iflatex
21720 \include{xface}
21721 @end iflatex
21722 @end iftex
21723 @c @anchor{X-Face}
21724
21725 Decoding an @code{X-Face} header either requires an Emacs that has
21726 @samp{compface} support (which most XEmacs versions has), or that you
21727 have @samp{compface} installed on your system.  If either is true,
21728 Gnus will default to displaying @code{X-Face} headers.
21729
21730 The variable that controls this is the
21731 @code{gnus-article-x-face-command} variable.  If this variable is a
21732 string, this string will be executed in a sub-shell.  If it is a
21733 function, this function will be called with the face as the argument.
21734 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
21735 the @code{From} header, the face will not be shown.
21736
21737 The default action under Emacs 20 is to fork off the @code{display}
21738 program@footnote{@code{display} is from the ImageMagick package.  For
21739 the @code{uncompface} and @code{icontopbm} programs look for a package
21740 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
21741 view the face.
21742
21743 Under XEmacs or Emacs 21+ with suitable image support, the default
21744 action is to display the face before the @code{From} header.  (It's
21745 nicer if XEmacs has been compiled with @code{X-Face} support---that
21746 will make display somewhat faster.  If there's no native @code{X-Face}
21747 support, Gnus will try to convert the @code{X-Face} header using
21748 external programs from the @code{pbmplus} package and
21749 friends.@footnote{On a GNU/Linux system look for packages with names
21750 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
21751
21752 (Note: @code{x-face} is used in the variable/function names, not
21753 @code{xface}).
21754
21755 Gnus provides a few convenience functions and variables to allow
21756 easier insertion of X-Face headers in outgoing messages.
21757
21758 @findex gnus-random-x-face
21759 @vindex gnus-convert-pbm-to-x-face-command
21760 @vindex gnus-x-face-directory
21761 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
21762 @code{gnus-x-face-directory} and picks one at random, and then
21763 converts it to the X-Face format by using the
21764 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
21765 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
21766 header data as a string.
21767
21768 @findex gnus-insert-random-x-face-header
21769 @code{gnus-insert-random-x-face-header} calls
21770 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
21771 randomly generated data.
21772
21773 @findex gnus-x-face-from-file
21774 @vindex gnus-convert-image-to-x-face-command
21775 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
21776 converts the file to X-Face format by using the
21777 @code{gnus-convert-image-to-x-face-command} shell command.
21778
21779 Here's how you would typically use the first function.  Put something
21780 like the following in your @file{~/.gnus.el} file:
21781
21782 @lisp
21783 (setq message-required-news-headers
21784       (nconc message-required-news-headers
21785              (list '(X-Face . gnus-random-x-face))))
21786 @end lisp
21787
21788 Using the last function would be something like this:
21789
21790 @lisp
21791 (setq message-required-news-headers
21792       (nconc message-required-news-headers
21793              (list '(X-Face . (lambda ()
21794                                 (gnus-x-face-from-file
21795                                  "~/My-face.gif"))))))
21796 @end lisp
21797
21798
21799 @node XVarious
21800 @subsection Various XEmacs Variables
21801
21802 @table @code
21803 @item gnus-xmas-glyph-directory
21804 @vindex gnus-xmas-glyph-directory
21805 This is where Gnus will look for pictures.  Gnus will normally
21806 auto-detect this directory, but you may set it manually if you have an
21807 unusual directory structure.
21808
21809 @item gnus-xmas-logo-color-alist
21810 @vindex gnus-xmas-logo-color-alist
21811 This is an alist where the key is a type symbol and the values are the
21812 foreground and background color of the splash page glyph.
21813
21814 @item gnus-xmas-logo-color-style
21815 @vindex gnus-xmas-logo-color-style
21816 This is the key used to look up the color in the alist described above.
21817 Valid values include @code{flame}, @code{pine}, @code{moss},
21818 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
21819 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
21820
21821 @item gnus-xmas-modeline-glyph
21822 @vindex gnus-xmas-modeline-glyph
21823 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
21824 default.
21825
21826 @end table
21827
21828 @subsubsection Toolbar
21829
21830 @table @code
21831
21832 @item gnus-use-toolbar
21833 @vindex gnus-use-toolbar
21834 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
21835 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
21836 @code{right-toolbar}, or @code{left-toolbar}.
21837
21838 @item gnus-group-toolbar
21839 @vindex gnus-group-toolbar
21840 The toolbar in the group buffer.
21841
21842 @item gnus-summary-toolbar
21843 @vindex gnus-summary-toolbar
21844 The toolbar in the summary buffer.
21845
21846 @item gnus-summary-mail-toolbar
21847 @vindex gnus-summary-mail-toolbar
21848 The toolbar in the summary buffer of mail groups.
21849
21850 @end table
21851
21852 @iftex
21853 @iflatex
21854 \margindex{}
21855 @end iflatex
21856 @end iftex
21857
21858
21859 @node Fuzzy Matching
21860 @section Fuzzy Matching
21861 @cindex fuzzy matching
21862
21863 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
21864 things like scoring, thread gathering and thread comparison.
21865
21866 As opposed to regular expression matching, fuzzy matching is very fuzzy.
21867 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
21868 means, and the implementation has changed over time.
21869
21870 Basically, it tries to remove all noise from lines before comparing.
21871 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
21872 out of the strings before comparing the results.  This often leads to
21873 adequate results---even when faced with strings generated by text
21874 manglers masquerading as newsreaders.
21875
21876
21877 @node Thwarting Email Spam
21878 @section Thwarting Email Spam
21879 @cindex email spam
21880 @cindex spam
21881 @cindex UCE
21882 @cindex unsolicited commercial email
21883
21884 In these last days of the Usenet, commercial vultures are hanging about
21885 and grepping through news like crazy to find email addresses they can
21886 foist off their scams and products to.  As a reaction to this, many
21887 people have started putting nonsense addresses into their @code{From}
21888 lines.  I think this is counterproductive---it makes it difficult for
21889 people to send you legitimate mail in response to things you write, as
21890 well as making it difficult to see who wrote what.  This rewriting may
21891 perhaps be a bigger menace than the unsolicited commercial email itself
21892 in the end.
21893
21894 The biggest problem I have with email spam is that it comes in under
21895 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
21896 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
21897 mail group, only to find two pyramid schemes, seven advertisements
21898 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
21899 and one mail asking me to repent and find some god.
21900
21901 This is annoying.  Here's what you can do about it.
21902
21903 @menu
21904 * The problem of spam::         Some background, and some solutions
21905 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
21906 * SpamAssassin::                How to use external anti-spam tools.
21907 * Hashcash::                    Reduce spam by burning CPU time.
21908 * Filtering Spam Using The Spam ELisp Package::  
21909 * Filtering Spam Using Statistics with spam-stat::  
21910 @end menu
21911
21912 @node The problem of spam
21913 @subsection The problem of spam
21914 @cindex email spam
21915 @cindex spam filtering approaches
21916 @cindex filtering approaches, spam
21917 @cindex UCE
21918 @cindex unsolicited commercial email
21919
21920 First, some background on spam.
21921
21922 If you have access to e-mail, you are familiar with spam (technically
21923 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it exists
21924 because e-mail delivery is very cheap compared to paper mail, so only
21925 a very small percentage of people need to respond to an UCE to make it
21926 worthwhile to the advertiser.  Ironically, one of the most common
21927 spams is the one offering a database of e-mail addresses for further
21928 spamming.  Senders of spam are usually called @emph{spammers}, but terms like
21929 @emph{vermin}, @emph{scum}, and @emph{morons} are in common use as well.
21930
21931 Spam comes from a wide variety of sources.  It is simply impossible to
21932 dispose of all spam without discarding useful messages.  A good
21933 example is the TMDA system, which requires senders
21934 unknown to you to confirm themselves as legitimate senders before
21935 their e-mail can reach you.  Without getting into the technical side
21936 of TMDA, a downside is clearly that e-mail from legitimate sources may
21937 be discarded if those sources can't or won't confirm themselves
21938 through the TMDA system.  Another problem with TMDA is that it
21939 requires its users to have a basic understanding of e-mail delivery
21940 and processing.
21941
21942 The simplest approach to filtering spam is filtering.  If you get 200
21943 spam messages per day from @samp{random-address@@vmadmin.com}, you
21944 block @samp{vmadmin.com}.  If you get 200 messages about
21945 @samp{VIAGRA}, you discard all messages with @samp{VIAGRA} in the
21946 message.  This, unfortunately, is a great way to discard legitimate
21947 e-mail.  For instance, the very informative and useful RISKS digest
21948 has been blocked by overzealous mail filters because it
21949 @strong{contained} words that were common in spam messages.
21950 Nevertheless, in isolated cases, with great care, direct filtering of
21951 mail can be useful.
21952
21953 Another approach to filtering e-mail is the distributed spam
21954 processing, for instance DCC implements such a system.  In essence,
21955 @code{N} systems around the world agree that a machine @samp{X} in
21956 China, Ghana, or California is sending out spam e-mail, and these
21957 @code{N} systems enter @samp{X} or the spam e-mail from @samp{X} into
21958 a database.  The criteria for spam detection vary---it may be the
21959 number of messages sent, the content of the messages, and so on.  When
21960 a user of the distributed processing system wants to find out if a
21961 message is spam, he consults one of those @code{N} systems.
21962
21963 Distributed spam processing works very well against spammers that send
21964 a large number of messages at once, but it requires the user to set up
21965 fairly complicated checks.  There are commercial and free distributed
21966 spam processing systems.  Distributed spam processing has its risks as
21967 well.  For instance legitimate e-mail senders have been accused of
21968 sending spam, and their web sites have been shut down for some time
21969 because of the incident.
21970
21971 The statistical approach to spam filtering is also popular.  It is
21972 based on a statistical analysis of previous spam messages.  Usually
21973 the analysis is a simple word frequency count, with perhaps pairs of
21974 words or 3-word combinations thrown into the mix.  Statistical
21975 analysis of spam works very well in most of the cases, but it can
21976 classify legitimate e-mail as spam in some cases.  It takes time to
21977 run the analysis, the full message must be analyzed, and the user has
21978 to store the database of spam analyses.
21979
21980 @node Anti-Spam Basics
21981 @subsection Anti-Spam Basics
21982 @cindex email spam
21983 @cindex spam
21984 @cindex UCE
21985 @cindex unsolicited commercial email
21986
21987 One way of dealing with spam is having Gnus split out all spam into a
21988 @samp{spam} mail group (@pxref{Splitting Mail}).
21989
21990 First, pick one (1) valid mail address that you can be reached at, and
21991 put it in your @code{From} header of all your news articles.  (I've
21992 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
21993 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
21994 sysadmin whether your sendmail installation accepts keywords in the local
21995 part of the mail address.)
21996
21997 @lisp
21998 (setq message-default-news-headers
21999       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
22000 @end lisp
22001
22002 Then put the following split rule in @code{nnmail-split-fancy}
22003 (@pxref{Fancy Mail Splitting}):
22004
22005 @lisp
22006 (
22007  ...
22008  (to "larsi@@trym.ifi.uio.no"
22009       (| ("subject" "re:.*" "misc")
22010          ("references" ".*@@.*" "misc")
22011          "spam"))
22012  ...
22013 )
22014 @end lisp
22015
22016 This says that all mail to this address is suspect, but if it has a
22017 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
22018 header, it's probably ok.  All the rest goes to the @samp{spam} group.
22019 (This idea probably comes from Tim Pierce.)
22020
22021 In addition, many mail spammers talk directly to your @acronym{SMTP} server
22022 and do not include your email address explicitly in the @code{To}
22023 header.  Why they do this is unknown---perhaps it's to thwart this
22024 thwarting scheme?  In any case, this is trivial to deal with---you just
22025 put anything not addressed to you in the @samp{spam} group by ending
22026 your fancy split rule in this way:
22027
22028 @lisp
22029 (
22030  ...
22031  (to "larsi" "misc")
22032  "spam")
22033 @end lisp
22034
22035 In my experience, this will sort virtually everything into the right
22036 group.  You still have to check the @samp{spam} group from time to time to
22037 check for legitimate mail, though.  If you feel like being a good net
22038 citizen, you can even send off complaints to the proper authorities on
22039 each unsolicited commercial email---at your leisure.
22040
22041 This works for me.  It allows people an easy way to contact me (they can
22042 just press @kbd{r} in the usual way), and I'm not bothered at all with
22043 spam.  It's a win-win situation.  Forging @code{From} headers to point
22044 to non-existent domains is yucky, in my opinion.
22045
22046
22047
22048 @node SpamAssassin
22049 @subsection SpamAssassin, Vipul's Razor, DCC, etc
22050 @cindex SpamAssassin
22051 @cindex Vipul's Razor
22052 @cindex DCC
22053
22054 The days where the hints in the previous section was sufficient in
22055 avoiding spam is coming to an end.  There are many tools out there
22056 that claim to reduce the amount of spam you get.  This section could
22057 easily become outdated fast, as new products replace old, but
22058 fortunately most of these tools seem to have similar interfaces.  Even
22059 though this section will use SpamAssassin as an example, it should be
22060 easy to adapt it to most other tools.
22061
22062 If the tool you are using is not installed on the mail server, you
22063 need to invoke it yourself.  Ideas on how to use the
22064 @code{:postscript} mail source parameter (@pxref{Mail Source
22065 Specifiers}) follows.
22066
22067 @lisp
22068 (setq mail-sources
22069       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
22070         (pop :user "jrl"
22071              :server "pophost"
22072              :postscript "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
22073 @end lisp
22074
22075 Once you managed to process your incoming spool somehow, thus making
22076 the mail contain e.g. a header indicating it is spam, you are ready to
22077 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
22078
22079 @lisp
22080 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
22081                              ...))
22082 @end lisp
22083
22084 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
22085
22086 @lisp
22087 (setq nnmail-split-methods 'nnmail-split-fancy
22088       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
22089                              ...))
22090 @end lisp
22091
22092 Some people might not like the idea of piping the mail through various
22093 programs using a @code{:prescript} (if some program is buggy, you
22094 might lose all mail).  If you are one of them, another solution is to
22095 call the external tools during splitting.  Example fancy split method:
22096
22097 @lisp
22098 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
22099                              ...))
22100 (defun kevin-spamassassin ()
22101   (save-excursion
22102     (let ((buf (or (get-buffer " *nnmail incoming*")
22103                    (get-buffer " *nnml move*"))))
22104       (if (not buf)
22105           (progn (message "Oops, cannot find message buffer") nil)
22106         (set-buffer buf)
22107         (if (eq 1 (call-process-region (point-min) (point-max)
22108                                        "spamc" nil nil nil "-c"))
22109             "spam")))))
22110 @end lisp
22111
22112 That is about it.  As some spam is likely to get through anyway, you
22113 might want to have a nifty function to call when you happen to read
22114 spam.  And here is the nifty function:
22115
22116 @lisp
22117  (defun my-gnus-raze-spam ()
22118   "Submit SPAM to Vipul's Razor, then mark it as expirable."
22119   (interactive)
22120   (gnus-summary-show-raw-article)
22121   (gnus-summary-save-in-pipe "razor-report -f -d")
22122   (gnus-summary-mark-as-expirable 1))
22123 @end lisp
22124
22125 @node Hashcash
22126 @subsection Hashcash
22127 @cindex hashcash
22128
22129 A novel technique to fight spam is to require senders to do something
22130 costly for each message they send.  This has the obvious drawback that
22131 you cannot rely on that everyone in the world uses this technique,
22132 since it is not part of the Internet standards, but it may be useful
22133 in smaller communities.
22134
22135 While the tools in the previous section work well in practice, they
22136 work only because the tools are constantly maintained and updated as
22137 new form of spam appears.  This means that a small percentage of spam
22138 will always get through.  It also means that somewhere, someone needs
22139 to read lots of spam to update these tools.  Hashcash avoids that, but
22140 instead requires that everyone you communicate with supports the
22141 scheme.  You can view the two approaches as pragmatic vs dogmatic.
22142 The approaches have their own advantages and disadvantages, but as
22143 often in the real world, a combination of them is stronger than either
22144 one of them separately.
22145
22146 @cindex X-Hashcash
22147 The ``something costly'' is to burn CPU time, more specifically to
22148 compute a hash collision up to a certain number of bits.  The
22149 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
22150 header. For more details, and for the external application
22151 @code{hashcash} you need to install to use this feature, see
22152 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
22153 information can be found at @uref{http://www.camram.org/}.
22154
22155 If you wish to call hashcash for each message you send, say something
22156 like:
22157
22158 @lisp
22159 (require 'hashcash)
22160 (add-hook 'message-send-hook 'mail-add-payment)
22161 @end lisp
22162
22163 The @code{hashcash.el} library can be found in the Gnus development
22164 contrib directory. or at
22165 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}.
22166
22167 You will need to set up some additional variables as well:
22168
22169 @table @code
22170
22171 @item hashcash-default-payment
22172 @vindex hashcash-default-payment
22173 This variable indicates the default number of bits the hash collision
22174 should consist of.  By default this is 0, meaning nothing will be
22175 done.  Suggested useful values include 17 to 29.
22176
22177 @item hashcash-payment-alist
22178 @vindex hashcash-payment-alist
22179 Some receivers may require you to spend burn more CPU time than the
22180 default.  This variable contains a list of @samp{(@var{addr}
22181 @var{amount})} cells, where @var{addr} is the receiver (email address
22182 or newsgroup) and @var{amount} is the number of bits in the collision
22183 that is needed.  It can also contain @samp{(@var{addr} @var{string}
22184 @var{amount})} cells, where the @var{string} is the string to use
22185 (normally the email address or newsgroup name is used).
22186
22187 @item hashcash
22188 @vindex hashcash
22189 Where the @code{hashcash} binary is installed.
22190
22191 @end table
22192
22193 Currently there is no built in functionality in Gnus to verify
22194 hashcash cookies, it is expected that this is performed by your hand
22195 customized mail filtering scripts.  Improvements in this area would be
22196 a useful contribution, however.
22197
22198 @node Filtering Spam Using The Spam ELisp Package
22199 @subsection Filtering Spam Using The Spam ELisp Package
22200 @cindex spam filtering
22201 @cindex spam
22202
22203 The idea behind @code{spam.el} is to have a control center for spam detection
22204 and filtering in Gnus.  To that end, @code{spam.el} does two things: it
22205 filters incoming mail, and it analyzes mail known to be spam or ham.
22206 @emph{Ham} is the name used throughout @code{spam.el} to indicate
22207 non-spam messages.
22208
22209 So, what happens when you load @code{spam.el}?  First of all, you get
22210 the following keyboard commands:
22211
22212 @table @kbd
22213
22214 @item M-d
22215 @itemx M s x
22216 @itemx S x
22217 @kindex M-d
22218 @kindex S x
22219 @kindex M s x
22220 @findex gnus-summary-mark-as-spam
22221 @code{gnus-summary-mark-as-spam}.
22222
22223 Mark current article as spam, showing it with the @samp{$} mark.
22224 Whenever you see a spam article, make sure to mark its summary line
22225 with @kbd{M-d} before leaving the group.  This is done automatically
22226 for unread articles in @emph{spam} groups.
22227
22228 @item M s t
22229 @itemx S t
22230 @kindex M s t
22231 @kindex S t
22232 @findex spam-bogofilter-score
22233 @code{spam-bogofilter-score}.
22234
22235 You must have Bogofilter installed for that command to work properly.
22236
22237 @xref{Bogofilter}.
22238
22239 @end table
22240
22241 Also, when you load @code{spam.el}, you will be able to customize its
22242 variables.  Try @code{customize-group} on the @samp{spam} variable
22243 group.
22244
22245 @vindex gnus-spam-process-newsgroups
22246 The concepts of ham processors and spam processors are very important.
22247 Ham processors and spam processors for a group can be set with the
22248 @code{spam-process} group parameter, or the
22249 @code{gnus-spam-process-newsgroups} variable.  Ham processors take
22250 mail known to be non-spam (@emph{ham}) and process it in some way so
22251 that later similar mail will also be considered non-spam.  Spam
22252 processors take mail known to be spam and process it so similar spam
22253 will be detected later.
22254
22255 @vindex gnus-spam-newsgroup-contents
22256 Gnus learns from the spam you get.  You have to collect your spam in
22257 one or more spam groups, and set or customize the variable
22258 @code{spam-junk-mailgroups} as appropriate.  You can also declare
22259 groups to contain spam by setting their group parameter
22260 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
22261 by customizing the corresponding variable
22262 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
22263 parameter and the @code{gnus-spam-newsgroup-contents} variable can
22264 also be used to declare groups as @emph{ham} groups if you set their
22265 classification to @code{gnus-group-spam-classification-ham}.  If
22266 groups are not classified by means of @code{spam-junk-mailgroups},
22267 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
22268 considered @emph{unclassified}.  All groups are unclassified by
22269 default.
22270
22271 @vindex gnus-spam-mark
22272 @cindex $
22273 In spam groups, all messages are considered to be spam by default:
22274 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
22275 group.  If you have seen a message, had it marked as spam, then
22276 unmarked it, it won't be marked as spam when you enter the group
22277 thereafter.  You can disable that behavior, so all unread messages
22278 will get the @samp{$} mark, if you set the
22279 @code{spam-mark-only-unseen-as-spam} parameter to nil.  You should
22280 remove the @samp{$} mark when you are in the group summary buffer for
22281 every message that is not spam after all.  To remove the @samp{$}
22282 mark, you can use @kbd{M-u} to ``unread'' the article, or @kbd{d} for
22283 declaring it read the non-spam way.  When you leave a group, all
22284 spam-marked (@samp{$}) articles are sent to a spam processor which
22285 will study them as spam samples.
22286
22287 Messages may also be deleted in various other ways, and unless
22288 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
22289 and @samp{r} for default read or explicit delete, marks @samp{X} and
22290 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
22291 low scores, are all considered to be associated with articles which
22292 are not spam.  This assumption might be false, in particular if you
22293 use kill files or score files as means for detecting genuine spam, you
22294 should then adjust the @code{ham-marks} group parameter.
22295
22296 @defvar ham-marks
22297 You can customize this group or topic parameter to be the list of
22298 marks you want to consider ham.  By default, the list contains the
22299 deleted, read, killed, kill-filed, and low-score marks.
22300 @end defvar
22301
22302 @defvar spam-marks
22303 You can customize this group or topic parameter to be the list of
22304 marks you want to consider spam.  By default, the list contains only
22305 the spam mark.
22306 @end defvar
22307
22308 When you leave @emph{any} group, regardless of its
22309 @code{spam-contents} classification, all spam-marked articles are sent
22310 to a spam processor, which will study these as spam samples.  If you
22311 explicit kill a lot, you might sometimes end up with articles marked
22312 @samp{K} which you never saw, and which might accidentally contain
22313 spam.  Best is to make sure that real spam is marked with @samp{$},
22314 and nothing else.
22315
22316 @vindex gnus-ham-process-destinations
22317 When you leave a @emph{spam} group, all spam-marked articles are
22318 marked as expired after processing with the spam processor.  This is
22319 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
22320 @strong{ham} articles in a spam group will be moved to a location
22321 determined by either the @code{ham-process-destination} group
22322 parameter or a match in the @code{gnus-ham-process-destinations}
22323 variable, which is a list of regular expressions matched with group
22324 names (it's easiest to customize this variable with
22325 @code{customize-variable gnus-ham-process-destinations}).  The ultimate
22326 location is a group name.  If the @code{ham-process-destination}
22327 parameter is not set, ham articles are left in place.  If the
22328 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
22329 set, the ham articles are marked as unread before being moved.
22330
22331 When you leave a @emph{ham} group, all ham-marked articles are sent to
22332 a ham processor, which will study these as non-spam samples.
22333
22334 @vindex gnus-spam-process-destinations
22335 When you leave a @emph{ham} or @emph{unclassified} group, all
22336 @strong{spam} articles are moved to a location determined by either
22337 the @code{spam-process-destination} group parameter or a match in the
22338 @code{gnus-spam-process-destinations} variable, which is a list of
22339 regular expressions matched with group names (it's easiest to
22340 customize this variable with @code{customize-variable
22341 gnus-spam-process-destinations}).  The ultimate location is a group
22342 name.  If the @code{spam-process-destination} parameter is not set,
22343 the spam articles are only expired.
22344
22345 To use the @code{spam.el} facilities for incoming mail filtering, you
22346 must add the following to your fancy split list
22347 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
22348
22349 @example
22350 (: spam-split)
22351 @end example
22352
22353 Note that the fancy split may be called @code{nnmail-split-fancy} or
22354 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
22355 nnimap back ends to retrieve your mail.
22356
22357 The @code{spam-split} function will process incoming mail and send the
22358 mail considered to be spam into the group name given by the variable
22359 @code{spam-split-group}.  By default that group name is @samp{spam},
22360 but you can customize @code{spam-split-group}.
22361
22362 You can also give @code{spam-split} a parameter,
22363 e.g. @samp{'spam-use-regex-headers}.  Why is this useful?
22364
22365 Take these split rules (with @code{spam-use-regex-headers} and
22366 @code{spam-use-blackholes} set):
22367
22368 @example
22369  nnimap-split-fancy '(|
22370                       (any "ding" "ding")
22371                       (: spam-split)
22372                       ;; default mailbox
22373                       "mail")
22374 @end example
22375
22376 Now, the problem is that you want all ding messages to make it to the
22377 ding folder.  But that will let obvious spam (for example, spam
22378 detected by SpamAssassin, and @code{spam-use-regex-headers}) through,
22379 when it's sent to the ding list.  On the other hand, some messages to
22380 the ding list are from a mail server in the blackhole list, so the
22381 invocation of @code{spam-split} can't be before the ding rule.
22382
22383 You can let SpamAssassin headers supercede ding rules, but all other
22384 @code{spam-split} rules (including a second invocation of the
22385 regex-headers check) will be after the ding rule:
22386
22387 @example
22388  nnimap-split-fancy '(|
22389                       (: spam-split 'spam-use-regex-headers)
22390                       (any "ding" "ding")
22391                       (: spam-split)
22392                       ;; default mailbox
22393                       "mail")
22394 @end example
22395
22396 Basically, this lets you invoke specific @code{spam-split} checks
22397 depending on your particular needs.  You don't have to throw all mail
22398 into all the spam tests.  Another reason why this is nice is that
22399 messages to mailing lists you have rules for don't have to have
22400 resource-intensive blackhole checks performed on them.  You could also
22401 specify different spam checks for your nnmail split vs. your nnimap
22402 split.  Go crazy.
22403
22404 You still have to have specific checks such as
22405 @code{spam-use-regex-headers} set to t, even if you specifically
22406 invoke @code{spam-split} with the check.  The reason is that when
22407 loading @code{spam.el}, some conditional loading is done depending on
22408 what @code{spam-use-xyz} variables you have set.
22409
22410 @emph{Note for IMAP users}
22411
22412 The boolean variable @code{nnimap-split-download-body} needs to be
22413 set, if you want to split based on the whole message instead of just
22414 the headers.  By default, the nnimap back end will only retrieve the
22415 message headers.  If you use @code{spam-check-bogofilter},
22416 @code{spam-check-ifile}, or @code{spam-check-stat} (the splitters that
22417 can benefit from the full message body), you should set this variable.
22418 It is not set by default because it will slow @acronym{IMAP} down, and
22419 that is not an appropriate decision to make on behalf of the user.
22420
22421 @xref{Splitting in IMAP}.
22422
22423 @emph{TODO: Currently, spam.el only supports insertion of articles
22424 into a back end.  There is no way to tell spam.el that an article is no
22425 longer spam or ham.}
22426
22427 @emph{TODO: spam.el needs to provide a uniform way of training all the
22428 statistical databases.  Some have that functionality built-in, others
22429 don't.}
22430
22431 The following are the methods you can use to control the behavior of
22432 @code{spam-split} and their corresponding spam and ham processors:
22433
22434 @menu
22435 * Blacklists and Whitelists::   
22436 * BBDB Whitelists::             
22437 * Gmane Spam Reporting::        
22438 * Anti-spam Hashcash Payments::  
22439 * Blackholes::                  
22440 * Regular Expressions Header Matching::  
22441 * Bogofilter::                  
22442 * ifile spam filtering::        
22443 * spam-stat spam filtering::    
22444 * Extending the spam elisp package::  
22445 @end menu
22446
22447 @node Blacklists and Whitelists
22448 @subsubsection Blacklists and Whitelists
22449 @cindex spam filtering
22450 @cindex whitelists, spam filtering
22451 @cindex blacklists, spam filtering
22452 @cindex spam
22453
22454 @defvar spam-use-blacklist
22455
22456 Set this variable to @code{t} if you want to use blacklists when
22457 splitting incoming mail.  Messages whose senders are in the blacklist
22458 will be sent to the @code{spam-split-group}.  This is an explicit
22459 filter, meaning that it acts only on mail senders @emph{declared} to
22460 be spammers.
22461
22462 @end defvar
22463
22464 @defvar spam-use-whitelist
22465
22466 Set this variable to @code{t} if you want to use whitelists when
22467 splitting incoming mail.  Messages whose senders are not in the
22468 whitelist will be sent to the next spam-split rule.  This is an
22469 explicit filter, meaning that unless someone is in the whitelist, their
22470 messages are not assumed to be spam or ham.
22471
22472 @end defvar
22473
22474 @defvar spam-use-whitelist-exclusive
22475
22476 Set this variable to @code{t} if you want to use whitelists as an
22477 implicit filter, meaning that every message will be considered spam
22478 unless the sender is in the whitelist.  Use with care.
22479
22480 @end defvar
22481
22482 @defvar gnus-group-spam-exit-processor-blacklist
22483
22484 Add this symbol to a group's @code{spam-process} parameter by
22485 customizing the group parameters or the
22486 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22487 added to a group's @code{spam-process} parameter, the senders of
22488 spam-marked articles will be added to the blacklist.
22489
22490 @end defvar
22491
22492 @defvar gnus-group-ham-exit-processor-whitelist
22493
22494 Add this symbol to a group's @code{spam-process} parameter by
22495 customizing the group parameters or the
22496 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22497 added to a group's @code{spam-process} parameter, the senders of
22498 ham-marked articles in @emph{ham} groups will be added to the
22499 whitelist.  Note that this ham processor has no effect in @emph{spam}
22500 or @emph{unclassified} groups.
22501
22502 @end defvar
22503
22504 Blacklists are lists of regular expressions matching addresses you
22505 consider to be spam senders.  For instance, to block mail from any
22506 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
22507 blacklist.  You start out with an empty blacklist.  Blacklist entries
22508 use the Emacs regular expression syntax.
22509
22510 Conversely, whitelists tell Gnus what addresses are considered
22511 legitimate.  All messages from whitelisted addresses are considered
22512 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
22513 Emacs regular expression syntax.
22514
22515 The blacklist and whitelist file locations can be customized with the
22516 @code{spam-directory} variable (@file{~/News/spam} by default), or
22517 the @code{spam-whitelist} and @code{spam-blacklist} variables
22518 directly.  The whitelist and blacklist files will by default be in the
22519 @code{spam-directory} directory, named @file{whitelist} and
22520 @file{blacklist} respectively.
22521
22522 @node BBDB Whitelists
22523 @subsubsection BBDB Whitelists
22524 @cindex spam filtering
22525 @cindex BBDB whitelists, spam filtering
22526 @cindex BBDB, spam filtering
22527 @cindex spam
22528
22529 @defvar spam-use-BBDB
22530
22531 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
22532 Whitelists}), but uses the BBDB as the source of whitelisted
22533 addresses, without regular expressions.  You must have the BBDB loaded
22534 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
22535 not in the BBDB will be sent to the next spam-split rule.  This is an
22536 explicit filter, meaning that unless someone is in the BBDB, their
22537 messages are not assumed to be spam or ham.
22538
22539 @end defvar
22540
22541 @defvar spam-use-BBDB-exclusive
22542
22543 Set this variable to @code{t} if you want to use the BBDB as an
22544 implicit filter, meaning that every message will be considered spam
22545 unless the sender is in the BBDB.  Use with care.  Only sender
22546 addresses in the BBDB will be allowed through; all others will be
22547 classified as spammers.
22548
22549 @end defvar
22550
22551 @defvar gnus-group-ham-exit-processor-BBDB
22552
22553 Add this symbol to a group's @code{spam-process} parameter by
22554 customizing the group parameters or the
22555 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22556 added to a group's @code{spam-process} parameter, the senders of
22557 ham-marked articles in @emph{ham} groups will be added to the
22558 BBDB.  Note that this ham processor has no effect in @emph{spam}
22559 or @emph{unclassified} groups.
22560
22561 @end defvar
22562
22563 @node Gmane Spam Reporting
22564 @subsubsection Gmane Spam Reporting
22565 @cindex spam reporting
22566 @cindex Gmane, spam reporting
22567 @cindex Gmane, spam reporting
22568 @cindex spam
22569
22570 @defvar gnus-group-spam-exit-processor-report-gmane
22571
22572 Add this symbol to a group's @code{spam-process} parameter by
22573 customizing the group parameters or the
22574 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22575 added to a group's @code{spam-process} parameter, the spam-marked
22576 articles groups will be reported to the Gmane administrators.
22577
22578 @end defvar
22579
22580 @node Anti-spam Hashcash Payments
22581 @subsubsection Anti-spam Hashcash Payments
22582 @cindex spam filtering
22583 @cindex hashcash, spam filtering
22584 @cindex spam
22585
22586 @defvar spam-use-hashcash
22587
22588 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
22589 Whitelists}), but uses hashcash tokens for whitelisting messages
22590 instead of the sender address.  You must have the @code{hashcash.el}
22591 package loaded for @code{spam-use-hashcash} to work properly.
22592 Messages without a hashcash payment token will be sent to the next
22593 spam-split rule.  This is an explicit filter, meaning that unless a
22594 hashcash token is found, the messages are not assumed to be spam or
22595 ham.
22596
22597 @end defvar
22598
22599 @node Blackholes
22600 @subsubsection Blackholes
22601 @cindex spam filtering
22602 @cindex blackholes, spam filtering
22603 @cindex spam
22604
22605 @defvar spam-use-blackholes
22606
22607 This option is disabled by default.  You can let Gnus consult the
22608 blackhole-type distributed spam processing systems (DCC, for instance)
22609 when you set this option.  The variable @code{spam-blackhole-servers}
22610 holds the list of blackhole servers Gnus will consult.  The current
22611 list is fairly comprehensive, but make sure to let us know if it
22612 contains outdated servers.
22613
22614 The blackhole check uses the @code{dig.el} package, but you can tell
22615 @code{spam.el} to use @code{dns.el} instead for better performance if
22616 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
22617 this time to set @code{spam-use-dig} to @code{nil} despite the
22618 possible performance improvements, because some users may be unable to
22619 use it, but you can try it and see if it works for you.
22620
22621 @end defvar
22622
22623 @defvar spam-blackhole-servers
22624
22625 The list of servers to consult for blackhole checks.
22626
22627 @end defvar
22628
22629 @defvar spam-blackhole-good-server-regex
22630
22631 A regular expression for IPs that should not be checked against the
22632 blackhole server list.  When set to @code{nil}, it has no effect.
22633
22634 @end defvar
22635
22636 @defvar spam-use-dig
22637
22638 Use the @code{dig.el} package instead of the @code{dns.el} package.
22639 The default setting of @code{t} is recommended.
22640
22641 @end defvar
22642
22643 Blackhole checks are done only on incoming mail.  There is no spam or
22644 ham processor for blackholes.
22645
22646 @node Regular Expressions Header Matching
22647 @subsubsection Regular Expressions Header Matching
22648 @cindex spam filtering
22649 @cindex regular expressions header matching, spam filtering
22650 @cindex spam
22651
22652 @defvar spam-use-regex-headers
22653
22654 This option is disabled by default.  You can let Gnus check the
22655 message headers against lists of regular expressions when you set this
22656 option.  The variables @code{spam-regex-headers-spam} and
22657 @code{spam-regex-headers-ham} hold the list of regular expressions.
22658 Gnus will check against the message headers to determine if the
22659 message is spam or ham, respectively.
22660
22661 @end defvar
22662
22663 @defvar spam-regex-headers-spam
22664
22665 The list of regular expressions that, when matched in the headers of
22666 the message, positively identify it as spam.
22667
22668 @end defvar
22669
22670 @defvar spam-regex-headers-ham
22671
22672 The list of regular expressions that, when matched in the headers of
22673 the message, positively identify it as ham.
22674
22675 @end defvar
22676
22677 Regular expression header checks are done only on incoming mail.
22678 There is no specific spam or ham processor for regular expressions.
22679
22680 @node Bogofilter
22681 @subsubsection Bogofilter
22682 @cindex spam filtering
22683 @cindex bogofilter, spam filtering
22684 @cindex spam
22685
22686 @defvar spam-use-bogofilter
22687
22688 Set this variable if you want @code{spam-split} to use Eric Raymond's
22689 speedy Bogofilter.
22690
22691 With a minimum of care for associating the @samp{$} mark for spam
22692 articles only, Bogofilter training all gets fairly automatic.  You
22693 should do this until you get a few hundreds of articles in each
22694 category, spam or not.  The command @kbd{S t} in summary mode, either
22695 for debugging or for curiosity, shows the @emph{spamicity} score of
22696 the current article (between 0.0 and 1.0).
22697
22698 Bogofilter determines if a message is spam based on an internal
22699 threshold, set at compilation time.  That threshold can't be
22700 customized.
22701
22702 If the @code{bogofilter} executable is not in your path, Bogofilter
22703 processing will be turned off.
22704
22705 You should not enable this if you use @code{spam-use-bogofilter-headers}.
22706
22707 @end defvar
22708
22709 @defvar spam-use-bogofilter-headers
22710
22711 Set this variable if you want @code{spam-split} to use Eric Raymond's
22712 speedy Bogofilter, looking only at the message headers.  It works
22713 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
22714 must be in the message already.  Normally you would do this with a
22715 procmail recipe or something similar; consult the Bogofilter
22716 installation documents for details.
22717
22718 You should not enable this if you use @code{spam-use-bogofilter}.
22719
22720 @end defvar
22721
22722 @defvar gnus-group-spam-exit-processor-bogofilter
22723 Add this symbol to a group's @code{spam-process} parameter by
22724 customizing the group parameters or the
22725 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22726 added to a group's @code{spam-process} parameter, spam-marked articles
22727 will be added to the Bogofilter spam database.
22728 @end defvar
22729
22730 @defvar gnus-group-ham-exit-processor-bogofilter
22731 Add this symbol to a group's @code{spam-process} parameter by
22732 customizing the group parameters or the
22733 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22734 added to a group's @code{spam-process} parameter, the ham-marked
22735 articles in @emph{ham} groups will be added to the Bogofilter database
22736 of non-spam messages.  Note that this ham processor has no effect in
22737 @emph{spam} or @emph{unclassified} groups.
22738 @end defvar
22739
22740 @defvar spam-bogofilter-database-directory
22741
22742 This is the directory where Bogofilter will store its databases.  It
22743 is not specified by default, so Bogofilter will use its own default
22744 database directory.
22745
22746 @end defvar
22747
22748 The Bogofilter mail classifier is similar to ifile in intent and
22749 purpose.  A ham and a spam processor are provided, plus the
22750 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
22751 variables to indicate to spam-split that Bogofilter should either be
22752 used, or has already been used on the article.  The 0.9.2.1 version of
22753 Bogofilter was used to test this functionality.
22754
22755 @node ifile spam filtering
22756 @subsubsection ifile spam filtering
22757 @cindex spam filtering
22758 @cindex ifile, spam filtering
22759 @cindex spam
22760
22761 @defvar spam-use-ifile
22762
22763 Enable this variable if you want @code{spam-split} to use ifile, a
22764 statistical analyzer similar to Bogofilter.
22765
22766 @end defvar
22767
22768 @defvar spam-ifile-all-categories
22769
22770 Enable this variable if you want @code{spam-use-ifile} to give you all
22771 the ifile categories, not just spam/non-spam.  If you use this, make
22772 sure you train ifile as described in its documentation.
22773
22774 @end defvar
22775
22776 @defvar spam-ifile-spam-category
22777
22778 This is the category of spam messages as far as ifile is concerned.
22779 The actual string used is irrelevant, but you probably want to leave
22780 the default value of @samp{spam}.
22781 @end defvar
22782
22783 @defvar spam-ifile-database-path
22784
22785 This is the filename for the ifile database.  It is not specified by
22786 default, so ifile will use its own default database name.
22787
22788 @end defvar
22789
22790 The ifile mail classifier is similar to Bogofilter in intent and
22791 purpose.  A ham and a spam processor are provided, plus the
22792 @code{spam-use-ifile} variable to indicate to spam-split that ifile
22793 should be used.  The 1.2.1 version of ifile was used to test this
22794 functionality.
22795
22796 @node spam-stat spam filtering
22797 @subsubsection spam-stat spam filtering
22798 @cindex spam filtering
22799 @cindex spam-stat, spam filtering
22800 @cindex spam-stat
22801 @cindex spam
22802
22803 @xref{Filtering Spam Using Statistics with spam-stat}.
22804
22805 @defvar spam-use-stat
22806
22807 Enable this variable if you want @code{spam-split} to use
22808 spam-stat.el, an Emacs Lisp statistical analyzer.
22809
22810 @end defvar
22811
22812 @defvar gnus-group-spam-exit-processor-stat
22813 Add this symbol to a group's @code{spam-process} parameter by
22814 customizing the group parameters or the
22815 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22816 added to a group's @code{spam-process} parameter, the spam-marked
22817 articles will be added to the spam-stat database of spam messages.
22818 @end defvar
22819
22820 @defvar gnus-group-ham-exit-processor-stat
22821 Add this symbol to a group's @code{spam-process} parameter by
22822 customizing the group parameters or the
22823 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22824 added to a group's @code{spam-process} parameter, the ham-marked
22825 articles in @emph{ham} groups will be added to the spam-stat database
22826 of non-spam messages.  Note that this ham processor has no effect in
22827 @emph{spam} or @emph{unclassified} groups.
22828 @end defvar
22829
22830 This enables spam.el to cooperate with spam-stat.el.  spam-stat.el
22831 provides an internal (Lisp-only) spam database, which unlike ifile or
22832 Bogofilter does not require external programs.  A spam and a ham
22833 processor, and the @code{spam-use-stat} variable for @code{spam-split}
22834 are provided.
22835
22836 @node Extending the spam elisp package
22837 @subsubsection Extending the spam elisp package
22838 @cindex spam filtering
22839 @cindex spam elisp package, extending
22840 @cindex extending the spam elisp package
22841
22842 Say you want to add a new back end called blackbox.  For filtering
22843 incoming mail, provide the following:
22844
22845 @enumerate
22846
22847 @item
22848 code
22849
22850 @lisp
22851 (defvar spam-use-blackbox nil
22852   "True if blackbox should be used.")
22853 @end lisp
22854
22855 Add
22856 @example
22857     (spam-use-blackbox   . spam-check-blackbox)
22858 @end example
22859 to @code{spam-list-of-checks}.
22860
22861 @item
22862 functionality
22863
22864 Write the @code{spam-check-blackbox} function.  It should return
22865 @samp{nil} or @code{spam-split-group}.  See the existing
22866 @code{spam-check-*} functions for examples of what you can do.
22867
22868 Make sure to add @code{spam-use-blackbox} to
22869 @code{spam-list-of-statistical-checks} if Blackbox is a statistical
22870 mail analyzer that needs the full message body to operate.
22871
22872 @end enumerate
22873
22874 For processing spam and ham messages, provide the following:
22875
22876 @enumerate
22877
22878 @item
22879 code 
22880
22881 Note you don't have to provide a spam or a ham processor.  Only
22882 provide them if Blackbox supports spam or ham processing.
22883
22884 @lisp
22885 (defvar gnus-group-spam-exit-processor-blackbox "blackbox"
22886   "The Blackbox summary exit spam processor.
22887 Only applicable to spam groups.")
22888
22889 (defvar gnus-group-ham-exit-processor-blackbox "blackbox"
22890   "The whitelist summary exit ham processor.
22891 Only applicable to non-spam (unclassified and ham) groups.")
22892
22893 @end lisp
22894
22895 @item
22896 functionality
22897
22898 @lisp
22899 (defun spam-blackbox-register-spam-routine ()
22900   (spam-generic-register-routine
22901    ;; @r{the spam function}
22902    (lambda (article)
22903      (let ((from (spam-fetch-field-from-fast article)))
22904        (when (stringp from)
22905            (blackbox-do-something-with-this-spammer from))))
22906    ;; @r{the ham function}
22907    nil))
22908
22909 (defun spam-blackbox-register-ham-routine ()
22910   (spam-generic-register-routine
22911    ;; @r{the spam function}
22912    nil
22913    ;; @r{the ham function}
22914    (lambda (article)
22915      (let ((from (spam-fetch-field-from-fast article)))
22916        (when (stringp from)
22917            (blackbox-do-something-with-this-ham-sender from))))))
22918 @end lisp
22919
22920 Write the @code{blackbox-do-something-with-this-ham-sender} and
22921 @code{blackbox-do-something-with-this-spammer} functions.  You can add
22922 more complex code than fetching the message sender, but keep in mind
22923 that retrieving the whole message takes significantly longer than the
22924 sender through @code{spam-fetch-field-from-fast}, because the message
22925 senders are kept in memory by Gnus.
22926
22927 @end enumerate
22928
22929
22930 @node Filtering Spam Using Statistics with spam-stat
22931 @subsection Filtering Spam Using Statistics with spam-stat
22932 @cindex Paul Graham
22933 @cindex Graham, Paul
22934 @cindex naive Bayesian spam filtering
22935 @cindex Bayesian spam filtering, naive
22936 @cindex spam filtering, naive Bayesian
22937
22938 Paul Graham has written an excellent essay about spam filtering using
22939 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
22940 Spam}.  In it he describes the inherent deficiency of rule-based
22941 filtering as used by SpamAssassin, for example: Somebody has to write
22942 the rules, and everybody else has to install these rules.  You are
22943 always late.  It would be much better, he argues, to filter mail based
22944 on whether it somehow resembles spam or non-spam.  One way to measure
22945 this is word distribution.  He then goes on to describe a solution
22946 that checks whether a new mail resembles any of your other spam mails
22947 or not.
22948
22949 The basic idea is this:  Create a two collections of your mail, one
22950 with spam, one with non-spam.  Count how often each word appears in
22951 either collection, weight this by the total number of mails in the
22952 collections, and store this information in a dictionary.  For every
22953 word in a new mail, determine its probability to belong to a spam or a
22954 non-spam mail.  Use the 15 most conspicuous words, compute the total
22955 probability of the mail being spam.  If this probability is higher
22956 than a certain threshold, the mail is considered to be spam.
22957
22958 Gnus supports this kind of filtering.  But it needs some setting up.
22959 First, you need two collections of your mail, one with spam, one with
22960 non-spam.  Then you need to create a dictionary using these two
22961 collections, and save it.  And last but not least, you need to use
22962 this dictionary in your fancy mail splitting rules.
22963
22964 @menu
22965 * Creating a spam-stat dictionary::  
22966 * Splitting mail using spam-stat::  
22967 * Low-level interface to the spam-stat dictionary::  
22968 @end menu
22969
22970 @node Creating a spam-stat dictionary
22971 @subsubsection Creating a spam-stat dictionary
22972
22973 Before you can begin to filter spam based on statistics, you must
22974 create these statistics based on two mail collections, one with spam,
22975 one with non-spam.  These statistics are then stored in a dictionary
22976 for later use.  In order for these statistics to be meaningful, you
22977 need several hundred emails in both collections.
22978
22979 Gnus currently supports only the nnml back end for automated dictionary
22980 creation.  The nnml back end stores all mails in a directory, one file
22981 per mail.  Use the following:
22982
22983 @defun spam-stat-process-spam-directory
22984 Create spam statistics for every file in this directory.  Every file
22985 is treated as one spam mail.
22986 @end defun
22987
22988 @defun spam-stat-process-non-spam-directory
22989 Create non-spam statistics for every file in this directory.  Every
22990 file is treated as one non-spam mail.
22991 @end defun
22992
22993 Usually you would call @code{spam-stat-process-spam-directory} on a
22994 directory such as @file{~/Mail/mail/spam} (this usually corresponds
22995 the the group @samp{nnml:mail.spam}), and you would call
22996 @code{spam-stat-process-non-spam-directory} on a directory such as
22997 @file{~/Mail/mail/misc} (this usually corresponds the the group
22998 @samp{nnml:mail.misc}).
22999
23000 When you are using @acronym{IMAP}, you won't have the mails available
23001 locally, so that will not work.  One solution is to use the Gnus Agent
23002 to cache the articles.  Then you can use directories such as
23003 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
23004 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
23005
23006 @defvar spam-stat
23007 This variable holds the hash-table with all the statistics---the
23008 dictionary we have been talking about.  For every word in either
23009 collection, this hash-table stores a vector describing how often the
23010 word appeared in spam and often it appeared in non-spam mails.
23011 @end defvar
23012
23013 If you want to regenerate the statistics from scratch, you need to
23014 reset the dictionary.
23015
23016 @defun spam-stat-reset
23017 Reset the @code{spam-stat} hash-table, deleting all the statistics.
23018 @end defun
23019
23020 When you are done, you must save the dictionary.  The dictionary may
23021 be rather large.  If you will not update the dictionary incrementally
23022 (instead, you will recreate it once a month, for example), then you
23023 can reduce the size of the dictionary by deleting all words that did
23024 not appear often enough or that do not clearly belong to only spam or
23025 only non-spam mails.
23026
23027 @defun spam-stat-reduce-size
23028 Reduce the size of the dictionary.  Use this only if you do not want
23029 to update the dictionary incrementally.
23030 @end defun
23031
23032 @defun spam-stat-save
23033 Save the dictionary.
23034 @end defun
23035
23036 @defvar spam-stat-file
23037 The filename used to store the dictionary.  This defaults to
23038 @file{~/.spam-stat.el}.
23039 @end defvar
23040
23041 @node Splitting mail using spam-stat
23042 @subsubsection Splitting mail using spam-stat
23043
23044 In order to use @code{spam-stat} to split your mail, you need to add the
23045 following to your @file{~/.gnus.el} file:
23046
23047 @lisp
23048 (require 'spam-stat)
23049 (spam-stat-load)
23050 @end lisp
23051
23052 This will load the necessary Gnus code, and the dictionary you
23053 created.
23054
23055 Next, you need to adapt your fancy splitting rules:  You need to
23056 determine how to use @code{spam-stat}.  The following examples are for
23057 the nnml back end.  Using the nnimap back end works just as well.  Just
23058 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
23059
23060 In the simplest case, you only have two groups, @samp{mail.misc} and
23061 @samp{mail.spam}.  The following expression says that mail is either
23062 spam or it should go into @samp{mail.misc}.  If it is spam, then
23063 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
23064
23065 @lisp
23066 (setq nnmail-split-fancy
23067       `(| (: spam-stat-split-fancy)
23068           "mail.misc"))
23069 @end lisp
23070
23071 @defvar spam-stat-split-fancy-spam-group
23072 The group to use for spam.  Default is @samp{mail.spam}.
23073 @end defvar
23074
23075 If you also filter mail with specific subjects into other groups, use
23076 the following expression.  Only mails not matching the regular
23077 expression are considered potential spam.
23078
23079 @lisp
23080 (setq nnmail-split-fancy
23081       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
23082           (: spam-stat-split-fancy)
23083           "mail.misc"))
23084 @end lisp
23085
23086 If you want to filter for spam first, then you must be careful when
23087 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
23088 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
23089 non-spam, therefore both should be in your collection of non-spam
23090 mails, when creating the dictionary!
23091
23092 @lisp
23093 (setq nnmail-split-fancy
23094       `(| (: spam-stat-split-fancy)
23095           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23096           "mail.misc"))
23097 @end lisp
23098
23099 You can combine this with traditional filtering.  Here, we move all
23100 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
23101 @code{spam-stat-split-fancy} will never see them, the mails in
23102 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
23103 nor in your collection of non-spam mails, when creating the
23104 dictionary!
23105
23106 @lisp
23107 (setq nnmail-split-fancy
23108       `(| ("Content-Type" "text/html" "mail.spam.filtered")
23109           (: spam-stat-split-fancy)
23110           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23111           "mail.misc"))
23112 @end lisp
23113
23114
23115 @node Low-level interface to the spam-stat dictionary
23116 @subsubsection Low-level interface to the spam-stat dictionary
23117
23118 The main interface to using @code{spam-stat}, are the following functions:
23119
23120 @defun spam-stat-buffer-is-spam
23121 Called in a buffer, that buffer is considered to be a new spam mail.
23122 Use this for new mail that has not been processed before.
23123 @end defun
23124
23125 @defun spam-stat-buffer-is-no-spam
23126 Called in a buffer, that buffer is considered to be a new non-spam
23127 mail.  Use this for new mail that has not been processed before.
23128 @end defun
23129
23130 @defun spam-stat-buffer-change-to-spam
23131 Called in a buffer, that buffer is no longer considered to be normal
23132 mail but spam.  Use this to change the status of a mail that has
23133 already been processed as non-spam.
23134 @end defun
23135
23136 @defun spam-stat-buffer-change-to-non-spam
23137 Called in a buffer, that buffer is no longer considered to be spam but
23138 normal mail.  Use this to change the status of a mail that has already
23139 been processed as spam.
23140 @end defun
23141
23142 @defun spam-stat-save
23143 Save the hash table to the file.  The filename used is stored in the
23144 variable @code{spam-stat-file}.
23145 @end defun
23146
23147 @defun spam-stat-load
23148 Load the hash table from a file.  The filename used is stored in the
23149 variable @code{spam-stat-file}.
23150 @end defun
23151
23152 @defun spam-stat-score-word
23153 Return the spam score for a word.
23154 @end defun
23155
23156 @defun spam-stat-score-buffer
23157 Return the spam score for a buffer.
23158 @end defun
23159
23160 @defun spam-stat-split-fancy
23161 Use this function for fancy mail splitting.  Add the rule @samp{(:
23162 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
23163 @end defun
23164
23165 Make sure you load the dictionary before using it.  This requires the
23166 following in your @file{~/.gnus.el} file:
23167
23168 @lisp
23169 (require 'spam-stat)
23170 (spam-stat-load)
23171 @end lisp
23172
23173 Typical test will involve calls to the following functions:
23174
23175 @smallexample
23176 Reset: (setq spam-stat (make-hash-table :test 'equal))
23177 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23178 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23179 Save table: (spam-stat-save)
23180 File size: (nth 7 (file-attributes spam-stat-file))
23181 Number of words: (hash-table-count spam-stat)
23182 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23183 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23184 Reduce table size: (spam-stat-reduce-size)
23185 Save table: (spam-stat-save)
23186 File size: (nth 7 (file-attributes spam-stat-file))
23187 Number of words: (hash-table-count spam-stat)
23188 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23189 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23190 @end smallexample
23191
23192 Here is how you would create your dictionary:
23193
23194 @smallexample
23195 Reset: (setq spam-stat (make-hash-table :test 'equal))
23196 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23197 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23198 Repeat for any other non-spam group you need...
23199 Reduce table size: (spam-stat-reduce-size)
23200 Save table: (spam-stat-save)
23201 @end smallexample
23202
23203 @node Various Various
23204 @section Various Various
23205 @cindex mode lines
23206 @cindex highlights
23207
23208 @table @code
23209
23210 @item gnus-home-directory
23211 @vindex gnus-home-directory
23212 All Gnus file and directory variables will be initialized from this
23213 variable, which defaults to @file{~/}.
23214
23215 @item gnus-directory
23216 @vindex gnus-directory
23217 Most Gnus storage file and directory variables will be initialized from
23218 this variable, which defaults to the @env{SAVEDIR} environment
23219 variable, or @file{~/News/} if that variable isn't set.
23220
23221 Note that Gnus is mostly loaded when the @file{~/.gnus.el} file is read.
23222 This means that other directory variables that are initialized from this
23223 variable won't be set properly if you set this variable in
23224 @file{~/.gnus.el}.  Set this variable in @file{.emacs} instead.
23225
23226 @item gnus-default-directory
23227 @vindex gnus-default-directory
23228 Not related to the above variable at all---this variable says what the
23229 default directory of all Gnus buffers should be.  If you issue commands
23230 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
23231 default directory.  If this variable is @code{nil} (which is the
23232 default), the default directory will be the default directory of the
23233 buffer you were in when you started Gnus.
23234
23235 @item gnus-verbose
23236 @vindex gnus-verbose
23237 This variable is an integer between zero and ten.  The higher the value,
23238 the more messages will be displayed.  If this variable is zero, Gnus
23239 will never flash any messages, if it is seven (which is the default),
23240 most important messages will be shown, and if it is ten, Gnus won't ever
23241 shut up, but will flash so many messages it will make your head swim.
23242
23243 @item gnus-verbose-backends
23244 @vindex gnus-verbose-backends
23245 This variable works the same way as @code{gnus-verbose}, but it applies
23246 to the Gnus back ends instead of Gnus proper.
23247
23248 @item nnheader-max-head-length
23249 @vindex nnheader-max-head-length
23250 When the back ends read straight heads of articles, they all try to read
23251 as little as possible.  This variable (default 4096) specifies
23252 the absolute max length the back ends will try to read before giving up
23253 on finding a separator line between the head and the body.  If this
23254 variable is @code{nil}, there is no upper read bound.  If it is
23255 @code{t}, the back ends won't try to read the articles piece by piece,
23256 but read the entire articles.  This makes sense with some versions of
23257 @code{ange-ftp} or @code{efs}.
23258
23259 @item nnheader-head-chop-length
23260 @vindex nnheader-head-chop-length
23261 This variable (default 2048) says how big a piece of each article to
23262 read when doing the operation described above.
23263
23264 @item nnheader-file-name-translation-alist
23265 @vindex nnheader-file-name-translation-alist
23266 @cindex file names
23267 @cindex invalid characters in file names
23268 @cindex characters in file names
23269 This is an alist that says how to translate characters in file names.
23270 For instance, if @samp{:} is invalid as a file character in file names
23271 on your system (you OS/2 user you), you could say something like:
23272
23273 @lisp
23274 @group
23275 (setq nnheader-file-name-translation-alist
23276       '((?: . ?_)))
23277 @end group
23278 @end lisp
23279
23280 In fact, this is the default value for this variable on OS/2 and MS
23281 Windows (phooey) systems.
23282
23283 @item gnus-hidden-properties
23284 @vindex gnus-hidden-properties
23285 This is a list of properties to use to hide ``invisible'' text.  It is
23286 @code{(invisible t intangible t)} by default on most systems, which
23287 makes invisible text invisible and intangible.
23288
23289 @item gnus-parse-headers-hook
23290 @vindex gnus-parse-headers-hook
23291 A hook called before parsing headers.  It can be used, for instance, to
23292 gather statistics on the headers fetched, or perhaps you'd like to prune
23293 some headers.  I don't see why you'd want that, though.
23294
23295 @item gnus-shell-command-separator
23296 @vindex gnus-shell-command-separator
23297 String used to separate two shell commands.  The default is @samp{;}.
23298
23299 @item gnus-invalid-group-regexp
23300 @vindex gnus-invalid-group-regexp
23301
23302 Regexp to match ``invalid'' group names when querying user for a group
23303 name.  The default value catches some @strong{really} invalid group
23304 names who could possibly mess up Gnus internally (like allowing
23305 @samp{:} in a group name, which is normally used to delimit method and
23306 group).
23307
23308 @acronym{IMAP} users might want to allow @samp{/} in group names though.
23309
23310
23311 @end table
23312
23313 @node The End
23314 @chapter The End
23315
23316 Well, that's the manual---you can get on with your life now.  Keep in
23317 touch.  Say hello to your cats from me.
23318
23319 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
23320
23321 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
23322
23323 @quotation
23324 @strong{Te Deum}
23325
23326 @sp 1
23327 Not because of victories @*
23328 I sing,@*
23329 having none,@*
23330 but for the common sunshine,@*
23331 the breeze,@*
23332 the largess of the spring.
23333
23334 @sp 1
23335 Not for victory@*
23336 but for the day's work done@*
23337 as well as I was able;@*
23338 not for a seat upon the dais@*
23339 but at the common table.@*
23340 @end quotation
23341
23342
23343 @node Appendices
23344 @chapter Appendices
23345
23346 @menu
23347 * XEmacs::                      Requirements for installing under XEmacs.
23348 * History::                     How Gnus got where it is today.
23349 * On Writing Manuals::          Why this is not a beginner's guide.
23350 * Terminology::                 We use really difficult, like, words here.
23351 * Customization::               Tailoring Gnus to your needs.
23352 * Troubleshooting::             What you might try if things do not work.
23353 * Gnus Reference Guide::        Rilly, rilly technical stuff.
23354 * Emacs for Heathens::          A short introduction to Emacsian terms.
23355 * Frequently Asked Questions::  The Gnus FAQ
23356 @end menu
23357
23358
23359 @node XEmacs
23360 @section XEmacs
23361 @cindex XEmacs
23362 @cindex installing under XEmacs
23363
23364 XEmacs is distributed as a collection of packages.  You should install
23365 whatever packages the Gnus XEmacs package requires.  The current
23366 requirements are @samp{gnus}, @samp{w3}, @samp{mh-e},
23367 @samp{mailcrypt}, @samp{rmail}, @samp{eterm}, @samp{mail-lib},
23368 @samp{xemacs-base}, @samp{sh-script} and @samp{fsf-compat}.  The
23369 @samp{misc-games} package is required for Morse decoding.
23370
23371
23372 @node History
23373 @section History
23374
23375 @cindex history
23376 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
23377 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
23378
23379 If you want to investigate the person responsible for this outrage,
23380 you can point your (feh!) web browser to
23381 @uref{http://quimby.gnus.org/}.  This is also the primary
23382 distribution point for the new and spiffy versions of Gnus, and is
23383 known as The Site That Destroys Newsrcs And Drives People Mad.
23384
23385 During the first extended alpha period of development, the new Gnus was
23386 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
23387 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
23388 (Besides, the ``Gnus'' in this abbreviation should probably be
23389 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
23390 appropriate name, don't you think?)
23391
23392 In any case, after spending all that energy on coming up with a new and
23393 spunky name, we decided that the name was @emph{too} spunky, so we
23394 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
23395 ``@sc{gnus}''.  New vs. old.
23396
23397 @menu
23398 * Gnus Versions::               What Gnus versions have been released.
23399 * Other Gnus Versions::         Other Gnus versions that also have been released.
23400 * Why?::                        What's the point of Gnus?
23401 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
23402 * Conformity::                  Gnus tries to conform to all standards.
23403 * Emacsen::                     Gnus can be run on a few modern Emacsen.
23404 * Gnus Development::            How Gnus is developed.
23405 * Contributors::                Oodles of people.
23406 * New Features::                Pointers to some of the new stuff in Gnus.
23407 @end menu
23408
23409
23410 @node Gnus Versions
23411 @subsection Gnus Versions
23412 @cindex ding Gnus
23413 @cindex September Gnus
23414 @cindex Red Gnus
23415 @cindex Quassia Gnus
23416 @cindex Pterodactyl Gnus
23417 @cindex Oort Gnus
23418 @cindex No Gnus
23419 @cindex Gnus versions
23420
23421 The first ``proper'' release of Gnus 5 was done in November 1995 when it
23422 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
23423 plus 15 Gnus 5.0 releases).
23424
23425 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
23426 releases)) was released under the name ``Gnus 5.2'' (40 releases).
23427
23428 On July 28th 1996 work on Red Gnus was begun, and it was released on
23429 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
23430
23431 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
23432 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
23433
23434 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
23435 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
23436 1999.
23437
23438 On the 26th of October 2000, Oort Gnus was begun.
23439
23440 If you happen upon a version of Gnus that has a prefixed name --
23441 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
23442 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
23443 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
23444 run.  Walk away, calmly, until you're out of its reach.  Find a proper
23445 released version of Gnus and snuggle up to that instead.
23446
23447
23448 @node Other Gnus Versions
23449 @subsection Other Gnus Versions
23450 @cindex Semi-gnus
23451
23452 In addition to the versions of Gnus which have had their releases
23453 coordinated by Lars, one major development has been Semi-gnus from
23454 Japan.  It's based on a library called @acronym{SEMI}, which provides
23455 @acronym{MIME} capabilities.
23456
23457 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
23458 Collectively, they are called ``Semi-gnus'', and different strains are
23459 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
23460 @acronym{MIME} and multilingualization things, especially important for
23461 Japanese users.
23462
23463
23464 @node Why?
23465 @subsection Why?
23466
23467 What's the point of Gnus?
23468
23469 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
23470 newsreader, that lets you do anything you can think of.  That was my
23471 original motivation, but while working on Gnus, it has become clear to
23472 me that this generation of newsreaders really belong in the stone age.
23473 Newsreaders haven't developed much since the infancy of the net.  If the
23474 volume continues to rise with the current rate of increase, all current
23475 newsreaders will be pretty much useless.  How do you deal with
23476 newsgroups that have thousands of new articles each day?  How do you
23477 keep track of millions of people who post?
23478
23479 Gnus offers no real solutions to these questions, but I would very much
23480 like to see Gnus being used as a testing ground for new methods of
23481 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
23482 to separate the newsreader from the back ends, Gnus now offers a simple
23483 interface for anybody who wants to write new back ends for fetching mail
23484 and news from different sources.  I have added hooks for customizations
23485 everywhere I could imagine it being useful.  By doing so, I'm inviting
23486 every one of you to explore and invent.
23487
23488 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
23489 @kbd{C-u 100 M-x all-hail-xemacs}.
23490
23491
23492 @node Compatibility
23493 @subsection Compatibility
23494
23495 @cindex compatibility
23496 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
23497 bindings have been kept.  More key bindings have been added, of course,
23498 but only in one or two obscure cases have old bindings been changed.
23499
23500 Our motto is:
23501 @quotation
23502 @cartouche
23503 @center In a cloud bones of steel.
23504 @end cartouche
23505 @end quotation
23506
23507 All commands have kept their names.  Some internal functions have changed
23508 their names.
23509
23510 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
23511 Articles}.
23512
23513 One major compatibility question is the presence of several summary
23514 buffers.  All variables relevant while reading a group are
23515 buffer-local to the summary buffer they belong in.  Although many
23516 important variables have their values copied into their global
23517 counterparts whenever a command is executed in the summary buffer, this
23518 change might lead to incorrect values being used unless you are careful.
23519
23520 All code that relies on knowledge of @sc{gnus} internals will probably
23521 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
23522 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
23523 maintains a hash table that points to the entries in this alist (which
23524 speeds up many functions), and changing the alist directly will lead to
23525 peculiar results.
23526
23527 @cindex hilit19
23528 @cindex highlighting
23529 Old hilit19 code does not work at all.  In fact, you should probably
23530 remove all hilit code from all Gnus hooks
23531 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
23532 Gnus provides various integrated functions for highlighting.  These are
23533 faster and more accurate.  To make life easier for everybody, Gnus will
23534 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
23535 Away!
23536
23537 Packages like @code{expire-kill} will no longer work.  As a matter of
23538 fact, you should probably remove all old @sc{gnus} packages (and other
23539 code) when you start using Gnus.  More likely than not, Gnus already
23540 does what you have written code to make @sc{gnus} do.  (Snicker.)
23541
23542 Even though old methods of doing things are still supported, only the
23543 new methods are documented in this manual.  If you detect a new method of
23544 doing something while reading this manual, that does not mean you have
23545 to stop doing it the old way.
23546
23547 Gnus understands all @sc{gnus} startup files.
23548
23549 @kindex M-x gnus-bug
23550 @findex gnus-bug
23551 @cindex reporting bugs
23552 @cindex bugs
23553 Overall, a casual user who hasn't written much code that depends on
23554 @sc{gnus} internals should suffer no problems.  If problems occur,
23555 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
23556
23557 @vindex gnus-bug-create-help-buffer
23558 If you are in the habit of sending bug reports @emph{very} often, you
23559 may find the helpful help buffer annoying after a while.  If so, set
23560 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
23561 up at you.
23562
23563
23564 @node Conformity
23565 @subsection Conformity
23566
23567 No rebels without a clue here, ma'am.  We conform to all standards known
23568 to (wo)man.  Except for those standards and/or conventions we disagree
23569 with, of course.
23570
23571 @table @strong
23572
23573 @item RFC (2)822
23574 @cindex RFC 822
23575 @cindex RFC 2822
23576 There are no known breaches of this standard.
23577
23578 @item RFC 1036
23579 @cindex RFC 1036
23580 There are no known breaches of this standard, either.
23581
23582 @item Son-of-RFC 1036
23583 @cindex Son-of-RFC 1036
23584 We do have some breaches to this one.
23585
23586 @table @emph
23587
23588 @item X-Newsreader
23589 @itemx User-Agent
23590 These are considered to be ``vanity headers'', while I consider them
23591 to be consumer information.  After seeing so many badly formatted
23592 articles coming from @code{tin} and @code{Netscape} I know not to use
23593 either of those for posting articles.  I would not have known that if
23594 it wasn't for the @code{X-Newsreader} header.
23595 @end table
23596
23597 @item USEFOR
23598 @cindex USEFOR
23599 USEFOR is an IETF working group writing a successor to RFC 1036, based
23600 on Son-of-RFC 1036.  They have produced a number of drafts proposing
23601 various changes to the format of news articles.  The Gnus towers will
23602 look into implementing the changes when the draft is accepted as an RFC.
23603
23604 @item MIME - RFC 2045-2049 etc
23605 @cindex @acronym{MIME}
23606 All the various @acronym{MIME} RFCs are supported.
23607
23608 @item Disposition Notifications - RFC 2298
23609 Message Mode is able to request notifications from the receiver.
23610
23611 @item PGP - RFC 1991 and RFC 2440
23612 @cindex RFC 1991
23613 @cindex RFC 2440
23614 RFC 1991 is the original @acronym{PGP} message specification,
23615 published as an informational RFC.  RFC 2440 was the follow-up, now
23616 called Open PGP, and put on the Standards Track.  Both document a
23617 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
23618 encoding (signing and encryption) and decoding (verification and
23619 decryption).
23620
23621 @item PGP/MIME - RFC 2015/3156
23622 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
23623 1991) describes the @acronym{MIME}-wrapping around the RF 1991/2440 format.
23624 Gnus supports both encoding and decoding.
23625
23626 @item S/MIME - RFC 2633
23627 RFC 2633 describes the @acronym{S/MIME} format.
23628
23629 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
23630 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
23631 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
23632 authentication for @acronym{IMAP}. RFC 2086 describes access control
23633 lists (ACLs) for @acronym{IMAP}. RFC 2359 describes a @acronym{IMAP}
23634 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
23635 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
23636 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
23637
23638 @end table
23639
23640 If you ever notice Gnus acting non-compliant with regards to the texts
23641 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
23642 know.
23643
23644
23645 @node Emacsen
23646 @subsection Emacsen
23647 @cindex Emacsen
23648 @cindex XEmacs
23649 @cindex Mule
23650 @cindex Emacs
23651
23652 Gnus should work on :
23653
23654 @itemize @bullet
23655
23656 @item
23657 Emacs 20.7 and up.
23658
23659 @item
23660 XEmacs 21.1 and up.
23661
23662 @end itemize
23663
23664 This Gnus version will absolutely not work on any Emacsen older than
23665 that.  Not reliably, at least.  Older versions of Gnus may work on older
23666 Emacs versions.
23667
23668 There are some vague differences between Gnus on the various
23669 platforms---XEmacs features more graphics (a logo and a toolbar)---but
23670 other than that, things should look pretty much the same under all
23671 Emacsen.
23672
23673
23674 @node Gnus Development
23675 @subsection Gnus Development
23676
23677 Gnus is developed in a two-phased cycle.  The first phase involves much
23678 discussion on the @samp{ding@@gnus.org} mailing list, where people
23679 propose changes and new features, post patches and new back ends.  This
23680 phase is called the @dfn{alpha} phase, since the Gnusae released in this
23681 phase are @dfn{alpha releases}, or (perhaps more commonly in other
23682 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
23683 unstable and should not be used by casual users.  Gnus alpha releases
23684 have names like ``Red Gnus'' and ``Quassia Gnus''.
23685
23686 After futzing around for 50-100 alpha releases, Gnus is declared
23687 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
23688 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
23689 supposed to be able to use these, and these are mostly discussed on the
23690 @samp{gnu.emacs.gnus} newsgroup.
23691
23692 @cindex Incoming*
23693 @vindex mail-source-delete-incoming
23694 Some variable defaults differ between alpha Gnusae and released Gnusae.
23695 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
23696 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
23697 lossage of mail if an alpha release hiccups while handling the mail.
23698
23699 The division of discussion between the ding mailing list and the Gnus
23700 newsgroup is not purely based on publicity concerns.  It's true that
23701 having people write about the horrible things that an alpha Gnus release
23702 can do (sometimes) in a public forum may scare people off, but more
23703 importantly, talking about new experimental features that have been
23704 introduced may confuse casual users.  New features are frequently
23705 introduced, fiddled with, and judged to be found wanting, and then
23706 either discarded or totally rewritten.  People reading the mailing list
23707 usually keep up with these rapid changes, while people on the newsgroup
23708 can't be assumed to do so.
23709
23710
23711
23712 @node Contributors
23713 @subsection Contributors
23714 @cindex contributors
23715
23716 The new Gnus version couldn't have been done without the help of all the
23717 people on the (ding) mailing list.  Every day for over a year I have
23718 gotten billions of nice bug reports from them, filling me with joy,
23719 every single one of them.  Smooches.  The people on the list have been
23720 tried beyond endurance, what with my ``oh, that's a neat idea <type
23721 type>, yup, I'll release it right away <ship off> no wait, that doesn't
23722 work at all <type type>, yup, I'll ship that one off right away <ship
23723 off> no, wait, that absolutely does not work'' policy for releases.
23724 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
23725 ``worser''? ``much worser''?  ``worsest''?)
23726
23727 I would like to take this opportunity to thank the Academy for@dots{}  oops,
23728 wrong show.
23729
23730 @itemize @bullet
23731
23732 @item
23733 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
23734
23735 @item
23736 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
23737 nnwarchive and many, many other things connected with @acronym{MIME} and
23738 other types of en/decoding, as well as general bug fixing, new
23739 functionality and stuff.
23740
23741 @item
23742 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
23743 well as numerous other things).
23744
23745 @item
23746 Luis Fernandes---design and graphics.
23747
23748 @item
23749 Joe Reiss---creator of the smiley faces.
23750
23751 @item
23752 Justin Sheehy--the @acronym{FAQ} maintainer.
23753
23754 @item
23755 Erik Naggum---help, ideas, support, code and stuff.
23756
23757 @item
23758 Wes Hardaker---@file{gnus-picon.el} and the manual section on
23759 @dfn{picons} (@pxref{Picons}).
23760
23761 @item
23762 Kim-Minh Kaplan---further work on the picon code.
23763
23764 @item
23765 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
23766 (@pxref{GroupLens}).
23767
23768 @item
23769 Sudish Joseph---innumerable bug fixes.
23770
23771 @item
23772 Ilja Weis---@file{gnus-topic.el}.
23773
23774 @item
23775 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
23776
23777 @item
23778 Vladimir Alexiev---the refcard and reference booklets.
23779
23780 @item
23781 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
23782 distribution by Felix Lee and JWZ.
23783
23784 @item
23785 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
23786
23787 @item
23788 Peter Mutsaers---orphan article scoring code.
23789
23790 @item
23791 Ken Raeburn---POP mail support.
23792
23793 @item
23794 Hallvard B Furuseth---various bits and pieces, especially dealing with
23795 .newsrc files.
23796
23797 @item
23798 Brian Edmonds---@file{gnus-bbdb.el}.
23799
23800 @item
23801 David Moore---rewrite of @file{nnvirtual.el} and many other things.
23802
23803 @item
23804 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
23805
23806 @item
23807 François Pinard---many, many interesting and thorough bug reports, as
23808 well as autoconf support.
23809
23810 @end itemize
23811
23812 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
23813 Borges, and Jost Krieger proof-reading parts of the manual.
23814
23815 The following people have contributed many patches and suggestions:
23816
23817 Christopher Davis,
23818 Andrew Eskilsson,
23819 Kai Grossjohann,
23820 Kevin Greiner,
23821 Jesper Harder,
23822 Paul Jarc,
23823 Simon Josefsson,
23824 David KÃ¥gedal,
23825 Richard Pieri,
23826 Fabrice Popineau,
23827 Daniel Quinlan,
23828 Michael Shields,
23829 Reiner Steib,
23830 Jason L. Tibbitts, III,
23831 Jack Vinson,
23832 Katsumi Yamaoka, @c Yamaoka
23833 and
23834 Teodor Zlatanov.
23835
23836 Also thanks to the following for patches and stuff:
23837
23838 Jari Aalto,
23839 Adrian Aichner,
23840 Vladimir Alexiev,
23841 Russ Allbery,
23842 Peter Arius,
23843 Matt Armstrong,
23844 Marc Auslander,
23845 Miles Bader,
23846 Alexei V. Barantsev,
23847 Frank Bennett,
23848 Robert Bihlmeyer,
23849 Chris Bone,
23850 Mark Borges,
23851 Mark Boyns,
23852 Lance A. Brown,
23853 Rob Browning,
23854 Kees de Bruin,
23855 Martin Buchholz,
23856 Joe Buehler,
23857 Kevin Buhr,
23858 Alastair Burt,
23859 Joao Cachopo,
23860 Zlatko Calusic,
23861 Massimo Campostrini,
23862 Castor,
23863 David Charlap,
23864 Dan Christensen,
23865 Kevin Christian,
23866 Jae-you Chung, @c ?
23867 James H. Cloos, Jr.,
23868 Laura Conrad,
23869 Michael R. Cook,
23870 Glenn Coombs,
23871 Andrew J. Cosgriff,
23872 Neil Crellin,
23873 Frank D. Cringle,
23874 Geoffrey T. Dairiki,
23875 Andre Deparade,
23876 Ulrik Dickow,
23877 Dave Disser,
23878 Rui-Tao Dong, @c ?
23879 Joev Dubach,
23880 Michael Welsh Duggan,
23881 Dave Edmondson,
23882 Paul Eggert,
23883 Mark W. Eichin,
23884 Karl Eichwalder,
23885 Enami Tsugutomo, @c Enami
23886 Michael Ernst,
23887 Luc Van Eycken,
23888 Sam Falkner,
23889 Nelson Jose dos Santos Ferreira,
23890 Sigbjorn Finne,
23891 Sven Fischer,
23892 Paul Fisher,
23893 Decklin Foster,
23894 Gary D. Foster,
23895 Paul Franklin,
23896 Guy Geens,
23897 Arne Georg Gleditsch,
23898 David S. Goldberg,
23899 Michelangelo Grigni,
23900 Dale Hagglund,
23901 D. Hall,
23902 Magnus Hammerin,
23903 Kenichi Handa, @c Handa
23904 Raja R. Harinath,
23905 Yoshiki Hayashi, @c Hayashi
23906 P. E. Jareth Hein,
23907 Hisashige Kenji, @c Hisashige
23908 Scott Hofmann,
23909 Marc Horowitz,
23910 Gunnar Horrigmo,
23911 Richard Hoskins,
23912 Brad Howes,
23913 Miguel de Icaza,
23914 François Felix Ingrand,
23915 Tatsuya Ichikawa, @c Ichikawa
23916 Ishikawa Ichiro, @c Ishikawa
23917 Lee Iverson,
23918 Iwamuro Motonori, @c Iwamuro
23919 Rajappa Iyer,
23920 Andreas Jaeger,
23921 Adam P. Jenkins,
23922 Randell Jesup,
23923 Fred Johansen,
23924 Gareth Jones,
23925 Greg Klanderman,
23926 Karl Kleinpaste,
23927 Michael Klingbeil,
23928 Peter Skov Knudsen,
23929 Shuhei Kobayashi, @c Kobayashi
23930 Petr Konecny,
23931 Koseki Yoshinori, @c Koseki
23932 Thor Kristoffersen,
23933 Jens Lautenbacher,
23934 Martin Larose,
23935 Seokchan Lee, @c Lee
23936 Joerg Lenneis,
23937 Carsten Leonhardt,
23938 James LewisMoss,
23939 Christian Limpach,
23940 Markus Linnala,
23941 Dave Love,
23942 Mike McEwan,
23943 Tonny Madsen,
23944 Shlomo Mahlab,
23945 Nat Makarevitch,
23946 Istvan Marko,
23947 David Martin,
23948 Jason R. Mastaler,
23949 Gordon Matzigkeit,
23950 Timo Metzemakers,
23951 Richard Mlynarik,
23952 Lantz Moore,
23953 Morioka Tomohiko, @c Morioka
23954 Erik Toubro Nielsen,
23955 Hrvoje Niksic,
23956 Andy Norman,
23957 Fred Oberhauser,
23958 C. R. Oldham,
23959 Alexandre Oliva,
23960 Ken Olstad,
23961 Masaharu Onishi, @c Onishi
23962 Hideki Ono, @c Ono
23963 Ettore Perazzoli,
23964 William Perry,
23965 Stephen Peters,
23966 Jens-Ulrik Holger Petersen,
23967 Ulrich Pfeifer,
23968 Matt Pharr,
23969 Andy Piper,
23970 John McClary Prevost,
23971 Bill Pringlemeir,
23972 Mike Pullen,
23973 Jim Radford,
23974 Colin Rafferty,
23975 Lasse Rasinen,
23976 Lars Balker Rasmussen,
23977 Joe Reiss,
23978 Renaud Rioboo,
23979 Roland B. Roberts,
23980 Bart Robinson,
23981 Christian von Roques,
23982 Markus Rost,
23983 Jason Rumney,
23984 Wolfgang Rupprecht,
23985 Jay Sachs,
23986 Dewey M. Sasser,
23987 Conrad Sauerwald,
23988 Loren Schall,
23989 Dan Schmidt,
23990 Ralph Schleicher,
23991 Philippe Schnoebelen,
23992 Andreas Schwab,
23993 Randal L. Schwartz,
23994 Danny Siu,
23995 Matt Simmons,
23996 Paul D. Smith,
23997 Jeff Sparkes,
23998 Toby Speight,
23999 Michael Sperber,
24000 Darren Stalder,
24001 Richard Stallman,
24002 Greg Stark,
24003 Sam Steingold,
24004 Paul Stevenson,
24005 Jonas Steverud,
24006 Paul Stodghill,
24007 Kiyokazu Suto, @c Suto
24008 Kurt Swanson,
24009 Samuel Tardieu,
24010 Teddy,
24011 Chuck Thompson,
24012 Tozawa Akihiko, @c Tozawa
24013 Philippe Troin,
24014 James Troup,
24015 Trung Tran-Duc,
24016 Jack Twilley,
24017 Aaron M. Ucko,
24018 Aki Vehtari,
24019 Didier Verna,
24020 Vladimir Volovich,
24021 Jan Vroonhof,
24022 Stefan Waldherr,
24023 Pete Ware,
24024 Barry A. Warsaw,
24025 Christoph Wedler,
24026 Joe Wells,
24027 Lee Willis,
24028 and
24029 Lloyd Zusman.
24030
24031
24032 For a full overview of what each person has done, the ChangeLogs
24033 included in the Gnus alpha distributions should give ample reading
24034 (550kB and counting).
24035
24036 Apologies to everybody that I've forgotten, of which there are many, I'm
24037 sure.
24038
24039 Gee, that's quite a list of people.  I guess that must mean that there
24040 actually are people who are using Gnus.  Who'd'a thunk it!
24041
24042
24043 @node New Features
24044 @subsection New Features
24045 @cindex new features
24046
24047 @menu
24048 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
24049 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
24050 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
24051 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
24052 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
24053 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
24054 @end menu
24055
24056 These lists are, of course, just @emph{short} overviews of the
24057 @emph{most} important new features.  No, really.  There are tons more.
24058 Yes, we have feeping creaturism in full effect.
24059
24060 @node ding Gnus
24061 @subsubsection (ding) Gnus
24062
24063 New features in Gnus 5.0/5.1:
24064
24065 @itemize @bullet
24066
24067 @item
24068 The look of all buffers can be changed by setting format-like variables
24069 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
24070
24071 @item
24072 Local spool and several @acronym{NNTP} servers can be used at once
24073 (@pxref{Select Methods}).
24074
24075 @item
24076 You can combine groups into virtual groups (@pxref{Virtual Groups}).
24077
24078 @item
24079 You can read a number of different mail formats (@pxref{Getting Mail}).
24080 All the mail back ends implement a convenient mail expiry scheme
24081 (@pxref{Expiring Mail}).
24082
24083 @item
24084 Gnus can use various strategies for gathering threads that have lost
24085 their roots (thereby gathering loose sub-threads into one thread) or it
24086 can go back and retrieve enough headers to build a complete thread
24087 (@pxref{Customizing Threading}).
24088
24089 @item
24090 Killed groups can be displayed in the group buffer, and you can read
24091 them as well (@pxref{Listing Groups}).
24092
24093 @item
24094 Gnus can do partial group updates---you do not have to retrieve the
24095 entire active file just to check for new articles in a few groups
24096 (@pxref{The Active File}).
24097
24098 @item
24099 Gnus implements a sliding scale of subscribedness to groups
24100 (@pxref{Group Levels}).
24101
24102 @item
24103 You can score articles according to any number of criteria
24104 (@pxref{Scoring}).  You can even get Gnus to find out how to score
24105 articles for you (@pxref{Adaptive Scoring}).
24106
24107 @item
24108 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
24109 manner, so it should be difficult to lose much data on what you have
24110 read if your machine should go down (@pxref{Auto Save}).
24111
24112 @item
24113 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
24114 cluttering up the @file{.emacs} file.
24115
24116 @item
24117 You can set the process mark on both groups and articles and perform
24118 operations on all the marked items (@pxref{Process/Prefix}).
24119
24120 @item
24121 You can grep through a subset of groups and create a group from the
24122 results (@pxref{Kibozed Groups}).
24123
24124 @item
24125 You can list subsets of groups according to, well, anything
24126 (@pxref{Listing Groups}).
24127
24128 @item
24129 You can browse foreign servers and subscribe to groups from those
24130 servers (@pxref{Browse Foreign Server}).
24131
24132 @item
24133 Gnus can fetch articles, asynchronously, on a second connection to the
24134 server (@pxref{Asynchronous Fetching}).
24135
24136 @item
24137 You can cache articles locally (@pxref{Article Caching}).
24138
24139 @item
24140 The uudecode functions have been expanded and generalized
24141 (@pxref{Decoding Articles}).
24142
24143 @item
24144 You can still post uuencoded articles, which was a little-known feature
24145 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
24146
24147 @item
24148 Fetching parents (and other articles) now actually works without
24149 glitches (@pxref{Finding the Parent}).
24150
24151 @item
24152 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
24153
24154 @item
24155 Digests (and other files) can be used as the basis for groups
24156 (@pxref{Document Groups}).
24157
24158 @item
24159 Articles can be highlighted and customized (@pxref{Customizing
24160 Articles}).
24161
24162 @item
24163 URLs and other external references can be buttonized (@pxref{Article
24164 Buttons}).
24165
24166 @item
24167 You can do lots of strange stuff with the Gnus window & frame
24168 configuration (@pxref{Window Layout}).
24169
24170 @item
24171 You can click on buttons instead of using the keyboard
24172 (@pxref{Buttons}).
24173
24174 @end itemize
24175
24176
24177 @node September Gnus
24178 @subsubsection September Gnus
24179
24180 @iftex
24181 @iflatex
24182 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
24183 @end iflatex
24184 @end iftex
24185
24186 New features in Gnus 5.2/5.3:
24187
24188 @itemize @bullet
24189
24190 @item
24191 A new message composition mode is used.  All old customization variables
24192 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
24193 now obsolete.
24194
24195 @item
24196 Gnus is now able to generate @dfn{sparse} threads---threads where
24197 missing articles are represented by empty nodes (@pxref{Customizing
24198 Threading}).
24199
24200 @lisp
24201 (setq gnus-build-sparse-threads 'some)
24202 @end lisp
24203
24204 @item
24205 Outgoing articles are stored on a special archive server
24206 (@pxref{Archived Messages}).
24207
24208 @item
24209 Partial thread regeneration now happens when articles are
24210 referred.
24211
24212 @item
24213 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
24214
24215 @item
24216 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
24217
24218 @item
24219 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
24220
24221 @lisp
24222 (setq gnus-use-trees t)
24223 @end lisp
24224
24225 @item
24226 An @code{nn}-like pick-and-read minor mode is available for the summary
24227 buffers (@pxref{Pick and Read}).
24228
24229 @lisp
24230 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
24231 @end lisp
24232
24233 @item
24234 In binary groups you can use a special binary minor mode (@pxref{Binary
24235 Groups}).
24236
24237 @item
24238 Groups can be grouped in a folding topic hierarchy (@pxref{Group
24239 Topics}).
24240
24241 @lisp
24242 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
24243 @end lisp
24244
24245 @item
24246 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
24247
24248 @item
24249 Groups can now have a score, and bubbling based on entry frequency
24250 is possible (@pxref{Group Score}).
24251
24252 @lisp
24253 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
24254 @end lisp
24255
24256 @item
24257 Groups can be process-marked, and commands can be performed on
24258 groups of groups (@pxref{Marking Groups}).
24259
24260 @item
24261 Caching is possible in virtual groups.
24262
24263 @item
24264 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
24265 news batches, ClariNet briefs collections, and just about everything
24266 else (@pxref{Document Groups}).
24267
24268 @item
24269 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
24270 (@pxref{SOUP}).
24271
24272 @item
24273 The Gnus cache is much faster.
24274
24275 @item
24276 Groups can be sorted according to many criteria (@pxref{Sorting
24277 Groups}).
24278
24279 @item
24280 New group parameters have been introduced to set list-addresses and
24281 expiry times (@pxref{Group Parameters}).
24282
24283 @item
24284 All formatting specs allow specifying faces to be used
24285 (@pxref{Formatting Fonts}).
24286
24287 @item
24288 There are several more commands for setting/removing/acting on process
24289 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
24290
24291 @item
24292 The summary buffer can be limited to show parts of the available
24293 articles based on a wide range of criteria.  These commands have been
24294 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
24295
24296 @item
24297 Articles can be made persistent with the @kbd{*} command
24298 (@pxref{Persistent Articles}).
24299
24300 @item
24301 All functions for hiding article elements are now toggles.
24302
24303 @item
24304 Article headers can be buttonized (@pxref{Article Washing}).
24305
24306 @item
24307 All mail back ends support fetching articles by @code{Message-ID}.
24308
24309 @item
24310 Duplicate mail can now be treated properly (@pxref{Duplicates}).
24311
24312 @item
24313 All summary mode commands are available directly from the article
24314 buffer (@pxref{Article Keymap}).
24315
24316 @item
24317 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
24318 Layout}).
24319
24320 @item
24321 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
24322 @iftex
24323 @iflatex
24324 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
24325 @end iflatex
24326 @end iftex
24327
24328 @item
24329 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
24330
24331 @lisp
24332 (setq gnus-use-nocem t)
24333 @end lisp
24334
24335 @item
24336 Groups can be made permanently visible (@pxref{Listing Groups}).
24337
24338 @lisp
24339 (setq gnus-permanently-visible-groups "^nnml:")
24340 @end lisp
24341
24342 @item
24343 Many new hooks have been introduced to make customizing easier.
24344
24345 @item
24346 Gnus respects the @code{Mail-Copies-To} header.
24347
24348 @item
24349 Threads can be gathered by looking at the @code{References} header
24350 (@pxref{Customizing Threading}).
24351
24352 @lisp
24353 (setq gnus-summary-thread-gathering-function
24354       'gnus-gather-threads-by-references)
24355 @end lisp
24356
24357 @item
24358 Read articles can be stored in a special backlog buffer to avoid
24359 refetching (@pxref{Article Backlog}).
24360
24361 @lisp
24362 (setq gnus-keep-backlog 50)
24363 @end lisp
24364
24365 @item
24366 A clean copy of the current article is always stored in a separate
24367 buffer to allow easier treatment.
24368
24369 @item
24370 Gnus can suggest where to save articles (@pxref{Saving Articles}).
24371
24372 @item
24373 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
24374 Articles}).
24375
24376 @lisp
24377 (setq gnus-prompt-before-saving t)
24378 @end lisp
24379
24380 @item
24381 @code{gnus-uu} can view decoded files asynchronously while fetching
24382 articles (@pxref{Other Decode Variables}).
24383
24384 @lisp
24385 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
24386 @end lisp
24387
24388 @item
24389 Filling in the article buffer now works properly on cited text
24390 (@pxref{Article Washing}).
24391
24392 @item
24393 Hiding cited text adds buttons to toggle hiding, and how much
24394 cited text to hide is now customizable (@pxref{Article Hiding}).
24395
24396 @lisp
24397 (setq gnus-cited-lines-visible 2)
24398 @end lisp
24399
24400 @item
24401 Boring headers can be hidden (@pxref{Article Hiding}).
24402
24403 @item
24404 Default scoring values can now be set from the menu bar.
24405
24406 @item
24407 Further syntax checking of outgoing articles have been added.
24408
24409 @end itemize
24410
24411
24412 @node Red Gnus
24413 @subsubsection Red Gnus
24414
24415 New features in Gnus 5.4/5.5:
24416
24417 @iftex
24418 @iflatex
24419 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
24420 @end iflatex
24421 @end iftex
24422
24423 @itemize @bullet
24424
24425 @item
24426 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
24427
24428 @item
24429 Article prefetching functionality has been moved up into
24430 Gnus (@pxref{Asynchronous Fetching}).
24431
24432 @item
24433 Scoring can now be performed with logical operators like @code{and},
24434 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
24435 Scoring}).
24436
24437 @item
24438 Article washing status can be displayed in the
24439 article mode line (@pxref{Misc Article}).
24440
24441 @item
24442 @file{gnus.el} has been split into many smaller files.
24443
24444 @item
24445 Suppression of duplicate articles based on Message-ID can be done
24446 (@pxref{Duplicate Suppression}).
24447
24448 @lisp
24449 (setq gnus-suppress-duplicates t)
24450 @end lisp
24451
24452 @item
24453 New variables for specifying what score and adapt files are to be
24454 considered home score and adapt files (@pxref{Home Score File}) have
24455 been added.
24456
24457 @item
24458 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
24459 Server Internals}).
24460
24461 @item
24462 Groups can inherit group parameters from parent topics (@pxref{Topic
24463 Parameters}).
24464
24465 @item
24466 Article editing has been revamped and is now actually usable.
24467
24468 @item
24469 Signatures can be recognized in more intelligent fashions
24470 (@pxref{Article Signature}).
24471
24472 @item
24473 Summary pick mode has been made to look more @code{nn}-like.  Line
24474 numbers are displayed and the @kbd{.} command can be used to pick
24475 articles (@code{Pick and Read}).
24476
24477 @item
24478 Commands for moving the @file{.newsrc.eld} from one server to
24479 another have been added (@pxref{Changing Servers}).
24480
24481 @item
24482 There's a way now to specify that ``uninteresting'' fields be suppressed
24483 when generating lines in buffers (@pxref{Advanced Formatting}).
24484
24485 @item
24486 Several commands in the group buffer can be undone with @kbd{C-M-_}
24487 (@pxref{Undo}).
24488
24489 @item
24490 Scoring can be done on words using the new score type @code{w}
24491 (@pxref{Score File Format}).
24492
24493 @item
24494 Adaptive scoring can be done on a Subject word-by-word basis
24495 (@pxref{Adaptive Scoring}).
24496
24497 @lisp
24498 (setq gnus-use-adaptive-scoring '(word))
24499 @end lisp
24500
24501 @item
24502 Scores can be decayed (@pxref{Score Decays}).
24503
24504 @lisp
24505 (setq gnus-decay-scores t)
24506 @end lisp
24507
24508 @item
24509 Scoring can be performed using a regexp on the Date header.  The Date is
24510 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
24511
24512 @item
24513 A new command has been added to remove all data on articles from
24514 the native server (@pxref{Changing Servers}).
24515
24516 @item
24517 A new command for reading collections of documents
24518 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
24519 (@pxref{Really Various Summary Commands}).
24520
24521 @item
24522 Process mark sets can be pushed and popped (@pxref{Setting Process
24523 Marks}).
24524
24525 @item
24526 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
24527 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
24528
24529 @item
24530 A new back end for reading searches from Web search engines
24531 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
24532 (@pxref{Web Searches}).
24533
24534 @item
24535 Groups inside topics can now be sorted using the standard sorting
24536 functions, and each topic can be sorted independently (@pxref{Topic
24537 Sorting}).
24538
24539 @item
24540 Subsets of the groups can be sorted independently (@code{Sorting
24541 Groups}).
24542
24543 @item
24544 Cached articles can be pulled into the groups (@pxref{Summary Generation
24545 Commands}).
24546 @iftex
24547 @iflatex
24548 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
24549 @end iflatex
24550 @end iftex
24551
24552 @item
24553 Score files are now applied in a more reliable order (@pxref{Score
24554 Variables}).
24555
24556 @item
24557 Reports on where mail messages end up can be generated (@pxref{Splitting
24558 Mail}).
24559
24560 @item
24561 More hooks and functions have been added to remove junk from incoming
24562 mail before saving the mail (@pxref{Washing Mail}).
24563
24564 @item
24565 Emphasized text can be properly fontisized:
24566
24567 @end itemize
24568
24569
24570 @node Quassia Gnus
24571 @subsubsection Quassia Gnus
24572
24573 New features in Gnus 5.6:
24574
24575 @itemize @bullet
24576
24577 @item
24578 New functionality for using Gnus as an offline newsreader has been
24579 added.  A plethora of new commands and modes have been added.  See
24580 @pxref{Gnus Unplugged} for the full story.
24581
24582 @item
24583  The @code{nndraft} back end has returned, but works differently than
24584 before.  All Message buffers are now also articles in the @code{nndraft}
24585 group, which is created automatically.
24586
24587 @item
24588 @code{gnus-alter-header-function} can now be used to alter header
24589 values.
24590
24591 @item
24592  @code{gnus-summary-goto-article} now accept Message-ID's.
24593
24594 @item
24595  A new Message command for deleting text in the body of a message
24596 outside the region: @kbd{C-c C-v}.
24597
24598 @item
24599  You can now post to component group in @code{nnvirtual} groups with
24600 @kbd{C-u C-c C-c}.
24601
24602 @item
24603  @code{nntp-rlogin-program}---new variable to ease customization.
24604
24605 @item
24606  @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
24607 re-highlighting of the article buffer.
24608
24609 @item
24610  New element in @code{gnus-boring-article-headers}---@code{long-to}.
24611
24612 @item
24613  @kbd{M-i} symbolic prefix command.  See the section ``Symbolic
24614 Prefixes'' in the Gnus manual for details.
24615
24616 @item
24617  @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
24618 @kbd{a} to add the score rule to the @file{all.SCORE} file.
24619
24620 @item
24621  @code{gnus-simplify-subject-functions} variable to allow greater
24622 control over simplification.
24623
24624 @item
24625  @kbd{A T}---new command for fetching the current thread.
24626
24627 @item
24628  @kbd{/ T}---new command for including the current thread in the
24629 limit.
24630
24631 @item
24632  @kbd{M-RET} is a new Message command for breaking cited text.
24633
24634 @item
24635  @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
24636
24637 @item
24638  The @code{custom-face-lookup} function has been removed.
24639 If you used this function in your initialization files, you must
24640 rewrite them to use @code{face-spec-set} instead.
24641
24642 @item
24643  Canceling now uses the current select method.  Symbolic prefix
24644 @kbd{a} forces normal posting method.
24645
24646 @item
24647  New command to translate M******** sm*rtq**t*s into proper
24648 text---@kbd{W d}.
24649
24650 @item
24651  For easier debugging of @code{nntp}, you can set
24652 @code{nntp-record-commands} to a non-@code{nil} value.
24653
24654 @item
24655  @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
24656 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
24657
24658 @item
24659  A command for editing group parameters from the summary buffer
24660 has been added.
24661
24662 @item
24663  A history of where mails have been split is available.
24664
24665 @item
24666  A new article date command has been added---@code{article-date-iso8601}.
24667
24668 @item
24669  Subjects can be simplified when threading by setting
24670 @code{gnus-score-thread-simplify}.
24671
24672 @item
24673  A new function for citing in Message has been
24674 added---@code{message-cite-original-without-signature}.
24675
24676 @item
24677  @code{article-strip-all-blank-lines}---new article command.
24678
24679 @item
24680  A new Message command to kill to the end of the article has
24681 been added.
24682
24683 @item
24684  A minimum adaptive score can be specified by using the
24685 @code{gnus-adaptive-word-minimum} variable.
24686
24687 @item
24688  The ``lapsed date'' article header can be kept continually
24689 updated by the @code{gnus-start-date-timer} command.
24690
24691 @item
24692  Web listserv archives can be read with the @code{nnlistserv} back end.
24693
24694 @item
24695  Old dejanews archives can now be read by @code{nnweb}.
24696
24697 @end itemize
24698
24699 @node Pterodactyl Gnus
24700 @subsubsection Pterodactyl Gnus
24701
24702 New features in Gnus 5.8:
24703
24704 @itemize @bullet
24705
24706 @item
24707 The mail-fetching functions have changed.  See the manual for the
24708 many details.  In particular, all procmail fetching variables are gone.
24709
24710 If you used procmail like in
24711
24712 @lisp
24713 (setq nnmail-use-procmail t)
24714 (setq nnmail-spool-file 'procmail)
24715 (setq nnmail-procmail-directory "~/mail/incoming/")
24716 (setq nnmail-procmail-suffix "\\.in")
24717 @end lisp
24718
24719 this now has changed to
24720
24721 @lisp
24722 (setq mail-sources
24723       '((directory :path "~/mail/incoming/"
24724                    :suffix ".in")))
24725 @end lisp
24726
24727 @xref{Mail Source Specifiers}.
24728
24729 @item
24730 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
24731 Gnus, and adds a slew of new commands.  See the manual for details.
24732
24733 @item
24734 Gnus has also been multilingualized.  This also affects too
24735 many parts of Gnus to summarize here, and adds many new variables.
24736
24737 @item
24738 @code{gnus-auto-select-first} can now be a function to be
24739 called to position point.
24740
24741 @item
24742 The user can now decide which extra headers should be included in
24743 summary buffers and @acronym{NOV} files.
24744
24745 @item
24746 @code{gnus-article-display-hook} has been removed.  Instead, a number
24747 of variables starting with @code{gnus-treat-} have been added.
24748
24749 @item
24750 The Gnus posting styles have been redone again and now works in a
24751 subtly different manner.
24752
24753 @item
24754 New web-based back ends have been added: @code{nnslashdot},
24755 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
24756 again, to keep up with ever-changing layouts.
24757
24758 @item
24759 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
24760
24761 @end itemize
24762
24763 @node Oort Gnus
24764 @subsubsection Oort Gnus
24765 @cindex Oort Gnus
24766
24767 New features in Gnus 5.10:
24768
24769 @itemize @bullet
24770
24771 @item
24772 The revised Gnus @acronym{FAQ} is included in the manual,
24773 @xref{Frequently Asked Questions}.
24774
24775 @item
24776 Upgrading from previous (stable) version if you have used Oort.
24777
24778 If you have tried Oort (the unstable Gnus branch leading to this
24779 release) but went back to a stable version, be careful when upgrading to
24780 this version.  In particular, you will probably want to remove all
24781 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
24782 read from your @file{.newsrc.eld} instead of from the
24783 @file{.marks}/@file{.mrk} file where this release store flags.  See a
24784 later entry for more information about marks.  Note that downgrading
24785 isn't save in general.
24786
24787 @item
24788 Article Buttons
24789
24790 More buttons for URLs, mail addresses, Message-IDs, Info links, man
24791 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
24792 variables @code{gnus-button-@var{*}-level} can be used to control the
24793 appearance of all article buttons.  @xref{Article Button Levels}.
24794
24795 @item
24796 Dired integration
24797
24798 @code{gnus-dired-minor-mode} installs key bindings in dired buffers to send
24799 a file as an attachment (@kbd{C-c C-a}), open a file using the appropriate
24800 mailcap entry (@kbd{C-c C-l}), and print a file using the mailcap entry
24801 (@kbd{C-c P}).  It is enabled with 
24802 @lisp
24803 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
24804 @end lisp
24805
24806 @item
24807 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
24808
24809 @item
24810 Single-part yenc encoded attachments can be decoded.
24811
24812 @item
24813 Picons
24814
24815 The picons code has been reimplemented to work in GNU Emacs---some of
24816 the previous options have been removed or renamed.
24817
24818 Picons are small ``personal icons'' representing users, domain and
24819 newsgroups, which can be displayed in the Article buffer.
24820 @xref{Picons}.
24821
24822 @item
24823 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
24824 boundary line is drawn at the end of the headers.
24825
24826 @item
24827 Retrieval of charters and control messages
24828
24829 There are new commands for fetching newsgroup charters (@kbd{H c}) and
24830 control messages (@kbd{H C}).
24831
24832 @item
24833 Delayed articles
24834
24835 You can delay the sending of a message with @kbd{C-c C-j} in the Message
24836 buffer.  The messages are delivered at specified time.  This is useful
24837 for sending yourself reminders.  @xref{Delayed Articles}.
24838
24839 @item
24840 If @code{auto-compression-mode} is enabled, attachments are automatically
24841 decompressed when activated.
24842
24843 @item
24844 If the new option @code{nnml-use-compressed-files} is non-@code{nil}, 
24845 the nnml back end allows compressed message files.
24846
24847 @item
24848 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
24849
24850 @item
24851 The Summary Buffer uses an arrow in the fringe to indicate the current 
24852 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
24853
24854 @item
24855 Warn about email replies to news
24856
24857 Do you often find yourself replying to news by email by mistake?  Then
24858 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
24859 you.
24860
24861 @item
24862 If the new option @code{gnus-summary-display-while-building} is
24863 non-@code{nil}, the summary buffer is shown and updated as it's being
24864 built.
24865
24866 @item
24867 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
24868 opposed to old but unread messages).
24869
24870 @item
24871 The new option @code{gnus-gcc-mark-as-read} automatically marks 
24872 Gcc articles as read.
24873
24874 @item
24875 The nndoc back end now supports mailman digests and exim bounces.
24876
24877 @item
24878 Gnus supports RFC 2369 mailing list headers, and adds a number of 
24879 related commands in mailing list groups.  @xref{Mailing List}.
24880
24881 @item
24882 The Date header can be displayed in a format that can be read aloud
24883 in English.  @xref{Article Date}.
24884
24885 @item
24886 The envelope sender address can be customized when using Sendmail.
24887 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
24888
24889 @item
24890 diffs are automatically highlighted in groups matching
24891 @code{mm-uu-diff-groups-regexp}
24892
24893 @item
24894 @acronym{TLS} wrapper shipped with Gnus
24895
24896 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
24897 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
24898 @acronym{TLS}/@acronym{SSL} support via (external third party)
24899 @file{ssl.el} and OpenSSL still works.
24900
24901 @item
24902 New @file{make.bat} for compiling and installing Gnus under MS Windows
24903
24904 Use @file{make.bat} if you want to install Gnus under MS Windows, the
24905 first argument to the batch-program should be the directory where
24906 @file{xemacs.exe} respectively @file{emacs.exe} is located, iff you want
24907 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
24908 the second parameter.
24909
24910 @file{make.bat} has been rewritten from scratch, it now features
24911 automatic recognition of XEmacs and GNU Emacs, generates
24912 @file{gnus-load.el}, checks if errors occur while compilation and
24913 generation of info files and reports them at the end of the build
24914 process. It now uses @code{makeinfo} if it is available and falls
24915 back to @file{infohack.el} otherwise.  @file{make.bat} should now
24916 install all files which are necessary to run Gnus and be generally a
24917 complete replacement for the @code{configure; make; make install}
24918 cycle used under Unix systems.
24919
24920 The new @file{make.bat} makes @file{make-x.bat} superfluous, so it has
24921 been removed.
24922
24923 @item
24924 Support for non-@acronym{ASCII} domain names
24925
24926 Message supports non-@acronym{ASCII} domain names in From:, To: and
24927 Cc: and will query you whether to perform encoding when you try to
24928 send a message.  The variable @code{message-use-idna} controls this.
24929 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
24930 and Cc: when you view a message.  The variable @code{gnus-use-idna}
24931 controls this.
24932
24933 @item
24934 Better handling of Microsoft citation styles
24935
24936 Gnus now tries to recognize the mangled header block that some Microsoft
24937 mailers use to indicate that the rest of the message is a citation, even
24938 though it is not quoted in any way.  The variable
24939 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
24940 citations.
24941
24942 @item
24943 @code{gnus-article-skip-boring}
24944
24945 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
24946 not scroll down to show you a page that contains only boring text,
24947 which by default means cited text and signature.  You can customize
24948 what is skippable using @code{gnus-article-boring-faces}.
24949
24950 This feature is especially useful if you read many articles that
24951 consist of a little new content at the top with a long, untrimmed
24952 message cited below.
24953
24954 @item
24955 The format spec @code{%C} for positioning point has changed to @code{%*}.
24956
24957 @item
24958 The new variable @code{gnus-parameters} can be used to set group parameters.
24959
24960 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
24961 the parameters in @file{~/.newsrc.eld}, but via this variable you can
24962 enjoy the powers of customize, and simplified backups since you set the
24963 variable in @file{~/.emacs} instead of @file{~/.newsrc.eld}.  The
24964 variable maps regular expressions matching group names to group
24965 parameters, a'la:
24966 @lisp
24967 (setq gnus-parameters
24968       '(("mail\\..*"
24969          (gnus-show-threads nil)
24970          (gnus-use-scoring nil))
24971         ("^nnimap:\\(foo.bar\\)$"
24972          (to-group . "\\1"))))
24973 @end lisp
24974
24975 @item
24976 Smileys (@samp{:-)}, @samp{;-)} etc) are now iconized for Emacs too.
24977
24978 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.emacs} to
24979 disable it.
24980
24981 @item
24982 Gnus no longer generate the Sender: header automatically.
24983
24984 Earlier it was generated iff the user configurable email address was
24985 different from the Gnus guessed default user address.  As the guessing
24986 algorithm is rarely correct these days, and (more controversially) the
24987 only use of the Sender: header was to check if you are entitled to
24988 cancel/supersede news (which is now solved by Cancel Locks instead,
24989 see another entry), generation of the header has been disabled by
24990 default.  See the variables @code{message-required-headers},
24991 @code{message-required-news-headers}, and
24992 @code{message-required-mail-headers}.
24993
24994 @item
24995 Features from third party @file{message-utils.el} added to @file{message.el}.
24996
24997 Message now asks if you wish to remove @samp{(was: <old subject>)} from
24998 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
24999 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
25000 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
25001 appropriate headers and a note in the body for cross-postings and
25002 followups (see the variables @code{message-cross-post-@var{*}}).
25003
25004 @item
25005 References and X-Draft-Headers are no longer generated when you start
25006 composing messages and @code{message-generate-headers-first} is
25007 @code{nil}.
25008
25009 @item
25010 Improved anti-spam features.
25011
25012 Gnus is now able to take out spam from your mail and news streams
25013 using a wide variety of programs and filter rules. Among the supported
25014 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
25015 for easy use of external packages such as SpamAssassin and Hashcash
25016 are also new.  @xref{Thwarting Email Spam}.
25017
25018 @item
25019 Easy inclusion of X-Faces headers.
25020
25021 @item
25022 In the summary buffer, the new command @kbd{/ N} inserts new messages
25023 and @kbd{/ o} inserts old messages.
25024
25025 @item
25026 Gnus decodes morse encoded messages if you press @kbd{W m}.
25027
25028 @item
25029 Unread count correct in nnimap groups.
25030
25031 The estimated number of unread articles in the group buffer should now
25032 be correct for nnimap groups.  This is achieved by calling
25033 @code{nnimap-fixup-unread-after-getting-new-news} from the
25034 @code{gnus-setup-news-hook} (called on startup) and
25035 @code{gnus-after-getting-new-news-hook}. (called after getting new
25036 mail).  If you have modified those variables from the default, you may
25037 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
25038 you were happy with the estimate and want to save some (minimal) time
25039 when getting new mail, remove the function.
25040
25041 @item
25042 Group Carbon Copy (GCC) quoting
25043
25044 To support groups that contains SPC and other weird characters, groups
25045 are quoted before they are placed in the Gcc: header.  This means
25046 variables such as @code{gnus-message-archive-group} should no longer
25047 contain quote characters to make groups containing SPC work.  Also, if
25048 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
25049 into two groups) you must change it to return the list
25050 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
25051 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
25052 was incorrect earlier, it just didn't generate any problems since it
25053 was inserted directly.
25054
25055 @item
25056 @file{~/News/overview/} not used.
25057
25058 As a result of the following change, the @file{~/News/overview/}
25059 directory is not used any more.  You can safely delete the entire
25060 hierarchy.
25061
25062 @item
25063 @code{gnus-agent}
25064
25065 The Gnus Agent has seen a major updated and is now enabled by default,
25066 and all nntp and nnimap servers from @code{gnus-select-method} and
25067 @code{gnus-secondary-select-method} are agentized by default. Earlier
25068 only the server in @code{gnus-select-method} was agentized by the
25069 default, and the agent was disabled by default.  When the agent is
25070 enabled, headers are now also retrieved from the Agent cache instead
25071 of the back ends when possible. Earlier this only happened in the
25072 unplugged state.  You can enroll or remove servers with @kbd{J a} and
25073 @kbd{J r} in the server buffer.  Gnus will not download articles into
25074 the Agent cache, unless you instruct it to do so, though, by using
25075 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
25076 behaviour of having the Agent disabled with @code{(setq gnus-agent
25077 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
25078 is not needed any more.
25079
25080 @item
25081 @code{gnus-summary-line-format}
25082
25083 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
25084 %s\n}.  Moreover @code{gnus-extra-headers},
25085 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
25086 changed their default so that the users name will be replaced by the
25087 recipient's name or the group name posting to for @acronym{NNTP}
25088 groups.
25089
25090 @item
25091 @file{deuglify.el} (@code{gnus-article-outlook-deuglify-article})
25092
25093 A new file from Raymond Scholz @email{rscholz@@zonix.de} for deuglifying
25094 broken Outlook (Express) articles.
25095
25096 @item
25097 @code{(require 'gnus-load)}
25098
25099 If you use a stand-alone Gnus distribution, you'd better add
25100 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
25101 lisp directory into load-path.
25102
25103 File @file{gnus-load.el} contains autoload commands, functions and variables,
25104 some of which may not be included in distributions of Emacsen.
25105
25106 @item
25107 @code{gnus-slave-unplugged}
25108
25109 A new command which starts Gnus offline in slave mode.
25110
25111 @item
25112 @code{message-insinuate-rmail}
25113
25114 Adding @code{(message-insinuate-rmail)} and @code{(setq
25115 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
25116 compose, reply and forward messages in message-mode, where you can
25117 enjoy the power of @acronym{MML}.
25118
25119 @item
25120 @code{message-minibuffer-local-map}
25121
25122 The line below enables BBDB in resending a message:
25123 @lisp
25124 (define-key message-minibuffer-local-map [(tab)]
25125   'bbdb-complete-name)
25126 @end lisp
25127
25128 @item
25129 Externalizing and deleting of attachments.
25130
25131 If @code{gnus-gcc-externalize-attachments} or
25132 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
25133 local files as external parts.
25134
25135 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
25136 on @acronym{MIME} buttons) saves a part and replaces the part with an
25137 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
25138 @acronym{MIME} buttons) removes a part. It works only on back ends
25139 that support editing.
25140
25141 @item
25142 @code{gnus-default-charset}
25143
25144 The default value is determined from the
25145 @code{current-language-environment} variable, instead of
25146 @code{iso-8859-1}.  Also the @samp{.*} item in
25147 @code{gnus-group-charset-alist} is removed.
25148
25149 @item
25150 @code{gnus-posting-styles}
25151
25152 Add a new format of match like
25153 @lisp
25154 ((header "to" "larsi.*org")
25155  (Organization "Somewhere, Inc."))
25156 @end lisp
25157 The old format like the lines below is obsolete, but still accepted.
25158 @lisp
25159 (header "to" "larsi.*org"
25160         (Organization "Somewhere, Inc."))
25161 @end lisp
25162
25163 @item
25164 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
25165
25166 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
25167 added into these two variables. If you customized those, perhaps you
25168 need add those two headers too.
25169
25170 @item
25171 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
25172
25173 If one reads an article while plugged, and the article already exists
25174 in the Agent, it won't get downloaded once more.  @code{(setq
25175 gnus-agent-cache nil)} reverts to the old behavior.
25176
25177 @item
25178 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
25179 composing messages, it is enabled by @code{use-hard-newlines}.
25180 Decoding format=flowed was present but not documented in earlier
25181 versions.
25182
25183 @item
25184 Gnus supports the generation of RFC 2298 Disposition Notification requests.
25185
25186 This is invoked with the @kbd{C-c M-n} key binding from message mode.
25187
25188 @item
25189 Gnus supports Maildir groups.
25190
25191 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
25192
25193 @item
25194 Printing capabilities are enhanced.
25195
25196 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
25197 Article buffers.  Also, each individual @acronym{MIME} part can be
25198 printed using @kbd{p} on the @acronym{MIME} button.
25199
25200 @item
25201 Message supports the Importance: (RFC 2156) header.
25202
25203 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
25204 the valid values.
25205
25206 @item
25207 Gnus supports Cancel Locks in News.
25208
25209 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
25210 used to determine if you wrote an article or not (for cancelling and
25211 superseding).  Gnus generates a random password string the first time
25212 you post a message, and saves it in your @file{~/.emacs} using the Custom
25213 system.  While the variable is called @code{canlock-password}, it is not
25214 security sensitive data.  Publishing your canlock string on the web
25215 will not allow anyone to be able to anything she could not already do.
25216 The behaviour can be changed by customizing @code{message-insert-canlock}.
25217
25218 @item
25219 Gnus supports server-side mail filtering using Sieve.
25220
25221 Sieve rules can be added as Group Parameters for groups, and the
25222 complete Sieve script is generated using @kbd{D g} from the Group
25223 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
25224 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
25225 manual @ref{Top, , Top, sieve, Emacs Sieve}.
25226
25227 @item
25228 Extended format specs.
25229
25230 Format spec @samp{%&user-date;} is added into
25231 @code{gnus-summary-line-format-alist}.  Also, user defined extended
25232 format specs are supported.  The extended format specs look like
25233 @samp{%u&foo;}, which invokes function
25234 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
25235 escape character, old user defined format @samp{%u&} is no longer supported.
25236
25237 @item
25238 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
25239
25240 It was aliased to @kbd{Y c}
25241 (@code{gnus-summary-insert-cached-articles}). The new function filters
25242 out other articles.
25243
25244 @item Some limiting commands accept a @kbd{C-u} prefix to negate the match.
25245
25246 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
25247 s}, @kbd{/ a}, and @kbd{/ x}
25248 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
25249 result will be to display all articles that do not match the expression.
25250
25251 @item
25252 Group names are treated as UTF-8 by default.
25253
25254 This is supposedly what USEFOR wanted to migrate to.  See
25255 @code{gnus-group-name-charset-group-alist} and
25256 @code{gnus-group-name-charset-method-alist} for customization.
25257
25258 @item
25259 The nnml and nnfolder back ends store marks for each groups.
25260
25261 This makes it possible to take backup of nnml/nnfolder servers/groups
25262 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
25263 makes it possible to share articles and marks between users (without
25264 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
25265 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
25266 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
25267 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
25268 another machine, Gnus will automatically use the @file{.marks} or
25269 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
25270 The new server variables @code{nnml-marks-is-evil} and
25271 @code{nnfolder-marks-is-evil} can be used to disable this feature.
25272
25273 @item
25274 The menu bar item (in Group and Summary buffer) named ``Misc'' has
25275 been renamed to ``Gnus''.
25276
25277 @item
25278 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
25279 renamed to ``Attachments''.  Note that this menu also contains security
25280 related stuff, like signing and encryption (@pxref{Security, Security,,
25281 message, Message Manual}).
25282
25283 @item
25284 @code{gnus-group-charset-alist} and
25285 @code{gnus-group-ignored-charsets-alist}.
25286
25287 The regexps in these variables are compared with full group names
25288 instead of real group names in 5.8.  Users who customize these
25289 variables should change those regexps accordingly. For example:
25290 @lisp
25291 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
25292 @end lisp
25293
25294 @item
25295 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
25296 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
25297
25298 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
25299 additional Lisp libraries.  This add several menu items to the
25300 Attachments menu, and @kbd{C-c RET} key bindings, when composing
25301 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
25302
25303 @item
25304 Gnus inlines external parts (message/external).
25305
25306 @item
25307 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
25308 C-m}.
25309
25310 This change was made to avoid conflict with the standard binding of
25311 @code{back-to-indentation}, which is also useful in message mode.
25312 @end itemize
25313
25314 @iftex
25315
25316 @page
25317 @node The Manual
25318 @section The Manual
25319 @cindex colophon
25320 @cindex manual
25321
25322 This manual was generated from a TeXinfo file and then run through
25323 either @code{texi2dvi}
25324 @iflatex
25325 or my own home-brewed TeXinfo to \LaTeX\ transformer,
25326 and then run through @code{latex} and @code{dvips}
25327 @end iflatex
25328 to get what you hold in your hands now.
25329
25330 The following conventions have been used:
25331
25332 @enumerate
25333
25334 @item
25335 This is a @samp{string}
25336
25337 @item
25338 This is a @kbd{keystroke}
25339
25340 @item
25341 This is a @file{file}
25342
25343 @item
25344 This is a @code{symbol}
25345
25346 @end enumerate
25347
25348 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
25349 mean:
25350
25351 @lisp
25352 (setq flargnoze "yes")
25353 @end lisp
25354
25355 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
25356
25357 @lisp
25358 (setq flumphel 'yes)
25359 @end lisp
25360
25361 @samp{yes} and @code{yes} are two @emph{very} different things---don't
25362 ever get them confused.
25363
25364 @iflatex
25365 @c @head
25366 Of course, everything in this manual is of vital interest, so you should
25367 read it all.  Several times.  However, if you feel like skimming the
25368 manual, look for that gnu head you should see in the margin over
25369 there---it means that what's being discussed is of more importance than
25370 the rest of the stuff.  (On the other hand, if everything is infinitely
25371 important, how can anything be more important than that?  Just one more
25372 of the mysteries of this world, I guess.)
25373 @end iflatex
25374
25375 @end iftex
25376
25377
25378 @node On Writing Manuals
25379 @section On Writing Manuals
25380
25381 I guess most manuals are written after-the-fact; documenting a program
25382 that's already there.  This is not how this manual is written.  When
25383 implementing something, I write the manual entry for that something
25384 straight away.  I then see that it's difficult to explain the
25385 functionality, so I write how it's supposed to be, and then I change the
25386 implementation.  Writing the documentation and writing the code goes
25387 hand in hand.
25388
25389 This, of course, means that this manual has no, or little, flow.  It
25390 documents absolutely everything in Gnus, but often not where you're
25391 looking for it.  It is a reference manual, and not a guide to how to get
25392 started with Gnus.
25393
25394 That would be a totally different book, that should be written using the
25395 reference manual as source material.  It would look quite differently.
25396
25397
25398 @page
25399 @node Terminology
25400 @section Terminology
25401
25402 @cindex terminology
25403 @table @dfn
25404
25405 @item news
25406 @cindex news
25407 This is what you are supposed to use this thing for---reading news.
25408 News is generally fetched from a nearby @acronym{NNTP} server, and is
25409 generally publicly available to everybody.  If you post news, the entire
25410 world is likely to read just what you have written, and they'll all
25411 snigger mischievously.  Behind your back.
25412
25413 @item mail
25414 @cindex mail
25415 Everything that's delivered to you personally is mail.  Some news/mail
25416 readers (like Gnus) blur the distinction between mail and news, but
25417 there is a difference.  Mail is private.  News is public.  Mailing is
25418 not posting, and replying is not following up.
25419
25420 @item reply
25421 @cindex reply
25422 Send a mail to the person who has written what you are reading.
25423
25424 @item follow up
25425 @cindex follow up
25426 Post an article to the current newsgroup responding to the article you
25427 are reading.
25428
25429 @item back end
25430 @cindex back end
25431 Gnus considers mail and news to be mostly the same, really.  The only
25432 difference is how to access the actual articles.  News articles are
25433 commonly fetched via the protocol @acronym{NNTP}, whereas mail
25434 messages could be read from a file on the local disk.  The internal
25435 architecture of Gnus thus comprises a `front end' and a number of
25436 `back ends'.  Internally, when you enter a group (by hitting
25437 @key{RET}, say), you thereby invoke a function in the front end in
25438 Gnus.  The front end then `talks' to a back end and says things like
25439 ``Give me the list of articles in the foo group'' or ``Show me article
25440 number 4711''.
25441
25442 So a back end mainly defines either a protocol (the @code{nntp} back
25443 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
25444 accesses mail via @acronym{IMAP}) or a file format and directory
25445 layout (the @code{nnspool} back end accesses news via the common
25446 `spool directory' format, the @code{nnml} back end access mail via a
25447 file format and directory layout that's quite similar).
25448
25449 Gnus does not handle the underlying media, so to speak---this is all
25450 done by the back ends.  A back end is a collection of functions to
25451 access the articles.
25452
25453 However, sometimes the term `back end' is also used where `server'
25454 would have been more appropriate.  And then there is the term `select
25455 method' which can mean either.  The Gnus terminology can be quite
25456 confusing.
25457
25458 @item native
25459 @cindex native
25460 Gnus will always use one method (and back end) as the @dfn{native}, or
25461 default, way of getting news.
25462
25463 @item foreign
25464 @cindex foreign
25465 You can also have any number of foreign groups active at the same time.
25466 These are groups that use non-native non-secondary back ends for getting
25467 news.
25468
25469 @item secondary
25470 @cindex secondary
25471 Secondary back ends are somewhere half-way between being native and being
25472 foreign, but they mostly act like they are native.
25473
25474 @item article
25475 @cindex article
25476 A message that has been posted as news.
25477
25478 @item mail message
25479 @cindex mail message
25480 A message that has been mailed.
25481
25482 @item message
25483 @cindex message
25484 A mail message or news article
25485
25486 @item head
25487 @cindex head
25488 The top part of a message, where administrative information (etc.) is
25489 put.
25490
25491 @item body
25492 @cindex body
25493 The rest of an article.  Everything not in the head is in the
25494 body.
25495
25496 @item header
25497 @cindex header
25498 A line from the head of an article.
25499
25500 @item headers
25501 @cindex headers
25502 A collection of such lines, or a collection of heads.  Or even a
25503 collection of @acronym{NOV} lines.
25504
25505 @item @acronym{NOV}
25506 @cindex @acronym{NOV}
25507 When Gnus enters a group, it asks the back end for the headers of all
25508 unread articles in the group.  Most servers support the News OverView
25509 format, which is more compact and much faster to read and parse than the
25510 normal @sc{head} format.
25511
25512 @item level
25513 @cindex levels
25514 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
25515 that have a lower level are ``more'' subscribed than the groups with a
25516 higher level.  In fact, groups on levels 1-5 are considered
25517 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
25518 are @dfn{killed}.  Commands for listing groups and scanning for new
25519 articles will all use the numeric prefix as @dfn{working level}.
25520
25521 @item killed groups
25522 @cindex killed groups
25523 No information on killed groups is stored or updated, which makes killed
25524 groups much easier to handle than subscribed groups.
25525
25526 @item zombie groups
25527 @cindex zombie groups
25528 Just like killed groups, only slightly less dead.
25529
25530 @item active file
25531 @cindex active file
25532 The news server has to keep track of what articles it carries, and what
25533 groups exist.  All this information in stored in the active file, which
25534 is rather large, as you might surmise.
25535
25536 @item bogus groups
25537 @cindex bogus groups
25538 A group that exists in the @file{.newsrc} file, but isn't known to the
25539 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
25540 This means that the group probably doesn't exist (any more).
25541
25542 @item activating
25543 @cindex activating groups
25544 The act of asking the server for info on a group and computing the
25545 number of unread articles is called @dfn{activating the group}.
25546 Un-activated groups are listed with @samp{*} in the group buffer.
25547
25548 @item server
25549 @cindex server
25550 A machine one can connect to and get news (or mail) from.
25551
25552 @item select method
25553 @cindex select method
25554 A structure that specifies the back end, the server and the virtual
25555 server settings.
25556
25557 @item virtual server
25558 @cindex virtual server
25559 A named select method.  Since a select method defines all there is to
25560 know about connecting to a (physical) server, taking the thing as a
25561 whole is a virtual server.
25562
25563 @item washing
25564 @cindex washing
25565 Taking a buffer and running it through a filter of some sort.  The
25566 result will (more often than not) be cleaner and more pleasing than the
25567 original.
25568
25569 @item ephemeral groups
25570 @cindex ephemeral groups
25571 @cindex temporary groups
25572 Most groups store data on what articles you have read.  @dfn{Ephemeral}
25573 groups are groups that will have no data stored---when you exit the
25574 group, it'll disappear into the aether.
25575
25576 @item solid groups
25577 @cindex solid groups
25578 This is the opposite of ephemeral groups.  All groups listed in the
25579 group buffer are solid groups.
25580
25581 @item sparse articles
25582 @cindex sparse articles
25583 These are article placeholders shown in the summary buffer when
25584 @code{gnus-build-sparse-threads} has been switched on.
25585
25586 @item threading
25587 @cindex threading
25588 To put responses to articles directly after the articles they respond
25589 to---in a hierarchical fashion.
25590
25591 @item root
25592 @cindex root
25593 @cindex thread root
25594 The first article in a thread is the root.  It is the ancestor of all
25595 articles in the thread.
25596
25597 @item parent
25598 @cindex parent
25599 An article that has responses.
25600
25601 @item child
25602 @cindex child
25603 An article that responds to a different article---its parent.
25604
25605 @item digest
25606 @cindex digest
25607 A collection of messages in one file.  The most common digest format is
25608 specified by RFC 1153.
25609
25610 @end table
25611
25612
25613 @page
25614 @node Customization
25615 @section Customization
25616 @cindex general customization
25617
25618 All variables are properly documented elsewhere in this manual.  This
25619 section is designed to give general pointers on how to customize Gnus
25620 for some quite common situations.
25621
25622 @menu
25623 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
25624 * Slow Terminal Connection::    You run a remote Emacs.
25625 * Little Disk Space::           You feel that having large setup files is icky.
25626 * Slow Machine::                You feel like buying a faster machine.
25627 @end menu
25628
25629
25630 @node Slow/Expensive Connection
25631 @subsection Slow/Expensive NNTP Connection
25632
25633 If you run Emacs on a machine locally, and get your news from a machine
25634 over some very thin strings, you want to cut down on the amount of data
25635 Gnus has to get from the @acronym{NNTP} server.
25636
25637 @table @code
25638
25639 @item gnus-read-active-file
25640 Set this to @code{nil}, which will inhibit Gnus from requesting the
25641 entire active file from the server.  This file is often v.  large.  You
25642 also have to set @code{gnus-check-new-newsgroups} and
25643 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
25644 doesn't suddenly decide to fetch the active file anyway.
25645
25646 @item gnus-nov-is-evil
25647 This one has to be @code{nil}.  If not, grabbing article headers from
25648 the @acronym{NNTP} server will not be very fast.  Not all @acronym{NNTP} servers
25649 support @sc{xover}; Gnus will detect this by itself.
25650 @end table
25651
25652
25653 @node Slow Terminal Connection
25654 @subsection Slow Terminal Connection
25655
25656 Let's say you use your home computer for dialing up the system that runs
25657 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
25658 possible) the amount of data sent over the wires.
25659
25660 @table @code
25661
25662 @item gnus-auto-center-summary
25663 Set this to @code{nil} to inhibit Gnus from re-centering the summary
25664 buffer all the time.  If it is @code{vertical}, do only vertical
25665 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
25666 horizontal and vertical recentering.
25667
25668 @item gnus-visible-headers
25669 Cut down on the headers included in the articles to the
25670 minimum.  You can, in fact, make do without them altogether---most of the
25671 useful data is in the summary buffer, anyway.  Set this variable to
25672 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
25673
25674 Set this hook to all the available hiding commands:
25675 @lisp
25676 (setq gnus-treat-hide-headers 'head
25677       gnus-treat-hide-signature t
25678       gnus-treat-hide-citation t)
25679 @end lisp
25680
25681 @item gnus-use-full-window
25682 By setting this to @code{nil}, you can make all the windows smaller.
25683 While this doesn't really cut down much generally, it means that you
25684 have to see smaller portions of articles before deciding that you didn't
25685 want to read them anyway.
25686
25687 @item gnus-thread-hide-subtree
25688 If this is non-@code{nil}, all threads in the summary buffer will be
25689 hidden initially.
25690
25691
25692 @item gnus-updated-mode-lines
25693 If this is @code{nil}, Gnus will not put information in the buffer mode
25694 lines, which might save some time.
25695 @end table
25696
25697
25698 @node Little Disk Space
25699 @subsection Little Disk Space
25700 @cindex disk space
25701
25702 The startup files can get rather large, so you may want to cut their
25703 sizes a bit if you are running out of space.
25704
25705 @table @code
25706
25707 @item gnus-save-newsrc-file
25708 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
25709 only save @file{.newsrc.eld}.  This means that you will not be able to
25710 use any other newsreaders than Gnus.  This variable is @code{t} by
25711 default.
25712
25713 @item gnus-read-newsrc-file
25714 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
25715 only read @file{.newsrc.eld}.  This means that you will not be able to
25716 use any other newsreaders than Gnus.  This variable is @code{t} by
25717 default.
25718
25719 @item gnus-save-killed-list
25720 If this is @code{nil}, Gnus will not save the list of dead groups.  You
25721 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
25722 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
25723 variable to @code{nil}.  This variable is @code{t} by default.
25724
25725 @end table
25726
25727
25728 @node Slow Machine
25729 @subsection Slow Machine
25730 @cindex slow machine
25731
25732 If you have a slow machine, or are just really impatient, there are a
25733 few things you can do to make Gnus run faster.
25734
25735 Set @code{gnus-check-new-newsgroups} and
25736 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
25737
25738 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
25739 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
25740 summary buffer faster.
25741
25742
25743 @page
25744 @node Troubleshooting
25745 @section Troubleshooting
25746 @cindex troubleshooting
25747
25748 Gnus works @emph{so} well straight out of the box---I can't imagine any
25749 problems, really.
25750
25751 Ahem.
25752
25753 @enumerate
25754
25755 @item
25756 Make sure your computer is switched on.
25757
25758 @item
25759 Make sure that you really load the current Gnus version.  If you have
25760 been running @sc{gnus}, you need to exit Emacs and start it up again before
25761 Gnus will work.
25762
25763 @item
25764 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
25765 like @samp{Gnus v5.46; nntp 4.0} you have the right files loaded.  If,
25766 on the other hand, you get something like @samp{NNTP 3.x} or @samp{nntp
25767 flee}, you have some old @file{.el} files lying around.  Delete these.
25768
25769 @item
25770 Read the help group (@kbd{G h} in the group buffer) for a
25771 @acronym{FAQ} and a how-to.
25772
25773 @item
25774 @vindex max-lisp-eval-depth
25775 Gnus works on many recursive structures, and in some extreme (and very
25776 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
25777 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
25778 something like that.
25779 @end enumerate
25780
25781 If all else fails, report the problem as a bug.
25782
25783 @cindex bugs
25784 @cindex reporting bugs
25785
25786 @kindex M-x gnus-bug
25787 @findex gnus-bug
25788 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
25789 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
25790 me the backtrace.  I will fix bugs, but I can only fix them if you send
25791 me a precise description as to how to reproduce the bug.
25792
25793 You really can never be too detailed in a bug report.  Always use the
25794 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
25795 a 10Kb mail each time you use it, and even if you have sent me your
25796 environment 500 times before.  I don't care.  I want the full info each
25797 time.
25798
25799 It is also important to remember that I have no memory whatsoever.  If
25800 you send a bug report, and I send you a reply, and then you just send
25801 back ``No, it's not! Moron!'', I will have no idea what you are
25802 insulting me about.  Always over-explain everything.  It's much easier
25803 for all of us---if I don't have all the information I need, I will just
25804 mail you and ask for more info, and everything takes more time.
25805
25806 If the problem you're seeing is very visual, and you can't quite explain
25807 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
25808 it somewhere it can be reached, and include the URL of the picture in
25809 the bug report.
25810
25811 @cindex patches
25812 If you would like to contribute a patch to fix bugs or make
25813 improvements, please produce the patch using @samp{diff -u}.
25814
25815 @cindex edebug
25816 If you want to debug your problem further before reporting, possibly
25817 in order to solve the problem yourself and send a patch, you can use
25818 edebug.  Debugging Lisp code is documented in the Elisp manual
25819 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
25820 Lisp Reference Manual}).  To get you started with edebug, consider if
25821 you discover some weird behaviour when pressing @kbd{c}, the first
25822 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
25823 the documentation buffer that leads you to the function definition,
25824 then press @kbd{M-x edebug-defun RET} with point inside that function,
25825 return to Gnus and press @kbd{c} to invoke the code.  You will be
25826 placed in the lisp buffer and can single step using @kbd{SPC} and
25827 evaluate expressions using @kbd{M-:} or inspect variables using
25828 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
25829 @kbd{c} or @kbd{g}.
25830
25831 @cindex elp
25832 @cindex profile
25833 @cindex slow
25834 Sometimes, a problem do not directly generate an elisp error but
25835 manifests itself by causing Gnus to be very slow.  In these cases, you
25836 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
25837 slow, and then try to analyze the backtrace (repeating the procedure
25838 helps isolating the real problem areas).  
25839
25840 A fancier approach is to use the elisp profiler, ELP.  The profiler is
25841 (or should be) fully documented elsewhere, but to get you started
25842 there are a few steps that need to be followed.  First, instrument the
25843 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
25844 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
25845 RET message}.  Then perform the operation that is slow and press
25846 @kbd{M-x elp-results}.  You will then see which operations that takes
25847 time, and can debug them further.  If the entire operation takes much
25848 longer than the time spent in the slowest function in the profiler
25849 output, you probably profiled the wrong part of Gnus.  To reset
25850 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
25851 elp-restore-all} is supposed to remove profiling, but given the
25852 complexities and dynamic code generation in Gnus, it might not always
25853 work perfectly.
25854
25855 @cindex gnu.emacs.gnus
25856 @cindex ding mailing list
25857 If you just need help, you are better off asking on
25858 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
25859 @email{ding@@gnus.org, the ding mailing list}.  Write to
25860 @email{ding-request@@gnus.org} to subscribe.
25861
25862
25863 @page
25864 @node Gnus Reference Guide
25865 @section Gnus Reference Guide
25866
25867 It is my hope that other people will figure out smart stuff that Gnus
25868 can do, and that other people will write those smart things as well.  To
25869 facilitate that I thought it would be a good idea to describe the inner
25870 workings of Gnus.  And some of the not-so-inner workings, while I'm at
25871 it.
25872
25873 You can never expect the internals of a program not to change, but I
25874 will be defining (in some details) the interface between Gnus and its
25875 back ends (this is written in stone), the format of the score files
25876 (ditto), data structures (some are less likely to change than others)
25877 and general methods of operation.
25878
25879 @menu
25880 * Gnus Utility Functions::      Common functions and variable to use.
25881 * Back End Interface::          How Gnus communicates with the servers.
25882 * Score File Syntax::           A BNF definition of the score file standard.
25883 * Headers::                     How Gnus stores headers internally.
25884 * Ranges::                      A handy format for storing mucho numbers.
25885 * Group Info::                  The group info format.
25886 * Extended Interactive::        Symbolic prefixes and stuff.
25887 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
25888 * Various File Formats::        Formats of files that Gnus use.
25889 @end menu
25890
25891
25892 @node Gnus Utility Functions
25893 @subsection Gnus Utility Functions
25894 @cindex Gnus utility functions
25895 @cindex utility functions
25896 @cindex functions
25897 @cindex internal variables
25898
25899 When writing small functions to be run from hooks (and stuff), it's
25900 vital to have access to the Gnus internal functions and variables.
25901 Below is a list of the most common ones.
25902
25903 @table @code
25904
25905 @item gnus-newsgroup-name
25906 @vindex gnus-newsgroup-name
25907 This variable holds the name of the current newsgroup.
25908
25909 @item gnus-find-method-for-group
25910 @findex gnus-find-method-for-group
25911 A function that returns the select method for @var{group}.
25912
25913 @item gnus-group-real-name
25914 @findex gnus-group-real-name
25915 Takes a full (prefixed) Gnus group name, and returns the unprefixed
25916 name.
25917
25918 @item gnus-group-prefixed-name
25919 @findex gnus-group-prefixed-name
25920 Takes an unprefixed group name and a select method, and returns the full
25921 (prefixed) Gnus group name.
25922
25923 @item gnus-get-info
25924 @findex gnus-get-info
25925 Returns the group info list for @var{group}.
25926
25927 @item gnus-group-unread
25928 @findex gnus-group-unread
25929 The number of unread articles in @var{group}, or @code{t} if that is
25930 unknown.
25931
25932 @item gnus-active
25933 @findex gnus-active
25934 The active entry for @var{group}.
25935
25936 @item gnus-set-active
25937 @findex gnus-set-active
25938 Set the active entry for @var{group}.
25939
25940 @item gnus-add-current-to-buffer-list
25941 @findex gnus-add-current-to-buffer-list
25942 Adds the current buffer to the list of buffers to be killed on Gnus
25943 exit.
25944
25945 @item gnus-continuum-version
25946 @findex gnus-continuum-version
25947 Takes a Gnus version string as a parameter and returns a floating point
25948 number.  Earlier versions will always get a lower number than later
25949 versions.
25950
25951 @item gnus-group-read-only-p
25952 @findex gnus-group-read-only-p
25953 Says whether @var{group} is read-only or not.
25954
25955 @item gnus-news-group-p
25956 @findex gnus-news-group-p
25957 Says whether @var{group} came from a news back end.
25958
25959 @item gnus-ephemeral-group-p
25960 @findex gnus-ephemeral-group-p
25961 Says whether @var{group} is ephemeral or not.
25962
25963 @item gnus-server-to-method
25964 @findex gnus-server-to-method
25965 Returns the select method corresponding to @var{server}.
25966
25967 @item gnus-server-equal
25968 @findex gnus-server-equal
25969 Says whether two virtual servers are equal.
25970
25971 @item gnus-group-native-p
25972 @findex gnus-group-native-p
25973 Says whether @var{group} is native or not.
25974
25975 @item gnus-group-secondary-p
25976 @findex gnus-group-secondary-p
25977 Says whether @var{group} is secondary or not.
25978
25979 @item gnus-group-foreign-p
25980 @findex gnus-group-foreign-p
25981 Says whether @var{group} is foreign or not.
25982
25983 @item gnus-group-find-parameter
25984 @findex gnus-group-find-parameter
25985 Returns the parameter list of @var{group}.  If given a second parameter,
25986 returns the value of that parameter for @var{group}.
25987
25988 @item gnus-group-set-parameter
25989 @findex gnus-group-set-parameter
25990 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
25991
25992 @item gnus-narrow-to-body
25993 @findex gnus-narrow-to-body
25994 Narrows the current buffer to the body of the article.
25995
25996 @item gnus-check-backend-function
25997 @findex gnus-check-backend-function
25998 Takes two parameters, @var{function} and @var{group}.  If the back end
25999 @var{group} comes from supports @var{function}, return non-@code{nil}.
26000
26001 @lisp
26002 (gnus-check-backend-function "request-scan" "nnml:misc")
26003 @result{} t
26004 @end lisp
26005
26006 @item gnus-read-method
26007 @findex gnus-read-method
26008 Prompts the user for a select method.
26009
26010 @end table
26011
26012
26013 @node Back End Interface
26014 @subsection Back End Interface
26015
26016 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
26017 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
26018 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
26019 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
26020 examples of the latter we have @code{nntp-port-number} and
26021 @code{nnmbox-directory}.
26022
26023 When Gnus asks for information from a back end---say @code{nntp}---on
26024 something, it will normally include a virtual server name in the
26025 function parameters.  (If not, the back end should use the ``current''
26026 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
26027 server as its only (optional) parameter.  If this virtual server hasn't
26028 been opened, the function should fail.
26029
26030 Note that a virtual server name has no relation to some physical server
26031 name.  Take this example:
26032
26033 @lisp
26034 (nntp "odd-one"
26035       (nntp-address "ifi.uio.no")
26036       (nntp-port-number 4324))
26037 @end lisp
26038
26039 Here the virtual server name is @samp{odd-one} while the name of
26040 the physical server is @samp{ifi.uio.no}.
26041
26042 The back ends should be able to switch between several virtual servers.
26043 The standard back ends implement this by keeping an alist of virtual
26044 server environments that they pull down/push up when needed.
26045
26046 There are two groups of interface functions: @dfn{required functions},
26047 which must be present, and @dfn{optional functions}, which Gnus will
26048 always check for presence before attempting to call 'em.
26049
26050 All these functions are expected to return data in the buffer
26051 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
26052 unfortunately named, but we'll have to live with it.  When I talk about
26053 @dfn{resulting data}, I always refer to the data in that buffer.  When I
26054 talk about @dfn{return value}, I talk about the function value returned by
26055 the function call.  Functions that fail should return @code{nil} as the
26056 return value.
26057
26058 Some back ends could be said to be @dfn{server-forming} back ends, and
26059 some might be said not to be.  The latter are back ends that generally
26060 only operate on one group at a time, and have no concept of ``server''
26061 ---they have a group, and they deliver info on that group and nothing
26062 more.
26063
26064 Gnus identifies each message by way of group name and article number.  A
26065 few remarks about these article numbers might be useful.  First of all,
26066 the numbers are positive integers.  Secondly, it is normally not
26067 possible for later articles to `re-use' older article numbers without
26068 confusing Gnus.  That is, if a group has ever contained a message
26069 numbered 42, then no other message may get that number, or Gnus will get
26070 mightily confused.@footnote{See the function
26071 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
26072 Third, article numbers must be assigned in order of arrival in the
26073 group; this is not necessarily the same as the date of the message.
26074
26075 The previous paragraph already mentions all the `hard' restrictions that
26076 article numbers must fulfill.  But it seems that it might be useful to
26077 assign @emph{consecutive} article numbers, for Gnus gets quite confused
26078 if there are holes in the article numbering sequence.  However, due to
26079 the `no-reuse' restriction, holes cannot be avoided altogether.  It's
26080 also useful for the article numbers to start at 1 to avoid running out
26081 of numbers as long as possible.
26082
26083 Note that by convention, backends are named @code{nnsomething}, but
26084 Gnus also comes with some @code{nnnotbackends}, such as
26085 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
26086
26087 In the examples and definitions I will refer to the imaginary back end
26088 @code{nnchoke}.
26089
26090 @cindex @code{nnchoke}
26091
26092 @menu
26093 * Required Back End Functions::  Functions that must be implemented.
26094 * Optional Back End Functions::  Functions that need not be implemented.
26095 * Error Messaging::             How to get messages and report errors.
26096 * Writing New Back Ends::       Extending old back ends.
26097 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
26098 * Mail-like Back Ends::         Some tips on mail back ends.
26099 @end menu
26100
26101
26102 @node Required Back End Functions
26103 @subsubsection Required Back End Functions
26104
26105 @table @code
26106
26107 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
26108
26109 @var{articles} is either a range of article numbers or a list of
26110 @code{Message-ID}s.  Current back ends do not fully support either---only
26111 sequences (lists) of article numbers, and most back ends do not support
26112 retrieval of @code{Message-ID}s.  But they should try for both.
26113
26114 The result data should either be HEADs or @acronym{NOV} lines, and the result
26115 value should either be @code{headers} or @code{nov} to reflect this.
26116 This might later be expanded to @code{various}, which will be a mixture
26117 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
26118
26119 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
26120 headers'', in some meaning of the word.  This is generally done by
26121 fetching (at most) @var{fetch-old} extra headers less than the smallest
26122 article number in @code{articles}, and filling the gaps as well.  The
26123 presence of this parameter can be ignored if the back end finds it
26124 cumbersome to follow the request.  If this is non-@code{nil} and not a
26125 number, do maximum fetches.
26126
26127 Here's an example HEAD:
26128
26129 @example
26130 221 1056 Article retrieved.
26131 Path: ifi.uio.no!sturles
26132 From: sturles@@ifi.uio.no (Sturle Sunde)
26133 Newsgroups: ifi.discussion
26134 Subject: Re: Something very droll
26135 Date: 27 Oct 1994 14:02:57 +0100
26136 Organization: Dept. of Informatics, University of Oslo, Norway
26137 Lines: 26
26138 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
26139 References: <38jdmq$4qu@@visbur.ifi.uio.no>
26140 NNTP-Posting-Host: holmenkollen.ifi.uio.no
26141 .
26142 @end example
26143
26144 So a @code{headers} return value would imply that there's a number of
26145 these in the data buffer.
26146
26147 Here's a BNF definition of such a buffer:
26148
26149 @example
26150 headers        = *head
26151 head           = error / valid-head
26152 error-message  = [ "4" / "5" ] 2number " " <error message> eol
26153 valid-head     = valid-message *header "." eol
26154 valid-message  = "221 " <number> " Article retrieved." eol
26155 header         = <text> eol
26156 @end example
26157
26158 @cindex BNF
26159 (The version of BNF used here is the one used in RFC822.)
26160
26161 If the return value is @code{nov}, the data buffer should contain
26162 @dfn{network overview database} lines.  These are basically fields
26163 separated by tabs.
26164
26165 @example
26166 nov-buffer = *nov-line
26167 nov-line   = field 7*8[ <TAB> field ] eol
26168 field      = <text except TAB>
26169 @end example
26170
26171 For a closer look at what should be in those fields,
26172 @pxref{Headers}.
26173
26174
26175 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
26176
26177 @var{server} is here the virtual server name.  @var{definitions} is a
26178 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
26179
26180 If the server can't be opened, no error should be signaled.  The back end
26181 may then choose to refuse further attempts at connecting to this
26182 server.  In fact, it should do so.
26183
26184 If the server is opened already, this function should return a
26185 non-@code{nil} value.  There should be no data returned.
26186
26187
26188 @item (nnchoke-close-server &optional SERVER)
26189
26190 Close connection to @var{server} and free all resources connected
26191 to it.  Return @code{nil} if the server couldn't be closed for some
26192 reason.
26193
26194 There should be no data returned.
26195
26196
26197 @item (nnchoke-request-close)
26198
26199 Close connection to all servers and free all resources that the back end
26200 have reserved.  All buffers that have been created by that back end
26201 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
26202 function is generally only called when Gnus is shutting down.
26203
26204 There should be no data returned.
26205
26206
26207 @item (nnchoke-server-opened &optional SERVER)
26208
26209 If @var{server} is the current virtual server, and the connection to the
26210 physical server is alive, then this function should return a
26211 non-@code{nil} value.  This function should under no circumstances
26212 attempt to reconnect to a server we have lost connection to.
26213
26214 There should be no data returned.
26215
26216
26217 @item (nnchoke-status-message &optional SERVER)
26218
26219 This function should return the last error message from @var{server}.
26220
26221 There should be no data returned.
26222
26223
26224 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
26225
26226 The result data from this function should be the article specified by
26227 @var{article}.  This might either be a @code{Message-ID} or a number.
26228 It is optional whether to implement retrieval by @code{Message-ID}, but
26229 it would be nice if that were possible.
26230
26231 If @var{to-buffer} is non-@code{nil}, the result data should be returned
26232 in this buffer instead of the normal data buffer.  This is to make it
26233 possible to avoid copying large amounts of data from one buffer to
26234 another, while Gnus mainly requests articles to be inserted directly
26235 into its article buffer.
26236
26237 If it is at all possible, this function should return a cons cell where
26238 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
26239 the article number.  This will enable Gnus to find out what the real
26240 group and article numbers are when fetching articles by
26241 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
26242 on successful article retrieval.
26243
26244
26245 @item (nnchoke-request-group GROUP &optional SERVER FAST)
26246
26247 Get data on @var{group}.  This function also has the side effect of
26248 making @var{group} the current group.
26249
26250 If @var{fast}, don't bother to return useful data, just make @var{group}
26251 the current group.
26252
26253 Here's an example of some result data and a definition of the same:
26254
26255 @example
26256 211 56 1000 1059 ifi.discussion
26257 @end example
26258
26259 The first number is the status, which should be 211.  Next is the
26260 total number of articles in the group, the lowest article number, the
26261 highest article number, and finally the group name.  Note that the total
26262 number of articles may be less than one might think while just
26263 considering the highest and lowest article numbers, but some articles
26264 may have been canceled.  Gnus just discards the total-number, so
26265 whether one should take the bother to generate it properly (if that is a
26266 problem) is left as an exercise to the reader.  If the group contains no
26267 articles, the lowest article number should be reported as 1 and the
26268 highest as 0.
26269
26270 @example
26271 group-status = [ error / info ] eol
26272 error        = [ "4" / "5" ] 2<number> " " <Error message>
26273 info         = "211 " 3* [ <number> " " ] <string>
26274 @end example
26275
26276
26277 @item (nnchoke-close-group GROUP &optional SERVER)
26278
26279 Close @var{group} and free any resources connected to it.  This will be
26280 a no-op on most back ends.
26281
26282 There should be no data returned.
26283
26284
26285 @item (nnchoke-request-list &optional SERVER)
26286
26287 Return a list of all groups available on @var{server}.  And that means
26288 @emph{all}.
26289
26290 Here's an example from a server that only carries two groups:
26291
26292 @example
26293 ifi.test 0000002200 0000002000 y
26294 ifi.discussion 3324 3300 n
26295 @end example
26296
26297 On each line we have a group name, then the highest article number in
26298 that group, the lowest article number, and finally a flag.  If the group
26299 contains no articles, the lowest article number should be reported as 1
26300 and the highest as 0.
26301
26302 @example
26303 active-file = *active-line
26304 active-line = name " " <number> " " <number> " " flags eol
26305 name        = <string>
26306 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
26307 @end example
26308
26309 The flag says whether the group is read-only (@samp{n}), is moderated
26310 (@samp{m}), is dead (@samp{x}), is aliased to some other group
26311 (@samp{=other-group}) or none of the above (@samp{y}).
26312
26313
26314 @item (nnchoke-request-post &optional SERVER)
26315
26316 This function should post the current buffer.  It might return whether
26317 the posting was successful or not, but that's not required.  If, for
26318 instance, the posting is done asynchronously, it has generally not been
26319 completed by the time this function concludes.  In that case, this
26320 function should set up some kind of sentinel to beep the user loud and
26321 clear if the posting could not be completed.
26322
26323 There should be no result data from this function.
26324
26325 @end table
26326
26327
26328 @node Optional Back End Functions
26329 @subsubsection Optional Back End Functions
26330
26331 @table @code
26332
26333 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
26334
26335 @var{groups} is a list of groups, and this function should request data
26336 on all those groups.  How it does it is of no concern to Gnus, but it
26337 should attempt to do this in a speedy fashion.
26338
26339 The return value of this function can be either @code{active} or
26340 @code{group}, which says what the format of the result data is.  The
26341 former is in the same format as the data from
26342 @code{nnchoke-request-list}, while the latter is a buffer full of lines
26343 in the same format as @code{nnchoke-request-group} gives.
26344
26345 @example
26346 group-buffer = *active-line / *group-status
26347 @end example
26348
26349
26350 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
26351
26352 A Gnus group info (@pxref{Group Info}) is handed to the back end for
26353 alterations.  This comes in handy if the back end really carries all
26354 the information (as is the case with virtual and imap groups).  This
26355 function should destructively alter the info to suit its needs, and
26356 should return a non-@code{nil} value.
26357
26358 There should be no result data from this function.
26359
26360
26361 @item (nnchoke-request-type GROUP &optional ARTICLE)
26362
26363 When the user issues commands for ``sending news'' (@kbd{F} in the
26364 summary buffer, for instance), Gnus has to know whether the article the
26365 user is following up on is news or mail.  This function should return
26366 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
26367 is mail and @code{unknown} if the type can't be decided.  (The
26368 @var{article} parameter is necessary in @code{nnvirtual} groups which
26369 might very well combine mail groups and news groups.)  Both @var{group}
26370 and @var{article} may be @code{nil}.
26371
26372 There should be no result data from this function.
26373
26374
26375 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
26376
26377 Set/remove/add marks on articles.  Normally Gnus handles the article
26378 marks (such as read, ticked, expired etc) internally, and store them in
26379 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
26380 all information about the articles on the server, so Gnus need to
26381 propagate the mark information to the server.
26382
26383 @var{action} is a list of mark setting requests, having this format:
26384
26385 @example
26386 (RANGE ACTION MARK)
26387 @end example
26388
26389 @var{range} is a range of articles you wish to update marks on.
26390 @var{action} is @code{add} or @code{del}, used to add marks or remove
26391 marks (preserving all marks not mentioned).  @var{mark} is a list of
26392 marks; where each mark is a symbol.  Currently used marks are
26393 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
26394 @code{dormant}, @code{save}, @code{download}, @code{unsend},
26395 @code{forward} and @code{recent}, but your back end should, if
26396 possible, not limit itself to these.
26397
26398 Given contradictory actions, the last action in the list should be the
26399 effective one.  That is, if your action contains a request to add the
26400 @code{tick} mark on article 1 and, later in the list, a request to
26401 remove the mark on the same article, the mark should in fact be removed.
26402
26403 An example action list:
26404
26405 @example
26406 (((5 12 30) 'del '(tick))
26407  ((10 . 90) 'add '(read expire))
26408  ((92 94) 'del '(read)))
26409 @end example
26410
26411 The function should return a range of articles it wasn't able to set the
26412 mark on (currently not used for anything).
26413
26414 There should be no result data from this function.
26415
26416 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
26417
26418 If the user tries to set a mark that the back end doesn't like, this
26419 function may change the mark.  Gnus will use whatever this function
26420 returns as the mark for @var{article} instead of the original
26421 @var{mark}.  If the back end doesn't care, it must return the original
26422 @var{mark}, and not @code{nil} or any other type of garbage.
26423
26424 The only use for this I can see is what @code{nnvirtual} does with
26425 it---if a component group is auto-expirable, marking an article as read
26426 in the virtual group should result in the article being marked as
26427 expirable.
26428
26429 There should be no result data from this function.
26430
26431
26432 @item (nnchoke-request-scan &optional GROUP SERVER)
26433
26434 This function may be called at any time (by Gnus or anything else) to
26435 request that the back end check for incoming articles, in one way or
26436 another.  A mail back end will typically read the spool file or query
26437 the @acronym{POP} server when this function is invoked.  The
26438 @var{group} doesn't have to be heeded---if the back end decides that
26439 it is too much work just scanning for a single group, it may do a
26440 total scan of all groups.  It would be nice, however, to keep things
26441 local if that's practical.
26442
26443 There should be no result data from this function.
26444
26445
26446 @item (nnchoke-request-group-description GROUP &optional SERVER)
26447
26448 The result data from this function should be a description of
26449 @var{group}.
26450
26451 @example
26452 description-line = name <TAB> description eol
26453 name             = <string>
26454 description      = <text>
26455 @end example
26456
26457 @item (nnchoke-request-list-newsgroups &optional SERVER)
26458
26459 The result data from this function should be the description of all
26460 groups available on the server.
26461
26462 @example
26463 description-buffer = *description-line
26464 @end example
26465
26466
26467 @item (nnchoke-request-newgroups DATE &optional SERVER)
26468
26469 The result data from this function should be all groups that were
26470 created after @samp{date}, which is in normal human-readable date format
26471 (i.e., the date format used in mail and news headers, and returned by
26472 the function @code{message-make-date} by default).  The data should be
26473 in the active buffer format.
26474
26475 It is okay for this function to return `too many' groups; some back ends
26476 might find it cheaper to return the full list of groups, rather than
26477 just the new groups.  But don't do this for back ends with many groups.
26478 Normally, if the user creates the groups herself, there won't be too
26479 many groups, so @code{nnml} and the like are probably safe.  But for
26480 back ends like @code{nntp}, where the groups have been created by the
26481 server, it is quite likely that there can be many groups.
26482
26483
26484 @item (nnchoke-request-create-group GROUP &optional SERVER)
26485
26486 This function should create an empty group with name @var{group}.
26487
26488 There should be no return data.
26489
26490
26491 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
26492
26493 This function should run the expiry process on all articles in the
26494 @var{articles} range (which is currently a simple list of article
26495 numbers.)  It is left up to the back end to decide how old articles
26496 should be before they are removed by this function.  If @var{force} is
26497 non-@code{nil}, all @var{articles} should be deleted, no matter how new
26498 they are.
26499
26500 This function should return a list of articles that it did not/was not
26501 able to delete.
26502
26503 There should be no result data returned.
26504
26505
26506 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
26507
26508 This function should move @var{article} (which is a number) from
26509 @var{group} by calling @var{accept-form}.
26510
26511 This function should ready the article in question for moving by
26512 removing any header lines it has added to the article, and generally
26513 should ``tidy up'' the article.  Then it should @code{eval}
26514 @var{accept-form} in the buffer where the ``tidy'' article is.  This
26515 will do the actual copying.  If this @code{eval} returns a
26516 non-@code{nil} value, the article should be removed.
26517
26518 If @var{last} is @code{nil}, that means that there is a high likelihood
26519 that there will be more requests issued shortly, so that allows some
26520 optimizations.
26521
26522 The function should return a cons where the @code{car} is the group name and
26523 the @code{cdr} is the article number that the article was entered as.
26524
26525 There should be no data returned.
26526
26527
26528 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
26529
26530 This function takes the current buffer and inserts it into @var{group}.
26531 If @var{last} in @code{nil}, that means that there will be more calls to
26532 this function in short order.
26533
26534 The function should return a cons where the @code{car} is the group name and
26535 the @code{cdr} is the article number that the article was entered as.
26536
26537 The group should exist before the backend is asked to accept the
26538 article for that group.
26539
26540 There should be no data returned.
26541
26542
26543 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
26544
26545 This function should remove @var{article} (which is a number) from
26546 @var{group} and insert @var{buffer} there instead.
26547
26548 There should be no data returned.
26549
26550
26551 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
26552
26553 This function should delete @var{group}.  If @var{force}, it should
26554 really delete all the articles in the group, and then delete the group
26555 itself.  (If there is such a thing as ``the group itself''.)
26556
26557 There should be no data returned.
26558
26559
26560 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
26561
26562 This function should rename @var{group} into @var{new-name}.  All
26563 articles in @var{group} should move to @var{new-name}.
26564
26565 There should be no data returned.
26566
26567 @end table
26568
26569
26570 @node Error Messaging
26571 @subsubsection Error Messaging
26572
26573 @findex nnheader-report
26574 @findex nnheader-get-report
26575 The back ends should use the function @code{nnheader-report} to report
26576 error conditions---they should not raise errors when they aren't able to
26577 perform a request.  The first argument to this function is the back end
26578 symbol, and the rest are interpreted as arguments to @code{format} if
26579 there are multiple of them, or just a string if there is one of them.
26580 This function must always returns @code{nil}.
26581
26582 @lisp
26583 (nnheader-report 'nnchoke "You did something totally bogus")
26584
26585 (nnheader-report 'nnchoke "Could not request group %s" group)
26586 @end lisp
26587
26588 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
26589 @code{nil} back from a server, and this function returns the most
26590 recently reported message for the back end in question.  This function
26591 takes one argument---the server symbol.
26592
26593 Internally, these functions access @var{back-end}@code{-status-string},
26594 so the @code{nnchoke} back end will have its error message stored in
26595 @code{nnchoke-status-string}.
26596
26597
26598 @node Writing New Back Ends
26599 @subsubsection Writing New Back Ends
26600
26601 Many back ends are quite similar.  @code{nnml} is just like
26602 @code{nnspool}, but it allows you to edit the articles on the server.
26603 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
26604 and it doesn't maintain overview databases.  @code{nndir} is just like
26605 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
26606 editing articles.
26607
26608 It would make sense if it were possible to ``inherit'' functions from
26609 back ends when writing new back ends.  And, indeed, you can do that if you
26610 want to.  (You don't have to if you don't want to, of course.)
26611
26612 All the back ends declare their public variables and functions by using a
26613 package called @code{nnoo}.
26614
26615 To inherit functions from other back ends (and allow other back ends to
26616 inherit functions from the current back end), you should use the
26617 following macros:
26618
26619 @table @code
26620
26621 @item nnoo-declare
26622 This macro declares the first parameter to be a child of the subsequent
26623 parameters.  For instance:
26624
26625 @lisp
26626 (nnoo-declare nndir
26627   nnml nnmh)
26628 @end lisp
26629
26630 @code{nndir} has declared here that it intends to inherit functions from
26631 both @code{nnml} and @code{nnmh}.
26632
26633 @item defvoo
26634 This macro is equivalent to @code{defvar}, but registers the variable as
26635 a public server variable.  Most state-oriented variables should be
26636 declared with @code{defvoo} instead of @code{defvar}.
26637
26638 In addition to the normal @code{defvar} parameters, it takes a list of
26639 variables in the parent back ends to map the variable to when executing
26640 a function in those back ends.
26641
26642 @lisp
26643 (defvoo nndir-directory nil
26644   "Where nndir will look for groups."
26645   nnml-current-directory nnmh-current-directory)
26646 @end lisp
26647
26648 This means that @code{nnml-current-directory} will be set to
26649 @code{nndir-directory} when an @code{nnml} function is called on behalf
26650 of @code{nndir}.  (The same with @code{nnmh}.)
26651
26652 @item nnoo-define-basics
26653 This macro defines some common functions that almost all back ends should
26654 have.
26655
26656 @lisp
26657 (nnoo-define-basics nndir)
26658 @end lisp
26659
26660 @item deffoo
26661 This macro is just like @code{defun} and takes the same parameters.  In
26662 addition to doing the normal @code{defun} things, it registers the
26663 function as being public so that other back ends can inherit it.
26664
26665 @item nnoo-map-functions
26666 This macro allows mapping of functions from the current back end to
26667 functions from the parent back ends.
26668
26669 @lisp
26670 (nnoo-map-functions nndir
26671   (nnml-retrieve-headers 0 nndir-current-group 0 0)
26672   (nnmh-request-article 0 nndir-current-group 0 0))
26673 @end lisp
26674
26675 This means that when @code{nndir-retrieve-headers} is called, the first,
26676 third, and fourth parameters will be passed on to
26677 @code{nnml-retrieve-headers}, while the second parameter is set to the
26678 value of @code{nndir-current-group}.
26679
26680 @item nnoo-import
26681 This macro allows importing functions from back ends.  It should be the
26682 last thing in the source file, since it will only define functions that
26683 haven't already been defined.
26684
26685 @lisp
26686 (nnoo-import nndir
26687   (nnmh
26688    nnmh-request-list
26689    nnmh-request-newgroups)
26690   (nnml))
26691 @end lisp
26692
26693 This means that calls to @code{nndir-request-list} should just be passed
26694 on to @code{nnmh-request-list}, while all public functions from
26695 @code{nnml} that haven't been defined in @code{nndir} yet should be
26696 defined now.
26697
26698 @end table
26699
26700 Below is a slightly shortened version of the @code{nndir} back end.
26701
26702 @lisp
26703 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
26704 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
26705
26706 ;;; @r{Code:}
26707
26708 (require 'nnheader)
26709 (require 'nnmh)
26710 (require 'nnml)
26711 (require 'nnoo)
26712 (eval-when-compile (require 'cl))
26713
26714 (nnoo-declare nndir
26715   nnml nnmh)
26716
26717 (defvoo nndir-directory nil
26718   "Where nndir will look for groups."
26719   nnml-current-directory nnmh-current-directory)
26720
26721 (defvoo nndir-nov-is-evil nil
26722   "*Non-nil means that nndir will never retrieve NOV headers."
26723   nnml-nov-is-evil)
26724
26725 (defvoo nndir-current-group ""
26726   nil
26727   nnml-current-group nnmh-current-group)
26728 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
26729 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
26730
26731 (defvoo nndir-status-string "" nil nnmh-status-string)
26732 (defconst nndir-version "nndir 1.0")
26733
26734 ;;; @r{Interface functions.}
26735
26736 (nnoo-define-basics nndir)
26737
26738 (deffoo nndir-open-server (server &optional defs)
26739   (setq nndir-directory
26740         (or (cadr (assq 'nndir-directory defs))
26741             server))
26742   (unless (assq 'nndir-directory defs)
26743     (push `(nndir-directory ,server) defs))
26744   (push `(nndir-current-group
26745           ,(file-name-nondirectory
26746             (directory-file-name nndir-directory)))
26747         defs)
26748   (push `(nndir-top-directory
26749           ,(file-name-directory (directory-file-name nndir-directory)))
26750         defs)
26751   (nnoo-change-server 'nndir server defs))
26752
26753 (nnoo-map-functions nndir
26754   (nnml-retrieve-headers 0 nndir-current-group 0 0)
26755   (nnmh-request-article 0 nndir-current-group 0 0)
26756   (nnmh-request-group nndir-current-group 0 0)
26757   (nnmh-close-group nndir-current-group 0))
26758
26759 (nnoo-import nndir
26760   (nnmh
26761    nnmh-status-message
26762    nnmh-request-list
26763    nnmh-request-newgroups))
26764
26765 (provide 'nndir)
26766 @end lisp
26767
26768
26769 @node Hooking New Back Ends Into Gnus
26770 @subsubsection Hooking New Back Ends Into Gnus
26771
26772 @vindex gnus-valid-select-methods
26773 @findex gnus-declare-backend
26774 Having Gnus start using your new back end is rather easy---you just
26775 declare it with the @code{gnus-declare-backend} functions.  This will
26776 enter the back end into the @code{gnus-valid-select-methods} variable.
26777
26778 @code{gnus-declare-backend} takes two parameters---the back end name and
26779 an arbitrary number of @dfn{abilities}.
26780
26781 Here's an example:
26782
26783 @lisp
26784 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
26785 @end lisp
26786
26787 The above line would then go in the @file{nnchoke.el} file.
26788
26789 The abilities can be:
26790
26791 @table @code
26792 @item mail
26793 This is a mailish back end---followups should (probably) go via mail.
26794 @item post
26795 This is a newsish back end---followups should (probably) go via news.
26796 @item post-mail
26797 This back end supports both mail and news.
26798 @item none
26799 This is neither a post nor mail back end---it's something completely
26800 different.
26801 @item respool
26802 It supports respooling---or rather, it is able to modify its source
26803 articles and groups.
26804 @item address
26805 The name of the server should be in the virtual server name.  This is
26806 true for almost all back ends.
26807 @item prompt-address
26808 The user should be prompted for an address when doing commands like
26809 @kbd{B} in the group buffer.  This is true for back ends like
26810 @code{nntp}, but not @code{nnmbox}, for instance.
26811 @end table
26812
26813
26814 @node Mail-like Back Ends
26815 @subsubsection Mail-like Back Ends
26816
26817 One of the things that separate the mail back ends from the rest of the
26818 back ends is the heavy dependence by most of the mail back ends on
26819 common functions in @file{nnmail.el}.  For instance, here's the
26820 definition of @code{nnml-request-scan}:
26821
26822 @lisp
26823 (deffoo nnml-request-scan (&optional group server)
26824   (setq nnml-article-file-alist nil)
26825   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
26826 @end lisp
26827
26828 It simply calls @code{nnmail-get-new-mail} with a few parameters,
26829 and @code{nnmail} takes care of all the moving and splitting of the
26830 mail.
26831
26832 This function takes four parameters.
26833
26834 @table @var
26835 @item method
26836 This should be a symbol to designate which back end is responsible for
26837 the call.
26838
26839 @item exit-function
26840 This function should be called after the splitting has been performed.
26841
26842 @item temp-directory
26843 Where the temporary files should be stored.
26844
26845 @item group
26846 This optional argument should be a group name if the splitting is to be
26847 performed for one group only.
26848 @end table
26849
26850 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
26851 save each article.  @var{back-end}@code{-active-number} will be called to
26852 find the article number assigned to this article.
26853
26854 The function also uses the following variables:
26855 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
26856 this back end); and @var{back-end}@code{-group-alist} and
26857 @var{back-end}@code{-active-file} to generate the new active file.
26858 @var{back-end}@code{-group-alist} should be a group-active alist, like
26859 this:
26860
26861 @example
26862 (("a-group" (1 . 10))
26863  ("some-group" (34 . 39)))
26864 @end example
26865
26866
26867 @node Score File Syntax
26868 @subsection Score File Syntax
26869
26870 Score files are meant to be easily parseable, but yet extremely
26871 mallable.   It was decided that something that had the same read syntax
26872 as an Emacs Lisp list would fit that spec.
26873
26874 Here's a typical score file:
26875
26876 @lisp
26877 (("summary"
26878   ("win95" -10000 nil s)
26879   ("Gnus"))
26880  ("from"
26881   ("Lars" -1000))
26882  (mark -100))
26883 @end lisp
26884
26885 BNF definition of a score file:
26886
26887 @example
26888 score-file      = "" / "(" *element ")"
26889 element         = rule / atom
26890 rule            = string-rule / number-rule / date-rule
26891 string-rule     = "(" quote string-header quote space *string-match ")"
26892 number-rule     = "(" quote number-header quote space *number-match ")"
26893 date-rule       = "(" quote date-header quote space *date-match ")"
26894 quote           = <ascii 34>
26895 string-header   = "subject" / "from" / "references" / "message-id" /
26896                   "xref" / "body" / "head" / "all" / "followup"
26897 number-header   = "lines" / "chars"
26898 date-header     = "date"
26899 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
26900                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
26901 score           = "nil" / <integer>
26902 date            = "nil" / <natural number>
26903 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
26904                   "r" / "regex" / "R" / "Regex" /
26905                   "e" / "exact" / "E" / "Exact" /
26906                   "f" / "fuzzy" / "F" / "Fuzzy"
26907 number-match    = "(" <integer> [ "" / [ space score [ "" /
26908                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
26909 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
26910 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
26911                   space date [ "" / [ space date-match-t ] ] ] ] ")"
26912 date-match-t    = "nil" / "at" / "before" / "after"
26913 atom            = "(" [ required-atom / optional-atom ] ")"
26914 required-atom   = mark / expunge / mark-and-expunge / files /
26915                   exclude-files / read-only / touched
26916 optional-atom   = adapt / local / eval
26917 mark            = "mark" space nil-or-number
26918 nil-or-number   = "nil" / <integer>
26919 expunge         = "expunge" space nil-or-number
26920 mark-and-expunge = "mark-and-expunge" space nil-or-number
26921 files           = "files" *[ space <string> ]
26922 exclude-files   = "exclude-files" *[ space <string> ]
26923 read-only       = "read-only" [ space "nil" / space "t" ]
26924 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
26925 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
26926 local           = "local" *[ space "(" <string> space <form> ")" ]
26927 eval            = "eval" space <form>
26928 space           = *[ " " / <TAB> / <NEWLINE> ]
26929 @end example
26930
26931 Any unrecognized elements in a score file should be ignored, but not
26932 discarded.
26933
26934 As you can see, white space is needed, but the type and amount of white
26935 space is irrelevant.  This means that formatting of the score file is
26936 left up to the programmer---if it's simpler to just spew it all out on
26937 one looong line, then that's ok.
26938
26939 The meaning of the various atoms are explained elsewhere in this
26940 manual (@pxref{Score File Format}).
26941
26942
26943 @node Headers
26944 @subsection Headers
26945
26946 Internally Gnus uses a format for storing article headers that
26947 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
26948 almost suspect that the author looked at the @acronym{NOV} specification and
26949 just shamelessly @emph{stole} the entire thing, and one would be right.
26950
26951 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
26952 RFC 1036 to talk about lines in the head of an article (e.g.,
26953 @code{From}).  It is used by many people as a synonym for
26954 ``head''---``the header and the body''.  (That should be avoided, in my
26955 opinion.)  And Gnus uses a format internally that it calls ``header'',
26956 which is what I'm talking about here.  This is a 9-element vector,
26957 basically, with each header (ouch) having one slot.
26958
26959 These slots are, in order: @code{number}, @code{subject}, @code{from},
26960 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
26961 @code{xref}, and @code{extra}.  There are macros for accessing and
26962 setting these slots---they all have predictable names beginning with
26963 @code{mail-header-} and @code{mail-header-set-}, respectively.
26964
26965 All these slots contain strings, except the @code{extra} slot, which
26966 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
26967
26968
26969 @node Ranges
26970 @subsection Ranges
26971
26972 @sc{gnus} introduced a concept that I found so useful that I've started
26973 using it a lot and have elaborated on it greatly.
26974
26975 The question is simple: If you have a large amount of objects that are
26976 identified by numbers (say, articles, to take a @emph{wild} example)
26977 that you want to qualify as being ``included'', a normal sequence isn't
26978 very useful.  (A 200,000 length sequence is a bit long-winded.)
26979
26980 The solution is as simple as the question: You just collapse the
26981 sequence.
26982
26983 @example
26984 (1 2 3 4 5 6 10 11 12)
26985 @end example
26986
26987 is transformed into
26988
26989 @example
26990 ((1 . 6) (10 . 12))
26991 @end example
26992
26993 To avoid having those nasty @samp{(13 . 13)} elements to denote a
26994 lonesome object, a @samp{13} is a valid element:
26995
26996 @example
26997 ((1 . 6) 7 (10 . 12))
26998 @end example
26999
27000 This means that comparing two ranges to find out whether they are equal
27001 is slightly tricky:
27002
27003 @example
27004 ((1 . 5) 7 8 (10 . 12))
27005 @end example
27006
27007 and
27008
27009 @example
27010 ((1 . 5) (7 . 8) (10 . 12))
27011 @end example
27012
27013 are equal.  In fact, any non-descending list is a range:
27014
27015 @example
27016 (1 2 3 4 5)
27017 @end example
27018
27019 is a perfectly valid range, although a pretty long-winded one.  This is
27020 also valid:
27021
27022 @example
27023 (1 . 5)
27024 @end example
27025
27026 and is equal to the previous range.
27027
27028 Here's a BNF definition of ranges.  Of course, one must remember the
27029 semantic requirement that the numbers are non-descending.  (Any number
27030 of repetition of the same number is allowed, but apt to disappear in
27031 range handling.)
27032
27033 @example
27034 range           = simple-range / normal-range
27035 simple-range    = "(" number " . " number ")"
27036 normal-range    = "(" start-contents ")"
27037 contents        = "" / simple-range *[ " " contents ] /
27038                   number *[ " " contents ]
27039 @end example
27040
27041 Gnus currently uses ranges to keep track of read articles and article
27042 marks.  I plan on implementing a number of range operators in C if The
27043 Powers That Be are willing to let me.  (I haven't asked yet, because I
27044 need to do some more thinking on what operators I need to make life
27045 totally range-based without ever having to convert back to normal
27046 sequences.)
27047
27048
27049 @node Group Info
27050 @subsection Group Info
27051
27052 Gnus stores all permanent info on groups in a @dfn{group info} list.
27053 This list is from three to six elements (or more) long and exhaustively
27054 describes the group.
27055
27056 Here are two example group infos; one is a very simple group while the
27057 second is a more complex one:
27058
27059 @example
27060 ("no.group" 5 ((1 . 54324)))
27061
27062 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
27063                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
27064                 (nnml "")
27065                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
27066 @end example
27067
27068 The first element is the @dfn{group name}---as Gnus knows the group,
27069 anyway.  The second element is the @dfn{subscription level}, which
27070 normally is a small integer.  (It can also be the @dfn{rank}, which is a
27071 cons cell where the @code{car} is the level and the @code{cdr} is the
27072 score.)  The third element is a list of ranges of read articles.  The
27073 fourth element is a list of lists of article marks of various kinds.
27074 The fifth element is the select method (or virtual server, if you like).
27075 The sixth element is a list of @dfn{group parameters}, which is what
27076 this section is about.
27077
27078 Any of the last three elements may be missing if they are not required.
27079 In fact, the vast majority of groups will normally only have the first
27080 three elements, which saves quite a lot of cons cells.
27081
27082 Here's a BNF definition of the group info format:
27083
27084 @example
27085 info          = "(" group space ralevel space read
27086                 [ "" / [ space marks-list [ "" / [ space method [ "" /
27087                 space parameters ] ] ] ] ] ")"
27088 group         = quote <string> quote
27089 ralevel       = rank / level
27090 level         = <integer in the range of 1 to inf>
27091 rank          = "(" level "." score ")"
27092 score         = <integer in the range of 1 to inf>
27093 read          = range
27094 marks-lists   = nil / "(" *marks ")"
27095 marks         = "(" <string> range ")"
27096 method        = "(" <string> *elisp-forms ")"
27097 parameters    = "(" *elisp-forms ")"
27098 @end example
27099
27100 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
27101 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
27102 in pseudo-BNF.
27103
27104 If you have a Gnus info and want to access the elements, Gnus offers a
27105 series of macros for getting/setting these elements.
27106
27107 @table @code
27108 @item gnus-info-group
27109 @itemx gnus-info-set-group
27110 @findex gnus-info-group
27111 @findex gnus-info-set-group
27112 Get/set the group name.
27113
27114 @item gnus-info-rank
27115 @itemx gnus-info-set-rank
27116 @findex gnus-info-rank
27117 @findex gnus-info-set-rank
27118 Get/set the group rank (@pxref{Group Score}).
27119
27120 @item gnus-info-level
27121 @itemx gnus-info-set-level
27122 @findex gnus-info-level
27123 @findex gnus-info-set-level
27124 Get/set the group level.
27125
27126 @item gnus-info-score
27127 @itemx gnus-info-set-score
27128 @findex gnus-info-score
27129 @findex gnus-info-set-score
27130 Get/set the group score (@pxref{Group Score}).
27131
27132 @item gnus-info-read
27133 @itemx gnus-info-set-read
27134 @findex gnus-info-read
27135 @findex gnus-info-set-read
27136 Get/set the ranges of read articles.
27137
27138 @item gnus-info-marks
27139 @itemx gnus-info-set-marks
27140 @findex gnus-info-marks
27141 @findex gnus-info-set-marks
27142 Get/set the lists of ranges of marked articles.
27143
27144 @item gnus-info-method
27145 @itemx gnus-info-set-method
27146 @findex gnus-info-method
27147 @findex gnus-info-set-method
27148 Get/set the group select method.
27149
27150 @item gnus-info-params
27151 @itemx gnus-info-set-params
27152 @findex gnus-info-params
27153 @findex gnus-info-set-params
27154 Get/set the group parameters.
27155 @end table
27156
27157 All the getter functions take one parameter---the info list.  The setter
27158 functions take two parameters---the info list and the new value.
27159
27160 The last three elements in the group info aren't mandatory, so it may be
27161 necessary to extend the group info before setting the element.  If this
27162 is necessary, you can just pass on a non-@code{nil} third parameter to
27163 the three final setter functions to have this happen automatically.
27164
27165
27166 @node Extended Interactive
27167 @subsection Extended Interactive
27168 @cindex interactive
27169 @findex gnus-interactive
27170
27171 Gnus extends the standard Emacs @code{interactive} specification
27172 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
27173 Prefixes}).  Here's an example of how this is used:
27174
27175 @lisp
27176 (defun gnus-summary-increase-score (&optional score symp)
27177   (interactive (gnus-interactive "P\ny"))
27178   ...
27179   )
27180 @end lisp
27181
27182 The best thing to do would have been to implement
27183 @code{gnus-interactive} as a macro which would have returned an
27184 @code{interactive} form, but this isn't possible since Emacs checks
27185 whether a function is interactive or not by simply doing an @code{assq}
27186 on the lambda form.  So, instead we have @code{gnus-interactive}
27187 function that takes a string and returns values that are usable to
27188 @code{interactive}.
27189
27190 This function accepts (almost) all normal @code{interactive} specs, but
27191 adds a few more.
27192
27193 @table @samp
27194 @item y
27195 @vindex gnus-current-prefix-symbol
27196 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
27197 variable.
27198
27199 @item Y
27200 @vindex gnus-current-prefix-symbols
27201 A list of the current symbolic prefixes---the
27202 @code{gnus-current-prefix-symbol} variable.
27203
27204 @item A
27205 The current article number---the @code{gnus-summary-article-number}
27206 function.
27207
27208 @item H
27209 The current article header---the @code{gnus-summary-article-header}
27210 function.
27211
27212 @item g
27213 The current group name---the @code{gnus-group-group-name}
27214 function.
27215
27216 @end table
27217
27218
27219 @node Emacs/XEmacs Code
27220 @subsection Emacs/XEmacs Code
27221 @cindex XEmacs
27222 @cindex Emacsen
27223
27224 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
27225 platforms must be the primary one.  I chose Emacs.  Not because I don't
27226 like XEmacs or Mule, but because it comes first alphabetically.
27227
27228 This means that Gnus will byte-compile under Emacs with nary a warning,
27229 while XEmacs will pump out gigabytes of warnings while byte-compiling.
27230 As I use byte-compilation warnings to help me root out trivial errors in
27231 Gnus, that's very useful.
27232
27233 I've also consistently used Emacs function interfaces, but have used
27234 Gnusey aliases for the functions.  To take an example:  Emacs defines a
27235 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
27236 function.  I then define a function called @code{gnus-run-at-time} that
27237 takes the same parameters as the Emacs @code{run-at-time}.  When running
27238 Gnus under Emacs, the former function is just an alias for the latter.
27239 However, when running under XEmacs, the former is an alias for the
27240 following function:
27241
27242 @lisp
27243 (defun gnus-xmas-run-at-time (time repeat function &rest args)
27244   (start-itimer
27245    "gnus-run-at-time"
27246    `(lambda ()
27247       (,function ,@@args))
27248    time repeat))
27249 @end lisp
27250
27251 This sort of thing has been done for bunches of functions.  Gnus does
27252 not redefine any native Emacs functions while running under XEmacs---it
27253 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
27254 all over.
27255
27256 In the cases where the XEmacs function interface was obviously cleaner,
27257 I used it instead.  For example @code{gnus-region-active-p} is an alias
27258 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
27259
27260 Of course, I could have chosen XEmacs as my native platform and done
27261 mapping functions the other way around.  But I didn't.  The performance
27262 hit these indirections impose on Gnus under XEmacs should be slight.
27263
27264
27265 @node Various File Formats
27266 @subsection Various File Formats
27267
27268 @menu
27269 * Active File Format::          Information on articles and groups available.
27270 * Newsgroups File Format::      Group descriptions.
27271 @end menu
27272
27273
27274 @node Active File Format
27275 @subsubsection Active File Format
27276
27277 The active file lists all groups available on the server in
27278 question.  It also lists the highest and lowest current article numbers
27279 in each group.
27280
27281 Here's an excerpt from a typical active file:
27282
27283 @example
27284 soc.motss 296030 293865 y
27285 alt.binaries.pictures.fractals 3922 3913 n
27286 comp.sources.unix 1605 1593 m
27287 comp.binaries.ibm.pc 5097 5089 y
27288 no.general 1000 900 y
27289 @end example
27290
27291 Here's a pseudo-BNF definition of this file:
27292
27293 @example
27294 active      = *group-line
27295 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
27296 group       = <non-white-space string>
27297 spc         = " "
27298 high-number = <non-negative integer>
27299 low-number  = <positive integer>
27300 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
27301 @end example
27302
27303 For a full description of this file, see the manual pages for
27304 @samp{innd}, in particular @samp{active(5)}.
27305
27306
27307 @node Newsgroups File Format
27308 @subsubsection Newsgroups File Format
27309
27310 The newsgroups file lists groups along with their descriptions.  Not all
27311 groups on the server have to be listed,  and not all groups in the file
27312 have to exist on the server.  The file is meant purely as information to
27313 the user.
27314
27315 The format is quite simple; a group name, a tab, and the description.
27316 Here's the definition:
27317
27318 @example
27319 newsgroups    = *line
27320 line          = group tab description <NEWLINE>
27321 group         = <non-white-space string>
27322 tab           = <TAB>
27323 description   = <string>
27324 @end example
27325
27326
27327 @page
27328 @node Emacs for Heathens
27329 @section Emacs for Heathens
27330
27331 Believe it or not, but some people who use Gnus haven't really used
27332 Emacs much before they embarked on their journey on the Gnus Love Boat.
27333 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
27334 region'', and ``set @code{gnus-flargblossen} to an alist where the key
27335 is a regexp that is used for matching on the group name'' are magical
27336 phrases with little or no meaning, then this appendix is for you.  If
27337 you are already familiar with Emacs, just ignore this and go fondle your
27338 cat instead.
27339
27340 @menu
27341 * Keystrokes::                  Entering text and executing commands.
27342 * Emacs Lisp::                  The built-in Emacs programming language.
27343 @end menu
27344
27345
27346 @node Keystrokes
27347 @subsection Keystrokes
27348
27349 @itemize @bullet
27350 @item
27351 Q: What is an experienced Emacs user?
27352
27353 @item
27354 A: A person who wishes that the terminal had pedals.
27355 @end itemize
27356
27357 Yes, when you use Emacs, you are apt to use the control key, the shift
27358 key and the meta key a lot.  This is very annoying to some people
27359 (notably @code{vi}le users), and the rest of us just love the hell out
27360 of it.  Just give up and submit.  Emacs really does stand for
27361 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
27362 may have heard from other disreputable sources (like the Emacs author).
27363
27364 The shift keys are normally located near your pinky fingers, and are
27365 normally used to get capital letters and stuff.  You probably use it all
27366 the time.  The control key is normally marked ``CTRL'' or something like
27367 that.  The meta key is, funnily enough, never marked as such on any
27368 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
27369 which is the meta key on this keyboard.  It's usually located somewhere
27370 to the left hand side of the keyboard, usually on the bottom row.
27371
27372 Now, us Emacs people don't say ``press the meta-control-m key'',
27373 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
27374 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
27375 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
27376 down the control key, and hold it down while you press @kbd{k}''.
27377 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
27378 the control key and then press @kbd{k}''.  Simple, ay?
27379
27380 This is somewhat complicated by the fact that not all keyboards have a
27381 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
27382 means ``press escape, release escape, press @kbd{k}''.  That's much more
27383 work than if you have a meta key, so if that's the case, I respectfully
27384 suggest you get a real keyboard with a meta key.  You can't live without
27385 it.
27386
27387
27388
27389 @node Emacs Lisp
27390 @subsection Emacs Lisp
27391
27392 Emacs is the King of Editors because it's really a Lisp interpreter.
27393 Each and every key you tap runs some Emacs Lisp code snippet, and since
27394 Emacs Lisp is an interpreted language, that means that you can configure
27395 any key to run any arbitrary code.  You just, like, do it.
27396
27397 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
27398 functions.  (These are byte-compiled for speed, but it's still
27399 interpreted.)  If you decide that you don't like the way Gnus does
27400 certain things, it's trivial to have it do something a different way.
27401 (Well, at least if you know how to write Lisp code.)  However, that's
27402 beyond the scope of this manual, so we are simply going to talk about
27403 some common constructs that you normally use in your @file{.emacs} file
27404 to customize Gnus.
27405
27406 If you want to set the variable @code{gnus-florgbnize} to four (4), you
27407 write the following:
27408
27409 @lisp
27410 (setq gnus-florgbnize 4)
27411 @end lisp
27412
27413 This function (really ``special form'') @code{setq} is the one that can
27414 set a variable to some value.  This is really all you need to know.  Now
27415 you can go and fill your @file{.emacs} file with lots of these to change
27416 how Gnus works.
27417
27418 If you have put that thing in your @file{.emacs} file, it will be read
27419 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
27420 start Emacs.  If you want to change the variable right away, simply say
27421 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
27422 previous ``form'', which is a simple @code{setq} statement here.
27423
27424 Go ahead---just try it, if you're located at your Emacs.  After you
27425 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
27426 is the return value of the form you @code{eval}ed.
27427
27428 Some pitfalls:
27429
27430 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
27431 that means:
27432
27433 @lisp
27434 (setq gnus-read-active-file 'some)
27435 @end lisp
27436
27437 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
27438 @samp{nntp.ifi.uio.no}'', that means:
27439
27440 @lisp
27441 (setq gnus-nntp-server "nntp.ifi.uio.no")
27442 @end lisp
27443
27444 So be careful not to mix up strings (the latter) with symbols (the
27445 former).  The manual is unambiguous, but it can be confusing.
27446
27447 @page
27448 @include gnus-faq.texi
27449
27450 @node Index
27451 @chapter Index
27452 @printindex cp
27453
27454 @node Key Index
27455 @chapter Key Index
27456 @printindex ky
27457
27458 @summarycontents
27459 @contents
27460 @bye
27461
27462 @iftex
27463 @iflatex
27464 \end{document}
27465 @end iflatex
27466 @end iftex
27467
27468 @c Local Variables:
27469 @c mode: texinfo
27470 @c coding: iso-8859-1
27471 @c End: