(The problem of spam): Fix, reported by Cheng Gao
[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.6}
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{\gnusasis}[1]{\gnustt{#1}}
57 \newcommand{\gnusurl}[1]{\gnustt{#1}}
58 \newcommand{\gnuscommand}[1]{\gnustt{#1}}
59 \newcommand{\gnusenv}[1]{\gnustt{#1}}
60 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
61 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
62 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
63 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
64 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
65 \newcommand{\gnusdfn}[1]{\textit{#1}}
66 \newcommand{\gnusi}[1]{\textit{#1}}
67 \newcommand{\gnusr}[1]{\textrm{#1}}
68 \newcommand{\gnusstrong}[1]{\textbf{#1}}
69 \newcommand{\gnusemph}[1]{\textit{#1}}
70 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
71 \newcommand{\gnussc}[1]{\textsc{#1}}
72 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
73 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
74 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
75 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
76 \newcommand{\gnusacronym}[1]{\textsc{#1}}
77 \newcommand{\gnusemail}[1]{\textit{#1}}
78
79 \newcommand{\gnusbullet}{{${\bullet}$}}
80 \newcommand{\gnusdollar}{\$}
81 \newcommand{\gnusampersand}{\&}
82 \newcommand{\gnuspercent}{\%}
83 \newcommand{\gnushash}{\#}
84 \newcommand{\gnushat}{\symbol{"5E}}
85 \newcommand{\gnusunderline}{\symbol{"5F}}
86 \newcommand{\gnusnot}{$\neg$}
87 \newcommand{\gnustilde}{\symbol{"7E}}
88 \newcommand{\gnusless}{{$<$}}
89 \newcommand{\gnusgreater}{{$>$}}
90 \newcommand{\gnusbraceleft}{{$>$}}
91 \newcommand{\gnusbraceright}{{$>$}}
92
93 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
94 \newcommand{\gnusinteresting}{
95 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
96 }
97
98 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
99
100 \newcommand{\gnuspagechapter}[1]{
101 {\mbox{}}
102 }
103
104 \newdimen{\gnusdimen}
105 \gnusdimen 0pt
106
107 \newcommand{\gnuschapter}[2]{
108 \gnuscleardoublepage
109 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
110 \chapter{#2}
111 \renewcommand{\gnussectionname}{}
112 \renewcommand{\gnuschaptername}{#2}
113 \thispagestyle{empty}
114 \hspace*{-2cm}
115 \begin{picture}(500,500)(0,0)
116 \put(480,350){\makebox(0,0)[tr]{#1}}
117 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
118 \end{picture}
119 \clearpage
120 }
121
122 \newcommand{\gnusfigure}[3]{
123 \begin{figure}
124 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
125 #3
126 \end{picture}
127 \caption{#1}
128 \end{figure}
129 }
130
131 \newcommand{\gnusicon}[1]{
132 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
133 }
134
135 \newcommand{\gnuspicon}[1]{
136 \margindex{\epsfig{figure=#1,width=2cm}}
137 }
138
139 \newcommand{\gnusxface}[2]{
140 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
141 }
142
143 \newcommand{\gnussmiley}[2]{
144 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
145 }
146
147 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
148
149 \newcommand{\gnussection}[1]{
150 \renewcommand{\gnussectionname}{#1}
151 \section{#1}
152 }
153
154 \newenvironment{codelist}%
155 {\begin{list}{}{
156 }
157 }{\end{list}}
158
159 \newenvironment{asislist}%
160 {\begin{list}{}{
161 }
162 }{\end{list}}
163
164 \newenvironment{kbdlist}%
165 {\begin{list}{}{
166 \labelwidth=0cm
167 }
168 }{\end{list}}
169
170 \newenvironment{dfnlist}%
171 {\begin{list}{}{
172 }
173 }{\end{list}}
174
175 \newenvironment{stronglist}%
176 {\begin{list}{}{
177 }
178 }{\end{list}}
179
180 \newenvironment{samplist}%
181 {\begin{list}{}{
182 }
183 }{\end{list}}
184
185 \newenvironment{varlist}%
186 {\begin{list}{}{
187 }
188 }{\end{list}}
189
190 \newenvironment{emphlist}%
191 {\begin{list}{}{
192 }
193 }{\end{list}}
194
195 \newlength\gnusheadtextwidth
196 \setlength{\gnusheadtextwidth}{\headtextwidth}
197 \addtolength{\gnusheadtextwidth}{1cm}
198
199 \newpagestyle{gnuspreamble}%
200 {
201 {
202 \ifodd\count0
203 {
204 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
205 }
206 \else
207 {
208 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
209 }
210 }
211 \fi
212 }
213 }
214 {
215 \ifodd\count0
216 \mbox{} \hfill
217 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
218 \else
219 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
220 \hfill \mbox{}
221 \fi
222 }
223
224 \newpagestyle{gnusindex}%
225 {
226 {
227 \ifodd\count0
228 {
229 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
230 }
231 \else
232 {
233 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
234 }
235 \fi
236 }
237 }
238 {
239 \ifodd\count0
240 \mbox{} \hfill
241 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
242 \else
243 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
244 \hfill \mbox{}
245 \fi
246 }
247
248 \newpagestyle{gnus}%
249 {
250 {
251 \ifodd\count0
252 {
253 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
254 }
255 \else
256 {
257 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
258 }
259 \fi
260 }
261 }
262 {
263 \ifodd\count0
264 \mbox{} \hfill
265 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
266 \else
267 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
268 \hfill \mbox{}
269 \fi
270 }
271
272 \pagenumbering{roman}
273 \pagestyle{gnuspreamble}
274
275 @end iflatex
276 @end iftex
277
278 @iftex
279 @iflatex
280 \begin{titlepage}
281 {
282
283 %\addtolength{\oddsidemargin}{-5cm}
284 %\addtolength{\evensidemargin}{-5cm}
285 \parindent=0cm
286 \addtolength{\textheight}{2cm}
287
288 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
289 \rule{15cm}{1mm}\\
290 \vfill
291 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
292 \vfill
293 \rule{15cm}{1mm}\\
294 \gnusauthor{by Lars Magne Ingebrigtsen}
295 \newpage
296 }
297
298 \mbox{}
299 \vfill
300
301 \thispagestyle{empty}
302
303 Copyright \copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
304 2002, 2003, 2004
305 Free Software Foundation, Inc.
306
307
308 Permission is granted to copy, distribute and/or modify this document
309 under the terms of the GNU Free Documentation License, Version 1.1 or
310 any later version published by the Free Software Foundation; with no
311 Invariant Sections, with the Front-Cover texts being ``A GNU
312 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
313 license is included in the section entitled ``GNU Free Documentation
314 License'' in the Emacs manual.
315
316 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
317 this GNU Manual, like GNU software.  Copies published by the Free
318 Software Foundation raise funds for GNU development.''
319
320 This document is part of a collection distributed under the GNU Free
321 Documentation License.  If you want to distribute this document
322 separately from the collection, you can do so by adding a copy of the
323 license to the document, as described in section 6 of the license.
324 \newpage
325 \end{titlepage}
326 @end iflatex
327 @end iftex
328
329 @ifnottex
330
331 This file documents Gnus, the GNU Emacs newsreader.
332
333 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
334         Free Software Foundation, Inc.
335
336 Permission is granted to copy, distribute and/or modify this document
337 under the terms of the GNU Free Documentation License, Version 1.1 or
338 any later version published by the Free Software Foundation; with the
339 Invariant Sections being none, with the Front-Cover texts being ``A GNU
340 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
341 license is included in the section entitled ``GNU Free Documentation
342 License'' in the Emacs manual.
343
344 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
345 this GNU Manual, like GNU software.  Copies published by the Free
346 Software Foundation raise funds for GNU development.''
347
348 This document is part of a collection distributed under the GNU Free
349 Documentation License.  If you want to distribute this document
350 separately from the collection, you can do so by adding a copy of the
351 license to the document, as described in section 6 of the license.
352 @end ifnottex
353
354 @tex
355
356 @titlepage
357 @title Gnus Manual
358
359 @author by Lars Magne Ingebrigtsen
360 @page
361
362 @vskip 0pt plus 1filll
363 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
364 2002, 2003, 2004
365         Free Software Foundation, Inc.
366
367 Permission is granted to copy, distribute and/or modify this document
368 under the terms of the GNU Free Documentation License, Version 1.1 or
369 any later version published by the Free Software Foundation; with no
370 Invariant Sections, with the Front-Cover texts being ``A GNU
371 Manual'', and with the Back-Cover Texts as in (a) below.  A copy of the
372 license is included in the section entitled ``GNU Free Documentation
373 License'' in the Emacs manual.
374
375 (a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
376 this GNU Manual, like GNU software.  Copies published by the Free
377 Software Foundation raise funds for GNU development.''
378
379 This document is part of a collection distributed under the GNU Free
380 Documentation License.  If you want to distribute this document
381 separately from the collection, you can do so by adding a copy of the
382 license to the document, as described in section 6 of the license.
383
384 @end titlepage
385 @page
386
387 @end tex
388
389
390 @node Top
391 @top The Gnus Newsreader
392
393 @ifinfo
394
395 You can read news (and mail) from within Emacs by using Gnus.  The news
396 can be gotten by any nefarious means you can think of---@acronym{NNTP}, local
397 spool or your mbox file.  All at the same time, if you want to push your
398 luck.
399
400 This manual corresponds to Gnus v5.10.6.
401
402 @end ifinfo
403
404 @iftex
405
406 @iflatex
407 \tableofcontents
408 \gnuscleardoublepage
409 @end iflatex
410
411 Gnus is the advanced, self-documenting, customizable, extensible
412 unreal-time newsreader for GNU Emacs.
413
414 Oops.  That sounds oddly familiar, so let's start over again to avoid
415 being accused of plagiarism:
416
417 Gnus is a message-reading laboratory.  It will let you look at just
418 about anything as if it were a newsgroup.  You can read mail with it,
419 you can browse directories with it, you can @code{ftp} with it---you
420 can even read news with it!
421
422 Gnus tries to empower people who read news the same way Emacs empowers
423 people who edit text.  Gnus sets no limits to what the user should be
424 allowed to do.  Users are encouraged to extend Gnus to make it behave
425 like they want it to behave.  A program should not control people;
426 people should be empowered to do what they want by using (or abusing)
427 the program.
428
429 @end iftex
430
431 @menu
432 * Starting Up::                 Finding news can be a pain.
433 * Group Buffer::                Selecting, subscribing and killing groups.
434 * Summary Buffer::              Reading, saving and posting articles.
435 * Article Buffer::              Displaying and handling articles.
436 * Composing Messages::          Information on sending mail and news.
437 * Select Methods::              Gnus reads all messages from various select methods.
438 * Scoring::                     Assigning values to articles.
439 * Various::                     General purpose settings.
440 * The End::                     Farewell and goodbye.
441 * Appendices::                  Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
442 * Index::                       Variable, function and concept index.
443 * Key Index::                   Key Index.
444
445 Other related manuals
446
447 * Message:(message).            Composing messages.
448 * Emacs-MIME:(emacs-mime).      Composing messages; @acronym{MIME}-specific parts.
449 * Sieve:(sieve).                Managing Sieve scripts in Emacs.
450 * PGG:(pgg).                    @acronym{PGP/MIME} with Gnus.
451 * SASL:(sasl).                  @acronym{SASL} authentication in Emacs.
452
453 @detailmenu
454  --- The Detailed Node Listing ---
455
456 Starting Gnus
457
458 * Finding the News::            Choosing a method for getting news.
459 * The First Time::              What does Gnus do the first time you start it?
460 * The Server is Down::          How can I read my mail then?
461 * Slave Gnusae::                You can have more than one Gnus active at a time.
462 * Fetching a Group::            Starting Gnus just to read a group.
463 * New Groups::                  What is Gnus supposed to do with new groups?
464 * Changing Servers::            You may want to move from one server to another.
465 * Startup Files::               Those pesky startup files---@file{.newsrc}.
466 * Auto Save::                   Recovering from a crash.
467 * The Active File::             Reading the active file over a slow line Takes Time.
468 * Startup Variables::           Other variables you might change.
469
470 New Groups
471
472 * Checking New Groups::         Determining what groups are new.
473 * Subscription Methods::        What Gnus should do with new groups.
474 * Filtering New Groups::        Making Gnus ignore certain new groups.
475
476 Group Buffer
477
478 * Group Buffer Format::         Information listed and how you can change it.
479 * Group Maneuvering::           Commands for moving in the group buffer.
480 * Selecting a Group::           Actually reading news.
481 * Subscription Commands::       Unsubscribing, killing, subscribing.
482 * Group Data::                  Changing the info for a group.
483 * Group Levels::                Levels? What are those, then?
484 * Group Score::                 A mechanism for finding out what groups you like.
485 * Marking Groups::              You can mark groups for later processing.
486 * Foreign Groups::              Creating and editing groups.
487 * Group Parameters::            Each group may have different parameters set.
488 * Listing Groups::              Gnus can list various subsets of the groups.
489 * Sorting Groups::              Re-arrange the group order.
490 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
491 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
492 * Exiting Gnus::                Stop reading news and get some work done.
493 * Group Topics::                A folding group mode divided into topics.
494 * Misc Group Stuff::            Other stuff that you can to do.
495
496 Group Buffer Format
497
498 * Group Line Specification::    Deciding how the group buffer is to look.
499 * Group Mode Line Specification::  The group buffer mode line.
500 * Group Highlighting::          Having nice colors in the group buffer.
501
502 Group Topics
503
504 * Topic Commands::              Interactive E-Z commands.
505 * Topic Variables::             How to customize the topics the Lisp Way.
506 * Topic Sorting::               Sorting each topic individually.
507 * Topic Topology::              A map of the world.
508 * Topic Parameters::            Parameters that apply to all groups in a topic.
509
510 Misc Group Stuff
511
512 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
513 * Group Information::           Information and help on groups and Gnus.
514 * Group Timestamp::             Making Gnus keep track of when you last read a group.
515 * File Commands::               Reading and writing the Gnus files.
516 * Sieve Commands::              Managing Sieve scripts.
517
518 Summary Buffer
519
520 * Summary Buffer Format::       Deciding how the summary buffer is to look.
521 * Summary Maneuvering::         Moving around the summary buffer.
522 * Choosing Articles::           Reading articles.
523 * Paging the Article::          Scrolling the current article.
524 * Reply Followup and Post::     Posting articles.
525 * Delayed Articles::            Send articles at a later time.
526 * Marking Articles::            Marking articles as read, expirable, etc.
527 * Limiting::                    You can limit the summary buffer.
528 * Threading::                   How threads are made.
529 * Sorting the Summary Buffer::  How articles and threads are sorted.
530 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
531 * Article Caching::             You may store articles in a cache.
532 * Persistent Articles::         Making articles expiry-resistant.
533 * Article Backlog::             Having already read articles hang around.
534 * Saving Articles::             Ways of customizing article saving.
535 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
536 * Article Treatment::           The article buffer can be mangled at will.
537 * MIME Commands::               Doing MIMEy things with the articles.
538 * Charsets::                    Character set issues.
539 * Article Commands::            Doing various things with the article buffer.
540 * Summary Sorting::             Sorting the summary buffer in various ways.
541 * Finding the Parent::          No child support? Get the parent.
542 * Alternative Approaches::      Reading using non-default summaries.
543 * Tree Display::                A more visual display of threads.
544 * Mail Group Commands::         Some commands can only be used in mail groups.
545 * Various Summary Stuff::       What didn't fit anywhere else.
546 * Exiting the Summary Buffer::  Returning to the Group buffer,
547                                 or reselecting the current group.
548 * Crosspost Handling::          How crossposted articles are dealt with.
549 * Duplicate Suppression::       An alternative when crosspost handling fails.
550 * Security::                    Decrypt and Verify.
551 * Mailing List::                Mailing list minor mode.
552
553 Summary Buffer Format
554
555 * Summary Buffer Lines::        You can specify how summary lines should look.
556 * To From Newsgroups::          How to not display your own name.
557 * Summary Buffer Mode Line::    You can say how the mode line should look.
558 * Summary Highlighting::        Making the summary buffer all pretty and nice.
559
560 Choosing Articles
561
562 * Choosing Commands::           Commands for choosing articles.
563 * Choosing Variables::          Variables that influence these commands.
564
565 Reply, Followup and Post
566
567 * Summary Mail Commands::       Sending mail.
568 * Summary Post Commands::       Sending news.
569 * Summary Message Commands::    Other Message-related commands.
570 * Canceling and Superseding::
571
572 Marking Articles
573
574 * Unread Articles::             Marks for unread articles.
575 * Read Articles::               Marks for read articles.
576 * Other Marks::                 Marks that do not affect readedness.
577
578 Marking Articles
579
580 * Setting Marks::             How to set and remove marks.
581 * Generic Marking Commands::  How to customize the marking.
582 * Setting Process Marks::     How to mark articles for later processing.
583
584 Threading
585
586 * Customizing Threading::       Variables you can change to affect the threading.
587 * Thread Commands::             Thread based commands in the summary buffer.
588
589 Customizing Threading
590
591 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
592 * Filling In Threads::          Making the threads displayed look fuller.
593 * More Threading::              Even more variables for fiddling with threads.
594 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
595
596 Decoding Articles
597
598 * Uuencoded Articles::          Uudecode articles.
599 * Shell Archives::              Unshar articles.
600 * PostScript Files::            Split PostScript.
601 * Other Files::                 Plain save and binhex.
602 * Decoding Variables::          Variables for a happy decoding.
603 * Viewing Files::               You want to look at the result of the decoding?
604
605 Decoding Variables
606
607 * Rule Variables::              Variables that say how a file is to be viewed.
608 * Other Decode Variables::      Other decode variables.
609 * Uuencoding and Posting::      Variables for customizing uuencoding.
610
611 Article Treatment
612
613 * Article Highlighting::        You want to make the article look like fruit salad.
614 * Article Fontisizing::         Making emphasized text look nice.
615 * Article Hiding::              You also want to make certain info go away.
616 * Article Washing::             Lots of way-neat functions to make life better.
617 * Article Header::              Doing various header transformations.
618 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
619 * Article Button Levels::       Controlling appearance of buttons.
620 * Article Date::                Grumble, UT!
621 * Article Display::             Display various stuff---X-Face, Picons, Smileys
622 * Article Signature::           What is a signature?
623 * Article Miscellanea::         Various other stuff.
624
625 Alternative Approaches
626
627 * Pick and Read::               First mark articles and then read them.
628 * Binary Groups::               Auto-decode all articles.
629
630 Various Summary Stuff
631
632 * Summary Group Information::   Information oriented commands.
633 * Searching for Articles::      Multiple article commands.
634 * Summary Generation Commands::
635 * Really Various Summary Commands::  Those pesky non-conformant commands.
636
637 Article Buffer
638
639 * Hiding Headers::              Deciding what headers should be displayed.
640 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
641 * Customizing Articles::        Tailoring the look of the articles.
642 * Article Keymap::              Keystrokes available in the article buffer.
643 * Misc Article::                Other stuff.
644
645 Composing Messages
646
647 * Mail::                        Mailing and replying.
648 * Posting Server::              What server should you post and mail via?
649 * Mail and Post::               Mailing and posting at the same time.
650 * Archived Messages::           Where Gnus stores the messages you've sent.
651 * Posting Styles::              An easier way to specify who you are.
652 * Drafts::                      Postponing messages and rejected messages.
653 * Rejected Articles::           What happens if the server doesn't like your article?
654 * Signing and encrypting::      How to compose secure messages.
655
656 Select Methods
657
658 * Server Buffer::               Making and editing virtual servers.
659 * Getting News::                Reading USENET news with Gnus.
660 * Getting Mail::                Reading your personal mail with Gnus.
661 * Browsing the Web::            Getting messages from a plethora of Web sources.
662 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
663 * Other Sources::               Reading directories, files, SOUP packets.
664 * Combined Groups::             Combining groups into one group.
665 * Gnus Unplugged::              Reading news and mail offline.
666
667 Server Buffer
668
669 * Server Buffer Format::        You can customize the look of this buffer.
670 * Server Commands::             Commands to manipulate servers.
671 * Example Methods::             Examples server specifications.
672 * Creating a Virtual Server::   An example session.
673 * Server Variables::            Which variables to set.
674 * Servers and Methods::         You can use server names as select methods.
675 * Unavailable Servers::         Some servers you try to contact may be down.
676
677 Getting News
678
679 * NNTP::                        Reading news from an @acronym{NNTP} server.
680 * News Spool::                  Reading news from the local spool.
681
682 @acronym{NNTP}
683
684 * Direct Functions::            Connecting directly to the server.
685 * Indirect Functions::          Connecting indirectly to the server.
686 * Common Variables::            Understood by several connection functions.
687
688 Getting Mail
689
690 * Mail in a Newsreader::        Important introductory notes.
691 * Getting Started Reading Mail::  A simple cookbook example.
692 * Splitting Mail::              How to create mail groups.
693 * Mail Sources::                How to tell Gnus where to get mail from.
694 * Mail Back End Variables::     Variables for customizing mail handling.
695 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
696 * Group Mail Splitting::        Use group customize to drive mail splitting.
697 * Incorporating Old Mail::      What about the old mail you have?
698 * Expiring Mail::               Getting rid of unwanted mail.
699 * Washing Mail::                Removing cruft from the mail you get.
700 * Duplicates::                  Dealing with duplicated mail.
701 * Not Reading Mail::            Using mail back ends for reading other files.
702 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
703
704 Mail Sources
705
706 * Mail Source Specifiers::      How to specify what a mail source is.
707 * Mail Source Customization::   Some variables that influence things.
708 * Fetching Mail::               Using the mail source specifiers.
709
710 Choosing a Mail Back End
711
712 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
713 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
714 * Mail Spool::                  Store your mail in a private spool?
715 * MH Spool::                    An mhspool-like back end.
716 * Maildir::                     Another one-file-per-message format.
717 * Mail Folders::                Having one file for each group.
718 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
719
720 Browsing the Web
721
722 * Archiving Mail::
723 * Web Searches::                Creating groups from articles that match a string.
724 * Slashdot::                    Reading the Slashdot comments.
725 * Ultimate::                    The Ultimate Bulletin Board systems.
726 * Web Archive::                 Reading mailing list archived on web.
727 * RSS::                         Reading RDF site summary.
728 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
729
730 @acronym{IMAP}
731
732 * Splitting in IMAP::           Splitting mail with nnimap.
733 * Expiring in IMAP::            Expiring mail with nnimap.
734 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
735 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
736 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
737 * Debugging IMAP::              What to do when things don't work.
738
739 Other Sources
740
741 * Directory Groups::            You can read a directory as if it was a newsgroup.
742 * Anything Groups::             Dired?  Who needs dired?
743 * Document Groups::             Single files can be the basis of a group.
744 * SOUP::                        Reading @sc{soup} packets ``offline''.
745 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
746
747 Document Groups
748
749 * Document Server Internals::   How to add your own document types.
750
751 SOUP
752
753 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
754 * SOUP Groups::                 A back end for reading @sc{soup} packets.
755 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
756
757 Combined Groups
758
759 * Virtual Groups::              Combining articles from many groups.
760 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
761
762 Gnus Unplugged
763
764 * Agent Basics::                How it all is supposed to work.
765 * Agent Categories::            How to tell the Gnus Agent what to download.
766 * Agent Commands::              New commands for all the buffers.
767 * Agent Visuals::               Ways that the agent may effect your summary buffer.
768 * Agent as Cache::              The Agent is a big cache too.
769 * Agent Expiry::                How to make old articles go away.
770 * Agent Regeneration::          How to recover from lost connections and other accidents.
771 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
772 * Outgoing Messages::           What happens when you post/mail something?
773 * Agent Variables::             Customizing is fun.
774 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
775 * Batching Agents::             How to fetch news from a @code{cron} job.
776 * Agent Caveats::               What you think it'll do and what it does.
777
778 Agent Categories
779
780 * Category Syntax::             What a category looks like.
781 * Category Buffer::             A buffer for maintaining categories.
782 * Category Variables::          Customize'r'Us.
783
784 Agent Commands
785
786 * Group Agent Commands::        Configure groups and fetch their contents.
787 * Summary Agent Commands::      Manually select then fetch specific articles.
788 * Server Agent Commands::       Select the servers that are supported by the agent.
789
790 Scoring
791
792 * Summary Score Commands::      Adding score entries for the current group.
793 * Group Score Commands::        General score commands.
794 * Score Variables::             Customize your scoring.  (My, what terminology).
795 * Score File Format::           What a score file may contain.
796 * Score File Editing::          You can edit score files by hand as well.
797 * Adaptive Scoring::            Big Sister Gnus knows what you read.
798 * Home Score File::             How to say where new score entries are to go.
799 * Followups To Yourself::       Having Gnus notice when people answer you.
800 * Scoring On Other Headers::    Scoring on non-standard headers.
801 * Scoring Tips::                How to score effectively.
802 * Reverse Scoring::             That problem child of old is not problem.
803 * Global Score Files::          Earth-spanning, ear-splitting score files.
804 * Kill Files::                  They are still here, but they can be ignored.
805 * Converting Kill Files::       Translating kill files to score files.
806 * GroupLens::                   Getting predictions on what you like to read.
807 * Advanced Scoring::            Using logical expressions to build score rules.
808 * Score Decays::                It can be useful to let scores wither away.
809
810 GroupLens
811
812 * Using GroupLens::             How to make Gnus use GroupLens.
813 * Rating Articles::             Letting GroupLens know how you rate articles.
814 * Displaying Predictions::      Displaying predictions given by GroupLens.
815 * GroupLens Variables::         Customizing GroupLens.
816
817 Advanced Scoring
818
819 * Advanced Scoring Syntax::     A definition.
820 * Advanced Scoring Examples::   What they look like.
821 * Advanced Scoring Tips::       Getting the most out of it.
822
823 Various
824
825 * Process/Prefix::              A convention used by many treatment commands.
826 * Interactive::                 Making Gnus ask you many questions.
827 * Symbolic Prefixes::           How to supply some Gnus functions with options.
828 * Formatting Variables::        You can specify what buffers should look like.
829 * Window Layout::               Configuring the Gnus buffer windows.
830 * Faces and Fonts::             How to change how faces look.
831 * Compilation::                 How to speed Gnus up.
832 * Mode Lines::                  Displaying information in the mode lines.
833 * Highlighting and Menus::      Making buffers look all nice and cozy.
834 * Buttons::                     Get tendinitis in ten easy steps!
835 * Daemons::                     Gnus can do things behind your back.
836 * NoCeM::                       How to avoid spam and other fatty foods.
837 * Undo::                        Some actions can be undone.
838 * Predicate Specifiers::        Specifying predicates.
839 * Moderation::                  What to do if you're a moderator.
840 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
841 * Fuzzy Matching::              What's the big fuzz?
842 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
843 * Other modes::                 Interaction with other modes.
844 * Various Various::             Things that are really various.
845
846 Formatting Variables
847
848 * Formatting Basics::           A formatting variable is basically a format string.
849 * Mode Line Formatting::        Some rules about mode line formatting variables.
850 * Advanced Formatting::         Modifying output in various ways.
851 * User-Defined Specs::          Having Gnus call your own functions.
852 * Formatting Fonts::            Making the formatting look colorful and nice.
853 * Positioning Point::           Moving point to a position after an operation.
854 * Tabulation::                  Tabulating your output.
855 * Wide Characters::             Dealing with wide characters.
856
857 Image Enhancements
858
859 * X-Face::                      Display a funky, teensy black-and-white image.
860 * Face::                        Display a funkier, teensier colored image.
861 * Smileys::                     Show all those happy faces the way they were meant to be shown.
862 * Picons::                      How to display pictures of what you're reading.
863 * XVarious::                    Other XEmacsy Gnusey variables.
864
865 Thwarting Email Spam
866
867 * The problem of spam::         Some background, and some solutions
868 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
869 * SpamAssassin::                How to use external anti-spam tools.
870 * Hashcash::                    Reduce spam by burning CPU time.
871 * Filtering Spam Using The Spam ELisp Package::
872 * Filtering Spam Using Statistics with spam-stat::
873
874 Filtering Spam Using The Spam ELisp Package
875
876 * Spam ELisp Package Sequence of Events::  
877 * Spam ELisp Package Filtering of Incoming Mail::  
878 * Spam ELisp Package Global Variables::  
879 * Spam ELisp Package Configuration Examples::  
880 * Blacklists and Whitelists::   
881 * BBDB Whitelists::             
882 * Gmane Spam Reporting::        
883 * Anti-spam Hashcash Payments::  
884 * Blackholes::                  
885 * Regular Expressions Header Matching::  
886 * Bogofilter::                  
887 * ifile spam filtering::        
888 * spam-stat spam filtering::    
889 * SpamOracle::                  
890 * Extending the Spam ELisp package::  
891
892 Filtering Spam Using Statistics with spam-stat
893
894 * Creating a spam-stat dictionary::
895 * Splitting mail using spam-stat::
896 * Low-level interface to the spam-stat dictionary::
897
898 Appendices
899
900 * XEmacs::                      Requirements for installing under XEmacs.
901 * History::                     How Gnus got where it is today.
902 * On Writing Manuals::          Why this is not a beginner's guide.
903 * Terminology::                 We use really difficult, like, words here.
904 * Customization::               Tailoring Gnus to your needs.
905 * Troubleshooting::             What you might try if things do not work.
906 * Gnus Reference Guide::        Rilly, rilly technical stuff.
907 * Emacs for Heathens::          A short introduction to Emacsian terms.
908 * Frequently Asked Questions::  The Gnus FAQ
909
910 History
911
912 * Gnus Versions::               What Gnus versions have been released.
913 * Other Gnus Versions::         Other Gnus versions that also have been released.
914 * Why?::                        What's the point of Gnus?
915 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
916 * Conformity::                  Gnus tries to conform to all standards.
917 * Emacsen::                     Gnus can be run on a few modern Emacsen.
918 * Gnus Development::            How Gnus is developed.
919 * Contributors::                Oodles of people.
920 * New Features::                Pointers to some of the new stuff in Gnus.
921
922 New Features
923
924 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
925 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
926 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
927 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
928 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
929 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
930 * No Gnus::                     Lars, FIXME!
931
932 Customization
933
934 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
935 * Slow Terminal Connection::    You run a remote Emacs.
936 * Little Disk Space::           You feel that having large setup files is icky.
937 * Slow Machine::                You feel like buying a faster machine.
938
939 Gnus Reference Guide
940
941 * Gnus Utility Functions::      Common functions and variable to use.
942 * Back End Interface::          How Gnus communicates with the servers.
943 * Score File Syntax::           A BNF definition of the score file standard.
944 * Headers::                     How Gnus stores headers internally.
945 * Ranges::                      A handy format for storing mucho numbers.
946 * Group Info::                  The group info format.
947 * Extended Interactive::        Symbolic prefixes and stuff.
948 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
949 * Various File Formats::        Formats of files that Gnus use.
950
951 Back End Interface
952
953 * Required Back End Functions::  Functions that must be implemented.
954 * Optional Back End Functions::  Functions that need not be implemented.
955 * Error Messaging::             How to get messages and report errors.
956 * Writing New Back Ends::       Extending old back ends.
957 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
958 * Mail-like Back Ends::         Some tips on mail back ends.
959
960 Various File Formats
961
962 * Active File Format::          Information on articles and groups available.
963 * Newsgroups File Format::      Group descriptions.
964
965 Emacs for Heathens
966
967 * Keystrokes::                  Entering text and executing commands.
968 * Emacs Lisp::                  The built-in Emacs programming language.
969
970 @end detailmenu
971 @end menu
972
973 @node Starting Up
974 @chapter Starting Gnus
975 @cindex starting up
976
977 @kindex M-x gnus
978 @findex gnus
979 If your system administrator has set things up properly, starting Gnus
980 and reading news is extremely easy---you just type @kbd{M-x gnus} in
981 your Emacs.
982
983 @findex gnus-other-frame
984 @kindex M-x gnus-other-frame
985 If you want to start Gnus in a different frame, you can use the command
986 @kbd{M-x gnus-other-frame} instead.
987
988 If things do not go smoothly at startup, you have to twiddle some
989 variables in your @file{~/.gnus.el} file.  This file is similar to
990 @file{~/.emacs}, but is read when Gnus starts.
991
992 If you puzzle at any terms used in this manual, please refer to the
993 terminology section (@pxref{Terminology}).
994
995 @menu
996 * Finding the News::            Choosing a method for getting news.
997 * The First Time::              What does Gnus do the first time you start it?
998 * The Server is Down::          How can I read my mail then?
999 * Slave Gnusae::                You can have more than one Gnus active at a time.
1000 * Fetching a Group::            Starting Gnus just to read a group.
1001 * New Groups::                  What is Gnus supposed to do with new groups?
1002 * Changing Servers::            You may want to move from one server to another.
1003 * Startup Files::               Those pesky startup files---@file{.newsrc}.
1004 * Auto Save::                   Recovering from a crash.
1005 * The Active File::             Reading the active file over a slow line Takes Time.
1006 * Startup Variables::           Other variables you might change.
1007 @end menu
1008
1009
1010 @node Finding the News
1011 @section Finding the News
1012 @cindex finding news
1013
1014 @vindex gnus-select-method
1015 @c @head
1016 The @code{gnus-select-method} variable says where Gnus should look for
1017 news.  This variable should be a list where the first element says
1018 @dfn{how} and the second element says @dfn{where}.  This method is your
1019 native method.  All groups not fetched with this method are
1020 foreign groups.
1021
1022 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
1023 you want to get your daily dosage of news from, you'd say:
1024
1025 @lisp
1026 (setq gnus-select-method '(nntp "news.somewhere.edu"))
1027 @end lisp
1028
1029 If you want to read directly from the local spool, say:
1030
1031 @lisp
1032 (setq gnus-select-method '(nnspool ""))
1033 @end lisp
1034
1035 If you can use a local spool, you probably should, as it will almost
1036 certainly be much faster.  But do not use the local spool if your
1037 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
1038
1039 @vindex gnus-nntpserver-file
1040 @cindex NNTPSERVER
1041 @cindex @acronym{NNTP} server
1042 If this variable is not set, Gnus will take a look at the
1043 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1044 Gnus will see whether @code{gnus-nntpserver-file}
1045 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1046 If that fails as well, Gnus will try to use the machine running Emacs
1047 as an @acronym{NNTP} server.  That's a long shot, though.
1048
1049 @vindex gnus-nntp-server
1050 If @code{gnus-nntp-server} is set, this variable will override
1051 @code{gnus-select-method}.  You should therefore set
1052 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1053
1054 @vindex gnus-secondary-servers
1055 @vindex gnus-nntp-server
1056 You can also make Gnus prompt you interactively for the name of an
1057 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1058 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
1059 in the @code{gnus-secondary-servers} list (if any).  You can also just
1060 type in the name of any server you feel like visiting.  (Note that this
1061 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1062 gnus} later in the same Emacs session, Gnus will contact the same
1063 server.)
1064
1065 @findex gnus-group-browse-foreign-server
1066 @kindex B (Group)
1067 However, if you use one @acronym{NNTP} server regularly and are just
1068 interested in a couple of groups from a different server, you would be
1069 better served by using the @kbd{B} command in the group buffer.  It will
1070 let you have a look at what groups are available, and you can subscribe
1071 to any of the groups you want to.  This also makes @file{.newsrc}
1072 maintenance much tidier.  @xref{Foreign Groups}.
1073
1074 @vindex gnus-secondary-select-methods
1075 @c @head
1076 A slightly different approach to foreign groups is to set the
1077 @code{gnus-secondary-select-methods} variable.  The select methods
1078 listed in this variable are in many ways just as native as the
1079 @code{gnus-select-method} server.  They will also be queried for active
1080 files during startup (if that's required), and new newsgroups that
1081 appear on these servers will be subscribed (or not) just as native
1082 groups are.
1083
1084 For instance, if you use the @code{nnmbox} back end to read your mail,
1085 you would typically set this variable to
1086
1087 @lisp
1088 (setq gnus-secondary-select-methods '((nnmbox "")))
1089 @end lisp
1090
1091
1092 @node The First Time
1093 @section The First Time
1094 @cindex first time usage
1095
1096 If no startup files exist, Gnus will try to determine what groups should
1097 be subscribed by default.
1098
1099 @vindex gnus-default-subscribed-newsgroups
1100 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
1101 will subscribe you to just those groups in that list, leaving the rest
1102 killed.  Your system administrator should have set this variable to
1103 something useful.
1104
1105 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
1106 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1107 here as @dfn{whatever Lars thinks you should read}.)
1108
1109 You'll also be subscribed to the Gnus documentation group, which should
1110 help you with most common problems.
1111
1112 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
1113 use the normal functions for handling new groups, and not do anything
1114 special.
1115
1116
1117 @node The Server is Down
1118 @section The Server is Down
1119 @cindex server errors
1120
1121 If the default server is down, Gnus will understandably have some
1122 problems starting.  However, if you have some mail groups in addition to
1123 the news groups, you may want to start Gnus anyway.
1124
1125 Gnus, being the trusting sort of program, will ask whether to proceed
1126 without a native select method if that server can't be contacted.  This
1127 will happen whether the server doesn't actually exist (i.e., you have
1128 given the wrong address) or the server has just momentarily taken ill
1129 for some reason or other.  If you decide to continue and have no foreign
1130 groups, you'll find it difficult to actually do anything in the group
1131 buffer.  But, hey, that's your problem.  Blllrph!
1132
1133 @findex gnus-no-server
1134 @kindex M-x gnus-no-server
1135 @c @head
1136 If you know that the server is definitely down, or you just want to read
1137 your mail without bothering with the server at all, you can use the
1138 @code{gnus-no-server} command to start Gnus.  That might come in handy
1139 if you're in a hurry as well.  This command will not attempt to contact
1140 your primary server---instead, it will just activate all groups on level
1141 1 and 2.  (You should preferably keep no native groups on those two
1142 levels.) Also @pxref{Group Levels}.
1143
1144
1145 @node Slave Gnusae
1146 @section Slave Gnusae
1147 @cindex slave
1148
1149 You might want to run more than one Emacs with more than one Gnus at the
1150 same time.  If you are using different @file{.newsrc} files (e.g., if you
1151 are using the two different Gnusae to read from two different servers),
1152 that is no problem whatsoever.  You just do it.
1153
1154 The problem appears when you want to run two Gnusae that use the same
1155 @file{.newsrc} file.
1156
1157 To work around that problem some, we here at the Think-Tank at the Gnus
1158 Towers have come up with a new concept: @dfn{Masters} and
1159 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1160 taken out a copyright on those words.  If you wish to use those words in
1161 conjunction with each other, you have to send $1 per usage instance to
1162 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1163 Applications}) will be much more expensive, of course.)
1164
1165 @findex gnus-slave
1166 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1167 however you do it).  Each subsequent slave Gnusae should be started with
1168 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1169 files, but instead save @dfn{slave files} that contain information only
1170 on what groups have been read in the slave session.  When a master Gnus
1171 starts, it will read (and delete) these slave files, incorporating all
1172 information from them.  (The slave files will be read in the sequence
1173 they were created, so the latest changes will have precedence.)
1174
1175 Information from the slave files has, of course, precedence over the
1176 information in the normal (i.e., master) @file{.newsrc} file.
1177
1178 If the @file{.newsrc*} files have not been saved in the master when the
1179 slave starts, you may be prompted as to whether to read an auto-save
1180 file.  If you answer ``yes'', the unsaved changes to the master will be
1181 incorporated into the slave.  If you answer ``no'', the slave may see some
1182 messages as unread that have been read in the master.
1183
1184 @node Fetching a Group
1185 @section Fetching a Group
1186 @cindex fetching a group
1187
1188 @findex gnus-fetch-group
1189 It is sometimes convenient to be able to just say ``I want to read this
1190 group and I don't care whether Gnus has been started or not''.  This is
1191 perhaps more useful for people who write code than for users, but the
1192 command @code{gnus-fetch-group} provides this functionality in any case.
1193 It takes the group name as a parameter.
1194
1195
1196 @node New Groups
1197 @section New Groups
1198 @cindex new groups
1199 @cindex subscription
1200
1201 @vindex gnus-check-new-newsgroups
1202 If you are satisfied that you really never want to see any new groups,
1203 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1204 also save you some time at startup.  Even if this variable is
1205 @code{nil}, you can always subscribe to the new groups just by pressing
1206 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1207 is @code{ask-server} by default.  If you set this variable to
1208 @code{always}, then Gnus will query the back ends for new groups even
1209 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1210
1211 @menu
1212 * Checking New Groups::         Determining what groups are new.
1213 * Subscription Methods::        What Gnus should do with new groups.
1214 * Filtering New Groups::        Making Gnus ignore certain new groups.
1215 @end menu
1216
1217
1218 @node Checking New Groups
1219 @subsection Checking New Groups
1220
1221 Gnus normally determines whether a group is new or not by comparing the
1222 list of groups from the active file(s) with the lists of subscribed and
1223 dead groups.  This isn't a particularly fast method.  If
1224 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
1225 server for new groups since the last time.  This is both faster and
1226 cheaper.  This also means that you can get rid of the list of killed
1227 groups altogether, so you may set @code{gnus-save-killed-list} to
1228 @code{nil}, which will save time both at startup, at exit, and all over.
1229 Saves disk space, too.  Why isn't this the default, then?
1230 Unfortunately, not all servers support this command.
1231
1232 I bet I know what you're thinking now: How do I find out whether my
1233 server supports @code{ask-server}?  No?  Good, because I don't have a
1234 fail-safe answer.  I would suggest just setting this variable to
1235 @code{ask-server} and see whether any new groups appear within the next
1236 few days.  If any do, then it works.  If none do, then it doesn't
1237 work.  I could write a function to make Gnus guess whether the server
1238 supports @code{ask-server}, but it would just be a guess.  So I won't.
1239 You could @code{telnet} to the server and say @code{HELP} and see
1240 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1241 it does, then it might work.  (But there are servers that lists
1242 @samp{NEWGROUPS} without supporting the function properly.)
1243
1244 This variable can also be a list of select methods.  If so, Gnus will
1245 issue an @code{ask-server} command to each of the select methods, and
1246 subscribe them (or not) using the normal methods.  This might be handy
1247 if you are monitoring a few servers for new groups.  A side effect is
1248 that startup will take much longer, so you can meditate while waiting.
1249 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1250
1251
1252 @node Subscription Methods
1253 @subsection Subscription Methods
1254
1255 @vindex gnus-subscribe-newsgroup-method
1256 What Gnus does when it encounters a new group is determined by the
1257 @code{gnus-subscribe-newsgroup-method} variable.
1258
1259 This variable should contain a function.  This function will be called
1260 with the name of the new group as the only parameter.
1261
1262 Some handy pre-fab functions are:
1263
1264 @table @code
1265
1266 @item gnus-subscribe-zombies
1267 @vindex gnus-subscribe-zombies
1268 Make all new groups zombies.  This is the default.  You can browse the
1269 zombies later (with @kbd{A z}) and either kill them all off properly
1270 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1271
1272 @item gnus-subscribe-randomly
1273 @vindex gnus-subscribe-randomly
1274 Subscribe all new groups in arbitrary order.  This really means that all
1275 new groups will be added at ``the top'' of the group buffer.
1276
1277 @item gnus-subscribe-alphabetically
1278 @vindex gnus-subscribe-alphabetically
1279 Subscribe all new groups in alphabetical order.
1280
1281 @item gnus-subscribe-hierarchically
1282 @vindex gnus-subscribe-hierarchically
1283 Subscribe all new groups hierarchically.  The difference between this
1284 function and @code{gnus-subscribe-alphabetically} is slight.
1285 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1286 alphabetical fashion, while this function will enter groups into its
1287 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1288 @samp{comp} hierarchy, this function will not mess that configuration
1289 up.  Or something like that.
1290
1291 @item gnus-subscribe-interactively
1292 @vindex gnus-subscribe-interactively
1293 Subscribe new groups interactively.  This means that Gnus will ask
1294 you about @strong{all} new groups.  The groups you choose to subscribe
1295 to will be subscribed hierarchically.
1296
1297 @item gnus-subscribe-killed
1298 @vindex gnus-subscribe-killed
1299 Kill all new groups.
1300
1301 @item gnus-subscribe-topics
1302 @vindex gnus-subscribe-topics
1303 Put the groups into the topic that has a matching @code{subscribe} topic
1304 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1305 topic parameter that looks like
1306
1307 @example
1308 "nnslashdot"
1309 @end example
1310
1311 will mean that all groups that match that regex will be subscribed under
1312 that topic.
1313
1314 If no topics match the groups, the groups will be subscribed in the
1315 top-level topic.
1316
1317 @end table
1318
1319 @vindex gnus-subscribe-hierarchical-interactive
1320 A closely related variable is
1321 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1322 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
1323 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1324 will ask you for each sub-hierarchy whether you want to descend the
1325 hierarchy or not.
1326
1327 One common mistake is to set the variable a few paragraphs above
1328 (@code{gnus-subscribe-newsgroup-method}) to
1329 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1330 will not work.  This is ga-ga.  So don't do it.
1331
1332
1333 @node Filtering New Groups
1334 @subsection Filtering New Groups
1335
1336 A nice and portable way to control which new newsgroups should be
1337 subscribed (or ignored) is to put an @dfn{options} line at the start of
1338 the @file{.newsrc} file.  Here's an example:
1339
1340 @example
1341 options -n !alt.all !rec.all sci.all
1342 @end example
1343
1344 @vindex gnus-subscribe-options-newsgroup-method
1345 This line obviously belongs to a serious-minded intellectual scientific
1346 person (or she may just be plain old boring), because it says that all
1347 groups that have names beginning with @samp{alt} and @samp{rec} should
1348 be ignored, and all groups with names beginning with @samp{sci} should
1349 be subscribed.  Gnus will not use the normal subscription method for
1350 subscribing these groups.
1351 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1352 variable defaults to @code{gnus-subscribe-alphabetically}.
1353
1354 @vindex gnus-options-not-subscribe
1355 @vindex gnus-options-subscribe
1356 If you don't want to mess with your @file{.newsrc} file, you can just
1357 set the two variables @code{gnus-options-subscribe} and
1358 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1359 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1360 and if the new group matches the former, it will be unconditionally
1361 subscribed, and if it matches the latter, it will be ignored.
1362
1363 @vindex gnus-auto-subscribed-groups
1364 Yet another variable that meddles here is
1365 @code{gnus-auto-subscribed-groups}.  It works exactly like
1366 @code{gnus-options-subscribe}, and is therefore really superfluous,
1367 but I thought it would be nice to have two of these.  This variable is
1368 more meant for setting some ground rules, while the other variable is
1369 used more for user fiddling.  By default this variable makes all new
1370 groups that come from mail back ends (@code{nnml}, @code{nnbabyl},
1371 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1372 subscribed.  If you don't like that, just set this variable to
1373 @code{nil}.
1374
1375 New groups that match this regexp are subscribed using
1376 @code{gnus-subscribe-options-newsgroup-method}.
1377
1378
1379 @node Changing Servers
1380 @section Changing Servers
1381 @cindex changing servers
1382
1383 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1384 This happens very rarely, but perhaps you change jobs, or one server is
1385 very flaky and you want to use another.
1386
1387 Changing the server is pretty easy, right?  You just change
1388 @code{gnus-select-method} to point to the new server?
1389
1390 @emph{Wrong!}
1391
1392 Article numbers are not (in any way) kept synchronized between different
1393 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1394 you have read is by keeping track of article numbers.  So when you
1395 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1396 worthless.
1397
1398 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1399 file from one server to another.  They all have one thing in
1400 common---they take a looong time to run.  You don't want to use these
1401 functions more than absolutely necessary.
1402
1403 @kindex M-x gnus-change-server
1404 @findex gnus-change-server
1405 If you have access to both servers, Gnus can request the headers for all
1406 the articles you have read and compare @code{Message-ID}s and map the
1407 article numbers of the read articles and article marks.  The @kbd{M-x
1408 gnus-change-server} command will do this for all your native groups.  It
1409 will prompt for the method you want to move to.
1410
1411 @kindex M-x gnus-group-move-group-to-server
1412 @findex gnus-group-move-group-to-server
1413 You can also move individual groups with the @kbd{M-x
1414 gnus-group-move-group-to-server} command.  This is useful if you want to
1415 move a (foreign) group from one server to another.
1416
1417 @kindex M-x gnus-group-clear-data-on-native-groups
1418 @findex gnus-group-clear-data-on-native-groups
1419 If you don't have access to both the old and new server, all your marks
1420 and read ranges have become worthless.  You can use the @kbd{M-x
1421 gnus-group-clear-data-on-native-groups} command to clear out all data
1422 that you have on your native groups.  Use with caution.
1423
1424 @kindex M-x gnus-group-clear-data
1425 @findex gnus-group-clear-data
1426 Clear the data from the current group only---nix out marks and the
1427 list of read articles (@code{gnus-group-clear-data}).
1428
1429 After changing servers, you @strong{must} move the cache hierarchy away,
1430 since the cached articles will have wrong article numbers, which will
1431 affect which articles Gnus thinks are read.
1432 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1433 to have it done automatically; for @code{gnus-group-clear-data}, you
1434 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1435 cache for all groups).
1436
1437
1438 @node Startup Files
1439 @section Startup Files
1440 @cindex startup files
1441 @cindex .newsrc
1442 @cindex .newsrc.el
1443 @cindex .newsrc.eld
1444
1445 Now, you all know about the @file{.newsrc} file.  All subscription
1446 information is traditionally stored in this file.
1447
1448 Things got a bit more complicated with @sc{gnus}.  In addition to
1449 keeping the @file{.newsrc} file updated, it also used a file called
1450 @file{.newsrc.el} for storing all the information that didn't fit into
1451 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1452 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1453 files was the most recently saved, which enabled people to swap between
1454 @sc{gnus} and other newsreaders.
1455
1456 That was kinda silly, so Gnus went one better: In addition to the
1457 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1458 @file{.newsrc.eld}.  It will read whichever of these files that are most
1459 recent, but it will never write a @file{.newsrc.el} file.  You should
1460 never delete the @file{.newsrc.eld} file---it contains much information
1461 not stored in the @file{.newsrc} file.
1462
1463 @vindex gnus-save-newsrc-file
1464 @vindex gnus-read-newsrc-file
1465 You can turn off writing the @file{.newsrc} file by setting
1466 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1467 the file and save some space, as well as exiting from Gnus faster.
1468 However, this will make it impossible to use other newsreaders than
1469 Gnus.  But hey, who would want to, right?  Similarly, setting
1470 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1471 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1472 convenient if you have a tendency to use Netscape once in a while.
1473
1474 @vindex gnus-save-killed-list
1475 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1476 will not save the list of killed groups to the startup file.  This will
1477 save both time (when starting and quitting) and space (on disk).  It
1478 will also mean that Gnus has no record of what groups are new or old,
1479 so the automatic new groups subscription methods become meaningless.
1480 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1481 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1482 Groups}).  This variable can also be a regular expression.  If that's
1483 the case, remove all groups that do not match this regexp before
1484 saving.  This can be useful in certain obscure situations that involve
1485 several servers where not all servers support @code{ask-server}.
1486
1487 @vindex gnus-startup-file
1488 @vindex gnus-backup-startup-file
1489 @vindex version-control
1490 The @code{gnus-startup-file} variable says where the startup files are.
1491 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1492 file being whatever that one is, with a @samp{.eld} appended.
1493 If you want version control for this file, set
1494 @code{gnus-backup-startup-file}.  It respects the same values as the
1495 @code{version-control} variable.
1496
1497 @vindex gnus-save-newsrc-hook
1498 @vindex gnus-save-quick-newsrc-hook
1499 @vindex gnus-save-standard-newsrc-hook
1500 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1501 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1502 saving the @file{.newsrc.eld} file, and
1503 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1504 @file{.newsrc} file.  The latter two are commonly used to turn version
1505 control on or off.  Version control is on by default when saving the
1506 startup files.  If you want to turn backup creation off, say something like:
1507
1508 @lisp
1509 (defun turn-off-backup ()
1510   (set (make-local-variable 'backup-inhibited) t))
1511
1512 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1513 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1514 @end lisp
1515
1516 @vindex gnus-init-file
1517 @vindex gnus-site-init-file
1518 When Gnus starts, it will read the @code{gnus-site-init-file}
1519 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1520 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1521 and can be used to avoid cluttering your @file{~/.emacs} and
1522 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1523 with the same names as these, but with @file{.elc} and @file{.el}
1524 suffixes.  In other words, if you have set @code{gnus-init-file} to
1525 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1526 and finally @file{~/.gnus} (in this order).
1527
1528
1529
1530 @node Auto Save
1531 @section Auto Save
1532 @cindex dribble file
1533 @cindex auto-save
1534
1535 Whenever you do something that changes the Gnus data (reading articles,
1536 catching up, killing/subscribing groups), the change is added to a
1537 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1538 Emacs way.  If your Emacs should crash before you have saved the
1539 @file{.newsrc} files, all changes you have made can be recovered from
1540 this file.
1541
1542 If Gnus detects this file at startup, it will ask the user whether to
1543 read it.  The auto save file is deleted whenever the real startup file is
1544 saved.
1545
1546 @vindex gnus-use-dribble-file
1547 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1548 maintain a dribble buffer.  The default is @code{t}.
1549
1550 @vindex gnus-dribble-directory
1551 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1552 this variable is @code{nil}, which it is by default, Gnus will dribble
1553 into the directory where the @file{.newsrc} file is located.  (This is
1554 normally the user's home directory.)  The dribble file will get the same
1555 file permissions as the @file{.newsrc} file.
1556
1557 @vindex gnus-always-read-dribble-file
1558 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1559 read the dribble file on startup without querying the user.
1560
1561
1562 @node The Active File
1563 @section The Active File
1564 @cindex active file
1565 @cindex ignored groups
1566
1567 When Gnus starts, or indeed whenever it tries to determine whether new
1568 articles have arrived, it reads the active file.  This is a very large
1569 file that lists all the active groups and articles on the server.
1570
1571 @vindex gnus-ignored-newsgroups
1572 Before examining the active file, Gnus deletes all lines that match the
1573 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1574 any groups with bogus names, but you can use this variable to make Gnus
1575 ignore hierarchies you aren't ever interested in.  However, this is not
1576 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1577 Groups} for an overview of other variables that can be used instead.
1578
1579 @c This variable is
1580 @c @code{nil} by default, and will slow down active file handling somewhat
1581 @c if you set it to anything else.
1582
1583 @vindex gnus-read-active-file
1584 @c @head
1585 The active file can be rather Huge, so if you have a slow network, you
1586 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1587 reading the active file.  This variable is @code{some} by default.
1588
1589 Gnus will try to make do by getting information just on the groups that
1590 you actually subscribe to.
1591
1592 Note that if you subscribe to lots and lots of groups, setting this
1593 variable to @code{nil} will probably make Gnus slower, not faster.  At
1594 present, having this variable @code{nil} will slow Gnus down
1595 considerably, unless you read news over a 2400 baud modem.
1596
1597 This variable can also have the value @code{some}.  Gnus will then
1598 attempt to read active info only on the subscribed groups.  On some
1599 servers this is quite fast (on sparkling, brand new INN servers that
1600 support the @code{LIST ACTIVE group} command), on others this isn't fast
1601 at all.  In any case, @code{some} should be faster than @code{nil}, and
1602 is certainly faster than @code{t} over slow lines.
1603
1604 Some news servers (old versions of Leafnode and old versions of INN, for
1605 instance) do not support the @code{LIST ACTIVE group}.  For these
1606 servers, @code{nil} is probably the most efficient value for this
1607 variable.
1608
1609 If this variable is @code{nil}, Gnus will ask for group info in total
1610 lock-step, which isn't very fast.  If it is @code{some} and you use an
1611 @acronym{NNTP} server, Gnus will pump out commands as fast as it can, and
1612 read all the replies in one swoop.  This will normally result in better
1613 performance, but if the server does not support the aforementioned
1614 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1615
1616 If you think that starting up Gnus takes too long, try all the three
1617 different values for this variable and see what works best for you.
1618
1619 In any case, if you use @code{some} or @code{nil}, you should definitely
1620 kill all groups that you aren't interested in to speed things up.
1621
1622 Note that this variable also affects active file retrieval from
1623 secondary select methods.
1624
1625
1626 @node Startup Variables
1627 @section Startup Variables
1628
1629 @table @code
1630
1631 @item gnus-load-hook
1632 @vindex gnus-load-hook
1633 A hook run while Gnus is being loaded.  Note that this hook will
1634 normally be run just once in each Emacs session, no matter how many
1635 times you start Gnus.
1636
1637 @item gnus-before-startup-hook
1638 @vindex gnus-before-startup-hook
1639 A hook run after starting up Gnus successfully.
1640
1641 @item gnus-startup-hook
1642 @vindex gnus-startup-hook
1643 A hook run as the very last thing after starting up Gnus
1644
1645 @item gnus-started-hook
1646 @vindex gnus-started-hook
1647 A hook that is run as the very last thing after starting up Gnus
1648 successfully.
1649
1650 @item gnus-setup-news-hook
1651 @vindex gnus-setup-news-hook
1652 A hook that is run after reading the @file{.newsrc} file(s), but before
1653 generating the group buffer.
1654
1655 @item gnus-check-bogus-newsgroups
1656 @vindex gnus-check-bogus-newsgroups
1657 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1658 startup.  A @dfn{bogus group} is a group that you have in your
1659 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1660 bogus groups can take quite a while, so to save time and resources it's
1661 best to leave this option off, and do the checking for bogus groups once
1662 in a while from the group buffer instead (@pxref{Group Maintenance}).
1663
1664 @item gnus-inhibit-startup-message
1665 @vindex gnus-inhibit-startup-message
1666 If non-@code{nil}, the startup message won't be displayed.  That way,
1667 your boss might not notice as easily that you are reading news instead
1668 of doing your job.  Note that this variable is used before
1669 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1670
1671 @item gnus-no-groups-message
1672 @vindex gnus-no-groups-message
1673 Message displayed by Gnus when no groups are available.
1674
1675 @item gnus-play-startup-jingle
1676 @vindex gnus-play-startup-jingle
1677 If non-@code{nil}, play the Gnus jingle at startup.
1678
1679 @item gnus-startup-jingle
1680 @vindex gnus-startup-jingle
1681 Jingle to be played if the above variable is non-@code{nil}.  The
1682 default is @samp{Tuxedomoon.Jingle4.au}.
1683
1684 @end table
1685
1686
1687 @node Group Buffer
1688 @chapter Group Buffer
1689 @cindex group buffer
1690
1691 @c Alex Schroeder suggests to rearrange this as follows:
1692 @c
1693 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1694 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1695 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1696 @c   7. Group Score, 8. Group Buffer Format
1697 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1698 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1699 @c <kensanata> First, "Gnus considers groups... (default 9)."
1700 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1701 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1702 @c <kensanata> Then expand the next paragraph or add some more to it.
1703 @c    This short one sentence explains levels 1 and 2, therefore I understand
1704 @c    that I should keep important news at 3 and boring news at 4.
1705 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1706 @c    Maybe keep those that you don't want to read temporarily at 6,
1707 @c    those that you never want to read at 8, those that offend your
1708 @c    human rights at 9...
1709
1710
1711 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1712 is the first buffer shown when Gnus starts, and will never be killed as
1713 long as Gnus is active.
1714
1715 @iftex
1716 @iflatex
1717 \gnusfigure{The Group Buffer}{320}{
1718 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1719 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1720 \put(120,38){\vector(1,2){10}}
1721 \put(40,60){\makebox(0,0)[r]{Mode line}}
1722 \put(40,58){\vector(1,0){30}}
1723 \put(200,28){\makebox(0,0)[t]{Native select method}}
1724 \put(200,26){\vector(-1,2){15}}
1725 }
1726 @end iflatex
1727 @end iftex
1728
1729 @menu
1730 * Group Buffer Format::         Information listed and how you can change it.
1731 * Group Maneuvering::           Commands for moving in the group buffer.
1732 * Selecting a Group::           Actually reading news.
1733 * Subscription Commands::       Unsubscribing, killing, subscribing.
1734 * Group Data::                  Changing the info for a group.
1735 * Group Levels::                Levels? What are those, then?
1736 * Group Score::                 A mechanism for finding out what groups you like.
1737 * Marking Groups::              You can mark groups for later processing.
1738 * Foreign Groups::              Creating and editing groups.
1739 * Group Parameters::            Each group may have different parameters set.
1740 * Listing Groups::              Gnus can list various subsets of the groups.
1741 * Sorting Groups::              Re-arrange the group order.
1742 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1743 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1744 * Exiting Gnus::                Stop reading news and get some work done.
1745 * Group Topics::                A folding group mode divided into topics.
1746 * Misc Group Stuff::            Other stuff that you can to do.
1747 @end menu
1748
1749
1750 @node Group Buffer Format
1751 @section Group Buffer Format
1752
1753 @menu
1754 * Group Line Specification::    Deciding how the group buffer is to look.
1755 * Group Mode Line Specification::  The group buffer mode line.
1756 * Group Highlighting::          Having nice colors in the group buffer.
1757 @end menu
1758
1759
1760 @node Group Line Specification
1761 @subsection Group Line Specification
1762 @cindex group buffer format
1763
1764 The default format of the group buffer is nice and dull, but you can
1765 make it as exciting and ugly as you feel like.
1766
1767 Here's a couple of example group lines:
1768
1769 @example
1770      25: news.announce.newusers
1771  *    0: alt.fan.andrea-dworkin
1772 @end example
1773
1774 Quite simple, huh?
1775
1776 You can see that there are 25 unread articles in
1777 @samp{news.announce.newusers}.  There are no unread articles, but some
1778 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1779 asterisk at the beginning of the line?).
1780
1781 @vindex gnus-group-line-format
1782 You can change that format to whatever you want by fiddling with the
1783 @code{gnus-group-line-format} variable.  This variable works along the
1784 lines of a @code{format} specification, which is pretty much the same as
1785 a @code{printf} specifications, for those of you who use (feh!) C.
1786 @xref{Formatting Variables}.
1787
1788 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1789
1790 There should always be a colon on the line; the cursor always moves to
1791 the colon after performing an operation.  @xref{Positioning
1792 Point}.  Nothing else is required---not even the group name.  All
1793 displayed text is just window dressing, and is never examined by Gnus.
1794 Gnus stores all real information it needs using text properties.
1795
1796 (Note that if you make a really strange, wonderful, spreadsheet-like
1797 layout, everybody will believe you are hard at work with the accounting
1798 instead of wasting time reading news.)
1799
1800 Here's a list of all available format characters:
1801
1802 @table @samp
1803
1804 @item M
1805 An asterisk if the group only has marked articles.
1806
1807 @item S
1808 Whether the group is subscribed.
1809
1810 @item L
1811 Level of subscribedness.
1812
1813 @item N
1814 Number of unread articles.
1815
1816 @item I
1817 Number of dormant articles.
1818
1819 @item T
1820 Number of ticked articles.
1821
1822 @item R
1823 Number of read articles.
1824
1825 @item U
1826 Number of unseen articles.
1827
1828 @item t
1829 Estimated total number of articles.  (This is really @var{max-number}
1830 minus @var{min-number} plus 1.)
1831
1832 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1833 efficient access to @var{max-number} and @var{min-number} but getting
1834 the true unread message count is not possible efficiently.  For
1835 hysterical raisins, even the mail back ends, where the true number of
1836 unread messages might be available efficiently, use the same limited
1837 interface.  To remove this restriction from Gnus means that the back
1838 end interface has to be changed, which is not an easy job.  If you
1839 want to work on this, please contact the Gnus mailing list.
1840
1841 @item y
1842 Number of unread, unticked, non-dormant articles.
1843
1844 @item i
1845 Number of ticked and dormant articles.
1846
1847 @item g
1848 Full group name.
1849
1850 @item G
1851 Group name.
1852
1853 @item C
1854 Group comment (@pxref{Group Parameters}) or group name if there is no
1855 comment element in the group parameters.
1856
1857 @item D
1858 Newsgroup description.  You need to read the group descriptions
1859 before these will appear, and to do that, you either have to set
1860 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1861 command.
1862
1863 @item o
1864 @samp{m} if moderated.
1865
1866 @item O
1867 @samp{(m)} if moderated.
1868
1869 @item s
1870 Select method.
1871
1872 @item B
1873 If the summary buffer for the group is open or not.
1874
1875 @item n
1876 Select from where.
1877
1878 @item z
1879 A string that looks like @samp{<%s:%n>} if a foreign select method is
1880 used.
1881
1882 @item P
1883 Indentation based on the level of the topic (@pxref{Group Topics}).
1884
1885 @item c
1886 @vindex gnus-group-uncollapsed-levels
1887 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1888 variable says how many levels to leave at the end of the group name.
1889 The default is 1---this will mean that group names like
1890 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1891
1892 @item m
1893 @vindex gnus-new-mail-mark
1894 @cindex %
1895 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1896 the group lately.
1897
1898 @item p
1899 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1900
1901 @item d
1902 A string that says when you last read the group (@pxref{Group
1903 Timestamp}).
1904
1905 @item u
1906 User defined specifier.  The next character in the format string should
1907 be a letter.  Gnus will call the function
1908 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1909 following @samp{%u}.  The function will be passed a single dummy
1910 parameter as argument.  The function should return a string, which will
1911 be inserted into the buffer just like information from any other
1912 specifier.
1913 @end table
1914
1915 @cindex *
1916 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1917 if no info is available---for instance, if it is a non-activated foreign
1918 group, or a bogus native group.
1919
1920
1921 @node Group Mode Line Specification
1922 @subsection Group Mode Line Specification
1923 @cindex group mode line
1924
1925 @vindex gnus-group-mode-line-format
1926 The mode line can be changed by setting
1927 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1928 doesn't understand that many format specifiers:
1929
1930 @table @samp
1931 @item S
1932 The native news server.
1933 @item M
1934 The native select method.
1935 @end table
1936
1937
1938 @node Group Highlighting
1939 @subsection Group Highlighting
1940 @cindex highlighting
1941 @cindex group highlighting
1942
1943 @vindex gnus-group-highlight
1944 Highlighting in the group buffer is controlled by the
1945 @code{gnus-group-highlight} variable.  This is an alist with elements
1946 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1947 something non-@code{nil}, the @var{face} will be used on the line.
1948
1949 Here's an example value for this variable that might look nice if the
1950 background is dark:
1951
1952 @lisp
1953 (cond (window-system
1954        (setq custom-background-mode 'light)
1955        (defface my-group-face-1
1956          '((t (:foreground "Red" :bold t))) "First group face")
1957        (defface my-group-face-2
1958          '((t (:foreground "DarkSeaGreen4" :bold t)))
1959          "Second group face")
1960        (defface my-group-face-3
1961          '((t (:foreground "Green4" :bold t))) "Third group face")
1962        (defface my-group-face-4
1963          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1964        (defface my-group-face-5
1965          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1966
1967 (setq gnus-group-highlight
1968       '(((> unread 200) . my-group-face-1)
1969         ((and (< level 3) (zerop unread)) . my-group-face-2)
1970         ((< level 3) . my-group-face-3)
1971         ((zerop unread) . my-group-face-4)
1972         (t . my-group-face-5)))
1973 @end lisp
1974
1975 Also @pxref{Faces and Fonts}.
1976
1977 Variables that are dynamically bound when the forms are evaluated
1978 include:
1979
1980 @table @code
1981 @item group
1982 The group name.
1983 @item unread
1984 The number of unread articles in the group.
1985 @item method
1986 The select method.
1987 @item mailp
1988 Whether the group is a mail group.
1989 @item level
1990 The level of the group.
1991 @item score
1992 The score of the group.
1993 @item ticked
1994 The number of ticked articles in the group.
1995 @item total
1996 The total number of articles in the group.  Or rather,
1997 @var{max-number} minus @var{min-number} plus one.
1998 @item topic
1999 When using the topic minor mode, this variable is bound to the current
2000 topic being inserted.
2001 @end table
2002
2003 When the forms are @code{eval}ed, point is at the beginning of the line
2004 of the group in question, so you can use many of the normal Gnus
2005 functions for snarfing info on the group.
2006
2007 @vindex gnus-group-update-hook
2008 @findex gnus-group-highlight-line
2009 @code{gnus-group-update-hook} is called when a group line is changed.
2010 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
2011 calls @code{gnus-group-highlight-line} by default.
2012
2013
2014 @node Group Maneuvering
2015 @section Group Maneuvering
2016 @cindex group movement
2017
2018 All movement commands understand the numeric prefix and will behave as
2019 expected, hopefully.
2020
2021 @table @kbd
2022
2023 @item n
2024 @kindex n (Group)
2025 @findex gnus-group-next-unread-group
2026 Go to the next group that has unread articles
2027 (@code{gnus-group-next-unread-group}).
2028
2029 @item p
2030 @itemx DEL
2031 @kindex DEL (Group)
2032 @kindex p (Group)
2033 @findex gnus-group-prev-unread-group
2034 Go to the previous group that has unread articles
2035 (@code{gnus-group-prev-unread-group}).
2036
2037 @item N
2038 @kindex N (Group)
2039 @findex gnus-group-next-group
2040 Go to the next group (@code{gnus-group-next-group}).
2041
2042 @item P
2043 @kindex P (Group)
2044 @findex gnus-group-prev-group
2045 Go to the previous group (@code{gnus-group-prev-group}).
2046
2047 @item M-n
2048 @kindex M-n (Group)
2049 @findex gnus-group-next-unread-group-same-level
2050 Go to the next unread group on the same (or lower) level
2051 (@code{gnus-group-next-unread-group-same-level}).
2052
2053 @item M-p
2054 @kindex M-p (Group)
2055 @findex gnus-group-prev-unread-group-same-level
2056 Go to the previous unread group on the same (or lower) level
2057 (@code{gnus-group-prev-unread-group-same-level}).
2058 @end table
2059
2060 Three commands for jumping to groups:
2061
2062 @table @kbd
2063
2064 @item j
2065 @kindex j (Group)
2066 @findex gnus-group-jump-to-group
2067 Jump to a group (and make it visible if it isn't already)
2068 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2069 like living groups.
2070
2071 @item ,
2072 @kindex , (Group)
2073 @findex gnus-group-best-unread-group
2074 Jump to the unread group with the lowest level
2075 (@code{gnus-group-best-unread-group}).
2076
2077 @item .
2078 @kindex . (Group)
2079 @findex gnus-group-first-unread-group
2080 Jump to the first group with unread articles
2081 (@code{gnus-group-first-unread-group}).
2082 @end table
2083
2084 @vindex gnus-group-goto-unread
2085 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2086 commands will move to the next group, not the next unread group.  Even
2087 the commands that say they move to the next unread group.  The default
2088 is @code{t}.
2089
2090
2091 @node Selecting a Group
2092 @section Selecting a Group
2093 @cindex group selection
2094
2095 @table @kbd
2096
2097 @item SPACE
2098 @kindex SPACE (Group)
2099 @findex gnus-group-read-group
2100 Select the current group, switch to the summary buffer and display the
2101 first unread article (@code{gnus-group-read-group}).  If there are no
2102 unread articles in the group, or if you give a non-numerical prefix to
2103 this command, Gnus will offer to fetch all the old articles in this
2104 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2105 determines the number of articles Gnus will fetch.  If @var{n} is
2106 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2107 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2108
2109 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2110 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2111 - 4 2 SPC} fetches the 42 oldest ones.
2112
2113 When you are in the group (in the Summary buffer), you can type
2114 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2115 ones.
2116
2117 @item RET
2118 @kindex RET (Group)
2119 @findex gnus-group-select-group
2120 Select the current group and switch to the summary buffer
2121 (@code{gnus-group-select-group}).  Takes the same arguments as
2122 @code{gnus-group-read-group}---the only difference is that this command
2123 does not display the first unread article automatically upon group
2124 entry.
2125
2126 @item M-RET
2127 @kindex M-RET (Group)
2128 @findex gnus-group-quick-select-group
2129 This does the same as the command above, but tries to do it with the
2130 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2131 scoring/killing will be performed, there will be no highlights and no
2132 expunging.  This might be useful if you're in a real hurry and have to
2133 enter some humongous group.  If you give a 0 prefix to this command
2134 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2135 which is useful if you want to toggle threading before generating the
2136 summary buffer (@pxref{Summary Generation Commands}).
2137
2138 @item M-SPACE
2139 @kindex M-SPACE (Group)
2140 @findex gnus-group-visible-select-group
2141 This is yet one more command that does the same as the @kbd{RET}
2142 command, but this one does it without expunging and hiding dormants
2143 (@code{gnus-group-visible-select-group}).
2144
2145 @item C-M-RET
2146 @kindex C-M-RET (Group)
2147 @findex gnus-group-select-group-ephemerally
2148 Finally, this command selects the current group ephemerally without
2149 doing any processing of its contents
2150 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2151 turned off.  Everything you do in the group after selecting it in this
2152 manner will have no permanent effects.
2153
2154 @end table
2155
2156 @vindex gnus-large-newsgroup
2157 The @code{gnus-large-newsgroup} variable says what Gnus should
2158 consider to be a big group.  If it is @code{nil}, no groups are
2159 considered big.  The default value is 200.  If the group has more
2160 (unread and/or ticked) articles than this, Gnus will query the user
2161 before entering the group.  The user can then specify how many
2162 articles should be fetched from the server.  If the user specifies a
2163 negative number (@var{-n}), the @var{n} oldest articles will be
2164 fetched.  If it is positive, the @var{n} articles that have arrived
2165 most recently will be fetched.
2166
2167 @vindex gnus-large-ephemeral-newsgroup
2168 @code{gnus-large-ephemeral-newsgroup} is the same as
2169 @code{gnus-large-newsgroup}, but is only used for ephemeral
2170 newsgroups.
2171
2172 @vindex gnus-select-group-hook
2173 @vindex gnus-auto-select-first
2174 @vindex gnus-auto-select-subject
2175 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2176 automatically when entering a group with the @kbd{SPACE} command.
2177 Which article this is is controlled by the
2178 @code{gnus-auto-select-subject} variable.  Valid values for this
2179 variable is:
2180
2181 @table @code
2182
2183 @item unread
2184 Place point on the subject line of the first unread article.
2185
2186 @item first
2187 Place point on the subject line of the first article.
2188
2189 @item unseen
2190 Place point on the subject line of the first unseen article.
2191
2192 @item unseen-or-unread
2193 Place point on the subject line of the first unseen article, and if
2194 there is no such article, place point on the subject line of the first
2195 unread article.
2196
2197 @item best
2198 Place point on the subject line of the highest-scored unread article.
2199
2200 @end table
2201
2202 This variable can also be a function.  In that case, that function
2203 will be called to place point on a subject line.
2204
2205 If you want to prevent automatic selection in some group (say, in a
2206 binary group with Huge articles) you can set the
2207 @code{gnus-auto-select-first} variable to @code{nil} in
2208 @code{gnus-select-group-hook}, which is called when a group is
2209 selected.
2210
2211
2212 @node Subscription Commands
2213 @section Subscription Commands
2214 @cindex subscription
2215
2216 @table @kbd
2217
2218 @item S t
2219 @itemx u
2220 @kindex S t (Group)
2221 @kindex u (Group)
2222 @findex gnus-group-unsubscribe-current-group
2223 @c @icon{gnus-group-unsubscribe}
2224 Toggle subscription to the current group
2225 (@code{gnus-group-unsubscribe-current-group}).
2226
2227 @item S s
2228 @itemx U
2229 @kindex S s (Group)
2230 @kindex U (Group)
2231 @findex gnus-group-unsubscribe-group
2232 Prompt for a group to subscribe, and then subscribe it.  If it was
2233 subscribed already, unsubscribe it instead
2234 (@code{gnus-group-unsubscribe-group}).
2235
2236 @item S k
2237 @itemx C-k
2238 @kindex S k (Group)
2239 @kindex C-k (Group)
2240 @findex gnus-group-kill-group
2241 @c @icon{gnus-group-kill-group}
2242 Kill the current group (@code{gnus-group-kill-group}).
2243
2244 @item S y
2245 @itemx C-y
2246 @kindex S y (Group)
2247 @kindex C-y (Group)
2248 @findex gnus-group-yank-group
2249 Yank the last killed group (@code{gnus-group-yank-group}).
2250
2251 @item C-x C-t
2252 @kindex C-x C-t (Group)
2253 @findex gnus-group-transpose-groups
2254 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2255 really a subscription command, but you can use it instead of a
2256 kill-and-yank sequence sometimes.
2257
2258 @item S w
2259 @itemx C-w
2260 @kindex S w (Group)
2261 @kindex C-w (Group)
2262 @findex gnus-group-kill-region
2263 Kill all groups in the region (@code{gnus-group-kill-region}).
2264
2265 @item S z
2266 @kindex S z (Group)
2267 @findex gnus-group-kill-all-zombies
2268 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2269
2270 @item S C-k
2271 @kindex S C-k (Group)
2272 @findex gnus-group-kill-level
2273 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2274 These groups can't be yanked back after killing, so this command should
2275 be used with some caution.  The only time where this command comes in
2276 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2277 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2278 kill off all unsubscribed groups that do not have message numbers in the
2279 @file{.newsrc} file.
2280
2281 @end table
2282
2283 Also @pxref{Group Levels}.
2284
2285
2286 @node Group Data
2287 @section Group Data
2288
2289 @table @kbd
2290
2291 @item c
2292 @kindex c (Group)
2293 @findex gnus-group-catchup-current
2294 @vindex gnus-group-catchup-group-hook
2295 @c @icon{gnus-group-catchup-current}
2296 Mark all unticked articles in this group as read
2297 (@code{gnus-group-catchup-current}).
2298 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2299 the group buffer.
2300
2301 @item C
2302 @kindex C (Group)
2303 @findex gnus-group-catchup-current-all
2304 Mark all articles in this group, even the ticked ones, as read
2305 (@code{gnus-group-catchup-current-all}).
2306
2307 @item M-c
2308 @kindex M-c (Group)
2309 @findex gnus-group-clear-data
2310 Clear the data from the current group---nix out marks and the list of
2311 read articles (@code{gnus-group-clear-data}).
2312
2313 @item M-x gnus-group-clear-data-on-native-groups
2314 @kindex M-x gnus-group-clear-data-on-native-groups
2315 @findex gnus-group-clear-data-on-native-groups
2316 If you have switched from one @acronym{NNTP} server to another, all your marks
2317 and read ranges have become worthless.  You can use this command to
2318 clear out all data that you have on your native groups.  Use with
2319 caution.
2320
2321 @end table
2322
2323
2324 @node Group Levels
2325 @section Group Levels
2326 @cindex group level
2327 @cindex level
2328
2329 All groups have a level of @dfn{subscribedness}.  For instance, if a
2330 group is on level 2, it is more subscribed than a group on level 5.  You
2331 can ask Gnus to just list groups on a given level or lower
2332 (@pxref{Listing Groups}), or to just check for new articles in groups on
2333 a given level or lower (@pxref{Scanning New Messages}).
2334
2335 Remember:  The higher the level of the group, the less important it is.
2336
2337 @table @kbd
2338
2339 @item S l
2340 @kindex S l (Group)
2341 @findex gnus-group-set-current-level
2342 Set the level of the current group.  If a numeric prefix is given, the
2343 next @var{n} groups will have their levels set.  The user will be
2344 prompted for a level.
2345 @end table
2346
2347 @vindex gnus-level-killed
2348 @vindex gnus-level-zombie
2349 @vindex gnus-level-unsubscribed
2350 @vindex gnus-level-subscribed
2351 Gnus considers groups from levels 1 to
2352 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2353 @code{gnus-level-subscribed} (exclusive) and
2354 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2355 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2356 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2357 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2358 same, but zombie and killed groups have no information on what articles
2359 you have read, etc, stored.  This distinction between dead and living
2360 groups isn't done because it is nice or clever, it is done purely for
2361 reasons of efficiency.
2362
2363 It is recommended that you keep all your mail groups (if any) on quite
2364 low levels (e.g. 1 or 2).
2365
2366 Maybe the following description of the default behavior of Gnus helps to
2367 understand what these levels are all about.  By default, Gnus shows you
2368 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2369 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2370 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2371 groups are hidden, in a way.
2372
2373 Zombie and killed groups are similar to unsubscribed groups in that they
2374 are hidden by default.  But they are different from subscribed and
2375 unsubscribed groups in that Gnus doesn't ask the news server for
2376 information (number of messages, number of unread messages) on zombie
2377 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2378 aren't interested in.  If most groups are killed, Gnus is faster.
2379
2380 Why does Gnus distinguish between zombie and killed groups?  Well, when
2381 a new group arrives on the server, Gnus by default makes it a zombie
2382 group.  This means that you are normally not bothered with new groups,
2383 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2384 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2385 list of killed groups.)
2386
2387 If you want to play with the level variables, you should show some care.
2388 Set them once, and don't touch them ever again.  Better yet, don't touch
2389 them at all unless you know exactly what you're doing.
2390
2391 @vindex gnus-level-default-unsubscribed
2392 @vindex gnus-level-default-subscribed
2393 Two closely related variables are @code{gnus-level-default-subscribed}
2394 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2395 which are the levels that new groups will be put on if they are
2396 (un)subscribed.  These two variables should, of course, be inside the
2397 relevant valid ranges.
2398
2399 @vindex gnus-keep-same-level
2400 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2401 will only move to groups of the same level (or lower).  In
2402 particular, going from the last article in one group to the next group
2403 will go to the next group of the same level (or lower).  This might be
2404 handy if you want to read the most important groups before you read the
2405 rest.
2406
2407 If this variable is @code{best}, Gnus will make the next newsgroup the
2408 one with the best level.
2409
2410 @vindex gnus-group-default-list-level
2411 All groups with a level less than or equal to
2412 @code{gnus-group-default-list-level} will be listed in the group buffer
2413 by default.
2414
2415 @vindex gnus-group-list-inactive-groups
2416 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2417 groups will be listed along with the unread groups.  This variable is
2418 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2419 listed.
2420
2421 @vindex gnus-group-use-permanent-levels
2422 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2423 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2424 use this level as the ``work'' level.
2425
2426 @vindex gnus-activate-level
2427 Gnus will normally just activate (i. e., query the server about) groups
2428 on level @code{gnus-activate-level} or less.  If you don't want to
2429 activate unsubscribed groups, for instance, you might set this variable
2430 to 5.  The default is 6.
2431
2432
2433 @node Group Score
2434 @section Group Score
2435 @cindex group score
2436 @cindex group rank
2437 @cindex rank
2438
2439 You would normally keep important groups on high levels, but that scheme
2440 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2441 group buffer according to how often you read groups, perhaps?  Within
2442 reason?
2443
2444 This is what @dfn{group score} is for.  You can have Gnus assign a score
2445 to each group through the mechanism described below.  You can then sort
2446 the group buffer based on this score.  Alternatively, you can sort on
2447 score and then level.  (Taken together, the level and the score is
2448 called the @dfn{rank} of the group.  A group that is on level 4 and has
2449 a score of 1 has a higher rank than a group on level 5 that has a score
2450 of 300.  (The level is the most significant part and the score is the
2451 least significant part.))
2452
2453 @findex gnus-summary-bubble-group
2454 If you want groups you read often to get higher scores than groups you
2455 read seldom you can add the @code{gnus-summary-bubble-group} function to
2456 the @code{gnus-summary-exit-hook} hook.  This will result (after
2457 sorting) in a bubbling sort of action.  If you want to see that in
2458 action after each summary exit, you can add
2459 @code{gnus-group-sort-groups-by-rank} or
2460 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2461 slow things down somewhat.
2462
2463
2464 @node Marking Groups
2465 @section Marking Groups
2466 @cindex marking groups
2467
2468 If you want to perform some command on several groups, and they appear
2469 subsequently in the group buffer, you would normally just give a
2470 numerical prefix to the command.  Most group commands will then do your
2471 bidding on those groups.
2472
2473 However, if the groups are not in sequential order, you can still
2474 perform a command on several groups.  You simply mark the groups first
2475 with the process mark and then execute the command.
2476
2477 @table @kbd
2478
2479 @item #
2480 @kindex # (Group)
2481 @itemx M m
2482 @kindex M m (Group)
2483 @findex gnus-group-mark-group
2484 Set the mark on the current group (@code{gnus-group-mark-group}).
2485
2486 @item M-#
2487 @kindex M-# (Group)
2488 @itemx M u
2489 @kindex M u (Group)
2490 @findex gnus-group-unmark-group
2491 Remove the mark from the current group
2492 (@code{gnus-group-unmark-group}).
2493
2494 @item M U
2495 @kindex M U (Group)
2496 @findex gnus-group-unmark-all-groups
2497 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2498
2499 @item M w
2500 @kindex M w (Group)
2501 @findex gnus-group-mark-region
2502 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2503
2504 @item M b
2505 @kindex M b (Group)
2506 @findex gnus-group-mark-buffer
2507 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2508
2509 @item M r
2510 @kindex M r (Group)
2511 @findex gnus-group-mark-regexp
2512 Mark all groups that match some regular expression
2513 (@code{gnus-group-mark-regexp}).
2514 @end table
2515
2516 Also @pxref{Process/Prefix}.
2517
2518 @findex gnus-group-universal-argument
2519 If you want to execute some command on all groups that have been marked
2520 with the process mark, you can use the @kbd{M-&}
2521 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2522 the command to be executed.
2523
2524
2525 @node Foreign Groups
2526 @section Foreign Groups
2527 @cindex foreign groups
2528
2529 Below are some group mode commands for making and editing general foreign
2530 groups, as well as commands to ease the creation of a few
2531 special-purpose groups.  All these commands insert the newly created
2532 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2533 consulted.
2534
2535 @table @kbd
2536
2537 @item G m
2538 @kindex G m (Group)
2539 @findex gnus-group-make-group
2540 @cindex making groups
2541 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2542 for a name, a method and possibly an @dfn{address}.  For an easier way
2543 to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}).
2544
2545 @item G M
2546 @kindex G M (Group)
2547 @findex gnus-group-read-ephemeral-group
2548 Make an ephemeral group (@code{gnus-group-read-ephemeral-group}).  Gnus
2549 will prompt you for a name, a method and an @dfn{address}.
2550
2551 @item G r
2552 @kindex G r (Group)
2553 @findex gnus-group-rename-group
2554 @cindex renaming groups
2555 Rename the current group to something else
2556 (@code{gnus-group-rename-group}).  This is valid only on some
2557 groups---mail groups mostly.  This command might very well be quite slow
2558 on some back ends.
2559
2560 @item G c
2561 @kindex G c (Group)
2562 @cindex customizing
2563 @findex gnus-group-customize
2564 Customize the group parameters (@code{gnus-group-customize}).
2565
2566 @item G e
2567 @kindex G e (Group)
2568 @findex gnus-group-edit-group-method
2569 @cindex renaming groups
2570 Enter a buffer where you can edit the select method of the current
2571 group (@code{gnus-group-edit-group-method}).
2572
2573 @item G p
2574 @kindex G p (Group)
2575 @findex gnus-group-edit-group-parameters
2576 Enter a buffer where you can edit the group parameters
2577 (@code{gnus-group-edit-group-parameters}).
2578
2579 @item G E
2580 @kindex G E (Group)
2581 @findex gnus-group-edit-group
2582 Enter a buffer where you can edit the group info
2583 (@code{gnus-group-edit-group}).
2584
2585 @item G d
2586 @kindex G d (Group)
2587 @findex gnus-group-make-directory-group
2588 @cindex nndir
2589 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2590 for a directory name (@code{gnus-group-make-directory-group}).
2591
2592 @item G h
2593 @kindex G h (Group)
2594 @cindex help group
2595 @findex gnus-group-make-help-group
2596 Make the Gnus help group (@code{gnus-group-make-help-group}).
2597
2598 @item G a
2599 @kindex G a (Group)
2600 @cindex (ding) archive
2601 @cindex archive group
2602 @findex gnus-group-make-archive-group
2603 @vindex gnus-group-archive-directory
2604 @vindex gnus-group-recent-archive-directory
2605 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
2606 default a group pointing to the most recent articles will be created
2607 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2608 group will be created from @code{gnus-group-archive-directory}.
2609
2610 @item G k
2611 @kindex G k (Group)
2612 @findex gnus-group-make-kiboze-group
2613 @cindex nnkiboze
2614 Make a kiboze group.  You will be prompted for a name, for a regexp to
2615 match groups to be ``included'' in the kiboze group, and a series of
2616 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2617 @xref{Kibozed Groups}.
2618
2619 @item G D
2620 @kindex G D (Group)
2621 @findex gnus-group-enter-directory
2622 @cindex nneething
2623 Read an arbitrary directory as if it were a newsgroup with the
2624 @code{nneething} back end (@code{gnus-group-enter-directory}).
2625 @xref{Anything Groups}.
2626
2627 @item G f
2628 @kindex G f (Group)
2629 @findex gnus-group-make-doc-group
2630 @cindex ClariNet Briefs
2631 @cindex nndoc
2632 Make a group based on some file or other
2633 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2634 command, you will be prompted for a file name and a file type.
2635 Currently supported types are @code{mbox}, @code{babyl},
2636 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2637 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2638 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2639 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2640 you run this command without a prefix, Gnus will guess at the file
2641 type.  @xref{Document Groups}.
2642
2643 @item G u
2644 @kindex G u (Group)
2645 @vindex gnus-useful-groups
2646 @findex gnus-group-make-useful-group
2647 Create one of the groups mentioned in @code{gnus-useful-groups}
2648 (@code{gnus-group-make-useful-group}).
2649
2650 @item G w
2651 @kindex G w (Group)
2652 @findex gnus-group-make-web-group
2653 @cindex Google
2654 @cindex nnweb
2655 @cindex gmane
2656 Make an ephemeral group based on a web search
2657 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2658 command, make a solid group instead.  You will be prompted for the
2659 search engine type and the search string.  Valid search engine types
2660 include @code{google}, @code{dejanews}, and @code{gmane}.
2661 @xref{Web Searches}.
2662
2663 If you use the @code{google} search engine, you can limit the search
2664 to a particular group by using a match string like
2665 @samp{shaving group:alt.sysadmin.recovery}.
2666
2667 @item G R
2668 @kindex G R (Group)
2669 @findex gnus-group-make-rss-group
2670 Make a group based on an @acronym{RSS} feed
2671 (@code{gnus-group-make-rss-group}).  You will be prompted for an URL.
2672 @xref{RSS}.
2673
2674 @item G DEL
2675 @kindex G DEL (Group)
2676 @findex gnus-group-delete-group
2677 This function will delete the current group
2678 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2679 actually delete all the articles in the group, and forcibly remove the
2680 group itself from the face of the Earth.  Use a prefix only if you are
2681 absolutely sure of what you are doing.  This command can't be used on
2682 read-only groups (like @code{nntp} groups), though.
2683
2684 @item G V
2685 @kindex G V (Group)
2686 @findex gnus-group-make-empty-virtual
2687 Make a new, fresh, empty @code{nnvirtual} group
2688 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2689
2690 @item G v
2691 @kindex G v (Group)
2692 @findex gnus-group-add-to-virtual
2693 Add the current group to an @code{nnvirtual} group
2694 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2695 @end table
2696
2697 @xref{Select Methods}, for more information on the various select
2698 methods.
2699
2700 @vindex gnus-activate-foreign-newsgroups
2701 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2702 Gnus will check all foreign groups with this level or lower at startup.
2703 This might take quite a while, especially if you subscribe to lots of
2704 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2705 @code{gnus-activate-level} also affects activation of foreign
2706 newsgroups.
2707
2708
2709 @node Group Parameters
2710 @section Group Parameters
2711 @cindex group parameters
2712
2713 The group parameters store information local to a particular group.
2714 Here's an example group parameter list:
2715
2716 @example
2717 ((to-address . "ding@@gnus.org")
2718  (auto-expire . t))
2719 @end example
2720
2721 We see that each element consists of a ``dotted pair''---the thing before
2722 the dot is the key, while the thing after the dot is the value.  All the
2723 parameters have this form @emph{except} local variable specs, which are
2724 not dotted pairs, but proper lists.
2725
2726 Some parameters have correspondent customizable variables, each of which
2727 is an alist of regexps and values.
2728
2729 The following group parameters can be used:
2730
2731 @table @code
2732 @item to-address
2733 @cindex to-address
2734 Address used by when doing followups and new posts.
2735
2736 @example
2737 (to-address . "some@@where.com")
2738 @end example
2739
2740 This is primarily useful in mail groups that represent closed mailing
2741 lists---mailing lists where it's expected that everybody that writes to
2742 the mailing list is subscribed to it.  Since using this parameter
2743 ensures that the mail only goes to the mailing list itself, it means
2744 that members won't receive two copies of your followups.
2745
2746 Using @code{to-address} will actually work whether the group is foreign
2747 or not.  Let's say there's a group on the server that is called
2748 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2749 the articles from a mail-to-news gateway.  Posting directly to this
2750 group is therefore impossible---you have to send mail to the mailing
2751 list address instead.
2752
2753 See also @code{gnus-parameter-to-address-alist}.
2754
2755 @item to-list
2756 @cindex to-list
2757 Address used when doing @kbd{a} in that group.
2758
2759 @example
2760 (to-list . "some@@where.com")
2761 @end example
2762
2763 It is totally ignored
2764 when doing a followup---except that if it is present in a news group,
2765 you'll get mail group semantics when doing @kbd{f}.
2766
2767 If you do an @kbd{a} command in a mail group and you have neither a
2768 @code{to-list} group parameter nor a @code{to-address} group parameter,
2769 then a @code{to-list} group parameter will be added automatically upon
2770 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2771 @vindex gnus-add-to-list
2772
2773 @findex gnus-mailing-list-mode
2774 @cindex mail list groups
2775 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2776 entering summary buffer.
2777
2778 See also @code{gnus-parameter-to-list-alist}.
2779
2780 @anchor{subscribed}
2781 @item subscribed
2782 @cindex subscribed
2783 @cindex Mail-Followup-To
2784 @findex gnus-find-subscribed-addresses
2785 If this parameter is set to @code{t}, Gnus will consider the
2786 to-address and to-list parameters for this group as addresses of
2787 mailing lists you are subscribed to.  Giving Gnus this information is
2788 (only) a first step in getting it to generate correct Mail-Followup-To
2789 headers for your posts to these lists.  The second step is to put the
2790 following in your @file{.gnus.el}
2791
2792 @lisp
2793 (setq message-subscribed-address-functions
2794       '(gnus-find-subscribed-addresses))
2795 @end lisp
2796
2797 @xref{Mailing Lists, ,Mailing Lists, message, The Message Manual}, for
2798 a complete treatment of available MFT support.
2799
2800 @item visible
2801 @cindex visible
2802 If the group parameter list has the element @code{(visible . t)},
2803 that group will always be visible in the Group buffer, regardless
2804 of whether it has any unread articles.
2805
2806 @item broken-reply-to
2807 @cindex broken-reply-to
2808 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2809 headers in this group are to be ignored, and for the header to be hidden
2810 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2811 can be useful if you're reading a mailing list group where the listserv
2812 has inserted @code{Reply-To} headers that point back to the listserv
2813 itself.  That is broken behavior.  So there!
2814
2815 @item to-group
2816 @cindex to-group
2817 Elements like @code{(to-group . "some.group.name")} means that all
2818 posts in that group will be sent to @code{some.group.name}.
2819
2820 @item newsgroup
2821 @cindex newsgroup
2822 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2823 will treat all responses as if they were responses to news articles.
2824 This can be useful if you have a mail group that's really a mirror of a
2825 news group.
2826
2827 @item gcc-self
2828 @cindex gcc-self
2829 If @code{(gcc-self . t)} is present in the group parameter list, newly
2830 composed messages will be @code{Gcc}'d to the current group.  If
2831 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2832 generated, if @code{(gcc-self . "string")} is present, this string will
2833 be inserted literally as a @code{gcc} header.  This parameter takes
2834 precedence over any default @code{Gcc} rules as described later
2835 (@pxref{Archived Messages}).
2836
2837 @strong{Caveat}: Adding @code{(gcc-self . t)} to the parameter list of
2838 @code{nntp} groups (or the like) isn't valid.  An @code{nntp} server
2839 doesn't accept articles.
2840
2841 @item auto-expire
2842 @cindex auto-expire
2843 If the group parameter has an element that looks like @code{(auto-expire
2844 . t)}, all articles read will be marked as expirable.  For an
2845 alternative approach, @pxref{Expiring Mail}.
2846
2847 See also @code{gnus-auto-expirable-newsgroups}.
2848
2849 @item total-expire
2850 @cindex total-expire
2851 If the group parameter has an element that looks like
2852 @code{(total-expire . t)}, all read articles will be put through the
2853 expiry process, even if they are not marked as expirable.  Use with
2854 caution.  Unread, ticked and dormant articles are not eligible for
2855 expiry.
2856
2857 See also @code{gnus-total-expirable-newsgroups}.
2858
2859 @item expiry-wait
2860 @cindex expiry-wait
2861 @vindex nnmail-expiry-wait-function
2862 If the group parameter has an element that looks like
2863 @code{(expiry-wait . 10)}, this value will override any
2864 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2865 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2866 can either be a number of days (not necessarily an integer) or the
2867 symbols @code{never} or @code{immediate}.
2868
2869 @item expiry-target
2870 @cindex expiry-target
2871 Where expired messages end up.  This parameter overrides
2872 @code{nnmail-expiry-target}.
2873
2874 @item score-file
2875 @cindex score file group parameter
2876 Elements that look like @code{(score-file . "file")} will make
2877 @file{file} into the current score file for the group in question.  All
2878 interactive score entries will be put into this file.
2879
2880 @item adapt-file
2881 @cindex adapt file group parameter
2882 Elements that look like @code{(adapt-file . "file")} will make
2883 @file{file} into the current adaptive file for the group in question.
2884 All adaptive score entries will be put into this file.
2885
2886 @item admin-address
2887 @cindex admin-address
2888 When unsubscribing from a mailing list you should never send the
2889 unsubscription notice to the mailing list itself.  Instead, you'd send
2890 messages to the administrative address.  This parameter allows you to
2891 put the admin address somewhere convenient.
2892
2893 @item display
2894 @cindex display
2895 Elements that look like @code{(display . MODE)} say which articles to
2896 display on entering the group.  Valid values are:
2897
2898 @table @code
2899 @item all
2900 Display all articles, both read and unread.
2901
2902 @item an integer
2903 Display the last @var{integer} articles in the group.  This is the same as
2904 entering the group with @kbd{C-u @var{integer}}.
2905
2906 @item default
2907 Display the default visible articles, which normally includes unread and
2908 ticked articles.
2909
2910 @item an array
2911 Display articles that satisfy a predicate.
2912
2913 Here are some examples:
2914
2915 @table @code
2916 @item [unread]
2917 Display only unread articles.
2918
2919 @item [not expire]
2920 Display everything except expirable articles.
2921
2922 @item [and (not reply) (not expire)]
2923 Display everything except expirable and articles you've already
2924 responded to.
2925 @end table
2926
2927 The available operators are @code{not}, @code{and} and @code{or}.
2928 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2929 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2930 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2931 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2932
2933 @end table
2934
2935 The @code{display} parameter works by limiting the summary buffer to
2936 the subset specified.  You can pop the limit by using the @kbd{/ w}
2937 command (@pxref{Limiting}).
2938
2939 @item comment
2940 @cindex comment
2941 Elements that look like @code{(comment . "This is a comment")} are
2942 arbitrary comments on the group.  You can display comments in the
2943 group line (@pxref{Group Line Specification}).
2944
2945 @item charset
2946 @cindex charset
2947 Elements that look like @code{(charset . iso-8859-1)} will make
2948 @code{iso-8859-1} the default charset; that is, the charset that will be
2949 used for all articles that do not specify a charset.
2950
2951 See also @code{gnus-group-charset-alist}.
2952
2953 @item ignored-charsets
2954 @cindex ignored-charset
2955 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2956 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2957 default charset will be used for decoding articles.
2958
2959 See also @code{gnus-group-ignored-charsets-alist}.
2960
2961 @item posting-style
2962 @cindex posting-style
2963 You can store additional posting style information for this group
2964 here (@pxref{Posting Styles}).  The format is that of an entry in the
2965 @code{gnus-posting-styles} alist, except that there's no regexp matching
2966 the group name (of course).  Style elements in this group parameter will
2967 take precedence over the ones found in @code{gnus-posting-styles}.
2968
2969 For instance, if you want a funky name and signature in this group only,
2970 instead of hacking @code{gnus-posting-styles}, you could put something
2971 like this in the group parameters:
2972
2973 @example
2974 (posting-style
2975   (name "Funky Name")
2976   ("X-My-Header" "Funky Value")
2977   (signature "Funky Signature"))
2978 @end example
2979
2980 @item post-method
2981 @cindex post-method
2982 If it is set, the value is used as the method for posting message
2983 instead of @code{gnus-post-method}.
2984
2985 @item banner
2986 @cindex banner
2987 An item like @code{(banner . @var{regexp})} causes any part of an article
2988 that matches the regular expression @var{regexp} to be stripped.  Instead of
2989 @var{regexp}, you can also use the symbol @code{signature} which strips the
2990 last signature or any of the elements of the alist
2991 @code{gnus-article-banner-alist}.
2992
2993 @item sieve
2994 @cindex sieve
2995 This parameter contains a Sieve test that should match incoming mail
2996 that should be placed in this group.  From this group parameter, a
2997 Sieve @samp{IF} control structure is generated, having the test as the
2998 condition and @samp{fileinto "group.name";} as the body.
2999
3000 For example, if the @samp{INBOX.list.sieve} group has the @code{(sieve
3001 address "sender" "sieve-admin@@extundo.com")} group parameter, when
3002 translating the group parameter into a Sieve script (@pxref{Sieve
3003 Commands}) the following Sieve code is generated:
3004
3005 @example
3006 if address \"sender\" \"sieve-admin@@extundo.com\" @{
3007         fileinto \"INBOX.list.sieve\";
3008 @}
3009 @end example
3010
3011 The Sieve language is described in RFC 3028.  @xref{Top, Emacs Sieve,
3012 Top, sieve, Emacs Sieve}.
3013
3014 @item (agent parameters)
3015 If the agent has been enabled, you can set any of the its parameters
3016 to control the behavior of the agent in individual groups. See Agent
3017 Parameters in @ref{Category Syntax}.  Most users will choose to set
3018 agent parameters in either an agent category or group topic to
3019 minimize the configuration effort.
3020
3021 @item (@var{variable} @var{form})
3022 You can use the group parameters to set variables local to the group you
3023 are entering.  If you want to turn threading off in @samp{news.answers},
3024 you could put @code{(gnus-show-threads nil)} in the group parameters of
3025 that group.  @code{gnus-show-threads} will be made into a local variable
3026 in the summary buffer you enter, and the form @code{nil} will be
3027 @code{eval}ed there.
3028
3029 Note that this feature sets the variable locally to the summary buffer.
3030 But some variables are evaluated in the article buffer, or in the
3031 message buffer (of a reply or followup or otherwise newly created
3032 message).  As a workaround, it might help to add the variable in
3033 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
3034 Stuff}.  So if you want to set @code{message-from-style} via the group
3035 parameters, then you may need the following statement elsewhere in your
3036 @file{~/.gnus} file:
3037
3038 @lisp
3039 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
3040 @end lisp
3041
3042 @vindex gnus-list-identifiers
3043 A use for this feature is to remove a mailing list identifier tag in
3044 the subject fields of articles.  E.g. if the news group
3045
3046 @example
3047 nntp+news.gnus.org:gmane.text.docbook.apps
3048 @end example
3049
3050 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
3051 tag can be removed from the article subjects in the summary buffer for
3052 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
3053 into the group parameters for the group.
3054
3055 This can also be used as a group-specific hook function, if you'd like.
3056 If you want to hear a beep when you enter a group, you could put
3057 something like @code{(dummy-variable (ding))} in the parameters of that
3058 group.  @code{dummy-variable} will be set to the result of the
3059 @code{(ding)} form, but who cares?
3060
3061 @end table
3062
3063 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
3064 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
3065 presents you with a Customize-like interface.  The latter helps avoid
3066 silly Lisp errors.)  You might also be interested in reading about topic
3067 parameters (@pxref{Topic Parameters}).
3068
3069 @vindex gnus-parameters
3070 Group parameters can be set via the @code{gnus-parameters} variable too.
3071 But some variables, such as @code{visible}, have no effect.  For
3072 example:
3073
3074 @lisp
3075 (setq gnus-parameters
3076       '(("mail\\..*"
3077          (gnus-show-threads nil)
3078          (gnus-use-scoring nil)
3079          (gnus-summary-line-format
3080           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3081          (gcc-self . t)
3082          (display . all))
3083
3084         ("^nnimap:\\(foo.bar\\)$"
3085          (to-group . "\\1"))
3086
3087         ("mail\\.me"
3088          (gnus-use-scoring  t))
3089
3090         ("list\\..*"
3091          (total-expire . t)
3092          (broken-reply-to . t))))
3093 @end lisp
3094
3095 String value of parameters will be subjected to regexp substitution, as
3096 the @code{to-group} example shows.
3097
3098
3099 @node Listing Groups
3100 @section Listing Groups
3101 @cindex group listing
3102
3103 These commands all list various slices of the groups available.
3104
3105 @table @kbd
3106
3107 @item l
3108 @itemx A s
3109 @kindex A s (Group)
3110 @kindex l (Group)
3111 @findex gnus-group-list-groups
3112 List all groups that have unread articles
3113 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3114 command will list only groups of level ARG and lower.  By default, it
3115 only lists groups of level five (i.e.,
3116 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3117 groups).
3118
3119 @item L
3120 @itemx A u
3121 @kindex A u (Group)
3122 @kindex L (Group)
3123 @findex gnus-group-list-all-groups
3124 List all groups, whether they have unread articles or not
3125 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3126 this command will list only groups of level ARG and lower.  By default,
3127 it lists groups of level seven or lower (i.e., just subscribed and
3128 unsubscribed groups).
3129
3130 @item A l
3131 @kindex A l (Group)
3132 @findex gnus-group-list-level
3133 List all unread groups on a specific level
3134 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3135 with no unread articles.
3136
3137 @item A k
3138 @kindex A k (Group)
3139 @findex gnus-group-list-killed
3140 List all killed groups (@code{gnus-group-list-killed}).  If given a
3141 prefix argument, really list all groups that are available, but aren't
3142 currently (un)subscribed.  This could entail reading the active file
3143 from the server.
3144
3145 @item A z
3146 @kindex A z (Group)
3147 @findex gnus-group-list-zombies
3148 List all zombie groups (@code{gnus-group-list-zombies}).
3149
3150 @item A m
3151 @kindex A m (Group)
3152 @findex gnus-group-list-matching
3153 List all unread, subscribed groups with names that match a regexp
3154 (@code{gnus-group-list-matching}).
3155
3156 @item A M
3157 @kindex A M (Group)
3158 @findex gnus-group-list-all-matching
3159 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3160
3161 @item A A
3162 @kindex A A (Group)
3163 @findex gnus-group-list-active
3164 List absolutely all groups in the active file(s) of the
3165 server(s) you are connected to (@code{gnus-group-list-active}).  This
3166 might very well take quite a while.  It might actually be a better idea
3167 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3168 thing to match on.  Also note that this command may list groups that
3169 don't exist (yet)---these will be listed as if they were killed groups.
3170 Take the output with some grains of salt.
3171
3172 @item A a
3173 @kindex A a (Group)
3174 @findex gnus-group-apropos
3175 List all groups that have names that match a regexp
3176 (@code{gnus-group-apropos}).
3177
3178 @item A d
3179 @kindex A d (Group)
3180 @findex gnus-group-description-apropos
3181 List all groups that have names or descriptions that match a regexp
3182 (@code{gnus-group-description-apropos}).
3183
3184 @item A c
3185 @kindex A c (Group)
3186 @findex gnus-group-list-cached
3187 List all groups with cached articles (@code{gnus-group-list-cached}).
3188
3189 @item A ?
3190 @kindex A ? (Group)
3191 @findex gnus-group-list-dormant
3192 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3193
3194 @item A /
3195 @kindex A / (Group)
3196 @findex gnus-group-list-limit
3197 List groups limited within the current selection
3198 (@code{gnus-group-list-limit}).
3199
3200 @item A f
3201 @kindex A f (Group)
3202 @findex gnus-group-list-flush
3203 Flush groups from the current selection (@code{gnus-group-list-flush}).
3204
3205 @item A p
3206 @kindex A p (Group)
3207 @findex gnus-group-list-plus
3208 List groups plus the current selection (@code{gnus-group-list-plus}).
3209
3210 @end table
3211
3212 @vindex gnus-permanently-visible-groups
3213 @cindex visible group parameter
3214 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3215 always be shown, whether they have unread articles or not.  You can also
3216 add the @code{visible} element to the group parameters in question to
3217 get the same effect.
3218
3219 @vindex gnus-list-groups-with-ticked-articles
3220 Groups that have just ticked articles in it are normally listed in the
3221 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3222 @code{nil}, these groups will be treated just like totally empty
3223 groups.  It is @code{t} by default.
3224
3225
3226 @node Sorting Groups
3227 @section Sorting Groups
3228 @cindex sorting groups
3229
3230 @kindex C-c C-s (Group)
3231 @findex gnus-group-sort-groups
3232 @vindex gnus-group-sort-function
3233 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3234 group buffer according to the function(s) given by the
3235 @code{gnus-group-sort-function} variable.  Available sorting functions
3236 include:
3237
3238 @table @code
3239
3240 @item gnus-group-sort-by-alphabet
3241 @findex gnus-group-sort-by-alphabet
3242 Sort the group names alphabetically.  This is the default.
3243
3244 @item gnus-group-sort-by-real-name
3245 @findex gnus-group-sort-by-real-name
3246 Sort the group alphabetically on the real (unprefixed) group names.
3247
3248 @item gnus-group-sort-by-level
3249 @findex gnus-group-sort-by-level
3250 Sort by group level.
3251
3252 @item gnus-group-sort-by-score
3253 @findex gnus-group-sort-by-score
3254 Sort by group score.  @xref{Group Score}.
3255
3256 @item gnus-group-sort-by-rank
3257 @findex gnus-group-sort-by-rank
3258 Sort by group score and then the group level.  The level and the score
3259 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3260
3261 @item gnus-group-sort-by-unread
3262 @findex gnus-group-sort-by-unread
3263 Sort by number of unread articles.
3264
3265 @item gnus-group-sort-by-method
3266 @findex gnus-group-sort-by-method
3267 Sort alphabetically on the select method.
3268
3269 @item gnus-group-sort-by-server
3270 @findex gnus-group-sort-by-server
3271 Sort alphabetically on the Gnus server name.
3272
3273
3274 @end table
3275
3276 @code{gnus-group-sort-function} can also be a list of sorting
3277 functions.  In that case, the most significant sort key function must be
3278 the last one.
3279
3280
3281 There are also a number of commands for sorting directly according to
3282 some sorting criteria:
3283
3284 @table @kbd
3285 @item G S a
3286 @kindex G S a (Group)
3287 @findex gnus-group-sort-groups-by-alphabet
3288 Sort the group buffer alphabetically by group name
3289 (@code{gnus-group-sort-groups-by-alphabet}).
3290
3291 @item G S u
3292 @kindex G S u (Group)
3293 @findex gnus-group-sort-groups-by-unread
3294 Sort the group buffer by the number of unread articles
3295 (@code{gnus-group-sort-groups-by-unread}).
3296
3297 @item G S l
3298 @kindex G S l (Group)
3299 @findex gnus-group-sort-groups-by-level
3300 Sort the group buffer by group level
3301 (@code{gnus-group-sort-groups-by-level}).
3302
3303 @item G S v
3304 @kindex G S v (Group)
3305 @findex gnus-group-sort-groups-by-score
3306 Sort the group buffer by group score
3307 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3308
3309 @item G S r
3310 @kindex G S r (Group)
3311 @findex gnus-group-sort-groups-by-rank
3312 Sort the group buffer by group rank
3313 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3314
3315 @item G S m
3316 @kindex G S m (Group)
3317 @findex gnus-group-sort-groups-by-method
3318 Sort the group buffer alphabetically by back end name@*
3319 (@code{gnus-group-sort-groups-by-method}).
3320
3321 @item G S n
3322 @kindex G S n (Group)
3323 @findex gnus-group-sort-groups-by-real-name
3324 Sort the group buffer alphabetically by real (unprefixed) group name
3325 (@code{gnus-group-sort-groups-by-real-name}).
3326
3327 @end table
3328
3329 All the commands below obey the process/prefix convention
3330 (@pxref{Process/Prefix}).
3331
3332 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3333 commands will sort in reverse order.
3334
3335 You can also sort a subset of the groups:
3336
3337 @table @kbd
3338 @item G P a
3339 @kindex G P a (Group)
3340 @findex gnus-group-sort-selected-groups-by-alphabet
3341 Sort the groups alphabetically by group name
3342 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3343
3344 @item G P u
3345 @kindex G P u (Group)
3346 @findex gnus-group-sort-selected-groups-by-unread
3347 Sort the groups by the number of unread articles
3348 (@code{gnus-group-sort-selected-groups-by-unread}).
3349
3350 @item G P l
3351 @kindex G P l (Group)
3352 @findex gnus-group-sort-selected-groups-by-level
3353 Sort the groups by group level
3354 (@code{gnus-group-sort-selected-groups-by-level}).
3355
3356 @item G P v
3357 @kindex G P v (Group)
3358 @findex gnus-group-sort-selected-groups-by-score
3359 Sort the groups by group score
3360 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3361
3362 @item G P r
3363 @kindex G P r (Group)
3364 @findex gnus-group-sort-selected-groups-by-rank
3365 Sort the groups by group rank
3366 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3367
3368 @item G P m
3369 @kindex G P m (Group)
3370 @findex gnus-group-sort-selected-groups-by-method
3371 Sort the groups alphabetically by back end name@*
3372 (@code{gnus-group-sort-selected-groups-by-method}).
3373
3374 @item G P n
3375 @kindex G P n (Group)
3376 @findex gnus-group-sort-selected-groups-by-real-name
3377 Sort the groups alphabetically by real (unprefixed) group name
3378 (@code{gnus-group-sort-selected-groups-by-real-name}).
3379
3380 @item G P s
3381 @kindex G P s (Group)
3382 @findex gnus-group-sort-selected-groups
3383 Sort the groups according to @code{gnus-group-sort-function}.
3384
3385 @end table
3386
3387 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3388 move groups around.
3389
3390
3391 @node Group Maintenance
3392 @section Group Maintenance
3393 @cindex bogus groups
3394
3395 @table @kbd
3396 @item b
3397 @kindex b (Group)
3398 @findex gnus-group-check-bogus-groups
3399 Find bogus groups and delete them
3400 (@code{gnus-group-check-bogus-groups}).
3401
3402 @item F
3403 @kindex F (Group)
3404 @findex gnus-group-find-new-groups
3405 Find new groups and process them (@code{gnus-group-find-new-groups}).
3406 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3407 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3408 to query the server for new groups, and subscribe the new groups as
3409 zombies.
3410
3411 @item C-c C-x
3412 @kindex C-c C-x (Group)
3413 @findex gnus-group-expire-articles
3414 Run all expirable articles in the current group through the expiry
3415 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3416 all expirable articles in the group that have been around for a while.
3417 (@pxref{Expiring Mail}).
3418
3419 @item C-c C-M-x
3420 @kindex C-c C-M-x (Group)
3421 @findex gnus-group-expire-all-groups
3422 Run all expirable articles in all groups through the expiry process
3423 (@code{gnus-group-expire-all-groups}).
3424
3425 @end table
3426
3427
3428 @node Browse Foreign Server
3429 @section Browse Foreign Server
3430 @cindex foreign servers
3431 @cindex browsing servers
3432
3433 @table @kbd
3434 @item B
3435 @kindex B (Group)
3436 @findex gnus-group-browse-foreign-server
3437 You will be queried for a select method and a server name.  Gnus will
3438 then attempt to contact this server and let you browse the groups there
3439 (@code{gnus-group-browse-foreign-server}).
3440 @end table
3441
3442 @findex gnus-browse-mode
3443 A new buffer with a list of available groups will appear.  This buffer
3444 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3445 a lot) like a normal group buffer.
3446
3447 Here's a list of keystrokes available in the browse mode:
3448
3449 @table @kbd
3450 @item n
3451 @kindex n (Browse)
3452 @findex gnus-group-next-group
3453 Go to the next group (@code{gnus-group-next-group}).
3454
3455 @item p
3456 @kindex p (Browse)
3457 @findex gnus-group-prev-group
3458 Go to the previous group (@code{gnus-group-prev-group}).
3459
3460 @item SPACE
3461 @kindex SPACE (Browse)
3462 @findex gnus-browse-read-group
3463 Enter the current group and display the first article
3464 (@code{gnus-browse-read-group}).
3465
3466 @item RET
3467 @kindex RET (Browse)
3468 @findex gnus-browse-select-group
3469 Enter the current group (@code{gnus-browse-select-group}).
3470
3471 @item u
3472 @kindex u (Browse)
3473 @findex gnus-browse-unsubscribe-current-group
3474 Unsubscribe to the current group, or, as will be the case here,
3475 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3476
3477 @item l
3478 @itemx q
3479 @kindex q (Browse)
3480 @kindex l (Browse)
3481 @findex gnus-browse-exit
3482 Exit browse mode (@code{gnus-browse-exit}).
3483
3484 @item d
3485 @kindex d (Browse)
3486 @findex gnus-browse-describe-group
3487 Describe the current group (@code{gnus-browse-describe-group}).
3488
3489 @item ?
3490 @kindex ? (Browse)
3491 @findex gnus-browse-describe-briefly
3492 Describe browse mode briefly (well, there's not much to describe, is
3493 there) (@code{gnus-browse-describe-briefly}).
3494 @end table
3495
3496
3497 @node Exiting Gnus
3498 @section Exiting Gnus
3499 @cindex exiting Gnus
3500
3501 Yes, Gnus is ex(c)iting.
3502
3503 @table @kbd
3504 @item z
3505 @kindex z (Group)
3506 @findex gnus-group-suspend
3507 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3508 but it kills all buffers except the Group buffer.  I'm not sure why this
3509 is a gain, but then who am I to judge?
3510
3511 @item q
3512 @kindex q (Group)
3513 @findex gnus-group-exit
3514 @c @icon{gnus-group-exit}
3515 Quit Gnus (@code{gnus-group-exit}).
3516
3517 @item Q
3518 @kindex Q (Group)
3519 @findex gnus-group-quit
3520 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3521 The dribble file will be saved, though (@pxref{Auto Save}).
3522 @end table
3523
3524 @vindex gnus-exit-gnus-hook
3525 @vindex gnus-suspend-gnus-hook
3526 @vindex gnus-after-exiting-gnus-hook
3527 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3528 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3529 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3530 exiting Gnus.
3531
3532 Note:
3533
3534 @quotation
3535 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3536 numbly heavy and herself fall into a hazy trance as the boy sitting
3537 behind her drew repeated lines with his pencil across the back of her
3538 plastic chair.
3539 @end quotation
3540
3541
3542 @node Group Topics
3543 @section Group Topics
3544 @cindex topics
3545
3546 If you read lots and lots of groups, it might be convenient to group
3547 them hierarchically according to topics.  You put your Emacs groups over
3548 here, your sex groups over there, and the rest (what, two groups or so?)
3549 you put in some misc section that you never bother with anyway.  You can
3550 even group the Emacs sex groups as a sub-topic to either the Emacs
3551 groups or the sex groups---or both!  Go wild!
3552
3553 @iftex
3554 @iflatex
3555 \gnusfigure{Group Topics}{400}{
3556 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3557 }
3558 @end iflatex
3559 @end iftex
3560
3561 Here's an example:
3562
3563 @example
3564 Gnus
3565   Emacs -- I wuw it!
3566      3: comp.emacs
3567      2: alt.religion.emacs
3568     Naughty Emacs
3569      452: alt.sex.emacs
3570        0: comp.talk.emacs.recovery
3571   Misc
3572      8: comp.binaries.fractals
3573     13: comp.sources.unix
3574 @end example
3575
3576 @findex gnus-topic-mode
3577 @kindex t (Group)
3578 To get this @emph{fab} functionality you simply turn on (ooh!) the
3579 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3580 is a toggling command.)
3581
3582 Go ahead, just try it.  I'll still be here when you get back.  La de
3583 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3584 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3585 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3586 Hot and bothered?
3587
3588 If you want this permanently enabled, you should add that minor mode to
3589 the hook for the group mode.  Put the following line in your
3590 @file{~/.gnus.el} file:
3591
3592 @lisp
3593 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3594 @end lisp
3595
3596 @menu
3597 * Topic Commands::              Interactive E-Z commands.
3598 * Topic Variables::             How to customize the topics the Lisp Way.
3599 * Topic Sorting::               Sorting each topic individually.
3600 * Topic Topology::              A map of the world.
3601 * Topic Parameters::            Parameters that apply to all groups in a topic.
3602 @end menu
3603
3604
3605 @node Topic Commands
3606 @subsection Topic Commands
3607 @cindex topic commands
3608
3609 When the topic minor mode is turned on, a new @kbd{T} submap will be
3610 available.  In addition, a few of the standard keys change their
3611 definitions slightly.
3612
3613 In general, the following kinds of operations are possible on topics.
3614 First of all, you want to create topics.  Secondly, you want to put
3615 groups in topics and to move them around until you have an order you
3616 like.  The third kind of operation is to show/hide parts of the whole
3617 shebang.  You might want to hide a topic including its subtopics and
3618 groups, to get a better overview of the other groups.
3619
3620 Here is a list of the basic keys that you might need to set up topics
3621 the way you like.
3622
3623 @table @kbd
3624
3625 @item T n
3626 @kindex T n (Topic)
3627 @findex gnus-topic-create-topic
3628 Prompt for a new topic name and create it
3629 (@code{gnus-topic-create-topic}).
3630
3631 @item T TAB
3632 @itemx TAB
3633 @kindex T TAB (Topic)
3634 @kindex TAB (Topic)
3635 @findex gnus-topic-indent
3636 ``Indent'' the current topic so that it becomes a sub-topic of the
3637 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3638 ``un-indent'' the topic instead.
3639
3640 @item M-TAB
3641 @kindex M-TAB (Topic)
3642 @findex gnus-topic-unindent
3643 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3644 parent of its current parent (@code{gnus-topic-unindent}).
3645
3646 @end table
3647
3648 The following two keys can be used to move groups and topics around.
3649 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3650 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3651 kill and yank rather than cut and paste.
3652
3653 @table @kbd
3654
3655 @item C-k
3656 @kindex C-k (Topic)
3657 @findex gnus-topic-kill-group
3658 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3659 topic will be removed along with the topic.
3660
3661 @item C-y
3662 @kindex C-y (Topic)
3663 @findex gnus-topic-yank-group
3664 Yank the previously killed group or topic
3665 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3666 before all groups.
3667
3668 So, to move a topic to the beginning of the list of topics, just hit
3669 @kbd{C-k} on it.  This is like the ``cut'' part of cut and paste.  Then,
3670 move the cursor to the beginning of the buffer (just below the ``Gnus''
3671 topic) and hit @kbd{C-y}.  This is like the ``paste'' part of cut and
3672 paste.  Like I said -- E-Z.
3673
3674 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3675 you can move topics around as well as groups.
3676
3677 @end table
3678
3679 After setting up the topics the way you like them, you might wish to
3680 hide a topic, or to show it again.  That's why we have the following
3681 key.
3682
3683 @table @kbd
3684
3685 @item RET
3686 @kindex RET (Topic)
3687 @findex gnus-topic-select-group
3688 @itemx SPACE
3689 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3690 When you perform this command on a group, you'll enter the group, as
3691 usual.  When done on a topic line, the topic will be folded (if it was
3692 visible) or unfolded (if it was folded already).  So it's basically a
3693 toggling command on topics.  In addition, if you give a numerical
3694 prefix, group on that level (and lower) will be displayed.
3695
3696 @end table
3697
3698 Now for a list of other commands, in no particular order.
3699
3700 @table @kbd
3701
3702 @item T m
3703 @kindex T m (Topic)
3704 @findex gnus-topic-move-group
3705 Move the current group to some other topic
3706 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3707 convention (@pxref{Process/Prefix}).
3708
3709 @item T j
3710 @kindex T j (Topic)
3711 @findex gnus-topic-jump-to-topic
3712 Go to a topic (@code{gnus-topic-jump-to-topic}).
3713
3714 @item T c
3715 @kindex T c (Topic)
3716 @findex gnus-topic-copy-group
3717 Copy the current group to some other topic
3718 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3719 convention (@pxref{Process/Prefix}).
3720
3721 @item T h
3722 @kindex T h (Topic)
3723 @findex gnus-topic-hide-topic
3724 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3725 a prefix, hide the topic permanently.
3726
3727 @item T s
3728 @kindex T s (Topic)
3729 @findex gnus-topic-show-topic
3730 Show the current topic (@code{gnus-topic-show-topic}).  If given
3731 a prefix, show the topic permanently.
3732
3733 @item T D
3734 @kindex T D (Topic)
3735 @findex gnus-topic-remove-group
3736 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3737 This command is mainly useful if you have the same group in several
3738 topics and wish to remove it from one of the topics.  You may also
3739 remove a group from all topics, but in that case, Gnus will add it to
3740 the root topic the next time you start Gnus.  In fact, all new groups
3741 (which, naturally, don't belong to any topic) will show up in the root
3742 topic.
3743
3744 This command uses the process/prefix convention
3745 (@pxref{Process/Prefix}).
3746
3747 @item T M
3748 @kindex T M (Topic)
3749 @findex gnus-topic-move-matching
3750 Move all groups that match some regular expression to a topic
3751 (@code{gnus-topic-move-matching}).
3752
3753 @item T C
3754 @kindex T C (Topic)
3755 @findex gnus-topic-copy-matching
3756 Copy all groups that match some regular expression to a topic
3757 (@code{gnus-topic-copy-matching}).
3758
3759 @item T H
3760 @kindex T H (Topic)
3761 @findex gnus-topic-toggle-display-empty-topics
3762 Toggle hiding empty topics
3763 (@code{gnus-topic-toggle-display-empty-topics}).
3764
3765 @item T #
3766 @kindex T # (Topic)
3767 @findex gnus-topic-mark-topic
3768 Mark all groups in the current topic with the process mark
3769 (@code{gnus-topic-mark-topic}).  This command works recursively on
3770 sub-topics unless given a prefix.
3771
3772 @item T M-#
3773 @kindex T M-# (Topic)
3774 @findex gnus-topic-unmark-topic
3775 Remove the process mark from all groups in the current topic
3776 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3777 sub-topics unless given a prefix.
3778
3779 @item C-c C-x
3780 @kindex C-c C-x (Topic)
3781 @findex gnus-topic-expire-articles
3782 Run all expirable articles in the current group or topic through the
3783 expiry process (if any)
3784 (@code{gnus-topic-expire-articles}).  (@pxref{Expiring Mail}).
3785
3786 @item T r
3787 @kindex T r (Topic)
3788 @findex gnus-topic-rename
3789 Rename a topic (@code{gnus-topic-rename}).
3790
3791 @item T DEL
3792 @kindex T DEL (Topic)
3793 @findex gnus-topic-delete
3794 Delete an empty topic (@code{gnus-topic-delete}).
3795
3796 @item A T
3797 @kindex A T (Topic)
3798 @findex gnus-topic-list-active
3799 List all groups that Gnus knows about in a topics-ified way
3800 (@code{gnus-topic-list-active}).
3801
3802 @item T M-n
3803 @kindex T M-n (Topic)
3804 @findex gnus-topic-goto-next-topic
3805 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3806
3807 @item T M-p
3808 @kindex T M-p (Topic)
3809 @findex gnus-topic-goto-previous-topic
3810 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3811
3812 @item G p
3813 @kindex G p (Topic)
3814 @findex gnus-topic-edit-parameters
3815 @cindex group parameters
3816 @cindex topic parameters
3817 @cindex parameters
3818 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3819 @xref{Topic Parameters}.
3820
3821 @end table
3822
3823
3824 @node Topic Variables
3825 @subsection Topic Variables
3826 @cindex topic variables
3827
3828 The previous section told you how to tell Gnus which topics to display.
3829 This section explains how to tell Gnus what to display about each topic.
3830
3831 @vindex gnus-topic-line-format
3832 The topic lines themselves are created according to the
3833 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3834 Valid elements are:
3835
3836 @table @samp
3837 @item i
3838 Indentation.
3839 @item n
3840 Topic name.
3841 @item v
3842 Visibility.
3843 @item l
3844 Level.
3845 @item g
3846 Number of groups in the topic.
3847 @item a
3848 Number of unread articles in the topic.
3849 @item A
3850 Number of unread articles in the topic and all its subtopics.
3851 @end table
3852
3853 @vindex gnus-topic-indent-level
3854 Each sub-topic (and the groups in the sub-topics) will be indented with
3855 @code{gnus-topic-indent-level} times the topic level number of spaces.
3856 The default is 2.
3857
3858 @vindex gnus-topic-mode-hook
3859 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3860
3861 @vindex gnus-topic-display-empty-topics
3862 The @code{gnus-topic-display-empty-topics} says whether to display even
3863 topics that have no unread articles in them.  The default is @code{t}.
3864
3865
3866 @node Topic Sorting
3867 @subsection Topic Sorting
3868 @cindex topic sorting
3869
3870 You can sort the groups in each topic individually with the following
3871 commands:
3872
3873
3874 @table @kbd
3875 @item T S a
3876 @kindex T S a (Topic)
3877 @findex gnus-topic-sort-groups-by-alphabet
3878 Sort the current topic alphabetically by group name
3879 (@code{gnus-topic-sort-groups-by-alphabet}).
3880
3881 @item T S u
3882 @kindex T S u (Topic)
3883 @findex gnus-topic-sort-groups-by-unread
3884 Sort the current topic by the number of unread articles
3885 (@code{gnus-topic-sort-groups-by-unread}).
3886
3887 @item T S l
3888 @kindex T S l (Topic)
3889 @findex gnus-topic-sort-groups-by-level
3890 Sort the current topic by group level
3891 (@code{gnus-topic-sort-groups-by-level}).
3892
3893 @item T S v
3894 @kindex T S v (Topic)
3895 @findex gnus-topic-sort-groups-by-score
3896 Sort the current topic by group score
3897 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3898
3899 @item T S r
3900 @kindex T S r (Topic)
3901 @findex gnus-topic-sort-groups-by-rank
3902 Sort the current topic by group rank
3903 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3904
3905 @item T S m
3906 @kindex T S m (Topic)
3907 @findex gnus-topic-sort-groups-by-method
3908 Sort the current topic alphabetically by back end name
3909 (@code{gnus-topic-sort-groups-by-method}).
3910
3911 @item T S e
3912 @kindex T S e (Topic)
3913 @findex gnus-topic-sort-groups-by-server
3914 Sort the current topic alphabetically by server name
3915 (@code{gnus-topic-sort-groups-by-server}).
3916
3917 @item T S s
3918 @kindex T S s (Topic)
3919 @findex gnus-topic-sort-groups
3920 Sort the current topic according to the function(s) given by the
3921 @code{gnus-group-sort-function} variable
3922 (@code{gnus-topic-sort-groups}).
3923
3924 @end table
3925
3926 When given a prefix argument, all these commands will sort in reverse
3927 order.  @xref{Sorting Groups}, for more information about group
3928 sorting.
3929
3930
3931 @node Topic Topology
3932 @subsection Topic Topology
3933 @cindex topic topology
3934 @cindex topology
3935
3936 So, let's have a look at an example group buffer:
3937
3938 @example
3939 @group
3940 Gnus
3941   Emacs -- I wuw it!
3942      3: comp.emacs
3943      2: alt.religion.emacs
3944     Naughty Emacs
3945      452: alt.sex.emacs
3946        0: comp.talk.emacs.recovery
3947   Misc
3948      8: comp.binaries.fractals
3949     13: comp.sources.unix
3950 @end group
3951 @end example
3952
3953 So, here we have one top-level topic (@samp{Gnus}), two topics under
3954 that, and one sub-topic under one of the sub-topics.  (There is always
3955 just one (1) top-level topic).  This topology can be expressed as
3956 follows:
3957
3958 @lisp
3959 (("Gnus" visible)
3960  (("Emacs -- I wuw it!" visible)
3961   (("Naughty Emacs" visible)))
3962  (("Misc" visible)))
3963 @end lisp
3964
3965 @vindex gnus-topic-topology
3966 This is in fact how the variable @code{gnus-topic-topology} would look
3967 for the display above.  That variable is saved in the @file{.newsrc.eld}
3968 file, and shouldn't be messed with manually---unless you really want
3969 to.  Since this variable is read from the @file{.newsrc.eld} file,
3970 setting it in any other startup files will have no effect.
3971
3972 This topology shows what topics are sub-topics of what topics (right),
3973 and which topics are visible.  Two settings are currently
3974 allowed---@code{visible} and @code{invisible}.
3975
3976
3977 @node Topic Parameters
3978 @subsection Topic Parameters
3979 @cindex topic parameters
3980
3981 All groups in a topic will inherit group parameters from the parent
3982 (and ancestor) topic parameters.  All valid group parameters are valid
3983 topic parameters (@pxref{Group Parameters}).  When the agent is
3984 enabled, all agent parameters (See Agent Parameters in @ref{Category
3985 Syntax}) are also valid topic parameters.
3986
3987 In addition, the following parameters are only valid as topic
3988 parameters:
3989
3990 @table @code
3991 @item subscribe
3992 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3993 @code{subscribe} topic parameter says what groups go in what topic.  Its
3994 value should be a regexp to match the groups that should go in that
3995 topic.
3996
3997 @item subscribe-level
3998 When subscribing new groups by topic (see the @code{subscribe} parameter),
3999 the group will be subscribed with the level specified in the
4000 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
4001
4002 @end table
4003
4004 Group parameters (of course) override topic parameters, and topic
4005 parameters in sub-topics override topic parameters in super-topics.  You
4006 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
4007 verb, although you may feel free to disagree with me here.)
4008
4009 @example
4010 @group
4011 Gnus
4012   Emacs
4013      3: comp.emacs
4014      2: alt.religion.emacs
4015    452: alt.sex.emacs
4016     Relief
4017      452: alt.sex.emacs
4018        0: comp.talk.emacs.recovery
4019   Misc
4020      8: comp.binaries.fractals
4021     13: comp.sources.unix
4022    452: alt.sex.emacs
4023 @end group   
4024 @end example
4025
4026 The @samp{Emacs} topic has the topic parameter @code{(score-file
4027 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
4028 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
4029 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
4030 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
4031 . "religion.SCORE")}.
4032
4033 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
4034 will get the @file{relief.SCORE} home score file.  If you enter the same
4035 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
4036 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
4037 get the @file{religion.SCORE} home score file.
4038
4039 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
4040 there are some problems, especially with the @code{total-expiry}
4041 parameter.  Say you have a mail group in two topics; one with
4042 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
4043 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
4044 of these topics you mean to expire articles from, so anything may
4045 happen.  In fact, I hereby declare that it is @dfn{undefined} what
4046 happens.  You just have to be careful if you do stuff like that.
4047
4048
4049 @node Misc Group Stuff
4050 @section Misc Group Stuff
4051
4052 @menu
4053 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
4054 * Group Information::           Information and help on groups and Gnus.
4055 * Group Timestamp::             Making Gnus keep track of when you last read a group.
4056 * File Commands::               Reading and writing the Gnus files.
4057 * Sieve Commands::              Managing Sieve scripts.
4058 @end menu
4059
4060 @table @kbd
4061
4062 @item ^
4063 @kindex ^ (Group)
4064 @findex gnus-group-enter-server-mode
4065 Enter the server buffer (@code{gnus-group-enter-server-mode}).
4066 @xref{Server Buffer}.
4067
4068 @item a
4069 @kindex a (Group)
4070 @findex gnus-group-post-news
4071 Start composing a message (a news by default)
4072 (@code{gnus-group-post-news}).  If given a prefix, post to the group
4073 under the point.  If the prefix is 1, prompt for a group to post to.
4074 Contrary to what the name of this function suggests, the prepared
4075 article might be a mail instead of a news, if a mail group is specified
4076 with the prefix argument.  @xref{Composing Messages}.
4077
4078 @item m
4079 @kindex m (Group)
4080 @findex gnus-group-mail
4081 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
4082 use the posting style of the group under the point.  If the prefix is 1,
4083 prompt for a group name to find the posting style.
4084 @xref{Composing Messages}.
4085
4086 @item i
4087 @kindex i (Group)
4088 @findex gnus-group-news
4089 Start composing a news (@code{gnus-group-news}).  If given a prefix,
4090 post to the group under the point.  If the prefix is 1, prompt
4091 for group to post to.  @xref{Composing Messages}.
4092
4093 This function actually prepares a news even when using mail groups.
4094 This is useful for ``posting'' messages to mail groups without actually
4095 sending them over the network: they're just saved directly to the group
4096 in question.  The corresponding back end must have a request-post method
4097 for this to work though.
4098
4099 @end table
4100
4101 Variables for the group buffer:
4102
4103 @table @code
4104
4105 @item gnus-group-mode-hook
4106 @vindex gnus-group-mode-hook
4107 is called after the group buffer has been
4108 created.
4109
4110 @item gnus-group-prepare-hook
4111 @vindex gnus-group-prepare-hook
4112 is called after the group buffer is
4113 generated.  It may be used to modify the buffer in some strange,
4114 unnatural way.
4115
4116 @item gnus-group-prepared-hook
4117 @vindex gnus-group-prepare-hook
4118 is called as the very last thing after the group buffer has been
4119 generated.  It may be used to move point around, for instance.
4120
4121 @item gnus-permanently-visible-groups
4122 @vindex gnus-permanently-visible-groups
4123 Groups matching this regexp will always be listed in the group buffer,
4124 whether they are empty or not.
4125
4126 @item gnus-group-name-charset-method-alist
4127 @vindex gnus-group-name-charset-method-alist
4128 An alist of method and the charset for group names.  It is used to show
4129 non-@acronym{ASCII} group names.
4130
4131 For example:
4132 @lisp
4133 (setq gnus-group-name-charset-method-alist
4134     '(((nntp "news.com.cn") . cn-gb-2312)))
4135 @end lisp
4136
4137 @item gnus-group-name-charset-group-alist
4138 @cindex UTF-8 group names
4139 @vindex gnus-group-name-charset-group-alist
4140 An alist of regexp of group name and the charset for group names.  It
4141 is used to show non-@acronym{ASCII} group names.  @code{((".*"
4142 utf-8))} is the default value if UTF-8 is supported, otherwise the
4143 default is @code{nil}.
4144
4145 For example:
4146 @lisp
4147 (setq gnus-group-name-charset-group-alist
4148     '(("\\.com\\.cn:" . cn-gb-2312)))
4149 @end lisp
4150
4151 @end table
4152
4153 @node Scanning New Messages
4154 @subsection Scanning New Messages
4155 @cindex new messages
4156 @cindex scanning new news
4157
4158 @table @kbd
4159
4160 @item g
4161 @kindex g (Group)
4162 @findex gnus-group-get-new-news
4163 @c @icon{gnus-group-get-new-news}
4164 Check the server(s) for new articles.  If the numerical prefix is used,
4165 this command will check only groups of level @var{arg} and lower
4166 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4167 command will force a total re-reading of the active file(s) from the
4168 back end(s).
4169
4170 @item M-g
4171 @kindex M-g (Group)
4172 @findex gnus-group-get-new-news-this-group
4173 @vindex gnus-goto-next-group-when-activating
4174 @c @icon{gnus-group-get-new-news-this-group}
4175 Check whether new articles have arrived in the current group
4176 (@code{gnus-group-get-new-news-this-group}).
4177 @code{gnus-goto-next-group-when-activating} says whether this command is
4178 to move point to the next group or not.  It is @code{t} by default.
4179
4180 @findex gnus-activate-all-groups
4181 @cindex activating groups
4182 @item C-c M-g
4183 @kindex C-c M-g (Group)
4184 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4185
4186 @item R
4187 @kindex R (Group)
4188 @cindex restarting
4189 @findex gnus-group-restart
4190 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4191 file(s), closes the connection to all servers, clears up all run-time
4192 Gnus variables, and then starts Gnus all over again.
4193
4194 @end table
4195
4196 @vindex gnus-get-new-news-hook
4197 @code{gnus-get-new-news-hook} is run just before checking for new news.
4198
4199 @vindex gnus-after-getting-new-news-hook
4200 @code{gnus-after-getting-new-news-hook} is run after checking for new
4201 news.
4202
4203
4204 @node Group Information
4205 @subsection Group Information
4206 @cindex group information
4207 @cindex information on groups
4208
4209 @table @kbd
4210
4211
4212 @item H f
4213 @kindex H f (Group)
4214 @findex gnus-group-fetch-faq
4215 @vindex gnus-group-faq-directory
4216 @cindex FAQ
4217 @cindex ange-ftp
4218 Try to fetch the @acronym{FAQ} for the current group
4219 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
4220 from @code{gnus-group-faq-directory}, which is usually a directory on
4221 a remote machine.  This variable can also be a list of directories.
4222 In that case, giving a prefix to this command will allow you to choose
4223 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
4224 used for fetching the file.
4225
4226 If fetching from the first site is unsuccessful, Gnus will attempt to go
4227 through @code{gnus-group-faq-directory} and try to open them one by one.
4228
4229 @item H c
4230 @kindex H c (Group)
4231 @findex gnus-group-fetch-charter
4232 @vindex gnus-group-charter-alist
4233 @cindex charter
4234 Try to open the charter for the current group in a web browser
4235 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4236 prefix argument.
4237
4238 Gnus will use @code{gnus-group-charter-alist} to find the location of
4239 the charter.  If no location is known, Gnus will fetch the control
4240 messages for the group, which in some cases includes the charter.
4241
4242 @item H C
4243 @kindex H C (Group)
4244 @findex gnus-group-fetch-control
4245 @vindex gnus-group-fetch-control-use-browse-url
4246 @cindex control message
4247 Fetch the control messages for the group from the archive at
4248 @code{ftp.isc.org} (@code{gnus-group-fetch-control}).  Query for a
4249 group if given a prefix argument.
4250
4251 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
4252 Gnus will open the control messages in a browser using
4253 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
4254 and displayed in an ephemeral group.
4255
4256 Note that the control messages are compressed.  To use this command
4257 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
4258 Files, ,Compressed Files, emacs, The Emacs Manual}).
4259
4260 @item H d
4261 @itemx C-c C-d
4262 @c @icon{gnus-group-describe-group}
4263 @kindex H d (Group)
4264 @kindex C-c C-d (Group)
4265 @cindex describing groups
4266 @cindex group description
4267 @findex gnus-group-describe-group
4268 Describe the current group (@code{gnus-group-describe-group}).  If given
4269 a prefix, force Gnus to re-read the description from the server.
4270
4271 @item M-d
4272 @kindex M-d (Group)
4273 @findex gnus-group-describe-all-groups
4274 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4275 prefix, force Gnus to re-read the description file from the server.
4276
4277 @item H v
4278 @itemx V
4279 @kindex V (Group)
4280 @kindex H v (Group)
4281 @cindex version
4282 @findex gnus-version
4283 Display current Gnus version numbers (@code{gnus-version}).
4284
4285 @item ?
4286 @kindex ? (Group)
4287 @findex gnus-group-describe-briefly
4288 Give a very short help message (@code{gnus-group-describe-briefly}).
4289
4290 @item C-c C-i
4291 @kindex C-c C-i (Group)
4292 @cindex info
4293 @cindex manual
4294 @findex gnus-info-find-node
4295 Go to the Gnus info node (@code{gnus-info-find-node}).
4296 @end table
4297
4298
4299 @node Group Timestamp
4300 @subsection Group Timestamp
4301 @cindex timestamps
4302 @cindex group timestamps
4303
4304 It can be convenient to let Gnus keep track of when you last read a
4305 group.  To set the ball rolling, you should add
4306 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4307
4308 @lisp
4309 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4310 @end lisp
4311
4312 After doing this, each time you enter a group, it'll be recorded.
4313
4314 This information can be displayed in various ways---the easiest is to
4315 use the @samp{%d} spec in the group line format:
4316
4317 @lisp
4318 (setq gnus-group-line-format
4319       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4320 @end lisp
4321
4322 This will result in lines looking like:
4323
4324 @example
4325 *        0: mail.ding                                19961002T012943
4326          0: custom                                   19961002T012713
4327 @end example
4328
4329 As you can see, the date is displayed in compact ISO 8601 format.  This
4330 may be a bit too much, so to just display the date, you could say
4331 something like:
4332
4333 @lisp
4334 (setq gnus-group-line-format
4335       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4336 @end lisp
4337
4338 If you would like greater control of the time format, you can use a
4339 user-defined format spec.  Something like the following should do the
4340 trick:
4341
4342 @lisp
4343 (setq gnus-group-line-format
4344       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4345 (defun gnus-user-format-function-d (headers)
4346   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4347     (if time
4348         (format-time-string "%b %d  %H:%M" time)
4349       "")))
4350 @end lisp
4351
4352
4353 @node File Commands
4354 @subsection File Commands
4355 @cindex file commands
4356
4357 @table @kbd
4358
4359 @item r
4360 @kindex r (Group)
4361 @findex gnus-group-read-init-file
4362 @vindex gnus-init-file
4363 @cindex reading init file
4364 Re-read the init file (@code{gnus-init-file}, which defaults to
4365 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
4366
4367 @item s
4368 @kindex s (Group)
4369 @findex gnus-group-save-newsrc
4370 @cindex saving .newsrc
4371 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4372 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4373 file(s) whether Gnus thinks it is necessary or not.
4374
4375 @c @item Z
4376 @c @kindex Z (Group)
4377 @c @findex gnus-group-clear-dribble
4378 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4379
4380 @end table
4381
4382
4383 @node Sieve Commands
4384 @subsection Sieve Commands
4385 @cindex group sieve commands
4386
4387 Sieve is a server-side mail filtering language.  In Gnus you can use
4388 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4389 sieve rules that should apply to each group.  Gnus provides two
4390 commands to translate all these group parameters into a proper Sieve
4391 script that can be transfered to the server somehow.
4392
4393 @vindex gnus-sieve-file
4394 @vindex gnus-sieve-region-start
4395 @vindex gnus-sieve-region-end
4396 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4397 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4398 between two delimiters, @code{gnus-sieve-region-start} and
4399 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4400 outside these delimiters that will not be removed the next time you
4401 regenerate the Sieve script.
4402
4403 @vindex gnus-sieve-crosspost
4404 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4405 is generated.  If it is non-@code{nil} (the default) articles is
4406 placed in all groups that have matching rules, otherwise the article
4407 is only placed in the group with the first matching rule.  For
4408 example, the group parameter @samp{(sieve address "sender"
4409 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4410 code if @code{gnus-sieve-crosspost} is @code{nil}.  (When
4411 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4412 except that the line containing the call to @code{stop} is removed.)
4413
4414 @example
4415 if address "sender" "owner-ding@@hpc.uh.edu" @{
4416         fileinto "INBOX.ding";
4417         stop;
4418 @}
4419 @end example
4420
4421 @xref{Top, Emacs Sieve, Top, sieve, Emacs Sieve}.
4422
4423 @table @kbd
4424
4425 @item D g
4426 @kindex D g (Group)
4427 @findex gnus-sieve-generate
4428 @vindex gnus-sieve-file
4429 @cindex generating sieve script
4430 Regenerate a Sieve script from the @code{sieve} group parameters and
4431 put you into the @code{gnus-sieve-file} without saving it.
4432
4433 @item D u
4434 @kindex D u (Group)
4435 @findex gnus-sieve-update
4436 @vindex gnus-sieve-file
4437 @cindex updating sieve script
4438 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4439 @code{sieve} group parameters, save the file and upload it to the
4440 server using the @code{sieveshell} program.
4441
4442 @end table
4443
4444
4445 @node Summary Buffer
4446 @chapter Summary Buffer
4447 @cindex summary buffer
4448
4449 A line for each article is displayed in the summary buffer.  You can
4450 move around, read articles, post articles and reply to articles.
4451
4452 The most common way to a summary buffer is to select a group from the
4453 group buffer (@pxref{Selecting a Group}).
4454
4455 You can have as many summary buffers open as you wish.
4456
4457 @menu
4458 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4459 * Summary Maneuvering::         Moving around the summary buffer.
4460 * Choosing Articles::           Reading articles.
4461 * Paging the Article::          Scrolling the current article.
4462 * Reply Followup and Post::     Posting articles.
4463 * Delayed Articles::            Send articles at a later time.
4464 * Marking Articles::            Marking articles as read, expirable, etc.
4465 * Limiting::                    You can limit the summary buffer.
4466 * Threading::                   How threads are made.
4467 * Sorting the Summary Buffer::  How articles and threads are sorted.
4468 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4469 * Article Caching::             You may store articles in a cache.
4470 * Persistent Articles::         Making articles expiry-resistant.
4471 * Article Backlog::             Having already read articles hang around.
4472 * Saving Articles::             Ways of customizing article saving.
4473 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4474 * Article Treatment::           The article buffer can be mangled at will.
4475 * MIME Commands::               Doing MIMEy things with the articles.
4476 * Charsets::                    Character set issues.
4477 * Article Commands::            Doing various things with the article buffer.
4478 * Summary Sorting::             Sorting the summary buffer in various ways.
4479 * Finding the Parent::          No child support? Get the parent.
4480 * Alternative Approaches::      Reading using non-default summaries.
4481 * Tree Display::                A more visual display of threads.
4482 * Mail Group Commands::         Some commands can only be used in mail groups.
4483 * Various Summary Stuff::       What didn't fit anywhere else.
4484 * Exiting the Summary Buffer::  Returning to the Group buffer,
4485                                 or reselecting the current group.
4486 * Crosspost Handling::          How crossposted articles are dealt with.
4487 * Duplicate Suppression::       An alternative when crosspost handling fails.
4488 * Security::                    Decrypt and Verify.
4489 * Mailing List::                Mailing list minor mode.
4490 @end menu
4491
4492
4493 @node Summary Buffer Format
4494 @section Summary Buffer Format
4495 @cindex summary buffer format
4496
4497 @iftex
4498 @iflatex
4499 \gnusfigure{The Summary Buffer}{180}{
4500 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4501 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4502 }
4503 @end iflatex
4504 @end iftex
4505
4506 @menu
4507 * Summary Buffer Lines::        You can specify how summary lines should look.
4508 * To From Newsgroups::          How to not display your own name.
4509 * Summary Buffer Mode Line::    You can say how the mode line should look.
4510 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4511 @end menu
4512
4513 @findex mail-extract-address-components
4514 @findex gnus-extract-address-components
4515 @vindex gnus-extract-address-components
4516 Gnus will use the value of the @code{gnus-extract-address-components}
4517 variable as a function for getting the name and address parts of a
4518 @code{From} header.  Two pre-defined functions exist:
4519 @code{gnus-extract-address-components}, which is the default, quite
4520 fast, and too simplistic solution; and
4521 @code{mail-extract-address-components}, which works very nicely, but is
4522 slower.  The default function will return the wrong answer in 5% of the
4523 cases.  If this is unacceptable to you, use the other function instead:
4524
4525 @lisp
4526 (setq gnus-extract-address-components
4527       'mail-extract-address-components)
4528 @end lisp
4529
4530 @vindex gnus-summary-same-subject
4531 @code{gnus-summary-same-subject} is a string indicating that the current
4532 article has the same subject as the previous.  This string will be used
4533 with those specs that require it.  The default is @code{""}.
4534
4535
4536 @node Summary Buffer Lines
4537 @subsection Summary Buffer Lines
4538
4539 @vindex gnus-summary-line-format
4540 You can change the format of the lines in the summary buffer by changing
4541 the @code{gnus-summary-line-format} variable.  It works along the same
4542 lines as a normal @code{format} string, with some extensions
4543 (@pxref{Formatting Variables}).
4544
4545 There should always be a colon or a point position marker on the line;
4546 the cursor always moves to the point position marker or the colon after
4547 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4548 possible to change this.  Just write a new function
4549 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4550 @xref{Positioning Point}.
4551
4552 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4553
4554 The following format specification characters and extended format
4555 specification(s) are understood:
4556
4557 @table @samp
4558 @item N
4559 Article number.
4560 @item S
4561 Subject string.  List identifiers stripped,
4562 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4563 @item s
4564 Subject if the article is the root of the thread or the previous article
4565 had a different subject, @code{gnus-summary-same-subject} otherwise.
4566 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4567 @item F
4568 Full @code{From} header.
4569 @item n
4570 The name (from the @code{From} header).
4571 @item f
4572 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4573 From Newsgroups}).
4574 @item a
4575 The name (from the @code{From} header).  This differs from the @code{n}
4576 spec in that it uses the function designated by the
4577 @code{gnus-extract-address-components} variable, which is slower, but
4578 may be more thorough.
4579 @item A
4580 The address (from the @code{From} header).  This works the same way as
4581 the @code{a} spec.
4582 @item L
4583 Number of lines in the article.
4584 @item c
4585 Number of characters in the article.  This specifier is not supported
4586 in some methods (like nnfolder).
4587 @item k
4588 Pretty-printed version of the number of characters in the article;
4589 for example, @samp{1.2k} or @samp{0.4M}.
4590 @item I
4591 Indentation based on thread level (@pxref{Customizing Threading}).
4592 @item B
4593 A complex trn-style thread tree, showing response-connecting trace
4594 lines.  A thread could be drawn like this:
4595
4596 @example
4597 >
4598 +->
4599 | +->
4600 | | \->
4601 | |   \->
4602 | \->
4603 +->
4604 \->
4605 @end example
4606
4607 You can customize the appearance with the following options.  Note
4608 that it is possible to make the thread display look really neat by
4609 replacing the default @acronym{ASCII} characters with graphic
4610 line-drawing glyphs.
4611 @table @code
4612 @item gnus-sum-thread-tree-root
4613 @vindex gnus-sum-thread-tree-root
4614 Used for the root of a thread.  If @code{nil}, use subject
4615 instead.  The default is @samp{> }.
4616
4617 @item gnus-sum-thread-tree-false-root
4618 @vindex gnus-sum-thread-tree-false-root
4619 Used for the false root of a thread (@pxref{Loose Threads}).  If
4620 @code{nil}, use subject instead.  The default is @samp{> }.
4621
4622 @item gnus-sum-thread-tree-single-indent
4623 @vindex gnus-sum-thread-tree-single-indent
4624 Used for a thread with just one message.  If @code{nil}, use subject
4625 instead.  The default is @samp{}.
4626
4627 @item gnus-sum-thread-tree-vertical
4628 @vindex gnus-sum-thread-tree-vertical
4629 Used for drawing a vertical line.  The default is @samp{| }.
4630
4631 @item gnus-sum-thread-tree-indent
4632 @vindex gnus-sum-thread-tree-indent
4633 Used for indenting.  The default is @samp{  }.
4634
4635 @item gnus-sum-thread-tree-leaf-with-other
4636 @vindex gnus-sum-thread-tree-leaf-with-other
4637 Used for a leaf with brothers.  The default is @samp{+-> }.
4638
4639 @item gnus-sum-thread-tree-single-leaf
4640 @vindex gnus-sum-thread-tree-single-leaf
4641 Used for a leaf without brothers.  The default is @samp{\-> }
4642
4643 @end table
4644
4645 @item T
4646 Nothing if the article is a root and lots of spaces if it isn't (it
4647 pushes everything after it off the screen).
4648 @item [
4649 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4650 for adopted articles (@pxref{Customizing Threading}).
4651 @item ]
4652 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4653 for adopted articles.
4654 @item >
4655 One space for each thread level.
4656 @item <
4657 Twenty minus thread level spaces.
4658 @item U
4659 Unread.  @xref{Read Articles}.
4660
4661 @item R
4662 This misleadingly named specifier is the @dfn{secondary mark}.  This
4663 mark will say whether the article has been replied to, has been cached,
4664 or has been saved.  @xref{Other Marks}.
4665
4666 @item i
4667 Score as a number (@pxref{Scoring}).
4668 @item z
4669 @vindex gnus-summary-zcore-fuzz
4670 Zcore, @samp{+} if above the default level and @samp{-} if below the
4671 default level.  If the difference between
4672 @code{gnus-summary-default-score} and the score is less than
4673 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4674 @item V
4675 Total thread score.
4676 @item x
4677 @code{Xref}.
4678 @item D
4679 @code{Date}.
4680 @item d
4681 The @code{Date} in @code{DD-MMM} format.
4682 @item o
4683 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4684 @item M
4685 @code{Message-ID}.
4686 @item r
4687 @code{References}.
4688 @item t
4689 Number of articles in the current sub-thread.  Using this spec will slow
4690 down summary buffer generation somewhat.
4691 @item e
4692 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4693 article has any children.
4694 @item P
4695 The line number.
4696 @item O
4697 Download mark.
4698 @item &user-date;
4699 Age sensitive date format.  Various date format is defined in
4700 @code{gnus-user-date-format-alist}.
4701 @item u
4702 User defined specifier.  The next character in the format string should
4703 be a letter.  Gnus will call the function
4704 @code{gnus-user-format-function-@var{x}}, where @var{x} is the letter
4705 following @samp{%u}.  The function will be passed the current header as
4706 argument.  The function should return a string, which will be inserted
4707 into the summary just like information from any other summary specifier.
4708 @end table
4709
4710 Text between @samp{%(} and @samp{%)} will be highlighted with
4711 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4712 There can only be one such area.
4713
4714 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4715 have to be handled with care.  For reasons of efficiency, Gnus will
4716 compute what column these characters will end up in, and ``hard-code''
4717 that.  This means that it is invalid to have these specs after a
4718 variable-length spec.  Well, you might not be arrested, but your summary
4719 buffer will look strange, which is bad enough.
4720
4721 The smart choice is to have these specs as far to the left as possible.
4722 (Isn't that the case with everything, though?  But I digress.)
4723
4724 This restriction may disappear in later versions of Gnus.
4725
4726
4727 @node To From Newsgroups
4728 @subsection To From Newsgroups
4729 @cindex To
4730 @cindex Newsgroups
4731
4732 In some groups (particularly in archive groups), the @code{From} header
4733 isn't very interesting, since all the articles there are written by
4734 you.  To display the information in the @code{To} or @code{Newsgroups}
4735 headers instead, you need to decide three things: What information to
4736 gather; where to display it; and when to display it.
4737
4738 @enumerate
4739 @item
4740 @vindex gnus-extra-headers
4741 The reading of extra header information is controlled by the
4742 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4743 instance:
4744
4745 @lisp
4746 (setq gnus-extra-headers
4747       '(To Newsgroups X-Newsreader))
4748 @end lisp
4749
4750 This will result in Gnus trying to obtain these three headers, and
4751 storing it in header structures for later easy retrieval.
4752
4753 @item
4754 @findex gnus-extra-header
4755 The value of these extra headers can be accessed via the
4756 @code{gnus-extra-header} function.  Here's a format line spec that will
4757 access the @code{X-Newsreader} header:
4758
4759 @example
4760 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4761 @end example
4762
4763 @item
4764 @vindex gnus-ignored-from-addresses
4765 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4766 summary line spec returns the @code{To}, @code{Newsreader} or
4767 @code{From} header.  If this regexp matches the contents of the
4768 @code{From} header, the value of the @code{To} or @code{Newsreader}
4769 headers are used instead.
4770
4771 @end enumerate
4772
4773 @vindex nnmail-extra-headers
4774 A related variable is @code{nnmail-extra-headers}, which controls when
4775 to include extra headers when generating overview (@acronym{NOV}) files.
4776 If you have old overview files, you should regenerate them after
4777 changing this variable, by entering the server buffer using @kbd{^},
4778 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
4779 regeneration.
4780
4781 @vindex gnus-summary-line-format
4782 You also have to instruct Gnus to display the data by changing the
4783 @code{%n} spec to the @code{%f} spec in the
4784 @code{gnus-summary-line-format} variable.
4785
4786 In summary, you'd typically put something like the following in
4787 @file{~/.gnus.el}:
4788
4789 @lisp
4790 (setq gnus-extra-headers
4791       '(To Newsgroups))
4792 (setq nnmail-extra-headers gnus-extra-headers)
4793 (setq gnus-summary-line-format
4794       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4795 (setq gnus-ignored-from-addresses
4796       "Your Name Here")
4797 @end lisp
4798
4799 (The values listed above are the default values in Gnus.  Alter them
4800 to fit your needs.)
4801
4802 A note for news server administrators, or for users who wish to try to
4803 convince their news server administrator to provide some additional
4804 support:
4805
4806 The above is mostly useful for mail groups, where you have control over
4807 the @acronym{NOV} files that are created.  However, if you can persuade your
4808 nntp admin to add (in the usual implementation, notably INN):
4809
4810 @example
4811 Newsgroups:full
4812 @end example
4813
4814 to the end of her @file{overview.fmt} file, then you can use that just
4815 as you would the extra headers from the mail groups.
4816
4817
4818 @node Summary Buffer Mode Line
4819 @subsection Summary Buffer Mode Line
4820
4821 @vindex gnus-summary-mode-line-format
4822 You can also change the format of the summary mode bar (@pxref{Mode Line
4823 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4824 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4825
4826 Here are the elements you can play with:
4827
4828 @table @samp
4829 @item G
4830 Group name.
4831 @item p
4832 Unprefixed group name.
4833 @item A
4834 Current article number.
4835 @item z
4836 Current article score.
4837 @item V
4838 Gnus version.
4839 @item U
4840 Number of unread articles in this group.
4841 @item e
4842 Number of unread articles in this group that aren't displayed in the
4843 summary buffer.
4844 @item Z
4845 A string with the number of unread and unselected articles represented
4846 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4847 articles, and just as @samp{<%U more>} if there are just unread articles
4848 and no unselected ones.
4849 @item g
4850 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4851 shortened to @samp{r.a.anime}.
4852 @item S
4853 Subject of the current article.
4854 @item u
4855 User-defined spec (@pxref{User-Defined Specs}).
4856 @item s
4857 Name of the current score file (@pxref{Scoring}).
4858 @item d
4859 Number of dormant articles (@pxref{Unread Articles}).
4860 @item t
4861 Number of ticked articles (@pxref{Unread Articles}).
4862 @item r
4863 Number of articles that have been marked as read in this session.
4864 @item E
4865 Number of articles expunged by the score files.
4866 @end table
4867
4868
4869 @node Summary Highlighting
4870 @subsection Summary Highlighting
4871
4872 @table @code
4873
4874 @item gnus-visual-mark-article-hook
4875 @vindex gnus-visual-mark-article-hook
4876 This hook is run after selecting an article.  It is meant to be used for
4877 highlighting the article in some way.  It is not run if
4878 @code{gnus-visual} is @code{nil}.
4879
4880 @item gnus-summary-update-hook
4881 @vindex gnus-summary-update-hook
4882 This hook is called when a summary line is changed.  It is not run if
4883 @code{gnus-visual} is @code{nil}.
4884
4885 @item gnus-summary-selected-face
4886 @vindex gnus-summary-selected-face
4887 This is the face (or @dfn{font} as some people call it) used to
4888 highlight the current article in the summary buffer.
4889
4890 @item gnus-summary-highlight
4891 @vindex gnus-summary-highlight
4892 Summary lines are highlighted according to this variable, which is a
4893 list where the elements are of the format @code{(@var{form}
4894 . @var{face})}.  If you would, for instance, like ticked articles to be
4895 italic and high-scored articles to be bold, you could set this variable
4896 to something like
4897 @lisp
4898 (((eq mark gnus-ticked-mark) . italic)
4899  ((> score default) . bold))
4900 @end lisp
4901 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4902 @var{face} will be applied to the line.
4903 @end table
4904
4905
4906 @node Summary Maneuvering
4907 @section Summary Maneuvering
4908 @cindex summary movement
4909
4910 All the straight movement commands understand the numeric prefix and
4911 behave pretty much as you'd expect.
4912
4913 None of these commands select articles.
4914
4915 @table @kbd
4916 @item G M-n
4917 @itemx M-n
4918 @kindex M-n (Summary)
4919 @kindex G M-n (Summary)
4920 @findex gnus-summary-next-unread-subject
4921 Go to the next summary line of an unread article
4922 (@code{gnus-summary-next-unread-subject}).
4923
4924 @item G M-p
4925 @itemx M-p
4926 @kindex M-p (Summary)
4927 @kindex G M-p (Summary)
4928 @findex gnus-summary-prev-unread-subject
4929 Go to the previous summary line of an unread article
4930 (@code{gnus-summary-prev-unread-subject}).
4931
4932 @item G g
4933 @kindex G g (Summary)
4934 @findex gnus-summary-goto-subject
4935 Ask for an article number and then go to the summary line of that article
4936 without displaying the article (@code{gnus-summary-goto-subject}).
4937 @end table
4938
4939 If Gnus asks you to press a key to confirm going to the next group, you
4940 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4941 buffer, searching for the next group to read without actually returning
4942 to the group buffer.
4943
4944 Variables related to summary movement:
4945
4946 @table @code
4947
4948 @vindex gnus-auto-select-next
4949 @item gnus-auto-select-next
4950 If you issue one of the movement commands (like @kbd{n}) and there are
4951 no more unread articles after the current one, Gnus will offer to go to
4952 the next group.  If this variable is @code{t} and the next group is
4953 empty, Gnus will exit summary mode and return to the group buffer.  If
4954 this variable is neither @code{t} nor @code{nil}, Gnus will select the
4955 next group with unread articles.  As a special case, if this variable
4956 is @code{quietly}, Gnus will select the next group without asking for
4957 confirmation.  If this variable is @code{almost-quietly}, the same
4958 will happen only if you are located on the last article in the group.
4959 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4960 command will go to the next group without confirmation.  Also
4961 @pxref{Group Levels}.
4962
4963 @item gnus-auto-select-same
4964 @vindex gnus-auto-select-same
4965 If non-@code{nil}, all the movement commands will try to go to the next
4966 article with the same subject as the current.  (@dfn{Same} here might
4967 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4968 for details (@pxref{Customizing Threading}).)  If there are no more
4969 articles with the same subject, go to the first unread article.
4970
4971 This variable is not particularly useful if you use a threaded display.
4972
4973 @item gnus-summary-check-current
4974 @vindex gnus-summary-check-current
4975 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4976 to the next (or previous) article if the current article is unread.
4977 Instead, they will choose the current article.
4978
4979 @item gnus-auto-center-summary
4980 @vindex gnus-auto-center-summary
4981 If non-@code{nil}, Gnus will keep the point in the summary buffer
4982 centered at all times.  This makes things quite tidy, but if you have a
4983 slow network connection, or simply do not like this un-Emacsism, you can
4984 set this variable to @code{nil} to get the normal Emacs scrolling
4985 action.  This will also inhibit horizontal re-centering of the summary
4986 buffer, which might make it more inconvenient to read extremely long
4987 threads.
4988
4989 This variable can also be a number.  In that case, center the window at
4990 the given number of lines from the top.
4991
4992 @end table
4993
4994
4995 @node Choosing Articles
4996 @section Choosing Articles
4997 @cindex selecting articles
4998
4999 @menu
5000 * Choosing Commands::           Commands for choosing articles.
5001 * Choosing Variables::          Variables that influence these commands.
5002 @end menu
5003
5004
5005 @node Choosing Commands
5006 @subsection Choosing Commands
5007
5008 None of the following movement commands understand the numeric prefix,
5009 and they all select and display an article.
5010
5011 If you want to fetch new articles or redisplay the group, see
5012 @ref{Exiting the Summary Buffer}.
5013
5014 @table @kbd
5015 @item SPACE
5016 @kindex SPACE (Summary)
5017 @findex gnus-summary-next-page
5018 Select the current article, or, if that one's read already, the next
5019 unread article (@code{gnus-summary-next-page}).
5020
5021 If you have an article window open already and you press @kbd{SPACE}
5022 again, the article will be scrolled.  This lets you conveniently
5023 @kbd{SPACE} through an entire newsgroup.  @xref{Paging the Article}.
5024
5025 @item G n
5026 @itemx n
5027 @kindex n (Summary)
5028 @kindex G n (Summary)
5029 @findex gnus-summary-next-unread-article
5030 @c @icon{gnus-summary-next-unread}
5031 Go to next unread article (@code{gnus-summary-next-unread-article}).
5032
5033 @item G p
5034 @itemx p
5035 @kindex p (Summary)
5036 @findex gnus-summary-prev-unread-article
5037 @c @icon{gnus-summary-prev-unread}
5038 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
5039
5040 @item G N
5041 @itemx N
5042 @kindex N (Summary)
5043 @kindex G N (Summary)
5044 @findex gnus-summary-next-article
5045 Go to the next article (@code{gnus-summary-next-article}).
5046
5047 @item G P
5048 @itemx P
5049 @kindex P (Summary)
5050 @kindex G P (Summary)
5051 @findex gnus-summary-prev-article
5052 Go to the previous article (@code{gnus-summary-prev-article}).
5053
5054 @item G C-n
5055 @kindex G C-n (Summary)
5056 @findex gnus-summary-next-same-subject
5057 Go to the next article with the same subject
5058 (@code{gnus-summary-next-same-subject}).
5059
5060 @item G C-p
5061 @kindex G C-p (Summary)
5062 @findex gnus-summary-prev-same-subject
5063 Go to the previous article with the same subject
5064 (@code{gnus-summary-prev-same-subject}).
5065
5066 @item G f
5067 @itemx .
5068 @kindex G f  (Summary)
5069 @kindex .  (Summary)
5070 @findex gnus-summary-first-unread-article
5071 Go to the first unread article
5072 (@code{gnus-summary-first-unread-article}).
5073
5074 @item G b
5075 @itemx ,
5076 @kindex G b (Summary)
5077 @kindex , (Summary)
5078 @findex gnus-summary-best-unread-article
5079 Go to the unread article with the highest score
5080 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
5081 go to the first unread article that has a score over the default score.
5082
5083 @item G l
5084 @itemx l
5085 @kindex l (Summary)
5086 @kindex G l (Summary)
5087 @findex gnus-summary-goto-last-article
5088 Go to the previous article read (@code{gnus-summary-goto-last-article}).
5089
5090 @item G o
5091 @kindex G o (Summary)
5092 @findex gnus-summary-pop-article
5093 @cindex history
5094 @cindex article history
5095 Pop an article off the summary history and go to this article
5096 (@code{gnus-summary-pop-article}).  This command differs from the
5097 command above in that you can pop as many previous articles off the
5098 history as you like, while @kbd{l} toggles the two last read articles.
5099 For a somewhat related issue (if you use these commands a lot),
5100 @pxref{Article Backlog}.
5101
5102 @item G j
5103 @itemx j
5104 @kindex j (Summary)
5105 @kindex G j (Summary)
5106 @findex gnus-summary-goto-article
5107 Ask for an article number or @code{Message-ID}, and then go to that
5108 article (@code{gnus-summary-goto-article}).
5109
5110 @end table
5111
5112
5113 @node Choosing Variables
5114 @subsection Choosing Variables
5115
5116 Some variables relevant for moving and selecting articles:
5117
5118 @table @code
5119 @item gnus-auto-extend-newsgroup
5120 @vindex gnus-auto-extend-newsgroup
5121 All the movement commands will try to go to the previous (or next)
5122 article, even if that article isn't displayed in the Summary buffer if
5123 this variable is non-@code{nil}.  Gnus will then fetch the article from
5124 the server and display it in the article buffer.
5125
5126 @item gnus-select-article-hook
5127 @vindex gnus-select-article-hook
5128 This hook is called whenever an article is selected.  By default it
5129 exposes any threads hidden under the selected article.  If you would
5130 like each article to be saved in the Agent as you read it, putting
5131 @code{gnus-agent-fetch-selected-article} on this hook will do so.
5132
5133 @item gnus-mark-article-hook
5134 @vindex gnus-mark-article-hook
5135 @findex gnus-summary-mark-unread-as-read
5136 @findex gnus-summary-mark-read-and-unread-as-read
5137 @findex gnus-unread-mark
5138 This hook is called whenever an article is selected.  It is intended to
5139 be used for marking articles as read.  The default value is
5140 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5141 mark of almost any article you read to @code{gnus-unread-mark}.  The
5142 only articles not affected by this function are ticked, dormant, and
5143 expirable articles.  If you'd instead like to just have unread articles
5144 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5145 instead.  It will leave marks like @code{gnus-low-score-mark},
5146 @code{gnus-del-mark} (and so on) alone.
5147
5148 @end table
5149
5150
5151 @node Paging the Article
5152 @section Scrolling the Article
5153 @cindex article scrolling
5154
5155 @table @kbd
5156
5157 @item SPACE
5158 @kindex SPACE (Summary)
5159 @findex gnus-summary-next-page
5160 Pressing @kbd{SPACE} will scroll the current article forward one page,
5161 or, if you have come to the end of the current article, will choose the
5162 next article (@code{gnus-summary-next-page}).
5163
5164 @vindex gnus-article-boring-faces
5165 @vindex gnus-article-skip-boring
5166 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
5167 the article consists only of citations and signature, then it will be
5168 skipped; the next article will be shown instead.  You can customize
5169 what is considered uninteresting with
5170 @code{gnus-article-boring-faces}.  You can manually view the article's
5171 pages, no matter how boring, using @kbd{C-M-v}.
5172
5173 @item DEL
5174 @kindex DEL (Summary)
5175 @findex gnus-summary-prev-page
5176 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5177
5178 @item RET
5179 @kindex RET (Summary)
5180 @findex gnus-summary-scroll-up
5181 Scroll the current article one line forward
5182 (@code{gnus-summary-scroll-up}).
5183
5184 @item M-RET
5185 @kindex M-RET (Summary)
5186 @findex gnus-summary-scroll-down
5187 Scroll the current article one line backward
5188 (@code{gnus-summary-scroll-down}).
5189
5190 @item A g
5191 @itemx g
5192 @kindex A g (Summary)
5193 @kindex g (Summary)
5194 @findex gnus-summary-show-article
5195 @vindex gnus-summary-show-article-charset-alist
5196 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5197 given a prefix, fetch the current article, but don't run any of the
5198 article treatment functions.  This will give you a ``raw'' article, just
5199 the way it came from the server.
5200
5201 If given a numerical prefix, you can do semi-manual charset stuff.
5202 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5203 encoded in the @code{cn-gb-2312} charset.  If you have
5204
5205 @lisp
5206 (setq gnus-summary-show-article-charset-alist
5207       '((1 . cn-gb-2312)
5208         (2 . big5)))
5209 @end lisp
5210
5211 then you can say @kbd{C-u 1 g} to get the same effect.
5212
5213 @item A <
5214 @itemx <
5215 @kindex < (Summary)
5216 @kindex A < (Summary)
5217 @findex gnus-summary-beginning-of-article
5218 Scroll to the beginning of the article
5219 (@code{gnus-summary-beginning-of-article}).
5220
5221 @item A >
5222 @itemx >
5223 @kindex > (Summary)
5224 @kindex A > (Summary)
5225 @findex gnus-summary-end-of-article
5226 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5227
5228 @item A s
5229 @itemx s
5230 @kindex A s (Summary)
5231 @kindex s (Summary)
5232 @findex gnus-summary-isearch-article
5233 Perform an isearch in the article buffer
5234 (@code{gnus-summary-isearch-article}).
5235
5236 @item h
5237 @kindex h (Summary)
5238 @findex gnus-summary-select-article-buffer
5239 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5240
5241 @end table
5242
5243
5244 @node Reply Followup and Post
5245 @section Reply, Followup and Post
5246
5247 @menu
5248 * Summary Mail Commands::       Sending mail.
5249 * Summary Post Commands::       Sending news.
5250 * Summary Message Commands::    Other Message-related commands.
5251 * Canceling and Superseding::
5252 @end menu
5253
5254
5255 @node Summary Mail Commands
5256 @subsection Summary Mail Commands
5257 @cindex mail
5258 @cindex composing mail
5259
5260 Commands for composing a mail message:
5261
5262 @table @kbd
5263
5264 @item S r
5265 @itemx r
5266 @kindex S r (Summary)
5267 @kindex r (Summary)
5268 @findex gnus-summary-reply
5269 @c @icon{gnus-summary-mail-reply}
5270 @c @icon{gnus-summary-reply}
5271 Mail a reply to the author of the current article
5272 (@code{gnus-summary-reply}).
5273
5274 @item S R
5275 @itemx R
5276 @kindex R (Summary)
5277 @kindex S R (Summary)
5278 @findex gnus-summary-reply-with-original
5279 @c @icon{gnus-summary-reply-with-original}
5280 Mail a reply to the author of the current article and include the
5281 original message (@code{gnus-summary-reply-with-original}).  This
5282 command uses the process/prefix convention.
5283
5284 @item S w
5285 @kindex S w (Summary)
5286 @findex gnus-summary-wide-reply
5287 Mail a wide reply to the author of the current article
5288 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5289 goes out to all people listed in the @code{To}, @code{From} (or
5290 @code{Reply-to}) and @code{Cc} headers.  If @code{Mail-Followup-To} is
5291 present, that's used instead.
5292
5293 @item S W
5294 @kindex S W (Summary)
5295 @findex gnus-summary-wide-reply-with-original
5296 Mail a wide reply to the current article and include the original
5297 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5298 the process/prefix convention.
5299
5300 @item S v
5301 @kindex S v (Summary)
5302 @findex gnus-summary-very-wide-reply
5303 Mail a very wide reply to the author of the current article
5304 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5305 that goes out to all people listed in the @code{To}, @code{From} (or
5306 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5307 articles.  This command uses the process/prefix convention.
5308
5309 @item S V
5310 @kindex S V (Summary)
5311 @findex gnus-summary-very-wide-reply-with-original
5312 Mail a very wide reply to the author of the current article and include the
5313 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5314 command uses the process/prefix convention.
5315
5316 @item S B r
5317 @kindex S B r (Summary)
5318 @findex gnus-summary-reply-broken-reply-to
5319 Mail a reply to the author of the current article but ignore the
5320 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5321 If you need this because a mailing list incorrectly sets a
5322 @code{Reply-To} header pointing to the list, you probably want to set
5323 the @code{broken-reply-to} group parameter instead, so things will work
5324 correctly.  @xref{Group Parameters}.
5325
5326 @item S B R
5327 @kindex S B R (Summary)
5328 @findex gnus-summary-reply-broken-reply-to-with-original
5329 Mail a reply to the author of the current article and include the
5330 original message but ignore the @code{Reply-To} field
5331 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5332
5333 @item S o m
5334 @itemx C-c C-f
5335 @kindex S o m (Summary)
5336 @kindex C-c C-f (Summary)
5337 @findex gnus-summary-mail-forward
5338 @c @icon{gnus-summary-mail-forward}
5339 Forward the current article to some other person
5340 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
5341 is forwarded according to the value of (@code{message-forward-as-mime})
5342 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
5343 message and forward directly inline; if the prefix is 2, forward message
5344 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5345 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5346 directly inline; otherwise, the message is forwarded as no prefix given
5347 but use the flipped value of (@code{message-forward-as-mime}).  By
5348 default, the message is decoded and forwarded as an rfc822 @acronym{MIME}
5349 section.
5350
5351 @item S m
5352 @itemx m
5353 @kindex m (Summary)
5354 @kindex S m (Summary)
5355 @findex gnus-summary-mail-other-window
5356 @c @icon{gnus-summary-mail-originate}
5357 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5358 the posting style of the current group.  If given a prefix, disable that.
5359 If the prefix is 1, prompt for a group name to find the posting style.
5360
5361 @item S i
5362 @itemx i
5363 @kindex i (Summary)
5364 @kindex S i (Summary)
5365 @findex gnus-summary-news-other-window
5366 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5367 post to the current group.  If given a prefix, disable that.  If the
5368 prefix is 1, prompt for a group to post to.
5369
5370 This function actually prepares a news even when using mail groups.
5371 This is useful for ``posting'' messages to mail groups without actually
5372 sending them over the network: they're just saved directly to the group
5373 in question.  The corresponding back end must have a request-post method
5374 for this to work though.
5375
5376 @item S D b
5377 @kindex S D b (Summary)
5378 @findex gnus-summary-resend-bounced-mail
5379 @cindex bouncing mail
5380 If you have sent a mail, but the mail was bounced back to you for some
5381 reason (wrong address, transient failure), you can use this command to
5382 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5383 will be popped into a mail buffer where you can edit the headers before
5384 sending the mail off again.  If you give a prefix to this command, and
5385 the bounced mail is a reply to some other mail, Gnus will try to fetch
5386 that mail and display it for easy perusal of its headers.  This might
5387 very well fail, though.
5388
5389 @item S D r
5390 @kindex S D r (Summary)
5391 @findex gnus-summary-resend-message
5392 Not to be confused with the previous command,
5393 @code{gnus-summary-resend-message} will prompt you for an address to
5394 send the current message off to, and then send it to that place.  The
5395 headers of the message won't be altered---but lots of headers that say
5396 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5397 means that you actually send a mail to someone that has a @code{To}
5398 header that (probably) points to yourself.  This will confuse people.
5399 So, natcherly you'll only do that if you're really eVIl.
5400
5401 This command is mainly used if you have several accounts and want to
5402 ship a mail to a different account of yours.  (If you're both
5403 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5404 to the @code{root} account, you may want to resend it to
5405 @code{postmaster}.  Ordnung muss sein!
5406
5407 This command understands the process/prefix convention
5408 (@pxref{Process/Prefix}).
5409
5410 @item S D e
5411 @kindex S D e (Summary)
5412 @findex gnus-summary-resend-message-edit
5413
5414 Like the previous command, but will allow you to edit the message as
5415 if it were a new message before resending.
5416
5417 @item S O m
5418 @kindex S O m (Summary)
5419 @findex gnus-uu-digest-mail-forward
5420 Digest the current series (@pxref{Decoding Articles}) and forward the
5421 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
5422 uses the process/prefix convention (@pxref{Process/Prefix}).
5423
5424 @item S M-c
5425 @kindex S M-c (Summary)
5426 @findex gnus-summary-mail-crosspost-complaint
5427 @cindex crossposting
5428 @cindex excessive crossposting
5429 Send a complaint about excessive crossposting to the author of the
5430 current article (@code{gnus-summary-mail-crosspost-complaint}).
5431
5432 @findex gnus-crosspost-complaint
5433 This command is provided as a way to fight back against the current
5434 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5435 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5436 command understands the process/prefix convention
5437 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5438
5439 @end table
5440
5441 Also @xref{Header Commands, ,Header Commands, message, The Message
5442 Manual}, for more information.
5443
5444
5445 @node Summary Post Commands
5446 @subsection Summary Post Commands
5447 @cindex post
5448 @cindex composing news
5449
5450 Commands for posting a news article:
5451
5452 @table @kbd
5453 @item S p
5454 @itemx a
5455 @kindex a (Summary)
5456 @kindex S p (Summary)
5457 @findex gnus-summary-post-news
5458 @c @icon{gnus-summary-post-news}
5459 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5460 default, post to the current group.  If given a prefix, disable that.
5461 If the prefix is 1, prompt for another group instead.
5462
5463 @item S f
5464 @itemx f
5465 @kindex f (Summary)
5466 @kindex S f (Summary)
5467 @findex gnus-summary-followup
5468 @c @icon{gnus-summary-followup}
5469 Post a followup to the current article (@code{gnus-summary-followup}).
5470
5471 @item S F
5472 @itemx F
5473 @kindex S F (Summary)
5474 @kindex F (Summary)
5475 @c @icon{gnus-summary-followup-with-original}
5476 @findex gnus-summary-followup-with-original
5477 Post a followup to the current article and include the original message
5478 (@code{gnus-summary-followup-with-original}).  This command uses the
5479 process/prefix convention.
5480
5481 @item S n
5482 @kindex S n (Summary)
5483 @findex gnus-summary-followup-to-mail
5484 Post a followup to the current article via news, even if you got the
5485 message through mail (@code{gnus-summary-followup-to-mail}).
5486
5487 @item S N
5488 @kindex S N (Summary)
5489 @findex gnus-summary-followup-to-mail-with-original
5490 Post a followup to the current article via news, even if you got the
5491 message through mail and include the original message
5492 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5493 the process/prefix convention.
5494
5495 @item S o p
5496 @kindex S o p (Summary)
5497 @findex gnus-summary-post-forward
5498 Forward the current article to a newsgroup
5499 (@code{gnus-summary-post-forward}).
5500  If no prefix is given, the message is forwarded according to the value
5501 of (@code{message-forward-as-mime}) and
5502 (@code{message-forward-show-mml}); if the prefix is 1, decode the
5503 message and forward directly inline; if the prefix is 2, forward message
5504 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5505 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5506 directly inline; otherwise, the message is forwarded as no prefix given
5507 but use the flipped value of (@code{message-forward-as-mime}).  By
5508 default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section.
5509
5510 @item S O p
5511 @kindex S O p (Summary)
5512 @findex gnus-uu-digest-post-forward
5513 @cindex digests
5514 @cindex making digests
5515 Digest the current series and forward the result to a newsgroup
5516 (@code{gnus-uu-digest-mail-forward}).  This command uses the
5517 process/prefix convention.
5518
5519 @item S u
5520 @kindex S u (Summary)
5521 @findex gnus-uu-post-news
5522 @c @icon{gnus-uu-post-news}
5523 Uuencode a file, split it into parts, and post it as a series
5524 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5525 @end table
5526
5527 Also @xref{Header Commands, ,Header Commands, message, The Message
5528 Manual}, for more information.
5529
5530
5531 @node Summary Message Commands
5532 @subsection Summary Message Commands
5533
5534 @table @kbd
5535 @item S y
5536 @kindex S y (Summary)
5537 @findex gnus-summary-yank-message
5538 Yank the current article into an already existing Message composition
5539 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5540 what message buffer you want to yank into, and understands the
5541 process/prefix convention (@pxref{Process/Prefix}).
5542
5543 @end table
5544
5545
5546 @node Canceling and Superseding
5547 @subsection Canceling Articles
5548 @cindex canceling articles
5549 @cindex superseding articles
5550
5551 Have you ever written something, and then decided that you really,
5552 really, really wish you hadn't posted that?
5553
5554 Well, you can't cancel mail, but you can cancel posts.
5555
5556 @findex gnus-summary-cancel-article
5557 @kindex C (Summary)
5558 @c @icon{gnus-summary-cancel-article}
5559 Find the article you wish to cancel (you can only cancel your own
5560 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5561 c} (@code{gnus-summary-cancel-article}).  Your article will be
5562 canceled---machines all over the world will be deleting your article.
5563 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5564
5565 Be aware, however, that not all sites honor cancels, so your article may
5566 live on here and there, while most sites will delete the article in
5567 question.
5568
5569 Gnus will use the ``current'' select method when canceling.  If you
5570 want to use the standard posting method, use the @samp{a} symbolic
5571 prefix (@pxref{Symbolic Prefixes}).
5572
5573 Gnus ensures that only you can cancel your own messages using a
5574 @code{Cancel-Lock} header (@pxref{Canceling News, Canceling News, ,
5575 message, Message Manual}).
5576
5577 If you discover that you have made some mistakes and want to do some
5578 corrections, you can post a @dfn{superseding} article that will replace
5579 your original article.
5580
5581 @findex gnus-summary-supersede-article
5582 @kindex S (Summary)
5583 Go to the original article and press @kbd{S s}
5584 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5585 where you can edit the article all you want before sending it off the
5586 usual way.
5587
5588 The same goes for superseding as for canceling, only more so: Some
5589 sites do not honor superseding.  On those sites, it will appear that you
5590 have posted almost the same article twice.
5591
5592 If you have just posted the article, and change your mind right away,
5593 there is a trick you can use to cancel/supersede the article without
5594 waiting for the article to appear on your site first.  You simply return
5595 to the post buffer (which is called @code{*sent ...*}).  There you will
5596 find the article you just posted, with all the headers intact.  Change
5597 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5598 header by substituting one of those words for the word
5599 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5600 you would do normally.  The previous article will be
5601 canceled/superseded.
5602
5603 Just remember, kids: There is no 'c' in 'supersede'.
5604
5605 @node Delayed Articles
5606 @section Delayed Articles
5607 @cindex delayed sending
5608 @cindex send delayed
5609
5610 Sometimes, you might wish to delay the sending of a message.  For
5611 example, you might wish to arrange for a message to turn up just in time
5612 to remind your about the birthday of your Significant Other.  For this,
5613 there is the @code{gnus-delay} package.  Setup is simple:
5614
5615 @lisp
5616 (gnus-delay-initialize)
5617 @end lisp
5618
5619 @findex gnus-delay-article
5620 Normally, to send a message you use the @kbd{C-c C-c} command from
5621 Message mode.  To delay a message, use @kbd{C-c C-j}
5622 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5623 message should be delayed.  Possible answers are:
5624
5625 @itemize @bullet
5626 @item
5627 A time span.  Consists of an integer and a letter.  For example,
5628 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5629 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5630 (months) and @code{Y} (years).
5631
5632 @item
5633 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
5634 delayed until that day, at a specific time (eight o'clock by default).
5635 See also @code{gnus-delay-default-hour}.
5636
5637 @item
5638 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5639 stuff.  The deadline will be at that time today, except if that time has
5640 already passed, then it's at the given time tomorrow.  So if it's ten
5641 o'clock in the morning and you specify @code{11:15}, then the deadline
5642 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5643 that means a time tomorrow.
5644 @end itemize
5645
5646 The action of the @code{gnus-delay-article} command is influenced by a
5647 couple of variables:
5648
5649 @table @code
5650 @item gnus-delay-default-hour
5651 @vindex gnus-delay-default-hour
5652 When you specify a specific date, the message will be due on that hour
5653 on the given date.  Possible values are integers 0 through 23.
5654
5655 @item gnus-delay-default-delay
5656 @vindex gnus-delay-default-delay
5657 This is a string and gives the default delay.  It can be of any of the
5658 formats described above.
5659
5660 @item gnus-delay-group
5661 @vindex gnus-delay-group
5662 Delayed articles will be kept in this group on the drafts server until
5663 they are due.  You probably don't need to change this.  The default
5664 value is @code{"delayed"}.
5665
5666 @item gnus-delay-header
5667 @vindex gnus-delay-header
5668 The deadline for each article will be stored in a header.  This variable
5669 is a string and gives the header name.  You probably don't need to
5670 change this.  The default value is @code{"X-Gnus-Delayed"}.
5671 @end table
5672
5673 The way delaying works is like this: when you use the
5674 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5675 calculates the deadline of the message and stores it in the
5676 @code{X-Gnus-Delayed} header and puts the message in the
5677 @code{nndraft:delayed} group.
5678
5679 @findex gnus-delay-send-queue
5680 And whenever you get new news, Gnus looks through the group for articles
5681 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5682 function for this.  By default, this function is added to the hook
5683 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5684 Maybe you want to use the demon to send drafts?  Just tell the demon to
5685 execute the @code{gnus-delay-send-queue} function.
5686
5687 @table @code
5688 @item gnus-delay-initialize
5689 @findex gnus-delay-initialize
5690 By default, this function installs @code{gnus-delay-send-queue} in
5691 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5692 argument @code{no-check}.  If it is non-@code{nil},
5693 @code{gnus-get-new-news-hook} is not changed.  The optional first
5694 argument is ignored.
5695
5696 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5697 Presumably, you want to use the demon for sending due delayed articles.
5698 Just don't forget to set that up :-)
5699 @end table
5700
5701
5702 @node Marking Articles
5703 @section Marking Articles
5704 @cindex article marking
5705 @cindex article ticking
5706 @cindex marks
5707
5708 There are several marks you can set on an article.
5709
5710 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5711 neologism ohoy!) of the article.  Alphabetic marks generally mean
5712 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5713
5714 In addition, you also have marks that do not affect readedness.
5715
5716 @menu
5717 * Unread Articles::             Marks for unread articles.
5718 * Read Articles::               Marks for read articles.
5719 * Other Marks::                 Marks that do not affect readedness.
5720 @end menu
5721
5722 @ifinfo
5723 There's a plethora of commands for manipulating these marks:
5724 @end ifinfo
5725
5726 @menu
5727 * Setting Marks::             How to set and remove marks.
5728 * Generic Marking Commands::  How to customize the marking.
5729 * Setting Process Marks::     How to mark articles for later processing.
5730 @end menu
5731
5732
5733 @node Unread Articles
5734 @subsection Unread Articles
5735
5736 The following marks mark articles as (kinda) unread, in one form or
5737 other.
5738
5739 @table @samp
5740 @item !
5741 @vindex gnus-ticked-mark
5742 Marked as ticked (@code{gnus-ticked-mark}).
5743
5744 @dfn{Ticked articles} are articles that will remain visible always.  If
5745 you see an article that you find interesting, or you want to put off
5746 reading it, or replying to it, until sometime later, you'd typically
5747 tick it.  However, articles can be expired (from news servers by the
5748 news server software, Gnus itself never expires ticked messages), so if
5749 you want to keep an article forever, you'll have to make it persistent
5750 (@pxref{Persistent Articles}).
5751
5752 @item ?
5753 @vindex gnus-dormant-mark
5754 Marked as dormant (@code{gnus-dormant-mark}).
5755
5756 @dfn{Dormant articles} will only appear in the summary buffer if there
5757 are followups to it.  If you want to see them even if they don't have
5758 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5759 Otherwise (except for the visibility issue), they are just like ticked
5760 messages.
5761
5762 @item SPACE
5763 @vindex gnus-unread-mark
5764 Marked as unread (@code{gnus-unread-mark}).
5765
5766 @dfn{Unread articles} are articles that haven't been read at all yet.
5767 @end table
5768
5769
5770 @node Read Articles
5771 @subsection Read Articles
5772 @cindex expirable mark
5773
5774 All the following marks mark articles as read.
5775
5776 @table @samp
5777
5778 @item r
5779 @vindex gnus-del-mark
5780 These are articles that the user has marked as read with the @kbd{d}
5781 command manually, more or less (@code{gnus-del-mark}).
5782
5783 @item R
5784 @vindex gnus-read-mark
5785 Articles that have actually been read (@code{gnus-read-mark}).
5786
5787 @item O
5788 @vindex gnus-ancient-mark
5789 Articles that were marked as read in previous sessions and are now
5790 @dfn{old} (@code{gnus-ancient-mark}).
5791
5792 @item K
5793 @vindex gnus-killed-mark
5794 Marked as killed (@code{gnus-killed-mark}).
5795
5796 @item X
5797 @vindex gnus-kill-file-mark
5798 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5799
5800 @item Y
5801 @vindex gnus-low-score-mark
5802 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5803
5804 @item C
5805 @vindex gnus-catchup-mark
5806 Marked as read by a catchup (@code{gnus-catchup-mark}).
5807
5808 @item G
5809 @vindex gnus-canceled-mark
5810 Canceled article (@code{gnus-canceled-mark})
5811
5812 @item F
5813 @vindex gnus-souped-mark
5814 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5815
5816 @item Q
5817 @vindex gnus-sparse-mark
5818 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5819 Threading}.
5820
5821 @item M
5822 @vindex gnus-duplicate-mark
5823 Article marked as read by duplicate suppression
5824 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5825
5826 @end table
5827
5828 All these marks just mean that the article is marked as read, really.
5829 They are interpreted differently when doing adaptive scoring, though.
5830
5831 One more special mark, though:
5832
5833 @table @samp
5834 @item E
5835 @vindex gnus-expirable-mark
5836 Marked as expirable (@code{gnus-expirable-mark}).
5837
5838 Marking articles as @dfn{expirable} (or have them marked as such
5839 automatically) doesn't make much sense in normal groups---a user doesn't
5840 control expiring of news articles, but in mail groups, for instance,
5841 articles marked as @dfn{expirable} can be deleted by Gnus at
5842 any time.
5843 @end table
5844
5845
5846 @node Other Marks
5847 @subsection Other Marks
5848 @cindex process mark
5849 @cindex bookmarks
5850
5851 There are some marks that have nothing to do with whether the article is
5852 read or not.
5853
5854 @itemize @bullet
5855
5856 @item
5857 You can set a bookmark in the current article.  Say you are reading a
5858 long thesis on cats' urinary tracts, and have to go home for dinner
5859 before you've finished reading the thesis.  You can then set a bookmark
5860 in the article, and Gnus will jump to this bookmark the next time it
5861 encounters the article.  @xref{Setting Marks}.
5862
5863 @item
5864 @vindex gnus-replied-mark
5865 All articles that you have replied to or made a followup to (i.e., have
5866 answered) will be marked with an @samp{A} in the second column
5867 (@code{gnus-replied-mark}).
5868
5869 @item
5870 @vindex gnus-forwarded-mark
5871 All articles that you have forwarded will be marked with an @samp{F} in
5872 the second column (@code{gnus-forwarded-mark}).
5873
5874 @item
5875 @vindex gnus-cached-mark
5876 Articles stored in the article cache will be marked with an @samp{*} in
5877 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5878
5879 @item
5880 @vindex gnus-saved-mark
5881 Articles ``saved'' (in some manner or other; not necessarily
5882 religiously) are marked with an @samp{S} in the second column
5883 (@code{gnus-saved-mark}).
5884
5885 @item
5886 @vindex gnus-recent-mark
5887 Articles that according to the server haven't been shown to the user
5888 before are marked with a @samp{N} in the second column
5889 (@code{gnus-recent-mark}).  Note that not all servers support this
5890 mark, in which case it simply never appears.  Compare with
5891 @code{gnus-unseen-mark}.
5892
5893 @item
5894 @vindex gnus-unseen-mark
5895 Articles that haven't been seen before in Gnus by the user are marked
5896 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5897 Compare with @code{gnus-recent-mark}.
5898
5899 @item
5900 @vindex gnus-downloaded-mark
5901 When using the Gnus agent (@pxref{Agent Basics}), articles may be
5902 downloaded for unplugged (offline) viewing.  If you are using the
5903 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
5904 (The variable @code{gnus-downloaded-mark} controls which character to
5905 use.)
5906
5907 @item
5908 @vindex gnus-undownloaded-mark
5909 When using the Gnus agent (@pxref{Agent Basics}), some articles might
5910 not have been downloaded.  Such articles cannot be viewed while you
5911 are unplugged (offline).  If you are using the @samp{%O} spec, these
5912 articles get the @samp{-} mark in that spec.  (The variable
5913 @code{gnus-undownloaded-mark} controls which character to use.)
5914
5915 @item
5916 @vindex gnus-downloadable-mark
5917 The Gnus agent (@pxref{Agent Basics}) downloads some articles
5918 automatically, but it is also possible to explicitly mark articles for
5919 download, even if they would not be downloaded automatically.  Such
5920 explicitly-marked articles get the @samp{%} mark in the first column.
5921 (The variable @code{gnus-downloadable-mark} controls which character to
5922 use.)
5923
5924 @item
5925 @vindex gnus-not-empty-thread-mark
5926 @vindex gnus-empty-thread-mark
5927 If the @samp{%e} spec is used, the presence of threads or not will be
5928 marked with @code{gnus-not-empty-thread-mark} and
5929 @code{gnus-empty-thread-mark} in the third column, respectively.
5930
5931 @item
5932 @vindex gnus-process-mark
5933 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5934 variety of commands react to the presence of the process mark.  For
5935 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5936 all articles that have been marked with the process mark.  Articles
5937 marked with the process mark have a @samp{#} in the second column.
5938
5939 @end itemize
5940
5941 You might have noticed that most of these ``non-readedness'' marks
5942 appear in the second column by default.  So if you have a cached, saved,
5943 replied article that you have process-marked, what will that look like?
5944
5945 Nothing much.  The precedence rules go as follows: process -> cache ->
5946 replied -> saved.  So if the article is in the cache and is replied,
5947 you'll only see the cache mark and not the replied mark.
5948
5949
5950 @node Setting Marks
5951 @subsection Setting Marks
5952 @cindex setting marks
5953
5954 All the marking commands understand the numeric prefix.
5955
5956 @table @kbd
5957 @item M c
5958 @itemx M-u
5959 @kindex M c (Summary)
5960 @kindex M-u (Summary)
5961 @findex gnus-summary-clear-mark-forward
5962 @cindex mark as unread
5963 Clear all readedness-marks from the current article
5964 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5965 article as unread.
5966
5967 @item M t
5968 @itemx !
5969 @kindex ! (Summary)
5970 @kindex M t (Summary)
5971 @findex gnus-summary-tick-article-forward
5972 Tick the current article (@code{gnus-summary-tick-article-forward}).
5973 @xref{Article Caching}.
5974
5975 @item M ?
5976 @itemx ?
5977 @kindex ? (Summary)
5978 @kindex M ? (Summary)
5979 @findex gnus-summary-mark-as-dormant
5980 Mark the current article as dormant
5981 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5982
5983 @item M d
5984 @itemx d
5985 @kindex M d (Summary)
5986 @kindex d (Summary)
5987 @findex gnus-summary-mark-as-read-forward
5988 Mark the current article as read
5989 (@code{gnus-summary-mark-as-read-forward}).
5990
5991 @item D
5992 @kindex D (Summary)
5993 @findex gnus-summary-mark-as-read-backward
5994 Mark the current article as read and move point to the previous line
5995 (@code{gnus-summary-mark-as-read-backward}).
5996
5997 @item M k
5998 @itemx k
5999 @kindex k (Summary)
6000 @kindex M k (Summary)
6001 @findex gnus-summary-kill-same-subject-and-select
6002 Mark all articles that have the same subject as the current one as read,
6003 and then select the next unread article
6004 (@code{gnus-summary-kill-same-subject-and-select}).
6005
6006 @item M K
6007 @itemx C-k
6008 @kindex M K (Summary)
6009 @kindex C-k (Summary)
6010 @findex gnus-summary-kill-same-subject
6011 Mark all articles that have the same subject as the current one as read
6012 (@code{gnus-summary-kill-same-subject}).
6013
6014 @item M C
6015 @kindex M C (Summary)
6016 @findex gnus-summary-catchup
6017 @c @icon{gnus-summary-catchup}
6018 Mark all unread articles as read (@code{gnus-summary-catchup}).
6019
6020 @item M C-c
6021 @kindex M C-c (Summary)
6022 @findex gnus-summary-catchup-all
6023 Mark all articles in the group as read---even the ticked and dormant
6024 articles (@code{gnus-summary-catchup-all}).
6025
6026 @item M H
6027 @kindex M H (Summary)
6028 @findex gnus-summary-catchup-to-here
6029 Catchup the current group to point (before the point)
6030 (@code{gnus-summary-catchup-to-here}).
6031
6032 @item M h
6033 @kindex M h (Summary)
6034 @findex gnus-summary-catchup-from-here
6035 Catchup the current group from point (after the point)
6036 (@code{gnus-summary-catchup-from-here}).
6037
6038 @item C-w
6039 @kindex C-w (Summary)
6040 @findex gnus-summary-mark-region-as-read
6041 Mark all articles between point and mark as read
6042 (@code{gnus-summary-mark-region-as-read}).
6043
6044 @item M V k
6045 @kindex M V k (Summary)
6046 @findex gnus-summary-kill-below
6047 Kill all articles with scores below the default score (or below the
6048 numeric prefix) (@code{gnus-summary-kill-below}).
6049
6050 @item M e
6051 @itemx E
6052 @kindex M e (Summary)
6053 @kindex E (Summary)
6054 @findex gnus-summary-mark-as-expirable
6055 Mark the current article as expirable
6056 (@code{gnus-summary-mark-as-expirable}).
6057
6058 @item M b
6059 @kindex M b (Summary)
6060 @findex gnus-summary-set-bookmark
6061 Set a bookmark in the current article
6062 (@code{gnus-summary-set-bookmark}).
6063
6064 @item M B
6065 @kindex M B (Summary)
6066 @findex gnus-summary-remove-bookmark
6067 Remove the bookmark from the current article
6068 (@code{gnus-summary-remove-bookmark}).
6069
6070 @item M V c
6071 @kindex M V c (Summary)
6072 @findex gnus-summary-clear-above
6073 Clear all marks from articles with scores over the default score (or
6074 over the numeric prefix) (@code{gnus-summary-clear-above}).
6075
6076 @item M V u
6077 @kindex M V u (Summary)
6078 @findex gnus-summary-tick-above
6079 Tick all articles with scores over the default score (or over the
6080 numeric prefix) (@code{gnus-summary-tick-above}).
6081
6082 @item M V m
6083 @kindex M V m (Summary)
6084 @findex gnus-summary-mark-above
6085 Prompt for a mark, and mark all articles with scores over the default
6086 score (or over the numeric prefix) with this mark
6087 (@code{gnus-summary-clear-above}).
6088 @end table
6089
6090 @vindex gnus-summary-goto-unread
6091 The @code{gnus-summary-goto-unread} variable controls what action should
6092 be taken after setting a mark.  If non-@code{nil}, point will move to
6093 the next/previous unread article.  If @code{nil}, point will just move
6094 one line up or down.  As a special case, if this variable is
6095 @code{never}, all the marking commands as well as other commands (like
6096 @kbd{SPACE}) will move to the next article, whether it is unread or not.
6097 The default is @code{t}.
6098
6099
6100 @node Generic Marking Commands
6101 @subsection Generic Marking Commands
6102
6103 Some people would like the command that ticks an article (@kbd{!}) go to
6104 the next article.  Others would like it to go to the next unread
6105 article.  Yet others would like it to stay on the current article.  And
6106 even though I haven't heard of anybody wanting it to go to the
6107 previous (unread) article, I'm sure there are people that want that as
6108 well.
6109
6110 Multiply these five behaviors with five different marking commands, and
6111 you get a potentially complex set of variable to control what each
6112 command should do.
6113
6114 To sidestep that mess, Gnus provides commands that do all these
6115 different things.  They can be found on the @kbd{M M} map in the summary
6116 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
6117 to list in this manual.
6118
6119 While you can use these commands directly, most users would prefer
6120 altering the summary mode keymap.  For instance, if you would like the
6121 @kbd{!} command to go to the next article instead of the next unread
6122 article, you could say something like:
6123
6124 @lisp
6125 @group
6126 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
6127 (defun my-alter-summary-map ()
6128   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
6129 @end group
6130 @end lisp
6131
6132 @noindent
6133 or
6134
6135 @lisp
6136 (defun my-alter-summary-map ()
6137   (local-set-key "!" "MM!n"))
6138 @end lisp
6139
6140
6141 @node Setting Process Marks
6142 @subsection Setting Process Marks
6143 @cindex setting process marks
6144
6145 Process marks are displayed as @code{#} in the summary buffer, and are
6146 used for marking articles in such a way that other commands will
6147 process these articles.  For instance, if you process mark four
6148 articles and then use the @kbd{*} command, Gnus will enter these four
6149 commands into the cache.  For more information,
6150 @pxref{Process/Prefix}.
6151
6152 @table @kbd
6153
6154 @item M P p
6155 @itemx #
6156 @kindex # (Summary)
6157 @kindex M P p (Summary)
6158 @findex gnus-summary-mark-as-processable
6159 Mark the current article with the process mark
6160 (@code{gnus-summary-mark-as-processable}).
6161 @findex gnus-summary-unmark-as-processable
6162
6163 @item M P u
6164 @itemx M-#
6165 @kindex M P u (Summary)
6166 @kindex M-# (Summary)
6167 Remove the process mark, if any, from the current article
6168 (@code{gnus-summary-unmark-as-processable}).
6169
6170 @item M P U
6171 @kindex M P U (Summary)
6172 @findex gnus-summary-unmark-all-processable
6173 Remove the process mark from all articles
6174 (@code{gnus-summary-unmark-all-processable}).
6175
6176 @item M P i
6177 @kindex M P i (Summary)
6178 @findex gnus-uu-invert-processable
6179 Invert the list of process marked articles
6180 (@code{gnus-uu-invert-processable}).
6181
6182 @item M P R
6183 @kindex M P R (Summary)
6184 @findex gnus-uu-mark-by-regexp
6185 Mark articles that have a @code{Subject} header that matches a regular
6186 expression (@code{gnus-uu-mark-by-regexp}).
6187
6188 @item M P G
6189 @kindex M P G (Summary)
6190 @findex gnus-uu-unmark-by-regexp
6191 Unmark articles that have a @code{Subject} header that matches a regular
6192 expression (@code{gnus-uu-unmark-by-regexp}).
6193
6194 @item M P r
6195 @kindex M P r (Summary)
6196 @findex gnus-uu-mark-region
6197 Mark articles in region (@code{gnus-uu-mark-region}).
6198
6199 @item M P g
6200 @kindex M P g (Summary)
6201 @findex gnus-uu-unmark-region
6202 Unmark articles in region (@code{gnus-uu-unmark-region}).
6203
6204 @item M P t
6205 @kindex M P t (Summary)
6206 @findex gnus-uu-mark-thread
6207 Mark all articles in the current (sub)thread
6208 (@code{gnus-uu-mark-thread}).
6209
6210 @item M P T
6211 @kindex M P T (Summary)
6212 @findex gnus-uu-unmark-thread
6213 Unmark all articles in the current (sub)thread
6214 (@code{gnus-uu-unmark-thread}).
6215
6216 @item M P v
6217 @kindex M P v (Summary)
6218 @findex gnus-uu-mark-over
6219 Mark all articles that have a score above the prefix argument
6220 (@code{gnus-uu-mark-over}).
6221
6222 @item M P s
6223 @kindex M P s (Summary)
6224 @findex gnus-uu-mark-series
6225 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6226
6227 @item M P S
6228 @kindex M P S (Summary)
6229 @findex gnus-uu-mark-sparse
6230 Mark all series that have already had some articles marked
6231 (@code{gnus-uu-mark-sparse}).
6232
6233 @item M P a
6234 @kindex M P a (Summary)
6235 @findex gnus-uu-mark-all
6236 Mark all articles in series order (@code{gnus-uu-mark-series}).
6237
6238 @item M P b
6239 @kindex M P b (Summary)
6240 @findex gnus-uu-mark-buffer
6241 Mark all articles in the buffer in the order they appear
6242 (@code{gnus-uu-mark-buffer}).
6243
6244 @item M P k
6245 @kindex M P k (Summary)
6246 @findex gnus-summary-kill-process-mark
6247 Push the current process mark set onto the stack and unmark all articles
6248 (@code{gnus-summary-kill-process-mark}).
6249
6250 @item M P y
6251 @kindex M P y (Summary)
6252 @findex gnus-summary-yank-process-mark
6253 Pop the previous process mark set from the stack and restore it
6254 (@code{gnus-summary-yank-process-mark}).
6255
6256 @item M P w
6257 @kindex M P w (Summary)
6258 @findex gnus-summary-save-process-mark
6259 Push the current process mark set onto the stack
6260 (@code{gnus-summary-save-process-mark}).
6261
6262 @end table
6263
6264 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
6265 set process marks based on article body contents.
6266
6267
6268 @node Limiting
6269 @section Limiting
6270 @cindex limiting
6271
6272 It can be convenient to limit the summary buffer to just show some
6273 subset of the articles currently in the group.  The effect most limit
6274 commands have is to remove a few (or many) articles from the summary
6275 buffer.
6276
6277 All limiting commands work on subsets of the articles already fetched
6278 from the servers.  None of these commands query the server for
6279 additional articles.
6280
6281 @table @kbd
6282
6283 @item / /
6284 @itemx / s
6285 @kindex / / (Summary)
6286 @findex gnus-summary-limit-to-subject
6287 Limit the summary buffer to articles that match some subject
6288 (@code{gnus-summary-limit-to-subject}).  If given a prefix, exclude
6289 matching articles.
6290
6291 @item / a
6292 @kindex / a (Summary)
6293 @findex gnus-summary-limit-to-author
6294 Limit the summary buffer to articles that match some author
6295 (@code{gnus-summary-limit-to-author}).  If given a prefix, exclude
6296 matching articles.
6297
6298 @item / x
6299 @kindex / x (Summary)
6300 @findex gnus-summary-limit-to-extra
6301 Limit the summary buffer to articles that match one of the ``extra''
6302 headers (@pxref{To From Newsgroups})
6303 (@code{gnus-summary-limit-to-extra}).  If given a prefix, exclude
6304 matching articles.
6305
6306 @item / u
6307 @itemx x
6308 @kindex / u (Summary)
6309 @kindex x (Summary)
6310 @findex gnus-summary-limit-to-unread
6311 Limit the summary buffer to articles not marked as read
6312 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6313 buffer to articles strictly unread.  This means that ticked and
6314 dormant articles will also be excluded.
6315
6316 @item / m
6317 @kindex / m (Summary)
6318 @findex gnus-summary-limit-to-marks
6319 Ask for a mark and then limit to all articles that have been marked
6320 with that mark (@code{gnus-summary-limit-to-marks}).
6321
6322 @item / t
6323 @kindex / t (Summary)
6324 @findex gnus-summary-limit-to-age
6325 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6326 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6327 articles younger than that number of days.
6328
6329 @item / n
6330 @kindex / n (Summary)
6331 @findex gnus-summary-limit-to-articles
6332 Limit the summary buffer to the current article
6333 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6334 convention (@pxref{Process/Prefix}).
6335
6336 @item / w
6337 @kindex / w (Summary)
6338 @findex gnus-summary-pop-limit
6339 Pop the previous limit off the stack and restore it
6340 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6341 the stack.
6342
6343 @item / .
6344 @kindex / . (Summary)
6345 @findex gnus-summary-limit-to-unseen
6346 Limit the summary buffer to the unseen articles
6347 (@code{gnus-summary-limit-to-unseen}).
6348
6349 @item / v
6350 @kindex / v (Summary)
6351 @findex gnus-summary-limit-to-score
6352 Limit the summary buffer to articles that have a score at or above some
6353 score (@code{gnus-summary-limit-to-score}).
6354
6355 @item / p
6356 @kindex / p (Summary)
6357 @findex gnus-summary-limit-to-display-predicate
6358 Limit the summary buffer to articles that satisfy the @code{display}
6359 group parameter predicate
6360 (@code{gnus-summary-limit-to-display-predicate}).  @xref{Group
6361 Parameters}, for more on this predicate.
6362
6363 @item / r
6364 @kindex / r (Summary)
6365 @findex gnus-summary-limit-to-replied
6366 Limit the summary buffer to replied articles
6367 (@code{gnus-summary-limit-to-replied}).  If given a prefix, exclude
6368 replied articles.
6369
6370 @item / E
6371 @itemx M S
6372 @kindex M S (Summary)
6373 @kindex / E (Summary)
6374 @findex gnus-summary-limit-include-expunged
6375 Include all expunged articles in the limit
6376 (@code{gnus-summary-limit-include-expunged}).
6377
6378 @item / D
6379 @kindex / D (Summary)
6380 @findex gnus-summary-limit-include-dormant
6381 Include all dormant articles in the limit
6382 (@code{gnus-summary-limit-include-dormant}).
6383
6384 @item / *
6385 @kindex / * (Summary)
6386 @findex gnus-summary-limit-include-cached
6387 Include all cached articles in the limit
6388 (@code{gnus-summary-limit-include-cached}).
6389
6390 @item / d
6391 @kindex / d (Summary)
6392 @findex gnus-summary-limit-exclude-dormant
6393 Exclude all dormant articles from the limit
6394 (@code{gnus-summary-limit-exclude-dormant}).
6395
6396 @item / M
6397 @kindex / M (Summary)
6398 @findex gnus-summary-limit-exclude-marks
6399 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6400
6401 @item / T
6402 @kindex / T (Summary)
6403 @findex gnus-summary-limit-include-thread
6404 Include all the articles in the current thread in the limit.
6405
6406 @item / c
6407 @kindex / c (Summary)
6408 @findex gnus-summary-limit-exclude-childless-dormant
6409 Exclude all dormant articles that have no children from the limit@*
6410 (@code{gnus-summary-limit-exclude-childless-dormant}).
6411
6412 @item / C
6413 @kindex / C (Summary)
6414 @findex gnus-summary-limit-mark-excluded-as-read
6415 Mark all excluded unread articles as read
6416 (@code{gnus-summary-limit-mark-excluded-as-read}).  If given a prefix,
6417 also mark excluded ticked and dormant articles as read.
6418
6419 @item / N
6420 @kindex / N (Summary)
6421 @findex gnus-summary-insert-new-articles
6422 Insert all new articles in the summary buffer.  It scans for new emails
6423 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6424
6425 @item / o
6426 @kindex / o (Summary)
6427 @findex gnus-summary-insert-old-articles
6428 Insert all old articles in the summary buffer.  If given a numbered
6429 prefix, fetch this number of articles.
6430
6431 @end table
6432
6433
6434 @node Threading
6435 @section Threading
6436 @cindex threading
6437 @cindex article threading
6438
6439 Gnus threads articles by default.  @dfn{To thread} is to put responses
6440 to articles directly after the articles they respond to---in a
6441 hierarchical fashion.
6442
6443 Threading is done by looking at the @code{References} headers of the
6444 articles.  In a perfect world, this would be enough to build pretty
6445 trees, but unfortunately, the @code{References} header is often broken
6446 or simply missing.  Weird news propagation exacerbates the problem,
6447 so one has to employ other heuristics to get pleasing results.  A
6448 plethora of approaches exists, as detailed in horrible detail in
6449 @ref{Customizing Threading}.
6450
6451 First, a quick overview of the concepts:
6452
6453 @table @dfn
6454 @item root
6455 The top-most article in a thread; the first article in the thread.
6456
6457 @item thread
6458 A tree-like article structure.
6459
6460 @item sub-thread
6461 A small(er) section of this tree-like structure.
6462
6463 @item loose threads
6464 Threads often lose their roots due to article expiry, or due to the root
6465 already having been read in a previous session, and not displayed in the
6466 summary buffer.  We then typically have many sub-threads that really
6467 belong to one thread, but are without connecting roots.  These are
6468 called loose threads.
6469
6470 @item thread gathering
6471 An attempt to gather loose threads into bigger threads.
6472
6473 @item sparse threads
6474 A thread where the missing articles have been ``guessed'' at, and are
6475 displayed as empty lines in the summary buffer.
6476
6477 @end table
6478
6479
6480 @menu
6481 * Customizing Threading::       Variables you can change to affect the threading.
6482 * Thread Commands::             Thread based commands in the summary buffer.
6483 @end menu
6484
6485
6486 @node Customizing Threading
6487 @subsection Customizing Threading
6488 @cindex customizing threading
6489
6490 @menu
6491 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6492 * Filling In Threads::          Making the threads displayed look fuller.
6493 * More Threading::              Even more variables for fiddling with threads.
6494 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
6495 @end menu
6496
6497
6498 @node Loose Threads
6499 @subsubsection Loose Threads
6500 @cindex <
6501 @cindex >
6502 @cindex loose threads
6503
6504 @table @code
6505 @item gnus-summary-make-false-root
6506 @vindex gnus-summary-make-false-root
6507 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
6508 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6509 Yup.)  Loose subtrees occur when the real root has expired, or you've
6510 read or killed the root in a previous session.
6511
6512 When there is no real root of a thread, Gnus will have to fudge
6513 something.  This variable says what fudging method Gnus should use.
6514 There are four possible values:
6515
6516 @iftex
6517 @iflatex
6518 \gnusfigure{The Summary Buffer}{390}{
6519 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6520 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6521 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6522 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6523 }
6524 @end iflatex
6525 @end iftex
6526
6527 @cindex adopting articles
6528
6529 @table @code
6530
6531 @item adopt
6532 Gnus will make the first of the orphaned articles the parent.  This
6533 parent will adopt all the other articles.  The adopted articles will be
6534 marked as such by pointy brackets (@samp{<>}) instead of the standard
6535 square brackets (@samp{[]}).  This is the default method.
6536
6537 @item dummy
6538 @vindex gnus-summary-dummy-line-format
6539 @vindex gnus-summary-make-false-root-always
6540 Gnus will create a dummy summary line that will pretend to be the
6541 parent.  This dummy line does not correspond to any real article, so
6542 selecting it will just select the first real article after the dummy
6543 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6544 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6545 which is the subject of the article.  @xref{Formatting Variables}.
6546 If you want all threads to have a dummy root, even the non-gathered
6547 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6548
6549 @item empty
6550 Gnus won't actually make any article the parent, but simply leave the
6551 subject field of all orphans except the first empty.  (Actually, it will
6552 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6553 Buffer Format}).)
6554
6555 @item none
6556 Don't make any article parent at all.  Just gather the threads and
6557 display them after one another.
6558
6559 @item nil
6560 Don't gather loose threads.
6561 @end table
6562
6563 @item gnus-summary-gather-subject-limit
6564 @vindex gnus-summary-gather-subject-limit
6565 Loose threads are gathered by comparing subjects of articles.  If this
6566 variable is @code{nil}, Gnus requires an exact match between the
6567 subjects of the loose threads before gathering them into one big
6568 super-thread.  This might be too strict a requirement, what with the
6569 presence of stupid newsreaders that chop off long subject lines.  If
6570 you think so, set this variable to, say, 20 to require that only the
6571 first 20 characters of the subjects have to match.  If you set this
6572 variable to a really low number, you'll find that Gnus will gather
6573 everything in sight into one thread, which isn't very helpful.
6574
6575 @cindex fuzzy article gathering
6576 If you set this variable to the special value @code{fuzzy}, Gnus will
6577 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6578 Matching}).
6579
6580 @item gnus-simplify-subject-fuzzy-regexp
6581 @vindex gnus-simplify-subject-fuzzy-regexp
6582 This can either be a regular expression or list of regular expressions
6583 that match strings that will be removed from subjects if fuzzy subject
6584 simplification is used.
6585
6586 @item gnus-simplify-ignored-prefixes
6587 @vindex gnus-simplify-ignored-prefixes
6588 If you set @code{gnus-summary-gather-subject-limit} to something as low
6589 as 10, you might consider setting this variable to something sensible:
6590
6591 @c Written by Michael Ernst <mernst@cs.rice.edu>
6592 @lisp
6593 (setq gnus-simplify-ignored-prefixes
6594       (concat
6595        "\\`\\[?\\("
6596        (mapconcat
6597         'identity
6598         '("looking"
6599           "wanted" "followup" "summary\\( of\\)?"
6600           "help" "query" "problem" "question"
6601           "answer" "reference" "announce"
6602           "How can I" "How to" "Comparison of"
6603           ;; ...
6604           )
6605         "\\|")
6606        "\\)\\s *\\("
6607        (mapconcat 'identity
6608                   '("for" "for reference" "with" "about")
6609                   "\\|")
6610        "\\)?\\]?:?[ \t]*"))
6611 @end lisp
6612
6613 All words that match this regexp will be removed before comparing two
6614 subjects.
6615
6616 @item gnus-simplify-subject-functions
6617 @vindex gnus-simplify-subject-functions
6618 If non-@code{nil}, this variable overrides
6619 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6620 list of functions to apply to the @code{Subject} string iteratively to
6621 arrive at the simplified version of the string.
6622
6623 Useful functions to put in this list include:
6624
6625 @table @code
6626 @item gnus-simplify-subject-re
6627 @findex gnus-simplify-subject-re
6628 Strip the leading @samp{Re:}.
6629
6630 @item gnus-simplify-subject-fuzzy
6631 @findex gnus-simplify-subject-fuzzy
6632 Simplify fuzzily.
6633
6634 @item gnus-simplify-whitespace
6635 @findex gnus-simplify-whitespace
6636 Remove excessive whitespace.
6637
6638 @item gnus-simplify-all-whitespace
6639 @findex gnus-simplify-all-whitespace
6640 Remove all whitespace.
6641 @end table
6642
6643 You may also write your own functions, of course.
6644
6645
6646 @item gnus-summary-gather-exclude-subject
6647 @vindex gnus-summary-gather-exclude-subject
6648 Since loose thread gathering is done on subjects only, that might lead
6649 to many false hits, especially with certain common subjects like
6650 @samp{} and @samp{(none)}.  To make the situation slightly better,
6651 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6652 what subjects should be excluded from the gathering process.@*
6653 The default is @samp{^ *$\\|^(none)$}.
6654
6655 @item gnus-summary-thread-gathering-function
6656 @vindex gnus-summary-thread-gathering-function
6657 Gnus gathers threads by looking at @code{Subject} headers.  This means
6658 that totally unrelated articles may end up in the same ``thread'', which
6659 is confusing.  An alternate approach is to look at all the
6660 @code{Message-ID}s in all the @code{References} headers to find matches.
6661 This will ensure that no gathered threads ever include unrelated
6662 articles, but it also means that people who have posted with broken
6663 newsreaders won't be gathered properly.  The choice is yours---plague or
6664 cholera:
6665
6666 @table @code
6667 @item gnus-gather-threads-by-subject
6668 @findex gnus-gather-threads-by-subject
6669 This function is the default gathering function and looks at
6670 @code{Subject}s exclusively.
6671
6672 @item gnus-gather-threads-by-references
6673 @findex gnus-gather-threads-by-references
6674 This function looks at @code{References} headers exclusively.
6675 @end table
6676
6677 If you want to test gathering by @code{References}, you could say
6678 something like:
6679
6680 @lisp
6681 (setq gnus-summary-thread-gathering-function
6682       'gnus-gather-threads-by-references)
6683 @end lisp
6684
6685 @end table
6686
6687
6688 @node Filling In Threads
6689 @subsubsection Filling In Threads
6690
6691 @table @code
6692 @item gnus-fetch-old-headers
6693 @vindex gnus-fetch-old-headers
6694 If non-@code{nil}, Gnus will attempt to build old threads by fetching
6695 more old headers---headers to articles marked as read.  If you would
6696 like to display as few summary lines as possible, but still connect as
6697 many loose threads as possible, you should set this variable to
6698 @code{some} or a number.  If you set it to a number, no more than that
6699 number of extra old headers will be fetched.  In either case, fetching
6700 old headers only works if the back end you are using carries overview
6701 files---this would normally be @code{nntp}, @code{nnspool},
6702 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6703 the thread has been expired by the server, there's not much Gnus can
6704 do about that.
6705
6706 This variable can also be set to @code{invisible}.  This won't have any
6707 visible effects, but is useful if you use the @kbd{A T} command a lot
6708 (@pxref{Finding the Parent}).
6709
6710 @item gnus-fetch-old-ephemeral-headers
6711 @vindex gnus-fetch-old-ephemeral-headers
6712 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
6713 newsgroups.
6714
6715 @item gnus-build-sparse-threads
6716 @vindex gnus-build-sparse-threads
6717 Fetching old headers can be slow.  A low-rent similar effect can be
6718 gotten by setting this variable to @code{some}.  Gnus will then look at
6719 the complete @code{References} headers of all articles and try to string
6720 together articles that belong in the same thread.  This will leave
6721 @dfn{gaps} in the threading display where Gnus guesses that an article
6722 is missing from the thread.  (These gaps appear like normal summary
6723 lines.  If you select a gap, Gnus will try to fetch the article in
6724 question.)  If this variable is @code{t}, Gnus will display all these
6725 ``gaps'' without regard for whether they are useful for completing the
6726 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
6727 off sparse leaf nodes that don't lead anywhere.  This variable is
6728 @code{nil} by default.
6729
6730 @item gnus-read-all-available-headers
6731 @vindex gnus-read-all-available-headers
6732 This is a rather obscure variable that few will find useful.  It's
6733 intended for those non-news newsgroups where the back end has to fetch
6734 quite a lot to present the summary buffer, and where it's impossible to
6735 go back to parents of articles.  This is mostly the case in the
6736 web-based groups, like the @code{nnultimate} groups.
6737
6738 If you don't use those, then it's safe to leave this as the default
6739 @code{nil}.  If you want to use this variable, it should be a regexp
6740 that matches the group name, or @code{t} for all groups.
6741
6742 @end table
6743
6744
6745 @node More Threading
6746 @subsubsection More Threading
6747
6748 @table @code
6749 @item gnus-show-threads
6750 @vindex gnus-show-threads
6751 If this variable is @code{nil}, no threading will be done, and all of
6752 the rest of the variables here will have no effect.  Turning threading
6753 off will speed group selection up a bit, but it is sure to make reading
6754 slower and more awkward.
6755
6756 @item gnus-thread-hide-subtree
6757 @vindex gnus-thread-hide-subtree
6758 If non-@code{nil}, all threads will be hidden when the summary buffer is
6759 generated.
6760
6761 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6762 Available predicates are @code{gnus-article-unread-p} and
6763 @code{gnus-article-unseen-p}.
6764
6765 Here's an example:
6766
6767 @lisp
6768 (setq gnus-thread-hide-subtree
6769       '(or gnus-article-unread-p
6770            gnus-article-unseen-p))
6771 @end lisp
6772
6773 (It's a pretty nonsensical example, since all unseen articles are also
6774 unread, but you get my drift.)
6775
6776
6777 @item gnus-thread-expunge-below
6778 @vindex gnus-thread-expunge-below
6779 All threads that have a total score (as defined by
6780 @code{gnus-thread-score-function}) less than this number will be
6781 expunged.  This variable is @code{nil} by default, which means that no
6782 threads are expunged.
6783
6784 @item gnus-thread-hide-killed
6785 @vindex gnus-thread-hide-killed
6786 if you kill a thread and this variable is non-@code{nil}, the subtree
6787 will be hidden.
6788
6789 @item gnus-thread-ignore-subject
6790 @vindex gnus-thread-ignore-subject
6791 Sometimes somebody changes the subject in the middle of a thread.  If
6792 this variable is non-@code{nil}, which is the default, the subject
6793 change is ignored.  If it is @code{nil}, a change in the subject will
6794 result in a new thread.
6795
6796 @item gnus-thread-indent-level
6797 @vindex gnus-thread-indent-level
6798 This is a number that says how much each sub-thread should be indented.
6799 The default is 4.
6800
6801 @item gnus-sort-gathered-threads-function
6802 @vindex gnus-sort-gathered-threads-function
6803 Sometimes, particularly with mailing lists, the order in which mails
6804 arrive locally is not necessarily the same as the order in which they
6805 arrived on the mailing list.  Consequently, when sorting sub-threads
6806 using the default @code{gnus-thread-sort-by-number}, responses can end
6807 up appearing before the article to which they are responding to.
6808 Setting this variable to an alternate value
6809 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6810 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6811 more logical sub-thread ordering in such instances.
6812
6813 @end table
6814
6815
6816 @node Low-Level Threading
6817 @subsubsection Low-Level Threading
6818
6819 @table @code
6820
6821 @item gnus-parse-headers-hook
6822 @vindex gnus-parse-headers-hook
6823 Hook run before parsing any headers.
6824
6825 @item gnus-alter-header-function
6826 @vindex gnus-alter-header-function
6827 If non-@code{nil}, this function will be called to allow alteration of
6828 article header structures.  The function is called with one parameter,
6829 the article header vector, which it may alter in any way.  For instance,
6830 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6831 in systematic ways (by adding prefixes and such), you can use this
6832 variable to un-scramble the @code{Message-ID}s so that they are more
6833 meaningful.  Here's one example:
6834
6835 @lisp
6836 (setq gnus-alter-header-function 'my-alter-message-id)
6837
6838 (defun my-alter-message-id (header)
6839   (let ((id (mail-header-id header)))
6840     (when (string-match
6841            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6842       (mail-header-set-id
6843        (concat (match-string 1 id) "@@" (match-string 2 id))
6844        header))))
6845 @end lisp
6846
6847 @end table
6848
6849
6850 @node Thread Commands
6851 @subsection Thread Commands
6852 @cindex thread commands
6853
6854 @table @kbd
6855
6856 @item T k
6857 @itemx C-M-k
6858 @kindex T k (Summary)
6859 @kindex C-M-k (Summary)
6860 @findex gnus-summary-kill-thread
6861 Mark all articles in the current (sub-)thread as read
6862 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6863 remove all marks instead.  If the prefix argument is negative, tick
6864 articles instead.
6865
6866 @item T l
6867 @itemx C-M-l
6868 @kindex T l (Summary)
6869 @kindex C-M-l (Summary)
6870 @findex gnus-summary-lower-thread
6871 Lower the score of the current (sub-)thread
6872 (@code{gnus-summary-lower-thread}).
6873
6874 @item T i
6875 @kindex T i (Summary)
6876 @findex gnus-summary-raise-thread
6877 Increase the score of the current (sub-)thread
6878 (@code{gnus-summary-raise-thread}).
6879
6880 @item T #
6881 @kindex T # (Summary)
6882 @findex gnus-uu-mark-thread
6883 Set the process mark on the current (sub-)thread
6884 (@code{gnus-uu-mark-thread}).
6885
6886 @item T M-#
6887 @kindex T M-# (Summary)
6888 @findex gnus-uu-unmark-thread
6889 Remove the process mark from the current (sub-)thread
6890 (@code{gnus-uu-unmark-thread}).
6891
6892 @item T T
6893 @kindex T T (Summary)
6894 @findex gnus-summary-toggle-threads
6895 Toggle threading (@code{gnus-summary-toggle-threads}).
6896
6897 @item T s
6898 @kindex T s (Summary)
6899 @findex gnus-summary-show-thread
6900 Expose the (sub-)thread hidden under the current article, if any@*
6901 (@code{gnus-summary-show-thread}).
6902
6903 @item T h
6904 @kindex T h (Summary)
6905 @findex gnus-summary-hide-thread
6906 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6907
6908 @item T S
6909 @kindex T S (Summary)
6910 @findex gnus-summary-show-all-threads
6911 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6912
6913 @item T H
6914 @kindex T H (Summary)
6915 @findex gnus-summary-hide-all-threads
6916 Hide all threads (@code{gnus-summary-hide-all-threads}).
6917
6918 @item T t
6919 @kindex T t (Summary)
6920 @findex gnus-summary-rethread-current
6921 Re-thread the current article's thread
6922 (@code{gnus-summary-rethread-current}).  This works even when the
6923 summary buffer is otherwise unthreaded.
6924
6925 @item T ^
6926 @kindex T ^ (Summary)
6927 @findex gnus-summary-reparent-thread
6928 Make the current article the child of the marked (or previous) article
6929 (@code{gnus-summary-reparent-thread}).
6930
6931 @end table
6932
6933 The following commands are thread movement commands.  They all
6934 understand the numeric prefix.
6935
6936 @table @kbd
6937
6938 @item T n
6939 @kindex T n (Summary)
6940 @itemx C-M-f
6941 @kindex C-M-n (Summary)
6942 @itemx M-down
6943 @kindex M-down (Summary)
6944 @findex gnus-summary-next-thread
6945 Go to the next thread (@code{gnus-summary-next-thread}).
6946
6947 @item T p
6948 @kindex T p (Summary)
6949 @itemx C-M-b
6950 @kindex C-M-p (Summary)
6951 @itemx M-up
6952 @kindex M-up (Summary)
6953 @findex gnus-summary-prev-thread
6954 Go to the previous thread (@code{gnus-summary-prev-thread}).
6955
6956 @item T d
6957 @kindex T d (Summary)
6958 @findex gnus-summary-down-thread
6959 Descend the thread (@code{gnus-summary-down-thread}).
6960
6961 @item T u
6962 @kindex T u (Summary)
6963 @findex gnus-summary-up-thread
6964 Ascend the thread (@code{gnus-summary-up-thread}).
6965
6966 @item T o
6967 @kindex T o (Summary)
6968 @findex gnus-summary-top-thread
6969 Go to the top of the thread (@code{gnus-summary-top-thread}).
6970 @end table
6971
6972 @vindex gnus-thread-operation-ignore-subject
6973 If you ignore subject while threading, you'll naturally end up with
6974 threads that have several different subjects in them.  If you then issue
6975 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
6976 wish to kill the entire thread, but just those parts of the thread that
6977 have the same subject as the current article.  If you like this idea,
6978 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6979 is non-@code{nil} (which it is by default), subjects will be ignored
6980 when doing thread commands.  If this variable is @code{nil}, articles in
6981 the same thread with different subjects will not be included in the
6982 operation in question.  If this variable is @code{fuzzy}, only articles
6983 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6984 Matching}).
6985
6986
6987 @node Sorting the Summary Buffer
6988 @section Sorting the Summary Buffer
6989
6990 @findex gnus-thread-sort-by-total-score
6991 @findex gnus-thread-sort-by-date
6992 @findex gnus-thread-sort-by-score
6993 @findex gnus-thread-sort-by-subject
6994 @findex gnus-thread-sort-by-author
6995 @findex gnus-thread-sort-by-number
6996 @findex gnus-thread-sort-by-random
6997 @vindex gnus-thread-sort-functions
6998 @findex gnus-thread-sort-by-most-recent-number
6999 @findex gnus-thread-sort-by-most-recent-date
7000 If you are using a threaded summary display, you can sort the threads by
7001 setting @code{gnus-thread-sort-functions}, which can be either a single
7002 function, a list of functions, or a list containing functions and
7003 @code{(not some-function)} elements.
7004
7005 By default, sorting is done on article numbers.  Ready-made sorting
7006 predicate functions include @code{gnus-thread-sort-by-number},
7007 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
7008 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
7009 @code{gnus-thread-sort-by-most-recent-number},
7010 @code{gnus-thread-sort-by-most-recent-date},
7011 @code{gnus-thread-sort-by-random} and
7012 @code{gnus-thread-sort-by-total-score}.
7013
7014 Each function takes two threads and returns non-@code{nil} if the first
7015 thread should be sorted before the other.  Note that sorting really is
7016 normally done by looking only at the roots of each thread.
7017
7018 If you use more than one function, the primary sort key should be the
7019 last function in the list.  You should probably always include
7020 @code{gnus-thread-sort-by-number} in the list of sorting
7021 functions---preferably first.  This will ensure that threads that are
7022 equal with respect to the other sort criteria will be displayed in
7023 ascending article order.
7024
7025 If you would like to sort by reverse score, then by subject, and finally
7026 by number, you could do something like:
7027
7028 @lisp
7029 (setq gnus-thread-sort-functions
7030       '(gnus-thread-sort-by-number
7031         gnus-thread-sort-by-subject
7032         (not gnus-thread-sort-by-total-score)))
7033 @end lisp
7034
7035 The threads that have highest score will be displayed first in the
7036 summary buffer.  When threads have the same score, they will be sorted
7037 alphabetically.  The threads that have the same score and the same
7038 subject will be sorted by number, which is (normally) the sequence in
7039 which the articles arrived.
7040
7041 If you want to sort by score and then reverse arrival order, you could
7042 say something like:
7043
7044 @lisp
7045 (setq gnus-thread-sort-functions
7046       '((lambda (t1 t2)
7047           (not (gnus-thread-sort-by-number t1 t2)))
7048         gnus-thread-sort-by-score))
7049 @end lisp
7050
7051 @vindex gnus-thread-score-function
7052 The function in the @code{gnus-thread-score-function} variable (default
7053 @code{+}) is used for calculating the total score of a thread.  Useful
7054 functions might be @code{max}, @code{min}, or squared means, or whatever
7055 tickles your fancy.
7056
7057 @findex gnus-article-sort-functions
7058 @findex gnus-article-sort-by-date
7059 @findex gnus-article-sort-by-score
7060 @findex gnus-article-sort-by-subject
7061 @findex gnus-article-sort-by-author
7062 @findex gnus-article-sort-by-random
7063 @findex gnus-article-sort-by-number
7064 If you are using an unthreaded display for some strange reason or
7065 other, you have to fiddle with the @code{gnus-article-sort-functions}
7066 variable.  It is very similar to the
7067 @code{gnus-thread-sort-functions}, except that it uses slightly
7068 different functions for article comparison.  Available sorting
7069 predicate functions are @code{gnus-article-sort-by-number},
7070 @code{gnus-article-sort-by-author},
7071 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
7072 @code{gnus-article-sort-by-random}, and
7073 @code{gnus-article-sort-by-score}.
7074
7075 If you want to sort an unthreaded summary display by subject, you could
7076 say something like:
7077
7078 @lisp
7079 (setq gnus-article-sort-functions
7080       '(gnus-article-sort-by-number
7081         gnus-article-sort-by-subject))
7082 @end lisp
7083
7084
7085
7086 @node Asynchronous Fetching
7087 @section Asynchronous Article Fetching
7088 @cindex asynchronous article fetching
7089 @cindex article pre-fetch
7090 @cindex pre-fetch
7091
7092 If you read your news from an @acronym{NNTP} server that's far away, the
7093 network latencies may make reading articles a chore.  You have to wait
7094 for a while after pressing @kbd{n} to go to the next article before the
7095 article appears.  Why can't Gnus just go ahead and fetch the article
7096 while you are reading the previous one?  Why not, indeed.
7097
7098 First, some caveats.  There are some pitfalls to using asynchronous
7099 article fetching, especially the way Gnus does it.
7100
7101 Let's say you are reading article 1, which is short, and article 2 is
7102 quite long, and you are not interested in reading that.  Gnus does not
7103 know this, so it goes ahead and fetches article 2.  You decide to read
7104 article 3, but since Gnus is in the process of fetching article 2, the
7105 connection is blocked.
7106
7107 To avoid these situations, Gnus will open two (count 'em two)
7108 connections to the server.  Some people may think this isn't a very nice
7109 thing to do, but I don't see any real alternatives.  Setting up that
7110 extra connection takes some time, so Gnus startup will be slower.
7111
7112 Gnus will fetch more articles than you will read.  This will mean that
7113 the link between your machine and the @acronym{NNTP} server will become more
7114 loaded than if you didn't use article pre-fetch.  The server itself will
7115 also become more loaded---both with the extra article requests, and the
7116 extra connection.
7117
7118 Ok, so now you know that you shouldn't really use this thing@dots{} unless
7119 you really want to.
7120
7121 @vindex gnus-asynchronous
7122 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
7123 happen automatically.
7124
7125 @vindex gnus-use-article-prefetch
7126 You can control how many articles are to be pre-fetched by setting
7127 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
7128 that when you read an article in the group, the back end will pre-fetch
7129 the next 30 articles.  If this variable is @code{t}, the back end will
7130 pre-fetch all the articles it can without bound.  If it is
7131 @code{nil}, no pre-fetching will be done.
7132
7133 @vindex gnus-async-prefetch-article-p
7134 @findex gnus-async-read-p
7135 There are probably some articles that you don't want to pre-fetch---read
7136 articles, for instance.  The @code{gnus-async-prefetch-article-p}
7137 variable controls whether an article is to be pre-fetched.  This
7138 function should return non-@code{nil} when the article in question is
7139 to be pre-fetched.  The default is @code{gnus-async-read-p}, which
7140 returns @code{nil} on read articles.  The function is called with an
7141 article data structure as the only parameter.
7142
7143 If, for instance, you wish to pre-fetch only unread articles shorter
7144 than 100 lines, you could say something like:
7145
7146 @lisp
7147 (defun my-async-short-unread-p (data)
7148   "Return non-nil for short, unread articles."
7149   (and (gnus-data-unread-p data)
7150        (< (mail-header-lines (gnus-data-header data))
7151           100)))
7152
7153 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7154 @end lisp
7155
7156 These functions will be called many, many times, so they should
7157 preferably be short and sweet to avoid slowing down Gnus too much.
7158 It's probably a good idea to byte-compile things like this.
7159
7160 @vindex gnus-prefetched-article-deletion-strategy
7161 Articles have to be removed from the asynch buffer sooner or later.  The
7162 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7163 articles.  This is a list that may contain the following elements:
7164
7165 @table @code
7166 @item read
7167 Remove articles when they are read.
7168
7169 @item exit
7170 Remove articles when exiting the group.
7171 @end table
7172
7173 The default value is @code{(read exit)}.
7174
7175 @c @vindex gnus-use-header-prefetch
7176 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7177 @c from the next group.
7178
7179
7180 @node Article Caching
7181 @section Article Caching
7182 @cindex article caching
7183 @cindex caching
7184
7185 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
7186 consider turning article caching on.  Each article will then be stored
7187 locally under your home directory.  As you may surmise, this could
7188 potentially use @emph{huge} amounts of disk space, as well as eat up all
7189 your inodes so fast it will make your head swim.  In vodka.
7190
7191 Used carefully, though, it could be just an easier way to save articles.
7192
7193 @vindex gnus-use-long-file-name
7194 @vindex gnus-cache-directory
7195 @vindex gnus-use-cache
7196 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7197 all articles ticked or marked as dormant will then be copied
7198 over to your local cache (@code{gnus-cache-directory}).  Whether this
7199 cache is flat or hierarchical is controlled by the
7200 @code{gnus-use-long-file-name} variable, as usual.
7201
7202 When re-selecting a ticked or dormant article, it will be fetched from the
7203 cache instead of from the server.  As articles in your cache will never
7204 expire, this might serve as a method of saving articles while still
7205 keeping them where they belong.  Just mark all articles you want to save
7206 as dormant, and don't worry.
7207
7208 When an article is marked as read, is it removed from the cache.
7209
7210 @vindex gnus-cache-remove-articles
7211 @vindex gnus-cache-enter-articles
7212 The entering/removal of articles from the cache is controlled by the
7213 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7214 variables.  Both are lists of symbols.  The first is @code{(ticked
7215 dormant)} by default, meaning that ticked and dormant articles will be
7216 put in the cache.  The latter is @code{(read)} by default, meaning that
7217 articles marked as read are removed from the cache.  Possibly
7218 symbols in these two lists are @code{ticked}, @code{dormant},
7219 @code{unread} and @code{read}.
7220
7221 @findex gnus-jog-cache
7222 So where does the massive article-fetching and storing come into the
7223 picture?  The @code{gnus-jog-cache} command will go through all
7224 subscribed newsgroups, request all unread articles, score them, and
7225 store them in the cache.  You should only ever, ever ever ever, use this
7226 command if 1) your connection to the @acronym{NNTP} server is really, really,
7227 really slow and 2) you have a really, really, really huge disk.
7228 Seriously.  One way to cut down on the number of articles downloaded is
7229 to score unwanted articles down and have them marked as read.  They will
7230 not then be downloaded by this command.
7231
7232 @vindex gnus-uncacheable-groups
7233 @vindex gnus-cacheable-groups
7234 It is likely that you do not want caching on all groups.  For instance,
7235 if your @code{nnml} mail is located under your home directory, it makes no
7236 sense to cache it somewhere else under your home directory.  Unless you
7237 feel that it's neat to use twice as much space.
7238
7239 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7240 regexp of groups to cache, @samp{^nntp} for instance, or set the
7241 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7242 Both variables are @code{nil} by default.  If a group matches both
7243 variables, the group is not cached.
7244
7245 @findex gnus-cache-generate-nov-databases
7246 @findex gnus-cache-generate-active
7247 @vindex gnus-cache-active-file
7248 The cache stores information on what articles it contains in its active
7249 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7250 of the cache) becomes all messed up for some reason or other, Gnus
7251 offers two functions that will try to set things right.  @kbd{M-x
7252 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
7253 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7254 file.
7255
7256 @findex gnus-cache-move-cache
7257 @code{gnus-cache-move-cache} will move your whole
7258 @code{gnus-cache-directory} to some other location.  You get asked to
7259 where, isn't that cool?
7260
7261 @node Persistent Articles
7262 @section Persistent Articles
7263 @cindex persistent articles
7264
7265 Closely related to article caching, we have @dfn{persistent articles}.
7266 In fact, it's just a different way of looking at caching, and much more
7267 useful in my opinion.
7268
7269 Say you're reading a newsgroup, and you happen on to some valuable gem
7270 that you want to keep and treasure forever.  You'd normally just save it
7271 (using one of the many saving commands) in some file.  The problem with
7272 that is that it's just, well, yucky.  Ideally you'd prefer just having
7273 the article remain in the group where you found it forever; untouched by
7274 the expiry going on at the news server.
7275
7276 This is what a @dfn{persistent article} is---an article that just won't
7277 be deleted.  It's implemented using the normal cache functions, but
7278 you use two explicit commands for managing persistent articles:
7279
7280 @table @kbd
7281
7282 @item *
7283 @kindex * (Summary)
7284 @findex gnus-cache-enter-article
7285 Make the current article persistent (@code{gnus-cache-enter-article}).
7286
7287 @item M-*
7288 @kindex M-* (Summary)
7289 @findex gnus-cache-remove-article
7290 Remove the current article from the persistent articles
7291 (@code{gnus-cache-remove-article}).  This will normally delete the
7292 article.
7293 @end table
7294
7295 Both these commands understand the process/prefix convention.
7296
7297 To avoid having all ticked articles (and stuff) entered into the cache,
7298 you should set @code{gnus-use-cache} to @code{passive} if you're just
7299 interested in persistent articles:
7300
7301 @lisp
7302 (setq gnus-use-cache 'passive)
7303 @end lisp
7304
7305
7306 @node Article Backlog
7307 @section Article Backlog
7308 @cindex backlog
7309 @cindex article backlog
7310
7311 If you have a slow connection, but the idea of using caching seems
7312 unappealing to you (and it is, really), you can help the situation some
7313 by switching on the @dfn{backlog}.  This is where Gnus will buffer
7314 already read articles so that it doesn't have to re-fetch articles
7315 you've already read.  This only helps if you are in the habit of
7316 re-selecting articles you've recently read, of course.  If you never do
7317 that, turning the backlog on will slow Gnus down a little bit, and
7318 increase memory usage some.
7319
7320 @vindex gnus-keep-backlog
7321 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
7322 at most @var{n} old articles in a buffer for later re-fetching.  If this
7323 variable is non-@code{nil} and is not a number, Gnus will store
7324 @emph{all} read articles, which means that your Emacs will grow without
7325 bound before exploding and taking your machine down with you.  I put
7326 that in there just to keep y'all on your toes.
7327
7328 The default value is 20.
7329
7330
7331 @node Saving Articles
7332 @section Saving Articles
7333 @cindex saving articles
7334
7335 Gnus can save articles in a number of ways.  Below is the documentation
7336 for saving articles in a fairly straight-forward fashion (i.e., little
7337 processing of the article is done before it is saved).  For a different
7338 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7339 (@pxref{Decoding Articles}).
7340
7341 For the commands listed here, the target is a file.  If you want to
7342 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7343 command (@pxref{Mail Group Commands}).
7344
7345 @vindex gnus-save-all-headers
7346 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
7347 unwanted headers before saving the article.
7348
7349 @vindex gnus-saved-headers
7350 If the preceding variable is @code{nil}, all headers that match the
7351 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7352 deleted before saving.
7353
7354 @table @kbd
7355
7356 @item O o
7357 @itemx o
7358 @kindex O o (Summary)
7359 @kindex o (Summary)
7360 @findex gnus-summary-save-article
7361 @c @icon{gnus-summary-save-article}
7362 Save the current article using the default article saver
7363 (@code{gnus-summary-save-article}).
7364
7365 @item O m
7366 @kindex O m (Summary)
7367 @findex gnus-summary-save-article-mail
7368 Save the current article in mail format
7369 (@code{gnus-summary-save-article-mail}).
7370
7371 @item O r
7372 @kindex O r (Summary)
7373 @findex gnus-summary-save-article-rmail
7374 Save the current article in Rmail format
7375 (@code{gnus-summary-save-article-rmail}).
7376
7377 @item O f
7378 @kindex O f (Summary)
7379 @findex gnus-summary-save-article-file
7380 @c @icon{gnus-summary-save-article-file}
7381 Save the current article in plain file format
7382 (@code{gnus-summary-save-article-file}).
7383
7384 @item O F
7385 @kindex O F (Summary)
7386 @findex gnus-summary-write-article-file
7387 Write the current article in plain file format, overwriting any previous
7388 file contents (@code{gnus-summary-write-article-file}).
7389
7390 @item O b
7391 @kindex O b (Summary)
7392 @findex gnus-summary-save-article-body-file
7393 Save the current article body in plain file format
7394 (@code{gnus-summary-save-article-body-file}).
7395
7396 @item O h
7397 @kindex O h (Summary)
7398 @findex gnus-summary-save-article-folder
7399 Save the current article in mh folder format
7400 (@code{gnus-summary-save-article-folder}).
7401
7402 @item O v
7403 @kindex O v (Summary)
7404 @findex gnus-summary-save-article-vm
7405 Save the current article in a VM folder
7406 (@code{gnus-summary-save-article-vm}).
7407
7408 @item O p
7409 @itemx |
7410 @kindex O p (Summary)
7411 @kindex | (Summary)
7412 @findex gnus-summary-pipe-output
7413 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7414 the current article to a process (@code{gnus-summary-pipe-output}).
7415 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7416 complete headers in the piped output.
7417
7418 @item O P
7419 @kindex O P (Summary)
7420 @findex gnus-summary-muttprint
7421 @vindex gnus-summary-muttprint-program
7422 Save the current article into muttprint.  That is, print it using the
7423 external program @uref{http://muttprint.sourceforge.net/,
7424 Muttprint}.  The program name and options to use is controlled by the
7425 variable @code{gnus-summary-muttprint-program}.
7426 (@code{gnus-summary-muttprint}).
7427
7428 @end table
7429
7430 @vindex gnus-prompt-before-saving
7431 All these commands use the process/prefix convention
7432 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7433 functions, you might get tired of being prompted for files to save each
7434 and every article in.  The prompting action is controlled by
7435 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7436 default, giving you that excessive prompting action you know and
7437 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7438 just once for each series of articles you save.  If you like to really
7439 have Gnus do all your thinking for you, you can even set this variable
7440 to @code{nil}, which means that you will never be prompted for files to
7441 save articles in.  Gnus will simply save all the articles in the default
7442 files.
7443
7444
7445 @vindex gnus-default-article-saver
7446 You can customize the @code{gnus-default-article-saver} variable to make
7447 Gnus do what you want it to.  You can use any of the six ready-made
7448 functions below, or you can create your own.
7449
7450 @table @code
7451
7452 @item gnus-summary-save-in-rmail
7453 @findex gnus-summary-save-in-rmail
7454 @vindex gnus-rmail-save-name
7455 @findex gnus-plain-save-name
7456 This is the default format, @dfn{Babyl}.  Uses the function in the
7457 @code{gnus-rmail-save-name} variable to get a file name to save the
7458 article in.  The default is @code{gnus-plain-save-name}.
7459
7460 @item gnus-summary-save-in-mail
7461 @findex gnus-summary-save-in-mail
7462 @vindex gnus-mail-save-name
7463 Save in a Unix mail (mbox) file.  Uses the function in the
7464 @code{gnus-mail-save-name} variable to get a file name to save the
7465 article in.  The default is @code{gnus-plain-save-name}.
7466
7467 @item gnus-summary-save-in-file
7468 @findex gnus-summary-save-in-file
7469 @vindex gnus-file-save-name
7470 @findex gnus-numeric-save-name
7471 Append the article straight to an ordinary file.  Uses the function in
7472 the @code{gnus-file-save-name} variable to get a file name to save the
7473 article in.  The default is @code{gnus-numeric-save-name}.
7474
7475 @item gnus-summary-write-to-file
7476 @findex gnus-summary-write-to-file
7477 Write the article straight to an ordinary file.  The file is
7478 overwritten if it exists.  Uses the function in the
7479 @code{gnus-file-save-name} variable to get a file name to save the
7480 article in.  The default is @code{gnus-numeric-save-name}.
7481
7482 @item gnus-summary-save-body-in-file
7483 @findex gnus-summary-save-body-in-file
7484 Append the article body to an ordinary file.  Uses the function in the
7485 @code{gnus-file-save-name} variable to get a file name to save the
7486 article in.  The default is @code{gnus-numeric-save-name}.
7487
7488 @item gnus-summary-save-in-folder
7489 @findex gnus-summary-save-in-folder
7490 @findex gnus-folder-save-name
7491 @findex gnus-Folder-save-name
7492 @vindex gnus-folder-save-name
7493 @cindex rcvstore
7494 @cindex MH folders
7495 Save the article to an MH folder using @code{rcvstore} from the MH
7496 library.  Uses the function in the @code{gnus-folder-save-name} variable
7497 to get a file name to save the article in.  The default is
7498 @code{gnus-folder-save-name}, but you can also use
7499 @code{gnus-Folder-save-name}, which creates capitalized names.
7500
7501 @item gnus-summary-save-in-vm
7502 @findex gnus-summary-save-in-vm
7503 Save the article in a VM folder.  You have to have the VM mail
7504 reader to use this setting.
7505 @end table
7506
7507 @vindex gnus-article-save-directory
7508 All of these functions, except for the last one, will save the article
7509 in the @code{gnus-article-save-directory}, which is initialized from the
7510 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
7511 default.
7512
7513 As you can see above, the functions use different functions to find a
7514 suitable name of a file to save the article in.  Below is a list of
7515 available functions that generate names:
7516
7517 @table @code
7518
7519 @item gnus-Numeric-save-name
7520 @findex gnus-Numeric-save-name
7521 File names like @file{~/News/Alt.andrea-dworkin/45}.
7522
7523 @item gnus-numeric-save-name
7524 @findex gnus-numeric-save-name
7525 File names like @file{~/News/alt.andrea-dworkin/45}.
7526
7527 @item gnus-Plain-save-name
7528 @findex gnus-Plain-save-name
7529 File names like @file{~/News/Alt.andrea-dworkin}.
7530
7531 @item gnus-plain-save-name
7532 @findex gnus-plain-save-name
7533 File names like @file{~/News/alt.andrea-dworkin}.
7534
7535 @item gnus-sender-save-name
7536 @findex gnus-sender-save-name
7537 File names like @file{~/News/larsi}.
7538 @end table
7539
7540 @vindex gnus-split-methods
7541 You can have Gnus suggest where to save articles by plonking a regexp into
7542 the @code{gnus-split-methods} alist.  For instance, if you would like to
7543 save articles related to Gnus in the file @file{gnus-stuff}, and articles
7544 related to VM in @file{vm-stuff}, you could set this variable to something
7545 like:
7546
7547 @lisp
7548 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7549  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7550  (my-choosing-function "../other-dir/my-stuff")
7551  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7552 @end lisp
7553
7554 We see that this is a list where each element is a list that has two
7555 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7556 a string (in which case it is used as a regexp to match on the article
7557 head); it can be a symbol (which will be called as a function with the
7558 group name as a parameter); or it can be a list (which will be
7559 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7560 the @dfn{file} will be used as a default prompt.  In addition, the
7561 result of the operation itself will be used if the function or form
7562 called returns a string or a list of strings.
7563
7564 You basically end up with a list of file names that might be used when
7565 saving the current article.  (All ``matches'' will be used.)  You will
7566 then be prompted for what you really want to use as a name, with file
7567 name completion over the results from applying this variable.
7568
7569 This variable is @code{((gnus-article-archive-name))} by default, which
7570 means that Gnus will look at the articles it saves for an
7571 @code{Archive-name} line and use that as a suggestion for the file
7572 name.
7573
7574 Here's an example function to clean up file names somewhat.  If you have
7575 lots of mail groups called things like
7576 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7577 these group names before creating the file name to save to.  The
7578 following will do just that:
7579
7580 @lisp
7581 (defun my-save-name (group)
7582   (when (string-match "^nnml:mail." group)
7583     (substring group (match-end 0))))
7584
7585 (setq gnus-split-methods
7586       '((gnus-article-archive-name)
7587         (my-save-name)))
7588 @end lisp
7589
7590
7591 @vindex gnus-use-long-file-name
7592 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7593 @code{nil}, all the preceding functions will replace all periods
7594 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7595 the functions will generate hierarchies of directories instead of having
7596 all the files in the top level directory
7597 (@file{~/News/alt/andrea-dworkin} instead of
7598 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7599 on most systems.  However, for historical reasons, this is @code{nil} on
7600 Xenix and usg-unix-v machines by default.
7601
7602 This function also affects kill and score file names.  If this variable
7603 is a list, and the list contains the element @code{not-score}, long file
7604 names will not be used for score files, if it contains the element
7605 @code{not-save}, long file names will not be used for saving, and if it
7606 contains the element @code{not-kill}, long file names will not be used
7607 for kill files.
7608
7609 If you'd like to save articles in a hierarchy that looks something like
7610 a spool, you could
7611
7612 @lisp
7613 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
7614 (setq gnus-default-article-saver
7615       'gnus-summary-save-in-file)          ; @r{no encoding}
7616 @end lisp
7617
7618 Then just save with @kbd{o}.  You'd then read this hierarchy with
7619 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7620 the top level directory as the argument (@file{~/News/}).  Then just walk
7621 around to the groups/directories with @code{nneething}.
7622
7623
7624 @node Decoding Articles
7625 @section Decoding Articles
7626 @cindex decoding articles
7627
7628 Sometime users post articles (or series of articles) that have been
7629 encoded in some way or other.  Gnus can decode them for you.
7630
7631 @menu
7632 * Uuencoded Articles::          Uudecode articles.
7633 * Shell Archives::              Unshar articles.
7634 * PostScript Files::            Split PostScript.
7635 * Other Files::                 Plain save and binhex.
7636 * Decoding Variables::          Variables for a happy decoding.
7637 * Viewing Files::               You want to look at the result of the decoding?
7638 @end menu
7639
7640 @cindex series
7641 @cindex article series
7642 All these functions use the process/prefix convention
7643 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7644 the extension that a ``single article'' means ``a single series''.  Gnus
7645 can find out by itself what articles belong to a series, decode all the
7646 articles and unpack/view/save the resulting file(s).
7647
7648 Gnus guesses what articles are in the series according to the following
7649 simplish rule: The subjects must be (nearly) identical, except for the
7650 last two numbers of the line.  (Spaces are largely ignored, however.)
7651
7652 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
7653 will find all the articles that match the regexp @samp{^cat.gif
7654 ([0-9]+/[0-9]+).*$}.
7655
7656 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7657 series}, will not be properly recognized by any of the automatic viewing
7658 commands, and you have to mark the articles manually with @kbd{#}.
7659
7660
7661 @node Uuencoded Articles
7662 @subsection Uuencoded Articles
7663 @cindex uudecode
7664 @cindex uuencoded articles
7665
7666 @table @kbd
7667
7668 @item X u
7669 @kindex X u (Summary)
7670 @findex gnus-uu-decode-uu
7671 @c @icon{gnus-uu-decode-uu}
7672 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7673
7674 @item X U
7675 @kindex X U (Summary)
7676 @findex gnus-uu-decode-uu-and-save
7677 Uudecodes and saves the current series
7678 (@code{gnus-uu-decode-uu-and-save}).
7679
7680 @item X v u
7681 @kindex X v u (Summary)
7682 @findex gnus-uu-decode-uu-view
7683 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7684
7685 @item X v U
7686 @kindex X v U (Summary)
7687 @findex gnus-uu-decode-uu-and-save-view
7688 Uudecodes, views and saves the current series
7689 (@code{gnus-uu-decode-uu-and-save-view}).
7690
7691 @end table
7692
7693 Remember that these all react to the presence of articles marked with
7694 the process mark.  If, for instance, you'd like to decode and save an
7695 entire newsgroup, you'd typically do @kbd{M P a}
7696 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7697 (@code{gnus-uu-decode-uu-and-save}).
7698
7699 All this is very much different from how @code{gnus-uu} worked with
7700 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7701 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7702 articles in some way (@pxref{Setting Process Marks}) and then press
7703 @kbd{X u}.
7704
7705 @vindex gnus-uu-notify-files
7706 Note: When trying to decode articles that have names matching
7707 @code{gnus-uu-notify-files}, which is hard-coded to
7708 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7709 automatically post an article on @samp{comp.unix.wizards} saying that
7710 you have just viewed the file in question.  This feature can't be turned
7711 off.
7712
7713
7714 @node Shell Archives
7715 @subsection Shell Archives
7716 @cindex unshar
7717 @cindex shell archives
7718 @cindex shared articles
7719
7720 Shell archives (``shar files'') used to be a popular way to distribute
7721 sources, but it isn't used all that much today.  In any case, we have
7722 some commands to deal with these:
7723
7724 @table @kbd
7725
7726 @item X s
7727 @kindex X s (Summary)
7728 @findex gnus-uu-decode-unshar
7729 Unshars the current series (@code{gnus-uu-decode-unshar}).
7730
7731 @item X S
7732 @kindex X S (Summary)
7733 @findex gnus-uu-decode-unshar-and-save
7734 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7735
7736 @item X v s
7737 @kindex X v s (Summary)
7738 @findex gnus-uu-decode-unshar-view
7739 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7740
7741 @item X v S
7742 @kindex X v S (Summary)
7743 @findex gnus-uu-decode-unshar-and-save-view
7744 Unshars, views and saves the current series
7745 (@code{gnus-uu-decode-unshar-and-save-view}).
7746 @end table
7747
7748
7749 @node PostScript Files
7750 @subsection PostScript Files
7751 @cindex PostScript
7752
7753 @table @kbd
7754
7755 @item X p
7756 @kindex X p (Summary)
7757 @findex gnus-uu-decode-postscript
7758 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7759
7760 @item X P
7761 @kindex X P (Summary)
7762 @findex gnus-uu-decode-postscript-and-save
7763 Unpack and save the current PostScript series
7764 (@code{gnus-uu-decode-postscript-and-save}).
7765
7766 @item X v p
7767 @kindex X v p (Summary)
7768 @findex gnus-uu-decode-postscript-view
7769 View the current PostScript series
7770 (@code{gnus-uu-decode-postscript-view}).
7771
7772 @item X v P
7773 @kindex X v P (Summary)
7774 @findex gnus-uu-decode-postscript-and-save-view
7775 View and save the current PostScript series
7776 (@code{gnus-uu-decode-postscript-and-save-view}).
7777 @end table
7778
7779
7780 @node Other Files
7781 @subsection Other Files
7782
7783 @table @kbd
7784 @item X o
7785 @kindex X o (Summary)
7786 @findex gnus-uu-decode-save
7787 Save the current series
7788 (@code{gnus-uu-decode-save}).
7789
7790 @item X b
7791 @kindex X b (Summary)
7792 @findex gnus-uu-decode-binhex
7793 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7794 doesn't really work yet.
7795 @end table
7796
7797
7798 @node Decoding Variables
7799 @subsection Decoding Variables
7800
7801 Adjective, not verb.
7802
7803 @menu
7804 * Rule Variables::              Variables that say how a file is to be viewed.
7805 * Other Decode Variables::      Other decode variables.
7806 * Uuencoding and Posting::      Variables for customizing uuencoding.
7807 @end menu
7808
7809
7810 @node Rule Variables
7811 @subsubsection Rule Variables
7812 @cindex rule variables
7813
7814 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7815 variables are of the form
7816
7817 @lisp
7818       (list '(regexp1 command2)
7819             '(regexp2 command2)
7820             ...)
7821 @end lisp
7822
7823 @table @code
7824
7825 @item gnus-uu-user-view-rules
7826 @vindex gnus-uu-user-view-rules
7827 @cindex sox
7828 This variable is consulted first when viewing files.  If you wish to use,
7829 for instance, @code{sox} to convert an @file{.au} sound file, you could
7830 say something like:
7831 @lisp
7832 (setq gnus-uu-user-view-rules
7833       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7834 @end lisp
7835
7836 @item gnus-uu-user-view-rules-end
7837 @vindex gnus-uu-user-view-rules-end
7838 This variable is consulted if Gnus couldn't make any matches from the
7839 user and default view rules.
7840
7841 @item gnus-uu-user-archive-rules
7842 @vindex gnus-uu-user-archive-rules
7843 This variable can be used to say what commands should be used to unpack
7844 archives.
7845 @end table
7846
7847
7848 @node Other Decode Variables
7849 @subsubsection Other Decode Variables
7850
7851 @table @code
7852 @vindex gnus-uu-grabbed-file-functions
7853
7854 @item gnus-uu-grabbed-file-functions
7855 All functions in this list will be called right after each file has been
7856 successfully decoded---so that you can move or view files right away,
7857 and don't have to wait for all files to be decoded before you can do
7858 anything.  Ready-made functions you can put in this list are:
7859
7860 @table @code
7861
7862 @item gnus-uu-grab-view
7863 @findex gnus-uu-grab-view
7864 View the file.
7865
7866 @item gnus-uu-grab-move
7867 @findex gnus-uu-grab-move
7868 Move the file (if you're using a saving function.)
7869 @end table
7870
7871 @item gnus-uu-be-dangerous
7872 @vindex gnus-uu-be-dangerous
7873 Specifies what to do if unusual situations arise during decoding.  If
7874 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7875 that didn't work, and overwrite existing files.  Otherwise, ask each
7876 time.
7877
7878 @item gnus-uu-ignore-files-by-name
7879 @vindex gnus-uu-ignore-files-by-name
7880 Files with name matching this regular expression won't be viewed.
7881
7882 @item gnus-uu-ignore-files-by-type
7883 @vindex gnus-uu-ignore-files-by-type
7884 Files with a @acronym{MIME} type matching this variable won't be viewed.
7885 Note that Gnus tries to guess what type the file is based on the name.
7886 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
7887 kludgey.
7888
7889 @item gnus-uu-tmp-dir
7890 @vindex gnus-uu-tmp-dir
7891 Where @code{gnus-uu} does its work.
7892
7893 @item gnus-uu-do-not-unpack-archives
7894 @vindex gnus-uu-do-not-unpack-archives
7895 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7896 looking for files to display.
7897
7898 @item gnus-uu-view-and-save
7899 @vindex gnus-uu-view-and-save
7900 Non-@code{nil} means that the user will always be asked to save a file
7901 after viewing it.
7902
7903 @item gnus-uu-ignore-default-view-rules
7904 @vindex gnus-uu-ignore-default-view-rules
7905 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7906 rules.
7907
7908 @item gnus-uu-ignore-default-archive-rules
7909 @vindex gnus-uu-ignore-default-archive-rules
7910 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7911 unpacking commands.
7912
7913 @item gnus-uu-kill-carriage-return
7914 @vindex gnus-uu-kill-carriage-return
7915 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7916 from articles.
7917
7918 @item gnus-uu-unmark-articles-not-decoded
7919 @vindex gnus-uu-unmark-articles-not-decoded
7920 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7921 decoded articles as unread.
7922
7923 @item gnus-uu-correct-stripped-uucode
7924 @vindex gnus-uu-correct-stripped-uucode
7925 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7926 uuencoded files that have had trailing spaces deleted.
7927
7928 @item gnus-uu-pre-uudecode-hook
7929 @vindex gnus-uu-pre-uudecode-hook
7930 Hook run before sending a message to @code{uudecode}.
7931
7932 @item gnus-uu-view-with-metamail
7933 @vindex gnus-uu-view-with-metamail
7934 @cindex metamail
7935 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7936 commands defined by the rule variables and just fudge a @acronym{MIME}
7937 content type based on the file name.  The result will be fed to
7938 @code{metamail} for viewing.
7939
7940 @item gnus-uu-save-in-digest
7941 @vindex gnus-uu-save-in-digest
7942 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7943 decoding, will save in digests.  If this variable is @code{nil},
7944 @code{gnus-uu} will just save everything in a file without any
7945 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7946 to specify any meaningful volume and issue numbers were found, so I
7947 simply dropped them.
7948
7949 @end table
7950
7951
7952 @node Uuencoding and Posting
7953 @subsubsection Uuencoding and Posting
7954
7955 @table @code
7956
7957 @item gnus-uu-post-include-before-composing
7958 @vindex gnus-uu-post-include-before-composing
7959 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7960 before you compose the article.  If this variable is @code{t}, you can
7961 either include an encoded file with @kbd{C-c C-i} or have one included
7962 for you when you post the article.
7963
7964 @item gnus-uu-post-length
7965 @vindex gnus-uu-post-length
7966 Maximum length of an article.  The encoded file will be split into how
7967 many articles it takes to post the entire file.
7968
7969 @item gnus-uu-post-threaded
7970 @vindex gnus-uu-post-threaded
7971 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7972 thread.  This may not be smart, as no other decoder I have seen is able
7973 to follow threads when collecting uuencoded articles.  (Well, I have
7974 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7975 think that counts@dots{}) Default is @code{nil}.
7976
7977 @item gnus-uu-post-separate-description
7978 @vindex gnus-uu-post-separate-description
7979 Non-@code{nil} means that the description will be posted in a separate
7980 article.  The first article will typically be numbered (0/x).  If this
7981 variable is @code{nil}, the description the user enters will be included
7982 at the beginning of the first article, which will be numbered (1/x).
7983 Default is @code{t}.
7984
7985 @end table
7986
7987
7988 @node Viewing Files
7989 @subsection Viewing Files
7990 @cindex viewing files
7991 @cindex pseudo-articles
7992
7993 After decoding, if the file is some sort of archive, Gnus will attempt
7994 to unpack the archive and see if any of the files in the archive can be
7995 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7996 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
7997 uncompress and de-tar the main file, and then view the two pictures.
7998 This unpacking process is recursive, so if the archive contains archives
7999 of archives, it'll all be unpacked.
8000
8001 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
8002 extracted file into the summary buffer.  If you go to these
8003 ``articles'', you will be prompted for a command to run (usually Gnus
8004 will make a suggestion), and then the command will be run.
8005
8006 @vindex gnus-view-pseudo-asynchronously
8007 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
8008 until the viewing is done before proceeding.
8009
8010 @vindex gnus-view-pseudos
8011 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
8012 the pseudo-articles into the summary buffer, but view them
8013 immediately.  If this variable is @code{not-confirm}, the user won't even
8014 be asked for a confirmation before viewing is done.
8015
8016 @vindex gnus-view-pseudos-separately
8017 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
8018 pseudo-article will be created for each file to be viewed.  If
8019 @code{nil}, all files that use the same viewing command will be given as
8020 a list of parameters to that command.
8021
8022 @vindex gnus-insert-pseudo-articles
8023 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
8024 pseudo-articles when decoding.  It is @code{t} by default.
8025
8026 So; there you are, reading your @emph{pseudo-articles} in your
8027 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
8028 Why isn't anything real anymore? How did we get here?
8029
8030
8031 @node Article Treatment
8032 @section Article Treatment
8033
8034 Reading through this huge manual, you may have quite forgotten that the
8035 object of newsreaders is to actually, like, read what people have
8036 written.  Reading articles.  Unfortunately, people are quite bad at
8037 writing, so there are tons of functions and variables to make reading
8038 these articles easier.
8039
8040 @menu
8041 * Article Highlighting::        You want to make the article look like fruit salad.
8042 * Article Fontisizing::         Making emphasized text look nice.
8043 * Article Hiding::              You also want to make certain info go away.
8044 * Article Washing::             Lots of way-neat functions to make life better.
8045 * Article Header::              Doing various header transformations.
8046 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
8047 * Article Button Levels::       Controlling appearance of buttons.
8048 * Article Date::                Grumble, UT!
8049 * Article Display::             Display various stuff---X-Face, Picons, Smileys
8050 * Article Signature::           What is a signature?
8051 * Article Miscellanea::         Various other stuff.
8052 @end menu
8053
8054
8055 @node Article Highlighting
8056 @subsection Article Highlighting
8057 @cindex highlighting
8058
8059 Not only do you want your article buffer to look like fruit salad, but
8060 you want it to look like technicolor fruit salad.
8061
8062 @table @kbd
8063
8064 @item W H a
8065 @kindex W H a (Summary)
8066 @findex gnus-article-highlight
8067 @findex gnus-article-maybe-highlight
8068 Do much highlighting of the current article
8069 (@code{gnus-article-highlight}).  This function highlights header, cited
8070 text, the signature, and adds buttons to the body and the head.
8071
8072 @item W H h
8073 @kindex W H h (Summary)
8074 @findex gnus-article-highlight-headers
8075 @vindex gnus-header-face-alist
8076 Highlight the headers (@code{gnus-article-highlight-headers}).  The
8077 highlighting will be done according to the @code{gnus-header-face-alist}
8078 variable, which is a list where each element has the form
8079 @code{(@var{regexp} @var{name} @var{content})}.
8080 @var{regexp} is a regular expression for matching the
8081 header, @var{name} is the face used for highlighting the header name
8082 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
8083 the header value.  The first match made will be used.  Note that
8084 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
8085
8086 @item W H c
8087 @kindex W H c (Summary)
8088 @findex gnus-article-highlight-citation
8089 Highlight cited text (@code{gnus-article-highlight-citation}).
8090
8091 Some variables to customize the citation highlights:
8092
8093 @table @code
8094 @vindex gnus-cite-parse-max-size
8095
8096 @item gnus-cite-parse-max-size
8097 If the article size if bigger than this variable (which is 25000 by
8098 default), no citation highlighting will be performed.
8099
8100 @item gnus-cite-max-prefix
8101 @vindex gnus-cite-max-prefix
8102 Maximum possible length for a citation prefix (default 20).
8103
8104 @item gnus-cite-face-list
8105 @vindex gnus-cite-face-list
8106 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
8107 When there are citations from multiple articles in the same message,
8108 Gnus will try to give each citation from each article its own face.
8109 This should make it easier to see who wrote what.
8110
8111 @item gnus-supercite-regexp
8112 @vindex gnus-supercite-regexp
8113 Regexp matching normal Supercite attribution lines.
8114
8115 @item gnus-supercite-secondary-regexp
8116 @vindex gnus-supercite-secondary-regexp
8117 Regexp matching mangled Supercite attribution lines.
8118
8119 @item gnus-cite-minimum-match-count
8120 @vindex gnus-cite-minimum-match-count
8121 Minimum number of identical prefixes we have to see before we believe
8122 that it's a citation.
8123
8124 @item gnus-cite-attribution-prefix
8125 @vindex gnus-cite-attribution-prefix
8126 Regexp matching the beginning of an attribution line.
8127
8128 @item gnus-cite-attribution-suffix
8129 @vindex gnus-cite-attribution-suffix
8130 Regexp matching the end of an attribution line.
8131
8132 @item gnus-cite-attribution-face
8133 @vindex gnus-cite-attribution-face
8134 Face used for attribution lines.  It is merged with the face for the
8135 cited text belonging to the attribution.
8136
8137 @end table
8138
8139
8140 @item W H s
8141 @kindex W H s (Summary)
8142 @vindex gnus-signature-separator
8143 @vindex gnus-signature-face
8144 @findex gnus-article-highlight-signature
8145 Highlight the signature (@code{gnus-article-highlight-signature}).
8146 Everything after @code{gnus-signature-separator} (@pxref{Article
8147 Signature}) in an article will be considered a signature and will be
8148 highlighted with @code{gnus-signature-face}, which is @code{italic} by
8149 default.
8150
8151 @end table
8152
8153 @xref{Customizing Articles}, for how to highlight articles automatically.
8154
8155
8156 @node Article Fontisizing
8157 @subsection Article Fontisizing
8158 @cindex emphasis
8159 @cindex article emphasis
8160
8161 @findex gnus-article-emphasize
8162 @kindex W e (Summary)
8163 People commonly add emphasis to words in news articles by writing things
8164 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
8165 this look nicer by running the article through the @kbd{W e}
8166 (@code{gnus-article-emphasize}) command.
8167
8168 @vindex gnus-emphasis-alist
8169 How the emphasis is computed is controlled by the
8170 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8171 element is a regular expression to be matched.  The second is a number
8172 that says what regular expression grouping is used to find the entire
8173 emphasized word.  The third is a number that says what regexp grouping
8174 should be displayed and highlighted.  (The text between these two
8175 groupings will be hidden.)  The fourth is the face used for
8176 highlighting.
8177
8178 @lisp
8179 (setq gnus-emphasis-alist
8180       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8181         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8182 @end lisp
8183
8184 @cindex slash
8185 @cindex asterisk
8186 @cindex underline
8187 @cindex /
8188 @cindex *
8189
8190 @vindex gnus-emphasis-underline
8191 @vindex gnus-emphasis-bold
8192 @vindex gnus-emphasis-italic
8193 @vindex gnus-emphasis-underline-bold
8194 @vindex gnus-emphasis-underline-italic
8195 @vindex gnus-emphasis-bold-italic
8196 @vindex gnus-emphasis-underline-bold-italic
8197 By default, there are seven rules, and they use the following faces:
8198 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8199 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8200 @code{gnus-emphasis-underline-italic},
8201 @code{gnus-emphasis-underline-bold}, and
8202 @code{gnus-emphasis-underline-bold-italic}.
8203
8204 If you want to change these faces, you can either use @kbd{M-x
8205 customize}, or you can use @code{copy-face}.  For instance, if you want
8206 to make @code{gnus-emphasis-italic} use a red face instead, you could
8207 say something like:
8208
8209 @lisp
8210 (copy-face 'red 'gnus-emphasis-italic)
8211 @end lisp
8212
8213 @vindex gnus-group-highlight-words-alist
8214
8215 If you want to highlight arbitrary words, you can use the
8216 @code{gnus-group-highlight-words-alist} variable, which uses the same
8217 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8218 parameter (@pxref{Group Parameters}) can also be used.
8219
8220 @xref{Customizing Articles}, for how to fontize articles automatically.
8221
8222
8223 @node Article Hiding
8224 @subsection Article Hiding
8225 @cindex article hiding
8226
8227 Or rather, hiding certain things in each article.  There usually is much
8228 too much cruft in most articles.
8229
8230 @table @kbd
8231
8232 @item W W a
8233 @kindex W W a (Summary)
8234 @findex gnus-article-hide
8235 Do quite a lot of hiding on the article buffer
8236 (@kbd{gnus-article-hide}).  In particular, this function will hide
8237 headers, @acronym{PGP}, cited text and the signature.
8238
8239 @item W W h
8240 @kindex W W h (Summary)
8241 @findex gnus-article-hide-headers
8242 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8243 Headers}.
8244
8245 @item W W b
8246 @kindex W W b (Summary)
8247 @findex gnus-article-hide-boring-headers
8248 Hide headers that aren't particularly interesting
8249 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8250
8251 @item W W s
8252 @kindex W W s (Summary)
8253 @findex gnus-article-hide-signature
8254 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8255 Signature}.
8256
8257 @item W W l
8258 @kindex W W l (Summary)
8259 @findex gnus-article-hide-list-identifiers
8260 @vindex gnus-list-identifiers
8261 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8262 are strings some mailing list servers add to the beginning of all
8263 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8264 @samp{Re: } is skipped before stripping.  @code{gnus-list-identifiers}
8265 may not contain @code{\\(..\\)}.
8266
8267 @table @code
8268
8269 @item gnus-list-identifiers
8270 @vindex gnus-list-identifiers
8271 A regular expression that matches list identifiers to be removed from
8272 subject.  This can also be a list of regular expressions.
8273
8274 @end table
8275
8276 @item W W P
8277 @kindex W W P (Summary)
8278 @findex gnus-article-hide-pem
8279 Hide @acronym{PEM} (privacy enhanced messages) cruft
8280 (@code{gnus-article-hide-pem}).
8281
8282 @item W W B
8283 @kindex W W B (Summary)
8284 @findex gnus-article-strip-banner
8285 @vindex gnus-article-banner-alist
8286 @vindex gnus-article-address-banner-alist
8287 @cindex banner
8288 @cindex OneList
8289 @cindex stripping advertisements
8290 @cindex advertisements
8291 Strip the banner specified by the @code{banner} group parameter
8292 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8293 annoying banners and/or signatures that some mailing lists and moderated
8294 groups adds to all the messages.  The way to use this function is to add
8295 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8296 group you want banners stripped from.  The parameter either be a string,
8297 which will be interpreted as a regular expression matching text to be
8298 removed, or the symbol @code{signature}, meaning that the (last)
8299 signature should be removed, or other symbol, meaning that the
8300 corresponding regular expression in @code{gnus-article-banner-alist} is
8301 used.
8302
8303 Regardless of a group, you can hide things like advertisements only when
8304 the sender of an article has a certain mail address specified in
8305 @code{gnus-article-address-banner-alist}.
8306
8307 @table @code
8308
8309 @item gnus-article-address-banner-alist
8310 @vindex gnus-article-address-banner-alist
8311 Alist of mail addresses and banners.  Each element has the form
8312 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
8313 matching a mail address in the From header, @var{banner} is one of a
8314 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
8315 a regexp and @code{nil}.  If @var{address} matches author's mail
8316 address, it will remove things like advertisements.  For example, if a
8317 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
8318 banner something like @samp{Do You Yoo-hoo!?} in all articles he
8319 sends, you can use the following element to remove them:
8320
8321 @lisp
8322 ("@@yoo-hoo\\.co\\.jp\\'" .
8323  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8324 @end lisp
8325
8326 @end table
8327
8328 @item W W c
8329 @kindex W W c (Summary)
8330 @findex gnus-article-hide-citation
8331 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8332 customizing the hiding:
8333
8334 @table @code
8335
8336 @item gnus-cited-opened-text-button-line-format
8337 @itemx gnus-cited-closed-text-button-line-format
8338 @vindex gnus-cited-closed-text-button-line-format
8339 @vindex gnus-cited-opened-text-button-line-format
8340 Gnus adds buttons to show where the cited text has been hidden, and to
8341 allow toggle hiding the text.  The format of the variable is specified
8342 by these format-like variable (@pxref{Formatting Variables}).  These
8343 specs are valid:
8344
8345 @table @samp
8346 @item b
8347 Starting point of the hidden text.
8348 @item e
8349 Ending point of the hidden text.
8350 @item l
8351 Number of characters in the hidden region.
8352 @item n
8353 Number of lines of hidden text.
8354 @end table
8355
8356 @item gnus-cited-lines-visible
8357 @vindex gnus-cited-lines-visible
8358 The number of lines at the beginning of the cited text to leave
8359 shown.  This can also be a cons cell with the number of lines at the top
8360 and bottom of the text, respectively, to remain visible.
8361
8362 @end table
8363
8364 @item W W C-c
8365 @kindex W W C-c (Summary)
8366 @findex gnus-article-hide-citation-maybe
8367
8368 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8369 following two variables:
8370
8371 @table @code
8372 @item gnus-cite-hide-percentage
8373 @vindex gnus-cite-hide-percentage
8374 If the cited text is of a bigger percentage than this variable (default
8375 50), hide the cited text.
8376
8377 @item gnus-cite-hide-absolute
8378 @vindex gnus-cite-hide-absolute
8379 The cited text must have at least this length (default 10) before it
8380 is hidden.
8381 @end table
8382
8383 @item W W C
8384 @kindex W W C (Summary)
8385 @findex gnus-article-hide-citation-in-followups
8386 Hide cited text in articles that aren't roots
8387 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8388 useful as an interactive command, but might be a handy function to stick
8389 have happen automatically (@pxref{Customizing Articles}).
8390
8391 @end table
8392
8393 All these ``hiding'' commands are toggles, but if you give a negative
8394 prefix to these commands, they will show what they have previously
8395 hidden.  If you give a positive prefix, they will always hide.
8396
8397 Also @pxref{Article Highlighting} for further variables for
8398 citation customization.
8399
8400 @xref{Customizing Articles}, for how to hide article elements
8401 automatically.
8402
8403
8404 @node Article Washing
8405 @subsection Article Washing
8406 @cindex washing
8407 @cindex article washing
8408
8409 We call this ``article washing'' for a really good reason.  Namely, the
8410 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8411
8412 @dfn{Washing} is defined by us as ``changing something from something to
8413 something else'', but normally results in something looking better.
8414 Cleaner, perhaps.
8415
8416 @xref{Customizing Articles}, if you want to change how Gnus displays
8417 articles by default.
8418
8419 @table @kbd
8420
8421 @item C-u g
8422 This is not really washing, it's sort of the opposite of washing.  If
8423 you type this, you see the article exactly as it exists on disk or on
8424 the server.
8425
8426 @item g
8427 Force redisplaying of the current article
8428 (@code{gnus-summary-show-article}).  This is also not really washing.
8429 If you type this, you see the article without any previously applied
8430 interactive Washing functions but with all default treatments
8431 (@pxref{Customizing Articles}).
8432
8433 @item W l
8434 @kindex W l (Summary)
8435 @findex gnus-summary-stop-page-breaking
8436 Remove page breaks from the current article
8437 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8438 delimiters.
8439
8440 @item W r
8441 @kindex W r (Summary)
8442 @findex gnus-summary-caesar-message
8443 @c @icon{gnus-summary-caesar-message}
8444 Do a Caesar rotate (rot13) on the article buffer
8445 (@code{gnus-summary-caesar-message}).
8446 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8447 (Typically offensive jokes and such.)
8448
8449 It's commonly called ``rot13'' because each letter is rotated 13
8450 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8451 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8452 is rumored to have employed this form of, uh, somewhat weak encryption.
8453
8454 @item W m
8455 @kindex W m (Summary)
8456 @findex gnus-summary-morse-message
8457 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8458
8459 @item W t
8460 @item t
8461 @kindex W t (Summary)
8462 @kindex t (Summary)
8463 @findex gnus-summary-toggle-header
8464 Toggle whether to display all headers in the article buffer
8465 (@code{gnus-summary-toggle-header}).
8466
8467 @item W v
8468 @kindex W v (Summary)
8469 @findex gnus-summary-verbose-headers
8470 Toggle whether to display all headers in the article buffer permanently
8471 (@code{gnus-summary-verbose-headers}).
8472
8473 @item W o
8474 @kindex W o (Summary)
8475 @findex gnus-article-treat-overstrike
8476 Treat overstrike (@code{gnus-article-treat-overstrike}).
8477
8478 @item W d
8479 @kindex W d (Summary)
8480 @findex gnus-article-treat-dumbquotes
8481 @vindex gnus-article-dumbquotes-map
8482 @cindex Smartquotes
8483 @cindex M****s*** sm*rtq**t*s
8484 @cindex Latin 1
8485 Treat M****s*** sm*rtq**t*s according to
8486 @code{gnus-article-dumbquotes-map}
8487 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8488 whether a character is a sm*rtq**t* or not, so it should only be used
8489 interactively.
8490
8491 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8492 an attempt to provide more quoting characters.  If you see something
8493 like @code{\222} or @code{\264} where you're expecting some kind of
8494 apostrophe or quotation mark, then try this wash.
8495
8496 @item W Y f
8497 @kindex W Y f (Summary)
8498 @findex gnus-article-outlook-deuglify-article
8499 @cindex Outlook Express
8500 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
8501 unwrap lines, repair attribution and rearrange citation.
8502 (@code{gnus-article-outlook-deuglify-article}).
8503
8504 @item W Y u
8505 @kindex W Y u (Summary)
8506 @findex gnus-article-outlook-unwrap-lines
8507 @vindex gnus-outlook-deuglify-unwrap-min
8508 @vindex gnus-outlook-deuglify-unwrap-max
8509 Unwrap lines that appear to be wrapped citation lines.  You can control
8510 what lines will be unwrapped by frobbing
8511 @code{gnus-outlook-deuglify-unwrap-min} and
8512 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
8513 maximum length of an unwrapped citation line.
8514 (@code{gnus-article-outlook-unwrap-lines}).
8515
8516 @item W Y a
8517 @kindex W Y a (Summary)
8518 @findex gnus-article-outlook-repair-attribution
8519 Repair a broken attribution line.@*
8520 (@code{gnus-article-outlook-repair-attribution}).
8521
8522 @item W Y c
8523 @kindex W Y c (Summary)
8524 @findex gnus-article-outlook-rearrange-citation
8525 Repair broken citations by rearranging the text.
8526 (@code{gnus-article-outlook-rearrange-citation}).
8527
8528 @item W w
8529 @kindex W w (Summary)
8530 @findex gnus-article-fill-cited-article
8531 Do word wrap (@code{gnus-article-fill-cited-article}).
8532
8533 You can give the command a numerical prefix to specify the width to use
8534 when filling.
8535
8536 @item W Q
8537 @kindex W Q (Summary)
8538 @findex gnus-article-fill-long-lines
8539 Fill long lines (@code{gnus-article-fill-long-lines}).
8540
8541 @item W C
8542 @kindex W C (Summary)
8543 @findex gnus-article-capitalize-sentences
8544 Capitalize the first word in each sentence
8545 (@code{gnus-article-capitalize-sentences}).
8546
8547 @item W c
8548 @kindex W c (Summary)
8549 @findex gnus-article-remove-cr
8550 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8551 (this takes care of DOS line endings), and then translate any remaining
8552 CRs into LF (this takes care of Mac line endings)
8553 (@code{gnus-article-remove-cr}).
8554
8555 @item W q
8556 @kindex W q (Summary)
8557 @findex gnus-article-de-quoted-unreadable
8558 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
8559 Quoted-Printable is one common @acronym{MIME} encoding employed when
8560 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
8561 makes strings like @samp{déjà vu} look like @samp{d=E9j=E0 vu}, which
8562 doesn't look very readable to me.  Note that this is usually done
8563 automatically by Gnus if the message in question has a
8564 @code{Content-Transfer-Encoding} header that says that this encoding
8565 has been done.  If a prefix is given, a charset will be asked for.
8566
8567 @item W 6
8568 @kindex W 6 (Summary)
8569 @findex gnus-article-de-base64-unreadable
8570 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
8571 one common @acronym{MIME} encoding employed when sending
8572 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
8573 usually done automatically by Gnus if the message in question has a
8574 @code{Content-Transfer-Encoding} header that says that this encoding
8575 has been done.  If a prefix is given, a charset will be asked for.
8576
8577 @item W Z
8578 @kindex W Z (Summary)
8579 @findex gnus-article-decode-HZ
8580 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8581 common encoding employed when sending Chinese articles.  It typically
8582 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8583
8584 @item W A
8585 @kindex W A (Summary)
8586 @findex gnus-article-treat-ansi-sequences
8587 Translate ANSI SGR control sequences into overlays or extents
8588 (@code{gnus-article-treat-ansi-sequences}).  ANSI sequences are used in
8589 some Chinese hierarchies for highlighting.
8590
8591 @item W u
8592 @kindex W u (Summary)
8593 @findex gnus-article-unsplit-urls
8594 Remove newlines from within URLs.  Some mailers insert newlines into
8595 outgoing email messages to keep lines short.  This reformatting can
8596 split long URLs onto multiple lines.  Repair those URLs by removing
8597 the newlines (@code{gnus-article-unsplit-urls}).
8598
8599 @item W h
8600 @kindex W h (Summary)
8601 @findex gnus-article-wash-html
8602 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
8603 usually done automatically by Gnus if the message in question has a
8604 @code{Content-Type} header that says that the message is @acronym{HTML}.
8605
8606 If a prefix is given, a charset will be asked for.
8607
8608 @vindex gnus-article-wash-function
8609 The default is to use the function specified by
8610 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
8611 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
8612 @acronym{HTML}, but this is controlled by the
8613 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8614 can use include:
8615
8616 @table @code
8617 @item w3
8618 Use Emacs/w3.
8619
8620 @item w3m
8621 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
8622
8623 @item links
8624 Use @uref{http://links.sf.net/, Links}.
8625
8626 @item lynx
8627 Use @uref{http://lynx.isc.org/, Lynx}.
8628
8629 @item html2text
8630 Use html2text---a simple @acronym{HTML} converter included with Gnus.
8631
8632 @end table
8633
8634 @item W b
8635 @kindex W b (Summary)
8636 @findex gnus-article-add-buttons
8637 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8638 @xref{Article Buttons}.
8639
8640 @item W B
8641 @kindex W B (Summary)
8642 @findex gnus-article-add-buttons-to-head
8643 Add clickable buttons to the article headers
8644 (@code{gnus-article-add-buttons-to-head}).
8645
8646 @item W p
8647 @kindex W p (Summary)
8648 @findex gnus-article-verify-x-pgp-sig
8649 Verify a signed control message
8650 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
8651 @code{newgroup} and @code{checkgroups} are usually signed by the
8652 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
8653 the maintainer to your keyring to verify the
8654 message.@footnote{@acronym{PGP} keys for many hierarchies are
8655 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8656
8657 @item W s
8658 @kindex W s (Summary)
8659 @findex gnus-summary-force-verify-and-decrypt
8660 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
8661 @acronym{S/MIME}) message
8662 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8663
8664 @item W a
8665 @kindex W a (Summary)
8666 @findex gnus-article-strip-headers-in-body
8667 Strip headers like the @code{X-No-Archive} header from the beginning of
8668 article bodies (@code{gnus-article-strip-headers-in-body}).
8669
8670 @item W E l
8671 @kindex W E l (Summary)
8672 @findex gnus-article-strip-leading-blank-lines
8673 Remove all blank lines from the beginning of the article
8674 (@code{gnus-article-strip-leading-blank-lines}).
8675
8676 @item W E m
8677 @kindex W E m (Summary)
8678 @findex gnus-article-strip-multiple-blank-lines
8679 Replace all blank lines with empty lines and then all multiple empty
8680 lines with a single empty line.
8681 (@code{gnus-article-strip-multiple-blank-lines}).
8682
8683 @item W E t
8684 @kindex W E t (Summary)
8685 @findex gnus-article-remove-trailing-blank-lines
8686 Remove all blank lines at the end of the article
8687 (@code{gnus-article-remove-trailing-blank-lines}).
8688
8689 @item W E a
8690 @kindex W E a (Summary)
8691 @findex gnus-article-strip-blank-lines
8692 Do all the three commands above
8693 (@code{gnus-article-strip-blank-lines}).
8694
8695 @item W E A
8696 @kindex W E A (Summary)
8697 @findex gnus-article-strip-all-blank-lines
8698 Remove all blank lines
8699 (@code{gnus-article-strip-all-blank-lines}).
8700
8701 @item W E s
8702 @kindex W E s (Summary)
8703 @findex gnus-article-strip-leading-space
8704 Remove all white space from the beginning of all lines of the article
8705 body (@code{gnus-article-strip-leading-space}).
8706
8707 @item W E e
8708 @kindex W E e (Summary)
8709 @findex gnus-article-strip-trailing-space
8710 Remove all white space from the end of all lines of the article
8711 body (@code{gnus-article-strip-trailing-space}).
8712
8713 @end table
8714
8715 @xref{Customizing Articles}, for how to wash articles automatically.
8716
8717
8718 @node Article Header
8719 @subsection Article Header
8720
8721 These commands perform various transformations of article header.
8722
8723 @table @kbd
8724
8725 @item W G u
8726 @kindex W G u (Summary)
8727 @findex gnus-article-treat-unfold-headers
8728 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8729
8730 @item W G n
8731 @kindex W G n (Summary)
8732 @findex gnus-article-treat-fold-newsgroups
8733 Fold the @code{Newsgroups} and @code{Followup-To} headers
8734 (@code{gnus-article-treat-fold-newsgroups}).
8735
8736 @item W G f
8737 @kindex W G f (Summary)
8738 @findex gnus-article-treat-fold-headers
8739 Fold all the message headers
8740 (@code{gnus-article-treat-fold-headers}).
8741
8742 @item W E w
8743 @kindex W E w (Summary)
8744 @findex gnus-article-remove-leading-whitespace
8745 Remove excessive whitespace from all headers
8746 (@code{gnus-article-remove-leading-whitespace}).
8747
8748 @end table
8749
8750
8751 @node Article Buttons
8752 @subsection Article Buttons
8753 @cindex buttons
8754
8755 People often include references to other stuff in articles, and it would
8756 be nice if Gnus could just fetch whatever it is that people talk about
8757 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8758 button on these references.
8759
8760 @vindex gnus-button-man-handler
8761 Gnus adds @dfn{buttons} to certain standard references by default:
8762 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
8763 Emacs or Gnus related references.  This is controlled by two variables,
8764 one that handles article bodies and one that handles article heads:
8765
8766 @table @code
8767
8768 @item gnus-button-alist
8769 @vindex gnus-button-alist
8770 This is an alist where each entry has this form:
8771
8772 @lisp
8773 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8774 @end lisp
8775
8776 @table @var
8777
8778 @item regexp
8779 All text that match this regular expression (case insensitive) will be
8780 considered an external reference.  Here's a typical regexp that matches
8781 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8782 variable containing a regexp, useful variables to use include
8783 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
8784
8785 @item button-par
8786 Gnus has to know which parts of the matches is to be highlighted.  This
8787 is a number that says what sub-expression of the regexp is to be
8788 highlighted.  If you want it all highlighted, you use 0 here.
8789
8790 @item use-p
8791 This form will be @code{eval}ed, and if the result is non-@code{nil},
8792 this is considered a match.  This is useful if you want extra sifting to
8793 avoid false matches.  Often variables named
8794 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
8795 Levels}, but any other form may be used too.
8796
8797 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
8798
8799 @item function
8800 This function will be called when you click on this button.
8801
8802 @item data-par
8803 As with @var{button-par}, this is a sub-expression number, but this one
8804 says which part of the match is to be sent as data to @var{function}.
8805
8806 @end table
8807
8808 So the full entry for buttonizing URLs is then
8809
8810 @lisp
8811 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8812 @end lisp
8813
8814 @item gnus-header-button-alist
8815 @vindex gnus-header-button-alist
8816 This is just like the other alist, except that it is applied to the
8817 article head only, and that each entry has an additional element that is
8818 used to say what headers to apply the buttonize coding to:
8819
8820 @lisp
8821 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8822 @end lisp
8823
8824 @var{header} is a regular expression.
8825 @end table
8826
8827 @subsubsection Related variables and functions
8828
8829 @table @code
8830 @item gnus-button-@var{*}-level
8831 @xref{Article Button Levels}.
8832
8833 @c Stuff related to gnus-button-browse-level
8834
8835 @item gnus-button-url-regexp
8836 @vindex gnus-button-url-regexp
8837 A regular expression that matches embedded URLs.  It is used in the
8838 default values of the variables above.
8839
8840 @c Stuff related to gnus-button-man-level
8841
8842 @item gnus-button-man-handler
8843 @vindex gnus-button-man-handler
8844 The function to use for displaying man pages.  It must take at least one
8845 argument with a string naming the man page.
8846
8847 @c Stuff related to gnus-button-message-level
8848
8849 @item gnus-button-mid-or-mail-regexp
8850 @vindex gnus-button-mid-or-mail-regexp
8851 Regular expression that matches a message ID or a mail address.
8852
8853 @item gnus-button-prefer-mid-or-mail
8854 @vindex gnus-button-prefer-mid-or-mail
8855 This variable determines what to do when the button on a string as
8856 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
8857 message ID or a mail address.  If it is one of the symbols @code{mid} or
8858 @code{mail}, Gnus will always assume that the string is a message ID or
8859 a mail address, respectively.  If this variable is set to the symbol
8860 @code{ask}, always query the user what do do.  If it is a function, this
8861 function will be called with the string as its only argument.  The
8862 function must return @code{mid}, @code{mail}, @code{invalid} or
8863 @code{ask}.  The default value is the function
8864 @code{gnus-button-mid-or-mail-heuristic}.
8865
8866 @item gnus-button-mid-or-mail-heuristic
8867 @findex gnus-button-mid-or-mail-heuristic
8868 Function that guesses whether its argument is a message ID or a mail
8869 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
8870 it's a mail address, @code{ask} if unsure and @code{invalid} if the
8871 string is invalid.
8872
8873 @item gnus-button-mid-or-mail-heuristic-alist
8874 @vindex gnus-button-mid-or-mail-heuristic-alist
8875 An alist of @code{(RATE . REGEXP)} pairs used by the function
8876 @code{gnus-button-mid-or-mail-heuristic}.
8877
8878 @c Stuff related to gnus-button-tex-level
8879
8880 @item gnus-button-ctan-handler
8881 @findex gnus-button-ctan-handler
8882 The function to use for displaying CTAN links.  It must take one
8883 argument, the string naming the URL.
8884
8885 @item gnus-ctan-url
8886 @vindex gnus-ctan-url
8887 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
8888 by @code{gnus-button-ctan-handler}.
8889
8890 @c Misc stuff
8891
8892 @item gnus-article-button-face
8893 @vindex gnus-article-button-face
8894 Face used on buttons.
8895
8896 @item gnus-article-mouse-face
8897 @vindex gnus-article-mouse-face
8898 Face used when the mouse cursor is over a button.
8899
8900 @end table
8901
8902 @xref{Customizing Articles}, for how to buttonize articles automatically.
8903
8904
8905 @node Article Button Levels
8906 @subsection Article button levels
8907 @cindex button levels
8908 The higher the value of the variables @code{gnus-button-@var{*}-level},
8909 the more buttons will appear.  If the level is zero, no corresponding
8910 buttons are displayed.  With the default value (which is 5) you should
8911 already see quite a lot of buttons.  With higher levels, you will see
8912 more buttons, but you may also get more false positives.  To avoid them,
8913 you can set the variables @code{gnus-button-@var{*}-level} local to
8914 specific groups (@pxref{Group Parameters}).  Here's an example for the
8915 variable @code{gnus-parameters}:
8916
8917 @lisp
8918 ;; @r{increase @code{gnus-button-*-level} in some groups:}
8919 (setq gnus-parameters
8920       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
8921         ("\\<unix\\>"               (gnus-button-man-level 10))
8922         ("\\<tex\\>"                (gnus-button-tex-level 10))))
8923 @end lisp
8924
8925 @table @code
8926
8927 @item gnus-button-browse-level
8928 @vindex gnus-button-browse-level
8929 Controls the display of references to message IDs, mail addresses and
8930 news URLs.  Related variables and functions include
8931 @code{gnus-button-url-regexp}, @code{browse-url}, and
8932 @code{browse-url-browser-function}.
8933
8934 @item gnus-button-emacs-level
8935 @vindex gnus-button-emacs-level
8936 Controls the display of Emacs or Gnus references.  Related functions are
8937 @code{gnus-button-handle-custom},
8938 @code{gnus-button-handle-describe-function},
8939 @code{gnus-button-handle-describe-variable},
8940 @code{gnus-button-handle-symbol},
8941 @code{gnus-button-handle-describe-key},
8942 @code{gnus-button-handle-apropos},
8943 @code{gnus-button-handle-apropos-command},
8944 @code{gnus-button-handle-apropos-variable},
8945 @code{gnus-button-handle-apropos-documentation}, and
8946 @code{gnus-button-handle-library}.
8947
8948 @item gnus-button-man-level
8949 @vindex gnus-button-man-level
8950 Controls the display of references to (Unix) man pages.
8951 See @code{gnus-button-man-handler}.
8952
8953 @item gnus-button-message-level
8954 @vindex gnus-button-message-level
8955 Controls the display of message IDs, mail addresses and news URLs.
8956 Related variables and functions include
8957 @code{gnus-button-mid-or-mail-regexp},
8958 @code{gnus-button-prefer-mid-or-mail},
8959 @code{gnus-button-mid-or-mail-heuristic}, and
8960 @code{gnus-button-mid-or-mail-heuristic-alist}.
8961
8962 @item gnus-button-tex-level
8963 @vindex gnus-button-tex-level
8964 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
8965 URLs.  See the variables @code{gnus-ctan-url},
8966 @code{gnus-button-ctan-handler},
8967 @code{gnus-button-ctan-directory-regexp}, and
8968 @code{gnus-button-handle-ctan-bogus-regexp}.
8969
8970 @end table
8971
8972
8973 @node Article Date
8974 @subsection Article Date
8975
8976 The date is most likely generated in some obscure timezone you've never
8977 heard of, so it's quite nice to be able to find out what the time was
8978 when the article was sent.
8979
8980 @table @kbd
8981
8982 @item W T u
8983 @kindex W T u (Summary)
8984 @findex gnus-article-date-ut
8985 Display the date in UT (aka. GMT, aka ZULU)
8986 (@code{gnus-article-date-ut}).
8987
8988 @item W T i
8989 @kindex W T i (Summary)
8990 @findex gnus-article-date-iso8601
8991 @cindex ISO 8601
8992 Display the date in international format, aka. ISO 8601
8993 (@code{gnus-article-date-iso8601}).
8994
8995 @item W T l
8996 @kindex W T l (Summary)
8997 @findex gnus-article-date-local
8998 Display the date in the local timezone (@code{gnus-article-date-local}).
8999
9000 @item W T p
9001 @kindex W T p (Summary)
9002 @findex gnus-article-date-english
9003 Display the date in a format that's easily pronounceable in English
9004 (@code{gnus-article-date-english}).
9005
9006 @item W T s
9007 @kindex W T s (Summary)
9008 @vindex gnus-article-time-format
9009 @findex gnus-article-date-user
9010 @findex format-time-string
9011 Display the date using a user-defined format
9012 (@code{gnus-article-date-user}).  The format is specified by the
9013 @code{gnus-article-time-format} variable, and is a string that's passed
9014 to @code{format-time-string}.  See the documentation of that variable
9015 for a list of possible format specs.
9016
9017 @item W T e
9018 @kindex W T e (Summary)
9019 @findex gnus-article-date-lapsed
9020 @findex gnus-start-date-timer
9021 @findex gnus-stop-date-timer
9022 Say how much time has elapsed between the article was posted and now
9023 (@code{gnus-article-date-lapsed}).  It looks something like:
9024
9025 @example
9026 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
9027 @end example
9028
9029 @vindex gnus-article-date-lapsed-new-header
9030 The value of @code{gnus-article-date-lapsed-new-header} determines
9031 whether this header will just be added below the old Date one, or will
9032 replace it.
9033
9034 An advantage of using Gnus to read mail is that it converts simple bugs
9035 into wonderful absurdities.
9036
9037 If you want to have this line updated continually, you can put
9038
9039 @lisp
9040 (gnus-start-date-timer)
9041 @end lisp
9042
9043 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
9044 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
9045 command.
9046
9047 @item W T o
9048 @kindex W T o (Summary)
9049 @findex gnus-article-date-original
9050 Display the original date (@code{gnus-article-date-original}).  This can
9051 be useful if you normally use some other conversion function and are
9052 worried that it might be doing something totally wrong.  Say, claiming
9053 that the article was posted in 1854.  Although something like that is
9054 @emph{totally} impossible.  Don't you trust me? *titter*
9055
9056 @end table
9057
9058 @xref{Customizing Articles}, for how to display the date in your
9059 preferred format automatically.
9060
9061
9062 @node Article Display
9063 @subsection Article Display
9064 @cindex picons
9065 @cindex x-face
9066 @cindex smileys
9067
9068 These commands add various frivolous display gimmicks to the article
9069 buffer in Emacs versions that support them.
9070
9071 @code{X-Face} headers are small black-and-white images supplied by the
9072 message headers (@pxref{X-Face}).
9073
9074 @code{Face} headers are small colored images supplied by the message
9075 headers (@pxref{Face}).
9076
9077 Smileys are those little @samp{:-)} symbols that people like to litter
9078 their messages with (@pxref{Smileys}).
9079
9080 Picons, on the other hand, reside on your own system, and Gnus will
9081 try to match the headers to what you have (@pxref{Picons}).
9082
9083 All these functions are toggles---if the elements already exist,
9084 they'll be removed.
9085
9086 @table @kbd
9087 @item W D x
9088 @kindex W D x (Summary)
9089 @findex gnus-article-display-x-face
9090 Display an @code{X-Face} in the @code{From} header.
9091 (@code{gnus-article-display-x-face}).
9092
9093 @item W D d
9094 @kindex W D d (Summary)
9095 @findex gnus-article-display-face
9096 Display a @code{Face} in the @code{From} header.
9097 (@code{gnus-article-display-face}).
9098
9099 @item W D s
9100 @kindex W D s (Summary)
9101 @findex gnus-treat-smiley
9102 Display smileys (@code{gnus-treat-smiley}).
9103
9104 @item W D f
9105 @kindex W D f (Summary)
9106 @findex gnus-treat-from-picon
9107 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
9108
9109 @item W D m
9110 @kindex W D m (Summary)
9111 @findex gnus-treat-mail-picon
9112 Piconify all mail headers (i. e., @code{Cc}, @code{To})
9113 (@code{gnus-treat-mail-picon}).
9114
9115 @item W D n
9116 @kindex W D n (Summary)
9117 @findex gnus-treat-newsgroups-picon
9118 Piconify all news headers (i. e., @code{Newsgroups} and
9119 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
9120
9121 @item W D D
9122 @kindex W D D (Summary)
9123 @findex gnus-article-remove-images
9124 Remove all images from the article buffer
9125 (@code{gnus-article-remove-images}).
9126
9127 @end table
9128
9129
9130
9131 @node Article Signature
9132 @subsection Article Signature
9133 @cindex signatures
9134 @cindex article signature
9135
9136 @vindex gnus-signature-separator
9137 Each article is divided into two parts---the head and the body.  The
9138 body can be divided into a signature part and a text part.  The variable
9139 that says what is to be considered a signature is
9140 @code{gnus-signature-separator}.  This is normally the standard
9141 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
9142 non-standard signature separators, so this variable can also be a list
9143 of regular expressions to be tested, one by one.  (Searches are done
9144 from the end of the body towards the beginning.)  One likely value is:
9145
9146 @lisp
9147 (setq gnus-signature-separator
9148       '("^-- $"         ; @r{The standard}
9149         "^-- *$"        ; @r{A common mangling}
9150         "^-------*$"    ; @r{Many people just use a looong}
9151                         ; @r{line of dashes.  Shame!}
9152         "^ *--------*$" ; @r{Double-shame!}
9153         "^________*$"   ; @r{Underscores are also popular}
9154         "^========*$")) ; @r{Pervert!}
9155 @end lisp
9156
9157 The more permissive you are, the more likely it is that you'll get false
9158 positives.
9159
9160 @vindex gnus-signature-limit
9161 @code{gnus-signature-limit} provides a limit to what is considered a
9162 signature when displaying articles.
9163
9164 @enumerate
9165 @item
9166 If it is an integer, no signature may be longer (in characters) than
9167 that integer.
9168 @item
9169 If it is a floating point number, no signature may be longer (in lines)
9170 than that number.
9171 @item
9172 If it is a function, the function will be called without any parameters,
9173 and if it returns @code{nil}, there is no signature in the buffer.
9174 @item
9175 If it is a string, it will be used as a regexp.  If it matches, the text
9176 in question is not a signature.
9177 @end enumerate
9178
9179 This variable can also be a list where the elements may be of the types
9180 listed above.  Here's an example:
9181
9182 @lisp
9183 (setq gnus-signature-limit
9184       '(200.0 "^---*Forwarded article"))
9185 @end lisp
9186
9187 This means that if there are more than 200 lines after the signature
9188 separator, or the text after the signature separator is matched by
9189 the regular expression @samp{^---*Forwarded article}, then it isn't a
9190 signature after all.
9191
9192
9193 @node Article Miscellanea
9194 @subsection Article Miscellanea
9195
9196 @table @kbd
9197 @item A t
9198 @kindex A t (Summary)
9199 @findex gnus-article-babel
9200 Translate the article from one language to another
9201 (@code{gnus-article-babel}).
9202
9203 @end table
9204
9205
9206 @node MIME Commands
9207 @section MIME Commands
9208 @cindex MIME decoding
9209 @cindex attachments
9210 @cindex viewing attachments
9211
9212 The following commands all understand the numerical prefix.  For
9213 instance, @kbd{3 b} means ``view the third @acronym{MIME} part''.
9214
9215 @table @kbd
9216 @item b
9217 @itemx K v
9218 @kindex b (Summary)
9219 @kindex K v (Summary)
9220 View the @acronym{MIME} part.
9221
9222 @item K o
9223 @kindex K o (Summary)
9224 Save the @acronym{MIME} part.
9225
9226 @item K c
9227 @kindex K c (Summary)
9228 Copy the @acronym{MIME} part.
9229
9230 @item K e
9231 @kindex K e (Summary)
9232 View the @acronym{MIME} part externally.
9233
9234 @item K i
9235 @kindex K i (Summary)
9236 View the @acronym{MIME} part internally.
9237
9238 @item K |
9239 @kindex K | (Summary)
9240 Pipe the @acronym{MIME} part to an external command.
9241 @end table
9242
9243 The rest of these @acronym{MIME} commands do not use the numerical prefix in
9244 the same manner:
9245
9246 @table @kbd
9247 @item K b
9248 @kindex K b (Summary)
9249 Make all the @acronym{MIME} parts have buttons in front of them.  This is
9250 mostly useful if you wish to save (or perform other actions) on inlined
9251 parts.
9252
9253 @item K m
9254 @kindex K m (Summary)
9255 @findex gnus-summary-repair-multipart
9256 Some multipart messages are transmitted with missing or faulty headers.
9257 This command will attempt to ``repair'' these messages so that they can
9258 be viewed in a more pleasant manner
9259 (@code{gnus-summary-repair-multipart}).
9260
9261 @item X m
9262 @kindex X m (Summary)
9263 @findex gnus-summary-save-parts
9264 Save all parts matching a @acronym{MIME} type to a directory
9265 (@code{gnus-summary-save-parts}).  Understands the process/prefix
9266 convention (@pxref{Process/Prefix}).
9267
9268 @item M-t
9269 @kindex M-t (Summary)
9270 @findex gnus-summary-toggle-display-buttonized
9271 Toggle the buttonized display of the article buffer
9272 (@code{gnus-summary-toggle-display-buttonized}).
9273
9274 @item W M w
9275 @kindex W M w (Summary)
9276 @findex gnus-article-decode-mime-words
9277 Decode RFC 2047-encoded words in the article headers
9278 (@code{gnus-article-decode-mime-words}).
9279
9280 @item W M c
9281 @kindex W M c (Summary)
9282 @findex gnus-article-decode-charset
9283 Decode encoded article bodies as well as charsets
9284 (@code{gnus-article-decode-charset}).
9285
9286 This command looks in the @code{Content-Type} header to determine the
9287 charset.  If there is no such header in the article, you can give it a
9288 prefix, which will prompt for the charset to decode as.  In regional
9289 groups where people post using some common encoding (but do not
9290 include @acronym{MIME} headers), you can set the @code{charset} group/topic
9291 parameter to the required charset (@pxref{Group Parameters}).
9292
9293 @item W M v
9294 @kindex W M v (Summary)
9295 @findex gnus-mime-view-all-parts
9296 View all the @acronym{MIME} parts in the current article
9297 (@code{gnus-mime-view-all-parts}).
9298
9299 @end table
9300
9301 Relevant variables:
9302
9303 @table @code
9304 @item gnus-ignored-mime-types
9305 @vindex gnus-ignored-mime-types
9306 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9307 this list will be completely ignored by Gnus.  The default value is
9308 @code{nil}.
9309
9310 To have all Vcards be ignored, you'd say something like this:
9311
9312 @lisp
9313 (setq gnus-ignored-mime-types
9314       '("text/x-vcard"))
9315 @end lisp
9316
9317 @item gnus-article-loose-mime
9318 @vindex gnus-article-loose-mime
9319 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
9320 before interpreting the message as a @acronym{MIME} message.  This helps
9321 when reading messages from certain broken mail user agents.  The
9322 default is @code{nil}.
9323
9324 @item gnus-article-emulate-mime
9325 @vindex gnus-article-emulate-mime
9326 There are other, non-@acronym{MIME} encoding methods used.  The most common
9327 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9328 this variable is non-@code{nil}, Gnus will look in message bodies to
9329 see if it finds these encodings, and if so, it'll run them through the
9330 Gnus @acronym{MIME} machinery.  The default is @code{t}.
9331
9332 @item gnus-unbuttonized-mime-types
9333 @vindex gnus-unbuttonized-mime-types
9334 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9335 this list won't have @acronym{MIME} buttons inserted unless they aren't
9336 displayed or this variable is overridden by
9337 @code{gnus-buttonized-mime-types}.  The default value is
9338 @code{(".*/.*")}.  This variable is only used when
9339 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
9340
9341 @item gnus-buttonized-mime-types
9342 @vindex gnus-buttonized-mime-types
9343 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9344 this list will have @acronym{MIME} buttons inserted unless they aren't
9345 displayed.  This variable overrides
9346 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9347 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9348 is @code{nil}.
9349
9350 To see e.g. security buttons but no other buttons, you could set this
9351 variable to @code{("multipart/signed")} and leave
9352 @code{gnus-unbuttonized-mime-types} at the default value.
9353
9354 @item gnus-inhibit-mime-unbuttonizing
9355 @vindex gnus-inhibit-mime-unbuttonizing
9356 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
9357 default value is @code{nil}.
9358
9359 @item gnus-article-mime-part-function
9360 @vindex gnus-article-mime-part-function
9361 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
9362 handle as the parameter.  The function is meant to be used to allow
9363 users to gather information from the article (e. g., add Vcard info to
9364 the bbdb database) or to do actions based on parts (e. g., automatically
9365 save all jpegs into some directory).
9366
9367 Here's an example function the does the latter:
9368
9369 @lisp
9370 (defun my-save-all-jpeg-parts (handle)
9371   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9372     (with-temp-buffer
9373       (insert (mm-get-part handle))
9374       (write-region (point-min) (point-max)
9375                     (read-file-name "Save jpeg to: ")))))
9376 (setq gnus-article-mime-part-function
9377       'my-save-all-jpeg-parts)
9378 @end lisp
9379
9380 @vindex gnus-mime-multipart-functions
9381 @item gnus-mime-multipart-functions
9382 Alist of @acronym{MIME} multipart types and functions to handle them.
9383
9384 @vindex mm-file-name-rewrite-functions
9385 @item mm-file-name-rewrite-functions
9386 List of functions used for rewriting file names of @acronym{MIME} parts.
9387 Each function takes a file name as input and returns a file name.
9388
9389 Ready-made functions include@*
9390 @code{mm-file-name-delete-whitespace},
9391 @code{mm-file-name-trim-whitespace},
9392 @code{mm-file-name-collapse-whitespace}, and
9393 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9394 the variable @code{mm-file-name-replace-whitespace} to replace each
9395 whitespace character in a file name with that string; default value
9396 is @code{"_"} (a single underscore).
9397 @findex mm-file-name-delete-whitespace
9398 @findex mm-file-name-trim-whitespace
9399 @findex mm-file-name-collapse-whitespace
9400 @findex mm-file-name-replace-whitespace
9401 @vindex mm-file-name-replace-whitespace
9402
9403 The standard functions @code{capitalize}, @code{downcase},
9404 @code{upcase}, and @code{upcase-initials} may be useful, too.
9405
9406 Everybody knows that whitespace characters in file names are evil,
9407 except those who don't know.  If you receive lots of attachments from
9408 such unenlightened users, you can make live easier by adding
9409
9410 @lisp
9411 (setq mm-file-name-rewrite-functions
9412       '(mm-file-name-trim-whitespace
9413         mm-file-name-collapse-whitespace
9414         mm-file-name-replace-whitespace))
9415 @end lisp
9416
9417 @noindent
9418 to your @file{~/.gnus.el} file.
9419
9420 @end table
9421
9422
9423 @node Charsets
9424 @section Charsets
9425 @cindex charsets
9426
9427 People use different charsets, and we have @acronym{MIME} to let us know what
9428 charsets they use.  Or rather, we wish we had.  Many people use
9429 newsreaders and mailers that do not understand or use @acronym{MIME}, and
9430 just send out messages without saying what character sets they use.  To
9431 help a bit with this, some local news hierarchies have policies that say
9432 what character set is the default.  For instance, the @samp{fj}
9433 hierarchy uses @code{iso-2022-jp-2}.
9434
9435 @vindex gnus-group-charset-alist
9436 This knowledge is encoded in the @code{gnus-group-charset-alist}
9437 variable, which is an alist of regexps (use the first item to match full
9438 group names) and default charsets to be used when reading these groups.
9439
9440 @vindex gnus-newsgroup-ignored-charsets
9441 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
9442 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9443 even if they really are in @code{koi-8}.  To help here, the
9444 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9445 charsets that are listed here will be ignored.  The variable can be
9446 set on a group-by-group basis using the group parameters (@pxref{Group
9447 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9448 which includes values some agents insist on having in there.
9449
9450 @vindex gnus-group-posting-charset-alist
9451 When posting, @code{gnus-group-posting-charset-alist} is used to
9452 determine which charsets should not be encoded using the @acronym{MIME}
9453 encodings.  For instance, some hierarchies discourage using
9454 quoted-printable header encoding.
9455
9456 This variable is an alist of regexps and permitted unencoded charsets
9457 for posting.  Each element of the alist has the form @code{(}@var{test
9458 header body-list}@code{)}, where:
9459
9460 @table @var
9461 @item test
9462 is either a regular expression matching the newsgroup header or a
9463 variable to query,
9464 @item header
9465 is the charset which may be left unencoded in the header (@code{nil}
9466 means encode all charsets),
9467 @item body-list
9468 is a list of charsets which may be encoded using 8bit content-transfer
9469 encoding in the body, or one of the special values @code{nil} (always
9470 encode using quoted-printable) or @code{t} (always use 8bit).
9471 @end table
9472
9473 @cindex Russian
9474 @cindex koi8-r
9475 @cindex koi8-u
9476 @cindex iso-8859-5
9477 @cindex coding system aliases
9478 @cindex preferred charset
9479
9480 Other charset tricks that may be useful, although not Gnus-specific:
9481
9482 If there are several @acronym{MIME} charsets that encode the same Emacs
9483 charset, you can choose what charset to use by saying the following:
9484
9485 @lisp
9486 (put-charset-property 'cyrillic-iso8859-5
9487                       'preferred-coding-system 'koi8-r)
9488 @end lisp
9489
9490 This means that Russian will be encoded using @code{koi8-r} instead of
9491 the default @code{iso-8859-5} @acronym{MIME} charset.
9492
9493 If you want to read messages in @code{koi8-u}, you can cheat and say
9494
9495 @lisp
9496 (define-coding-system-alias 'koi8-u 'koi8-r)
9497 @end lisp
9498
9499 This will almost do the right thing.
9500
9501 And finally, to read charsets like @code{windows-1251}, you can say
9502 something like
9503
9504 @lisp
9505 (codepage-setup 1251)
9506 (define-coding-system-alias 'windows-1251 'cp1251)
9507 @end lisp
9508
9509
9510 @node Article Commands
9511 @section Article Commands
9512
9513 @table @kbd
9514
9515 @item A P
9516 @cindex PostScript
9517 @cindex printing
9518 @kindex A P (Summary)
9519 @vindex gnus-ps-print-hook
9520 @findex gnus-summary-print-article
9521 Generate and print a PostScript image of the article buffer
9522 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9523 be run just before printing the buffer.  An alternative way to print
9524 article is to use Muttprint (@pxref{Saving Articles}).
9525
9526 @end table
9527
9528
9529 @node Summary Sorting
9530 @section Summary Sorting
9531 @cindex summary sorting
9532
9533 You can have the summary buffer sorted in various ways, even though I
9534 can't really see why you'd want that.
9535
9536 @table @kbd
9537
9538 @item C-c C-s C-n
9539 @kindex C-c C-s C-n (Summary)
9540 @findex gnus-summary-sort-by-number
9541 Sort by article number (@code{gnus-summary-sort-by-number}).
9542
9543 @item C-c C-s C-a
9544 @kindex C-c C-s C-a (Summary)
9545 @findex gnus-summary-sort-by-author
9546 Sort by author (@code{gnus-summary-sort-by-author}).
9547
9548 @item C-c C-s C-s
9549 @kindex C-c C-s C-s (Summary)
9550 @findex gnus-summary-sort-by-subject
9551 Sort by subject (@code{gnus-summary-sort-by-subject}).
9552
9553 @item C-c C-s C-d
9554 @kindex C-c C-s C-d (Summary)
9555 @findex gnus-summary-sort-by-date
9556 Sort by date (@code{gnus-summary-sort-by-date}).
9557
9558 @item C-c C-s C-l
9559 @kindex C-c C-s C-l (Summary)
9560 @findex gnus-summary-sort-by-lines
9561 Sort by lines (@code{gnus-summary-sort-by-lines}).
9562
9563 @item C-c C-s C-c
9564 @kindex C-c C-s C-c (Summary)
9565 @findex gnus-summary-sort-by-chars
9566 Sort by article length (@code{gnus-summary-sort-by-chars}).
9567
9568 @item C-c C-s C-i
9569 @kindex C-c C-s C-i (Summary)
9570 @findex gnus-summary-sort-by-score
9571 Sort by score (@code{gnus-summary-sort-by-score}).
9572
9573 @item C-c C-s C-r
9574 @kindex C-c C-s C-r (Summary)
9575 @findex gnus-summary-sort-by-random
9576 Randomize (@code{gnus-summary-sort-by-random}).
9577
9578 @item C-c C-s C-o
9579 @kindex C-c C-s C-o (Summary)
9580 @findex gnus-summary-sort-by-original
9581 Sort using the default sorting method
9582 (@code{gnus-summary-sort-by-original}).
9583 @end table
9584
9585 These functions will work both when you use threading and when you don't
9586 use threading.  In the latter case, all summary lines will be sorted,
9587 line by line.  In the former case, sorting will be done on a
9588 root-by-root basis, which might not be what you were looking for.  To
9589 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9590 Commands}).
9591
9592
9593 @node Finding the Parent
9594 @section Finding the Parent
9595 @cindex parent articles
9596 @cindex referring articles
9597
9598 @table @kbd
9599 @item ^
9600 @kindex ^ (Summary)
9601 @findex gnus-summary-refer-parent-article
9602 If you'd like to read the parent of the current article, and it is not
9603 displayed in the summary buffer, you might still be able to.  That is,
9604 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
9605 and the @code{References} in the current article are not mangled, you
9606 can just press @kbd{^} or @kbd{A r}
9607 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9608 you'll get the parent.  If the parent is already displayed in the
9609 summary buffer, point will just move to this article.
9610
9611 If given a positive numerical prefix, fetch that many articles back into
9612 the ancestry.  If given a negative numerical prefix, fetch just that
9613 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
9614 grandparent and the grandgrandparent of the current article.  If you say
9615 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
9616 article.
9617
9618 @item A R (Summary)
9619 @findex gnus-summary-refer-references
9620 @kindex A R (Summary)
9621 Fetch all articles mentioned in the @code{References} header of the
9622 article (@code{gnus-summary-refer-references}).
9623
9624 @item A T (Summary)
9625 @findex gnus-summary-refer-thread
9626 @kindex A T (Summary)
9627 Display the full thread where the current article appears
9628 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9629 headers in the current group to work, so it usually takes a while.  If
9630 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9631 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9632 visible effects normally, but it'll make this command work a whole lot
9633 faster.  Of course, it'll make group entry somewhat slow.
9634
9635 @vindex gnus-refer-thread-limit
9636 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9637 articles before the first displayed in the current group) headers to
9638 fetch when doing this command.  The default is 200.  If @code{t}, all
9639 the available headers will be fetched.  This variable can be overridden
9640 by giving the @kbd{A T} command a numerical prefix.
9641
9642 @item M-^ (Summary)
9643 @findex gnus-summary-refer-article
9644 @kindex M-^ (Summary)
9645 @cindex Message-ID
9646 @cindex fetching by Message-ID
9647 You can also ask the @acronym{NNTP} server for an arbitrary article, no
9648 matter what group it belongs to.  @kbd{M-^}
9649 (@code{gnus-summary-refer-article}) will ask you for a
9650 @code{Message-ID}, which is one of those long, hard-to-read thingies
9651 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9652 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9653 @end table
9654
9655 The current select method will be used when fetching by
9656 @code{Message-ID} from non-news select method, but you can override this
9657 by giving this command a prefix.
9658
9659 @vindex gnus-refer-article-method
9660 If the group you are reading is located on a back end that does not
9661 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9662 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
9663 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
9664 updating the spool you are reading from, but that's not really
9665 necessary.
9666
9667 It can also be a list of select methods, as well as the special symbol
9668 @code{current}, which means to use the current select method.  If it
9669 is a list, Gnus will try all the methods in the list until it finds a
9670 match.
9671
9672 Here's an example setting that will first try the current method, and
9673 then ask Google if that fails:
9674
9675 @lisp
9676 (setq gnus-refer-article-method
9677       '(current
9678         (nnweb "google" (nnweb-type google))))
9679 @end lisp
9680
9681 Most of the mail back ends support fetching by @code{Message-ID}, but
9682 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9683 @code{nnbabyl}, @code{nnmaildir}, @code{nnml}, are able to locate
9684 articles from any groups, while @code{nnfolder}, and @code{nnimap} are
9685 only able to locate articles that have been posted to the current
9686 group.  (Anything else would be too time consuming.)  @code{nnmh} does
9687 not support this at all.
9688
9689
9690 @node Alternative Approaches
9691 @section Alternative Approaches
9692
9693 Different people like to read news using different methods.  This being
9694 Gnus, we offer a small selection of minor modes for the summary buffers.
9695
9696 @menu
9697 * Pick and Read::               First mark articles and then read them.
9698 * Binary Groups::               Auto-decode all articles.
9699 @end menu
9700
9701
9702 @node Pick and Read
9703 @subsection Pick and Read
9704 @cindex pick and read
9705
9706 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9707 a two-phased reading interface.  The user first marks in a summary
9708 buffer the articles she wants to read.  Then she starts reading the
9709 articles with just an article buffer displayed.
9710
9711 @findex gnus-pick-mode
9712 @kindex M-x gnus-pick-mode
9713 Gnus provides a summary buffer minor mode that allows
9714 this---@code{gnus-pick-mode}.  This basically means that a few process
9715 mark commands become one-keystroke commands to allow easy marking, and
9716 it provides one additional command for switching to the summary buffer.
9717
9718 Here are the available keystrokes when using pick mode:
9719
9720 @table @kbd
9721 @item .
9722 @kindex . (Pick)
9723 @findex gnus-pick-article-or-thread
9724 Pick the article or thread on the current line
9725 (@code{gnus-pick-article-or-thread}).  If the variable
9726 @code{gnus-thread-hide-subtree} is true, then this key selects the
9727 entire thread when used at the first article of the thread.  Otherwise,
9728 it selects just the article.  If given a numerical prefix, go to that
9729 thread or article and pick it.  (The line number is normally displayed
9730 at the beginning of the summary pick lines.)
9731
9732 @item SPACE
9733 @kindex SPACE (Pick)
9734 @findex gnus-pick-next-page
9735 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9736 at the end of the buffer, start reading the picked articles.
9737
9738 @item u
9739 @kindex u (Pick)
9740 @findex gnus-pick-unmark-article-or-thread.
9741 Unpick the thread or article
9742 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9743 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9744 thread if used at the first article of the thread.  Otherwise it unpicks
9745 just the article.  You can give this key a numerical prefix to unpick
9746 the thread or article at that line.
9747
9748 @item RET
9749 @kindex RET (Pick)
9750 @findex gnus-pick-start-reading
9751 @vindex gnus-pick-display-summary
9752 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9753 given a prefix, mark all unpicked articles as read first.  If
9754 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9755 will still be visible when you are reading.
9756
9757 @end table
9758
9759 All the normal summary mode commands are still available in the
9760 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9761 which is mapped to the same function
9762 @code{gnus-summary-tick-article-forward}.
9763
9764 If this sounds like a good idea to you, you could say:
9765
9766 @lisp
9767 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9768 @end lisp
9769
9770 @vindex gnus-pick-mode-hook
9771 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9772
9773 @vindex gnus-mark-unpicked-articles-as-read
9774 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9775 all unpicked articles as read.  The default is @code{nil}.
9776
9777 @vindex gnus-summary-pick-line-format
9778 The summary line format in pick mode is slightly different from the
9779 standard format.  At the beginning of each line the line number is
9780 displayed.  The pick mode line format is controlled by the
9781 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9782 Variables}).  It accepts the same format specs that
9783 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9784
9785
9786 @node Binary Groups
9787 @subsection Binary Groups
9788 @cindex binary groups
9789
9790 @findex gnus-binary-mode
9791 @kindex M-x gnus-binary-mode
9792 If you spend much time in binary groups, you may grow tired of hitting
9793 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9794 is a minor mode for summary buffers that makes all ordinary Gnus article
9795 selection functions uudecode series of articles and display the result
9796 instead of just displaying the articles the normal way.
9797
9798 @kindex g (Binary)
9799 @findex gnus-binary-show-article
9800 The only way, in fact, to see the actual articles is the @kbd{g}
9801 command, when you have turned on this mode
9802 (@code{gnus-binary-show-article}).
9803
9804 @vindex gnus-binary-mode-hook
9805 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9806
9807
9808 @node Tree Display
9809 @section Tree Display
9810 @cindex trees
9811
9812 @vindex gnus-use-trees
9813 If you don't like the normal Gnus summary display, you might try setting
9814 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9815 additional @dfn{tree buffer}.  You can execute all summary mode commands
9816 in the tree buffer.
9817
9818 There are a few variables to customize the tree display, of course:
9819
9820 @table @code
9821 @item gnus-tree-mode-hook
9822 @vindex gnus-tree-mode-hook
9823 A hook called in all tree mode buffers.
9824
9825 @item gnus-tree-mode-line-format
9826 @vindex gnus-tree-mode-line-format
9827 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9828 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9829 of valid specs, @pxref{Summary Buffer Mode Line}.
9830
9831 @item gnus-selected-tree-face
9832 @vindex gnus-selected-tree-face
9833 Face used for highlighting the selected article in the tree buffer.  The
9834 default is @code{modeline}.
9835
9836 @item gnus-tree-line-format
9837 @vindex gnus-tree-line-format
9838 A format string for the tree nodes.  The name is a bit of a misnomer,
9839 though---it doesn't define a line, but just the node.  The default value
9840 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9841 the name of the poster.  It is vital that all nodes are of the same
9842 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9843
9844 Valid specs are:
9845
9846 @table @samp
9847 @item n
9848 The name of the poster.
9849 @item f
9850 The @code{From} header.
9851 @item N
9852 The number of the article.
9853 @item [
9854 The opening bracket.
9855 @item ]
9856 The closing bracket.
9857 @item s
9858 The subject.
9859 @end table
9860
9861 @xref{Formatting Variables}.
9862
9863 Variables related to the display are:
9864
9865 @table @code
9866 @item gnus-tree-brackets
9867 @vindex gnus-tree-brackets
9868 This is used for differentiating between ``real'' articles and
9869 ``sparse'' articles.  The format is
9870 @example
9871 ((@var{real-open} . @var{real-close})
9872  (@var{sparse-open} . @var{sparse-close})
9873  (@var{dummy-open} . @var{dummy-close}))
9874 @end example
9875 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9876
9877 @item gnus-tree-parent-child-edges
9878 @vindex gnus-tree-parent-child-edges
9879 This is a list that contains the characters used for connecting parent
9880 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9881
9882 @end table
9883
9884 @item gnus-tree-minimize-window
9885 @vindex gnus-tree-minimize-window
9886 If this variable is non-@code{nil}, Gnus will try to keep the tree
9887 buffer as small as possible to allow more room for the other Gnus
9888 windows.  If this variable is a number, the tree buffer will never be
9889 higher than that number.  The default is @code{t}.  Note that if you
9890 have several windows displayed side-by-side in a frame and the tree
9891 buffer is one of these, minimizing the tree window will also resize all
9892 other windows displayed next to it.
9893
9894 You may also wish to add the following hook to keep the window minimized
9895 at all times:
9896
9897 @lisp
9898 (add-hook 'gnus-configure-windows-hook
9899           'gnus-tree-perhaps-minimize)
9900 @end lisp
9901
9902 @item gnus-generate-tree-function
9903 @vindex gnus-generate-tree-function
9904 @findex gnus-generate-horizontal-tree
9905 @findex gnus-generate-vertical-tree
9906 The function that actually generates the thread tree.  Two predefined
9907 functions are available: @code{gnus-generate-horizontal-tree} and
9908 @code{gnus-generate-vertical-tree} (which is the default).
9909
9910 @end table
9911
9912 Here's an example from a horizontal tree buffer:
9913
9914 @example
9915 @{***@}-(***)-[odd]-[Gun]
9916      |      \[Jan]
9917      |      \[odd]-[Eri]
9918      |      \(***)-[Eri]
9919      |            \[odd]-[Paa]
9920      \[Bjo]
9921      \[Gun]
9922      \[Gun]-[Jor]
9923 @end example
9924
9925 Here's the same thread displayed in a vertical tree buffer:
9926
9927 @example
9928 @group
9929 @{***@}
9930   |--------------------------\-----\-----\
9931 (***)                         [Bjo] [Gun] [Gun]
9932   |--\-----\-----\                          |
9933 [odd] [Jan] [odd] (***)                   [Jor]
9934   |           |     |--\
9935 [Gun]       [Eri] [Eri] [odd]
9936                           |
9937                         [Paa]
9938 @end group
9939 @end example
9940
9941 If you're using horizontal trees, it might be nice to display the trees
9942 side-by-side with the summary buffer.  You could add something like the
9943 following to your @file{~/.gnus.el} file:
9944
9945 @lisp
9946 (setq gnus-use-trees t
9947       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9948       gnus-tree-minimize-window nil)
9949 (gnus-add-configuration
9950  '(article
9951    (vertical 1.0
9952              (horizontal 0.25
9953                          (summary 0.75 point)
9954                          (tree 1.0))
9955              (article 1.0))))
9956 @end lisp
9957
9958 @xref{Window Layout}.
9959
9960
9961 @node Mail Group Commands
9962 @section Mail Group Commands
9963 @cindex mail group commands
9964
9965 Some commands only make sense in mail groups.  If these commands are
9966 invalid in the current group, they will raise a hell and let you know.
9967
9968 All these commands (except the expiry and edit commands) use the
9969 process/prefix convention (@pxref{Process/Prefix}).
9970
9971 @table @kbd
9972
9973 @item B e
9974 @kindex B e (Summary)
9975 @findex gnus-summary-expire-articles
9976 Run all expirable articles in the current group through the expiry
9977 process (@code{gnus-summary-expire-articles}).  That is, delete all
9978 expirable articles in the group that have been around for a while.
9979 (@pxref{Expiring Mail}).
9980
9981 @item B C-M-e
9982 @kindex B C-M-e (Summary)
9983 @findex gnus-summary-expire-articles-now
9984 Delete all the expirable articles in the group
9985 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9986 articles eligible for expiry in the current group will
9987 disappear forever into that big @file{/dev/null} in the sky.
9988
9989 @item B DEL
9990 @kindex B DEL (Summary)
9991 @findex gnus-summary-delete-article
9992 @c @icon{gnus-summary-mail-delete}
9993 Delete the mail article.  This is ``delete'' as in ``delete it from your
9994 disk forever and ever, never to return again.'' Use with caution.
9995 (@code{gnus-summary-delete-article}).
9996
9997 @item B m
9998 @kindex B m (Summary)
9999 @cindex move mail
10000 @findex gnus-summary-move-article
10001 @vindex gnus-preserve-marks
10002 Move the article from one mail group to another
10003 (@code{gnus-summary-move-article}).  Marks will be preserved if
10004 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
10005
10006 @item B c
10007 @kindex B c (Summary)
10008 @cindex copy mail
10009 @findex gnus-summary-copy-article
10010 @c @icon{gnus-summary-mail-copy}
10011 Copy the article from one group (mail group or not) to a mail group
10012 (@code{gnus-summary-copy-article}).  Marks will be preserved if
10013 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
10014
10015 @item B B
10016 @kindex B B (Summary)
10017 @cindex crosspost mail
10018 @findex gnus-summary-crosspost-article
10019 Crosspost the current article to some other group
10020 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
10021 the article in the other group, and the Xref headers of the article will
10022 be properly updated.
10023
10024 @item B i
10025 @kindex B i (Summary)
10026 @findex gnus-summary-import-article
10027 Import an arbitrary file into the current mail newsgroup
10028 (@code{gnus-summary-import-article}).  You will be prompted for a file
10029 name, a @code{From} header and a @code{Subject} header.
10030
10031 @item B I
10032 @kindex B I (Summary)
10033 @findex gnus-summary-create-article
10034 Create an empty article in the current mail newsgroups
10035 (@code{gnus-summary-create-article}).  You will be prompted for a
10036 @code{From} header and a @code{Subject} header.
10037
10038 @item B r
10039 @kindex B r (Summary)
10040 @findex gnus-summary-respool-article
10041 @vindex gnus-summary-respool-default-method
10042 Respool the mail article (@code{gnus-summary-respool-article}).
10043 @code{gnus-summary-respool-default-method} will be used as the default
10044 select method when respooling.  This variable is @code{nil} by default,
10045 which means that the current group select method will be used instead.
10046 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
10047 (which is the default).
10048
10049 @item B w
10050 @itemx e
10051 @kindex B w (Summary)
10052 @kindex e (Summary)
10053 @findex gnus-summary-edit-article
10054 @kindex C-c C-c (Article)
10055 @findex gnus-summary-edit-article-done
10056 Edit the current article (@code{gnus-summary-edit-article}).  To finish
10057 editing and make the changes permanent, type @kbd{C-c C-c}
10058 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
10059 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
10060
10061 @item B q
10062 @kindex B q (Summary)
10063 @findex gnus-summary-respool-query
10064 If you want to re-spool an article, you might be curious as to what group
10065 the article will end up in before you do the re-spooling.  This command
10066 will tell you (@code{gnus-summary-respool-query}).
10067
10068 @item B t
10069 @kindex B t (Summary)
10070 @findex gnus-summary-respool-trace
10071 Similarly, this command will display all fancy splitting patterns used
10072 when respooling, if any (@code{gnus-summary-respool-trace}).
10073
10074 @item B p
10075 @kindex B p (Summary)
10076 @findex gnus-summary-article-posted-p
10077 Some people have a tendency to send you ``courtesy'' copies when they
10078 follow up to articles you have posted.  These usually have a
10079 @code{Newsgroups} header in them, but not always.  This command
10080 (@code{gnus-summary-article-posted-p}) will try to fetch the current
10081 article from your news server (or rather, from
10082 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
10083 report back whether it found the article or not.  Even if it says that
10084 it didn't find the article, it may have been posted anyway---mail
10085 propagation is much faster than news propagation, and the news copy may
10086 just not have arrived yet.
10087
10088 @item K E
10089 @kindex K E (Summary)
10090 @findex gnus-article-encrypt-body
10091 @vindex gnus-article-encrypt-protocol
10092 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
10093 The body is encrypted with the encryption protocol specified by the
10094 variable @code{gnus-article-encrypt-protocol}.
10095
10096 @end table
10097
10098 @vindex gnus-move-split-methods
10099 @cindex moving articles
10100 If you move (or copy) articles regularly, you might wish to have Gnus
10101 suggest where to put the articles.  @code{gnus-move-split-methods} is a
10102 variable that uses the same syntax as @code{gnus-split-methods}
10103 (@pxref{Saving Articles}).  You may customize that variable to create
10104 suggestions you find reasonable.  (Note that
10105 @code{gnus-move-split-methods} uses group names where
10106 @code{gnus-split-methods} uses file names.)
10107
10108 @lisp
10109 (setq gnus-move-split-methods
10110       '(("^From:.*Lars Magne" "nnml:junk")
10111         ("^Subject:.*gnus" "nnfolder:important")
10112         (".*" "nnml:misc")))
10113 @end lisp
10114
10115
10116 @node Various Summary Stuff
10117 @section Various Summary Stuff
10118
10119 @menu
10120 * Summary Group Information::   Information oriented commands.
10121 * Searching for Articles::      Multiple article commands.
10122 * Summary Generation Commands::
10123 * Really Various Summary Commands::  Those pesky non-conformant commands.
10124 @end menu
10125
10126 @table @code
10127 @vindex gnus-summary-display-while-building
10128 @item gnus-summary-display-while-building
10129 If non-@code{nil}, show and update the summary buffer as it's being
10130 built.  If @code{t}, update the buffer after every line is inserted.
10131 If the value is an integer, @var{n}, update the display every @var{n}
10132 lines.  The default is @code{nil}.
10133
10134 @vindex gnus-summary-display-arrow
10135 @item gnus-summary-display-arrow
10136 If non-@code{nil}, display an arrow in the fringe to indicate the
10137 current article.
10138
10139 @vindex gnus-summary-mode-hook
10140 @item gnus-summary-mode-hook
10141 This hook is called when creating a summary mode buffer.
10142
10143 @vindex gnus-summary-generate-hook
10144 @item gnus-summary-generate-hook
10145 This is called as the last thing before doing the threading and the
10146 generation of the summary buffer.  It's quite convenient for customizing
10147 the threading variables based on what data the newsgroup has.  This hook
10148 is called from the summary buffer after most summary buffer variables
10149 have been set.
10150
10151 @vindex gnus-summary-prepare-hook
10152 @item gnus-summary-prepare-hook
10153 It is called after the summary buffer has been generated.  You might use
10154 it to, for instance, highlight lines or modify the look of the buffer in
10155 some other ungodly manner.  I don't care.
10156
10157 @vindex gnus-summary-prepared-hook
10158 @item gnus-summary-prepared-hook
10159 A hook called as the very last thing after the summary buffer has been
10160 generated.
10161
10162 @vindex gnus-summary-ignore-duplicates
10163 @item gnus-summary-ignore-duplicates
10164 When Gnus discovers two articles that have the same @code{Message-ID},
10165 it has to do something drastic.  No articles are allowed to have the
10166 same @code{Message-ID}, but this may happen when reading mail from some
10167 sources.  Gnus allows you to customize what happens with this variable.
10168 If it is @code{nil} (which is the default), Gnus will rename the
10169 @code{Message-ID} (for display purposes only) and display the article as
10170 any other article.  If this variable is @code{t}, it won't display the
10171 article---it'll be as if it never existed.
10172
10173 @vindex gnus-alter-articles-to-read-function
10174 @item gnus-alter-articles-to-read-function
10175 This function, which takes two parameters (the group name and the list
10176 of articles to be selected), is called to allow the user to alter the
10177 list of articles to be selected.
10178
10179 For instance, the following function adds the list of cached articles to
10180 the list in one particular group:
10181
10182 @lisp
10183 (defun my-add-cached-articles (group articles)
10184   (if (string= group "some.group")
10185       (append gnus-newsgroup-cached articles)
10186     articles))
10187 @end lisp
10188
10189 @vindex gnus-newsgroup-variables
10190 @item gnus-newsgroup-variables
10191 A list of newsgroup (summary buffer) local variables, or cons of
10192 variables and their default values (when the default values are not
10193 @code{nil}), that should be made global while the summary buffer is
10194 active.  These variables can be used to set variables in the group
10195 parameters while still allowing them to affect operations done in
10196 other buffers.  For example:
10197
10198 @lisp
10199 (setq gnus-newsgroup-variables
10200       '(message-use-followup-to
10201         (gnus-visible-headers .
10202  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10203 @end lisp
10204
10205 @end table
10206
10207
10208 @node Summary Group Information
10209 @subsection Summary Group Information
10210
10211 @table @kbd
10212
10213 @item H f
10214 @kindex H f (Summary)
10215 @findex gnus-summary-fetch-faq
10216 @vindex gnus-group-faq-directory
10217 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
10218 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
10219 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
10220 is usually a directory on a remote machine.  This variable can also be
10221 a list of directories.  In that case, giving a prefix to this command
10222 will allow you to choose between the various sites.  @code{ange-ftp}
10223 or @code{efs} will probably be used for fetching the file.
10224
10225 @item H d
10226 @kindex H d (Summary)
10227 @findex gnus-summary-describe-group
10228 Give a brief description of the current group
10229 (@code{gnus-summary-describe-group}).  If given a prefix, force
10230 rereading the description from the server.
10231
10232 @item H h
10233 @kindex H h (Summary)
10234 @findex gnus-summary-describe-briefly
10235 Give an extremely brief description of the most important summary
10236 keystrokes (@code{gnus-summary-describe-briefly}).
10237
10238 @item H i
10239 @kindex H i (Summary)
10240 @findex gnus-info-find-node
10241 Go to the Gnus info node (@code{gnus-info-find-node}).
10242 @end table
10243
10244
10245 @node Searching for Articles
10246 @subsection Searching for Articles
10247
10248 @table @kbd
10249
10250 @item M-s
10251 @kindex M-s (Summary)
10252 @findex gnus-summary-search-article-forward
10253 Search through all subsequent (raw) articles for a regexp
10254 (@code{gnus-summary-search-article-forward}).
10255
10256 @item M-r
10257 @kindex M-r (Summary)
10258 @findex gnus-summary-search-article-backward
10259 Search through all previous (raw) articles for a regexp
10260 (@code{gnus-summary-search-article-backward}).
10261
10262 @item &
10263 @kindex & (Summary)
10264 @findex gnus-summary-execute-command
10265 This command will prompt you for a header, a regular expression to match
10266 on this field, and a command to be executed if the match is made
10267 (@code{gnus-summary-execute-command}).  If the header is an empty
10268 string, the match is done on the entire article.  If given a prefix,
10269 search backward instead.
10270
10271 For instance, @kbd{& RET some.*string RET #} will put the process mark on
10272 all articles that have heads or bodies that match @samp{some.*string}.
10273
10274 @item M-&
10275 @kindex M-& (Summary)
10276 @findex gnus-summary-universal-argument
10277 Perform any operation on all articles that have been marked with
10278 the process mark (@code{gnus-summary-universal-argument}).
10279 @end table
10280
10281 @node Summary Generation Commands
10282 @subsection Summary Generation Commands
10283
10284 @table @kbd
10285
10286 @item Y g
10287 @kindex Y g (Summary)
10288 @findex gnus-summary-prepare
10289 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
10290
10291 @item Y c
10292 @kindex Y c (Summary)
10293 @findex gnus-summary-insert-cached-articles
10294 Pull all cached articles (for the current group) into the summary buffer
10295 (@code{gnus-summary-insert-cached-articles}).
10296
10297 @item Y d
10298 @kindex Y d (Summary)
10299 @findex gnus-summary-insert-dormant-articles
10300 Pull all dormant articles (for the current group) into the summary buffer
10301 (@code{gnus-summary-insert-dormant-articles}).
10302
10303 @end table
10304
10305
10306 @node Really Various Summary Commands
10307 @subsection Really Various Summary Commands
10308
10309 @table @kbd
10310
10311 @item A D
10312 @itemx C-d
10313 @kindex C-d (Summary)
10314 @kindex A D (Summary)
10315 @findex gnus-summary-enter-digest-group
10316 If the current article is a collection of other articles (for instance,
10317 a digest), you might use this command to enter a group based on the that
10318 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
10319 guess what article type is currently displayed unless you give a prefix
10320 to this command, which forces a ``digest'' interpretation.  Basically,
10321 whenever you see a message that is a collection of other messages of
10322 some format, you @kbd{C-d} and read these messages in a more convenient
10323 fashion.
10324
10325 @item C-M-d
10326 @kindex C-M-d (Summary)
10327 @findex gnus-summary-read-document
10328 This command is very similar to the one above, but lets you gather
10329 several documents into one biiig group
10330 (@code{gnus-summary-read-document}).  It does this by opening several
10331 @code{nndoc} groups for each document, and then opening an
10332 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
10333 command understands the process/prefix convention
10334 (@pxref{Process/Prefix}).
10335
10336 @item C-t
10337 @kindex C-t (Summary)
10338 @findex gnus-summary-toggle-truncation
10339 Toggle truncation of summary lines
10340 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10341 line centering function in the summary buffer, so it's not a good idea
10342 to have truncation switched off while reading articles.
10343
10344 @item =
10345 @kindex = (Summary)
10346 @findex gnus-summary-expand-window
10347 Expand the summary buffer window (@code{gnus-summary-expand-window}).
10348 If given a prefix, force an @code{article} window configuration.
10349
10350 @item C-M-e
10351 @kindex C-M-e (Summary)
10352 @findex gnus-summary-edit-parameters
10353 Edit the group parameters (@pxref{Group Parameters}) of the current
10354 group (@code{gnus-summary-edit-parameters}).
10355
10356 @item C-M-a
10357 @kindex C-M-a (Summary)
10358 @findex gnus-summary-customize-parameters
10359 Customize the group parameters (@pxref{Group Parameters}) of the current
10360 group (@code{gnus-summary-customize-parameters}).
10361
10362 @end table
10363
10364
10365 @node Exiting the Summary Buffer
10366 @section Exiting the Summary Buffer
10367 @cindex summary exit
10368 @cindex exiting groups
10369
10370 Exiting from the summary buffer will normally update all info on the
10371 group and return you to the group buffer.
10372
10373 @table @kbd
10374
10375 @item Z Z
10376 @itemx Z Q
10377 @itemx q
10378 @kindex Z Z (Summary)
10379 @kindex Z Q (Summary)
10380 @kindex q (Summary)
10381 @findex gnus-summary-exit
10382 @vindex gnus-summary-exit-hook
10383 @vindex gnus-summary-prepare-exit-hook
10384 @vindex gnus-group-no-more-groups-hook
10385 @c @icon{gnus-summary-exit}
10386 Exit the current group and update all information on the group
10387 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
10388 called before doing much of the exiting, which calls
10389 @code{gnus-summary-expire-articles} by default.
10390 @code{gnus-summary-exit-hook} is called after finishing the exit
10391 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
10392 group mode having no more (unread) groups.
10393
10394 @item Z E
10395 @itemx Q
10396 @kindex Z E (Summary)
10397 @kindex Q (Summary)
10398 @findex gnus-summary-exit-no-update
10399 Exit the current group without updating any information on the group
10400 (@code{gnus-summary-exit-no-update}).
10401
10402 @item Z c
10403 @itemx c
10404 @kindex Z c (Summary)
10405 @kindex c (Summary)
10406 @findex gnus-summary-catchup-and-exit
10407 @c @icon{gnus-summary-catchup-and-exit}
10408 Mark all unticked articles in the group as read and then exit
10409 (@code{gnus-summary-catchup-and-exit}).
10410
10411 @item Z C
10412 @kindex Z C (Summary)
10413 @findex gnus-summary-catchup-all-and-exit
10414 Mark all articles, even the ticked ones, as read and then exit
10415 (@code{gnus-summary-catchup-all-and-exit}).
10416
10417 @item Z n
10418 @kindex Z n (Summary)
10419 @findex gnus-summary-catchup-and-goto-next-group
10420 Mark all articles as read and go to the next group
10421 (@code{gnus-summary-catchup-and-goto-next-group}).
10422
10423 @item Z R
10424 @itemx C-x C-s
10425 @kindex Z R (Summary)
10426 @kindex C-x C-s (Summary)
10427 @findex gnus-summary-reselect-current-group
10428 Exit this group, and then enter it again
10429 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10430 all articles, both read and unread.
10431
10432 @item Z G
10433 @itemx M-g
10434 @kindex Z G (Summary)
10435 @kindex M-g (Summary)
10436 @findex gnus-summary-rescan-group
10437 @c @icon{gnus-summary-mail-get}
10438 Exit the group, check for new articles in the group, and select the
10439 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10440 articles, both read and unread.
10441
10442 @item Z N
10443 @kindex Z N (Summary)
10444 @findex gnus-summary-next-group
10445 Exit the group and go to the next group
10446 (@code{gnus-summary-next-group}).
10447
10448 @item Z P
10449 @kindex Z P (Summary)
10450 @findex gnus-summary-prev-group
10451 Exit the group and go to the previous group
10452 (@code{gnus-summary-prev-group}).
10453
10454 @item Z s
10455 @kindex Z s (Summary)
10456 @findex gnus-summary-save-newsrc
10457 Save the current number of read/marked articles in the dribble buffer
10458 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10459 given a prefix, also save the @file{.newsrc} file(s).  Using this
10460 command will make exit without updating (the @kbd{Q} command) worthless.
10461 @end table
10462
10463 @vindex gnus-exit-group-hook
10464 @code{gnus-exit-group-hook} is called when you exit the current group
10465 with an ``updating'' exit.  For instance @kbd{Q}
10466 (@code{gnus-summary-exit-no-update}) does not call this hook.
10467
10468 @findex gnus-summary-wake-up-the-dead
10469 @findex gnus-dead-summary-mode
10470 @vindex gnus-kill-summary-on-exit
10471 If you're in the habit of exiting groups, and then changing your mind
10472 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10473 If you do that, Gnus won't kill the summary buffer when you exit it.
10474 (Quelle surprise!)  Instead it will change the name of the buffer to
10475 something like @samp{*Dead Summary ... *} and install a minor mode
10476 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10477 buffer, you'll find that all keys are mapped to a function called
10478 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10479 summary buffer will result in a live, normal summary buffer.
10480
10481 There will never be more than one dead summary buffer at any one time.
10482
10483 @vindex gnus-use-cross-reference
10484 The data on the current group will be updated (which articles you have
10485 read, which articles you have replied to, etc.) when you exit the
10486 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10487 @code{t} (which is the default), articles that are cross-referenced to
10488 this group and are marked as read, will also be marked as read in the
10489 other subscribed groups they were cross-posted to.  If this variable is
10490 neither @code{nil} nor @code{t}, the article will be marked as read in
10491 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10492
10493
10494 @node Crosspost Handling
10495 @section Crosspost Handling
10496
10497 @cindex velveeta
10498 @cindex spamming
10499 Marking cross-posted articles as read ensures that you'll never have to
10500 read the same article more than once.  Unless, of course, somebody has
10501 posted it to several groups separately.  Posting the same article to
10502 several groups (not cross-posting) is called @dfn{spamming}, and you are
10503 by law required to send nasty-grams to anyone who perpetrates such a
10504 heinous crime.  You may want to try NoCeM handling to filter out spam
10505 (@pxref{NoCeM}).
10506
10507 Remember: Cross-posting is kinda ok, but posting the same article
10508 separately to several groups is not.  Massive cross-posting (aka.
10509 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10510 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10511 excessive crossposting (@pxref{Summary Mail Commands}).
10512
10513 @cindex cross-posting
10514 @cindex Xref
10515 @cindex @acronym{NOV}
10516 One thing that may cause Gnus to not do the cross-posting thing
10517 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
10518 (which is very nice, because it speeds things up considerably) which
10519 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
10520 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10521 even with @sc{xover} by registering the @code{Xref} lines of all
10522 articles you actually read, but if you kill the articles, or just mark
10523 them as read without reading them, Gnus will not get a chance to snoop
10524 the @code{Xref} lines out of these articles, and will be unable to use
10525 the cross reference mechanism.
10526
10527 @cindex LIST overview.fmt
10528 @cindex overview.fmt
10529 To check whether your @acronym{NNTP} server includes the @code{Xref} header
10530 in its overview files, try @samp{telnet your.nntp.server nntp},
10531 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10532 overview.fmt}.  This may not work, but if it does, and the last line you
10533 get does not read @samp{Xref:full}, then you should shout and whine at
10534 your news admin until she includes the @code{Xref} header in the
10535 overview files.
10536
10537 @vindex gnus-nov-is-evil
10538 If you want Gnus to get the @code{Xref}s right all the time, you have to
10539 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10540 considerably.
10541
10542 C'est la vie.
10543
10544 For an alternative approach, @pxref{Duplicate Suppression}.
10545
10546
10547 @node Duplicate Suppression
10548 @section Duplicate Suppression
10549
10550 By default, Gnus tries to make sure that you don't have to read the same
10551 article more than once by utilizing the crossposting mechanism
10552 (@pxref{Crosspost Handling}).  However, that simple and efficient
10553 approach may not work satisfactory for some users for various
10554 reasons.
10555
10556 @enumerate
10557 @item
10558 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
10559 is evil and not very common.
10560
10561 @item
10562 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
10563 @file{.overview} data bases.  This is evil and all too common, alas.
10564
10565 @item
10566 You may be reading the same group (or several related groups) from
10567 different @acronym{NNTP} servers.
10568
10569 @item
10570 You may be getting mail that duplicates articles posted to groups.
10571 @end enumerate
10572
10573 I'm sure there are other situations where @code{Xref} handling fails as
10574 well, but these four are the most common situations.
10575
10576 If, and only if, @code{Xref} handling fails for you, then you may
10577 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10578 will remember the @code{Message-ID}s of all articles you have read or
10579 otherwise marked as read, and then, as if by magic, mark them as read
10580 all subsequent times you see them---in @emph{all} groups.  Using this
10581 mechanism is quite likely to be somewhat inefficient, but not overly
10582 so.  It's certainly preferable to reading the same articles more than
10583 once.
10584
10585 Duplicate suppression is not a very subtle instrument.  It's more like a
10586 sledge hammer than anything else.  It works in a very simple
10587 fashion---if you have marked an article as read, it adds this Message-ID
10588 to a cache.  The next time it sees this Message-ID, it will mark the
10589 article as read with the @samp{M} mark.  It doesn't care what group it
10590 saw the article in.
10591
10592 @table @code
10593 @item gnus-suppress-duplicates
10594 @vindex gnus-suppress-duplicates
10595 If non-@code{nil}, suppress duplicates.
10596
10597 @item gnus-save-duplicate-list
10598 @vindex gnus-save-duplicate-list
10599 If non-@code{nil}, save the list of duplicates to a file.  This will
10600 make startup and shutdown take longer, so the default is @code{nil}.
10601 However, this means that only duplicate articles read in a single Gnus
10602 session are suppressed.
10603
10604 @item gnus-duplicate-list-length
10605 @vindex gnus-duplicate-list-length
10606 This variable says how many @code{Message-ID}s to keep in the duplicate
10607 suppression list.  The default is 10000.
10608
10609 @item gnus-duplicate-file
10610 @vindex gnus-duplicate-file
10611 The name of the file to store the duplicate suppression list in.  The
10612 default is @file{~/News/suppression}.
10613 @end table
10614
10615 If you have a tendency to stop and start Gnus often, setting
10616 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10617 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
10618 the other hand, saving the list makes startup and shutdown much slower,
10619 so that means that if you stop and start Gnus often, you should set
10620 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10621 to you to figure out, I think.
10622
10623 @node Security
10624 @section Security
10625
10626 Gnus is able to verify signed messages or decrypt encrypted messages.
10627 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
10628 and @acronym{S/MIME}, however you need some external programs to get
10629 things to work:
10630
10631 @enumerate
10632 @item
10633 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
10634 install an OpenPGP implementation such as GnuPG.  The Lisp interface
10635 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
10636 Manual}), but Mailcrypt and gpg.el are also supported.
10637
10638 @item
10639 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
10640 or newer is recommended.
10641
10642 @end enumerate
10643
10644 More information on how to set things up can be found in the message
10645 manual (@pxref{Security, ,Security, message, Message Manual}).
10646
10647 @table @code
10648 @item mm-verify-option
10649 @vindex mm-verify-option
10650 Option of verifying signed parts.  @code{never}, not verify;
10651 @code{always}, always verify; @code{known}, only verify known
10652 protocols.  Otherwise, ask user.
10653
10654 @item mm-decrypt-option
10655 @vindex mm-decrypt-option
10656 Option of decrypting encrypted parts.  @code{never}, no decryption;
10657 @code{always}, always decrypt; @code{known}, only decrypt known
10658 protocols.  Otherwise, ask user.
10659
10660 @item mml1991-use
10661 @vindex mml1991-use
10662 Symbol indicating elisp interface to OpenPGP implementation for
10663 @acronym{PGP} messages.  The default is @code{pgg}, but
10664 @code{mailcrypt} and @code{gpg} are also supported although
10665 deprecated.
10666
10667 @item mml2015-use
10668 @vindex mml2015-use
10669 Symbol indicating elisp interface to OpenPGP implementation for
10670 @acronym{PGP/MIME} messages.  The default is @code{pgg}, but
10671 @code{mailcrypt} and @code{gpg} are also supported although
10672 deprecated.
10673
10674 @end table
10675
10676 @cindex snarfing keys
10677 @cindex importing PGP keys
10678 @cindex PGP key ring import
10679 Snarfing OpenPGP keys (i.e., importing keys from articles into your
10680 key ring) is not supported explicitly through a menu item or command,
10681 rather Gnus do detect and label keys as @samp{application/pgp-keys},
10682 allowing you to specify whatever action you think is appropriate
10683 through the usual @acronym{MIME} infrastructure.  You can use a
10684 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
10685 Emacs MIME Manual}) such as the following to import keys using GNU
10686 Privacy Guard when you click on the @acronym{MIME} button
10687 (@pxref{Using MIME}).
10688
10689 @example
10690 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
10691 @end example
10692 @noindent
10693 This happens to also be the default action defined in
10694 @code{mailcap-mime-data}.
10695
10696 @node Mailing List
10697 @section Mailing List
10698 @cindex mailing list
10699 @cindex RFC 2396
10700
10701 @kindex A M (summary)
10702 @findex gnus-mailing-list-insinuate
10703 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10704 add a @code{to-list} group parameter (@pxref{Group Parameters}),
10705 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10706 summary buffer.
10707
10708 That enables the following commands to the summary buffer:
10709
10710 @table @kbd
10711
10712 @item C-c C-n h
10713 @kindex C-c C-n h (Summary)
10714 @findex gnus-mailing-list-help
10715 Send a message to fetch mailing list help, if List-Help field exists.
10716
10717 @item C-c C-n s
10718 @kindex C-c C-n s (Summary)
10719 @findex gnus-mailing-list-subscribe
10720 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10721
10722 @item C-c C-n u
10723 @kindex C-c C-n u (Summary)
10724 @findex gnus-mailing-list-unsubscribe
10725 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10726 field exists.
10727
10728 @item C-c C-n p
10729 @kindex C-c C-n p (Summary)
10730 @findex gnus-mailing-list-post
10731 Post to the mailing list, if List-Post field exists.
10732
10733 @item C-c C-n o
10734 @kindex C-c C-n o (Summary)
10735 @findex gnus-mailing-list-owner
10736 Send a message to the mailing list owner, if List-Owner field exists.
10737
10738 @item C-c C-n a
10739 @kindex C-c C-n a (Summary)
10740 @findex gnus-mailing-list-owner
10741 Browse the mailing list archive, if List-Archive field exists.
10742
10743 @end table
10744
10745
10746 @node Article Buffer
10747 @chapter Article Buffer
10748 @cindex article buffer
10749
10750 The articles are displayed in the article buffer, of which there is only
10751 one.  All the summary buffers share the same article buffer unless you
10752 tell Gnus otherwise.
10753
10754 @menu
10755 * Hiding Headers::              Deciding what headers should be displayed.
10756 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
10757 * Customizing Articles::        Tailoring the look of the articles.
10758 * Article Keymap::              Keystrokes available in the article buffer.
10759 * Misc Article::                Other stuff.
10760 @end menu
10761
10762
10763 @node Hiding Headers
10764 @section Hiding Headers
10765 @cindex hiding headers
10766 @cindex deleting headers
10767
10768 The top section of each article is the @dfn{head}.  (The rest is the
10769 @dfn{body}, but you may have guessed that already.)
10770
10771 @vindex gnus-show-all-headers
10772 There is a lot of useful information in the head: the name of the person
10773 who wrote the article, the date it was written and the subject of the
10774 article.  That's well and nice, but there's also lots of information
10775 most people do not want to see---what systems the article has passed
10776 through before reaching you, the @code{Message-ID}, the
10777 @code{References}, etc. ad nauseam---and you'll probably want to get rid
10778 of some of those lines.  If you want to keep all those lines in the
10779 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10780
10781 Gnus provides you with two variables for sifting headers:
10782
10783 @table @code
10784
10785 @item gnus-visible-headers
10786 @vindex gnus-visible-headers
10787 If this variable is non-@code{nil}, it should be a regular expression
10788 that says what headers you wish to keep in the article buffer.  All
10789 headers that do not match this variable will be hidden.
10790
10791 For instance, if you only want to see the name of the person who wrote
10792 the article and the subject, you'd say:
10793
10794 @lisp
10795 (setq gnus-visible-headers "^From:\\|^Subject:")
10796 @end lisp
10797
10798 This variable can also be a list of regexps to match headers to
10799 remain visible.
10800
10801 @item gnus-ignored-headers
10802 @vindex gnus-ignored-headers
10803 This variable is the reverse of @code{gnus-visible-headers}.  If this
10804 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10805 should be a regular expression that matches all lines that you want to
10806 hide.  All lines that do not match this variable will remain visible.
10807
10808 For instance, if you just want to get rid of the @code{References} line
10809 and the @code{Xref} line, you might say:
10810
10811 @lisp
10812 (setq gnus-ignored-headers "^References:\\|^Xref:")
10813 @end lisp
10814
10815 This variable can also be a list of regexps to match headers to
10816 be removed.
10817
10818 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10819 variable will have no effect.
10820
10821 @end table
10822
10823 @vindex gnus-sorted-header-list
10824 Gnus can also sort the headers for you.  (It does this by default.)  You
10825 can control the sorting by setting the @code{gnus-sorted-header-list}
10826 variable.  It is a list of regular expressions that says in what order
10827 the headers are to be displayed.
10828
10829 For instance, if you want the name of the author of the article first,
10830 and then the subject, you might say something like:
10831
10832 @lisp
10833 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10834 @end lisp
10835
10836 Any headers that are to remain visible, but are not listed in this
10837 variable, will be displayed in random order after all the headers listed in this variable.
10838
10839 @findex gnus-article-hide-boring-headers
10840 @vindex gnus-boring-article-headers
10841 You can hide further boring headers by setting
10842 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10843 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10844 list, but this list doesn't actually contain header names.  Instead it
10845 lists various @dfn{boring conditions} that Gnus can check and remove
10846 from sight.
10847
10848 These conditions are:
10849 @table @code
10850 @item empty
10851 Remove all empty headers.
10852 @item followup-to
10853 Remove the @code{Followup-To} header if it is identical to the
10854 @code{Newsgroups} header.
10855 @item reply-to
10856 Remove the @code{Reply-To} header if it lists the same addresses as
10857 the @code{From} header, or if the @code{broken-reply-to} group
10858 parameter is set.
10859 @item newsgroups
10860 Remove the @code{Newsgroups} header if it only contains the current group
10861 name.
10862 @item to-address
10863 Remove the @code{To} header if it only contains the address identical to
10864 the current group's @code{to-address} parameter.
10865 @item to-list
10866 Remove the @code{To} header if it only contains the address identical to
10867 the current group's @code{to-list} parameter.
10868 @item cc-list
10869 Remove the @code{CC} header if it only contains the address identical to
10870 the current group's @code{to-list} parameter.
10871 @item date
10872 Remove the @code{Date} header if the article is less than three days
10873 old.
10874 @item long-to
10875 Remove the @code{To} header if it is very long.
10876 @item many-to
10877 Remove all @code{To} headers if there are more than one.
10878 @end table
10879
10880 To include these three elements, you could say something like:
10881
10882 @lisp
10883 (setq gnus-boring-article-headers
10884       '(empty followup-to reply-to))
10885 @end lisp
10886
10887 This is also the default value for this variable.
10888
10889
10890 @node Using MIME
10891 @section Using MIME
10892 @cindex @acronym{MIME}
10893
10894 Mime is a standard for waving your hands through the air, aimlessly,
10895 while people stand around yawning.
10896
10897 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
10898 while all newsreaders die of fear.
10899
10900 @acronym{MIME} may specify what character set the article uses, the encoding
10901 of the characters, and it also makes it possible to embed pictures and
10902 other naughty stuff in innocent-looking articles.
10903
10904 @vindex gnus-display-mime-function
10905 @findex gnus-display-mime
10906 Gnus pushes @acronym{MIME} articles through @code{gnus-display-mime-function}
10907 to display the @acronym{MIME} parts.  This is @code{gnus-display-mime} by
10908 default, which creates a bundle of clickable buttons that can be used to
10909 display, save and manipulate the @acronym{MIME} objects.
10910
10911 The following commands are available when you have placed point over a
10912 @acronym{MIME} button:
10913
10914 @table @kbd
10915 @findex gnus-article-press-button
10916 @item RET (Article)
10917 @kindex RET (Article)
10918 @itemx BUTTON-2 (Article)
10919 Toggle displaying of the @acronym{MIME} object
10920 (@code{gnus-article-press-button}).  If built-in viewers can not display
10921 the object, Gnus resorts to external viewers in the @file{mailcap}
10922 files.  If a viewer has the @samp{copiousoutput} specification, the
10923 object is displayed inline.
10924
10925 @findex gnus-mime-view-part
10926 @item M-RET (Article)
10927 @kindex M-RET (Article)
10928 @itemx v (Article)
10929 Prompt for a method, and then view the @acronym{MIME} object using this
10930 method (@code{gnus-mime-view-part}).
10931
10932 @findex gnus-mime-view-part-as-type
10933 @item t (Article)
10934 @kindex t (Article)
10935 View the @acronym{MIME} object as if it were a different @acronym{MIME} media type
10936 (@code{gnus-mime-view-part-as-type}).
10937
10938 @findex gnus-mime-view-part-as-charset
10939 @item C (Article)
10940 @kindex C (Article)
10941 Prompt for a charset, and then view the @acronym{MIME} object using this
10942 charset (@code{gnus-mime-view-part-as-charset}).
10943
10944 @findex gnus-mime-save-part
10945 @item o (Article)
10946 @kindex o (Article)
10947 Prompt for a file name, and then save the @acronym{MIME} object
10948 (@code{gnus-mime-save-part}).
10949
10950 @findex gnus-mime-save-part-and-strip
10951 @item C-o (Article)
10952 @kindex C-o (Article)
10953 Prompt for a file name, then save the @acronym{MIME} object and strip it from
10954 the article.  Then proceed to article editing, where a reasonable
10955 suggestion is being made on how the altered article should look
10956 like.  The stripped @acronym{MIME} object will be referred via the
10957 message/external-body @acronym{MIME} type.
10958 (@code{gnus-mime-save-part-and-strip}).
10959
10960 @findex gnus-mime-delete-part
10961 @item d (Article)
10962 @kindex d (Article)
10963 Delete the @acronym{MIME} object from the article and replace it with some
10964 information about the removed @acronym{MIME} object
10965 (@code{gnus-mime-delete-part}).
10966
10967 @findex gnus-mime-copy-part
10968 @item c (Article)
10969 @kindex c (Article)
10970 Copy the @acronym{MIME} object to a fresh buffer and display this buffer
10971 (@code{gnus-mime-copy-part}).  Compressed files like @file{.gz} and
10972 @file{.bz2} are automatically decompressed if
10973 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
10974 Accessing Compressed Files, emacs, The Emacs Editor}).
10975
10976 @findex gnus-mime-print-part
10977 @item p (Article)
10978 @kindex p (Article)
10979 Print the @acronym{MIME} object (@code{gnus-mime-print-part}).  This
10980 command respects the @samp{print=} specifications in the
10981 @file{.mailcap} file.
10982
10983 @findex gnus-mime-inline-part
10984 @item i (Article)
10985 @kindex i (Article)
10986 Insert the contents of the @acronym{MIME} object into the buffer
10987 (@code{gnus-mime-inline-part}) as text/plain.  If given a prefix, insert
10988 the raw contents without decoding.  If given a numerical prefix, you can
10989 do semi-manual charset stuff (see
10990 @code{gnus-summary-show-article-charset-alist} in @ref{Paging the
10991 Article}).
10992
10993 @findex gnus-mime-view-part-internally
10994 @item E (Article)
10995 @kindex E (Article)
10996 View the @acronym{MIME} object with an internal viewer.  If no internal
10997 viewer is available, use an external viewer
10998 (@code{gnus-mime-view-part-internally}).
10999
11000 @findex gnus-mime-view-part-externally
11001 @item e (Article)
11002 @kindex e (Article)
11003 View the @acronym{MIME} object with an external viewer.
11004 (@code{gnus-mime-view-part-externally}).
11005
11006 @findex gnus-mime-pipe-part
11007 @item | (Article)
11008 @kindex | (Article)
11009 Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}).
11010
11011 @findex gnus-mime-action-on-part
11012 @item . (Article)
11013 @kindex . (Article)
11014 Interactively run an action on the @acronym{MIME} object
11015 (@code{gnus-mime-action-on-part}).
11016
11017 @end table
11018
11019 Gnus will display some @acronym{MIME} objects automatically.  The way Gnus
11020 determines which parts to do this with is described in the Emacs
11021 @acronym{MIME} manual.
11022
11023 It might be best to just use the toggling functions from the article
11024 buffer to avoid getting nasty surprises.  (For instance, you enter the
11025 group @samp{alt.sing-a-long} and, before you know it, @acronym{MIME} has
11026 decoded the sound file in the article and some horrible sing-a-long song
11027 comes screaming out your speakers, and you can't find the volume button,
11028 because there isn't one, and people are starting to look at you, and you
11029 try to stop the program, but you can't, and you can't find the program
11030 to control the volume, and everybody else in the room suddenly decides
11031 to look at you disdainfully, and you'll feel rather stupid.)
11032
11033 Any similarity to real events and people is purely coincidental.  Ahem.
11034
11035 Also @pxref{MIME Commands}.
11036
11037
11038 @node Customizing Articles
11039 @section Customizing Articles
11040 @cindex article customization
11041
11042 A slew of functions for customizing how the articles are to look like
11043 exist.  You can call these functions interactively
11044 (@pxref{Article Washing}), or you can have them
11045 called automatically when you select the articles.
11046
11047 To have them called automatically, you should set the corresponding
11048 ``treatment'' variable.  For instance, to have headers hidden, you'd set
11049 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
11050 be set, but first we discuss the values these variables can have.
11051
11052 Note: Some values, while valid, make little sense.  Check the list below
11053 for sensible values.
11054
11055 @enumerate
11056 @item
11057 @code{nil}: Don't do this treatment.
11058
11059 @item
11060 @code{t}: Do this treatment on all body parts.
11061
11062 @item
11063 @code{head}: Do the treatment on the headers.
11064
11065 @item
11066 @code{last}: Do this treatment on the last part.
11067
11068 @item
11069 An integer: Do this treatment on all body parts that have a length less
11070 than this number.
11071
11072 @item
11073 A list of strings: Do this treatment on all body parts that are in
11074 articles that are read in groups that have names that match one of the
11075 regexps in the list.
11076
11077 @item
11078 A list where the first element is not a string:
11079
11080 The list is evaluated recursively.  The first element of the list is a
11081 predicate.  The following predicates are recognized: @code{or},
11082 @code{and}, @code{not} and @code{typep}.  Here's an example:
11083
11084 @lisp
11085 (or last
11086     (typep "text/x-vcard"))
11087 @end lisp
11088
11089 @end enumerate
11090
11091 You may have noticed that the word @dfn{part} is used here.  This refers
11092 to the fact that some messages are @acronym{MIME} multipart articles that may
11093 be divided into several parts.  Articles that are not multiparts are
11094 considered to contain just a single part.
11095
11096 @vindex gnus-article-treat-types
11097 Are the treatments applied to all sorts of multipart parts?  Yes, if you
11098 want to, but by default, only @samp{text/plain} parts are given the
11099 treatment.  This is controlled by the @code{gnus-article-treat-types}
11100 variable, which is a list of regular expressions that are matched to the
11101 type of the part.  This variable is ignored if the value of the
11102 controlling variable is a predicate list, as described above.
11103
11104 The following treatment options are available.  The easiest way to
11105 customize this is to examine the @code{gnus-article-treat} customization
11106 group.  Values in parenthesis are suggested sensible values.  Others are
11107 possible but those listed are probably sufficient for most people.
11108
11109 @table @code
11110 @item gnus-treat-buttonize (t, integer)
11111 @item gnus-treat-buttonize-head (head)
11112
11113 @xref{Article Buttons}.
11114
11115 @item gnus-treat-capitalize-sentences (t, integer)
11116 @item gnus-treat-overstrike (t, integer)
11117 @item gnus-treat-strip-cr (t, integer)
11118 @item gnus-treat-strip-headers-in-body (t, integer)
11119 @item gnus-treat-strip-leading-blank-lines (t, integer)
11120 @item gnus-treat-strip-multiple-blank-lines (t, integer)
11121 @item gnus-treat-strip-pem (t, last, integer)
11122 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
11123 @item gnus-treat-unsplit-urls (t, integer)
11124 @item gnus-treat-wash-html (t, integer)
11125
11126 @xref{Article Washing}.
11127
11128 @item gnus-treat-date-english (head)
11129 @item gnus-treat-date-iso8601 (head)
11130 @item gnus-treat-date-lapsed (head)
11131 @item gnus-treat-date-local (head)
11132 @item gnus-treat-date-original (head)
11133 @item gnus-treat-date-user-defined (head)
11134 @item gnus-treat-date-ut (head)
11135
11136 @xref{Article Date}.
11137
11138 @item gnus-treat-from-picon (head)
11139 @item gnus-treat-mail-picon (head)
11140 @item gnus-treat-newsgroups-picon (head)
11141
11142 @xref{Picons}.
11143
11144 @item gnus-treat-display-smileys (t, integer)
11145
11146 @item gnus-treat-body-boundary (head)
11147
11148 @vindex gnus-body-boundary-delimiter
11149 Adds a delimiter between header and body, the string used as delimiter
11150 is controlled by @code{gnus-body-boundary-delimiter}.
11151
11152 @xref{Smileys}.
11153
11154 @item gnus-treat-display-x-face (head)
11155
11156 @xref{X-Face}.
11157
11158 @item gnus-treat-display-face (head)
11159
11160 @xref{Face}.
11161
11162 @item gnus-treat-emphasize (t, head, integer)
11163 @item gnus-treat-fill-article (t, integer)
11164 @item gnus-treat-fill-long-lines (t, integer)
11165 @item gnus-treat-hide-boring-headers (head)
11166 @item gnus-treat-hide-citation (t, integer)
11167 @item gnus-treat-hide-citation-maybe (t, integer)
11168 @item gnus-treat-hide-headers (head)
11169 @item gnus-treat-hide-signature (t, last)
11170 @item gnus-treat-strip-banner (t, last)
11171 @item gnus-treat-strip-list-identifiers (head)
11172
11173 @xref{Article Hiding}.
11174
11175 @item gnus-treat-highlight-citation (t, integer)
11176 @item gnus-treat-highlight-headers (head)
11177 @item gnus-treat-highlight-signature (t, last, integer)
11178
11179 @xref{Article Highlighting}.
11180
11181 @item gnus-treat-play-sounds
11182 @item gnus-treat-translate
11183 @item gnus-treat-x-pgp-sig (head)
11184
11185 @item gnus-treat-unfold-headers (head)
11186 @item gnus-treat-fold-headers (head)
11187 @item gnus-treat-fold-newsgroups (head)
11188 @item gnus-treat-leading-whitespace (head)
11189
11190 @xref{Article Header}.
11191
11192
11193 @end table
11194
11195 @vindex gnus-part-display-hook
11196 You can, of course, write your own functions to be called from
11197 @code{gnus-part-display-hook}.  The functions are called narrowed to the
11198 part, and you can do anything you like, pretty much.  There is no
11199 information that you have to keep in the buffer---you can change
11200 everything.
11201
11202
11203 @node Article Keymap
11204 @section Article Keymap
11205
11206 Most of the keystrokes in the summary buffer can also be used in the
11207 article buffer.  They should behave as if you typed them in the summary
11208 buffer, which means that you don't actually have to have a summary
11209 buffer displayed while reading.  You can do it all from the article
11210 buffer.
11211
11212 A few additional keystrokes are available:
11213
11214 @table @kbd
11215
11216 @item SPACE
11217 @kindex SPACE (Article)
11218 @findex gnus-article-next-page
11219 Scroll forwards one page (@code{gnus-article-next-page}).
11220 This is exactly the same as @kbd{h SPACE h}.
11221
11222 @item DEL
11223 @kindex DEL (Article)
11224 @findex gnus-article-prev-page
11225 Scroll backwards one page (@code{gnus-article-prev-page}).
11226 This is exactly the same as @kbd{h DEL h}.
11227
11228 @item C-c ^
11229 @kindex C-c ^ (Article)
11230 @findex gnus-article-refer-article
11231 If point is in the neighborhood of a @code{Message-ID} and you press
11232 @kbd{C-c ^}, Gnus will try to get that article from the server
11233 (@code{gnus-article-refer-article}).
11234
11235 @item C-c C-m
11236 @kindex C-c C-m (Article)
11237 @findex gnus-article-mail
11238 Send a reply to the address near point (@code{gnus-article-mail}).  If
11239 given a prefix, include the mail.
11240
11241 @item s
11242 @kindex s (Article)
11243 @findex gnus-article-show-summary
11244 Reconfigure the buffers so that the summary buffer becomes visible
11245 (@code{gnus-article-show-summary}).
11246
11247 @item ?
11248 @kindex ? (Article)
11249 @findex gnus-article-describe-briefly
11250 Give a very brief description of the available keystrokes
11251 (@code{gnus-article-describe-briefly}).
11252
11253 @item TAB
11254 @kindex TAB (Article)
11255 @findex gnus-article-next-button
11256 Go to the next button, if any (@code{gnus-article-next-button}).  This
11257 only makes sense if you have buttonizing turned on.
11258
11259 @item M-TAB
11260 @kindex M-TAB (Article)
11261 @findex gnus-article-prev-button
11262 Go to the previous button, if any (@code{gnus-article-prev-button}).
11263
11264 @item R
11265 @kindex R (Article)
11266 @findex gnus-article-reply-with-original
11267 Send a reply to the current article and yank the current article
11268 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
11269 wide reply.  If the region is active, only yank the text in the
11270 region.
11271
11272 @item F
11273 @kindex F (Article)
11274 @findex gnus-article-followup-with-original
11275 Send a followup to the current article and yank the current article
11276 (@code{gnus-article-followup-with-original}).  If given a prefix, make
11277 a wide reply.  If the region is active, only yank the text in the
11278 region.
11279
11280
11281 @end table
11282
11283
11284 @node Misc Article
11285 @section Misc Article
11286
11287 @table @code
11288
11289 @item gnus-single-article-buffer
11290 @vindex gnus-single-article-buffer
11291 If non-@code{nil}, use the same article buffer for all the groups.
11292 (This is the default.)  If @code{nil}, each group will have its own
11293 article buffer.
11294
11295 @vindex gnus-article-decode-hook
11296 @item gnus-article-decode-hook
11297 @cindex @acronym{MIME}
11298 Hook used to decode @acronym{MIME} articles.  The default value is
11299 @code{(article-decode-charset article-decode-encoded-words)}
11300
11301 @vindex gnus-article-prepare-hook
11302 @item gnus-article-prepare-hook
11303 This hook is called right after the article has been inserted into the
11304 article buffer.  It is mainly intended for functions that do something
11305 depending on the contents; it should probably not be used for changing
11306 the contents of the article buffer.
11307
11308 @item gnus-article-mode-hook
11309 @vindex gnus-article-mode-hook
11310 Hook called in article mode buffers.
11311
11312 @item gnus-article-mode-syntax-table
11313 @vindex gnus-article-mode-syntax-table
11314 Syntax table used in article buffers.  It is initialized from
11315 @code{text-mode-syntax-table}.
11316
11317 @vindex gnus-article-over-scroll
11318 @item gnus-article-over-scroll
11319 If non-@code{nil}, allow scrolling the article buffer even when there
11320 no more new text to scroll in.  The default is @code{nil}.
11321
11322 @vindex gnus-article-mode-line-format
11323 @item gnus-article-mode-line-format
11324 This variable is a format string along the same lines as
11325 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
11326 accepts the same format specifications as that variable, with two
11327 extensions:
11328
11329 @table @samp
11330
11331 @item w
11332 The @dfn{wash status} of the article.  This is a short string with one
11333 character for each possible article wash operation that may have been
11334 performed.  The characters and their meaning:
11335
11336 @table @samp
11337
11338 @item c
11339 Displayed when cited text may be hidden in the article buffer.
11340
11341 @item h
11342 Displayed when headers are hidden in the article buffer.
11343
11344 @item p
11345 Displayed when article is digitally signed or encrypted, and Gnus has
11346 hidden the security headers.  (N.B. does not tell anything about
11347 security status, i.e. good or bad signature.)
11348
11349 @item s
11350 Displayed when the signature has been hidden in the Article buffer.
11351
11352 @item o
11353 Displayed when Gnus has treated overstrike characters in the article buffer.
11354
11355 @item e
11356 Displayed when Gnus has treated emphasised strings in the article buffer.
11357
11358 @end table
11359
11360 @item m
11361 The number of @acronym{MIME} parts in the article.
11362
11363 @end table
11364
11365 @vindex gnus-break-pages
11366
11367 @item gnus-break-pages
11368 Controls whether @dfn{page breaking} is to take place.  If this variable
11369 is non-@code{nil}, the articles will be divided into pages whenever a
11370 page delimiter appears in the article.  If this variable is @code{nil},
11371 paging will not be done.
11372
11373 @item gnus-page-delimiter
11374 @vindex gnus-page-delimiter
11375 This is the delimiter mentioned above.  By default, it is @samp{^L}
11376 (formfeed).
11377
11378 @cindex IDNA
11379 @cindex internationalized domain names
11380 @vindex gnus-use-idna
11381 @item gnus-use-idna
11382 This variable controls whether Gnus performs IDNA decoding of
11383 internationalized domain names inside @samp{From}, @samp{To} and
11384 @samp{Cc} headers.  This requires
11385 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
11386 variable is only enabled if you have installed it.
11387
11388 @end table
11389
11390
11391 @node Composing Messages
11392 @chapter Composing Messages
11393 @cindex composing messages
11394 @cindex messages
11395 @cindex mail
11396 @cindex sending mail
11397 @cindex reply
11398 @cindex followup
11399 @cindex post
11400 @cindex using gpg
11401 @cindex using s/mime
11402 @cindex using smime
11403
11404 @kindex C-c C-c (Post)
11405 All commands for posting and mailing will put you in a message buffer
11406 where you can edit the article all you like, before you send the
11407 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
11408 Message Manual}.  Where the message will be posted/mailed to depends
11409 on your setup (@pxref{Posting Server}).
11410
11411 @menu
11412 * Mail::                        Mailing and replying.
11413 * Posting Server::              What server should you post and mail via?
11414 * Mail and Post::               Mailing and posting at the same time.
11415 * Archived Messages::           Where Gnus stores the messages you've sent.
11416 * Posting Styles::              An easier way to specify who you are.
11417 * Drafts::                      Postponing messages and rejected messages.
11418 * Rejected Articles::           What happens if the server doesn't like your article?
11419 * Signing and encrypting::      How to compose secure messages.
11420 @end menu
11421
11422 Also @pxref{Canceling and Superseding} for information on how to
11423 remove articles you shouldn't have posted.
11424
11425
11426 @node Mail
11427 @section Mail
11428
11429 Variables for customizing outgoing mail:
11430
11431 @table @code
11432 @item gnus-uu-digest-headers
11433 @vindex gnus-uu-digest-headers
11434 List of regexps to match headers included in digested messages.  The
11435 headers will be included in the sequence they are matched.  If
11436 @code{nil} include all headers.
11437
11438 @item gnus-add-to-list
11439 @vindex gnus-add-to-list
11440 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
11441 that have none when you do a @kbd{a}.
11442
11443 @item gnus-confirm-mail-reply-to-news
11444 @vindex gnus-confirm-mail-reply-to-news
11445 This can also be a function receiving the group name as the only
11446 parameter which should return non-@code{nil} if a confirmation is
11447 needed, or a regular expression matching group names, where
11448 confirmation is should be asked for.
11449
11450 If you find yourself never wanting to reply to mail, but occasionally
11451 press R anyway, this variable might be for you.
11452
11453 @item gnus-confirm-treat-mail-like-news
11454 @vindex gnus-confirm-treat-mail-like-news
11455 If non-@code{nil}, Gnus also requests confirmation according to
11456 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
11457 useful for treating mailing lists like newsgroups.
11458
11459 @end table
11460
11461
11462 @node Posting Server
11463 @section Posting Server
11464
11465 When you press those magical @kbd{C-c C-c} keys to ship off your latest
11466 (extremely intelligent, of course) article, where does it go?
11467
11468 Thank you for asking.  I hate you.
11469
11470 It can be quite complicated.
11471
11472 @vindex gnus-post-method
11473 When posting news, Message usually invokes @code{message-send-news}
11474 (@pxref{News Variables, , News Variables, message, Message Manual}).
11475 Normally, Gnus will post using the same select method as you're
11476 reading from (which might be convenient if you're reading lots of
11477 groups from different private servers).  However.  If the server
11478 you're reading from doesn't allow posting, just reading, you probably
11479 want to use some other server to post your (extremely intelligent and
11480 fabulously interesting) articles.  You can then set the
11481 @code{gnus-post-method} to some other method:
11482
11483 @lisp
11484 (setq gnus-post-method '(nnspool ""))
11485 @end lisp
11486
11487 Now, if you've done this, and then this server rejects your article, or
11488 this server is down, what do you do then?  To override this variable you
11489 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
11490 the ``current'' server, to get back the default behavior, for posting.
11491
11492 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
11493 Gnus will prompt you for what method to use for posting.
11494
11495 You can also set @code{gnus-post-method} to a list of select methods.
11496 If that's the case, Gnus will always prompt you for what method to use
11497 for posting.
11498
11499 Finally, if you want to always post using the native select method,
11500 you can set this variable to @code{native}.
11501
11502 When sending mail, Message invokes @code{message-send-mail-function}.
11503 The default function, @code{message-send-mail-with-sendmail}, pipes
11504 your article to the @code{sendmail} binary for further queuing and
11505 sending.  When your local system is not configured for sending mail
11506 using @code{sendmail}, and you have access to a remote @acronym{SMTP}
11507 server, you can set @code{message-send-mail-function} to
11508 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
11509 package correctly.  An example:
11510
11511 @lisp
11512 (setq message-send-mail-function 'smtpmail-send-it
11513       smtpmail-default-smtp-server "YOUR SMTP HOST")
11514 @end lisp
11515
11516 To the thing similar to this, there is
11517 @code{message-smtpmail-send-it}.  It is useful if your ISP requires
11518 the @acronym{POP}-before-@acronym{SMTP} authentication.  See the
11519 documentation for the function @code{mail-source-touch-pop}.
11520
11521 Other possible choices for @code{message-send-mail-function} includes
11522 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11523 and @code{feedmail-send-it}.
11524
11525 @node Mail and Post
11526 @section Mail and Post
11527
11528 Here's a list of variables relevant to both mailing and
11529 posting:
11530
11531 @table @code
11532 @item gnus-mailing-list-groups
11533 @findex gnus-mailing-list-groups
11534 @cindex mailing lists
11535
11536 If your news server offers groups that are really mailing lists
11537 gatewayed to the @acronym{NNTP} server, you can read those groups without
11538 problems, but you can't post/followup to them without some difficulty.
11539 One solution is to add a @code{to-address} to the group parameters
11540 (@pxref{Group Parameters}).  An easier thing to do is set the
11541 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11542 really are mailing lists.  Then, at least, followups to the mailing
11543 lists will work most of the time.  Posting to these groups (@kbd{a}) is
11544 still a pain, though.
11545
11546 @item gnus-user-agent
11547 @vindex gnus-user-agent
11548 @cindex User-Agent
11549
11550 This variable controls which information should be exposed in the
11551 User-Agent header.  It can be one of the symbols @code{gnus} (show only
11552 Gnus version), @code{emacs-gnus} (show only Emacs and Gnus versions),
11553 @code{emacs-gnus-config} (same as @code{emacs-gnus} plus system
11554 configuration), @code{emacs-gnus-type} (same as @code{emacs-gnus} plus
11555 system type) or a custom string.  If you set it to a string, be sure to
11556 use a valid format, see RFC 2616.
11557
11558 @end table
11559
11560 You may want to do spell-checking on messages that you send out.  Or, if
11561 you don't want to spell-check by hand, you could add automatic
11562 spell-checking via the @code{ispell} package:
11563
11564 @cindex ispell
11565 @findex ispell-message
11566 @lisp
11567 (add-hook 'message-send-hook 'ispell-message)
11568 @end lisp
11569
11570 If you want to change the @code{ispell} dictionary based on what group
11571 you're in, you could say something like the following:
11572
11573 @lisp
11574 (add-hook 'gnus-select-group-hook
11575           (lambda ()
11576             (cond
11577              ((string-match
11578                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11579               (ispell-change-dictionary "deutsch"))
11580              (t
11581               (ispell-change-dictionary "english")))))
11582 @end lisp
11583
11584 Modify to suit your needs.
11585
11586
11587 @node Archived Messages
11588 @section Archived Messages
11589 @cindex archived messages
11590 @cindex sent messages
11591
11592 Gnus provides a few different methods for storing the mail and news you
11593 send.  The default method is to use the @dfn{archive virtual server} to
11594 store the messages.  If you want to disable this completely, the
11595 @code{gnus-message-archive-group} variable should be @code{nil}, which
11596 is the default.
11597
11598 For archiving interesting messages in a group you read, see the
11599 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11600 Group Commands}).
11601
11602 @vindex gnus-message-archive-method
11603 @code{gnus-message-archive-method} says what virtual server Gnus is to
11604 use to store sent messages.  The default is:
11605
11606 @lisp
11607 (nnfolder "archive"
11608           (nnfolder-directory   "~/Mail/archive")
11609           (nnfolder-active-file "~/Mail/archive/active")
11610           (nnfolder-get-new-mail nil)
11611           (nnfolder-inhibit-expiry t))
11612 @end lisp
11613
11614 You can, however, use any mail select method (@code{nnml},
11615 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11616 for doing this sort of thing, though.  If you don't like the default
11617 directory chosen, you could say something like:
11618
11619 @lisp
11620 (setq gnus-message-archive-method
11621       '(nnfolder "archive"
11622                  (nnfolder-inhibit-expiry t)
11623                  (nnfolder-active-file "~/News/sent-mail/active")
11624                  (nnfolder-directory "~/News/sent-mail/")))
11625 @end lisp
11626
11627 @vindex gnus-message-archive-group
11628 @cindex Gcc
11629 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11630 to one or more group(s) on that server.  Which group to use is
11631 determined by the @code{gnus-message-archive-group} variable.
11632
11633 This variable can be used to do the following:
11634
11635 @table @asis
11636 @item a string
11637 Messages will be saved in that group.
11638
11639 Note that you can include a select method in the group name, then the
11640 message will not be stored in the select method given by
11641 @code{gnus-message-archive-method}, but in the select method specified
11642 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11643 has the default value shown above.  Then setting
11644 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11645 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11646 value @code{"nnml:foo"}, then outgoing messages will be stored in
11647 @samp{nnml:foo}.
11648
11649 @item a list of strings
11650 Messages will be saved in all those groups.
11651
11652 @item an alist of regexps, functions and forms
11653 When a key ``matches'', the result is used.
11654
11655 @item @code{nil}
11656 No message archiving will take place.  This is the default.
11657 @end table
11658
11659 Let's illustrate:
11660
11661 Just saving to a single group called @samp{MisK}:
11662 @lisp
11663 (setq gnus-message-archive-group "MisK")
11664 @end lisp
11665
11666 Saving to two groups, @samp{MisK} and @samp{safe}:
11667 @lisp
11668 (setq gnus-message-archive-group '("MisK" "safe"))
11669 @end lisp
11670
11671 Save to different groups based on what group you are in:
11672 @lisp
11673 (setq gnus-message-archive-group
11674       '(("^alt" "sent-to-alt")
11675         ("mail" "sent-to-mail")
11676         (".*" "sent-to-misc")))
11677 @end lisp
11678
11679 More complex stuff:
11680 @lisp
11681 (setq gnus-message-archive-group
11682       '((if (message-news-p)
11683             "misc-news"
11684           "misc-mail")))
11685 @end lisp
11686
11687 How about storing all news messages in one file, but storing all mail
11688 messages in one file per month:
11689
11690 @lisp
11691 (setq gnus-message-archive-group
11692       '((if (message-news-p)
11693             "misc-news"
11694           (concat "mail." (format-time-string "%Y-%m")))))
11695 @end lisp
11696
11697 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11698 @c use a different value for @code{gnus-message-archive-group} there.)
11699
11700 Now, when you send a message off, it will be stored in the appropriate
11701 group.  (If you want to disable storing for just one particular message,
11702 you can just remove the @code{Gcc} header that has been inserted.)  The
11703 archive group will appear in the group buffer the next time you start
11704 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
11705 enter it and read the articles in it just like you'd read any other
11706 group.  If the group gets really big and annoying, you can simply rename
11707 if (using @kbd{G r} in the group buffer) to something
11708 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11709 continue to be stored in the old (now empty) group.
11710
11711 That's the default method of archiving sent messages.  Gnus offers a
11712 different way for the people who don't like the default method.  In that
11713 case you should set @code{gnus-message-archive-group} to @code{nil};
11714 this will disable archiving.
11715
11716 @table @code
11717 @item gnus-outgoing-message-group
11718 @vindex gnus-outgoing-message-group
11719 All outgoing messages will be put in this group.  If you want to store
11720 all your outgoing mail and articles in the group @samp{nnml:archive},
11721 you set this variable to that value.  This variable can also be a list of
11722 group names.
11723
11724 If you want to have greater control over what group to put each
11725 message in, you can set this variable to a function that checks the
11726 current newsgroup name and then returns a suitable group name (or list
11727 of names).
11728
11729 This variable can be used instead of @code{gnus-message-archive-group},
11730 but the latter is the preferred method.
11731
11732 @item gnus-gcc-mark-as-read
11733 @vindex gnus-gcc-mark-as-read
11734 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11735
11736 @item gnus-gcc-externalize-attachments
11737 @vindex gnus-gcc-externalize-attachments
11738 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11739 and matches the Gcc group name, attach files as external parts; if it is
11740 @code{all}, attach local files as external parts; if it is other
11741 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11742 changed in the future.
11743
11744 @end table
11745
11746
11747 @node Posting Styles
11748 @section Posting Styles
11749 @cindex posting styles
11750 @cindex styles
11751
11752 All them variables, they make my head swim.
11753
11754 So what if you want a different @code{Organization} and signature based
11755 on what groups you post to?  And you post both from your home machine
11756 and your work machine, and you want different @code{From} lines, and so
11757 on?
11758
11759 @vindex gnus-posting-styles
11760 One way to do stuff like that is to write clever hooks that change the
11761 variables you need to have changed.  That's a bit boring, so somebody
11762 came up with the bright idea of letting the user specify these things in
11763 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11764 variable:
11765
11766 @lisp
11767 ((".*"
11768   (signature "Peace and happiness")
11769   (organization "What me?"))
11770  ("^comp"
11771   (signature "Death to everybody"))
11772  ("comp.emacs.i-love-it"
11773   (organization "Emacs is it")))
11774 @end lisp
11775
11776 As you might surmise from this example, this alist consists of several
11777 @dfn{styles}.  Each style will be applicable if the first element
11778 ``matches'', in some form or other.  The entire alist will be iterated
11779 over, from the beginning towards the end, and each match will be
11780 applied, which means that attributes in later styles that match override
11781 the same attributes in earlier matching styles.  So
11782 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11783 signature and the @samp{What me?} @code{Organization} header.
11784
11785 The first element in each style is called the @code{match}.  If it's a
11786 string, then Gnus will try to regexp match it against the group name.
11787 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
11788 will look in the original article for a header whose name is
11789 @var{match} and compare that @var{regexp}.  @var{match} and
11790 @var{regexp} are strings.  (The original article is the one you are
11791 replying or following up to.  If you are not composing a reply or a
11792 followup, then there is nothing to match against.)  If the
11793 @code{match} is a function symbol, that function will be called with
11794 no arguments.  If it's a variable symbol, then the variable will be
11795 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11796 any case, if this returns a non-@code{nil} value, then the style is
11797 said to @dfn{match}.
11798
11799 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11800 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11801 attribute name can be one of:
11802
11803 @itemize @bullet
11804 @item @code{signature}
11805 @item @code{signature-file}
11806 @item @code{x-face-file}
11807 @item @code{address}, overriding @code{user-mail-address}
11808 @item @code{name}, overriding @code{(user-full-name)}
11809 @item @code{body}
11810 @end itemize
11811
11812 The attribute name can also be a string or a symbol.  In that case,
11813 this will be used as a header name, and the value will be inserted in
11814 the headers of the article; if the value is @code{nil}, the header
11815 name will be removed.  If the attribute name is @code{eval}, the form
11816 is evaluated, and the result is thrown away.
11817
11818 The attribute value can be a string (used verbatim), a function with
11819 zero arguments (the return value will be used), a variable (its value
11820 will be used) or a list (it will be @code{eval}ed and the return value
11821 will be used).  The functions and sexps are called/@code{eval}ed in the
11822 message buffer that is being set up.  The headers of the current article
11823 are available through the @code{message-reply-headers} variable, which
11824 is a vector of the following headers: number subject from date id
11825 references chars lines xref extra.
11826
11827 @vindex message-reply-headers
11828
11829 If you wish to check whether the message you are about to compose is
11830 meant to be a news article or a mail message, you can check the values
11831 of the @code{message-news-p} and @code{message-mail-p} functions.
11832
11833 @findex message-mail-p
11834 @findex message-news-p
11835
11836 So here's a new example:
11837
11838 @lisp
11839 (setq gnus-posting-styles
11840       '((".*"
11841          (signature-file "~/.signature")
11842          (name "User Name")
11843          ("X-Home-Page" (getenv "WWW_HOME"))
11844          (organization "People's Front Against MWM"))
11845         ("^rec.humor"
11846          (signature my-funny-signature-randomizer))
11847         ((equal (system-name) "gnarly")  ;; @r{A form}
11848          (signature my-quote-randomizer))
11849         (message-news-p        ;; @r{A function symbol}
11850          (signature my-news-signature))
11851         (window-system         ;; @r{A value symbol}
11852          ("X-Window-System" (format "%s" window-system)))
11853         ;; @r{If I'm replying to Larsi, set the Organization header.}
11854         ((header "from" "larsi.*org")
11855          (Organization "Somewhere, Inc."))
11856         ((posting-from-work-p) ;; @r{A user defined function}
11857          (signature-file "~/.work-signature")
11858          (address "user@@bar.foo")
11859          (body "You are fired.\n\nSincerely, your boss.")
11860          (organization "Important Work, Inc"))
11861         ("nnml:.*"
11862          (From (save-excursion
11863                  (set-buffer gnus-article-buffer)
11864                  (message-fetch-field "to"))))
11865         ("^nn.+:"
11866          (signature-file "~/.mail-signature"))))
11867 @end lisp
11868
11869 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11870 @code{From} address in all your outgoing replies, which might be handy
11871 if you fill many roles.
11872
11873
11874 @node Drafts
11875 @section Drafts
11876 @cindex drafts
11877
11878 If you are writing a message (mail or news) and suddenly remember that
11879 you have a steak in the oven (or some pesto in the food processor, you
11880 craaazy vegetarians), you'll probably wish there was a method to save
11881 the message you are writing so that you can continue editing it some
11882 other day, and send it when you feel its finished.
11883
11884 Well, don't worry about it.  Whenever you start composing a message of
11885 some sort using the Gnus mail and post commands, the buffer you get will
11886 automatically associate to an article in a special @dfn{draft} group.
11887 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11888 article will be saved there.  (Auto-save files also go to the draft
11889 group.)
11890
11891 @cindex nndraft
11892 @vindex nndraft-directory
11893 The draft group is a special group (which is implemented as an
11894 @code{nndraft} group, if you absolutely have to know) called
11895 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11896 @code{nndraft} is to store its files.  What makes this group special is
11897 that you can't tick any articles in it or mark any articles as
11898 read---all articles in the group are permanently unread.
11899
11900 If the group doesn't exist, it will be created and you'll be subscribed
11901 to it.  The only way to make it disappear from the Group buffer is to
11902 unsubscribe it.  The special properties of the draft group comes from
11903 a group property (@pxref{Group Parameters}), and if lost the group
11904 behaves like any other group.  This means the commands below will not
11905 be available.  To restore the special properties of the group, the
11906 simplest way is to kill the group, using @kbd{C-k}, and restart
11907 Gnus.  The group is automatically created again with the
11908 correct parameters.  The content of the group is not lost.
11909
11910 @c @findex gnus-dissociate-buffer-from-draft
11911 @c @kindex C-c M-d (Mail)
11912 @c @kindex C-c M-d (Post)
11913 @c @findex gnus-associate-buffer-with-draft
11914 @c @kindex C-c C-d (Mail)
11915 @c @kindex C-c C-d (Post)
11916 @c If you're writing some super-secret message that you later want to
11917 @c encode with PGP before sending, you may wish to turn the auto-saving
11918 @c (and association with the draft group) off.  You never know who might be
11919 @c interested in reading all your extremely valuable and terribly horrible
11920 @c and interesting secrets.  The @kbd{C-c M-d}
11921 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11922 @c If you change your mind and want to turn the auto-saving back on again,
11923 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11924 @c
11925 @c @vindex gnus-use-draft
11926 @c To leave association with the draft group off by default, set
11927 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11928
11929 @findex gnus-draft-edit-message
11930 @kindex D e (Draft)
11931 When you want to continue editing the article, you simply enter the
11932 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11933 that.  You will be placed in a buffer where you left off.
11934
11935 Rejected articles will also be put in this draft group (@pxref{Rejected
11936 Articles}).
11937
11938 @findex gnus-draft-send-all-messages
11939 @kindex D s (Draft)
11940 @findex gnus-draft-send-message
11941 @kindex D S (Draft)
11942 If you have lots of rejected messages you want to post (or mail) without
11943 doing further editing, you can use the @kbd{D s} command
11944 (@code{gnus-draft-send-message}).  This command understands the
11945 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11946 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11947 in the buffer.
11948
11949 @findex gnus-draft-toggle-sending
11950 @kindex D t (Draft)
11951 If you have some messages that you wish not to send, you can use the
11952 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11953 as unsendable.  This is a toggling command.
11954
11955
11956 @node Rejected Articles
11957 @section Rejected Articles
11958 @cindex rejected articles
11959
11960 Sometimes a news server will reject an article.  Perhaps the server
11961 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11962 @emph{there be demons}.  Perhaps you have included too much cited text.
11963 Perhaps the disk is full.  Perhaps the server is down.
11964
11965 These situations are, of course, totally beyond the control of Gnus.
11966 (Gnus, of course, loves the way you look, always feels great, has angels
11967 fluttering around inside of it, doesn't care about how much cited text
11968 you include, never runs full and never goes down.)  So Gnus saves these
11969 articles until some later time when the server feels better.
11970
11971 The rejected articles will automatically be put in a special draft group
11972 (@pxref{Drafts}).  When the server comes back up again, you'd then
11973 typically enter that group and send all the articles off.
11974
11975 @node Signing and encrypting
11976 @section Signing and encrypting
11977 @cindex using gpg
11978 @cindex using s/mime
11979 @cindex using smime
11980
11981 Gnus can digitally sign and encrypt your messages, using vanilla
11982 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
11983 decoding such messages, see the @code{mm-verify-option} and
11984 @code{mm-decrypt-option} options (@pxref{Security}).
11985
11986 @vindex gnus-message-replysign
11987 @vindex gnus-message-replyencrypt
11988 @vindex gnus-message-replysignencrypted
11989 Often, you would like to sign replies to people who send you signed
11990 messages.  Even more often, you might want to encrypt messages which
11991 are in reply to encrypted messages.  Gnus offers
11992 @code{gnus-message-replysign} to enable the former, and
11993 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11994 @code{gnus-message-replysignencrypted} (on by default) will sign
11995 automatically encrypted messages.
11996
11997 Instructing @acronym{MML} to perform security operations on a
11998 @acronym{MIME} part is done using the @kbd{C-c C-m s} key map for
11999 signing and the @kbd{C-c C-m c} key map for encryption, as follows.
12000
12001 @table @kbd
12002
12003 @item C-c C-m s s
12004 @kindex C-c C-m s s (Message)
12005 @findex mml-secure-message-sign-smime
12006
12007 Digitally sign current message using @acronym{S/MIME}.
12008
12009 @item C-c C-m s o
12010 @kindex C-c C-m s o (Message)
12011 @findex mml-secure-message-sign-pgp
12012
12013 Digitally sign current message using @acronym{PGP}.
12014
12015 @item C-c C-m s p
12016 @kindex C-c C-m s p (Message)
12017 @findex mml-secure-message-sign-pgp
12018
12019 Digitally sign current message using @acronym{PGP/MIME}.
12020
12021 @item C-c C-m c s
12022 @kindex C-c C-m c s (Message)
12023 @findex mml-secure-message-encrypt-smime
12024
12025 Digitally encrypt current message using @acronym{S/MIME}.
12026
12027 @item C-c C-m c o
12028 @kindex C-c C-m c o (Message)
12029 @findex mml-secure-message-encrypt-pgp
12030
12031 Digitally encrypt current message using @acronym{PGP}.
12032
12033 @item C-c C-m c p
12034 @kindex C-c C-m c p (Message)
12035 @findex mml-secure-message-encrypt-pgpmime
12036
12037 Digitally encrypt current message using @acronym{PGP/MIME}.
12038
12039 @item C-c C-m C-n
12040 @kindex C-c C-m C-n (Message)
12041 @findex mml-unsecure-message
12042 Remove security related @acronym{MML} tags from message.
12043
12044 @end table
12045
12046 @xref{Security, ,Security, message, Message Manual}, for more information.
12047
12048 @node Select Methods
12049 @chapter Select Methods
12050 @cindex foreign groups
12051 @cindex select methods
12052
12053 A @dfn{foreign group} is a group not read by the usual (or
12054 default) means.  It could be, for instance, a group from a different
12055 @acronym{NNTP} server, it could be a virtual group, or it could be your own
12056 personal mail group.
12057
12058 A foreign group (or any group, really) is specified by a @dfn{name} and
12059 a @dfn{select method}.  To take the latter first, a select method is a
12060 list where the first element says what back end to use (e.g. @code{nntp},
12061 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
12062 name}.  There may be additional elements in the select method, where the
12063 value may have special meaning for the back end in question.
12064
12065 One could say that a select method defines a @dfn{virtual server}---so
12066 we do just that (@pxref{Server Buffer}).
12067
12068 The @dfn{name} of the group is the name the back end will recognize the
12069 group as.
12070
12071 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
12072 @samp{some.where.edu} will have the name @samp{soc.motss} and select
12073 method @code{(nntp "some.where.edu")}.  Gnus will call this group
12074 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
12075 back end just knows this group as @samp{soc.motss}.
12076
12077 The different methods all have their peculiarities, of course.
12078
12079 @menu
12080 * Server Buffer::               Making and editing virtual servers.
12081 * Getting News::                Reading USENET news with Gnus.
12082 * Getting Mail::                Reading your personal mail with Gnus.
12083 * Browsing the Web::            Getting messages from a plethora of Web sources.
12084 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
12085 * Other Sources::               Reading directories, files, SOUP packets.
12086 * Combined Groups::             Combining groups into one group.
12087 * Gnus Unplugged::              Reading news and mail offline.
12088 @end menu
12089
12090
12091 @node Server Buffer
12092 @section Server Buffer
12093
12094 Traditionally, a @dfn{server} is a machine or a piece of software that
12095 one connects to, and then requests information from.  Gnus does not
12096 connect directly to any real servers, but does all transactions through
12097 one back end or other.  But that's just putting one layer more between
12098 the actual media and Gnus, so we might just as well say that each
12099 back end represents a virtual server.
12100
12101 For instance, the @code{nntp} back end may be used to connect to several
12102 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
12103 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
12104 use, and what parameters to set by specifying a @dfn{select method}.
12105
12106 These select method specifications can sometimes become quite
12107 complicated---say, for instance, that you want to read from the
12108 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
12109 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
12110 Anyway, if you had to specify that for each group that used this
12111 server, that would be too much work, so Gnus offers a way of naming
12112 select methods, which is what you do in the server buffer.
12113
12114 To enter the server buffer, use the @kbd{^}
12115 (@code{gnus-group-enter-server-mode}) command in the group buffer.
12116
12117 @menu
12118 * Server Buffer Format::        You can customize the look of this buffer.
12119 * Server Commands::             Commands to manipulate servers.
12120 * Example Methods::             Examples server specifications.
12121 * Creating a Virtual Server::   An example session.
12122 * Server Variables::            Which variables to set.
12123 * Servers and Methods::         You can use server names as select methods.
12124 * Unavailable Servers::         Some servers you try to contact may be down.
12125 @end menu
12126
12127 @vindex gnus-server-mode-hook
12128 @code{gnus-server-mode-hook} is run when creating the server buffer.
12129
12130
12131 @node Server Buffer Format
12132 @subsection Server Buffer Format
12133 @cindex server buffer format
12134
12135 @vindex gnus-server-line-format
12136 You can change the look of the server buffer lines by changing the
12137 @code{gnus-server-line-format} variable.  This is a @code{format}-like
12138 variable, with some simple extensions:
12139
12140 @table @samp
12141
12142 @item h
12143 How the news is fetched---the back end name.
12144
12145 @item n
12146 The name of this server.
12147
12148 @item w
12149 Where the news is to be fetched from---the address.
12150
12151 @item s
12152 The opened/closed/denied status of the server.
12153 @end table
12154
12155 @vindex gnus-server-mode-line-format
12156 The mode line can also be customized by using the
12157 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
12158 Formatting}).  The following specs are understood:
12159
12160 @table @samp
12161 @item S
12162 Server name.
12163
12164 @item M
12165 Server method.
12166 @end table
12167
12168 Also @pxref{Formatting Variables}.
12169
12170
12171 @node Server Commands
12172 @subsection Server Commands
12173 @cindex server commands
12174
12175 @table @kbd
12176
12177 @item a
12178 @kindex a (Server)
12179 @findex gnus-server-add-server
12180 Add a new server (@code{gnus-server-add-server}).
12181
12182 @item e
12183 @kindex e (Server)
12184 @findex gnus-server-edit-server
12185 Edit a server (@code{gnus-server-edit-server}).
12186
12187 @item SPACE
12188 @kindex SPACE (Server)
12189 @findex gnus-server-read-server
12190 Browse the current server (@code{gnus-server-read-server}).
12191
12192 @item q
12193 @kindex q (Server)
12194 @findex gnus-server-exit
12195 Return to the group buffer (@code{gnus-server-exit}).
12196
12197 @item k
12198 @kindex k (Server)
12199 @findex gnus-server-kill-server
12200 Kill the current server (@code{gnus-server-kill-server}).
12201
12202 @item y
12203 @kindex y (Server)
12204 @findex gnus-server-yank-server
12205 Yank the previously killed server (@code{gnus-server-yank-server}).
12206
12207 @item c
12208 @kindex c (Server)
12209 @findex gnus-server-copy-server
12210 Copy the current server (@code{gnus-server-copy-server}).
12211
12212 @item l
12213 @kindex l (Server)
12214 @findex gnus-server-list-servers
12215 List all servers (@code{gnus-server-list-servers}).
12216
12217 @item s
12218 @kindex s (Server)
12219 @findex gnus-server-scan-server
12220 Request that the server scan its sources for new articles
12221 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
12222 servers.
12223
12224 @item g
12225 @kindex g (Server)
12226 @findex gnus-server-regenerate-server
12227 Request that the server regenerate all its data structures
12228 (@code{gnus-server-regenerate-server}).  This can be useful if you have
12229 a mail back end that has gotten out of sync.
12230
12231 @end table
12232
12233
12234 @node Example Methods
12235 @subsection Example Methods
12236
12237 Most select methods are pretty simple and self-explanatory:
12238
12239 @lisp
12240 (nntp "news.funet.fi")
12241 @end lisp
12242
12243 Reading directly from the spool is even simpler:
12244
12245 @lisp
12246 (nnspool "")
12247 @end lisp
12248
12249 As you can see, the first element in a select method is the name of the
12250 back end, and the second is the @dfn{address}, or @dfn{name}, if you
12251 will.
12252
12253 After these two elements, there may be an arbitrary number of
12254 @code{(@var{variable} @var{form})} pairs.
12255
12256 To go back to the first example---imagine that you want to read from
12257 port 15 on that machine.  This is what the select method should
12258 look like then:
12259
12260 @lisp
12261 (nntp "news.funet.fi" (nntp-port-number 15))
12262 @end lisp
12263
12264 You should read the documentation to each back end to find out what
12265 variables are relevant, but here's an @code{nnmh} example:
12266
12267 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
12268 you have two structures that you wish to access: One is your private
12269 mail spool, and the other is a public one.  Here's the possible spec for
12270 your private mail:
12271
12272 @lisp
12273 (nnmh "private" (nnmh-directory "~/private/mail/"))
12274 @end lisp
12275
12276 (This server is then called @samp{private}, but you may have guessed
12277 that.)
12278
12279 Here's the method for a public spool:
12280
12281 @lisp
12282 (nnmh "public"
12283       (nnmh-directory "/usr/information/spool/")
12284       (nnmh-get-new-mail nil))
12285 @end lisp
12286
12287 @cindex proxy
12288 @cindex firewall
12289
12290 If you are behind a firewall and only have access to the @acronym{NNTP}
12291 server from the firewall machine, you can instruct Gnus to @code{rlogin}
12292 on the firewall machine and telnet from there to the @acronym{NNTP} server.
12293 Doing this can be rather fiddly, but your virtual server definition
12294 should probably look something like this:
12295
12296 @lisp
12297 (nntp "firewall"
12298       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
12299       (nntp-via-address "the.firewall.machine")
12300       (nntp-address "the.real.nntp.host")
12301       (nntp-end-of-line "\n"))
12302 @end lisp
12303
12304 If you want to use the wonderful @code{ssh} program to provide a
12305 compressed connection over the modem line, you could add the following
12306 configuration to the example above:
12307
12308 @lisp
12309       (nntp-via-rlogin-command "ssh")
12310 @end lisp
12311
12312 See also @code{nntp-via-rlogin-command-switches}.
12313
12314 If you're behind a firewall, but have direct access to the outside world
12315 through a wrapper command like "runsocks", you could open a socksified
12316 telnet connection to the news server as follows:
12317
12318 @lisp
12319 (nntp "outside"
12320       (nntp-pre-command "runsocks")
12321       (nntp-open-connection-function nntp-open-via-telnet)
12322       (nntp-address "the.news.server")
12323       (nntp-end-of-line "\n"))
12324 @end lisp
12325
12326 This means that you have to have set up @code{ssh-agent} correctly to
12327 provide automatic authorization, of course.  And to get a compressed
12328 connection, you have to have the @samp{Compression} option in the
12329 @code{ssh} @file{config} file.
12330
12331
12332 @node Creating a Virtual Server
12333 @subsection Creating a Virtual Server
12334
12335 If you're saving lots of articles in the cache by using persistent
12336 articles, you may want to create a virtual server to read the cache.
12337
12338 First you need to add a new server.  The @kbd{a} command does that.  It
12339 would probably be best to use @code{nnml} to read the cache.  You
12340 could also use @code{nnspool} or @code{nnmh}, though.
12341
12342 Type @kbd{a nnml RET cache RET}.
12343
12344 You should now have a brand new @code{nnml} virtual server called
12345 @samp{cache}.  You now need to edit it to have the right definitions.
12346 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
12347 will contain the following:
12348
12349 @lisp
12350 (nnml "cache")
12351 @end lisp
12352
12353 Change that to:
12354
12355 @lisp
12356 (nnml "cache"
12357          (nnml-directory "~/News/cache/")
12358          (nnml-active-file "~/News/cache/active"))
12359 @end lisp
12360
12361 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
12362 @kbd{RET} over this virtual server, you should be entered into a browse
12363 buffer, and you should be able to enter any of the groups displayed.
12364
12365
12366 @node Server Variables
12367 @subsection Server Variables
12368 @cindex server variables
12369 @cindex server parameters
12370
12371 One sticky point when defining variables (both on back ends and in Emacs
12372 in general) is that some variables are typically initialized from other
12373 variables when the definition of the variables is being loaded.  If you
12374 change the ``base'' variable after the variables have been loaded, you
12375 won't change the ``derived'' variables.
12376
12377 This typically affects directory and file variables.  For instance,
12378 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
12379 directory variables are initialized from that variable, so
12380 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
12381 new virtual @code{nnml} server, it will @emph{not} suffice to set just
12382 @code{nnml-directory}---you have to explicitly set all the file
12383 variables to be what you want them to be.  For a complete list of
12384 variables for each back end, see each back end's section later in this
12385 manual, but here's an example @code{nnml} definition:
12386
12387 @lisp
12388 (nnml "public"
12389       (nnml-directory "~/my-mail/")
12390       (nnml-active-file "~/my-mail/active")
12391       (nnml-newsgroups-file "~/my-mail/newsgroups"))
12392 @end lisp
12393
12394 Server variables are often called @dfn{server parameters}.
12395
12396 @node Servers and Methods
12397 @subsection Servers and Methods
12398
12399 Wherever you would normally use a select method
12400 (e.g. @code{gnus-secondary-select-method}, in the group select method,
12401 when browsing a foreign server) you can use a virtual server name
12402 instead.  This could potentially save lots of typing.  And it's nice all
12403 over.
12404
12405
12406 @node Unavailable Servers
12407 @subsection Unavailable Servers
12408
12409 If a server seems to be unreachable, Gnus will mark that server as
12410 @code{denied}.  That means that any subsequent attempt to make contact
12411 with that server will just be ignored.  ``It can't be opened,'' Gnus
12412 will tell you, without making the least effort to see whether that is
12413 actually the case or not.
12414
12415 That might seem quite naughty, but it does make sense most of the time.
12416 Let's say you have 10 groups subscribed to on server
12417 @samp{nephelococcygia.com}.  This server is located somewhere quite far
12418 away from you and the machine is quite slow, so it takes 1 minute just
12419 to find out that it refuses connection to you today.  If Gnus were to
12420 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
12421 attempt to do that.  Once it has gotten a single ``connection refused'',
12422 it will regard that server as ``down''.
12423
12424 So, what happens if the machine was only feeling unwell temporarily?
12425 How do you test to see whether the machine has come up again?
12426
12427 You jump to the server buffer (@pxref{Server Buffer}) and poke it
12428 with the following commands:
12429
12430 @table @kbd
12431
12432 @item O
12433 @kindex O (Server)
12434 @findex gnus-server-open-server
12435 Try to establish connection to the server on the current line
12436 (@code{gnus-server-open-server}).
12437
12438 @item C
12439 @kindex C (Server)
12440 @findex gnus-server-close-server
12441 Close the connection (if any) to the server
12442 (@code{gnus-server-close-server}).
12443
12444 @item D
12445 @kindex D (Server)
12446 @findex gnus-server-deny-server
12447 Mark the current server as unreachable
12448 (@code{gnus-server-deny-server}).
12449
12450 @item M-o
12451 @kindex M-o (Server)
12452 @findex gnus-server-open-all-servers
12453 Open the connections to all servers in the buffer
12454 (@code{gnus-server-open-all-servers}).
12455
12456 @item M-c
12457 @kindex M-c (Server)
12458 @findex gnus-server-close-all-servers
12459 Close the connections to all servers in the buffer
12460 (@code{gnus-server-close-all-servers}).
12461
12462 @item R
12463 @kindex R (Server)
12464 @findex gnus-server-remove-denials
12465 Remove all marks to whether Gnus was denied connection from any servers
12466 (@code{gnus-server-remove-denials}).
12467
12468 @item L
12469 @kindex L (Server)
12470 @findex gnus-server-offline-server
12471 Set server status to offline (@code{gnus-server-offline-server}).
12472
12473 @end table
12474
12475
12476 @node Getting News
12477 @section Getting News
12478 @cindex reading news
12479 @cindex news back ends
12480
12481 A newsreader is normally used for reading news.  Gnus currently provides
12482 only two methods of getting news---it can read from an @acronym{NNTP} server,
12483 or it can read from a local spool.
12484
12485 @menu
12486 * NNTP::                        Reading news from an @acronym{NNTP} server.
12487 * News Spool::                  Reading news from the local spool.
12488 @end menu
12489
12490
12491 @node NNTP
12492 @subsection NNTP
12493 @cindex nntp
12494
12495 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
12496 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
12497 server as the, uhm, address.
12498
12499 If the @acronym{NNTP} server is located at a non-standard port, setting the
12500 third element of the select method to this port number should allow you
12501 to connect to the right port.  You'll have to edit the group info for
12502 that (@pxref{Foreign Groups}).
12503
12504 The name of the foreign group can be the same as a native group.  In
12505 fact, you can subscribe to the same group from as many different servers
12506 you feel like.  There will be no name collisions.
12507
12508 The following variables can be used to create a virtual @code{nntp}
12509 server:
12510
12511 @table @code
12512
12513 @item nntp-server-opened-hook
12514 @vindex nntp-server-opened-hook
12515 @cindex @sc{mode reader}
12516 @cindex authinfo
12517 @cindex authentification
12518 @cindex nntp authentification
12519 @findex nntp-send-authinfo
12520 @findex nntp-send-mode-reader
12521 is run after a connection has been made.  It can be used to send
12522 commands to the @acronym{NNTP} server after it has been contacted.  By
12523 default it sends the command @code{MODE READER} to the server with the
12524 @code{nntp-send-mode-reader} function.  This function should always be
12525 present in this hook.
12526
12527 @item nntp-authinfo-function
12528 @vindex nntp-authinfo-function
12529 @findex nntp-send-authinfo
12530 @vindex nntp-authinfo-file
12531 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
12532 server.  The default function is @code{nntp-send-authinfo}, which looks
12533 through your @file{~/.authinfo} (or whatever you've set the
12534 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
12535 are found, it will prompt you for a login name and a password.  The
12536 format of the @file{~/.authinfo} file is (almost) the same as the
12537 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
12538 manual page, but here are the salient facts:
12539
12540 @enumerate
12541 @item
12542 The file contains one or more line, each of which define one server.
12543
12544 @item
12545 Each line may contain an arbitrary number of token/value pairs.
12546
12547 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12548 @samp{default}.  In addition Gnus introduces two new tokens, not present
12549 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12550 @samp{force}.  (This is the only way the @file{.authinfo} file format
12551 deviates from the @file{.netrc} file format.)  @samp{port} is used to
12552 indicate what port on the server the credentials apply to and
12553 @samp{force} is explained below.
12554
12555 @end enumerate
12556
12557 Here's an example file:
12558
12559 @example
12560 machine news.uio.no login larsi password geheimnis
12561 machine nntp.ifi.uio.no login larsi force yes
12562 @end example
12563
12564 The token/value pairs may appear in any order; @samp{machine} doesn't
12565 have to be first, for instance.
12566
12567 In this example, both login name and password have been supplied for the
12568 former server, while the latter has only the login name listed, and the
12569 user will be prompted for the password.  The latter also has the
12570 @samp{force} tag, which means that the authinfo will be sent to the
12571 @var{nntp} server upon connection; the default (i.e., when there is not
12572 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12573 until the @var{nntp} server asks for it.
12574
12575 You can also add @samp{default} lines that will apply to all servers
12576 that don't have matching @samp{machine} lines.
12577
12578 @example
12579 default force yes
12580 @end example
12581
12582 This will force sending @samp{AUTHINFO} commands to all servers not
12583 previously mentioned.
12584
12585 Remember to not leave the @file{~/.authinfo} file world-readable.
12586
12587 @item nntp-server-action-alist
12588 @vindex nntp-server-action-alist
12589 This is a list of regexps to match on server types and actions to be
12590 taken when matches are made.  For instance, if you want Gnus to beep
12591 every time you connect to innd, you could say something like:
12592
12593 @lisp
12594 (setq nntp-server-action-alist
12595       '(("innd" (ding))))
12596 @end lisp
12597
12598 You probably don't want to do that, though.
12599
12600 The default value is
12601
12602 @lisp
12603 '(("nntpd 1\\.5\\.11t"
12604    (remove-hook 'nntp-server-opened-hook
12605                 'nntp-send-mode-reader)))
12606 @end lisp
12607
12608 This ensures that Gnus doesn't send the @code{MODE READER} command to
12609 nntpd 1.5.11t, since that command chokes that server, I've been told.
12610
12611 @item nntp-maximum-request
12612 @vindex nntp-maximum-request
12613 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
12614 will collect headers by sending a series of @code{head} commands.  To
12615 speed things up, the back end sends lots of these commands without
12616 waiting for reply, and then reads all the replies.  This is controlled
12617 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12618 your network is buggy, you should set this to 1.
12619
12620 @item nntp-connection-timeout
12621 @vindex nntp-connection-timeout
12622 If you have lots of foreign @code{nntp} groups that you connect to
12623 regularly, you're sure to have problems with @acronym{NNTP} servers not
12624 responding properly, or being too loaded to reply within reasonable
12625 time.  This is can lead to awkward problems, which can be helped
12626 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12627 that says how many seconds the @code{nntp} back end should wait for a
12628 connection before giving up.  If it is @code{nil}, which is the default,
12629 no timeouts are done.
12630
12631 @c @item nntp-command-timeout
12632 @c @vindex nntp-command-timeout
12633 @c @cindex PPP connections
12634 @c @cindex dynamic IP addresses
12635 @c If you're running Gnus on a machine that has a dynamically assigned
12636 @c address, Gnus may become confused.  If the address of your machine
12637 @c changes after connecting to the @acronym{NNTP} server, Gnus will simply sit
12638 @c waiting forever for replies from the server.  To help with this
12639 @c unfortunate problem, you can set this command to a number.  Gnus will
12640 @c then, if it sits waiting for a reply from the server longer than that
12641 @c number of seconds, shut down the connection, start a new one, and resend
12642 @c the command.  This should hopefully be transparent to the user.  A
12643 @c likely number is 30 seconds.
12644 @c
12645 @c @item nntp-retry-on-break
12646 @c @vindex nntp-retry-on-break
12647 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12648 @c hangs.  This will have much the same effect as the command timeout
12649 @c described above.
12650
12651 @item nntp-server-hook
12652 @vindex nntp-server-hook
12653 This hook is run as the last step when connecting to an @acronym{NNTP}
12654 server.
12655
12656 @item nntp-buggy-select
12657 @vindex nntp-buggy-select
12658 Set this to non-@code{nil} if your select routine is buggy.
12659
12660 @item nntp-nov-is-evil
12661 @vindex nntp-nov-is-evil
12662 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
12663 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
12664 can be used.
12665
12666 @item nntp-xover-commands
12667 @vindex nntp-xover-commands
12668 @cindex @acronym{NOV}
12669 @cindex XOVER
12670 List of strings used as commands to fetch @acronym{NOV} lines from a
12671 server.  The default value of this variable is @code{("XOVER"
12672 "XOVERVIEW")}.
12673
12674 @item nntp-nov-gap
12675 @vindex nntp-nov-gap
12676 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
12677 the server.  The server responds with one huge list of lines.  However,
12678 if you have read articles 2-5000 in the group, and only want to read
12679 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
12680 lines that you will not need.  This variable says how
12681 big a gap between two consecutive articles is allowed to be before the
12682 @code{XOVER} request is split into several request.  Note that if your
12683 network is fast, setting this variable to a really small number means
12684 that fetching will probably be slower.  If this variable is @code{nil},
12685 @code{nntp} will never split requests.  The default is 5.
12686
12687 @item nntp-prepare-server-hook
12688 @vindex nntp-prepare-server-hook
12689 A hook run before attempting to connect to an @acronym{NNTP} server.
12690
12691 @item nntp-warn-about-losing-connection
12692 @vindex nntp-warn-about-losing-connection
12693 If this variable is non-@code{nil}, some noise will be made when a
12694 server closes connection.
12695
12696 @item nntp-record-commands
12697 @vindex nntp-record-commands
12698 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12699 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
12700 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
12701 that doesn't seem to work.
12702
12703 @item nntp-open-connection-function
12704 @vindex nntp-open-connection-function
12705 It is possible to customize how the connection to the nntp server will
12706 be opened.  If you specify an @code{nntp-open-connection-function}
12707 parameter, Gnus will use that function to establish the connection.
12708 Five pre-made functions are supplied.  These functions can be grouped in
12709 two categories: direct connection functions (three pre-made), and
12710 indirect ones (two pre-made).
12711
12712 @item nntp-prepare-post-hook
12713 @vindex nntp-prepare-post-hook
12714 A hook run just before posting an article.  If there is no
12715 @code{Message-ID} header in the article and the news server provides the
12716 recommended ID, it will be added to the article before running this
12717 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12718 inhibit Gnus to add a @code{Message-ID} header, you could say:
12719
12720 @lisp
12721 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12722 @end lisp
12723
12724 Note that not all servers support the recommended ID.  This works for
12725 INN versions 2.3.0 and later, for instance.
12726
12727 @item nntp-read-timeout
12728 @vindex nntp-read-timeout
12729 How long nntp should wait between checking for the end of output.
12730 Shorter values mean quicker response, but is more CPU intensive.  The
12731 default is 0.1 seconds.  If you have a slow line to the server (and
12732 don't like to see Emacs eat your available CPU power), you might set
12733 this to, say, 1.
12734
12735 @end table
12736
12737 @menu
12738 * Direct Functions::            Connecting directly to the server.
12739 * Indirect Functions::          Connecting indirectly to the server.
12740 * Common Variables::            Understood by several connection functions.
12741 @end menu
12742
12743
12744 @node Direct Functions
12745 @subsubsection Direct Functions
12746 @cindex direct connection functions
12747
12748 These functions are called direct because they open a direct connection
12749 between your machine and the @acronym{NNTP} server.  The behavior of these
12750 functions is also affected by commonly understood variables
12751 (@pxref{Common Variables}).
12752
12753 @table @code
12754 @findex nntp-open-network-stream
12755 @item nntp-open-network-stream
12756 This is the default, and simply connects to some port or other on the
12757 remote system.
12758
12759 @findex nntp-open-tls-stream
12760 @item nntp-open-tls-stream
12761 Opens a connection to a server over a @dfn{secure} channel.  To use
12762 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
12763 installed.  You then define a server as follows:
12764
12765 @lisp
12766 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
12767 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
12768 ;;
12769 (nntp "snews.bar.com"
12770       (nntp-open-connection-function nntp-open-tls-stream)
12771       (nntp-port-number )
12772       (nntp-address "snews.bar.com"))
12773 @end lisp
12774
12775 @findex nntp-open-ssl-stream
12776 @item nntp-open-ssl-stream
12777 Opens a connection to a server over a @dfn{secure} channel.  To use
12778 this you must have @uref{http://www.openssl.org, OpenSSL} or
12779 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
12780 then define a server as follows:
12781
12782 @lisp
12783 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
12784 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
12785 ;;
12786 (nntp "snews.bar.com"
12787       (nntp-open-connection-function nntp-open-ssl-stream)
12788       (nntp-port-number 563)
12789       (nntp-address "snews.bar.com"))
12790 @end lisp
12791
12792 @findex nntp-open-telnet-stream
12793 @item nntp-open-telnet-stream
12794 Opens a connection to an @acronym{NNTP} server by simply @samp{telnet}'ing
12795 it.  You might wonder why this function exists, since we have the
12796 default @code{nntp-open-network-stream} which would do the job.  (One
12797 of) the reason(s) is that if you are behind a firewall but have direct
12798 connections to the outside world thanks to a command wrapper like
12799 @code{runsocks}, you can use it like this:
12800
12801 @lisp
12802 (nntp "socksified"
12803       (nntp-pre-command "runsocks")
12804       (nntp-open-connection-function nntp-open-telnet-stream)
12805       (nntp-address "the.news.server"))
12806 @end lisp
12807
12808 With the default method, you would need to wrap your whole Emacs
12809 session, which is not a good idea.
12810 @end table
12811
12812
12813 @node Indirect Functions
12814 @subsubsection Indirect Functions
12815 @cindex indirect connection functions
12816
12817 These functions are called indirect because they connect to an
12818 intermediate host before actually connecting to the @acronym{NNTP} server.
12819 All of these functions and related variables are also said to belong to
12820 the ``via'' family of connection: they're all prefixed with ``via'' to make
12821 things cleaner.  The behavior of these functions is also affected by
12822 commonly understood variables (@pxref{Common Variables}).
12823
12824 @table @code
12825 @item nntp-open-via-rlogin-and-telnet
12826 @findex nntp-open-via-rlogin-and-telnet
12827 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12828 to the real @acronym{NNTP} server from there.  This is useful for instance if
12829 you need to connect to a firewall machine first.
12830
12831 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12832
12833 @table @code
12834 @item nntp-via-rlogin-command
12835 @vindex nntp-via-rlogin-command
12836 Command used to log in on the intermediate host.  The default is
12837 @samp{rsh}, but @samp{ssh} is a popular alternative.
12838
12839 @item nntp-via-rlogin-command-switches
12840 @vindex nntp-via-rlogin-command-switches
12841 List of strings to be used as the switches to
12842 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12843 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
12844 @samp{("-C")} in order to compress all data connections, otherwise set
12845 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
12846 the telnet command requires a pseudo-tty allocation on an intermediate
12847 host.
12848 @end table
12849
12850 @item nntp-open-via-telnet-and-telnet
12851 @findex nntp-open-via-telnet-and-telnet
12852 Does essentially the same, but uses @samp{telnet} instead of
12853 @samp{rlogin} to connect to the intermediate host.
12854
12855 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12856
12857 @table @code
12858 @item nntp-via-telnet-command
12859 @vindex nntp-via-telnet-command
12860 Command used to @code{telnet} the intermediate host.  The default is
12861 @samp{telnet}.
12862
12863 @item nntp-via-telnet-switches
12864 @vindex nntp-via-telnet-switches
12865 List of strings to be used as the switches to the
12866 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12867
12868 @item nntp-via-user-password
12869 @vindex nntp-via-user-password
12870 Password to use when logging in on the intermediate host.
12871
12872 @item nntp-via-envuser
12873 @vindex nntp-via-envuser
12874 If non-@code{nil}, the intermediate @code{telnet} session (client and
12875 server both) will support the @code{ENVIRON} option and not prompt for
12876 login name.  This works for Solaris @code{telnet}, for instance.
12877
12878 @item nntp-via-shell-prompt
12879 @vindex nntp-via-shell-prompt
12880 Regexp matching the shell prompt on the intermediate host.  The default
12881 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12882
12883 @end table
12884
12885 @end table
12886
12887
12888 Here are some additional variables that are understood by all the above
12889 functions:
12890
12891 @table @code
12892
12893 @item nntp-via-user-name
12894 @vindex nntp-via-user-name
12895 User name to use when connecting to the intermediate host.
12896
12897 @item nntp-via-address
12898 @vindex nntp-via-address
12899 Address of the intermediate host to connect to.
12900
12901 @end table
12902
12903
12904 @node Common Variables
12905 @subsubsection Common Variables
12906
12907 The following variables affect the behavior of all, or several of the
12908 pre-made connection functions.  When not specified, all functions are
12909 affected.
12910
12911 @table @code
12912
12913 @item nntp-pre-command
12914 @vindex nntp-pre-command
12915 A command wrapper to use when connecting through a non native
12916 connection function (all except @code{nntp-open-network-stream},
12917 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}.  This is
12918 where you would put a @samp{SOCKS} wrapper for instance.
12919
12920 @item nntp-address
12921 @vindex nntp-address
12922 The address of the @acronym{NNTP} server.
12923
12924 @item nntp-port-number
12925 @vindex nntp-port-number
12926 Port number to connect to the @acronym{NNTP} server.  The default is
12927 @samp{nntp}.  If you use @acronym{NNTP} over
12928 @acronym{tls}/@acronym{ssl}, you may want to use integer ports rather
12929 than named ports (i.e, use @samp{563} instead of @samp{snews} or
12930 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
12931 not work with named ports.
12932
12933 @item nntp-end-of-line
12934 @vindex nntp-end-of-line
12935 String to use as end-of-line marker when talking to the @acronym{NNTP}
12936 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12937 using a non native connection function.
12938
12939 @item nntp-telnet-command
12940 @vindex nntp-telnet-command
12941 Command to use when connecting to the @acronym{NNTP} server through
12942 @samp{telnet}.  This is @emph{not} for an intermediate host.  This is
12943 just for the real @acronym{NNTP} server.  The default is
12944 @samp{telnet}.
12945
12946 @item nntp-telnet-switches
12947 @vindex nntp-telnet-switches
12948 A list of switches to pass to @code{nntp-telnet-command}.  The default
12949 is @samp{("-8")}.
12950
12951 @end table
12952
12953
12954 @node News Spool
12955 @subsection News Spool
12956 @cindex nnspool
12957 @cindex news spool
12958
12959 Subscribing to a foreign group from the local spool is extremely easy,
12960 and might be useful, for instance, to speed up reading groups that
12961 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12962 instance.
12963
12964 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12965 anything else) as the address.
12966
12967 If you have access to a local spool, you should probably use that as the
12968 native select method (@pxref{Finding the News}).  It is normally faster
12969 than using an @code{nntp} select method, but might not be.  It depends.
12970 You just have to try to find out what's best at your site.
12971
12972 @table @code
12973
12974 @item nnspool-inews-program
12975 @vindex nnspool-inews-program
12976 Program used to post an article.
12977
12978 @item nnspool-inews-switches
12979 @vindex nnspool-inews-switches
12980 Parameters given to the inews program when posting an article.
12981
12982 @item nnspool-spool-directory
12983 @vindex nnspool-spool-directory
12984 Where @code{nnspool} looks for the articles.  This is normally
12985 @file{/usr/spool/news/}.
12986
12987 @item nnspool-nov-directory
12988 @vindex nnspool-nov-directory
12989 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
12990 @file{/usr/spool/news/over.view/}.
12991
12992 @item nnspool-lib-dir
12993 @vindex nnspool-lib-dir
12994 Where the news lib dir is (@file{/usr/lib/news/} by default).
12995
12996 @item nnspool-active-file
12997 @vindex nnspool-active-file
12998 The name of the active file.
12999
13000 @item nnspool-newsgroups-file
13001 @vindex nnspool-newsgroups-file
13002 The name of the group descriptions file.
13003
13004 @item nnspool-history-file
13005 @vindex nnspool-history-file
13006 The name of the news history file.
13007
13008 @item nnspool-active-times-file
13009 @vindex nnspool-active-times-file
13010 The name of the active date file.
13011
13012 @item nnspool-nov-is-evil
13013 @vindex nnspool-nov-is-evil
13014 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
13015 that it finds.
13016
13017 @item nnspool-sift-nov-with-sed
13018 @vindex nnspool-sift-nov-with-sed
13019 @cindex sed
13020 If non-@code{nil}, which is the default, use @code{sed} to get the
13021 relevant portion from the overview file.  If @code{nil},
13022 @code{nnspool} will load the entire file into a buffer and process it
13023 there.
13024
13025 @end table
13026
13027
13028 @node Getting Mail
13029 @section Getting Mail
13030 @cindex reading mail
13031 @cindex mail
13032
13033 Reading mail with a newsreader---isn't that just plain WeIrD? But of
13034 course.
13035
13036 @menu
13037 * Mail in a Newsreader::        Important introductory notes.
13038 * Getting Started Reading Mail::  A simple cookbook example.
13039 * Splitting Mail::              How to create mail groups.
13040 * Mail Sources::                How to tell Gnus where to get mail from.
13041 * Mail Back End Variables::     Variables for customizing mail handling.
13042 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
13043 * Group Mail Splitting::        Use group customize to drive mail splitting.
13044 * Incorporating Old Mail::      What about the old mail you have?
13045 * Expiring Mail::               Getting rid of unwanted mail.
13046 * Washing Mail::                Removing cruft from the mail you get.
13047 * Duplicates::                  Dealing with duplicated mail.
13048 * Not Reading Mail::            Using mail back ends for reading other files.
13049 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
13050 @end menu
13051
13052
13053 @node Mail in a Newsreader
13054 @subsection Mail in a Newsreader
13055
13056 If you are used to traditional mail readers, but have decided to switch
13057 to reading mail with Gnus, you may find yourself experiencing something
13058 of a culture shock.
13059
13060 Gnus does not behave like traditional mail readers.  If you want to make
13061 it behave that way, you can, but it's an uphill battle.
13062
13063 Gnus, by default, handles all its groups using the same approach.  This
13064 approach is very newsreaderly---you enter a group, see the new/unread
13065 messages, and when you read the messages, they get marked as read, and
13066 you don't see them any more.  (Unless you explicitly ask for them.)
13067
13068 In particular, you do not do anything explicitly to delete messages.
13069
13070 Does this mean that all the messages that have been marked as read are
13071 deleted?  How awful!
13072
13073 But, no, it means that old messages are @dfn{expired} according to some
13074 scheme or other.  For news messages, the expire process is controlled by
13075 the news administrator; for mail, the expire process is controlled by
13076 you.  The expire process for mail is covered in depth in @ref{Expiring
13077 Mail}.
13078
13079 What many Gnus users find, after using it a while for both news and
13080 mail, is that the transport mechanism has very little to do with how
13081 they want to treat a message.
13082
13083 Many people subscribe to several mailing lists.  These are transported
13084 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
13085 answering, or even reading these messages very carefully.  We may not
13086 need to save them because if we should need to read one again, they are
13087 archived somewhere else.
13088
13089 Some people have local news groups which have only a handful of readers.
13090 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
13091 to read and answer a large fraction of the messages very carefully in
13092 order to do our work.  And there may not be an archive, so we may need
13093 to save the interesting messages the same way we would personal mail.
13094
13095 The important distinction turns out to be not the transport mechanism,
13096 but other factors such as how interested we are in the subject matter,
13097 or how easy it is to retrieve the message if we need to read it again.
13098
13099 Gnus provides many options for sorting mail into ``groups'' which behave
13100 like newsgroups, and for treating each group (whether mail or news)
13101 differently.
13102
13103 Some users never get comfortable using the Gnus (ahem) paradigm and wish
13104 that Gnus should grow up and be a male, er, mail reader.  It is possible
13105 to whip Gnus into a more mailreaderly being, but, as said before, it's
13106 not easy.  People who prefer proper mail readers should try @sc{vm}
13107 instead, which is an excellent, and proper, mail reader.
13108
13109 I don't mean to scare anybody off, but I want to make it clear that you
13110 may be required to learn a new way of thinking about messages.  After
13111 you've been subjected to The Gnus Way, you will come to love it.  I can
13112 guarantee it.  (At least the guy who sold me the Emacs Subliminal
13113 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
13114 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
13115 You Do.)
13116
13117
13118 @node Getting Started Reading Mail
13119 @subsection Getting Started Reading Mail
13120
13121 It's quite easy to use Gnus to read your new mail.  You just plonk the
13122 mail back end of your choice into @code{gnus-secondary-select-methods},
13123 and things will happen automatically.
13124
13125 For instance, if you want to use @code{nnml} (which is a ``one file per
13126 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
13127
13128 @lisp
13129 (setq gnus-secondary-select-methods '((nnml "")))
13130 @end lisp
13131
13132 Now, the next time you start Gnus, this back end will be queried for new
13133 articles, and it will move all the messages in your spool file to its
13134 directory, which is @file{~/Mail/} by default.  The new group that will
13135 be created (@samp{mail.misc}) will be subscribed, and you can read it
13136 like any other group.
13137
13138 You will probably want to split the mail into several groups, though:
13139
13140 @lisp
13141 (setq nnmail-split-methods
13142       '(("junk" "^From:.*Lars Ingebrigtsen")
13143         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
13144         ("other" "")))
13145 @end lisp
13146
13147 This will result in three new @code{nnml} mail groups being created:
13148 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
13149 mail that doesn't fit into the first two groups will be placed in the
13150 last group.
13151
13152 This should be sufficient for reading mail with Gnus.  You might want to
13153 give the other sections in this part of the manual a perusal, though.
13154 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
13155
13156
13157 @node Splitting Mail
13158 @subsection Splitting Mail
13159 @cindex splitting mail
13160 @cindex mail splitting
13161 @cindex mail filtering (splitting)
13162
13163 @vindex nnmail-split-methods
13164 The @code{nnmail-split-methods} variable says how the incoming mail is
13165 to be split into groups.
13166
13167 @lisp
13168 (setq nnmail-split-methods
13169   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
13170     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
13171     ("mail.other" "")))
13172 @end lisp
13173
13174 This variable is a list of lists, where the first element of each of
13175 these lists is the name of the mail group (they do not have to be called
13176 something beginning with @samp{mail}, by the way), and the second
13177 element is a regular expression used on the header of each mail to
13178 determine if it belongs in this mail group.  The first string may
13179 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
13180 insert sub-expressions from the matched text.  For instance:
13181
13182 @lisp
13183 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
13184 @end lisp
13185
13186 The second element can also be a function.  In that case, it will be
13187 called narrowed to the headers with the first element of the rule as the
13188 argument.  It should return a non-@code{nil} value if it thinks that the
13189 mail belongs in that group.
13190
13191 The last of these groups should always be a general one, and the regular
13192 expression should @emph{always} be @samp{*} so that it matches any mails
13193 that haven't been matched by any of the other regexps.  (These rules are
13194 processed from the beginning of the alist toward the end.  The first
13195 rule to make a match will ``win'', unless you have crossposting enabled.
13196 In that case, all matching rules will ``win''.)
13197
13198 If you like to tinker with this yourself, you can set this variable to a
13199 function of your choice.  This function will be called without any
13200 arguments in a buffer narrowed to the headers of an incoming mail
13201 message.  The function should return a list of group names that it
13202 thinks should carry this mail message.
13203
13204 Note that the mail back ends are free to maul the poor, innocent,
13205 incoming headers all they want to.  They all add @code{Lines} headers;
13206 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
13207 @code{From<SPACE>} line to something else.
13208
13209 @vindex nnmail-crosspost
13210 The mail back ends all support cross-posting.  If several regexps match,
13211 the mail will be ``cross-posted'' to all those groups.
13212 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
13213 that no articles are crossposted to the general (@samp{*}) group.
13214
13215 @vindex nnmail-crosspost-link-function
13216 @cindex crosspost
13217 @cindex links
13218 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
13219 the crossposted articles.  However, not all file systems support hard
13220 links.  If that's the case for you, set
13221 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
13222 variable is @code{add-name-to-file} by default.)
13223
13224 @kindex M-x nnmail-split-history
13225 @findex nnmail-split-history
13226 If you wish to see where the previous mail split put the messages, you
13227 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
13228 where re-spooling messages would put the messages, you can use
13229 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
13230 Group Commands}).
13231
13232 @vindex nnmail-split-header-length-limit
13233 Header lines longer than the value of
13234 @code{nnmail-split-header-length-limit} are excluded from the split
13235 function.
13236
13237 @vindex nnmail-mail-splitting-charset
13238 @vindex nnmail-mail-splitting-decodes
13239 By default the splitting codes @acronym{MIME} decodes headers so you
13240 can match on non-@acronym{ASCII} strings.  The
13241 @code{nnmail-mail-splitting-charset} variable specifies the default
13242 charset for decoding.  The behaviour can be turned off completely by
13243 binding @code{nnmail-mail-splitting-decodes} to @code{nil}, which is
13244 useful if you want to match articles based on the raw header data.
13245
13246 @vindex nnmail-resplit-incoming
13247 By default, splitting is performed on all incoming messages.  If you
13248 specify a @code{directory} entry for the variable @code{mail-sources}
13249 (@pxref{Mail Source Specifiers}), however, then splitting does
13250 @emph{not} happen by default.  You can set the variable
13251 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
13252 splitting happen even in this case.  (This variable has no effect on
13253 other kinds of entries.)
13254
13255 Gnus gives you all the opportunity you could possibly want for shooting
13256 yourself in the foot.  Let's say you create a group that will contain
13257 all the mail you get from your boss.  And then you accidentally
13258 unsubscribe from the group.  Gnus will still put all the mail from your
13259 boss in the unsubscribed group, and so, when your boss mails you ``Have
13260 that report ready by Monday or you're fired!'', you'll never see it and,
13261 come Tuesday, you'll still believe that you're gainfully employed while
13262 you really should be out collecting empty bottles to save up for next
13263 month's rent money.
13264
13265
13266 @node Mail Sources
13267 @subsection Mail Sources
13268
13269 Mail can be gotten from many different sources---the mail spool, from
13270 a @acronym{POP} mail server, from a procmail directory, or from a
13271 maildir, for instance.
13272
13273 @menu
13274 * Mail Source Specifiers::      How to specify what a mail source is.
13275 * Mail Source Customization::   Some variables that influence things.
13276 * Fetching Mail::               Using the mail source specifiers.
13277 @end menu
13278
13279
13280 @node Mail Source Specifiers
13281 @subsubsection Mail Source Specifiers
13282 @cindex POP
13283 @cindex mail server
13284 @cindex procmail
13285 @cindex mail spool
13286 @cindex mail source
13287
13288 You tell Gnus how to fetch mail by setting @code{mail-sources}
13289 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
13290
13291 Here's an example:
13292
13293 @lisp
13294 (pop :server "pop3.mailserver.com" :user "myname")
13295 @end lisp
13296
13297 As can be observed, a mail source specifier is a list where the first
13298 element is a @dfn{mail source type}, followed by an arbitrary number of
13299 @dfn{keywords}.  Keywords that are not explicitly specified are given
13300 default values.
13301
13302 The following mail source types are available:
13303
13304 @table @code
13305 @item file
13306 Get mail from a single file; typically from the mail spool.
13307
13308 Keywords:
13309
13310 @table @code
13311 @item :path
13312 The file name.  Defaults to the value of the @env{MAIL}
13313 environment variable or the value of @code{rmail-spool-directory}
13314 (usually something like @file{/usr/mail/spool/user-name}).
13315
13316 @item :prescript
13317 @itemx :postscript
13318 Script run before/after fetching mail.
13319 @end table
13320
13321 An example file mail source:
13322
13323 @lisp
13324 (file :path "/usr/spool/mail/user-name")
13325 @end lisp
13326
13327 Or using the default file name:
13328
13329 @lisp
13330 (file)
13331 @end lisp
13332
13333 If the mail spool file is not located on the local machine, it's best
13334 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
13335 You can not use ange-ftp file names here---it has no way to lock the
13336 mail spool while moving the mail.
13337
13338 If it's impossible to set up a proper server, you can use ssh instead.
13339
13340 @lisp
13341 (setq mail-sources
13342       '((file :prescript "ssh host bin/getmail >%t")))
13343 @end lisp
13344
13345 The @samp{getmail} script would look something like the following:
13346
13347 @example
13348 #!/bin/sh
13349 #  getmail - move mail from spool to stdout
13350 #  flu@@iki.fi
13351
13352 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
13353 TMP=$HOME/Mail/tmp
13354 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
13355 @end example
13356
13357 Alter this script to fit find the @samp{movemail} you want to use.
13358
13359
13360 @item directory
13361 @vindex nnmail-scan-directory-mail-source-once
13362 Get mail from several files in a directory.  This is typically used
13363 when you have procmail split the incoming mail into several files.
13364 That is, there is a one-to-one correspondence between files in that
13365 directory and groups, so that mail from the file @file{foo.bar.spool}
13366 will be put in the group @code{foo.bar}.  (You can change the suffix
13367 to be used instead of @code{.spool}.)  Setting
13368 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
13369 Gnus to scan the mail source only once.  This is particularly useful
13370 if you want to scan mail groups at a specified level.
13371
13372 @vindex nnmail-resplit-incoming
13373 There is also the variable @code{nnmail-resplit-incoming}, if you set
13374 that to a non-@code{nil} value, then the normal splitting process is
13375 applied to all the files from the directory, @ref{Splitting Mail}.
13376
13377 Keywords:
13378
13379 @table @code
13380 @item :path
13381 The name of the directory where the files are.  There is no default
13382 value.
13383
13384 @item :suffix
13385 Only files ending with this suffix are used.  The default is
13386 @samp{.spool}.
13387
13388 @item :predicate
13389 Only files that have this predicate return non-@code{nil} are returned.
13390 The default is @code{identity}.  This is used as an additional
13391 filter---only files that have the right suffix @emph{and} satisfy this
13392 predicate are considered.
13393
13394 @item :prescript
13395 @itemx :postscript
13396 Script run before/after fetching mail.
13397
13398 @end table
13399
13400 An example directory mail source:
13401
13402 @lisp
13403 (directory :path "/home/user-name/procmail-dir/"
13404            :suffix ".prcml")
13405 @end lisp
13406
13407 @item pop
13408 Get mail from a @acronym{POP} server.
13409
13410 Keywords:
13411
13412 @table @code
13413 @item :server
13414 The name of the @acronym{POP} server.  The default is taken from the
13415 @env{MAILHOST} environment variable.
13416
13417 @item :port
13418 The port number of the @acronym{POP} server.  This can be a number (eg,
13419 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
13420 string, it should be a service name as listed in @file{/etc/services} on
13421 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
13422 need to specify it as @samp{"pop-3"} instead.
13423
13424 @item :user
13425 The user name to give to the @acronym{POP} server.  The default is the login
13426 name.
13427
13428 @item :password
13429 The password to give to the @acronym{POP} server.  If not specified,
13430 the user is prompted.
13431
13432 @item :program
13433 The program to use to fetch mail from the @acronym{POP} server.  This
13434 should be a @code{format}-like string.  Here's an example:
13435
13436 @example
13437 fetchmail %u@@%s -P %p %t
13438 @end example
13439
13440 The valid format specifier characters are:
13441
13442 @table @samp
13443 @item t
13444 The name of the file the mail is to be moved to.  This must always be
13445 included in this string.
13446
13447 @item s
13448 The name of the server.
13449
13450 @item P
13451 The port number of the server.
13452
13453 @item u
13454 The user name to use.
13455
13456 @item p
13457 The password to use.
13458 @end table
13459
13460 The values used for these specs are taken from the values you give the
13461 corresponding keywords.
13462
13463 @item :prescript
13464 A script to be run before fetching the mail.  The syntax is the same as
13465 the @code{:program} keyword.  This can also be a function to be run.
13466
13467 @item :postscript
13468 A script to be run after fetching the mail.  The syntax is the same as
13469 the @code{:program} keyword.  This can also be a function to be run.
13470
13471 @item :function
13472 The function to use to fetch mail from the @acronym{POP} server.  The
13473 function is called with one parameter---the name of the file where the
13474 mail should be moved to.
13475
13476 @item :authentication
13477 This can be either the symbol @code{password} or the symbol @code{apop}
13478 and says what authentication scheme to use.  The default is
13479 @code{password}.
13480
13481 @end table
13482
13483 If the @code{:program} and @code{:function} keywords aren't specified,
13484 @code{pop3-movemail} will be used.
13485
13486 Here are some examples.  Fetch from the default @acronym{POP} server,
13487 using the default user name, and default fetcher:
13488
13489 @lisp
13490 (pop)
13491 @end lisp
13492
13493 Fetch from a named server with a named user and password:
13494
13495 @lisp
13496 (pop :server "my.pop.server"
13497      :user "user-name" :password "secret")
13498 @end lisp
13499
13500 Use @samp{movemail} to move the mail:
13501
13502 @lisp
13503 (pop :program "movemail po:%u %t %p")
13504 @end lisp
13505
13506 @item maildir
13507 Get mail from a maildir.  This is a type of mailbox that is supported by
13508 at least qmail and postfix, where each file in a special directory
13509 contains exactly one mail.
13510
13511 Keywords:
13512
13513 @table @code
13514 @item :path
13515 The name of the directory where the mails are stored.  The default is
13516 taken from the @env{MAILDIR} environment variable or
13517 @file{~/Maildir/}.
13518 @item :subdirs
13519 The subdirectories of the Maildir.  The default is
13520 @samp{("new" "cur")}.
13521
13522 @c If you sometimes look at your mail through a pop3 daemon before fetching
13523 @c them with Gnus, you may also have to fetch your mails from the
13524 @c @code{cur} directory inside the maildir, like in the first example
13525 @c below.
13526
13527 You can also get mails from remote hosts (because maildirs don't suffer
13528 from locking problems).
13529
13530 @end table
13531
13532 Two example maildir mail sources:
13533
13534 @lisp
13535 (maildir :path "/home/user-name/Maildir/"
13536          :subdirs ("cur" "new"))
13537 @end lisp
13538
13539 @lisp
13540 (maildir :path "/user@@remotehost.org:~/Maildir/"
13541          :subdirs ("new"))
13542 @end lisp
13543
13544 @item imap
13545 Get mail from a @acronym{IMAP} server.  If you don't want to use
13546 @acronym{IMAP} as intended, as a network mail reading protocol (ie
13547 with nnimap), for some reason or other, Gnus let you treat it similar
13548 to a @acronym{POP} server and fetches articles from a given
13549 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
13550
13551 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
13552 may need external programs and libraries, @xref{IMAP}.
13553
13554 Keywords:
13555
13556 @table @code
13557 @item :server
13558 The name of the @acronym{IMAP} server.  The default is taken from the
13559 @env{MAILHOST} environment variable.
13560
13561 @item :port
13562 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
13563 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
13564
13565 @item :user
13566 The user name to give to the @acronym{IMAP} server.  The default is the login
13567 name.
13568
13569 @item :password
13570 The password to give to the @acronym{IMAP} server.  If not specified, the user is
13571 prompted.
13572
13573 @item :stream
13574 What stream to use for connecting to the server, this is one of the
13575 symbols in @code{imap-stream-alist}.  Right now, this means
13576 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
13577 @samp{ssl}, @samp{shell} or the default @samp{network}.
13578
13579 @item :authentication
13580 Which authenticator to use for authenticating to the server, this is
13581 one of the symbols in @code{imap-authenticator-alist}.  Right now,
13582 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13583 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13584
13585 @item :program
13586 When using the `shell' :stream, the contents of this variable is
13587 mapped into the @code{imap-shell-program} variable.  This should be a
13588 @code{format}-like string (or list of strings).  Here's an example:
13589
13590 @example
13591 ssh %s imapd
13592 @end example
13593
13594 The valid format specifier characters are:
13595
13596 @table @samp
13597 @item s
13598 The name of the server.
13599
13600 @item l
13601 User name from @code{imap-default-user}.
13602
13603 @item p
13604 The port number of the server.
13605 @end table
13606
13607 The values used for these specs are taken from the values you give the
13608 corresponding keywords.
13609
13610 @item :mailbox
13611 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13612 which normally is the mailbox which receive incoming mail.
13613
13614 @item :predicate
13615 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13616 UNDELETED}, is probably the best choice for most people, but if you
13617 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
13618 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13619 Then all articles in the mailbox is fetched, no matter what.  For a
13620 complete list of predicates, see RFC 2060 section 6.4.4.
13621
13622 @item :fetchflag
13623 How to flag fetched articles on the server, the default @samp{\Deleted}
13624 will mark them as deleted, an alternative would be @samp{\Seen} which
13625 would simply mark them as read.  These are the two most likely choices,
13626 but more flags are defined in RFC 2060 section 2.3.2.
13627
13628 @item :dontexpunge
13629 If non-@code{nil}, don't remove all articles marked as deleted in the
13630 mailbox after finishing the fetch.
13631
13632 @end table
13633
13634 An example @acronym{IMAP} mail source:
13635
13636 @lisp
13637 (imap :server "mail.mycorp.com"
13638       :stream kerberos4
13639       :fetchflag "\\Seen")
13640 @end lisp
13641
13642 @item webmail
13643 Get mail from a webmail server, such as @uref{http://www.hotmail.com/},
13644 @uref{http://webmail.netscape.com/}, @uref{http://www.netaddress.com/},
13645 @uref{http://mail.yahoo.com/}.
13646
13647 NOTE: Webmail largely depends on cookies.  A "one-line-cookie" patch is
13648 required for url "4.0pre.46".
13649
13650 WARNING: Mails may be lost.  NO WARRANTY.
13651
13652 Keywords:
13653
13654 @table @code
13655 @item :subtype
13656 The type of the webmail server.  The default is @code{hotmail}.  The
13657 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13658
13659 @item :user
13660 The user name to give to the webmail server.  The default is the login
13661 name.
13662
13663 @item :password
13664 The password to give to the webmail server.  If not specified, the user is
13665 prompted.
13666
13667 @item :dontexpunge
13668 If non-@code{nil}, only fetch unread articles and don't move them to
13669 trash folder after finishing the fetch.
13670
13671 @end table
13672
13673 An example webmail source:
13674
13675 @lisp
13676 (webmail :subtype 'hotmail
13677          :user "user-name"
13678          :password "secret")
13679 @end lisp
13680 @end table
13681
13682 @table @dfn
13683 @item Common Keywords
13684 Common keywords can be used in any type of mail source.
13685
13686 Keywords:
13687
13688 @table @code
13689 @item :plugged
13690 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
13691 use directory source to get mail, you can specify it as in this
13692 example:
13693
13694 @lisp
13695 (setq mail-sources
13696       '((directory :path "/home/pavel/.Spool/"
13697                    :suffix ""
13698                    :plugged t)))
13699 @end lisp
13700
13701 Gnus will then fetch your mail even when you are unplugged.  This is
13702 useful when you use local mail and news.
13703
13704 @end table
13705 @end table
13706
13707 @subsubsection Function Interface
13708
13709 Some of the above keywords specify a Lisp function to be executed.
13710 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13711 the value of the keyword while the function is executing.  For example,
13712 consider the following mail-source setting:
13713
13714 @lisp
13715 (setq mail-sources '((pop :user "jrl"
13716                           :server "pophost" :function fetchfunc)))
13717 @end lisp
13718
13719 While the function @code{fetchfunc} is executing, the symbol @code{user}
13720 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13721 @code{"pophost"}.  The symbols @code{port}, @code{password},
13722 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13723 and @code{authentication} are also bound (to their default values).
13724
13725 See above for a list of keywords for each type of mail source.
13726
13727
13728 @node Mail Source Customization
13729 @subsubsection Mail Source Customization
13730
13731 The following is a list of variables that influence how the mail is
13732 fetched.  You would normally not need to set or change any of these
13733 variables.
13734
13735 @table @code
13736 @item mail-source-crash-box
13737 @vindex mail-source-crash-box
13738 File where mail will be stored while processing it.  The default is@*
13739 @file{~/.emacs-mail-crash-box}.
13740
13741 @item mail-source-delete-incoming
13742 @vindex mail-source-delete-incoming
13743 If non-@code{nil}, delete incoming files after handling them.  If
13744 @code{t}, delete the files immediately, if @code{nil}, never delete any
13745 files.  If a positive number, delete files older than number of days
13746 (This will only happen, when receiving new mail).  You may also set
13747 @code{mail-source-delete-incoming} to @code{nil} and call
13748 @code{mail-source-delete-old-incoming} from a hook or interactively.
13749
13750 @item mail-source-delete-old-incoming-confirm
13751 @vindex mail-source-delete-old-incoming-confirm
13752 If non-@code{nil}, ask for for confirmation before deleting old incoming
13753 files.  This variable only applies when
13754 @code{mail-source-delete-incoming} is a positive number.
13755
13756 @item mail-source-ignore-errors
13757 @vindex mail-source-ignore-errors
13758 If non-@code{nil}, ignore errors when reading mail from a mail source.
13759
13760 @item mail-source-directory
13761 @vindex mail-source-directory
13762 Directory where files (if any) will be stored.  The default is
13763 @file{~/Mail/}.  At present, the only thing this is used for is to say
13764 where the incoming files will be stored if the previous variable is
13765 @code{nil}.
13766
13767 @item mail-source-incoming-file-prefix
13768 @vindex mail-source-incoming-file-prefix
13769 Prefix for file name for storing incoming mail.  The default is
13770 @file{Incoming}, in which case files will end up with names like
13771 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13772 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13773
13774 @item mail-source-default-file-modes
13775 @vindex mail-source-default-file-modes
13776 All new mail files will get this file mode.  The default is 384.
13777
13778 @item mail-source-movemail-program
13779 @vindex mail-source-movemail-program
13780 If non-@code{nil}, name of program for fetching new mail.  If
13781 @code{nil}, @code{movemail} in @var{exec-directory}.
13782
13783 @end table
13784
13785
13786 @node Fetching Mail
13787 @subsubsection Fetching Mail
13788
13789 @vindex mail-sources
13790 @vindex nnmail-spool-file
13791 The way to actually tell Gnus where to get new mail from is to set
13792 @code{mail-sources} to a list of mail source specifiers
13793 (@pxref{Mail Source Specifiers}).
13794
13795 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13796 @code{nil}, the mail back ends will never attempt to fetch mail by
13797 themselves.
13798
13799 If you want to fetch mail both from your local spool as well as a
13800 @acronym{POP} mail server, you'd say something like:
13801
13802 @lisp
13803 (setq mail-sources
13804       '((file)
13805         (pop :server "pop3.mail.server"
13806              :password "secret")))
13807 @end lisp
13808
13809 Or, if you don't want to use any of the keyword defaults:
13810
13811 @lisp
13812 (setq mail-sources
13813       '((file :path "/var/spool/mail/user-name")
13814         (pop :server "pop3.mail.server"
13815              :user "user-name"
13816              :port "pop3"
13817              :password "secret")))
13818 @end lisp
13819
13820
13821 When you use a mail back end, Gnus will slurp all your mail from your
13822 inbox and plonk it down in your home directory.  Gnus doesn't move any
13823 mail if you're not using a mail back end---you have to do a lot of magic
13824 invocations first.  At the time when you have finished drawing the
13825 pentagram, lightened the candles, and sacrificed the goat, you really
13826 shouldn't be too surprised when Gnus moves your mail.
13827
13828
13829
13830 @node Mail Back End Variables
13831 @subsection Mail Back End Variables
13832
13833 These variables are (for the most part) pertinent to all the various
13834 mail back ends.
13835
13836 @table @code
13837 @vindex nnmail-read-incoming-hook
13838 @item nnmail-read-incoming-hook
13839 The mail back ends all call this hook after reading new mail.  You can
13840 use this hook to notify any mail watch programs, if you want to.
13841
13842 @vindex nnmail-split-hook
13843 @item nnmail-split-hook
13844 @findex gnus-article-decode-encoded-words
13845 @cindex RFC 1522 decoding
13846 @cindex RFC 2047 decoding
13847 Hook run in the buffer where the mail headers of each message is kept
13848 just before the splitting based on these headers is done.  The hook is
13849 free to modify the buffer contents in any way it sees fit---the buffer
13850 is discarded after the splitting has been done, and no changes performed
13851 in the buffer will show up in any files.
13852 @code{gnus-article-decode-encoded-words} is one likely function to add
13853 to this hook.
13854
13855 @vindex nnmail-pre-get-new-mail-hook
13856 @vindex nnmail-post-get-new-mail-hook
13857 @item nnmail-pre-get-new-mail-hook
13858 @itemx nnmail-post-get-new-mail-hook
13859 These are two useful hooks executed when treating new incoming
13860 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13861 starting to handle the new mail) and
13862 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13863 is done).  Here's and example of using these two hooks to change the
13864 default file modes the new mail files get:
13865
13866 @lisp
13867 (add-hook 'nnmail-pre-get-new-mail-hook
13868           (lambda () (set-default-file-modes 511)))
13869
13870 (add-hook 'nnmail-post-get-new-mail-hook
13871           (lambda () (set-default-file-modes 551)))
13872 @end lisp
13873
13874 @item nnmail-use-long-file-names
13875 @vindex nnmail-use-long-file-names
13876 If non-@code{nil}, the mail back ends will use long file and directory
13877 names.  Groups like @samp{mail.misc} will end up in directories
13878 (assuming use of @code{nnml} back end) or files (assuming use of
13879 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13880 the same group will end up in @file{mail/misc}.
13881
13882 @item nnmail-delete-file-function
13883 @vindex nnmail-delete-file-function
13884 @findex delete-file
13885 Function called to delete files.  It is @code{delete-file} by default.
13886
13887 @item nnmail-cache-accepted-message-ids
13888 @vindex nnmail-cache-accepted-message-ids
13889 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13890 the back end (via @code{Gcc}, for instance) into the mail duplication
13891 discovery cache.  The default is @code{nil}.
13892
13893 @item nnmail-cache-ignore-groups
13894 @vindex nnmail-cache-ignore-groups
13895 This can be a regular expression or a list of regular expressions.
13896 Group names that match any of the regular expressions will never be
13897 recorded in the @code{Message-ID} cache.
13898
13899 This can be useful, for example, when using Fancy Splitting
13900 (@pxref{Fancy Mail Splitting}) together with the function
13901 @code{nnmail-split-fancy-with-parent}.
13902
13903 @end table
13904
13905
13906 @node Fancy Mail Splitting
13907 @subsection Fancy Mail Splitting
13908 @cindex mail splitting
13909 @cindex fancy mail splitting
13910
13911 @vindex nnmail-split-fancy
13912 @findex nnmail-split-fancy
13913 If the rather simple, standard method for specifying how to split mail
13914 doesn't allow you to do what you want, you can set
13915 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13916 play with the @code{nnmail-split-fancy} variable.
13917
13918 Let's look at an example value of this variable first:
13919
13920 @lisp
13921 ;; @r{Messages from the mailer daemon are not crossposted to any of}
13922 ;; @r{the ordinary groups.  Warnings are put in a separate group}
13923 ;; @r{from real errors.}
13924 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13925                    "mail.misc"))
13926    ;; @r{Non-error messages are crossposted to all relevant}
13927    ;; @r{groups, but we don't crosspost between the group for the}
13928    ;; @r{(ding) list and the group for other (ding) related mail.}
13929    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13930          ("subject" "ding" "ding.misc"))
13931       ;; @r{Other mailing lists@dots{}}
13932       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13933       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13934       ;; @r{Both lists below have the same suffix, so prevent}
13935       ;; @r{cross-posting to mkpkg.list of messages posted only to}
13936       ;; @r{the bugs- list, but allow cross-posting when the}
13937       ;; @r{message was really cross-posted.}
13938       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13939       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13940       ;; @r{People@dots{}}
13941       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13942    ;; @r{Unmatched mail goes to the catch all group.}
13943    "misc.misc")
13944 @end lisp
13945
13946 This variable has the format of a @dfn{split}.  A split is a
13947 (possibly) recursive structure where each split may contain other
13948 splits.  Here are the possible split syntaxes:
13949
13950 @table @code
13951
13952 @item group 
13953 If the split is a string, that will be taken as a group name.  Normal
13954 regexp match expansion will be done.  See below for examples.
13955
13956 @item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split})
13957 If the split is a list, the first element of which is a string, then
13958 store the message as specified by @var{split}, if header @var{field}
13959 (a regexp) contains @var{value} (also a regexp).  If @var{restrict}
13960 (yet another regexp) matches some string after @var{field} and before
13961 the end of the matched @var{value}, the @var{split} is ignored.  If
13962 none of the @var{restrict} clauses match, @var{split} is processed.
13963
13964 @item (| @var{split} @dots{})
13965 If the split is a list, and the first element is @code{|} (vertical
13966 bar), then process each @var{split} until one of them matches.  A
13967 @var{split} is said to match if it will cause the mail message to be
13968 stored in one or more groups.
13969
13970 @item (& @var{split} @dots{})
13971 If the split is a list, and the first element is @code{&}, then
13972 process all @var{split}s in the list.
13973
13974 @item junk
13975 If the split is the symbol @code{junk}, then don't save (i.e., delete)
13976 this message.  Use with extreme caution.
13977
13978 @item (: @var{function} @var{arg1} @var{arg2} @dots{})
13979 If the split is a list, and the first element is @samp{:}, then the
13980 second element will be called as a function with @var{args} given as
13981 arguments.  The function should return a @var{split}.
13982
13983 @cindex body split
13984 For instance, the following function could be used to split based on the
13985 body of the messages:
13986
13987 @lisp
13988 (defun split-on-body ()
13989   (save-excursion
13990     (save-restriction
13991       (widen)
13992       (goto-char (point-min))
13993       (when (re-search-forward "Some.*string" nil t)
13994         "string.group"))))
13995 @end lisp
13996
13997 The buffer is narrowed to the message in question when @var{function}
13998 is run.  That's why @code{(widen)} needs to be called after
13999 @code{save-excursion} and @code{save-restriction} in the example
14000 above.  Also note that with the nnimap backend, message bodies will
14001 not be downloaded by default.  You need to set
14002 @code{nnimap-split-download-body} to @code{t} to do that
14003 (@pxref{Splitting in IMAP}).
14004
14005 @item (! @var{func} @var{split})
14006 If the split is a list, and the first element is @code{!}, then
14007 @var{split} will be processed, and @var{func} will be called as a
14008 function with the result of @var{split} as argument.  @var{func}
14009 should return a split.
14010
14011 @item nil
14012 If the split is @code{nil}, it is ignored.
14013
14014 @end table
14015
14016 In these splits, @var{field} must match a complete field name.
14017 @var{value} must match a complete word according to the fundamental mode
14018 syntax table.  You can use @code{.*} in the regexps to match partial
14019 field names or words.  In other words, all @var{value}'s are wrapped in
14020 @samp{\<} and @samp{\>} pairs.
14021
14022 @vindex nnmail-split-abbrev-alist
14023 @var{field} and @var{value} can also be Lisp symbols, in that case
14024 they are expanded as specified by the variable
14025 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells,
14026 where the @sc{car} of a cell contains the key, and the @sc{cdr}
14027 contains the associated value.  Predefined entries in
14028 @code{nnmail-split-abbrev-alist} include:
14029
14030 @table @code
14031 @item from
14032 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
14033 @item to
14034 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
14035 @samp{Resent-To} and @samp{Resent-Cc} fields.
14036 @item any
14037 Is the union of the @code{from} and @code{to} entries.
14038 @end table
14039
14040 @vindex nnmail-split-fancy-syntax-table
14041 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
14042 when all this splitting is performed.
14043
14044 If you want to have Gnus create groups dynamically based on some
14045 information in the headers (i.e., do @code{replace-match}-like
14046 substitutions in the group names), you can say things like:
14047
14048 @example
14049 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
14050 @end example
14051
14052 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
14053 will be filed in @samp{mail.debian.foo}.
14054
14055 If the string contains the element @samp{\&}, then the previously
14056 matched string will be substituted.  Similarly, the elements @samp{\\1}
14057 up to @samp{\\9} will be substituted with the text matched by the
14058 groupings 1 through 9.
14059
14060 @vindex nnmail-split-fancy-match-partial-words
14061 @code{nnmail-split-fancy-match-partial-words} controls whether partial
14062 words are matched during fancy splitting.
14063
14064 Normally, regular expressions given in @code{nnmail-split-fancy} are
14065 implicitly surrounded by @code{\<...\>} markers, which are word
14066 delimiters.  If this variable is true, they are not implicitly
14067 surrounded by anything.
14068
14069 @example
14070 (any "joe" "joemail")
14071 @end example
14072
14073 In this example, messages sent from @samp{joedavis@@foo.org} will
14074 normally not be filed in @samp{joemail}.  With
14075 @code{nnmail-split-fancy-match-partial-words} set to t, however, the
14076 match will happen.  In effect, the requirement of a word boundary is
14077 removed and instead the match becomes more like a grep.
14078
14079 @findex nnmail-split-fancy-with-parent
14080 @code{nnmail-split-fancy-with-parent} is a function which allows you to
14081 split followups into the same groups their parents are in.  Sometimes
14082 you can't make splitting rules for all your mail.  For example, your
14083 boss might send you personal mail regarding different projects you are
14084 working on, and as you can't tell your boss to put a distinguishing
14085 string into the subject line, you have to resort to manually moving the
14086 messages into the right group.  With this function, you only have to do
14087 it once per thread.
14088
14089 To use this feature, you have to set @code{nnmail-treat-duplicates}
14090 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
14091 value.  And then you can include @code{nnmail-split-fancy-with-parent}
14092 using the colon feature, like so:
14093 @lisp
14094 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
14095       nnmail-cache-accepted-message-ids t
14096       nnmail-split-fancy
14097       '(| (: nnmail-split-fancy-with-parent)
14098           ;; @r{other splits go here}
14099         ))
14100 @end lisp
14101
14102 This feature works as follows: when @code{nnmail-treat-duplicates} is
14103 non-@code{nil}, Gnus records the message id of every message it sees
14104 in the file specified by the variable
14105 @code{nnmail-message-id-cache-file}, together with the group it is in
14106 (the group is omitted for non-mail messages).  When mail splitting is
14107 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
14108 at the References (and In-Reply-To) header of each message to split
14109 and searches the file specified by @code{nnmail-message-id-cache-file}
14110 for the message ids.  When it has found a parent, it returns the
14111 corresponding group name unless the group name matches the regexp
14112 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
14113 recommended that you set @code{nnmail-message-id-cache-length} to a
14114 somewhat higher number than the default so that the message ids are
14115 still in the cache.  (A value of 5000 appears to create a file some
14116 300 kBytes in size.)
14117 @vindex nnmail-cache-accepted-message-ids
14118 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
14119 also records the message ids of moved articles, so that the followup
14120 messages goes into the new group.
14121
14122 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
14123 want certain groups to be recorded in the cache.  For example, if all
14124 outgoing messages are written to an ``outgoing'' group, you could set
14125 @code{nnmail-cache-ignore-groups} to match that group name.
14126 Otherwise, answers to all your messages would end up in the
14127 ``outgoing'' group.
14128
14129
14130 @node Group Mail Splitting
14131 @subsection Group Mail Splitting
14132 @cindex mail splitting
14133 @cindex group mail splitting
14134
14135 @findex gnus-group-split
14136 If you subscribe to dozens of mailing lists but you don't want to
14137 maintain mail splitting rules manually, group mail splitting is for you.
14138 You just have to set @code{to-list} and/or @code{to-address} in group
14139 parameters or group customization and set @code{nnmail-split-methods} to
14140 @code{gnus-group-split}.  This splitting function will scan all groups
14141 for those parameters and split mail accordingly, i.e., messages posted
14142 from or to the addresses specified in the parameters @code{to-list} or
14143 @code{to-address} of a mail group will be stored in that group.
14144
14145 Sometimes, mailing lists have multiple addresses, and you may want mail
14146 splitting to recognize them all: just set the @code{extra-aliases} group
14147 parameter to the list of additional addresses and it's done.  If you'd
14148 rather use a regular expression, set @code{split-regexp}.
14149
14150 All these parameters in a group will be used to create an
14151 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
14152 the @var{value} is a single regular expression that matches
14153 @code{to-list}, @code{to-address}, all of @code{extra-aliases} and all
14154 matches of @code{split-regexp}, and the @var{split} is the name of the
14155 group.  @var{restrict}s are also supported: just set the
14156 @code{split-exclude} parameter to a list of regular expressions.
14157
14158 If you can't get the right split to be generated using all these
14159 parameters, or you just need something fancier, you can set the
14160 parameter @code{split-spec} to an @code{nnmail-split-fancy} split.  In
14161 this case, all other aforementioned parameters will be ignored by
14162 @code{gnus-group-split}.  In particular, @code{split-spec} may be set to
14163 @code{nil}, in which case the group will be ignored by
14164 @code{gnus-group-split}.
14165
14166 @vindex gnus-group-split-default-catch-all-group
14167 @code{gnus-group-split} will do cross-posting on all groups that match,
14168 by defining a single @code{&} fancy split containing one split for each
14169 group.  If a message doesn't match any split, it will be stored in the
14170 group named in @code{gnus-group-split-default-catch-all-group}, unless
14171 some group has @code{split-spec} set to @code{catch-all}, in which case
14172 that group is used as the catch-all group.  Even though this variable is
14173 often used just to name a group, it may also be set to an arbitrarily
14174 complex fancy split (after all, a group name is a fancy split), and this
14175 may be useful to split mail that doesn't go to any mailing list to
14176 personal mail folders.  Note that this fancy split is added as the last
14177 element of a @code{|} split list that also contains a @code{&} split
14178 with the rules extracted from group parameters.
14179
14180 It's time for an example.  Assume the following group parameters have
14181 been defined:
14182
14183 @example
14184 nnml:mail.bar:
14185 ((to-address . "bar@@femail.com")
14186  (split-regexp . ".*@@femail\\.com"))
14187 nnml:mail.foo:
14188 ((to-list . "foo@@nowhere.gov")
14189  (extra-aliases "foo@@localhost" "foo-redist@@home")
14190  (split-exclude "bugs-foo" "rambling-foo")
14191  (admin-address . "foo-request@@nowhere.gov"))
14192 nnml:mail.others:
14193 ((split-spec . catch-all))
14194 @end example
14195
14196 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
14197 behave as if @code{nnmail-split-fancy} had been selected and variable
14198 @code{nnmail-split-fancy} had been set as follows:
14199
14200 @lisp
14201 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
14202       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
14203            - "bugs-foo" - "rambling-foo" "mail.foo"))
14204    "mail.others")
14205 @end lisp
14206
14207 @findex gnus-group-split-fancy
14208 If you'd rather not use group splitting for all your mail groups, you
14209 may use it for only some of them, by using @code{nnmail-split-fancy}
14210 splits like this:
14211
14212 @lisp
14213 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
14214 @end lisp
14215
14216 @var{groups} may be a regular expression or a list of group names whose
14217 parameters will be scanned to generate the output split.
14218 @var{no-crosspost} can be used to disable cross-posting; in this case, a
14219 single @code{|} split will be output.  @var{catch-all} is the fall back
14220 fancy split, used like @code{gnus-group-split-default-catch-all-group}.
14221 If @var{catch-all} is @code{nil}, or if @code{split-regexp} matches the
14222 empty string in any selected group, no catch-all split will be issued.
14223 Otherwise, if some group has @code{split-spec} set to @code{catch-all},
14224 this group will override the value of the @var{catch-all} argument.
14225
14226 @findex gnus-group-split-setup
14227 Unfortunately, scanning all groups and their parameters can be quite
14228 slow, especially considering that it has to be done for every message.
14229 But don't despair!  The function @code{gnus-group-split-setup} can be
14230 used to enable @code{gnus-group-split} in a much more efficient way.  It
14231 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
14232 @code{nnmail-split-fancy} to the split produced by
14233 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
14234 scanned once, no matter how many messages are split.
14235
14236 @findex gnus-group-split-update
14237 However, if you change group parameters, you'd have to update
14238 @code{nnmail-split-fancy} manually.  You can do it by running
14239 @code{gnus-group-split-update}.  If you'd rather have it updated
14240 automatically, just tell @code{gnus-group-split-setup} to do it for
14241 you.  For example, add to your @file{~/.gnus.el}:
14242
14243 @lisp
14244 (gnus-group-split-setup @var{auto-update} @var{catch-all})
14245 @end lisp
14246
14247 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
14248 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
14249 have to worry about updating @code{nnmail-split-fancy} again.  If you
14250 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
14251 @code{gnus-group-split-default-catch-all-group} will be set to its
14252 value.
14253
14254 @vindex gnus-group-split-updated-hook
14255 Because you may want to change @code{nnmail-split-fancy} after it is set
14256 by @code{gnus-group-split-update}, this function will run
14257 @code{gnus-group-split-updated-hook} just before finishing.
14258
14259 @node Incorporating Old Mail
14260 @subsection Incorporating Old Mail
14261 @cindex incorporating old mail
14262 @cindex import old mail
14263
14264 Most people have lots of old mail stored in various file formats.  If
14265 you have set up Gnus to read mail using one of the spiffy Gnus mail
14266 back ends, you'll probably wish to have that old mail incorporated into
14267 your mail groups.
14268
14269 Doing so can be quite easy.
14270
14271 To take an example: You're reading mail using @code{nnml}
14272 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
14273 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
14274 file filled with important, but old, mail.  You want to move it into
14275 your @code{nnml} groups.
14276
14277 Here's how:
14278
14279 @enumerate
14280 @item
14281 Go to the group buffer.
14282
14283 @item
14284 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
14285 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
14286
14287 @item
14288 Type @kbd{SPACE} to enter the newly created group.
14289
14290 @item
14291 Type @kbd{M P b} to process-mark all articles in this group's buffer
14292 (@pxref{Setting Process Marks}).
14293
14294 @item
14295 Type @kbd{B r} to respool all the process-marked articles, and answer
14296 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
14297 @end enumerate
14298
14299 All the mail messages in the mbox file will now also be spread out over
14300 all your @code{nnml} groups.  Try entering them and check whether things
14301 have gone without a glitch.  If things look ok, you may consider
14302 deleting the mbox file, but I wouldn't do that unless I was absolutely
14303 sure that all the mail has ended up where it should be.
14304
14305 Respooling is also a handy thing to do if you're switching from one mail
14306 back end to another.  Just respool all the mail in the old mail groups
14307 using the new mail back end.
14308
14309
14310 @node Expiring Mail
14311 @subsection Expiring Mail
14312 @cindex article expiry
14313
14314 Traditional mail readers have a tendency to remove mail articles when
14315 you mark them as read, in some way.  Gnus takes a fundamentally
14316 different approach to mail reading.
14317
14318 Gnus basically considers mail just to be news that has been received in
14319 a rather peculiar manner.  It does not think that it has the power to
14320 actually change the mail, or delete any mail messages.  If you enter a
14321 mail group, and mark articles as ``read'', or kill them in some other
14322 fashion, the mail articles will still exist on the system.  I repeat:
14323 Gnus will not delete your old, read mail.  Unless you ask it to, of
14324 course.
14325
14326 To make Gnus get rid of your unwanted mail, you have to mark the
14327 articles as @dfn{expirable}.  (With the default key bindings, this means
14328 that you have to type @kbd{E}.)  This does not mean that the articles
14329 will disappear right away, however.  In general, a mail article will be
14330 deleted from your system if, 1) it is marked as expirable, AND 2) it is
14331 more than one week old.  If you do not mark an article as expirable, it
14332 will remain on your system until hell freezes over.  This bears
14333 repeating one more time, with some spurious capitalizations: IF you do
14334 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
14335
14336 You do not have to mark articles as expirable by hand.  Gnus provides
14337 two features, called ``auto-expire'' and ``total-expire'', that can help you
14338 with this.  In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
14339 for you when you select an article.  And ``total-expire'' means that Gnus
14340 considers all articles as expirable that are read.  So, in addition to
14341 the articles marked @samp{E}, also the articles marked @samp{r},
14342 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
14343 expirable.
14344
14345 When should either auto-expire or total-expire be used?  Most people
14346 who are subscribed to mailing lists split each list into its own group
14347 and then turn on auto-expire or total-expire for those groups.
14348 (@xref{Splitting Mail}, for more information on splitting each list
14349 into its own group.)
14350
14351 Which one is better, auto-expire or total-expire?  It's not easy to
14352 answer.  Generally speaking, auto-expire is probably faster.  Another
14353 advantage of auto-expire is that you get more marks to work with: for
14354 the articles that are supposed to stick around, you can still choose
14355 between tick and dormant and read marks.  But with total-expire, you
14356 only have dormant and ticked to choose from.  The advantage of
14357 total-expire is that it works well with adaptive scoring (@pxref{Adaptive
14358 Scoring}).  Auto-expire works with normal scoring but not with adaptive
14359 scoring.
14360
14361 @vindex gnus-auto-expirable-newsgroups
14362 Groups that match the regular expression
14363 @code{gnus-auto-expirable-newsgroups} will have all articles that you
14364 read marked as expirable automatically.  All articles marked as
14365 expirable have an @samp{E} in the first column in the summary buffer.
14366
14367 By default, if you have auto expiry switched on, Gnus will mark all the
14368 articles you read as expirable, no matter if they were read or unread
14369 before.  To avoid having articles marked as read marked as expirable
14370 automatically, you can put something like the following in your
14371 @file{~/.gnus.el} file:
14372
14373 @vindex gnus-mark-article-hook
14374 @lisp
14375 (remove-hook 'gnus-mark-article-hook
14376              'gnus-summary-mark-read-and-unread-as-read)
14377 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
14378 @end lisp
14379
14380 Note that making a group auto-expirable doesn't mean that all read
14381 articles are expired---only the articles marked as expirable
14382 will be expired.  Also note that using the @kbd{d} command won't make
14383 articles expirable---only semi-automatic marking of articles as read will
14384 mark the articles as expirable in auto-expirable groups.
14385
14386 Let's say you subscribe to a couple of mailing lists, and you want the
14387 articles you have read to disappear after a while:
14388
14389 @lisp
14390 (setq gnus-auto-expirable-newsgroups
14391       "mail.nonsense-list\\|mail.nice-list")
14392 @end lisp
14393
14394 Another way to have auto-expiry happen is to have the element
14395 @code{auto-expire} in the group parameters of the group.
14396
14397 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
14398 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
14399 don't really mix very well.
14400
14401 @vindex nnmail-expiry-wait
14402 The @code{nnmail-expiry-wait} variable supplies the default time an
14403 expirable article has to live.  Gnus starts counting days from when the
14404 message @emph{arrived}, not from when it was sent.  The default is seven
14405 days.
14406
14407 Gnus also supplies a function that lets you fine-tune how long articles
14408 are to live, based on what group they are in.  Let's say you want to
14409 have one month expiry period in the @samp{mail.private} group, a one day
14410 expiry period in the @samp{mail.junk} group, and a six day expiry period
14411 everywhere else:
14412
14413 @vindex nnmail-expiry-wait-function
14414 @lisp
14415 (setq nnmail-expiry-wait-function
14416       (lambda (group)
14417        (cond ((string= group "mail.private")
14418                31)
14419              ((string= group "mail.junk")
14420                1)
14421              ((string= group "important")
14422                'never)
14423              (t
14424                6))))
14425 @end lisp
14426
14427 The group names this function is fed are ``unadorned'' group
14428 names---no @samp{nnml:} prefixes and the like.
14429
14430 The @code{nnmail-expiry-wait} variable and
14431 @code{nnmail-expiry-wait-function} function can either be a number (not
14432 necessarily an integer) or one of the symbols @code{immediate} or
14433 @code{never}.
14434
14435 You can also use the @code{expiry-wait} group parameter to selectively
14436 change the expiry period (@pxref{Group Parameters}).
14437
14438 @vindex nnmail-expiry-target
14439 The normal action taken when expiring articles is to delete them.
14440 However, in some circumstances it might make more sense to move them
14441 to other groups instead of deleting them.  The variable
14442 @code{nnmail-expiry-target} (and the @code{expiry-target} group
14443 parameter) controls this.  The variable supplies a default value for
14444 all groups, which can be overridden for specific groups by the group
14445 parameter.  default value is @code{delete}, but this can also be a
14446 string (which should be the name of the group the message should be
14447 moved to), or a function (which will be called in a buffer narrowed to
14448 the message in question, and with the name of the group being moved
14449 from as its parameter) which should return a target---either a group
14450 name or @code{delete}.
14451
14452 Here's an example for specifying a group name:
14453 @lisp
14454 (setq nnmail-expiry-target "nnml:expired")
14455 @end lisp
14456
14457 @findex nnmail-fancy-expiry-target
14458 @vindex nnmail-fancy-expiry-targets
14459 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
14460 expire mail to groups according to the variable
14461 @code{nnmail-fancy-expiry-targets}.  Here's an example:
14462
14463 @lisp
14464  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
14465        nnmail-fancy-expiry-targets
14466        '((to-from "boss" "nnfolder:Work")
14467          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
14468          ("from" ".*" "nnfolder:Archive-%Y")))
14469 @end lisp
14470
14471 With this setup, any mail that has @code{IMPORTANT} in its Subject
14472 header and was sent in the year @code{YYYY} and month @code{MMM}, will
14473 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}.  If its
14474 From or To header contains the string @code{boss}, it will get expired
14475 to @code{nnfolder:Work}.  All other mail will get expired to
14476 @code{nnfolder:Archive-YYYY}.
14477
14478 @vindex nnmail-keep-last-article
14479 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
14480 expire the final article in a mail newsgroup.  This is to make life
14481 easier for procmail users.
14482
14483 @vindex gnus-total-expirable-newsgroups
14484 By the way: That line up there, about Gnus never expiring non-expirable
14485 articles, is a lie.  If you put @code{total-expire} in the group
14486 parameters, articles will not be marked as expirable, but all read
14487 articles will be put through the expiry process.  Use with extreme
14488 caution.  Even more dangerous is the
14489 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
14490 this regexp will have all read articles put through the expiry process,
14491 which means that @emph{all} old mail articles in the groups in question
14492 will be deleted after a while.  Use with extreme caution, and don't come
14493 crying to me when you discover that the regexp you used matched the
14494 wrong group and all your important mail has disappeared.  Be a
14495 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
14496 with!  So there!
14497
14498 Most people make most of their mail groups total-expirable, though.
14499
14500 @vindex gnus-inhibit-user-auto-expire
14501 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
14502 commands will not mark an article as expirable, even if the group has
14503 auto-expire turned on.
14504
14505
14506 @node Washing Mail
14507 @subsection Washing Mail
14508 @cindex mail washing
14509 @cindex list server brain damage
14510 @cindex incoming mail treatment
14511
14512 Mailers and list servers are notorious for doing all sorts of really,
14513 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
14514 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
14515 end of all lines passing through our server, so let's do that!!!!1!''
14516 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
14517 considered to be self-evident were not discussed.  So.  Here we are.
14518
14519 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
14520 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
14521 be shocked and dismayed by this, but I haven't got the energy.  It is to
14522 laugh.
14523
14524 Gnus provides a plethora of functions for washing articles while
14525 displaying them, but it might be nicer to do the filtering before
14526 storing the mail to disk.  For that purpose, we have three hooks and
14527 various functions that can be put in these hooks.
14528
14529 @table @code
14530 @item nnmail-prepare-incoming-hook
14531 @vindex nnmail-prepare-incoming-hook
14532 This hook is called before doing anything with the mail and is meant for
14533 grand, sweeping gestures.  It is called in a buffer that contains all
14534 the new, incoming mail.  Functions to be used include:
14535
14536 @table @code
14537 @item nnheader-ms-strip-cr
14538 @findex nnheader-ms-strip-cr
14539 Remove trailing carriage returns from each line.  This is default on
14540 Emacs running on MS machines.
14541
14542 @end table
14543
14544 @item nnmail-prepare-incoming-header-hook
14545 @vindex nnmail-prepare-incoming-header-hook
14546 This hook is called narrowed to each header.  It can be used when
14547 cleaning up the headers.  Functions that can be used include:
14548
14549 @table @code
14550 @item nnmail-remove-leading-whitespace
14551 @findex nnmail-remove-leading-whitespace
14552 Clear leading white space that ``helpful'' listservs have added to the
14553 headers to make them look nice.  Aaah.
14554
14555 (Note that this function works on both the header on the body of all
14556 messages, so it is a potentially dangerous function to use (if a body
14557 of a message contains something that looks like a header line).  So
14558 rather than fix the bug, it is of course the right solution to make it
14559 into a feature by documenting it.)
14560
14561 @item nnmail-remove-list-identifiers
14562 @findex nnmail-remove-list-identifiers
14563 Some list servers add an identifier---for example, @samp{(idm)}---to the
14564 beginning of all @code{Subject} headers.  I'm sure that's nice for
14565 people who use stone age mail readers.  This function will remove
14566 strings that match the @code{nnmail-list-identifiers} regexp, which can
14567 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
14568 @code{\\(..\\)}.
14569
14570 For instance, if you want to remove the @samp{(idm)} and the
14571 @samp{nagnagnag} identifiers:
14572
14573 @lisp
14574 (setq nnmail-list-identifiers
14575       '("(idm)" "nagnagnag"))
14576 @end lisp
14577
14578 This can also be done non-destructively with
14579 @code{gnus-list-identifiers}, @xref{Article Hiding}.
14580
14581 @item nnmail-remove-tabs
14582 @findex nnmail-remove-tabs
14583 Translate all @samp{TAB} characters into @samp{SPACE} characters.
14584
14585 @item nnmail-fix-eudora-headers
14586 @findex nnmail-fix-eudora-headers
14587 @cindex Eudora
14588 Eudora produces broken @code{References} headers, but OK
14589 @code{In-Reply-To} headers.  This function will get rid of the
14590 @code{References} headers.
14591
14592 @end table
14593
14594 @item nnmail-prepare-incoming-message-hook
14595 @vindex nnmail-prepare-incoming-message-hook
14596 This hook is called narrowed to each message.  Functions to be used
14597 include:
14598
14599 @table @code
14600 @item article-de-quoted-unreadable
14601 @findex article-de-quoted-unreadable
14602 Decode Quoted Readable encoding.
14603
14604 @end table
14605 @end table
14606
14607
14608 @node Duplicates
14609 @subsection Duplicates
14610
14611 @vindex nnmail-treat-duplicates
14612 @vindex nnmail-message-id-cache-length
14613 @vindex nnmail-message-id-cache-file
14614 @cindex duplicate mails
14615 If you are a member of a couple of mailing lists, you will sometimes
14616 receive two copies of the same mail.  This can be quite annoying, so
14617 @code{nnmail} checks for and treats any duplicates it might find.  To do
14618 this, it keeps a cache of old @code{Message-ID}s---
14619 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
14620 default.  The approximate maximum number of @code{Message-ID}s stored
14621 there is controlled by the @code{nnmail-message-id-cache-length}
14622 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
14623 stored.) If all this sounds scary to you, you can set
14624 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14625 default), and @code{nnmail} won't delete duplicate mails.  Instead it
14626 will insert a warning into the head of the mail saying that it thinks
14627 that this is a duplicate of a different message.
14628
14629 This variable can also be a function.  If that's the case, the function
14630 will be called from a buffer narrowed to the message in question with
14631 the @code{Message-ID} as a parameter.  The function must return either
14632 @code{nil}, @code{warn}, or @code{delete}.
14633
14634 You can turn this feature off completely by setting the variable to
14635 @code{nil}.
14636
14637 If you want all the duplicate mails to be put into a special
14638 @dfn{duplicates} group, you could do that using the normal mail split
14639 methods:
14640
14641 @lisp
14642 (setq nnmail-split-fancy
14643       '(| ;; @r{Messages duplicates go to a separate group.}
14644         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14645         ;; @r{Message from daemons, postmaster, and the like to another.}
14646         (any mail "mail.misc")
14647         ;; @r{Other rules.}
14648         [...] ))
14649 @end lisp
14650 @noindent
14651 Or something like:
14652 @lisp
14653 (setq nnmail-split-methods
14654       '(("duplicates" "^Gnus-Warning:.*duplicate")
14655         ;; @r{Other rules.}
14656         [...]))
14657 @end lisp
14658
14659 Here's a neat feature: If you know that the recipient reads her mail
14660 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14661 @code{delete}, you can send her as many insults as you like, just by
14662 using a @code{Message-ID} of a mail that you know that she's already
14663 received.  Think of all the fun!  She'll never see any of it!  Whee!
14664
14665
14666 @node Not Reading Mail
14667 @subsection Not Reading Mail
14668
14669 If you start using any of the mail back ends, they have the annoying
14670 habit of assuming that you want to read mail with them.  This might not
14671 be unreasonable, but it might not be what you want.
14672
14673 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14674 @code{nil}, none of the back ends will ever attempt to read incoming
14675 mail, which should help.
14676
14677 @vindex nnbabyl-get-new-mail
14678 @vindex nnmbox-get-new-mail
14679 @vindex nnml-get-new-mail
14680 @vindex nnmh-get-new-mail
14681 @vindex nnfolder-get-new-mail
14682 This might be too much, if, for instance, you are reading mail quite
14683 happily with @code{nnml} and just want to peek at some old Rmail
14684 file you have stashed away with @code{nnbabyl}.  All back ends have
14685 variables called back-end-@code{get-new-mail}.  If you want to disable
14686 the @code{nnbabyl} mail reading, you edit the virtual server for the
14687 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14688
14689 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14690 narrowed to the article to be saved before saving it when reading
14691 incoming mail.
14692
14693
14694 @node Choosing a Mail Back End
14695 @subsection Choosing a Mail Back End
14696
14697 Gnus will read the mail spool when you activate a mail group.  The mail
14698 file is first copied to your home directory.  What happens after that
14699 depends on what format you want to store your mail in.
14700
14701 There are six different mail back ends in the standard Gnus, and more
14702 back ends are available separately.  The mail back end most people use
14703 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14704 Spool}).
14705
14706 @menu
14707 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14708 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
14709 * Mail Spool::                  Store your mail in a private spool?
14710 * MH Spool::                    An mhspool-like back end.
14711 * Maildir::                     Another one-file-per-message format.
14712 * Mail Folders::                Having one file for each group.
14713 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14714 @end menu
14715
14716
14717 @node Unix Mail Box
14718 @subsubsection Unix Mail Box
14719 @cindex nnmbox
14720 @cindex unix mail box
14721
14722 @vindex nnmbox-active-file
14723 @vindex nnmbox-mbox-file
14724 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14725 mail.  @code{nnmbox} will add extra headers to each mail article to say
14726 which group it belongs in.
14727
14728 Virtual server settings:
14729
14730 @table @code
14731 @item nnmbox-mbox-file
14732 @vindex nnmbox-mbox-file
14733 The name of the mail box in the user's home directory.  Default is
14734 @file{~/mbox}.
14735
14736 @item nnmbox-active-file
14737 @vindex nnmbox-active-file
14738 The name of the active file for the mail box.  Default is
14739 @file{~/.mbox-active}.
14740
14741 @item nnmbox-get-new-mail
14742 @vindex nnmbox-get-new-mail
14743 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14744 into groups.  Default is @code{t}.
14745 @end table
14746
14747
14748 @node Rmail Babyl
14749 @subsubsection Rmail Babyl
14750 @cindex nnbabyl
14751 @cindex Rmail mbox
14752
14753 @vindex nnbabyl-active-file
14754 @vindex nnbabyl-mbox-file
14755 The @dfn{nnbabyl} back end will use a Babyl mail box (aka. @dfn{Rmail
14756 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14757 mail article to say which group it belongs in.
14758
14759 Virtual server settings:
14760
14761 @table @code
14762 @item nnbabyl-mbox-file
14763 @vindex nnbabyl-mbox-file
14764 The name of the Rmail mbox file.  The default is @file{~/RMAIL}
14765
14766 @item nnbabyl-active-file
14767 @vindex nnbabyl-active-file
14768 The name of the active file for the rmail box.  The default is
14769 @file{~/.rmail-active}
14770
14771 @item nnbabyl-get-new-mail
14772 @vindex nnbabyl-get-new-mail
14773 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14774 @code{t}
14775 @end table
14776
14777
14778 @node Mail Spool
14779 @subsubsection Mail Spool
14780 @cindex nnml
14781 @cindex mail @acronym{NOV} spool
14782
14783 The @dfn{nnml} spool mail format isn't compatible with any other known
14784 format.  It should be used with some caution.
14785
14786 @vindex nnml-directory
14787 If you use this back end, Gnus will split all incoming mail into files,
14788 one file for each mail, and put the articles into the corresponding
14789 directories under the directory specified by the @code{nnml-directory}
14790 variable.  The default value is @file{~/Mail/}.
14791
14792 You do not have to create any directories beforehand; Gnus will take
14793 care of all that.
14794
14795 If you have a strict limit as to how many files you are allowed to store
14796 in your account, you should not use this back end.  As each mail gets its
14797 own file, you might very well occupy thousands of inodes within a few
14798 weeks.  If this is no problem for you, and it isn't a problem for you
14799 having your friendly systems administrator walking around, madly,
14800 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14801 know that this is probably the fastest format to use.  You do not have
14802 to trudge through a big mbox file just to read your new mail.
14803
14804 @code{nnml} is probably the slowest back end when it comes to article
14805 splitting.  It has to create lots of files, and it also generates
14806 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
14807 fastest back end when it comes to reading mail.
14808
14809 @cindex self contained nnml servers
14810 @cindex marks
14811 When the marks file is used (which it is by default), @code{nnml}
14812 servers have the property that you may backup them using @code{tar} or
14813 similar, and later be able to restore them into Gnus (by adding the
14814 proper @code{nnml} server) and have all your marks be preserved.  Marks
14815 for a group is usually stored in the @code{.marks} file (but see
14816 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14817 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14818 to restore the group (after restoring the backup into the nnml
14819 directory).
14820
14821 If for some reason you believe your @file{.marks} files are screwed
14822 up, you can just delete them all.  Gnus will then correctly regenerate
14823 them next time it starts.
14824
14825 Virtual server settings:
14826
14827 @table @code
14828 @item nnml-directory
14829 @vindex nnml-directory
14830 All @code{nnml} directories will be placed under this directory.  The
14831 default is the value of @code{message-directory} (whose default value
14832 is @file{~/Mail}).
14833
14834 @item nnml-active-file
14835 @vindex nnml-active-file
14836 The active file for the @code{nnml} server.  The default is
14837 @file{~/Mail/active}.
14838
14839 @item nnml-newsgroups-file
14840 @vindex nnml-newsgroups-file
14841 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14842 Format}.  The default is @file{~/Mail/newsgroups}.
14843
14844 @item nnml-get-new-mail
14845 @vindex nnml-get-new-mail
14846 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14847 @code{t}.
14848
14849 @item nnml-nov-is-evil
14850 @vindex nnml-nov-is-evil
14851 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
14852 default is @code{nil}.
14853
14854 @item nnml-nov-file-name
14855 @vindex nnml-nov-file-name
14856 The name of the @acronym{NOV} files.  The default is @file{.overview}.
14857
14858 @item nnml-prepare-save-mail-hook
14859 @vindex nnml-prepare-save-mail-hook
14860 Hook run narrowed to an article before saving.
14861
14862 @item nnml-marks-is-evil
14863 @vindex nnml-marks-is-evil
14864 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14865 default is @code{nil}.
14866
14867 @item nnml-marks-file-name
14868 @vindex nnml-marks-file-name
14869 The name of the @dfn{marks} files.  The default is @file{.marks}.
14870
14871 @item nnml-use-compressed-files
14872 @vindex nnml-use-compressed-files
14873 If non-@code{nil}, @code{nnml} will allow using compressed message
14874 files.
14875
14876 @end table
14877
14878 @findex nnml-generate-nov-databases
14879 If your @code{nnml} groups and @acronym{NOV} files get totally out of
14880 whack, you can do a complete update by typing @kbd{M-x
14881 nnml-generate-nov-databases}.  This command will trawl through the
14882 entire @code{nnml} hierarchy, looking at each and every article, so it
14883 might take a while to complete.  A better interface to this
14884 functionality can be found in the server buffer (@pxref{Server
14885 Commands}).
14886
14887
14888 @node MH Spool
14889 @subsubsection MH Spool
14890 @cindex nnmh
14891 @cindex mh-e mail spool
14892
14893 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
14894 @acronym{NOV} databases and it doesn't keep an active file or marks
14895 file.  This makes @code{nnmh} a @emph{much} slower back end than
14896 @code{nnml}, but it also makes it easier to write procmail scripts
14897 for.
14898
14899 Virtual server settings:
14900
14901 @table @code
14902 @item nnmh-directory
14903 @vindex nnmh-directory
14904 All @code{nnmh} directories will be located under this directory.  The
14905 default is the value of @code{message-directory} (whose default is
14906 @file{~/Mail})
14907
14908 @item nnmh-get-new-mail
14909 @vindex nnmh-get-new-mail
14910 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
14911 @code{t}.
14912
14913 @item nnmh-be-safe
14914 @vindex nnmh-be-safe
14915 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
14916 sure that the articles in the folder are actually what Gnus thinks
14917 they are.  It will check date stamps and stat everything in sight, so
14918 setting this to @code{t} will mean a serious slow-down.  If you never
14919 use anything but Gnus to read the @code{nnmh} articles, you do not
14920 have to set this variable to @code{t}.  The default is @code{nil}.
14921 @end table
14922
14923
14924 @node Maildir
14925 @subsubsection Maildir
14926 @cindex nnmaildir
14927 @cindex maildir
14928
14929 @code{nnmaildir} stores mail in the maildir format, with each maildir
14930 corresponding to a group in Gnus.  This format is documented here:
14931 @uref{http://cr.yp.to/proto/maildir.html} and here:
14932 @uref{http://www.qmail.org/man/man5/maildir.html}.  @code{nnmaildir}
14933 also stores extra information in the @file{.nnmaildir/} directory
14934 within a maildir.
14935
14936 Maildir format was designed to allow concurrent deliveries and
14937 reading, without needing locks.  With other back ends, you would have
14938 your mail delivered to a spool of some kind, and then you would
14939 configure Gnus to split mail from that spool into your groups.  You
14940 can still do that with @code{nnmaildir}, but the more common
14941 configuration is to have your mail delivered directly to the maildirs
14942 that appear as group in Gnus.
14943
14944 @code{nnmaildir} is designed to be perfectly reliable: @kbd{C-g} will
14945 never corrupt its data in memory, and @code{SIGKILL} will never
14946 corrupt its data in the filesystem.
14947
14948 @code{nnmaildir} stores article marks and @acronym{NOV} data in each
14949 maildir.  So you can copy a whole maildir from one Gnus setup to
14950 another, and you will keep your marks.
14951
14952 Virtual server settings:
14953
14954 @table @code
14955 @item directory
14956 For each of your @code{nnmaildir} servers (it's very unlikely that
14957 you'd need more than one), you need to create a directory and populate
14958 it with maildirs or symlinks to maildirs (and nothing else; do not
14959 choose a directory already used for other purposes).  Each maildir
14960 will be represented in Gnus as a newsgroup on that server; the
14961 filename of the symlink will be the name of the group.  Any filenames
14962 in the directory starting with @samp{.} are ignored.  The directory is
14963 scanned when you first start Gnus, and each time you type @kbd{g} in
14964 the group buffer; if any maildirs have been removed or added,
14965 @code{nnmaildir} notices at these times.
14966
14967 The value of the @code{directory} parameter should be a Lisp form
14968 which is processed by @code{eval} and @code{expand-file-name} to get
14969 the path of the directory for this server.  The form is @code{eval}ed
14970 only when the server is opened; the resulting string is used until the
14971 server is closed.  (If you don't know about forms and @code{eval},
14972 don't worry---a simple string will work.)  This parameter is not
14973 optional; you must specify it.  I don't recommend using
14974 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
14975 use that directory by default for various things, and may get confused
14976 if @code{nnmaildir} uses it too.  @code{"~/.nnmaildir"} is a typical
14977 value.
14978
14979 @item target-prefix
14980 This should be a Lisp form which is processed by @code{eval} and
14981 @code{expand-file-name}.  The form is @code{eval}ed only when the
14982 server is opened; the resulting string is used until the server is
14983 closed.
14984
14985 When you create a group on an @code{nnmaildir} server, the maildir is
14986 created with @code{target-prefix} prepended to its name, and a symlink
14987 pointing to that maildir is created, named with the plain group name.
14988 So if @code{directory} is @code{"~/.nnmaildir"} and
14989 @code{target-prefix} is @code{"../maildirs/"}, then when you create
14990 the group @code{foo}, @code{nnmaildir} will create
14991 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
14992 @file{~/.nnmaildir/foo} as a symlink pointing to
14993 @file{../maildirs/foo}.
14994
14995 You can set @code{target-prefix} to a string without any slashes to
14996 create both maildirs and symlinks in the same @code{directory}; in
14997 this case, any maildirs found in @code{directory} whose names start
14998 with @code{target-prefix} will not be listed as groups (but the
14999 symlinks pointing to them will be).
15000
15001 As a special case, if @code{target-prefix} is @code{""} (the default),
15002 then when you create a group, the maildir will be created in
15003 @code{directory} without a corresponding symlink.  Beware that you
15004 cannot use @code{gnus-group-delete-group} on such groups without the
15005 @code{force} argument.
15006
15007 @item directory-files
15008 This should be a function with the same interface as
15009 @code{directory-files} (such as @code{directory-files} itself).  It is
15010 used to scan the server's @code{directory} for maildirs.  This
15011 parameter is optional; the default is
15012 @code{nnheader-directory-files-safe} if
15013 @code{nnheader-directory-files-is-safe} is @code{nil}, and
15014 @code{directory-files} otherwise.
15015 (@code{nnheader-directory-files-is-safe} is checked only once when the
15016 server is opened; if you want to check it each time the directory is
15017 scanned, you'll have to provide your own function that does that.)
15018
15019 @item get-new-mail
15020 If non-@code{nil}, then after scanning for new mail in the group
15021 maildirs themselves as usual, this server will also incorporate mail
15022 the conventional Gnus way, from @code{mail-sources} according to
15023 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
15024 value is @code{nil}.
15025
15026 Do @emph{not} use the same maildir both in @code{mail-sources} and as
15027 an @code{nnmaildir} group.  The results might happen to be useful, but
15028 that would be by chance, not by design, and the results might be
15029 different in the future.  If your split rules create new groups,
15030 remember to supply a @code{create-directory} server parameter.
15031 @end table
15032
15033 @subsubsection Group parameters
15034
15035 @code{nnmaildir} uses several group parameters.  It's safe to ignore
15036 all this; the default behavior for @code{nnmaildir} is the same as the
15037 default behavior for other mail back ends: articles are deleted after
15038 one week, etc.  Except for the expiry parameters, all this
15039 functionality is unique to @code{nnmaildir}, so you can ignore it if
15040 you're just trying to duplicate the behavior you already have with
15041 another back end.
15042
15043 If the value of any of these parameters is a vector, the first element
15044 is evaluated as a Lisp form and the result is used, rather than the
15045 original value.  If the value is not a vector, the value itself is
15046 evaluated as a Lisp form.  (This is why these parameters use names
15047 different from those of other, similar parameters supported by other
15048 back ends: they have different, though similar, meanings.)  (For
15049 numbers, strings, @code{nil}, and @code{t}, you can ignore the
15050 @code{eval} business again; for other values, remember to use an extra
15051 quote and wrap the value in a vector when appropriate.)
15052
15053 @table @code
15054 @item expire-age
15055 An integer specifying the minimum age, in seconds, of an article
15056 before it will be expired, or the symbol @code{never} to specify that
15057 articles should never be expired.  If this parameter is not set,
15058 @code{nnmaildir} falls back to the usual
15059 @code{nnmail-expiry-wait}(@code{-function}) variables (overrideable by
15060 the @code{expiry-wait}(@code{-function}) group parameters.  If you
15061 wanted a value of 3 days, you could use something like @code{[(* 3 24
15062 60 60)]}; @code{nnmaildir} will evaluate the form and use the result.
15063 An article's age is measured starting from the article file's
15064 modification time.  Normally, this is the same as the article's
15065 delivery time, but editing an article makes it younger.  Moving an
15066 article (other than via expiry) may also make an article younger.
15067
15068 @item expire-group
15069 If this is set to a string such as a full Gnus group name, like
15070 @example
15071 "backend+server.address.string:group.name"
15072 @end example
15073 and if it is not the name of the same group that the parameter belongs
15074 to, then articles will be moved to the specified group during expiry
15075 before being deleted.  @emph{If this is set to an @code{nnmaildir}
15076 group, the article will be just as old in the destination group as it
15077 was in the source group.}  So be careful with @code{expire-age} in the
15078 destination group.  If this is set to the name of the same group that
15079 the parameter belongs to, then the article is not expired at all.  If
15080 you use the vector form, the first element is evaluated once for each
15081 article.  So that form can refer to
15082 @code{nnmaildir-article-file-name}, etc., to decide where to put the
15083 article.  @emph{If this parameter is not set, @code{nnmaildir} does
15084 not fall back to the @code{expiry-target} group parameter or the
15085 @code{nnmail-expiry-target} variable.}
15086
15087 @item read-only
15088 If this is set to @code{t}, @code{nnmaildir} will treat the articles
15089 in this maildir as read-only.  This means: articles are not renamed
15090 from @file{new/} into @file{cur/}; articles are only found in
15091 @file{new/}, not @file{cur/}; articles are never deleted; articles
15092 cannot be edited.  @file{new/} is expected to be a symlink to the
15093 @file{new/} directory of another maildir---e.g., a system-wide mailbox
15094 containing a mailing list of common interest.  Everything in the
15095 maildir outside @file{new/} is @emph{not} treated as read-only, so for
15096 a shared mailbox, you do still need to set up your own maildir (or
15097 have write permission to the shared mailbox); your maildir just won't
15098 contain extra copies of the articles.
15099
15100 @item directory-files
15101 A function with the same interface as @code{directory-files}.  It is
15102 used to scan the directories in the maildir corresponding to this
15103 group to find articles.  The default is the function specified by the
15104 server's @code{directory-files} parameter.
15105
15106 @item distrust-Lines:
15107 If non-@code{nil}, @code{nnmaildir} will always count the lines of an
15108 article, rather than use the @code{Lines:} header field.  If
15109 @code{nil}, the header field will be used if present.
15110
15111 @item always-marks
15112 A list of mark symbols, such as @code{['(read expire)]}.  Whenever
15113 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
15114 say that all articles have these marks, regardless of whether the
15115 marks stored in the filesystem say so.  This is a proof-of-concept
15116 feature that will probably be removed eventually; it ought to be done
15117 in Gnus proper, or abandoned if it's not worthwhile.
15118
15119 @item never-marks
15120 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
15121 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
15122 say that no articles have these marks, regardless of whether the marks
15123 stored in the filesystem say so.  @code{never-marks} overrides
15124 @code{always-marks}.  This is a proof-of-concept feature that will
15125 probably be removed eventually; it ought to be done in Gnus proper, or
15126 abandoned if it's not worthwhile.
15127
15128 @item nov-cache-size
15129 An integer specifying the size of the @acronym{NOV} memory cache.  To
15130 speed things up, @code{nnmaildir} keeps @acronym{NOV} data in memory
15131 for a limited number of articles in each group.  (This is probably not
15132 worthwhile, and will probably be removed in the future.)  This
15133 parameter's value is noticed only the first time a group is seen after
15134 the server is opened---i.e., when you first start Gnus, typically.
15135 The @acronym{NOV} cache is never resized until the server is closed
15136 and reopened.  The default is an estimate of the number of articles
15137 that would be displayed in the summary buffer: a count of articles
15138 that are either marked with @code{tick} or not marked with
15139 @code{read}, plus a little extra.
15140 @end table
15141
15142 @subsubsection Article identification
15143 Articles are stored in the @file{cur/} subdirectory of each maildir.
15144 Each article file is named like @code{uniq:info}, where @code{uniq}
15145 contains no colons.  @code{nnmaildir} ignores, but preserves, the
15146 @code{:info} part.  (Other maildir readers typically use this part of
15147 the filename to store marks.)  The @code{uniq} part uniquely
15148 identifies the article, and is used in various places in the
15149 @file{.nnmaildir/} subdirectory of the maildir to store information
15150 about the corresponding article.  The full pathname of an article is
15151 available in the variable @code{nnmaildir-article-file-name} after you
15152 request the article in the summary buffer.
15153
15154 @subsubsection NOV data
15155 An article identified by @code{uniq} has its @acronym{NOV} data (used
15156 to generate lines in the summary buffer) stored in
15157 @code{.nnmaildir/nov/uniq}.  There is no
15158 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
15159 need for it---an article's @acronym{NOV} data is updated automatically
15160 when the article or @code{nnmail-extra-headers} has changed.)  You can
15161 force @code{nnmaildir} to regenerate the @acronym{NOV} data for a
15162 single article simply by deleting the corresponding @acronym{NOV}
15163 file, but @emph{beware}: this will also cause @code{nnmaildir} to
15164 assign a new article number for this article, which may cause trouble
15165 with @code{seen} marks, the Agent, and the cache.
15166
15167 @subsubsection Article marks
15168 An article identified by @code{uniq} is considered to have the mark
15169 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
15170 When Gnus asks @code{nnmaildir} for a group's marks, @code{nnmaildir}
15171 looks for such files and reports the set of marks it finds.  When Gnus
15172 asks @code{nnmaildir} to store a new set of marks, @code{nnmaildir}
15173 creates and deletes the corresponding files as needed.  (Actually,
15174 rather than create a new file for each mark, it just creates hard
15175 links to @file{.nnmaildir/markfile}, to save inodes.)
15176
15177 You can invent new marks by creating a new directory in
15178 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
15179 your server, untar it later, and keep your marks.  You can add and
15180 remove marks yourself by creating and deleting mark files.  If you do
15181 this while Gnus is running and your @code{nnmaildir} server is open,
15182 it's best to exit all summary buffers for @code{nnmaildir} groups and
15183 type @kbd{s} in the group buffer first, and to type @kbd{g} or
15184 @kbd{M-g} in the group buffer afterwards.  Otherwise, Gnus might not
15185 pick up the changes, and might undo them.
15186
15187
15188 @node Mail Folders
15189 @subsubsection Mail Folders
15190 @cindex nnfolder
15191 @cindex mbox folders
15192 @cindex mail folders
15193
15194 @code{nnfolder} is a back end for storing each mail group in a
15195 separate file.  Each file is in the standard Un*x mbox format.
15196 @code{nnfolder} will add extra headers to keep track of article
15197 numbers and arrival dates.
15198
15199 @cindex self contained nnfolder servers
15200 @cindex marks
15201 When the marks file is used (which it is by default), @code{nnfolder}
15202 servers have the property that you may backup them using @code{tar} or
15203 similar, and later be able to restore them into Gnus (by adding the
15204 proper @code{nnfolder} server) and have all your marks be preserved.
15205 Marks for a group is usually stored in a file named as the mbox file
15206 with @code{.mrk} concatenated to it (but see
15207 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder}
15208 directory.  Individual @code{nnfolder} groups are also possible to
15209 backup, use @kbd{G m} to restore the group (after restoring the backup
15210 into the @code{nnfolder} directory).
15211
15212 Virtual server settings:
15213
15214 @table @code
15215 @item nnfolder-directory
15216 @vindex nnfolder-directory
15217 All the @code{nnfolder} mail boxes will be stored under this
15218 directory.  The default is the value of @code{message-directory}
15219 (whose default is @file{~/Mail})
15220
15221 @item nnfolder-active-file
15222 @vindex nnfolder-active-file
15223 The name of the active file.  The default is @file{~/Mail/active}.
15224
15225 @item nnfolder-newsgroups-file
15226 @vindex nnfolder-newsgroups-file
15227 The name of the group descriptions file.  @xref{Newsgroups File
15228 Format}.  The default is @file{~/Mail/newsgroups}
15229
15230 @item nnfolder-get-new-mail
15231 @vindex nnfolder-get-new-mail
15232 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The
15233 default is @code{t}
15234
15235 @item nnfolder-save-buffer-hook
15236 @vindex nnfolder-save-buffer-hook
15237 @cindex backup files
15238 Hook run before saving the folders.  Note that Emacs does the normal
15239 backup renaming of files even with the @code{nnfolder} buffers.  If
15240 you wish to switch this off, you could say something like the
15241 following in your @file{.emacs} file:
15242
15243 @lisp
15244 (defun turn-off-backup ()
15245   (set (make-local-variable 'backup-inhibited) t))
15246
15247 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
15248 @end lisp
15249
15250 @item nnfolder-delete-mail-hook
15251 @vindex nnfolder-delete-mail-hook
15252 Hook run in a buffer narrowed to the message that is to be deleted.
15253 This function can be used to copy the message to somewhere else, or to
15254 extract some information from it before removing it.
15255
15256 @item nnfolder-nov-is-evil
15257 @vindex nnfolder-nov-is-evil
15258 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
15259 default is @code{nil}.
15260
15261 @item nnfolder-nov-file-suffix
15262 @vindex nnfolder-nov-file-suffix
15263 The extension for @acronym{NOV} files.  The default is @file{.nov}.
15264
15265 @item nnfolder-nov-directory
15266 @vindex nnfolder-nov-directory
15267 The directory where the @acronym{NOV} files should be stored.  If
15268 @code{nil}, @code{nnfolder-directory} is used.
15269
15270 @item nnfolder-marks-is-evil
15271 @vindex nnfolder-marks-is-evil
15272 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
15273 default is @code{nil}.
15274
15275 @item nnfolder-marks-file-suffix
15276 @vindex nnfolder-marks-file-suffix
15277 The extension for @sc{marks} files.  The default is @file{.mrk}.
15278
15279 @item nnfolder-marks-directory
15280 @vindex nnfolder-marks-directory
15281 The directory where the @sc{marks} files should be stored.  If
15282 @code{nil}, @code{nnfolder-directory} is used.
15283
15284 @end table
15285
15286
15287 @findex nnfolder-generate-active-file
15288 @kindex M-x nnfolder-generate-active-file
15289 If you have lots of @code{nnfolder}-like files you'd like to read with
15290 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
15291 command to make @code{nnfolder} aware of all likely files in
15292 @code{nnfolder-directory}.  This only works if you use long file names,
15293 though.
15294
15295 @node Comparing Mail Back Ends
15296 @subsubsection Comparing Mail Back Ends
15297
15298 First, just for terminology, the @dfn{back end} is the common word for a
15299 low-level access method---a transport, if you will, by which something
15300 is acquired.  The sense is that one's mail has to come from somewhere,
15301 and so selection of a suitable back end is required in order to get that
15302 mail within spitting distance of Gnus.
15303
15304 The same concept exists for Usenet itself: Though access to articles is
15305 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
15306 in the world got at Usenet by running a reader on the machine where the
15307 articles lay (the machine which today we call an @acronym{NNTP} server), and
15308 access was by the reader stepping into the articles' directory spool
15309 area directly.  One can still select between either the @code{nntp} or
15310 @code{nnspool} back ends, to select between these methods, if one happens
15311 actually to live on the server (or can see its spool directly, anyway,
15312 via NFS).
15313
15314 The goal in selecting a mail back end is to pick one which
15315 simultaneously represents a suitable way of dealing with the original
15316 format plus leaving mail in a form that is convenient to use in the
15317 future.  Here are some high and low points on each:
15318
15319 @table @code
15320 @item nnmbox
15321
15322 UNIX systems have historically had a single, very common, and well-
15323 defined format.  All messages arrive in a single @dfn{spool file}, and
15324 they are delineated by a line whose regular expression matches
15325 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
15326 to make it clear in this instance that this is not the RFC-specified
15327 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
15328 historically from the Unix environment, it is simplest if one does not
15329 mess a great deal with the original mailbox format, so if one chooses
15330 this back end, Gnus' primary activity in getting mail from the real spool
15331 area to Gnus' preferred directory is simply to copy it, with no
15332 (appreciable) format change in the process.  It is the ``dumbest'' way
15333 to move mail into availability in the Gnus environment.  This makes it
15334 fast to move into place, but slow to parse, when Gnus has to look at
15335 what's where.
15336
15337 @item nnbabyl
15338
15339 Once upon a time, there was the DEC-10 and DEC-20, running operating
15340 systems called TOPS and related things, and the usual (only?) mail
15341 reading environment was a thing called Babyl.  I don't know what format
15342 was used for mail landing on the system, but Babyl had its own internal
15343 format to which mail was converted, primarily involving creating a
15344 spool-file-like entity with a scheme for inserting Babyl-specific
15345 headers and status bits above the top of each message in the file.
15346 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
15347 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
15348 to understand the mail files folks already had in existence.  Gnus (and
15349 VM, for that matter) continue to support this format because it's
15350 perceived as having some good qualities in those mailer-specific
15351 headers/status bits stuff.  Rmail itself still exists as well, of
15352 course, and is still maintained by Stallman.
15353
15354 Both of the above forms leave your mail in a single file on your
15355 file system, and they must parse that entire file each time you take a
15356 look at your mail.
15357
15358 @item nnml
15359
15360 @code{nnml} is the back end which smells the most as though you were
15361 actually operating with an @code{nnspool}-accessed Usenet system.  (In
15362 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
15363 lo these years ago.)  One's mail is taken from the original spool file,
15364 and is then cut up into individual message files, 1:1.  It maintains a
15365 Usenet-style active file (analogous to what one finds in an INN- or
15366 CNews-based news system in (for instance) @file{/var/lib/news/active},
15367 or what is returned via the @samp{NNTP LIST} verb) and also creates
15368 @dfn{overview} files for efficient group entry, as has been defined for
15369 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
15370 due to the creation of lots of files, updates to the @code{nnml} active
15371 file, and additions to overview files on a per-message basis, but it is
15372 extremely fast on access because of what amounts to the indexing support
15373 provided by the active file and overviews.
15374
15375 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
15376 resource which defines available places in the file system to put new
15377 files.  Sysadmins take a dim view of heavy inode occupation within
15378 tight, shared file systems.  But if you live on a personal machine where
15379 the file system is your own and space is not at a premium, @code{nnml}
15380 wins big.
15381
15382 It is also problematic using this back end if you are living in a
15383 FAT16-based Windows world, since much space will be wasted on all these
15384 tiny files.
15385
15386 @item nnmh
15387
15388 The Rand MH mail-reading system has been around UNIX systems for a very
15389 long time; it operates by splitting one's spool file of messages into
15390 individual files, but with little or no indexing support---@code{nnmh}
15391 is considered to be semantically equivalent to ``@code{nnml} without
15392 active file or overviews''.  This is arguably the worst choice, because
15393 one gets the slowness of individual file creation married to the
15394 slowness of access parsing when learning what's new in one's groups.
15395
15396 @item nnfolder
15397
15398 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
15399 method described above) on a per-group basis.  That is, @code{nnmbox}
15400 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
15401 little bit of optimization to this so that each of one's mail groups has
15402 a Unix mail box file.  It's faster than @code{nnmbox} because each group
15403 can be parsed separately, and still provides the simple Unix mail box
15404 format requiring minimal effort in moving the mail around.  In addition,
15405 it maintains an ``active'' file making it much faster for Gnus to figure
15406 out how many messages there are in each separate group.
15407
15408 If you have groups that are expected to have a massive amount of
15409 messages, @code{nnfolder} is not the best choice, but if you receive
15410 only a moderate amount of mail, @code{nnfolder} is probably the most
15411 friendly mail back end all over.
15412
15413 @item nnmaildir
15414
15415 For configuring expiry and other things, @code{nnmaildir} uses
15416 incompatible group parameters, slightly different from those of other
15417 mail back ends.
15418
15419 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
15420 differences.  Each message is stored in a separate file, but the
15421 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
15422 also stores the equivalent of @code{nnml}'s overview files in one file
15423 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
15424 @code{df -i} to see how plentiful your inode supply is.)  If this slows
15425 you down or takes up very much space, consider switching to
15426 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
15427 file system.
15428
15429 Since maildirs don't require locking for delivery, the maildirs you use
15430 as groups can also be the maildirs your mail is directly delivered to.
15431 This means you can skip Gnus' mail splitting if your mail is already
15432 organized into different mailboxes during delivery.  A @code{directory}
15433 entry in @code{mail-sources} would have a similar effect, but would
15434 require one set of mailboxes for spooling deliveries (in mbox format,
15435 thus damaging message bodies), and another set to be used as groups (in
15436 whatever format you like).  A maildir has a built-in spool, in the
15437 @code{new/} subdirectory.  Beware that currently, mail moved from
15438 @code{new/} to @code{cur/} instead of via mail splitting will not
15439 undergo treatment such as duplicate checking.
15440
15441 @code{nnmaildir} stores article marks for a given group in the
15442 corresponding maildir, in a way designed so that it's easy to manipulate
15443 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
15444 else, and still have your marks.  @code{nnml} also stores marks, but
15445 it's not as easy to work with them from outside Gnus as with
15446 @code{nnmaildir}.
15447
15448 @code{nnmaildir} uses a significant amount of memory to speed things up.
15449 (It keeps in memory some of the things that @code{nnml} stores in files
15450 and that @code{nnmh} repeatedly parses out of message files.)  If this
15451 is a problem for you, you can set the @code{nov-cache-size} group
15452 parameter to something small (0 would probably not work, but 1 probably
15453 would) to make it use less memory.  This caching will probably be
15454 removed in the future.
15455
15456 Startup is likely to be slower with @code{nnmaildir} than with other
15457 back ends.  Everything else is likely to be faster, depending in part
15458 on your file system.
15459
15460 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
15461 to write an @code{nnmaildir}-derived back end.
15462
15463 @end table
15464
15465
15466 @node Browsing the Web
15467 @section Browsing the Web
15468 @cindex web
15469 @cindex browsing the web
15470 @cindex www
15471 @cindex http
15472
15473 Web-based discussion forums are getting more and more popular.  On many
15474 subjects, the web-based forums have become the most important forums,
15475 eclipsing the importance of mailing lists and news groups.  The reason
15476 is easy to understand---they are friendly to new users; you just point
15477 and click, and there's the discussion.  With mailing lists, you have to
15478 go through a cumbersome subscription procedure, and most people don't
15479 even know what a news group is.
15480
15481 The problem with this scenario is that web browsers are not very good at
15482 being newsreaders.  They do not keep track of what articles you've read;
15483 they do not allow you to score on subjects you're interested in; they do
15484 not allow off-line browsing; they require you to click around and drive
15485 you mad in the end.
15486
15487 So---if web browsers suck at reading discussion forums, why not use Gnus
15488 to do it instead?
15489
15490 Gnus has been getting a bit of a collection of back ends for providing
15491 interfaces to these sources.
15492
15493 @menu
15494 * Archiving Mail::
15495 * Web Searches::                Creating groups from articles that match a string.
15496 * Slashdot::                    Reading the Slashdot comments.
15497 * Ultimate::                    The Ultimate Bulletin Board systems.
15498 * Web Archive::                 Reading mailing list archived on web.
15499 * RSS::                         Reading RDF site summary.
15500 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
15501 @end menu
15502
15503 All the web sources require Emacs/w3 and the url library to work.
15504
15505 The main caveat with all these web sources is that they probably won't
15506 work for a very long time.  Gleaning information from the @acronym{HTML} data
15507 is guesswork at best, and when the layout is altered, the Gnus back end
15508 will fail.  If you have reasonably new versions of these back ends,
15509 though, you should be ok.
15510
15511 One thing all these Web methods have in common is that the Web sources
15512 are often down, unavailable or just plain too slow to be fun.  In those
15513 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
15514 Unplugged}) handle downloading articles, and then you can read them at
15515 leisure from your local disk.  No more World Wide Wait for you.
15516
15517 @node Archiving Mail
15518 @subsection Archiving Mail
15519 @cindex archiving mail
15520 @cindex backup of mail
15521
15522 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
15523 @code{nnmaildir}, now actually store the article marks with each group.
15524 For these servers, archiving and restoring a group while preserving
15525 marks is fairly simple.
15526
15527 (Preserving the group level and group parameters as well still
15528 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
15529 though.)
15530
15531 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
15532 server, take a recursive copy of the server directory.  There is no need
15533 to shut down Gnus, so archiving may be invoked by @code{cron} or
15534 similar.  You restore the data by restoring the directory tree, and
15535 adding a server definition pointing to that directory in Gnus.  The
15536 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
15537 might interfere with overwriting data, so you may want to shut down Gnus
15538 before you restore the data.
15539
15540 It is also possible to archive individual @code{nnml},
15541 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
15542 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
15543 directory.  For @code{nnfolder} you need to copy both the base folder
15544 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
15545 this example).  Restoring the group is done with @kbd{G m} from the Group
15546 buffer.  The last step makes Gnus notice the new directory.
15547 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
15548 is unnecessary in that case.
15549
15550 @node Web Searches
15551 @subsection Web Searches
15552 @cindex nnweb
15553 @cindex Google
15554 @cindex dejanews
15555 @cindex gmane
15556 @cindex Usenet searches
15557 @cindex searching the Usenet
15558
15559 It's, like, too neat to search the Usenet for articles that match a
15560 string, but it, like, totally @emph{sucks}, like, totally, to use one of
15561 those, like, Web browsers, and you, like, have to, rilly, like, look at
15562 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
15563 searches without having to use a browser.
15564
15565 The @code{nnweb} back end allows an easy interface to the mighty search
15566 engine.  You create an @code{nnweb} group, enter a search pattern, and
15567 then enter the group and read the articles like you would any normal
15568 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
15569 Groups}) will do this in an easy-to-use fashion.
15570
15571 @code{nnweb} groups don't really lend themselves to being solid
15572 groups---they have a very fleeting idea of article numbers.  In fact,
15573 each time you enter an @code{nnweb} group (not even changing the search
15574 pattern), you are likely to get the articles ordered in a different
15575 manner.  Not even using duplicate suppression (@pxref{Duplicate
15576 Suppression}) will help, since @code{nnweb} doesn't even know the
15577 @code{Message-ID} of the articles before reading them using some search
15578 engines (Google, for instance).  The only possible way to keep track
15579 of which articles you've read is by scoring on the @code{Date}
15580 header---mark all articles posted before the last date you read the
15581 group as read.
15582
15583 If the search engine changes its output substantially, @code{nnweb}
15584 won't be able to parse it and will fail.  One could hardly fault the Web
15585 providers if they were to do this---their @emph{raison d'être} is to
15586 make money off of advertisements, not to provide services to the
15587 community.  Since @code{nnweb} washes the ads off all the articles, one
15588 might think that the providers might be somewhat miffed.  We'll see.
15589
15590 You must have the @code{url} and @code{w3} package installed to be able
15591 to use @code{nnweb}.
15592
15593 Virtual server variables:
15594
15595 @table @code
15596 @item nnweb-type
15597 @vindex nnweb-type
15598 What search engine type is being used.  The currently supported types
15599 are @code{google}, @code{dejanews}, and @code{gmane}.  Note that
15600 @code{dejanews} is an alias to @code{google}.
15601
15602 @item nnweb-search
15603 @vindex nnweb-search
15604 The search string to feed to the search engine.
15605
15606 @item nnweb-max-hits
15607 @vindex nnweb-max-hits
15608 Advisory maximum number of hits per search to display.  The default is
15609 999.
15610
15611 @item nnweb-type-definition
15612 @vindex nnweb-type-definition
15613 Type-to-definition alist.  This alist says what @code{nnweb} should do
15614 with the various search engine types.  The following elements must be
15615 present:
15616
15617 @table @code
15618 @item article
15619 Function to decode the article and provide something that Gnus
15620 understands.
15621
15622 @item map
15623 Function to create an article number to message header and URL alist.
15624
15625 @item search
15626 Function to send the search string to the search engine.
15627
15628 @item address
15629 The address the aforementioned function should send the search string
15630 to.
15631
15632 @item id
15633 Format string URL to fetch an article by @code{Message-ID}.
15634 @end table
15635
15636 @end table
15637
15638
15639 @node Slashdot
15640 @subsection Slashdot
15641 @cindex Slashdot
15642 @cindex nnslashdot
15643
15644 @uref{http://slashdot.org/, Slashdot} is a popular news site, with
15645 lively discussion following the news articles.  @code{nnslashdot} will
15646 let you read this forum in a convenient manner.
15647
15648 The easiest way to read this source is to put something like the
15649 following in your @file{~/.gnus.el} file:
15650
15651 @lisp
15652 (setq gnus-secondary-select-methods
15653       '((nnslashdot "")))
15654 @end lisp
15655
15656 This will make Gnus query the @code{nnslashdot} back end for new comments
15657 and groups.  The @kbd{F} command will subscribe each new news article as
15658 a new Gnus group, and you can read the comments by entering these
15659 groups.  (Note that the default subscription method is to subscribe new
15660 groups as zombies.  Other methods are available (@pxref{Subscription
15661 Methods}).
15662
15663 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
15664 command is the most handy tool (@pxref{Foreign Groups}).
15665
15666 When following up to @code{nnslashdot} comments (or posting new
15667 comments), some light @acronym{HTML}izations will be performed.  In
15668 particular, text quoted with @samp{> } will be quoted with
15669 @samp{blockquote} instead, and signatures will have @samp{br} added to
15670 the end of each line.  Other than that, you can just write @acronym{HTML}
15671 directly into the message buffer.  Note that Slashdot filters out some
15672 @acronym{HTML} forms.
15673
15674 The following variables can be altered to change its behavior:
15675
15676 @table @code
15677 @item nnslashdot-threaded
15678 Whether @code{nnslashdot} should display threaded groups or not.  The
15679 default is @code{t}.  To be able to display threads, @code{nnslashdot}
15680 has to retrieve absolutely all comments in a group upon entry.  If a
15681 threaded display is not required, @code{nnslashdot} will only retrieve
15682 the comments that are actually wanted by the user.  Threading is nicer,
15683 but much, much slower than unthreaded.
15684
15685 @item nnslashdot-login-name
15686 @vindex nnslashdot-login-name
15687 The login name to use when posting.
15688
15689 @item nnslashdot-password
15690 @vindex nnslashdot-password
15691 The password to use when posting.
15692
15693 @item nnslashdot-directory
15694 @vindex nnslashdot-directory
15695 Where @code{nnslashdot} will store its files.  The default is
15696 @file{~/News/slashdot/}.
15697
15698 @item nnslashdot-active-url
15699 @vindex nnslashdot-active-url
15700 The @acronym{URL} format string that will be used to fetch the
15701 information on news articles and comments.  The default is@*
15702 @samp{http://slashdot.org/search.pl?section=&min=%d}.
15703
15704 @item nnslashdot-comments-url
15705 @vindex nnslashdot-comments-url
15706 The @acronym{URL} format string that will be used to fetch comments.
15707
15708 @item nnslashdot-article-url
15709 @vindex nnslashdot-article-url
15710 The @acronym{URL} format string that will be used to fetch the news
15711 article.  The default is
15712 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
15713
15714 @item nnslashdot-threshold
15715 @vindex nnslashdot-threshold
15716 The score threshold.  The default is -1.
15717
15718 @item nnslashdot-group-number
15719 @vindex nnslashdot-group-number
15720 The number of old groups, in addition to the ten latest, to keep
15721 updated.  The default is 0.
15722
15723 @end table
15724
15725
15726
15727 @node Ultimate
15728 @subsection Ultimate
15729 @cindex nnultimate
15730 @cindex Ultimate Bulletin Board
15731
15732 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
15733 probably the most popular Web bulletin board system used.  It has a
15734 quite regular and nice interface, and it's possible to get the
15735 information Gnus needs to keep groups updated.
15736
15737 The easiest way to get started with @code{nnultimate} is to say
15738 something like the following in the group buffer:  @kbd{B nnultimate RET
15739 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @acronym{URL}
15740 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
15741 you're interested in; there's quite a list of them on the Ultimate web
15742 site.)  Then subscribe to the groups you're interested in from the
15743 server buffer, and read them from the group buffer.
15744
15745 The following @code{nnultimate} variables can be altered:
15746
15747 @table @code
15748 @item nnultimate-directory
15749 @vindex nnultimate-directory
15750 The directory where @code{nnultimate} stores its files.  The default is@*
15751 @file{~/News/ultimate/}.
15752 @end table
15753
15754
15755 @node Web Archive
15756 @subsection Web Archive
15757 @cindex nnwarchive
15758 @cindex Web Archive
15759
15760 Some mailing lists only have archives on Web servers, such as
15761 @uref{http://www.egroups.com/} and
15762 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
15763 interface, and it's possible to get the information Gnus needs to keep
15764 groups updated.
15765
15766 @findex gnus-group-make-warchive-group
15767 The easiest way to get started with @code{nnwarchive} is to say
15768 something like the following in the group buffer: @kbd{M-x
15769 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
15770 www.egroups.com RET @var{your@@email.address} RET}.  (Substitute the
15771 @var{an_egroup} with the mailing list you subscribed, the
15772 @var{your@@email.address} with your email address.), or to browse the
15773 back end by @kbd{B nnwarchive RET mail-archive RET}.
15774
15775 The following @code{nnwarchive} variables can be altered:
15776
15777 @table @code
15778 @item nnwarchive-directory
15779 @vindex nnwarchive-directory
15780 The directory where @code{nnwarchive} stores its files.  The default is@*
15781 @file{~/News/warchive/}.
15782
15783 @item nnwarchive-login
15784 @vindex nnwarchive-login
15785 The account name on the web server.
15786
15787 @item nnwarchive-passwd
15788 @vindex nnwarchive-passwd
15789 The password for your account on the web server.
15790 @end table
15791
15792 @node RSS
15793 @subsection RSS
15794 @cindex nnrss
15795 @cindex RSS
15796
15797 Some web sites have an RDF Site Summary (@acronym{RSS}).
15798 @acronym{RSS} is a format for summarizing headlines from news related
15799 sites (such as BBC or CNN).  But basically anything list-like can be
15800 presented as an @acronym{RSS} feed: weblogs, changelogs or recent
15801 changes to a wiki (e.g. @url{http://cliki.net/recent-changes.rdf}).
15802
15803 @acronym{RSS} has a quite regular and nice interface, and it's
15804 possible to get the information Gnus needs to keep groups updated.
15805
15806 @kindex G R (Summary)
15807 Use @kbd{G R} from the summary buffer to subscribe to a feed---you
15808 will be prompted for the location of the feed.
15809
15810 An easy way to get started with @code{nnrss} is to say something like
15811 the following in the group buffer: @kbd{B nnrss RET y}, then
15812 subscribe to groups.
15813
15814 The following @code{nnrss} variables can be altered:
15815
15816 @table @code
15817 @item nnrss-directory
15818 @vindex nnrss-directory
15819 The directory where @code{nnrss} stores its files.  The default is
15820 @file{~/News/rss/}.
15821
15822 @item nnrss-use-local
15823 @vindex nnrss-use-local
15824 @findex nnrss-generate-download-script
15825 If you set @code{nnrss-use-local} to @code{t}, @code{nnrss} will read
15826 the feeds from local files in @code{nnrss-directory}.  You can use
15827 the command @code{nnrss-generate-download-script} to generate a
15828 download script using @command{wget}.
15829 @end table
15830
15831 The following code may be helpful, if you want to show the description in
15832 the summary buffer.
15833
15834 @lisp
15835 (add-to-list 'nnmail-extra-headers nnrss-description-field)
15836 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
15837
15838 (defun gnus-user-format-function-X (header)
15839   (let ((descr
15840          (assq nnrss-description-field (mail-header-extra header))))
15841     (if descr (concat "\n\t" (cdr descr)) "")))
15842 @end lisp
15843
15844 The following code may be useful to open an nnrss url directly from the
15845 summary buffer.
15846 @lisp
15847 (require 'browse-url)
15848
15849 (defun browse-nnrss-url( arg )
15850   (interactive "p")
15851   (let ((url (assq nnrss-url-field
15852                    (mail-header-extra
15853                     (gnus-data-header
15854                      (assq (gnus-summary-article-number)
15855                            gnus-newsgroup-data))))))
15856     (if url
15857         (progn
15858           (browse-url (cdr url))
15859           (gnus-summary-mark-as-read-forward 1))
15860       (gnus-summary-scroll-up arg))))
15861
15862 (eval-after-load "gnus"
15863   #'(define-key gnus-summary-mode-map
15864       (kbd "<RET>") 'browse-nnrss-url))
15865 (add-to-list 'nnmail-extra-headers nnrss-url-field)
15866 @end lisp
15867
15868 @node Customizing w3
15869 @subsection Customizing w3
15870 @cindex w3
15871 @cindex html
15872 @cindex url
15873 @cindex Netscape
15874
15875 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
15876 pages.  Emacs/w3 is documented in its own manual, but there are some
15877 things that may be more relevant for Gnus users.
15878
15879 For instance, a common question is how to make Emacs/w3 follow links
15880 using the @code{browse-url} functions (which will call some external web
15881 browser like Netscape).  Here's one way:
15882
15883 @lisp
15884 (eval-after-load "w3"
15885   '(progn
15886     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
15887     (defun w3-fetch (&optional url target)
15888       (interactive (list (w3-read-url-with-default)))
15889       (if (eq major-mode 'gnus-article-mode)
15890           (browse-url url)
15891         (w3-fetch-orig url target)))))
15892 @end lisp
15893
15894 Put that in your @file{.emacs} file, and hitting links in w3-rendered
15895 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
15896 follow the link.
15897
15898
15899 @node IMAP
15900 @section IMAP
15901 @cindex nnimap
15902 @cindex @acronym{IMAP}
15903
15904 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
15905 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
15906 server is much similar to connecting to a news server, you just
15907 specify the network address of the server.
15908
15909 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
15910 everything that @acronym{POP} can, it can hence be viewed as a
15911 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
15912 similar to @acronym{NNTP} being a news storage protocol---however,
15913 @acronym{IMAP} offers more features than @acronym{NNTP} because news
15914 is more or less read-only whereas mail is read-write.
15915
15916 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
15917 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
15918 the @acronym{IMAP} server and store them on the local disk.  This is
15919 not the usage described in this section---@xref{Mail Sources}.
15920
15921 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
15922 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
15923 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
15924 usage explained in this section.
15925
15926 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP}
15927 servers might look something like the following.  (Note that for
15928 @acronym{TLS}/@acronym{SSL}, you need external programs and libraries,
15929 see below.)
15930
15931 @lisp
15932 (setq gnus-secondary-select-methods
15933       '((nnimap "simpleserver") ; @r{no special configuration}
15934         ; @r{perhaps a ssh port forwarded server:}
15935         (nnimap "dolk"
15936                 (nnimap-address "localhost")
15937                 (nnimap-server-port 1430))
15938         ; @r{a UW server running on localhost}
15939         (nnimap "barbar"
15940                 (nnimap-server-port 143)
15941                 (nnimap-address "localhost")
15942                 (nnimap-list-pattern ("INBOX" "mail/*")))
15943         ; @r{anonymous public cyrus server:}
15944         (nnimap "cyrus.andrew.cmu.edu"
15945                 (nnimap-authenticator anonymous)
15946                 (nnimap-list-pattern "archive.*")
15947                 (nnimap-stream network))
15948         ; @r{a ssl server on a non-standard port:}
15949         (nnimap "vic20"
15950                 (nnimap-address "vic20.somewhere.com")
15951                 (nnimap-server-port 9930)
15952                 (nnimap-stream ssl))))
15953 @end lisp
15954
15955 After defining the new server, you can subscribe to groups on the
15956 server using normal Gnus commands such as @kbd{U} in the Group Buffer
15957 (@pxref{Subscription Commands}) or via the Server Buffer
15958 (@pxref{Server Buffer}).
15959
15960 The following variables can be used to create a virtual @code{nnimap}
15961 server:
15962
15963 @table @code
15964
15965 @item nnimap-address
15966 @vindex nnimap-address
15967
15968 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
15969 server name if not specified.
15970
15971 @item nnimap-server-port
15972 @vindex nnimap-server-port
15973 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
15974
15975 Note that this should be an integer, example server specification:
15976
15977 @lisp
15978 (nnimap "mail.server.com"
15979         (nnimap-server-port 4711))
15980 @end lisp
15981
15982 @item nnimap-list-pattern
15983 @vindex nnimap-list-pattern
15984 String or list of strings of mailboxes to limit available groups to.
15985 This is used when the server has very many mailboxes and you're only
15986 interested in a few---some servers export your home directory via
15987 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
15988 @file{~/Mail/*} then.
15989
15990 The string can also be a cons of REFERENCE and the string as above, what
15991 REFERENCE is used for is server specific, but on the University of
15992 Washington server it's a directory that will be concatenated with the
15993 mailbox.
15994
15995 Example server specification:
15996
15997 @lisp
15998 (nnimap "mail.server.com"
15999         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
16000                                ("~friend/Mail/" . "list/*"))))
16001 @end lisp
16002
16003 @item nnimap-stream
16004 @vindex nnimap-stream
16005 The type of stream used to connect to your server.  By default, nnimap
16006 will detect and automatically use all of the below, with the exception
16007 of @acronym{TLS}/@acronym{SSL}.  (@acronym{IMAP} over
16008 @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can
16009 be automatically detected, but it's not widely deployed yet.)
16010
16011 Example server specification:
16012
16013 @lisp
16014 (nnimap "mail.server.com"
16015         (nnimap-stream ssl))
16016 @end lisp
16017
16018 Please note that the value of @code{nnimap-stream} is a symbol!
16019
16020 @itemize @bullet
16021 @item
16022 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5).  Requires the
16023 @samp{gsasl} or @samp{imtest} program.
16024 @item
16025 @dfn{kerberos4:} Connect with Kerberos 4.  Requires the @samp{imtest} program.
16026 @item
16027 @dfn{starttls:} Connect via the STARTTLS extension (similar to
16028 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
16029 @samp{starttls}.
16030 @item
16031 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
16032 @samp{gnutls-cli}).
16033 @item
16034 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
16035 @samp{openssl}) or SSLeay (@samp{s_client}).
16036 @item
16037 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
16038 @item
16039 @dfn{network:} Plain, TCP/IP network connection.
16040 @end itemize
16041
16042 @vindex imap-kerberos4-program
16043 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
16044 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
16045 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
16046 to make @code{imap.el} use a pty instead of a pipe when communicating
16047 with @samp{imtest}.  You will then suffer from a line length
16048 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
16049 indefinitely if you have many articles in a mailbox.  The variable
16050 @code{imap-kerberos4-program} contain parameters to pass to the imtest
16051 program.
16052
16053 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
16054 needed.  It is available from
16055 @uref{http://www.gnu.org/software/gnutls/}.
16056
16057 @vindex imap-gssapi-program
16058 This parameter specifies a list of command lines that invoke a GSSAPI
16059 authenticated @acronym{IMAP} stream in a subshell.  They are tried
16060 sequentially until a connection is made, or the list has been
16061 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
16062 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
16063 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
16064 tried.
16065
16066 @vindex imap-ssl-program
16067 For @acronym{SSL} connections, the OpenSSL program is available from
16068 @uref{http://www.openssl.org/}.  OpenSSL was formerly known as SSLeay,
16069 and nnimap support it too---although the most recent versions of
16070 SSLeay, 0.9.x, are known to have serious bugs making it
16071 useless.  Earlier versions, especially 0.8.x, of SSLeay are known to
16072 work.  The variable @code{imap-ssl-program} contain parameters to pass
16073 to OpenSSL/SSLeay.
16074
16075 @vindex imap-shell-program
16076 @vindex imap-shell-host
16077 For @acronym{IMAP} connections using the @code{shell} stream, the variable
16078 @code{imap-shell-program} specify what program to call.
16079
16080 @item nnimap-authenticator
16081 @vindex nnimap-authenticator
16082
16083 The authenticator used to connect to the server.  By default, nnimap
16084 will use the most secure authenticator your server is capable of.
16085
16086 Example server specification:
16087
16088 @lisp
16089 (nnimap "mail.server.com"
16090         (nnimap-authenticator anonymous))
16091 @end lisp
16092
16093 Please note that the value of @code{nnimap-authenticator} is a symbol!
16094
16095 @itemize @bullet
16096 @item
16097 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication.  Requires
16098 external program @code{gsasl} or @code{imtest}.
16099 @item
16100 @dfn{kerberos4:} Kerberos 4 authentication.  Requires external program
16101 @code{imtest}.
16102 @item
16103 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5.  Requires
16104 external library @code{digest-md5.el}.
16105 @item
16106 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
16107 @item
16108 @dfn{login:} Plain-text username/password via LOGIN.
16109 @item
16110 @dfn{anonymous:} Login as ``anonymous'', supplying your email address as password.
16111 @end itemize
16112
16113 @item nnimap-expunge-on-close
16114 @cindex expunging
16115 @vindex nnimap-expunge-on-close
16116 Unlike Parmenides the @acronym{IMAP} designers have decided things that
16117 don't exist actually do exist.  More specifically, @acronym{IMAP} has
16118 this concept of marking articles @code{Deleted} which doesn't actually
16119 delete them, and this (marking them @code{Deleted}, that is) is what
16120 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
16121 similar).
16122
16123 Since the articles aren't really removed when we mark them with the
16124 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
16125 running in circles yet?
16126
16127 Traditionally, nnimap has removed all articles marked as @code{Deleted}
16128 when closing a mailbox but this is now configurable by this server
16129 variable.
16130
16131 The possible options are:
16132
16133 @table @code
16134
16135 @item always
16136 The default behavior, delete all articles marked as ``Deleted'' when
16137 closing a mailbox.
16138 @item never
16139 Never actually delete articles.  Currently there is no way of showing
16140 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
16141 may allow you to do this.  If you ever want to run the EXPUNGE command
16142 manually, @xref{Expunging mailboxes}.
16143 @item ask
16144 When closing mailboxes, nnimap will ask if you wish to expunge deleted
16145 articles or not.
16146
16147 @end table
16148
16149 @item nnimap-importantize-dormant
16150 @vindex nnimap-importantize-dormant
16151
16152 If non-@code{nil} (the default), marks dormant articles as ticked (as
16153 well), for other @acronym{IMAP} clients.  Within Gnus, dormant articles will
16154 naturally still (only) be marked as dormant.  This is to make dormant
16155 articles stand out, just like ticked articles, in other @acronym{IMAP}
16156 clients.  (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
16157 has only one.)
16158
16159 Probably the only reason for frobing this would be if you're trying
16160 enable per-user persistent dormant flags, using something like:
16161
16162 @lisp
16163 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
16164         (format "gnus-dormant-%s" (user-login-name)))
16165 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
16166         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
16167 @end lisp
16168
16169 In this case, you would not want the per-user dormant flag showing up
16170 as ticked for other users.
16171
16172 @item nnimap-expunge-search-string
16173 @cindex expunging
16174 @vindex nnimap-expunge-search-string
16175
16176 This variable contain the @acronym{IMAP} search command sent to server when
16177 searching for articles eligible for expiring.  The default is
16178 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
16179 UID set and the second @code{%s} is replaced by a date.
16180
16181 Probably the only useful value to change this to is
16182 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
16183 messages instead of the internal article date.  See section 6.4.4 of
16184 RFC 2060 for more information on valid strings.
16185
16186 @item nnimap-authinfo-file
16187 @vindex nnimap-authinfo-file
16188
16189 A file containing credentials used to log in on servers.  The format is
16190 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
16191 variable @code{nntp-authinfo-file} for exact syntax; also see
16192 @ref{NNTP}.
16193
16194 @item nnimap-need-unselect-to-notice-new-mail
16195 @vindex nnimap-need-unselect-to-notice-new-mail
16196
16197 Unselect mailboxes before looking for new mail in them.  Some servers
16198 seem to need this under some circumstances; it was reported that
16199 Courier 1.7.1 did.
16200
16201 @end table
16202
16203 @menu
16204 * Splitting in IMAP::           Splitting mail with nnimap.
16205 * Expiring in IMAP::            Expiring mail with nnimap.
16206 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
16207 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
16208 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
16209 * Debugging IMAP::              What to do when things don't work.
16210 @end menu
16211
16212
16213
16214 @node Splitting in IMAP
16215 @subsection Splitting in IMAP
16216 @cindex splitting imap mail
16217
16218 Splitting is something Gnus users have loved and used for years, and now
16219 the rest of the world is catching up.  Yeah, dream on, not many
16220 @acronym{IMAP} servers have server side splitting and those that have
16221 splitting seem to use some non-standard protocol.  This means that
16222 @acronym{IMAP} support for Gnus has to do its own splitting.
16223
16224 And it does.
16225
16226 (Incidentally, people seem to have been dreaming on, and Sieve has
16227 gaining a market share and is supported by several IMAP servers.
16228 Fortunately, Gnus support it too, @xref{Sieve Commands}.)
16229
16230 Here are the variables of interest:
16231
16232 @table @code
16233
16234 @item nnimap-split-crosspost
16235 @cindex splitting, crosspost
16236 @cindex crosspost
16237 @vindex nnimap-split-crosspost
16238
16239 If non-@code{nil}, do crossposting if several split methods match the
16240 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
16241 found will be used.
16242
16243 Nnmail equivalent: @code{nnmail-crosspost}.
16244
16245 @item nnimap-split-inbox
16246 @cindex splitting, inbox
16247 @cindex inbox
16248 @vindex nnimap-split-inbox
16249
16250 A string or a list of strings that gives the name(s) of @acronym{IMAP}
16251 mailboxes to split from.  Defaults to @code{nil}, which means that
16252 splitting is disabled!
16253
16254 @lisp
16255 (setq nnimap-split-inbox
16256       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
16257 @end lisp
16258
16259 No nnmail equivalent.
16260
16261 @item nnimap-split-rule
16262 @cindex splitting, rules
16263 @vindex nnimap-split-rule
16264
16265 New mail found in @code{nnimap-split-inbox} will be split according to
16266 this variable.
16267
16268 This variable contains a list of lists, where the first element in the
16269 sublist gives the name of the @acronym{IMAP} mailbox to move articles
16270 matching the regexp in the second element in the sublist.  Got that?
16271 Neither did I, we need examples.
16272
16273 @lisp
16274 (setq nnimap-split-rule
16275       '(("INBOX.nnimap"
16276          "^Sender: owner-nnimap@@vic20.globalcom.se")
16277         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
16278         ("INBOX.private" "")))
16279 @end lisp
16280
16281 This will put all articles from the nnimap mailing list into mailbox
16282 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
16283 into INBOX.junk and everything else in INBOX.private.
16284
16285 The first string may contain @samp{\\1} forms, like the ones used by
16286 replace-match to insert sub-expressions from the matched text.  For
16287 instance:
16288
16289 @lisp
16290 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
16291 @end lisp
16292
16293 The first element can also be the symbol @code{junk} to indicate that
16294 matching messages should simply be deleted.  Use with care.
16295
16296 The second element can also be a function.  In that case, it will be
16297 called with the first element of the rule as the argument, in a buffer
16298 containing the headers of the article.  It should return a
16299 non-@code{nil} value if it thinks that the mail belongs in that group.
16300
16301 Nnmail users might recollect that the last regexp had to be empty to
16302 match all articles (like in the example above).  This is not required in
16303 nnimap.  Articles not matching any of the regexps will not be moved out
16304 of your inbox.  (This might affect performance if you keep lots of
16305 unread articles in your inbox, since the splitting code would go over
16306 them every time you fetch new mail.)
16307
16308 These rules are processed from the beginning of the alist toward the
16309 end.  The first rule to make a match will ``win'', unless you have
16310 crossposting enabled.  In that case, all matching rules will ``win''.
16311
16312 This variable can also have a function as its value, the function will
16313 be called with the headers narrowed and should return a group where it
16314 thinks the article should be split to.  See @code{nnimap-split-fancy}.
16315
16316 The splitting code tries to create mailboxes if it needs to.
16317
16318 To allow for different split rules on different virtual servers, and
16319 even different split rules in different inboxes on the same server,
16320 the syntax of this variable have been extended along the lines of:
16321
16322 @lisp
16323 (setq nnimap-split-rule
16324       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
16325                                ("junk"    "From:.*Simon"))))
16326         ("my2server"    ("INBOX" nnimap-split-fancy))
16327         ("my[34]server" (".*" (("private" "To:.*Simon")
16328                                ("junk"    my-junk-func))))))
16329 @end lisp
16330
16331 The virtual server name is in fact a regexp, so that the same rules
16332 may apply to several servers.  In the example, the servers
16333 @code{my3server} and @code{my4server} both use the same rules.
16334 Similarly, the inbox string is also a regexp.  The actual splitting
16335 rules are as before, either a function, or a list with group/regexp or
16336 group/function elements.
16337
16338 Nnmail equivalent: @code{nnmail-split-methods}.
16339
16340 @item nnimap-split-predicate
16341 @cindex splitting
16342 @vindex nnimap-split-predicate
16343
16344 Mail matching this predicate in @code{nnimap-split-inbox} will be
16345 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
16346
16347 This might be useful if you use another @acronym{IMAP} client to read mail in
16348 your inbox but would like Gnus to split all articles in the inbox
16349 regardless of readedness.  Then you might change this to
16350 @samp{UNDELETED}.
16351
16352 @item nnimap-split-fancy
16353 @cindex splitting, fancy
16354 @findex nnimap-split-fancy
16355 @vindex nnimap-split-fancy
16356
16357 It's possible to set @code{nnimap-split-rule} to
16358 @code{nnmail-split-fancy} if you want to use fancy
16359 splitting.  @xref{Fancy Mail Splitting}.
16360
16361 However, to be able to have different fancy split rules for nnmail and
16362 nnimap back ends you can set @code{nnimap-split-rule} to
16363 @code{nnimap-split-fancy} and define the nnimap specific fancy split
16364 rule in @code{nnimap-split-fancy}.
16365
16366 Example:
16367
16368 @lisp
16369 (setq nnimap-split-rule 'nnimap-split-fancy
16370       nnimap-split-fancy ...)
16371 @end lisp
16372
16373 Nnmail equivalent: @code{nnmail-split-fancy}.
16374
16375 @item nnimap-split-download-body
16376 @findex nnimap-split-download-body
16377 @vindex nnimap-split-download-body
16378
16379 Set to non-@code{nil} to download entire articles during splitting.
16380 This is generally not required, and will slow things down
16381 considerably.  You may need it if you want to use an advanced
16382 splitting function that analyses the body to split the article.
16383
16384 @end table
16385
16386 @node Expiring in IMAP
16387 @subsection Expiring in IMAP
16388 @cindex expiring imap mail
16389
16390 Even though @code{nnimap} is not a proper @code{nnmail} derived back
16391 end, it supports most features in regular expiring (@pxref{Expiring
16392 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
16393 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
16394 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
16395 follows below are the variables used by the @code{nnimap} expiry
16396 process.
16397
16398 A note on how the expire mark is stored on the @acronym{IMAP} server is
16399 appropriate here as well.  The expire mark is translated into a
16400 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
16401 message.  This means that likely only Gnus will understand and treat
16402 the @code{gnus-expire} mark properly, although other clients may allow
16403 you to view client specific flags on the message.  It also means that
16404 your server must support permanent storage of client specific flags on
16405 messages.  Most do, fortunately.
16406
16407 @table @code
16408
16409 @item nnmail-expiry-wait
16410 @item nnmail-expiry-wait-function
16411
16412 These variables are fully supported.  The expire value can be a
16413 number, the symbol @code{immediate} or @code{never}.
16414
16415 @item nnmail-expiry-target
16416
16417 This variable is supported, and internally implemented by calling the
16418 @code{nnmail} functions that handle this.  It contains an optimization
16419 that if the destination is a @acronym{IMAP} group on the same server, the
16420 article is copied instead of appended (that is, uploaded again).
16421
16422 @end table
16423
16424 @node Editing IMAP ACLs
16425 @subsection Editing IMAP ACLs
16426 @cindex editing imap acls
16427 @cindex Access Control Lists
16428 @cindex Editing @acronym{IMAP} ACLs
16429 @kindex G l (Group)
16430 @findex gnus-group-nnimap-edit-acl
16431
16432 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
16433 limiting (or enabling) other users access to your mail boxes.  Not all
16434 @acronym{IMAP} servers support this, this function will give an error if it
16435 doesn't.
16436
16437 To edit an ACL for a mailbox, type @kbd{G l}
16438 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
16439 editing window with detailed instructions.
16440
16441 Some possible uses:
16442
16443 @itemize @bullet
16444 @item
16445 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
16446 on your mailing list mailboxes enables other users on the same server to
16447 follow the list without subscribing to it.
16448 @item
16449 At least with the Cyrus server, you are required to give the user
16450 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
16451 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
16452 INBOX.mailbox).
16453 @end itemize
16454
16455 @node Expunging mailboxes
16456 @subsection Expunging mailboxes
16457 @cindex expunging
16458
16459 @cindex expunge
16460 @cindex manual expunging
16461 @kindex G x (Group)
16462 @findex gnus-group-nnimap-expunge
16463
16464 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
16465 you may want the option of expunging all deleted articles in a mailbox
16466 manually.  This is exactly what @kbd{G x} does.
16467
16468 Currently there is no way of showing deleted articles, you can just
16469 delete them.
16470
16471 @node A note on namespaces
16472 @subsection A note on namespaces
16473 @cindex IMAP namespace
16474 @cindex namespaces
16475
16476 The @acronym{IMAP} protocol has a concept called namespaces, described
16477 by the following text in the RFC:
16478
16479 @display
16480 5.1.2.  Mailbox Namespace Naming Convention
16481
16482    By convention, the first hierarchical element of any mailbox name
16483    which begins with "#" identifies the "namespace" of the remainder of
16484    the name.  This makes it possible to disambiguate between different
16485    types of mailbox stores, each of which have their own namespaces.
16486
16487       For example, implementations which offer access to USENET
16488       newsgroups MAY use the "#news" namespace to partition the USENET
16489       newsgroup namespace from that of other mailboxes.  Thus, the
16490       comp.mail.misc newsgroup would have an mailbox name of
16491       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
16492       to a different object (e.g. a user's private mailbox).
16493 @end display
16494
16495 While there is nothing in this text that warrants concern for the
16496 @acronym{IMAP} implementation in Gnus, some servers use namespace
16497 prefixes in a way that does not work with how Gnus uses mailbox names.
16498
16499 Specifically, University of Washington's @acronym{IMAP} server uses
16500 mailbox names like @code{#driver.mbx/read-mail} which are valid only
16501 in the @sc{create} and @sc{append} commands.  After the mailbox is
16502 created (or a messages is appended to a mailbox), it must be accessed
16503 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
16504 not make it possible for the user to guarantee that user entered
16505 mailbox names will only be used with the CREATE and APPEND commands,
16506 you should simply not use the namespace prefixed mailbox names in
16507 Gnus.
16508
16509 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
16510 for more information on how to use the prefixes.  They are a power
16511 tool and should be used only if you are sure what the effects are.
16512
16513 @node Debugging IMAP
16514 @subsection Debugging IMAP
16515 @cindex IMAP debugging
16516 @cindex protocol dump (IMAP)
16517
16518 @acronym{IMAP} is a complex protocol, more so than @acronym{NNTP} or
16519 @acronym{POP3}.  Implementation bugs are not unlikely, and we do our
16520 best to fix them right away.  If you encounter odd behaviour, chances
16521 are that either the server or Gnus is buggy.
16522
16523 If you are familiar with network protocols in general, you will
16524 probably be able to extract some clues from the protocol dump of the
16525 exchanges between Gnus and the server.  Even if you are not familiar
16526 with network protocols, when you include the protocol dump in
16527 @acronym{IMAP}-related bug reports you are helping us with data
16528 critical to solving the problem.  Therefore, we strongly encourage you
16529 to include the protocol dump when reporting IMAP bugs in Gnus.
16530
16531
16532 @vindex imap-log
16533 Because the protocol dump, when enabled, generates lots of data, it is
16534 disabled by default.  You can enable it by setting @code{imap-log} as
16535 follows: 
16536
16537 @lisp
16538 (setq imap-log t)
16539 @end lisp
16540
16541 This instructs the @code{imap.el} package to log any exchanges with
16542 the server.  The log is stored in the buffer @samp{*imap-log*}.  Look
16543 for error messages, which sometimes are tagged with the keyword
16544 @code{BAD} - but when submitting a bug, make sure to include all the
16545 data.
16546
16547 @node Other Sources
16548 @section Other Sources
16549
16550 Gnus can do more than just read news or mail.  The methods described
16551 below allow Gnus to view directories and files as if they were
16552 newsgroups.
16553
16554 @menu
16555 * Directory Groups::            You can read a directory as if it was a newsgroup.
16556 * Anything Groups::             Dired?  Who needs dired?
16557 * Document Groups::             Single files can be the basis of a group.
16558 * SOUP::                        Reading @sc{soup} packets ``offline''.
16559 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
16560 @end menu
16561
16562
16563 @node Directory Groups
16564 @subsection Directory Groups
16565 @cindex nndir
16566 @cindex directory groups
16567
16568 If you have a directory that has lots of articles in separate files in
16569 it, you might treat it as a newsgroup.  The files have to have numerical
16570 names, of course.
16571
16572 This might be an opportune moment to mention @code{ange-ftp} (and its
16573 successor @code{efs}), that most wonderful of all wonderful Emacs
16574 packages.  When I wrote @code{nndir}, I didn't think much about it---a
16575 back end to read directories.  Big deal.
16576
16577 @code{ange-ftp} changes that picture dramatically.  For instance, if you
16578 enter the @code{ange-ftp} file name
16579 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
16580 @code{ange-ftp} or @code{efs} will actually allow you to read this
16581 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
16582
16583 @code{nndir} will use @acronym{NOV} files if they are present.
16584
16585 @code{nndir} is a ``read-only'' back end---you can't delete or expire
16586 articles with this method.  You can use @code{nnmh} or @code{nnml} for
16587 whatever you use @code{nndir} for, so you could switch to any of those
16588 methods if you feel the need to have a non-read-only @code{nndir}.
16589
16590
16591 @node Anything Groups
16592 @subsection Anything Groups
16593 @cindex nneething
16594
16595 From the @code{nndir} back end (which reads a single spool-like
16596 directory), it's just a hop and a skip to @code{nneething}, which
16597 pretends that any arbitrary directory is a newsgroup.  Strange, but
16598 true.
16599
16600 When @code{nneething} is presented with a directory, it will scan this
16601 directory and assign article numbers to each file.  When you enter such
16602 a group, @code{nneething} must create ``headers'' that Gnus can use.
16603 After all, Gnus is a newsreader, in case you're forgetting.
16604 @code{nneething} does this in a two-step process.  First, it snoops each
16605 file in question.  If the file looks like an article (i.e., the first
16606 few lines look like headers), it will use this as the head.  If this is
16607 just some arbitrary file without a head (e.g. a C source file),
16608 @code{nneething} will cobble up a header out of thin air.  It will use
16609 file ownership, name and date and do whatever it can with these
16610 elements.
16611
16612 All this should happen automatically for you, and you will be presented
16613 with something that looks very much like a newsgroup.  Totally like a
16614 newsgroup, to be precise.  If you select an article, it will be displayed
16615 in the article buffer, just as usual.
16616
16617 If you select a line that represents a directory, Gnus will pop you into
16618 a new summary buffer for this @code{nneething} group.  And so on.  You can
16619 traverse the entire disk this way, if you feel like, but remember that
16620 Gnus is not dired, really, and does not intend to be, either.
16621
16622 There are two overall modes to this action---ephemeral or solid.  When
16623 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
16624 will not store information on what files you have read, and what files
16625 are new, and so on.  If you create a solid @code{nneething} group the
16626 normal way with @kbd{G m}, Gnus will store a mapping table between
16627 article numbers and file names, and you can treat this group like any
16628 other groups.  When you activate a solid @code{nneething} group, you will
16629 be told how many unread articles it contains, etc., etc.
16630
16631 Some variables:
16632
16633 @table @code
16634 @item nneething-map-file-directory
16635 @vindex nneething-map-file-directory
16636 All the mapping files for solid @code{nneething} groups will be stored
16637 in this directory, which defaults to @file{~/.nneething/}.
16638
16639 @item nneething-exclude-files
16640 @vindex nneething-exclude-files
16641 All files that match this regexp will be ignored.  Nice to use to exclude
16642 auto-save files and the like, which is what it does by default.
16643
16644 @item nneething-include-files
16645 @vindex nneething-include-files
16646 Regexp saying what files to include in the group.  If this variable is
16647 non-@code{nil}, only files matching this regexp will be included.
16648
16649 @item nneething-map-file
16650 @vindex nneething-map-file
16651 Name of the map files.
16652 @end table
16653
16654
16655 @node Document Groups
16656 @subsection Document Groups
16657 @cindex nndoc
16658 @cindex documentation group
16659 @cindex help group
16660
16661 @code{nndoc} is a cute little thing that will let you read a single file
16662 as a newsgroup.  Several files types are supported:
16663
16664 @table @code
16665 @cindex Babyl
16666 @cindex Rmail mbox
16667
16668 @item babyl
16669 The Babyl (Rmail) mail box.
16670 @cindex mbox
16671 @cindex Unix mbox
16672
16673 @item mbox
16674 The standard Unix mbox file.
16675
16676 @cindex MMDF mail box
16677 @item mmdf
16678 The MMDF mail box format.
16679
16680 @item news
16681 Several news articles appended into a file.
16682
16683 @item rnews
16684 @cindex rnews batch files
16685 The rnews batch transport format.
16686 @cindex forwarded messages
16687
16688 @item forward
16689 Forwarded articles.
16690
16691 @item nsmail
16692 Netscape mail boxes.
16693
16694 @item mime-parts
16695 @acronym{MIME} multipart messages.
16696
16697 @item standard-digest
16698 The standard (RFC 1153) digest format.
16699
16700 @item mime-digest
16701 A @acronym{MIME} digest of messages.
16702
16703 @item lanl-gov-announce
16704 Announcement messages from LANL Gov Announce.
16705
16706 @item rfc822-forward
16707 A message forwarded according to RFC822.
16708
16709 @item outlook
16710 The Outlook mail box.
16711
16712 @item oe-dbx
16713 The Outlook Express dbx mail box.
16714
16715 @item exim-bounce
16716 A bounce message from the Exim MTA.
16717
16718 @item forward
16719 A message forwarded according to informal rules.
16720
16721 @item rfc934
16722 An RFC934-forwarded message.
16723
16724 @item mailman
16725 A mailman digest.
16726
16727 @item clari-briefs
16728 A digest of Clarinet brief news items.
16729
16730 @item slack-digest
16731 Non-standard digest format---matches most things, but does it badly.
16732
16733 @item mail-in-mail
16734 The last resort.
16735 @end table
16736
16737 You can also use the special ``file type'' @code{guess}, which means
16738 that @code{nndoc} will try to guess what file type it is looking at.
16739 @code{digest} means that @code{nndoc} should guess what digest type the
16740 file is.
16741
16742 @code{nndoc} will not try to change the file or insert any extra headers into
16743 it---it will simply, like, let you use the file as the basis for a
16744 group.  And that's it.
16745
16746 If you have some old archived articles that you want to insert into your
16747 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
16748 that.  Say you have an old @file{RMAIL} file with mail that you now want
16749 to split into your new @code{nnml} groups.  You look at that file using
16750 @code{nndoc} (using the @kbd{G f} command in the group buffer
16751 (@pxref{Foreign Groups})), set the process mark on all the articles in
16752 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
16753 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
16754 file is now also stored in lots of @code{nnml} directories, and you can
16755 delete that pesky @file{RMAIL} file.  If you have the guts!
16756
16757 Virtual server variables:
16758
16759 @table @code
16760 @item nndoc-article-type
16761 @vindex nndoc-article-type
16762 This should be one of @code{mbox}, @code{babyl}, @code{digest},
16763 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
16764 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
16765 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
16766 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
16767
16768 @item nndoc-post-type
16769 @vindex nndoc-post-type
16770 This variable says whether Gnus is to consider the group a news group or
16771 a mail group.  There are two valid values:  @code{mail} (the default)
16772 and @code{news}.
16773 @end table
16774
16775 @menu
16776 * Document Server Internals::   How to add your own document types.
16777 @end menu
16778
16779
16780 @node Document Server Internals
16781 @subsubsection Document Server Internals
16782
16783 Adding new document types to be recognized by @code{nndoc} isn't
16784 difficult.  You just have to whip up a definition of what the document
16785 looks like, write a predicate function to recognize that document type,
16786 and then hook into @code{nndoc}.
16787
16788 First, here's an example document type definition:
16789
16790 @example
16791 (mmdf
16792  (article-begin .  "^\^A\^A\^A\^A\n")
16793  (body-end .  "^\^A\^A\^A\^A\n"))
16794 @end example
16795
16796 The definition is simply a unique @dfn{name} followed by a series of
16797 regexp pseudo-variable settings.  Below are the possible
16798 variables---don't be daunted by the number of variables; most document
16799 types can be defined with very few settings:
16800
16801 @table @code
16802 @item first-article
16803 If present, @code{nndoc} will skip past all text until it finds
16804 something that match this regexp.  All text before this will be
16805 totally ignored.
16806
16807 @item article-begin
16808 This setting has to be present in all document type definitions.  It
16809 says what the beginning of each article looks like.
16810
16811 @item head-begin-function
16812 If present, this should be a function that moves point to the head of
16813 the article.
16814
16815 @item nndoc-head-begin
16816 If present, this should be a regexp that matches the head of the
16817 article.
16818
16819 @item nndoc-head-end
16820 This should match the end of the head of the article.  It defaults to
16821 @samp{^$}---the empty line.
16822
16823 @item body-begin-function
16824 If present, this function should move point to the beginning of the body
16825 of the article.
16826
16827 @item body-begin
16828 This should match the beginning of the body of the article.  It defaults
16829 to @samp{^\n}.
16830
16831 @item body-end-function
16832 If present, this function should move point to the end of the body of
16833 the article.
16834
16835 @item body-end
16836 If present, this should match the end of the body of the article.
16837
16838 @item file-end
16839 If present, this should match the end of the file.  All text after this
16840 regexp will be totally ignored.
16841
16842 @end table
16843
16844 So, using these variables @code{nndoc} is able to dissect a document
16845 file into a series of articles, each with a head and a body.  However, a
16846 few more variables are needed since not all document types are all that
16847 news-like---variables needed to transform the head or the body into
16848 something that's palatable for Gnus:
16849
16850 @table @code
16851 @item prepare-body-function
16852 If present, this function will be called when requesting an article.  It
16853 will be called with point at the start of the body, and is useful if the
16854 document has encoded some parts of its contents.
16855
16856 @item article-transform-function
16857 If present, this function is called when requesting an article.  It's
16858 meant to be used for more wide-ranging transformation of both head and
16859 body of the article.
16860
16861 @item generate-head-function
16862 If present, this function is called to generate a head that Gnus can
16863 understand.  It is called with the article number as a parameter, and is
16864 expected to generate a nice head for the article in question.  It is
16865 called when requesting the headers of all articles.
16866
16867 @end table
16868
16869 Let's look at the most complicated example I can come up with---standard
16870 digests:
16871
16872 @example
16873 (standard-digest
16874  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
16875  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
16876  (prepare-body-function . nndoc-unquote-dashes)
16877  (body-end-function . nndoc-digest-body-end)
16878  (head-end . "^ ?$")
16879  (body-begin . "^ ?\n")
16880  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
16881  (subtype digest guess))
16882 @end example
16883
16884 We see that all text before a 70-width line of dashes is ignored; all
16885 text after a line that starts with that @samp{^End of} is also ignored;
16886 each article begins with a 30-width line of dashes; the line separating
16887 the head from the body may contain a single space; and that the body is
16888 run through @code{nndoc-unquote-dashes} before being delivered.
16889
16890 To hook your own document definition into @code{nndoc}, use the
16891 @code{nndoc-add-type} function.  It takes two parameters---the first
16892 is the definition itself and the second (optional) parameter says
16893 where in the document type definition alist to put this definition.
16894 The alist is traversed sequentially, and
16895 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
16896 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
16897 @code{mmdf} type, and so on.  These type predicates should return
16898 @code{nil} if the document is not of the correct type; @code{t} if it
16899 is of the correct type; and a number if the document might be of the
16900 correct type.  A high number means high probability; a low number
16901 means low probability with @samp{0} being the lowest valid number.
16902
16903
16904 @node SOUP
16905 @subsection SOUP
16906 @cindex SOUP
16907 @cindex offline
16908
16909 In the PC world people often talk about ``offline'' newsreaders.  These
16910 are thingies that are combined reader/news transport monstrosities.
16911 With built-in modem programs.  Yecchh!
16912
16913 Of course, us Unix Weenie types of human beans use things like
16914 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
16915 transport things like Ghod intended.  And then we just use normal
16916 newsreaders.
16917
16918 However, it can sometimes be convenient to do something that's a bit
16919 easier on the brain if you have a very slow modem, and you're not really
16920 that interested in doing things properly.
16921
16922 A file format called @sc{soup} has been developed for transporting news
16923 and mail from servers to home machines and back again.  It can be a bit
16924 fiddly.
16925
16926 First some terminology:
16927
16928 @table @dfn
16929
16930 @item server
16931 This is the machine that is connected to the outside world and where you
16932 get news and/or mail from.
16933
16934 @item home machine
16935 This is the machine that you want to do the actual reading and responding
16936 on.  It is typically not connected to the rest of the world in any way.
16937
16938 @item packet
16939 Something that contains messages and/or commands.  There are two kinds
16940 of packets:
16941
16942 @table @dfn
16943 @item message packets
16944 These are packets made at the server, and typically contain lots of
16945 messages for you to read.  These are called @file{SoupoutX.tgz} by
16946 default, where @var{x} is a number.
16947
16948 @item response packets
16949 These are packets made at the home machine, and typically contains
16950 replies that you've written.  These are called @file{SoupinX.tgz} by
16951 default, where @var{x} is a number.
16952
16953 @end table
16954
16955 @end table
16956
16957
16958 @enumerate
16959
16960 @item
16961 You log in on the server and create a @sc{soup} packet.  You can either
16962 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
16963 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
16964 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
16965
16966 @item
16967 You transfer the packet home.  Rail, boat, car or modem will do fine.
16968
16969 @item
16970 You put the packet in your home directory.
16971
16972 @item
16973 You fire up Gnus on your home machine using the @code{nnsoup} back end as
16974 the native or secondary server.
16975
16976 @item
16977 You read articles and mail and answer and followup to the things you
16978 want (@pxref{SOUP Replies}).
16979
16980 @item
16981 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16982 packet.
16983
16984 @item
16985 You transfer this packet to the server.
16986
16987 @item
16988 You use Gnus to mail this packet out with the @kbd{G s s} command.
16989
16990 @item
16991 You then repeat until you die.
16992
16993 @end enumerate
16994
16995 So you basically have a bipartite system---you use @code{nnsoup} for
16996 reading and Gnus for packing/sending these @sc{soup} packets.
16997
16998 @menu
16999 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
17000 * SOUP Groups::                 A back end for reading @sc{soup} packets.
17001 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
17002 @end menu
17003
17004
17005 @node SOUP Commands
17006 @subsubsection SOUP Commands
17007
17008 These are commands for creating and manipulating @sc{soup} packets.
17009
17010 @table @kbd
17011 @item G s b
17012 @kindex G s b (Group)
17013 @findex gnus-group-brew-soup
17014 Pack all unread articles in the current group
17015 (@code{gnus-group-brew-soup}).  This command understands the
17016 process/prefix convention.
17017
17018 @item G s w
17019 @kindex G s w (Group)
17020 @findex gnus-soup-save-areas
17021 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
17022
17023 @item G s s
17024 @kindex G s s (Group)
17025 @findex gnus-soup-send-replies
17026 Send all replies from the replies packet
17027 (@code{gnus-soup-send-replies}).
17028
17029 @item G s p
17030 @kindex G s p (Group)
17031 @findex gnus-soup-pack-packet
17032 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
17033
17034 @item G s r
17035 @kindex G s r (Group)
17036 @findex nnsoup-pack-replies
17037 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
17038
17039 @item O s
17040 @kindex O s (Summary)
17041 @findex gnus-soup-add-article
17042 This summary-mode command adds the current article to a @sc{soup} packet
17043 (@code{gnus-soup-add-article}).  It understands the process/prefix
17044 convention (@pxref{Process/Prefix}).
17045
17046 @end table
17047
17048
17049 There are a few variables to customize where Gnus will put all these
17050 thingies:
17051
17052 @table @code
17053
17054 @item gnus-soup-directory
17055 @vindex gnus-soup-directory
17056 Directory where Gnus will save intermediate files while composing
17057 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
17058
17059 @item gnus-soup-replies-directory
17060 @vindex gnus-soup-replies-directory
17061 This is what Gnus will use as a temporary directory while sending our
17062 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
17063
17064 @item gnus-soup-prefix-file
17065 @vindex gnus-soup-prefix-file
17066 Name of the file where Gnus stores the last used prefix.  The default is
17067 @samp{gnus-prefix}.
17068
17069 @item gnus-soup-packer
17070 @vindex gnus-soup-packer
17071 A format string command for packing a @sc{soup} packet.  The default is
17072 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
17073
17074 @item gnus-soup-unpacker
17075 @vindex gnus-soup-unpacker
17076 Format string command for unpacking a @sc{soup} packet.  The default is
17077 @samp{gunzip -c %s | tar xvf -}.
17078
17079 @item gnus-soup-packet-directory
17080 @vindex gnus-soup-packet-directory
17081 Where Gnus will look for reply packets.  The default is @file{~/}.
17082
17083 @item gnus-soup-packet-regexp
17084 @vindex gnus-soup-packet-regexp
17085 Regular expression matching @sc{soup} reply packets in
17086 @code{gnus-soup-packet-directory}.
17087
17088 @end table
17089
17090
17091 @node SOUP Groups
17092 @subsubsection SOUP Groups
17093 @cindex nnsoup
17094
17095 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
17096 read incoming packets, unpack them, and put them in a directory where
17097 you can read them at leisure.
17098
17099 These are the variables you can use to customize its behavior:
17100
17101 @table @code
17102
17103 @item nnsoup-tmp-directory
17104 @vindex nnsoup-tmp-directory
17105 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
17106 directory.  (@file{/tmp/} by default.)
17107
17108 @item nnsoup-directory
17109 @vindex nnsoup-directory
17110 @code{nnsoup} then moves each message and index file to this directory.
17111 The default is @file{~/SOUP/}.
17112
17113 @item nnsoup-replies-directory
17114 @vindex nnsoup-replies-directory
17115 All replies will be stored in this directory before being packed into a
17116 reply packet.  The default is @file{~/SOUP/replies/}.
17117
17118 @item nnsoup-replies-format-type
17119 @vindex nnsoup-replies-format-type
17120 The @sc{soup} format of the replies packets.  The default is @samp{?n}
17121 (rnews), and I don't think you should touch that variable.  I probably
17122 shouldn't even have documented it.  Drats!  Too late!
17123
17124 @item nnsoup-replies-index-type
17125 @vindex nnsoup-replies-index-type
17126 The index type of the replies packet.  The default is @samp{?n}, which
17127 means ``none''.  Don't fiddle with this one either!
17128
17129 @item nnsoup-active-file
17130 @vindex nnsoup-active-file
17131 Where @code{nnsoup} stores lots of information.  This is not an ``active
17132 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
17133 this file or mess it up in any way, you're dead.  The default is
17134 @file{~/SOUP/active}.
17135
17136 @item nnsoup-packer
17137 @vindex nnsoup-packer
17138 Format string command for packing a reply @sc{soup} packet.  The default
17139 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
17140
17141 @item nnsoup-unpacker
17142 @vindex nnsoup-unpacker
17143 Format string command for unpacking incoming @sc{soup} packets.  The
17144 default is @samp{gunzip -c %s | tar xvf -}.
17145
17146 @item nnsoup-packet-directory
17147 @vindex nnsoup-packet-directory
17148 Where @code{nnsoup} will look for incoming packets.  The default is
17149 @file{~/}.
17150
17151 @item nnsoup-packet-regexp
17152 @vindex nnsoup-packet-regexp
17153 Regular expression matching incoming @sc{soup} packets.  The default is
17154 @samp{Soupout}.
17155
17156 @item nnsoup-always-save
17157 @vindex nnsoup-always-save
17158 If non-@code{nil}, save the replies buffer after each posted message.
17159
17160 @end table
17161
17162
17163 @node SOUP Replies
17164 @subsubsection SOUP Replies
17165
17166 Just using @code{nnsoup} won't mean that your postings and mailings end
17167 up in @sc{soup} reply packets automagically.  You have to work a bit
17168 more for that to happen.
17169
17170 @findex nnsoup-set-variables
17171 The @code{nnsoup-set-variables} command will set the appropriate
17172 variables to ensure that all your followups and replies end up in the
17173 @sc{soup} system.
17174
17175 In specific, this is what it does:
17176
17177 @lisp
17178 (setq message-send-news-function 'nnsoup-request-post)
17179 (setq message-send-mail-function 'nnsoup-request-mail)
17180 @end lisp
17181
17182 And that's it, really.  If you only want news to go into the @sc{soup}
17183 system you just use the first line.  If you only want mail to be
17184 @sc{soup}ed you use the second.
17185
17186
17187 @node Mail-To-News Gateways
17188 @subsection Mail-To-News Gateways
17189 @cindex mail-to-news gateways
17190 @cindex gateways
17191
17192 If your local @code{nntp} server doesn't allow posting, for some reason
17193 or other, you can post using one of the numerous mail-to-news gateways.
17194 The @code{nngateway} back end provides the interface.
17195
17196 Note that you can't read anything from this back end---it can only be
17197 used to post with.
17198
17199 Server variables:
17200
17201 @table @code
17202 @item nngateway-address
17203 @vindex nngateway-address
17204 This is the address of the mail-to-news gateway.
17205
17206 @item nngateway-header-transformation
17207 @vindex nngateway-header-transformation
17208 News headers often have to be transformed in some odd way or other
17209 for the mail-to-news gateway to accept it.  This variable says what
17210 transformation should be called, and defaults to
17211 @code{nngateway-simple-header-transformation}.  The function is called
17212 narrowed to the headers to be transformed and with one parameter---the
17213 gateway address.
17214
17215 This default function just inserts a new @code{To} header based on the
17216 @code{Newsgroups} header and the gateway address.
17217 For instance, an article with this @code{Newsgroups} header:
17218
17219 @example
17220 Newsgroups: alt.religion.emacs
17221 @end example
17222
17223 will get this @code{To} header inserted:
17224
17225 @example
17226 To: alt-religion-emacs@@GATEWAY
17227 @end example
17228
17229 The following pre-defined functions exist:
17230
17231 @findex nngateway-simple-header-transformation
17232 @table @code
17233
17234 @item nngateway-simple-header-transformation
17235 Creates a @code{To} header that looks like
17236 @var{newsgroup}@@@code{nngateway-address}.
17237
17238 @findex nngateway-mail2news-header-transformation
17239
17240 @item nngateway-mail2news-header-transformation
17241 Creates a @code{To} header that looks like
17242 @code{nngateway-address}.
17243 @end table
17244
17245 @end table
17246
17247 Here's an example:
17248
17249 @lisp
17250 (setq gnus-post-method
17251       '(nngateway
17252         "mail2news@@replay.com"
17253         (nngateway-header-transformation
17254          nngateway-mail2news-header-transformation)))
17255 @end lisp
17256
17257 So, to use this, simply say something like:
17258
17259 @lisp
17260 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
17261 @end lisp
17262
17263
17264
17265 @node Combined Groups
17266 @section Combined Groups
17267
17268 Gnus allows combining a mixture of all the other group types into bigger
17269 groups.
17270
17271 @menu
17272 * Virtual Groups::              Combining articles from many groups.
17273 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
17274 @end menu
17275
17276
17277 @node Virtual Groups
17278 @subsection Virtual Groups
17279 @cindex nnvirtual
17280 @cindex virtual groups
17281 @cindex merging groups
17282
17283 An @dfn{nnvirtual group} is really nothing more than a collection of
17284 other groups.
17285
17286 For instance, if you are tired of reading many small groups, you can
17287 put them all in one big group, and then grow tired of reading one
17288 big, unwieldy group.  The joys of computing!
17289
17290 You specify @code{nnvirtual} as the method.  The address should be a
17291 regexp to match component groups.
17292
17293 All marks in the virtual group will stick to the articles in the
17294 component groups.  So if you tick an article in a virtual group, the
17295 article will also be ticked in the component group from whence it
17296 came.  (And vice versa---marks from the component groups will also be
17297 shown in the virtual group.).  To create an empty virtual group, run
17298 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
17299 and edit the method regexp with @kbd{M-e}
17300 (@code{gnus-group-edit-group-method})
17301
17302 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
17303 newsgroups into one, big, happy newsgroup:
17304
17305 @lisp
17306 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
17307 @end lisp
17308
17309 The component groups can be native or foreign; everything should work
17310 smoothly, but if your computer explodes, it was probably my fault.
17311
17312 Collecting the same group from several servers might actually be a good
17313 idea if users have set the Distribution header to limit distribution.
17314 If you would like to read @samp{soc.motss} both from a server in Japan
17315 and a server in Norway, you could use the following as the group regexp:
17316
17317 @example
17318 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
17319 @end example
17320
17321 (Remember, though, that if you're creating the group with @kbd{G m}, you
17322 shouldn't double the backslashes, and you should leave off the quote
17323 characters at the beginning and the end of the string.)
17324
17325 This should work kinda smoothly---all articles from both groups should
17326 end up in this one, and there should be no duplicates.  Threading (and
17327 the rest) will still work as usual, but there might be problems with the
17328 sequence of articles.  Sorting on date might be an option here
17329 (@pxref{Selecting a Group}).
17330
17331 One limitation, however---all groups included in a virtual
17332 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
17333 zombie groups can't be component groups for @code{nnvirtual} groups.
17334
17335 @vindex nnvirtual-always-rescan
17336 If the @code{nnvirtual-always-rescan} is non-@code{nil},
17337 @code{nnvirtual} will always scan groups for unread articles when
17338 entering a virtual group.  If this variable is @code{nil} (which is the
17339 default) and you read articles in a component group after the virtual
17340 group has been activated, the read articles from the component group
17341 will show up when you enter the virtual group.  You'll also see this
17342 effect if you have two virtual groups that have a component group in
17343 common.  If that's the case, you should set this variable to @code{t}.
17344 Or you can just tap @code{M-g} on the virtual group every time before
17345 you enter it---it'll have much the same effect.
17346
17347 @code{nnvirtual} can have both mail and news groups as component groups.
17348 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
17349 has to ask the back end of the component group the article comes from
17350 whether it is a news or mail back end.  However, when you do a @kbd{^},
17351 there is typically no sure way for the component back end to know this,
17352 and in that case @code{nnvirtual} tells Gnus that the article came from a
17353 not-news back end.  (Just to be on the safe side.)
17354
17355 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
17356 line from the article you respond to in these cases.
17357
17358 @code{nnvirtual} groups do not inherit anything but articles and marks
17359 from component groups---group parameters, for instance, are not
17360 inherited.
17361
17362
17363 @node Kibozed Groups
17364 @subsection Kibozed Groups
17365 @cindex nnkiboze
17366 @cindex kibozing
17367
17368 @dfn{Kibozing} is defined by the @acronym{OED} as ``grepping through
17369 (parts of) the news feed''.  @code{nnkiboze} is a back end that will
17370 do this for you.  Oh joy!  Now you can grind any @acronym{NNTP} server
17371 down to a halt with useless requests!  Oh happiness!
17372
17373 @kindex G k (Group)
17374 To create a kibozed group, use the @kbd{G k} command in the group
17375 buffer.
17376
17377 The address field of the @code{nnkiboze} method is, as with
17378 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
17379 @code{nnkiboze} group.  That's where most similarities between
17380 @code{nnkiboze} and @code{nnvirtual} end.
17381
17382 In addition to this regexp detailing component groups, an
17383 @code{nnkiboze} group must have a score file to say what articles are
17384 to be included in the group (@pxref{Scoring}).
17385
17386 @kindex M-x nnkiboze-generate-groups
17387 @findex nnkiboze-generate-groups
17388 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
17389 @code{nnkiboze} groups you want to have.  This command will take time.
17390 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
17391 headers from all the articles in all the component groups and run them
17392 through the scoring process to determine if there are any articles in
17393 the groups that are to be part of the @code{nnkiboze} groups.
17394
17395 Please limit the number of component groups by using restrictive
17396 regexps.  Otherwise your sysadmin may become annoyed with you, and the
17397 @acronym{NNTP} site may throw you off and never let you back in again.
17398 Stranger things have happened.
17399
17400 @code{nnkiboze} component groups do not have to be alive---they can be dead,
17401 and they can be foreign.  No restrictions.
17402
17403 @vindex nnkiboze-directory
17404 The generation of an @code{nnkiboze} group means writing two files in
17405 @code{nnkiboze-directory}, which is @file{~/News/kiboze/} by default.
17406 One contains the @acronym{NOV} header lines for all the articles in
17407 the group, and the other is an additional @file{.newsrc} file to store
17408 information on what groups have been searched through to find
17409 component articles.
17410
17411 Articles marked as read in the @code{nnkiboze} group will have
17412 their @acronym{NOV} lines removed from the @acronym{NOV} file.
17413
17414
17415 @node Gnus Unplugged
17416 @section Gnus Unplugged
17417 @cindex offline
17418 @cindex unplugged
17419 @cindex agent
17420 @cindex Gnus agent
17421 @cindex Gnus unplugged
17422
17423 In olden times (ca. February '88), people used to run their newsreaders
17424 on big machines with permanent connections to the net.  News transport
17425 was dealt with by news servers, and all the newsreaders had to do was to
17426 read news.  Believe it or not.
17427
17428 Nowadays most people read news and mail at home, and use some sort of
17429 modem to connect to the net.  To avoid running up huge phone bills, it
17430 would be nice to have a way to slurp down all the news and mail, hang up
17431 the phone, read for several hours, and then upload any responses you
17432 have to make.  And then you repeat the procedure.
17433
17434 Of course, you can use news servers for doing this as well.  I've used
17435 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
17436 for some years, but doing that's a bore.  Moving the news server
17437 functionality up to the newsreader makes sense if you're the only person
17438 reading news on a machine.
17439
17440 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
17441 fact, you don't even have to configure anything.
17442
17443 Of course, to use it as such, you have to learn a few new commands.
17444
17445 @menu
17446 * Agent Basics::                How it all is supposed to work.
17447 * Agent Categories::            How to tell the Gnus Agent what to download.
17448 * Agent Commands::              New commands for all the buffers.
17449 * Agent Visuals::               Ways that the agent may effect your summary buffer.
17450 * Agent as Cache::              The Agent is a big cache too.
17451 * Agent Expiry::                How to make old articles go away.
17452 * Agent Regeneration::          How to recover from lost connections and other accidents.
17453 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
17454 * Outgoing Messages::           What happens when you post/mail something?
17455 * Agent Variables::             Customizing is fun.
17456 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
17457 * Batching Agents::             How to fetch news from a @code{cron} job.
17458 * Agent Caveats::               What you think it'll do and what it does.
17459 @end menu
17460
17461
17462 @node Agent Basics
17463 @subsection Agent Basics
17464
17465 First, let's get some terminology out of the way.
17466
17467 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
17468 connection to the net (and notified the Agent that this is the case).
17469 When the connection to the net is up again (and Gnus knows this), the
17470 Agent is @dfn{plugged}.
17471
17472 The @dfn{local} machine is the one you're running on, and which isn't
17473 connected to the net continuously.
17474
17475 @dfn{Downloading} means fetching things from the net to your local
17476 machine.  @dfn{Uploading} is doing the opposite.
17477
17478 You know that Gnus gives you all the opportunity you'd ever want for
17479 shooting yourself in the foot.  Some people call it flexibility.  Gnus
17480 is also customizable to a great extent, which means that the user has a
17481 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
17482 you in your foot, but with Gnus, you have a choice!
17483
17484 Gnus is never really in plugged or unplugged state.  Rather, it applies
17485 that state to each server individually.  This means that some servers
17486 can be plugged while others can be unplugged.  Additionally, some
17487 servers can be ignored by the Agent altogether (which means that
17488 they're kinda like plugged always).
17489
17490 So when you unplug the Agent and then wonder why is Gnus opening a
17491 connection to the Net, the next step to do is to look whether all
17492 servers are agentized.  If there is an unagentized server, you found
17493 the culprit.
17494
17495 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
17496 reachable.  When Gnus notices this, it asks you whether you want the
17497 server to be switched to offline state.  If you say yes, then the
17498 server will behave somewhat as if it was unplugged, except that Gnus
17499 will ask you whether you want to switch it back online again.
17500
17501 Let's take a typical Gnus session using the Agent.
17502
17503 @itemize @bullet
17504
17505 @item
17506 @findex gnus-unplugged
17507 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
17508 Agent in a disconnected state.  You can read all the news that you have
17509 already fetched while in this mode.
17510
17511 @item
17512 You then decide to see whether any new news has arrived.  You connect
17513 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
17514 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
17515 as usual.  To check for new mail in unplugged mode (@pxref{Mail
17516 Source Specifiers}).
17517
17518 @item
17519 You can then read the new news immediately, or you can download the
17520 news onto your local machine.  If you want to do the latter, you press
17521 @kbd{g} to check if there are any new news and then @kbd{J s} to fetch
17522 all the eligible articles in all the groups.  (To let Gnus know which
17523 articles you want to download, @pxref{Agent Categories}).
17524
17525 @item
17526 After fetching the articles, you press @kbd{J j} to make Gnus become
17527 unplugged again, and you shut down the PPP thing (or whatever).  And
17528 then you read the news offline.
17529
17530 @item
17531 And then you go to step 2.
17532 @end itemize
17533
17534 Here are some things you should do the first time (or so) that you use
17535 the Agent.
17536
17537 @itemize @bullet
17538
17539 @item
17540 Decide which servers should be covered by the Agent.  If you have a mail
17541 back end, it would probably be nonsensical to have it covered by the
17542 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
17543 @kbd{J a} on the server (or servers) that you wish to have covered by the
17544 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
17545 added servers you do not wish to have covered by the Agent.  By default,
17546 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
17547 @code{gnus-secondary-select-methods} are agentized.
17548
17549 @item
17550 Decide on download policy.  It's fairly simple once you decide whether
17551 you are going to use agent categories, topic parameters, and/or group
17552 parameters to implement your policy.  If you're new to gnus, it
17553 is probably best to start with a category, @xref{Agent Categories}.
17554
17555 Both topic parameters (@pxref{Topic Parameters}) and agent categories
17556 (@pxref{Agent Categories}) provide for setting a policy that applies
17557 to multiple groups.  Which you use is entirely up to you.  Topic
17558 parameters do override categories so, if you mix the two, you'll have
17559 to take that into account.  If you have a few groups that deviate from
17560 your policy, you can use group parameters (@pxref{Group Parameters}) to
17561 configure them.
17562
17563 @item
17564 Uhm@dots{} that's it.
17565 @end itemize
17566
17567
17568 @node Agent Categories
17569 @subsection Agent Categories
17570
17571 One of the main reasons to integrate the news transport layer into the
17572 newsreader is to allow greater control over what articles to download.
17573 There's not much point in downloading huge amounts of articles, just to
17574 find out that you're not interested in reading any of them.  It's better
17575 to be somewhat more conservative in choosing what to download, and then
17576 mark the articles for downloading manually if it should turn out that
17577 you're interested in the articles anyway.
17578
17579 One of the more effective methods for controlling what is to be
17580 downloaded is to create a @dfn{category} and then assign some (or all)
17581 groups to this category.  Groups that do not belong in any other
17582 category belong to the @code{default} category.  Gnus has its own
17583 buffer for creating and managing categories.
17584
17585 If you prefer, you can also use group parameters (@pxref{Group
17586 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
17587 alternative approach to controlling the agent.  The only real
17588 difference is that categories are specific to the agent (so there is
17589 less to learn) while group and topic parameters include the kitchen
17590 sink.
17591
17592 Since you can set agent parameters in several different places we have
17593 a rule to decide which source to believe.  This rule specifies that
17594 the parameter sources are checked in the following order: group
17595 parameters, topic parameters, agent category, and finally customizable
17596 variables.  So you can mix all of these sources to produce a wide range
17597 of behavior, just don't blame me if you don't remember where you put
17598 your settings.
17599
17600 @menu
17601 * Category Syntax::             What a category looks like.
17602 * Category Buffer::             A buffer for maintaining categories.
17603 * Category Variables::          Customize'r'Us.
17604 @end menu
17605
17606
17607 @node Category Syntax
17608 @subsubsection Category Syntax
17609
17610 A category consists of a name, the list of groups belonging to the
17611 category, and a number of optional parameters that override the
17612 customizable variables.  The complete list of agent parameters are
17613 listed below.
17614
17615 @cindex Agent Parameters
17616 @table @code
17617 @item gnus-agent-cat-name
17618 The name of the category.
17619
17620 @item gnus-agent-cat-groups
17621 The list of groups that are in this category.
17622
17623 @item gnus-agent-cat-predicate
17624 A predicate which (generally) gives a rough outline of which articles
17625 are eligible for downloading; and
17626
17627 @item gnus-agent-cat-score-file
17628 a score rule which (generally) gives you a finer granularity when
17629 deciding what articles to download.  (Note that this @dfn{download
17630 score} is not necessarily related to normal scores.)
17631
17632 @item gnus-agent-cat-enable-expiration
17633 a boolean indicating whether the agent should expire old articles in
17634 this group.  Most groups should be expired to conserve disk space.  In
17635 fact, its probably safe to say that the gnus.* hierarchy contains the
17636 only groups that should not be expired.
17637
17638 @item gnus-agent-cat-days-until-old
17639 an integer indicating the number of days that the agent should wait
17640 before deciding that a read article is safe to expire.
17641
17642 @item gnus-agent-cat-low-score
17643 an integer that overrides the value of @code{gnus-agent-low-score}.
17644
17645 @item gnus-agent-cat-high-score
17646 an integer that overrides the value of @code{gnus-agent-high-score}.
17647
17648 @item gnus-agent-cat-length-when-short
17649 an integer that overrides the value of
17650 @code{gnus-agent-short-article}.
17651
17652 @item gnus-agent-cat-length-when-long
17653 an integer that overrides the value of @code{gnus-agent-long-article}.
17654
17655 @c @item gnus-agent-cat-disable-undownloaded-faces
17656 @c a symbol indicating whether the summary buffer should @emph{not} display
17657 @c undownloaded articles using the gnus-summary-*-undownloaded-face
17658 @c faces.  The symbol nil will enable the use of undownloaded faces while
17659 @c all other symbols disable them.
17660
17661 @item gnus-agent-cat-enable-undownloaded-faces
17662 a symbol indicating whether the summary buffer should display
17663 undownloaded articles using the gnus-summary-*-undownloaded-face
17664 faces.  The symbol nil will disable the use of undownloaded faces while
17665 all other symbols enable them.
17666 @end table
17667
17668 The name of a category can not be changed once the category has been
17669 created.
17670
17671 Each category maintains a list of groups that are exclusive members of
17672 that category.  The exclusivity rule is automatically enforced, add a
17673 group to a new category and it is automatically removed from its old
17674 category.
17675
17676 A predicate in its simplest form can be a single predicate such as
17677 @code{true} or @code{false}.  These two will download every available
17678 article or nothing respectively.  In the case of these two special
17679 predicates an additional score rule is superfluous.
17680
17681 Predicates of @code{high} or @code{low} download articles in respect of
17682 their scores in relationship to @code{gnus-agent-high-score} and
17683 @code{gnus-agent-low-score} as described below.
17684
17685 To gain even finer control of what is to be regarded eligible for
17686 download a predicate can consist of a number of predicates with logical
17687 operators sprinkled in between.
17688
17689 Perhaps some examples are in order.
17690
17691 Here's a simple predicate.  (It's the default predicate, in fact, used
17692 for all groups that don't belong to any other category.)
17693
17694 @lisp
17695 short
17696 @end lisp
17697
17698 Quite simple, eh?  This predicate is true if and only if the article is
17699 short (for some value of ``short'').
17700
17701 Here's a more complex predicate:
17702
17703 @lisp
17704 (or high
17705     (and
17706      (not low)
17707      (not long)))
17708 @end lisp
17709
17710 This means that an article should be downloaded if it has a high score,
17711 or if the score is not low and the article is not long.  You get the
17712 drift.
17713
17714 The available logical operators are @code{or}, @code{and} and
17715 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
17716 @samp{|}, @code{&} and @code{!} instead.)
17717
17718 The following predicates are pre-defined, but if none of these fit what
17719 you want to do, you can write your own.
17720
17721 When evaluating each of these predicates, the named constant will be
17722 bound to the value determined by calling
17723 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
17724 example, gnus-agent-short-article will be bound to
17725 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
17726 means that you can specify a predicate in your category then tune that
17727 predicate to individual groups.
17728
17729 @table @code
17730 @item short
17731 True iff the article is shorter than @code{gnus-agent-short-article}
17732 lines; default 100.
17733
17734 @item long
17735 True iff the article is longer than @code{gnus-agent-long-article}
17736 lines; default 200.
17737
17738 @item low
17739 True iff the article has a download score less than
17740 @code{gnus-agent-low-score}; default 0.
17741
17742 @item high
17743 True iff the article has a download score greater than
17744 @code{gnus-agent-high-score}; default 0.
17745
17746 @item spam
17747 True iff the Gnus Agent guesses that the article is spam.  The
17748 heuristics may change over time, but at present it just computes a
17749 checksum and sees whether articles match.
17750
17751 @item true
17752 Always true.
17753
17754 @item false
17755 Always false.
17756 @end table
17757
17758 If you want to create your own predicate function, here's what you have
17759 to know:  The functions are called with no parameters, but the
17760 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
17761 useful values.
17762
17763 For example, you could decide that you don't want to download articles
17764 that were posted more than a certain number of days ago (e.g. posted
17765 more than @code{gnus-agent-expire-days} ago) you might write a function
17766 something along the lines of the following:
17767
17768 @lisp
17769 (defun my-article-old-p ()
17770   "Say whether an article is old."
17771   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
17772      (- (time-to-days (current-time)) gnus-agent-expire-days)))
17773 @end lisp
17774
17775 with the predicate then defined as:
17776
17777 @lisp
17778 (not my-article-old-p)
17779 @end lisp
17780
17781 or you could append your predicate to the predefined
17782 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
17783 wherever.
17784
17785 @lisp
17786 (require 'gnus-agent)
17787 (setq  gnus-category-predicate-alist
17788   (append gnus-category-predicate-alist
17789          '((old . my-article-old-p))))
17790 @end lisp
17791
17792 and simply specify your predicate as:
17793
17794 @lisp
17795 (not old)
17796 @end lisp
17797
17798 If/when using something like the above, be aware that there are many
17799 misconfigured systems/mailers out there and so an article's date is not
17800 always a reliable indication of when it was posted.  Hell, some people
17801 just don't give a damn.
17802
17803 The above predicates apply to @emph{all} the groups which belong to the
17804 category.  However, if you wish to have a specific predicate for an
17805 individual group within a category, or you're just too lazy to set up a
17806 new category, you can enter a group's individual predicate in its group
17807 parameters like so:
17808
17809 @lisp
17810 (agent-predicate . short)
17811 @end lisp
17812
17813 This is the group/topic parameter equivalent of the agent category default.
17814 Note that when specifying a single word predicate like this, the
17815 @code{agent-predicate} specification must be in dotted pair notation.
17816
17817 The equivalent of the longer example from above would be:
17818
17819 @lisp
17820 (agent-predicate or high (and (not low) (not long)))
17821 @end lisp
17822
17823 The outer parenthesis required in the category specification are not
17824 entered here as, not being in dotted pair notation, the value of the
17825 predicate is assumed to be a list.
17826
17827
17828 Now, the syntax of the download score is the same as the syntax of
17829 normal score files, except that all elements that require actually
17830 seeing the article itself are verboten.  This means that only the
17831 following headers can be scored on: @code{Subject}, @code{From},
17832 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
17833 @code{Lines}, and @code{Xref}.
17834
17835 As with predicates, the specification of the @code{download score rule}
17836 to use in respect of a group can be in either the category definition if
17837 it's to be applicable to all groups in therein, or a group's parameters
17838 if it's to be specific to that group.
17839
17840 In both of these places the @code{download score rule} can take one of
17841 three forms:
17842
17843 @enumerate
17844 @item
17845 Score rule
17846
17847 This has the same syntax as a normal Gnus score file except only a
17848 subset of scoring keywords are available as mentioned above.
17849
17850 example:
17851
17852 @itemize @bullet
17853 @item
17854 Category specification
17855
17856 @lisp
17857 (("from"
17858        ("Lars Ingebrigtsen" 1000000 nil s))
17859 ("lines"
17860        (500 -100 nil <)))
17861 @end lisp
17862
17863 @item
17864 Group/Topic Parameter specification
17865
17866 @lisp
17867 (agent-score ("from"
17868                    ("Lars Ingebrigtsen" 1000000 nil s))
17869              ("lines"
17870                    (500 -100 nil <)))
17871 @end lisp
17872
17873 Again, note the omission of the outermost parenthesis here.
17874 @end itemize
17875
17876 @item
17877 Agent score file
17878
17879 These score files must @emph{only} contain the permitted scoring
17880 keywords stated above.
17881
17882 example:
17883
17884 @itemize @bullet
17885 @item
17886 Category specification
17887
17888 @lisp
17889 ("~/News/agent.SCORE")
17890 @end lisp
17891
17892 or perhaps
17893
17894 @lisp
17895 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
17896 @end lisp
17897
17898 @item
17899 Group Parameter specification
17900
17901 @lisp
17902 (agent-score "~/News/agent.SCORE")
17903 @end lisp
17904
17905 Additional score files can be specified as above.  Need I say anything
17906 about parenthesis?
17907 @end itemize
17908
17909 @item
17910 Use @code{normal} score files
17911
17912 If you don't want to maintain two sets of scoring rules for a group, and
17913 your desired @code{downloading} criteria for a group are the same as your
17914 @code{reading} criteria then you can tell the agent to refer to your
17915 @code{normal} score files when deciding what to download.
17916
17917 These directives in either the category definition or a group's
17918 parameters will cause the agent to read in all the applicable score
17919 files for a group, @emph{filtering out} those sections that do not
17920 relate to one of the permitted subset of scoring keywords.
17921
17922 @itemize @bullet
17923 @item
17924 Category Specification
17925
17926 @lisp
17927 file
17928 @end lisp
17929
17930 @item
17931 Group Parameter specification
17932
17933 @lisp
17934 (agent-score . file)
17935 @end lisp
17936 @end itemize
17937 @end enumerate
17938
17939 @node Category Buffer
17940 @subsubsection Category Buffer
17941
17942 You'd normally do all category maintenance from the category buffer.
17943 When you enter it for the first time (with the @kbd{J c} command from
17944 the group buffer), you'll only see the @code{default} category.
17945
17946 The following commands are available in this buffer:
17947
17948 @table @kbd
17949 @item q
17950 @kindex q (Category)
17951 @findex gnus-category-exit
17952 Return to the group buffer (@code{gnus-category-exit}).
17953
17954 @item e
17955 @kindex e (Category)
17956 @findex gnus-category-customize-category
17957 Use a customization buffer to set all of the selected category's
17958 parameters at one time (@code{gnus-category-customize-category}).
17959
17960 @item k
17961 @kindex k (Category)
17962 @findex gnus-category-kill
17963 Kill the current category (@code{gnus-category-kill}).
17964
17965 @item c
17966 @kindex c (Category)
17967 @findex gnus-category-copy
17968 Copy the current category (@code{gnus-category-copy}).
17969
17970 @item a
17971 @kindex a (Category)
17972 @findex gnus-category-add
17973 Add a new category (@code{gnus-category-add}).
17974
17975 @item p
17976 @kindex p (Category)
17977 @findex gnus-category-edit-predicate
17978 Edit the predicate of the current category
17979 (@code{gnus-category-edit-predicate}).
17980
17981 @item g
17982 @kindex g (Category)
17983 @findex gnus-category-edit-groups
17984 Edit the list of groups belonging to the current category
17985 (@code{gnus-category-edit-groups}).
17986
17987 @item s
17988 @kindex s (Category)
17989 @findex gnus-category-edit-score
17990 Edit the download score rule of the current category
17991 (@code{gnus-category-edit-score}).
17992
17993 @item l
17994 @kindex l (Category)
17995 @findex gnus-category-list
17996 List all the categories (@code{gnus-category-list}).
17997 @end table
17998
17999
18000 @node Category Variables
18001 @subsubsection Category Variables
18002
18003 @table @code
18004 @item gnus-category-mode-hook
18005 @vindex gnus-category-mode-hook
18006 Hook run in category buffers.
18007
18008 @item gnus-category-line-format
18009 @vindex gnus-category-line-format
18010 Format of the lines in the category buffer (@pxref{Formatting
18011 Variables}).  Valid elements are:
18012
18013 @table @samp
18014 @item c
18015 The name of the category.
18016
18017 @item g
18018 The number of groups in the category.
18019 @end table
18020
18021 @item gnus-category-mode-line-format
18022 @vindex gnus-category-mode-line-format
18023 Format of the category mode line (@pxref{Mode Line Formatting}).
18024
18025 @item gnus-agent-short-article
18026 @vindex gnus-agent-short-article
18027 Articles that have fewer lines than this are short.  Default 100.
18028
18029 @item gnus-agent-long-article
18030 @vindex gnus-agent-long-article
18031 Articles that have more lines than this are long.  Default 200.
18032
18033 @item gnus-agent-low-score
18034 @vindex gnus-agent-low-score
18035 Articles that have a score lower than this have a low score.  Default
18036 0.
18037
18038 @item gnus-agent-high-score
18039 @vindex gnus-agent-high-score
18040 Articles that have a score higher than this have a high score.  Default
18041 0.
18042
18043 @item gnus-agent-expire-days
18044 @vindex gnus-agent-expire-days
18045 The number of days that a @samp{read} article must stay in the agent's
18046 local disk before becoming eligible for expiration (While the name is
18047 the same, this doesn't mean expiring the article on the server.  It
18048 just means deleting the local copy of the article).  What is also
18049 important to understand is that the counter starts with the time the
18050 article was written to the local disk and not the time the article was
18051 read.
18052 Default 7.
18053
18054 @item gnus-agent-enable-expiration
18055 @vindex gnus-agent-enable-expiration
18056 Determines whether articles in a group are, by default, expired or
18057 retained indefinitely.  The default is @code{ENABLE} which means that
18058 you'll have to disable expiration when desired.  On the other hand,
18059 you could set this to @code{DISABLE}.  In that case, you would then
18060 have to enable expiration in selected groups.
18061
18062 @end table
18063
18064
18065 @node Agent Commands
18066 @subsection Agent Commands
18067 @findex gnus-agent-toggle-plugged
18068 @kindex J j (Agent)
18069
18070 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
18071 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
18072 toggles the plugged/unplugged state of the Gnus Agent.
18073
18074
18075 @menu
18076 * Group Agent Commands::        Configure groups and fetch their contents.
18077 * Summary Agent Commands::      Manually select then fetch specific articles.
18078 * Server Agent Commands::       Select the servers that are supported by the agent.
18079 @end menu
18080
18081
18082
18083
18084 @node Group Agent Commands
18085 @subsubsection Group Agent Commands
18086
18087 @table @kbd
18088 @item J u
18089 @kindex J u (Agent Group)
18090 @findex gnus-agent-fetch-groups
18091 Fetch all eligible articles in the current group
18092 (@code{gnus-agent-fetch-groups}).
18093
18094 @item J c
18095 @kindex J c (Agent Group)
18096 @findex gnus-enter-category-buffer
18097 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
18098
18099 @item J s
18100 @kindex J s (Agent Group)
18101 @findex gnus-agent-fetch-session
18102 Fetch all eligible articles in all groups
18103 (@code{gnus-agent-fetch-session}).
18104
18105 @item J S
18106 @kindex J S (Agent Group)
18107 @findex gnus-group-send-queue
18108 Send all sendable messages in the queue group
18109 (@code{gnus-group-send-queue}).  @xref{Drafts}.
18110
18111 @item J a
18112 @kindex J a (Agent Group)
18113 @findex gnus-agent-add-group
18114 Add the current group to an Agent category
18115 (@code{gnus-agent-add-group}).  This command understands the
18116 process/prefix convention (@pxref{Process/Prefix}).
18117
18118 @item J r
18119 @kindex J r (Agent Group)
18120 @findex gnus-agent-remove-group
18121 Remove the current group from its category, if any
18122 (@code{gnus-agent-remove-group}).  This command understands the
18123 process/prefix convention (@pxref{Process/Prefix}).
18124
18125 @item J Y
18126 @kindex J Y (Agent Group)
18127 @findex gnus-agent-synchronize-flags
18128 Synchronize flags changed while unplugged with remote server, if any.
18129
18130
18131 @end table
18132
18133
18134 @node Summary Agent Commands
18135 @subsubsection Summary Agent Commands
18136
18137 @table @kbd
18138 @item J #
18139 @kindex J # (Agent Summary)
18140 @findex gnus-agent-mark-article
18141 Mark the article for downloading (@code{gnus-agent-mark-article}).
18142
18143 @item J M-#
18144 @kindex J M-# (Agent Summary)
18145 @findex gnus-agent-unmark-article
18146 Remove the downloading mark from the article
18147 (@code{gnus-agent-unmark-article}).
18148
18149 @cindex %
18150 @item @@
18151 @kindex @@ (Agent Summary)
18152 @findex gnus-agent-toggle-mark
18153 Toggle whether to download the article
18154 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
18155 default.
18156
18157 @item J c
18158 @kindex J c (Agent Summary)
18159 @findex gnus-agent-catchup
18160 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
18161
18162 @item J S
18163 @kindex J S (Agent Summary)
18164 @findex gnus-agent-fetch-group
18165 Download all eligible (@pxref{Agent Categories}) articles in this group.
18166 (@code{gnus-agent-fetch-group}).
18167
18168 @item J s
18169 @kindex J s (Agent Summary)
18170 @findex gnus-agent-fetch-series
18171 Download all processable articles in this group.
18172 (@code{gnus-agent-fetch-series}).
18173
18174 @item J u
18175 @kindex J u (Agent Summary)
18176 @findex gnus-agent-summary-fetch-group
18177 Download all downloadable articles in the current group
18178 (@code{gnus-agent-summary-fetch-group}).
18179
18180 @end table
18181
18182
18183 @node Server Agent Commands
18184 @subsubsection Server Agent Commands
18185
18186 @table @kbd
18187 @item J a
18188 @kindex J a (Agent Server)
18189 @findex gnus-agent-add-server
18190 Add the current server to the list of servers covered by the Gnus Agent
18191 (@code{gnus-agent-add-server}).
18192
18193 @item J r
18194 @kindex J r (Agent Server)
18195 @findex gnus-agent-remove-server
18196 Remove the current server from the list of servers covered by the Gnus
18197 Agent (@code{gnus-agent-remove-server}).
18198
18199 @end table
18200
18201
18202 @node Agent Visuals
18203 @subsection Agent Visuals
18204
18205 If you open a summary while unplugged and, Gnus knows from the group's
18206 active range that there are more articles than the headers currently
18207 stored in the Agent, you may see some articles whose subject looks
18208 something like @samp{[Undownloaded article #####]}.  These are
18209 placeholders for the missing headers.  Aside from setting a mark,
18210 there is not much that can be done with one of these placeholders.
18211 When Gnus finally gets a chance to fetch the group's headers, the
18212 placeholders will automatically be replaced by the actual headers.
18213 You can configure the summary buffer's maneuvering to skip over the
18214 placeholders if you care (See @code{gnus-auto-goto-ignores}).
18215
18216 While it may be obvious to all, the only headers and articles
18217 available while unplugged are those headers and articles that were
18218 fetched into the Agent while previously plugged.  To put it another
18219 way, "If you forget to fetch something while plugged, you might have a
18220 less than satisfying unplugged session".  For this reason, the Agent
18221 adds two visual effects to your summary buffer.  These effects display
18222 the download status of each article so that you always know which
18223 articles will be available when unplugged.
18224
18225 The first visual effect is the @samp{%O} spec.  If you customize
18226 @code{gnus-summary-line-format} to include this specifier, you will add
18227 a single character field that indicates an article's download status.
18228 Articles that have been fetched into either the Agent or the Cache,
18229 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
18230 other articles will display @code{gnus-undownloaded-mark} (defaults to
18231 @samp{-}).  If you open a group that has not been agentized, a space
18232 (@samp{ }) will be displayed.
18233
18234 The second visual effect are the undownloaded faces.  The faces, there
18235 are three indicating the article's score (low, normal, high), seem to
18236 result in a love/hate response from many Gnus users.  The problem is
18237 that the face selection is controlled by a list of condition tests and
18238 face names (See @code{gnus-summary-highlight}).  Each condition is
18239 tested in the order in which it appears in the list so early
18240 conditions have precedence over later conditions.  All of this means
18241 that, if you tick an undownloaded article, the article will continue
18242 to be displayed in the undownloaded face rather than the ticked face.
18243
18244 If you use the Agent as a cache (to avoid downloading the same article
18245 each time you visit it or to minimize your connection time), the
18246 undownloaded face will probably seem like a good idea.  The reason
18247 being that you do all of our work (marking, reading, deleting) with
18248 downloaded articles so the normal faces always appear.
18249
18250 For occasional Agent users, the undownloaded faces may appear to be an
18251 absolutely horrible idea.  The issue being that, since most of their
18252 articles have not been fetched into the Agent, most of the normal
18253 faces will be obscured by the undownloaded faces.  If this is your
18254 situation, you have two choices available.  First, you can completely
18255 disable the undownload faces by customizing
18256 @code{gnus-summary-highlight} to delete the three cons-cells that
18257 refer to the @code{gnus-summary-*-undownloaded-face} faces.  Second, if
18258 you prefer to take a more fine-grained approach, you may set the
18259 @code{agent-disable-undownloaded-faces} group parameter to t.  This
18260 parameter, like all other agent parameters, may be set on an Agent
18261 Category (@pxref{Agent Categories}), a Group Topic (@pxref{Topic
18262 Parameters}), or an individual group (@pxref{Group Parameters}).
18263
18264 @node Agent as Cache
18265 @subsection Agent as Cache
18266
18267 When Gnus is plugged, it is not efficient to download headers or
18268 articles from the server again, if they are already stored in the
18269 Agent.  So, Gnus normally only downloads headers once, and stores them
18270 in the Agent.  These headers are later used when generating the summary
18271 buffer, regardless of whether you are plugged or unplugged.  Articles
18272 are not cached in the Agent by default though (that would potentially
18273 consume lots of disk space), but if you have already downloaded an
18274 article into the Agent, Gnus will not download the article from the
18275 server again but use the locally stored copy instead.
18276
18277 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
18278 @pxref{Agent Variables}) to always download headers and articles while
18279 plugged.  Gnus will almost certainly be slower, but it will be kept
18280 synchronized with the server.  That last point probably won't make any
18281 sense if you are using a nntp or nnimap back end.
18282
18283 @node Agent Expiry
18284 @subsection Agent Expiry
18285
18286 @vindex gnus-agent-expire-days
18287 @findex gnus-agent-expire
18288 @kindex M-x gnus-agent-expire
18289 @kindex M-x gnus-agent-expire-group
18290 @findex gnus-agent-expire-group
18291 @cindex agent expiry
18292 @cindex Gnus agent expiry
18293 @cindex expiry
18294
18295 The Agent back end, @code{nnagent}, doesn't handle expiry.  Well, at
18296 least it doesn't handle it like other back ends.  Instead, there are
18297 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
18298 commands that will expire all read articles that are older than
18299 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
18300 that you're running out of space.  Neither are particularly fast or
18301 efficient, and it's not a particularly good idea to interrupt them (with
18302 @kbd{C-g} or anything else) once you've started one of them.
18303
18304 Note that other functions, e.g. @code{gnus-request-expire-articles},
18305 might run @code{gnus-agent-expire} for you to keep the agent
18306 synchronized with the group.
18307
18308 The agent parameter @code{agent-enable-expiration} may be used to
18309 prevent expiration in selected groups.
18310
18311 @vindex gnus-agent-expire-all
18312 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
18313 expiration commands will expire all articles---unread, read, ticked
18314 and dormant.  If @code{nil} (which is the default), only read articles
18315 are eligible for expiry, and unread, ticked and dormant articles will
18316 be kept indefinitely.
18317
18318 If you find that some articles eligible for expiry are never expired,
18319 perhaps some Gnus Agent files are corrupted.  There's are special
18320 commands, @code{gnus-agent-regenerate} and
18321 @code{gnus-agent-regenerate-group}, to fix possible problems.
18322
18323 @node Agent Regeneration
18324 @subsection Agent Regeneration
18325
18326 @cindex agent regeneration
18327 @cindex Gnus agent regeneration
18328 @cindex regeneration
18329
18330 The local data structures used by @code{nnagent} may become corrupted
18331 due to certain exceptional conditions.  When this happens,
18332 @code{nnagent} functionality may degrade or even fail.  The solution
18333 to this problem is to repair the local data structures by removing all
18334 internal inconsistencies.
18335
18336 For example, if your connection to your server is lost while
18337 downloaded articles into the agent, the local data structures will not
18338 know about articles successfully downloaded prior to the connection
18339 failure.  Running @code{gnus-agent-regenerate} or
18340 @code{gnus-agent-regenerate-group} will update the data structures
18341 such that you don't need to download these articles a second time.
18342
18343 @findex gnus-agent-regenerate
18344 @kindex M-x gnus-agent-regenerate
18345 The command @code{gnus-agent-regenerate} will perform
18346 @code{gnus-agent-regenerate-group} on every agentized group.  While
18347 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
18348 recommended that you first close all summary buffers.
18349
18350 @findex gnus-agent-regenerate-group
18351 @kindex M-x gnus-agent-regenerate-group
18352 The command @code{gnus-agent-regenerate-group} uses the local copies
18353 of individual articles to repair the local @acronym{NOV}(header) database.  It
18354 then updates the internal data structures that document which articles
18355 are stored locally.  An optional argument will mark articles in the
18356 agent as unread.
18357
18358 @node Agent and IMAP
18359 @subsection Agent and IMAP
18360
18361 The Agent works with any Gnus back end, including nnimap.  However,
18362 since there are some conceptual differences between @acronym{NNTP} and
18363 @acronym{IMAP}, this section (should) provide you with some information to
18364 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
18365
18366 The first thing to keep in mind is that all flags (read, ticked, etc)
18367 are kept on the @acronym{IMAP} server, rather than in @file{.newsrc} as is the
18368 case for nntp.  Thus Gnus need to remember flag changes when
18369 disconnected, and synchronize these flags when you plug back in.
18370
18371 Gnus keeps track of flag changes when reading nnimap groups under the
18372 Agent.  When you plug back in, Gnus will check if you have any changed
18373 any flags and ask if you wish to synchronize these with the server.
18374 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
18375
18376 @vindex gnus-agent-synchronize-flags
18377 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
18378 never automatically synchronize flags.  If it is @code{ask}, which is
18379 the default, the Agent will check if you made any changes and if so
18380 ask if you wish to synchronize these when you re-connect.  If it has
18381 any other value, all flags will be synchronized automatically.
18382
18383 If you do not wish to synchronize flags automatically when you
18384 re-connect, you can do it manually with the
18385 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
18386 in the group buffer.
18387
18388 Some things are currently not implemented in the Agent that you'd might
18389 expect from a disconnected @acronym{IMAP} client, including:
18390
18391 @itemize @bullet
18392
18393 @item
18394 Copying/moving articles into nnimap groups when unplugged.
18395
18396 @item
18397 Creating/deleting nnimap groups when unplugged.
18398
18399 @end itemize
18400
18401 Technical note: the synchronization algorithm does not work by ``pushing''
18402 all local flags to the server, but rather incrementally update the
18403 server view of flags by changing only those flags that were changed by
18404 the user.  Thus, if you set one flag on an article, quit the group and
18405 re-select the group and remove the flag; the flag will be set and
18406 removed from the server when you ``synchronize''.  The queued flag
18407 operations can be found in the per-server @code{flags} file in the Agent
18408 directory.  It's emptied when you synchronize flags.
18409
18410
18411 @node Outgoing Messages
18412 @subsection Outgoing Messages
18413
18414 When Gnus is unplugged, all outgoing messages (both mail and news) are
18415 stored in the draft group ``queue'' (@pxref{Drafts}).  You can view
18416 them there after posting, and edit them at will.
18417
18418 When Gnus is plugged again, you can send the messages either from the
18419 draft group with the special commands available there, or you can use
18420 the @kbd{J S} command in the group buffer to send all the sendable
18421 messages in the draft group.
18422
18423
18424
18425 @node Agent Variables
18426 @subsection Agent Variables
18427
18428 @table @code
18429 @item gnus-agent-directory
18430 @vindex gnus-agent-directory
18431 Where the Gnus Agent will store its files.  The default is
18432 @file{~/News/agent/}.
18433
18434 @item gnus-agent-handle-level
18435 @vindex gnus-agent-handle-level
18436 Groups on levels (@pxref{Group Levels}) higher than this variable will
18437 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
18438 which means that only subscribed group will be considered by the Agent
18439 by default.
18440
18441 @item gnus-agent-plugged-hook
18442 @vindex gnus-agent-plugged-hook
18443 Hook run when connecting to the network.
18444
18445 @item gnus-agent-unplugged-hook
18446 @vindex gnus-agent-unplugged-hook
18447 Hook run when disconnecting from the network.
18448
18449 @item gnus-agent-fetched-hook
18450 @vindex gnus-agent-fetched-hook
18451 Hook run when finished fetching articles.
18452
18453 @item gnus-agent-cache
18454 @vindex gnus-agent-cache
18455 Variable to control whether use the locally stored @acronym{NOV} and
18456 articles when plugged, e.g. essentially using the Agent as a cache.
18457 The default is non-@code{nil}, which means to use the Agent as a cache.
18458
18459 @item gnus-agent-go-online
18460 @vindex gnus-agent-go-online
18461 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
18462 automatically switch offline servers into online status.  If it is
18463 @code{ask}, the default, the Agent will ask if you wish to switch
18464 offline servers into online status when you re-connect.  If it has any
18465 other value, all offline servers will be automatically switched into
18466 online status.
18467
18468 @item gnus-agent-mark-unread-after-downloaded
18469 @vindex gnus-agent-mark-unread-after-downloaded
18470 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
18471 mark articles as unread after downloading.  This is usually a safe
18472 thing to do as the newly downloaded article has obviously not been
18473 read.  The default is t.
18474
18475 @item gnus-agent-consider-all-articles
18476 @vindex gnus-agent-consider-all-articles
18477 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
18478 agent will let the agent predicate decide whether articles need to be
18479 downloaded or not, for all articles.  When @code{nil}, the default,
18480 the agent will only let the predicate decide whether unread articles
18481 are downloaded or not.  If you enable this, you may also want to look
18482 into the agent expiry settings (@pxref{Category Variables}), so that
18483 the agent doesn't download articles which the agent will later expire,
18484 over and over again.
18485
18486 @item gnus-agent-max-fetch-size
18487 @vindex gnus-agent-max-fetch-size
18488 The agent fetches articles into a temporary buffer prior to parsing
18489 them into individual files.  To avoid exceeding the max. buffer size,
18490 the agent alternates between fetching and parsing until all articles
18491 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
18492 limit to control how often the cycling occurs.  A large value improves
18493 performance.  A small value minimizes the time lost should the
18494 connection be lost while fetching (You may need to run
18495 @code{gnus-agent-regenerate-group} to update the group's state.
18496 However, all articles parsed prior to loosing the connection will be
18497 available while unplugged).  The default is 10M so it is unusual to
18498 see any cycling.
18499
18500 @item gnus-server-unopen-status
18501 @vindex gnus-server-unopen-status
18502 Perhaps not an Agent variable, but closely related to the Agent, this
18503 variable says what will happen if Gnus cannot open a server.  If the
18504 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
18505 whether to deny the server or whether to unplug the agent.  If the
18506 Agent is disabled, Gnus always simply deny the server.  Other choices
18507 for this variable include @code{denied} and @code{offline} the latter
18508 is only valid if the Agent is used.
18509
18510 @item gnus-auto-goto-ignores
18511 @vindex gnus-auto-goto-ignores
18512 Another variable that isn't an Agent variable, yet so closely related
18513 that most will look for it here, this variable tells the summary
18514 buffer how to maneuver around undownloaded (only headers stored in the
18515 agent) and unfetched (neither article nor headers stored) articles.
18516
18517 The legal values are @code{nil} (maneuver to any article),
18518 @code{undownloaded} (maneuvering while unplugged ignores articles that
18519 have not been fetched), @code{always-undownloaded} (maneuvering always
18520 ignores articles that have not been fetched), @code{unfetched}
18521 (maneuvering ignores articles whose headers have not been fetched).
18522
18523 @item gnus-agent-auto-agentize-methods
18524 @vindex gnus-agent-auto-agentize-methods
18525 If you have never used the Agent before (or more technically, if
18526 @file{~/News/agent/lib/servers} does not exist), Gnus will
18527 automatically agentize a few servers for you.  This variable control
18528 which backends should be auto-agentized.  It is typically only useful
18529 to agentize remote backends.  The auto-agentizing has the same effect
18530 as running @kbd{J a} on the servers (@pxref{Server Agent Commands}).
18531 If the file exist, you must manage the servers manually by adding or
18532 removing them, this variable is only applicable the first time you
18533 start Gnus.  The default is @samp{(nntp nnimap)}.
18534
18535 @end table
18536
18537
18538 @node Example Setup
18539 @subsection Example Setup
18540
18541 If you don't want to read this manual, and you have a fairly standard
18542 setup, you may be able to use something like the following as your
18543 @file{~/.gnus.el} file to get started.
18544
18545 @lisp
18546 ;;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
18547 ;;; @r{from your ISP's server.}
18548 (setq gnus-select-method '(nntp "news.your-isp.com"))
18549
18550 ;;; @r{Define how Gnus is to read your mail.  We read mail from}
18551 ;;; @r{your ISP's @acronym{POP} server.}
18552 (setq mail-sources '((pop :server "pop.your-isp.com")))
18553
18554 ;;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
18555 (setq gnus-secondary-select-methods '((nnml "")))
18556
18557 ;;; @r{Make Gnus into an offline newsreader.}
18558 ;;; (gnus-agentize) ; @r{The obsolete setting.}
18559 ;;; (setq gnus-agent t) ; @r{Now the default.}
18560 @end lisp
18561
18562 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
18563 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
18564 gnus}.
18565
18566 If this is the first time you've run Gnus, you will be subscribed
18567 automatically to a few default newsgroups.  You'll probably want to
18568 subscribe to more groups, and to do that, you have to query the
18569 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
18570 command.  This usually takes quite a while, but you only have to do it
18571 once.
18572
18573 After reading and parsing a while, you'll be presented with a list of
18574 groups.  Subscribe to the ones you want to read with the @kbd{u}
18575 command.  @kbd{l} to make all the killed groups disappear after you've
18576 subscribe to all the groups you want to read.  (@kbd{A k} will bring
18577 back all the killed groups.)
18578
18579 You can now read the groups at once, or you can download the articles
18580 with the @kbd{J s} command.  And then read the rest of this manual to
18581 find out which of the other gazillion things you want to customize.
18582
18583
18584 @node Batching Agents
18585 @subsection Batching Agents
18586 @findex gnus-agent-batch
18587
18588 Having the Gnus Agent fetch articles (and post whatever messages you've
18589 written) is quite easy once you've gotten things set up properly.  The
18590 following shell script will do everything that is necessary:
18591
18592 You can run a complete batch command from the command line with the
18593 following incantation:
18594
18595 @example
18596 #!/bin/sh
18597 emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
18598 @end example
18599
18600
18601 @node Agent Caveats
18602 @subsection Agent Caveats
18603
18604 The Gnus Agent doesn't seem to work like most other offline
18605 newsreaders.  Here are some common questions that some imaginary people
18606 may ask:
18607
18608 @table @dfn
18609 @item If I read an article while plugged, do they get entered into the Agent?
18610
18611 @strong{No}.  If you want this behaviour, add
18612 @code{gnus-agent-fetch-selected-article} to
18613 @code{gnus-select-article-hook}.
18614
18615 @item If I read an article while plugged, and the article already exists in
18616 the Agent, will it get downloaded once more?
18617
18618 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
18619
18620 @end table
18621
18622 In short, when Gnus is unplugged, it only looks into the locally stored
18623 articles; when it's plugged, it talks to your ISP and may also use the
18624 locally stored articles.
18625
18626
18627 @node Scoring
18628 @chapter Scoring
18629 @cindex scoring
18630
18631 Other people use @dfn{kill files}, but we here at Gnus Towers like
18632 scoring better than killing, so we'd rather switch than fight.  They do
18633 something completely different as well, so sit up straight and pay
18634 attention!
18635
18636 @vindex gnus-summary-mark-below
18637 All articles have a default score (@code{gnus-summary-default-score}),
18638 which is 0 by default.  This score may be raised or lowered either
18639 interactively or by score files.  Articles that have a score lower than
18640 @code{gnus-summary-mark-below} are marked as read.
18641
18642 Gnus will read any @dfn{score files} that apply to the current group
18643 before generating the summary buffer.
18644
18645 There are several commands in the summary buffer that insert score
18646 entries based on the current article.  You can, for instance, ask Gnus to
18647 lower or increase the score of all articles with a certain subject.
18648
18649 There are two sorts of scoring entries: Permanent and temporary.
18650 Temporary score entries are self-expiring entries.  Any entries that are
18651 temporary and have not been used for, say, a week, will be removed
18652 silently to help keep the sizes of the score files down.
18653
18654 @menu
18655 * Summary Score Commands::      Adding score entries for the current group.
18656 * Group Score Commands::        General score commands.
18657 * Score Variables::             Customize your scoring.  (My, what terminology).
18658 * Score File Format::           What a score file may contain.
18659 * Score File Editing::          You can edit score files by hand as well.
18660 * Adaptive Scoring::            Big Sister Gnus knows what you read.
18661 * Home Score File::             How to say where new score entries are to go.
18662 * Followups To Yourself::       Having Gnus notice when people answer you.
18663 * Scoring On Other Headers::    Scoring on non-standard headers.
18664 * Scoring Tips::                How to score effectively.
18665 * Reverse Scoring::             That problem child of old is not problem.
18666 * Global Score Files::          Earth-spanning, ear-splitting score files.
18667 * Kill Files::                  They are still here, but they can be ignored.
18668 * Converting Kill Files::       Translating kill files to score files.
18669 * GroupLens::                   Getting predictions on what you like to read.
18670 * Advanced Scoring::            Using logical expressions to build score rules.
18671 * Score Decays::                It can be useful to let scores wither away.
18672 @end menu
18673
18674
18675 @node Summary Score Commands
18676 @section Summary Score Commands
18677 @cindex score commands
18678
18679 The score commands that alter score entries do not actually modify real
18680 score files.  That would be too inefficient.  Gnus maintains a cache of
18681 previously loaded score files, one of which is considered the
18682 @dfn{current score file alist}.  The score commands simply insert
18683 entries into this list, and upon group exit, this list is saved.
18684
18685 The current score file is by default the group's local score file, even
18686 if no such score file actually exists.  To insert score commands into
18687 some other score file (e.g. @file{all.SCORE}), you must first make this
18688 score file the current one.
18689
18690 General score commands that don't actually change the score file:
18691
18692 @table @kbd
18693
18694 @item V s
18695 @kindex V s (Summary)
18696 @findex gnus-summary-set-score
18697 Set the score of the current article (@code{gnus-summary-set-score}).
18698
18699 @item V S
18700 @kindex V S (Summary)
18701 @findex gnus-summary-current-score
18702 Display the score of the current article
18703 (@code{gnus-summary-current-score}).
18704
18705 @item V t
18706 @kindex V t (Summary)
18707 @findex gnus-score-find-trace
18708 Display all score rules that have been used on the current article
18709 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
18710 may type @kbd{e} to edit score file corresponding to the score rule on
18711 current line and @kbd{f} to format (@code{gnus-score-pretty-print}) the
18712 score file and edit it.
18713
18714 @item V w
18715 @kindex V w (Summary)
18716 @findex gnus-score-find-favourite-words
18717 List words used in scoring (@code{gnus-score-find-favourite-words}).
18718
18719 @item V R
18720 @kindex V R (Summary)
18721 @findex gnus-summary-rescore
18722 Run the current summary through the scoring process
18723 (@code{gnus-summary-rescore}).  This might be useful if you're playing
18724 around with your score files behind Gnus' back and want to see the
18725 effect you're having.
18726
18727 @item V c
18728 @kindex V c (Summary)
18729 @findex gnus-score-change-score-file
18730 Make a different score file the current
18731 (@code{gnus-score-change-score-file}).
18732
18733 @item V e
18734 @kindex V e (Summary)
18735 @findex gnus-score-edit-current-scores
18736 Edit the current score file (@code{gnus-score-edit-current-scores}).
18737 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
18738 File Editing}).
18739
18740 @item V f
18741 @kindex V f (Summary)
18742 @findex gnus-score-edit-file
18743 Edit a score file and make this score file the current one
18744 (@code{gnus-score-edit-file}).
18745
18746 @item V F
18747 @kindex V F (Summary)
18748 @findex gnus-score-flush-cache
18749 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
18750 after editing score files.
18751
18752 @item V C
18753 @kindex V C (Summary)
18754 @findex gnus-score-customize
18755 Customize a score file in a visually pleasing manner
18756 (@code{gnus-score-customize}).
18757
18758 @end table
18759
18760 The rest of these commands modify the local score file.
18761
18762 @table @kbd
18763
18764 @item V m
18765 @kindex V m (Summary)
18766 @findex gnus-score-set-mark-below
18767 Prompt for a score, and mark all articles with a score below this as
18768 read (@code{gnus-score-set-mark-below}).
18769
18770 @item V x
18771 @kindex V x (Summary)
18772 @findex gnus-score-set-expunge-below
18773 Prompt for a score, and add a score rule to the current score file to
18774 expunge all articles below this score
18775 (@code{gnus-score-set-expunge-below}).
18776 @end table
18777
18778 The keystrokes for actually making score entries follow a very regular
18779 pattern, so there's no need to list all the commands.  (Hundreds of
18780 them.)
18781
18782 @findex gnus-summary-increase-score
18783 @findex gnus-summary-lower-score
18784
18785 @enumerate
18786 @item
18787 The first key is either @kbd{I} (upper case i) for increasing the score
18788 or @kbd{L} for lowering the score.
18789 @item
18790 The second key says what header you want to score on.  The following
18791 keys are available:
18792 @table @kbd
18793
18794 @item a
18795 Score on the author name.
18796
18797 @item s
18798 Score on the subject line.
18799
18800 @item x
18801 Score on the @code{Xref} line---i.e., the cross-posting line.
18802
18803 @item r
18804 Score on the @code{References} line.
18805
18806 @item d
18807 Score on the date.
18808
18809 @item l
18810 Score on the number of lines.
18811
18812 @item i
18813 Score on the @code{Message-ID} header.
18814
18815 @item e
18816 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
18817 if your @acronym{NNTP} server tracks additional header data in overviews.
18818
18819 @item f
18820 Score on followups---this matches the author name, and adds scores to
18821 the followups to this author.  (Using this key leads to the creation of
18822 @file{ADAPT} files.)
18823
18824 @item b
18825 Score on the body.
18826
18827 @item h
18828 Score on the head.
18829
18830 @item t
18831 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
18832 files.)
18833
18834 @end table
18835
18836 @item
18837 The third key is the match type.  Which match types are valid depends on
18838 what headers you are scoring on.
18839
18840 @table @code
18841
18842 @item strings
18843
18844 @table @kbd
18845
18846 @item e
18847 Exact matching.
18848
18849 @item s
18850 Substring matching.
18851
18852 @item f
18853 Fuzzy matching (@pxref{Fuzzy Matching}).
18854
18855 @item r
18856 Regexp matching
18857 @end table
18858
18859 @item date
18860 @table @kbd
18861
18862 @item b
18863 Before date.
18864
18865 @item a
18866 After date.
18867
18868 @item n
18869 This date.
18870 @end table
18871
18872 @item number
18873 @table @kbd
18874
18875 @item <
18876 Less than number.
18877
18878 @item =
18879 Equal to number.
18880
18881 @item >
18882 Greater than number.
18883 @end table
18884 @end table
18885
18886 @item
18887 The fourth and usually final key says whether this is a temporary (i.e.,
18888 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
18889 or whether it is to be done immediately, without adding to the score
18890 file.
18891 @table @kbd
18892
18893 @item t
18894 Temporary score entry.
18895
18896 @item p
18897 Permanent score entry.
18898
18899 @item i
18900 Immediately scoring.
18901 @end table
18902
18903 @item
18904 If you are scoring on `e' (extra) headers, you will then be prompted for
18905 the header name on which you wish to score.  This must be a header named
18906 in gnus-extra-headers, and @samp{TAB} completion is available.
18907
18908 @end enumerate
18909
18910 So, let's say you want to increase the score on the current author with
18911 exact matching permanently: @kbd{I a e p}.  If you want to lower the
18912 score based on the subject line, using substring matching, and make a
18913 temporary score entry: @kbd{L s s t}.  Pretty easy.
18914
18915 To make things a bit more complicated, there are shortcuts.  If you use
18916 a capital letter on either the second or third keys, Gnus will use
18917 defaults for the remaining one or two keystrokes.  The defaults are
18918 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
18919 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
18920
18921 These functions take both the numerical prefix and the symbolic prefix
18922 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
18923 (or increase) the score of the article.  A symbolic prefix of @code{a}
18924 says to use the @file{all.SCORE} file for the command instead of the
18925 current score file.
18926
18927 @vindex gnus-score-mimic-keymap
18928 The @code{gnus-score-mimic-keymap} says whether these commands will
18929 pretend they are keymaps or not.
18930
18931
18932 @node Group Score Commands
18933 @section Group Score Commands
18934 @cindex group score commands
18935
18936 There aren't many of these as yet, I'm afraid.
18937
18938 @table @kbd
18939
18940 @item W e
18941 @kindex W e (Group)
18942 @findex gnus-score-edit-all-score
18943 Edit the apply-to-all-groups all.SCORE file.  You will be popped into
18944 a @code{gnus-score-mode} buffer (@pxref{Score File Editing}).
18945
18946 @item W f
18947 @kindex W f (Group)
18948 @findex gnus-score-flush-cache
18949 Gnus maintains a cache of score alists to avoid having to reload them
18950 all the time.  This command will flush the cache
18951 (@code{gnus-score-flush-cache}).
18952
18953 @end table
18954
18955 You can do scoring from the command line by saying something like:
18956
18957 @findex gnus-batch-score
18958 @cindex batch scoring
18959 @example
18960 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
18961 @end example
18962
18963
18964 @node Score Variables
18965 @section Score Variables
18966 @cindex score variables
18967
18968 @table @code
18969
18970 @item gnus-use-scoring
18971 @vindex gnus-use-scoring
18972 If @code{nil}, Gnus will not check for score files, and will not, in
18973 general, do any score-related work.  This is @code{t} by default.
18974
18975 @item gnus-kill-killed
18976 @vindex gnus-kill-killed
18977 If this variable is @code{nil}, Gnus will never apply score files to
18978 articles that have already been through the kill process.  While this
18979 may save you lots of time, it also means that if you apply a kill file
18980 to a group, and then change the kill file and want to run it over you
18981 group again to kill more articles, it won't work.  You have to set this
18982 variable to @code{t} to do that.  (It is @code{t} by default.)
18983
18984 @item gnus-kill-files-directory
18985 @vindex gnus-kill-files-directory
18986 All kill and score files will be stored in this directory, which is
18987 initialized from the @env{SAVEDIR} environment variable by default.
18988 This is @file{~/News/} by default.
18989
18990 @item gnus-score-file-suffix
18991 @vindex gnus-score-file-suffix
18992 Suffix to add to the group name to arrive at the score file name
18993 (@file{SCORE} by default.)
18994
18995 @item gnus-score-uncacheable-files
18996 @vindex gnus-score-uncacheable-files
18997 @cindex score cache
18998 All score files are normally cached to avoid excessive re-loading of
18999 score files.  However, if this might make your Emacs grow big and
19000 bloated, so this regexp can be used to weed out score files unlikely
19001 to be needed again.  It would be a bad idea to deny caching of
19002 @file{all.SCORE}, while it might be a good idea to not cache
19003 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
19004 variable is @samp{ADAPT$} by default, so no adaptive score files will
19005 be cached.
19006
19007 @item gnus-save-score
19008 @vindex gnus-save-score
19009 If you have really complicated score files, and do lots of batch
19010 scoring, then you might set this variable to @code{t}.  This will make
19011 Gnus save the scores into the @file{.newsrc.eld} file.
19012
19013 If you do not set this to @code{t}, then manual scores (like those set
19014 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
19015 across group visits.
19016
19017 @item gnus-score-interactive-default-score
19018 @vindex gnus-score-interactive-default-score
19019 Score used by all the interactive raise/lower commands to raise/lower
19020 score with.  Default is 1000, which may seem excessive, but this is to
19021 ensure that the adaptive scoring scheme gets enough room to play with.
19022 We don't want the small changes from the adaptive scoring to overwrite
19023 manually entered data.
19024
19025 @item gnus-summary-default-score
19026 @vindex gnus-summary-default-score
19027 Default score of an article, which is 0 by default.
19028
19029 @item gnus-summary-expunge-below
19030 @vindex gnus-summary-expunge-below
19031 Don't display the summary lines of articles that have scores lower than
19032 this variable.  This is @code{nil} by default, which means that no
19033 articles will be hidden.  This variable is local to the summary buffers,
19034 and has to be set from @code{gnus-summary-mode-hook}.
19035
19036 @item gnus-score-over-mark
19037 @vindex gnus-score-over-mark
19038 Mark (in the third column) used for articles with a score over the
19039 default.  Default is @samp{+}.
19040
19041 @item gnus-score-below-mark
19042 @vindex gnus-score-below-mark
19043 Mark (in the third column) used for articles with a score below the
19044 default.  Default is @samp{-}.
19045
19046 @item gnus-score-find-score-files-function
19047 @vindex gnus-score-find-score-files-function
19048 Function used to find score files for the current group.  This function
19049 is called with the name of the group as the argument.
19050
19051 Predefined functions available are:
19052 @table @code
19053
19054 @item gnus-score-find-single
19055 @findex gnus-score-find-single
19056 Only apply the group's own score file.
19057
19058 @item gnus-score-find-bnews
19059 @findex gnus-score-find-bnews
19060 Apply all score files that match, using bnews syntax.  This is the
19061 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
19062 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
19063 @file{gnu.all.SCORE} would all apply.  In short, the instances of
19064 @samp{all} in the score file names are translated into @samp{.*}, and
19065 then a regexp match is done.
19066
19067 This means that if you have some score entries that you want to apply to
19068 all groups, then you put those entries in the @file{all.SCORE} file.
19069
19070 The score files are applied in a semi-random order, although Gnus will
19071 try to apply the more general score files before the more specific score
19072 files.  It does this by looking at the number of elements in the score
19073 file names---discarding the @samp{all} elements.
19074
19075 @item gnus-score-find-hierarchical
19076 @findex gnus-score-find-hierarchical
19077 Apply all score files from all the parent groups.  This means that you
19078 can't have score files like @file{all.SCORE}, but you can have
19079 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
19080 server.
19081
19082 @end table
19083 This variable can also be a list of functions.  In that case, all
19084 these functions will be called with the group name as argument, and
19085 all the returned lists of score files will be applied.  These
19086 functions can also return lists of lists of score alists directly.  In
19087 that case, the functions that return these non-file score alists
19088 should probably be placed before the ``real'' score file functions, to
19089 ensure that the last score file returned is the local score file.
19090 Phu.
19091
19092 For example, to do hierarchical scoring but use a non-server-specific
19093 overall score file, you could use the value
19094 @example
19095 (list (lambda (group) ("all.SCORE"))
19096       'gnus-score-find-hierarchical)
19097 @end example
19098
19099 @item gnus-score-expiry-days
19100 @vindex gnus-score-expiry-days
19101 This variable says how many days should pass before an unused score file
19102 entry is expired.  If this variable is @code{nil}, no score file entries
19103 are expired.  It's 7 by default.
19104
19105 @item gnus-update-score-entry-dates
19106 @vindex gnus-update-score-entry-dates
19107 If this variable is non-@code{nil}, temporary score entries that have
19108 been triggered (matched) will have their dates updated.  (This is how Gnus
19109 controls expiry---all non-matched-entries will become too old while
19110 matched entries will stay fresh and young.)  However, if you set this
19111 variable to @code{nil}, even matched entries will grow old and will
19112 have to face that oh-so grim reaper.
19113
19114 @item gnus-score-after-write-file-function
19115 @vindex gnus-score-after-write-file-function
19116 Function called with the name of the score file just written.
19117
19118 @item gnus-score-thread-simplify
19119 @vindex gnus-score-thread-simplify
19120 If this variable is non-@code{nil}, article subjects will be
19121 simplified for subject scoring purposes in the same manner as with
19122 threading---according to the current value of
19123 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
19124 @code{substring} or @code{exact} matching, the match will also be
19125 simplified in this manner.
19126
19127 @end table
19128
19129
19130 @node Score File Format
19131 @section Score File Format
19132 @cindex score file format
19133
19134 A score file is an @code{emacs-lisp} file that normally contains just a
19135 single form.  Casual users are not expected to edit these files;
19136 everything can be changed from the summary buffer.
19137
19138 Anyway, if you'd like to dig into it yourself, here's an example:
19139
19140 @lisp
19141 (("from"
19142   ("Lars Ingebrigtsen" -10000)
19143   ("Per Abrahamsen")
19144   ("larsi\\|lmi" -50000 nil R))
19145  ("subject"
19146   ("Ding is Badd" nil 728373))
19147  ("xref"
19148   ("alt.politics" -1000 728372 s))
19149  ("lines"
19150   (2 -100 nil <))
19151  (mark 0)
19152  (expunge -1000)
19153  (mark-and-expunge -10)
19154  (read-only nil)
19155  (orphan -10)
19156  (adapt t)
19157  (files "/hom/larsi/News/gnu.SCORE")
19158  (exclude-files "all.SCORE")
19159  (local (gnus-newsgroup-auto-expire t)
19160         (gnus-summary-make-false-root empty))
19161  (eval (ding)))
19162 @end lisp
19163
19164 This example demonstrates most score file elements.  @xref{Advanced
19165 Scoring}, for a different approach.
19166
19167 Even though this looks much like Lisp code, nothing here is actually
19168 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
19169 has to be valid syntactically, if not semantically.
19170
19171 Six keys are supported by this alist:
19172
19173 @table @code
19174
19175 @item STRING
19176 If the key is a string, it is the name of the header to perform the
19177 match on.  Scoring can only be performed on these eight headers:
19178 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
19179 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
19180 these headers, there are three strings to tell Gnus to fetch the entire
19181 article and do the match on larger parts of the article: @code{Body}
19182 will perform the match on the body of the article, @code{Head} will
19183 perform the match on the head of the article, and @code{All} will
19184 perform the match on the entire article.  Note that using any of these
19185 last three keys will slow down group entry @emph{considerably}.  The
19186 final ``header'' you can score on is @code{Followup}.  These score
19187 entries will result in new score entries being added for all follow-ups
19188 to articles that matches these score entries.
19189
19190 Following this key is an arbitrary number of score entries, where each
19191 score entry has one to four elements.
19192 @enumerate
19193
19194 @item
19195 The first element is the @dfn{match element}.  On most headers this will
19196 be a string, but on the Lines and Chars headers, this must be an
19197 integer.
19198
19199 @item
19200 If the second element is present, it should be a number---the @dfn{score
19201 element}.  This number should be an integer in the neginf to posinf
19202 interval.  This number is added to the score of the article if the match
19203 is successful.  If this element is not present, the
19204 @code{gnus-score-interactive-default-score} number will be used
19205 instead.  This is 1000 by default.
19206
19207 @item
19208 If the third element is present, it should be a number---the @dfn{date
19209 element}.  This date says when the last time this score entry matched,
19210 which provides a mechanism for expiring the score entries.  It this
19211 element is not present, the score entry is permanent.  The date is
19212 represented by the number of days since December 31, 1 BCE.
19213
19214 @item
19215 If the fourth element is present, it should be a symbol---the @dfn{type
19216 element}.  This element specifies what function should be used to see
19217 whether this score entry matches the article.  What match types that can
19218 be used depends on what header you wish to perform the match on.
19219 @table @dfn
19220
19221 @item From, Subject, References, Xref, Message-ID
19222 For most header types, there are the @code{r} and @code{R} (regexp), as
19223 well as @code{s} and @code{S} (substring) types, and @code{e} and
19224 @code{E} (exact match), and @code{w} (word match) types.  If this
19225 element is not present, Gnus will assume that substring matching should
19226 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
19227 that the matches will be done in a case-sensitive manner.  All these
19228 one-letter types are really just abbreviations for the @code{regexp},
19229 @code{string}, @code{exact}, and @code{word} types, which you can use
19230 instead, if you feel like.
19231
19232 @item Extra
19233 Just as for the standard string overview headers, if you are using
19234 gnus-extra-headers, you can score on these headers' values.  In this
19235 case, there is a 5th element in the score entry, being the name of the
19236 header to be scored.  The following entry is useful in your
19237 @file{all.SCORE} file in case of spam attacks from a single origin
19238 host, if your @acronym{NNTP} server tracks @samp{NNTP-Posting-Host} in
19239 overviews:
19240
19241 @lisp
19242 ("111.222.333.444" -1000 nil s
19243  "NNTP-Posting-Host")
19244 @end lisp
19245
19246 @item Lines, Chars
19247 These two headers use different match types: @code{<}, @code{>},
19248 @code{=}, @code{>=} and @code{<=}.
19249
19250 These predicates are true if
19251
19252 @example
19253 (PREDICATE HEADER MATCH)
19254 @end example
19255
19256 evaluates to non-@code{nil}.  For instance, the advanced match
19257 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
19258 following form:
19259
19260 @lisp
19261 (< header-value 4)
19262 @end lisp
19263
19264 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
19265 the match, we get the score added if the article has less than 4 lines.
19266 (It's easy to get confused and think it's the other way around.  But
19267 it's not.  I think.)
19268
19269 When matching on @code{Lines}, be careful because some back ends (like
19270 @code{nndir}) do not generate @code{Lines} header, so every article ends
19271 up being marked as having 0 lines.  This can lead to strange results if
19272 you happen to lower score of the articles with few lines.
19273
19274 @item Date
19275 For the Date header we have three kinda silly match types:
19276 @code{before}, @code{at} and @code{after}.  I can't really imagine this
19277 ever being useful, but, like, it would feel kinda silly not to provide
19278 this function.  Just in case.  You never know.  Better safe than sorry.
19279 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
19280 sex on a first date.  (I have been told that at least one person, and I
19281 quote, ``found this function indispensable'', however.)
19282
19283 @cindex ISO8601
19284 @cindex date
19285 A more useful match type is @code{regexp}.  With it, you can match the
19286 date string using a regular expression.  The date is normalized to
19287 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
19288 you want to match all articles that have been posted on April 1st in
19289 every year, you could use @samp{....0401.........} as a match string,
19290 for instance.  (Note that the date is kept in its original time zone, so
19291 this will match articles that were posted when it was April 1st where
19292 the article was posted from.  Time zones are such wholesome fun for the
19293 whole family, eh?)
19294
19295 @item Head, Body, All
19296 These three match keys use the same match types as the @code{From} (etc)
19297 header uses.
19298
19299 @item Followup
19300 This match key is somewhat special, in that it will match the
19301 @code{From} header, and affect the score of not only the matching
19302 articles, but also all followups to the matching articles.  This allows
19303 you e.g. increase the score of followups to your own articles, or
19304 decrease the score of followups to the articles of some known
19305 trouble-maker.  Uses the same match types as the @code{From} header
19306 uses.  (Using this match key will lead to creation of @file{ADAPT}
19307 files.)
19308
19309 @item Thread
19310 This match key works along the same lines as the @code{Followup} match
19311 key.  If you say that you want to score on a (sub-)thread started by an
19312 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
19313 match.  This will add a new @samp{thread} match for each article that
19314 has @var{x} in its @code{References} header.  (These new @samp{thread}
19315 matches will use the @code{Message-ID}s of these matching articles.)
19316 This will ensure that you can raise/lower the score of an entire thread,
19317 even though some articles in the thread may not have complete
19318 @code{References} headers.  Note that using this may lead to
19319 undeterministic scores of the articles in the thread.  (Using this match
19320 key will lead to creation of @file{ADAPT} files.)
19321 @end table
19322 @end enumerate
19323
19324 @cindex score file atoms
19325 @item mark
19326 The value of this entry should be a number.  Any articles with a score
19327 lower than this number will be marked as read.
19328
19329 @item expunge
19330 The value of this entry should be a number.  Any articles with a score
19331 lower than this number will be removed from the summary buffer.
19332
19333 @item mark-and-expunge
19334 The value of this entry should be a number.  Any articles with a score
19335 lower than this number will be marked as read and removed from the
19336 summary buffer.
19337
19338 @item thread-mark-and-expunge
19339 The value of this entry should be a number.  All articles that belong to
19340 a thread that has a total score below this number will be marked as read
19341 and removed from the summary buffer.  @code{gnus-thread-score-function}
19342 says how to compute the total score for a thread.
19343
19344 @item files
19345 The value of this entry should be any number of file names.  These files
19346 are assumed to be score files as well, and will be loaded the same way
19347 this one was.
19348
19349 @item exclude-files
19350 The clue of this entry should be any number of files.  These files will
19351 not be loaded, even though they would normally be so, for some reason or
19352 other.
19353
19354 @item eval
19355 The value of this entry will be @code{eval}el.  This element will be
19356 ignored when handling global score files.
19357
19358 @item read-only
19359 Read-only score files will not be updated or saved.  Global score files
19360 should feature this atom (@pxref{Global Score Files}).  (Note:
19361 @dfn{Global} here really means @dfn{global}; not your personal
19362 apply-to-all-groups score files.)
19363
19364 @item orphan
19365 The value of this entry should be a number.  Articles that do not have
19366 parents will get this number added to their scores.  Imagine you follow
19367 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
19368 will only follow a few of the threads, also want to see any new threads.
19369
19370 You can do this with the following two score file entries:
19371
19372 @example
19373         (orphan -500)
19374         (mark-and-expunge -100)
19375 @end example
19376
19377 When you enter the group the first time, you will only see the new
19378 threads.  You then raise the score of the threads that you find
19379 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
19380 rest.  Next time you enter the group, you will see new articles in the
19381 interesting threads, plus any new threads.
19382
19383 I.e.---the orphan score atom is for high-volume groups where a few
19384 interesting threads which can't be found automatically by ordinary
19385 scoring rules exist.
19386
19387 @item adapt
19388 This entry controls the adaptive scoring.  If it is @code{t}, the
19389 default adaptive scoring rules will be used.  If it is @code{ignore}, no
19390 adaptive scoring will be performed on this group.  If it is a list, this
19391 list will be used as the adaptive scoring rules.  If it isn't present,
19392 or is something other than @code{t} or @code{ignore}, the default
19393 adaptive scoring rules will be used.  If you want to use adaptive
19394 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
19395 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
19396 not want adaptive scoring.  If you only want adaptive scoring in a few
19397 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
19398 insert @code{(adapt t)} in the score files of the groups where you want
19399 it.
19400
19401 @item adapt-file
19402 All adaptive score entries will go to the file named by this entry.  It
19403 will also be applied when entering the group.  This atom might be handy
19404 if you want to adapt on several groups at once, using the same adaptive
19405 file for a number of groups.
19406
19407 @item local
19408 @cindex local variables
19409 The value of this entry should be a list of @code{(@var{var}
19410 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
19411 current summary buffer, and set to the value specified.  This is a
19412 convenient, if somewhat strange, way of setting variables in some
19413 groups if you don't like hooks much.  Note that the @var{value} won't
19414 be evaluated.
19415 @end table
19416
19417
19418 @node Score File Editing
19419 @section Score File Editing
19420
19421 You normally enter all scoring commands from the summary buffer, but you
19422 might feel the urge to edit them by hand as well, so we've supplied you
19423 with a mode for that.
19424
19425 It's simply a slightly customized @code{emacs-lisp} mode, with these
19426 additional commands:
19427
19428 @table @kbd
19429
19430 @item C-c C-c
19431 @kindex C-c C-c (Score)
19432 @findex gnus-score-edit-done
19433 Save the changes you have made and return to the summary buffer
19434 (@code{gnus-score-edit-done}).
19435
19436 @item C-c C-d
19437 @kindex C-c C-d (Score)
19438 @findex gnus-score-edit-insert-date
19439 Insert the current date in numerical format
19440 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
19441 you were wondering.
19442
19443 @item C-c C-p
19444 @kindex C-c C-p (Score)
19445 @findex gnus-score-pretty-print
19446 The adaptive score files are saved in an unformatted fashion.  If you
19447 intend to read one of these files, you want to @dfn{pretty print} it
19448 first.  This command (@code{gnus-score-pretty-print}) does that for
19449 you.
19450
19451 @end table
19452
19453 Type @kbd{M-x gnus-score-mode} to use this mode.
19454
19455 @vindex gnus-score-mode-hook
19456 @code{gnus-score-menu-hook} is run in score mode buffers.
19457
19458 In the summary buffer you can use commands like @kbd{V f}, @kbd{V e} and
19459 @kbd{V t} to begin editing score files.
19460
19461
19462 @node Adaptive Scoring
19463 @section Adaptive Scoring
19464 @cindex adaptive scoring
19465
19466 If all this scoring is getting you down, Gnus has a way of making it all
19467 happen automatically---as if by magic.  Or rather, as if by artificial
19468 stupidity, to be precise.
19469
19470 @vindex gnus-use-adaptive-scoring
19471 When you read an article, or mark an article as read, or kill an
19472 article, you leave marks behind.  On exit from the group, Gnus can sniff
19473 these marks and add score elements depending on what marks it finds.
19474 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
19475 @code{t} or @code{(line)}.  If you want score adaptively on separate
19476 words appearing in the subjects, you should set this variable to
19477 @code{(word)}.  If you want to use both adaptive methods, set this
19478 variable to @code{(word line)}.
19479
19480 @vindex gnus-default-adaptive-score-alist
19481 To give you complete control over the scoring process, you can customize
19482 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
19483 might look something like this:
19484
19485 @lisp
19486 (setq gnus-default-adaptive-score-alist
19487   '((gnus-unread-mark)
19488     (gnus-ticked-mark (from 4))
19489     (gnus-dormant-mark (from 5))
19490     (gnus-del-mark (from -4) (subject -1))
19491     (gnus-read-mark (from 4) (subject 2))
19492     (gnus-expirable-mark (from -1) (subject -1))
19493     (gnus-killed-mark (from -1) (subject -3))
19494     (gnus-kill-file-mark)
19495     (gnus-ancient-mark)
19496     (gnus-low-score-mark)
19497     (gnus-catchup-mark (from -1) (subject -1))))
19498 @end lisp
19499
19500 As you see, each element in this alist has a mark as a key (either a
19501 variable name or a ``real'' mark---a character).  Following this key is
19502 a arbitrary number of header/score pairs.  If there are no header/score
19503 pairs following the key, no adaptive scoring will be done on articles
19504 that have that key as the article mark.  For instance, articles with
19505 @code{gnus-unread-mark} in the example above will not get adaptive score
19506 entries.
19507
19508 Each article can have only one mark, so just a single of these rules
19509 will be applied to each article.
19510
19511 To take @code{gnus-del-mark} as an example---this alist says that all
19512 articles that have that mark (i.e., are marked with @samp{e}) will have a
19513 score entry added to lower based on the @code{From} header by -4, and
19514 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
19515
19516 If you have marked 10 articles with the same subject with
19517 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
19518 That means that that subject will get a score of ten times -1, which
19519 should be, unless I'm much mistaken, -10.
19520
19521 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
19522 the read articles will be marked with the @samp{E} mark.  This'll
19523 probably make adaptive scoring slightly impossible, so auto-expiring and
19524 adaptive scoring doesn't really mix very well.
19525
19526 The headers you can score on are @code{from}, @code{subject},
19527 @code{message-id}, @code{references}, @code{xref}, @code{lines},
19528 @code{chars} and @code{date}.  In addition, you can score on
19529 @code{followup}, which will create an adaptive score entry that matches
19530 on the @code{References} header using the @code{Message-ID} of the
19531 current article, thereby matching the following thread.
19532
19533 If you use this scheme, you should set the score file atom @code{mark}
19534 to something small---like -300, perhaps, to avoid having small random
19535 changes result in articles getting marked as read.
19536
19537 After using adaptive scoring for a week or so, Gnus should start to
19538 become properly trained and enhance the authors you like best, and kill
19539 the authors you like least, without you having to say so explicitly.
19540
19541 You can control what groups the adaptive scoring is to be performed on
19542 by using the score files (@pxref{Score File Format}).  This will also
19543 let you use different rules in different groups.
19544
19545 @vindex gnus-adaptive-file-suffix
19546 The adaptive score entries will be put into a file where the name is the
19547 group name with @code{gnus-adaptive-file-suffix} appended.  The default
19548 is @file{ADAPT}.
19549
19550 @vindex gnus-score-exact-adapt-limit
19551 When doing adaptive scoring, substring or fuzzy matching would probably
19552 give you the best results in most cases.  However, if the header one
19553 matches is short, the possibility for false positives is great, so if
19554 the length of the match is less than
19555 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
19556 this variable is @code{nil}, exact matching will always be used to avoid
19557 this problem.
19558
19559 @vindex gnus-default-adaptive-word-score-alist
19560 As mentioned above, you can adapt either on individual words or entire
19561 headers.  If you adapt on words, the
19562 @code{gnus-default-adaptive-word-score-alist} variable says what score
19563 each instance of a word should add given a mark.
19564
19565 @lisp
19566 (setq gnus-default-adaptive-word-score-alist
19567       `((,gnus-read-mark . 30)
19568         (,gnus-catchup-mark . -10)
19569         (,gnus-killed-mark . -20)
19570         (,gnus-del-mark . -15)))
19571 @end lisp
19572
19573 This is the default value.  If you have adaption on words enabled, every
19574 word that appears in subjects of articles marked with
19575 @code{gnus-read-mark} will result in a score rule that increase the
19576 score with 30 points.
19577
19578 @vindex gnus-default-ignored-adaptive-words
19579 @vindex gnus-ignored-adaptive-words
19580 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
19581 will be ignored.  If you wish to add more words to be ignored, use the
19582 @code{gnus-ignored-adaptive-words} list instead.
19583
19584 @vindex gnus-adaptive-word-length-limit
19585 Some may feel that short words shouldn't count when doing adaptive
19586 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
19587 an integer.  Words shorter than this number will be ignored.  This
19588 variable defaults to @code{nil}.
19589
19590 @vindex gnus-adaptive-word-syntax-table
19591 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
19592 syntax table in effect.  It is similar to the standard syntax table, but
19593 it considers numbers to be non-word-constituent characters.
19594
19595 @vindex gnus-adaptive-word-minimum
19596 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
19597 word scoring process will never bring down the score of an article to
19598 below this number.  The default is @code{nil}.
19599
19600 @vindex gnus-adaptive-word-no-group-words
19601 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
19602 won't adaptively word score any of the words in the group name.  Useful
19603 for groups like @samp{comp.editors.emacs}, where most of the subject
19604 lines contain the word @samp{emacs}.
19605
19606 After using this scheme for a while, it might be nice to write a
19607 @code{gnus-psychoanalyze-user} command to go through the rules and see
19608 what words you like and what words you don't like.  Or perhaps not.
19609
19610 Note that the adaptive word scoring thing is highly experimental and is
19611 likely to change in the future.  Initial impressions seem to indicate
19612 that it's totally useless as it stands.  Some more work (involving more
19613 rigorous statistical methods) will have to be done to make this useful.
19614
19615
19616 @node Home Score File
19617 @section Home Score File
19618
19619 The score file where new score file entries will go is called the
19620 @dfn{home score file}.  This is normally (and by default) the score file
19621 for the group itself.  For instance, the home score file for
19622 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
19623
19624 However, this may not be what you want.  It is often convenient to share
19625 a common home score file among many groups---all @samp{emacs} groups
19626 could perhaps use the same home score file.
19627
19628 @vindex gnus-home-score-file
19629 The variable that controls this is @code{gnus-home-score-file}.  It can
19630 be:
19631
19632 @enumerate
19633 @item
19634 A string.  Then this file will be used as the home score file for all
19635 groups.
19636
19637 @item
19638 A function.  The result of this function will be used as the home score
19639 file.  The function will be called with the name of the group as the
19640 parameter.
19641
19642 @item
19643 A list.  The elements in this list can be:
19644
19645 @enumerate
19646 @item
19647 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
19648 group name, the @var{file-name} will be used as the home score file.
19649
19650 @item
19651 A function.  If the function returns non-@code{nil}, the result will
19652 be used as the home score file.
19653
19654 @item
19655 A string.  Use the string as the home score file.
19656 @end enumerate
19657
19658 The list will be traversed from the beginning towards the end looking
19659 for matches.
19660
19661 @end enumerate
19662
19663 So, if you want to use just a single score file, you could say:
19664
19665 @lisp
19666 (setq gnus-home-score-file
19667       "my-total-score-file.SCORE")
19668 @end lisp
19669
19670 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
19671 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
19672
19673 @findex gnus-hierarchial-home-score-file
19674 @lisp
19675 (setq gnus-home-score-file
19676       'gnus-hierarchial-home-score-file)
19677 @end lisp
19678
19679 This is a ready-made function provided for your convenience.
19680 Other functions include
19681
19682 @table @code
19683 @item gnus-current-home-score-file
19684 @findex gnus-current-home-score-file
19685 Return the ``current'' regular score file.  This will make scoring
19686 commands add entry to the ``innermost'' matching score file.
19687
19688 @end table
19689
19690 If you want to have one score file for the @samp{emacs} groups and
19691 another for the @samp{comp} groups, while letting all other groups use
19692 their own home score files:
19693
19694 @lisp
19695 (setq gnus-home-score-file
19696       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
19697       '(("\\.emacs" "emacs.SCORE")
19698         ;; @r{All the comp groups in one score file}
19699         ("^comp" "comp.SCORE")))
19700 @end lisp
19701
19702 @vindex gnus-home-adapt-file
19703 @code{gnus-home-adapt-file} works exactly the same way as
19704 @code{gnus-home-score-file}, but says what the home adaptive score file
19705 is instead.  All new adaptive file entries will go into the file
19706 specified by this variable, and the same syntax is allowed.
19707
19708 In addition to using @code{gnus-home-score-file} and
19709 @code{gnus-home-adapt-file}, you can also use group parameters
19710 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
19711 Parameters}) to achieve much the same.  Group and topic parameters take
19712 precedence over this variable.
19713
19714
19715 @node Followups To Yourself
19716 @section Followups To Yourself
19717
19718 Gnus offers two commands for picking out the @code{Message-ID} header in
19719 the current buffer.  Gnus will then add a score rule that scores using
19720 this @code{Message-ID} on the @code{References} header of other
19721 articles.  This will, in effect, increase the score of all articles that
19722 respond to the article in the current buffer.  Quite useful if you want
19723 to easily note when people answer what you've said.
19724
19725 @table @code
19726
19727 @item gnus-score-followup-article
19728 @findex gnus-score-followup-article
19729 This will add a score to articles that directly follow up your own
19730 article.
19731
19732 @item gnus-score-followup-thread
19733 @findex gnus-score-followup-thread
19734 This will add a score to all articles that appear in a thread ``below''
19735 your own article.
19736 @end table
19737
19738 @vindex message-sent-hook
19739 These two functions are both primarily meant to be used in hooks like
19740 @code{message-sent-hook}, like this:
19741 @lisp
19742 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
19743 @end lisp
19744
19745
19746 If you look closely at your own @code{Message-ID}, you'll notice that
19747 the first two or three characters are always the same.  Here's two of
19748 mine:
19749
19750 @example
19751 <x6u3u47icf.fsf@@eyesore.no>
19752 <x6sp9o7ibw.fsf@@eyesore.no>
19753 @end example
19754
19755 So ``my'' ident on this machine is @samp{x6}.  This can be
19756 exploited---the following rule will raise the score on all followups to
19757 myself:
19758
19759 @lisp
19760 ("references"
19761  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
19762   1000 nil r))
19763 @end lisp
19764
19765 Whether it's the first two or first three characters that are ``yours''
19766 is system-dependent.
19767
19768
19769 @node Scoring On Other Headers
19770 @section Scoring On Other Headers
19771 @cindex scoring on other headers
19772
19773 Gnus is quite fast when scoring the ``traditional''
19774 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
19775 other headers requires writing a @code{head} scoring rule, which means
19776 that Gnus has to request every single article from the back end to find
19777 matches.  This takes a long time in big groups.
19778
19779 Now, there's not much you can do about this for news groups, but for
19780 mail groups, you have greater control.  In @ref{To From Newsgroups},
19781 it's explained in greater detail what this mechanism does, but here's
19782 a cookbook example for @code{nnml} on how to allow scoring on the
19783 @samp{To} and @samp{Cc} headers.
19784
19785 Put the following in your @file{~/.gnus.el} file.
19786
19787 @lisp
19788 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
19789       nnmail-extra-headers gnus-extra-headers)
19790 @end lisp
19791
19792 Restart Gnus and rebuild your @code{nnml} overview files with the
19793 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
19794 time if you have much mail.
19795
19796 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
19797 so: @kbd{I e s p To RET <your name> RET}.
19798
19799 See?  Simple.
19800
19801
19802 @node Scoring Tips
19803 @section Scoring Tips
19804 @cindex scoring tips
19805
19806 @table @dfn
19807
19808 @item Crossposts
19809 @cindex crossposts
19810 @cindex scoring crossposts
19811 If you want to lower the score of crossposts, the line to match on is
19812 the @code{Xref} header.
19813 @lisp
19814 ("xref" (" talk.politics.misc:" -1000))
19815 @end lisp
19816
19817 @item Multiple crossposts
19818 If you want to lower the score of articles that have been crossposted to
19819 more than, say, 3 groups:
19820 @lisp
19821 ("xref"
19822   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
19823    -1000 nil r))
19824 @end lisp
19825
19826 @item Matching on the body
19827 This is generally not a very good idea---it takes a very long time.
19828 Gnus actually has to fetch each individual article from the server.  But
19829 you might want to anyway, I guess.  Even though there are three match
19830 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
19831 and stick with it in each score file.  If you use any two, each article
19832 will be fetched @emph{twice}.  If you want to match a bit on the
19833 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
19834 the matches.
19835
19836 @item Marking as read
19837 You will probably want to mark articles that have scores below a certain
19838 number as read.  This is most easily achieved by putting the following
19839 in your @file{all.SCORE} file:
19840 @lisp
19841 ((mark -100))
19842 @end lisp
19843 You may also consider doing something similar with @code{expunge}.
19844
19845 @item Negated character classes
19846 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
19847 That will match newlines, which might lead to, well, The Unknown.  Say
19848 @code{[^abcd\n]*} instead.
19849 @end table
19850
19851
19852 @node Reverse Scoring
19853 @section Reverse Scoring
19854 @cindex reverse scoring
19855
19856 If you want to keep just articles that have @samp{Sex with Emacs} in the
19857 subject header, and expunge all other articles, you could put something
19858 like this in your score file:
19859
19860 @lisp
19861 (("subject"
19862   ("Sex with Emacs" 2))
19863  (mark 1)
19864  (expunge 1))
19865 @end lisp
19866
19867 So, you raise all articles that match @samp{Sex with Emacs} and mark the
19868 rest as read, and expunge them to boot.
19869
19870
19871 @node Global Score Files
19872 @section Global Score Files
19873 @cindex global score files
19874
19875 Sure, other newsreaders have ``global kill files''.  These are usually
19876 nothing more than a single kill file that applies to all groups, stored
19877 in the user's home directory.  Bah!  Puny, weak newsreaders!
19878
19879 What I'm talking about here are Global Score Files.  Score files from
19880 all over the world, from users everywhere, uniting all nations in one
19881 big, happy score file union!  Ange-score!  New and untested!
19882
19883 @vindex gnus-global-score-files
19884 All you have to do to use other people's score files is to set the
19885 @code{gnus-global-score-files} variable.  One entry for each score file,
19886 or each score file directory.  Gnus will decide by itself what score
19887 files are applicable to which group.
19888
19889 To use the score file
19890 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
19891 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
19892 say this:
19893
19894 @lisp
19895 (setq gnus-global-score-files
19896       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
19897         "/ftp@@ftp.some-where:/pub/score/"))
19898 @end lisp
19899
19900 @findex gnus-score-search-global-directories
19901 @noindent
19902 Simple, eh?  Directory names must end with a @samp{/}.  These
19903 directories are typically scanned only once during each Gnus session.
19904 If you feel the need to manually re-scan the remote directories, you can
19905 use the @code{gnus-score-search-global-directories} command.
19906
19907 Note that, at present, using this option will slow down group entry
19908 somewhat.  (That is---a lot.)
19909
19910 If you want to start maintaining score files for other people to use,
19911 just put your score file up for anonymous ftp and announce it to the
19912 world.  Become a retro-moderator!  Participate in the retro-moderator
19913 wars sure to ensue, where retro-moderators battle it out for the
19914 sympathy of the people, luring them to use their score files on false
19915 premises!  Yay!  The net is saved!
19916
19917 Here are some tips for the would-be retro-moderator, off the top of my
19918 head:
19919
19920 @itemize @bullet
19921
19922 @item
19923 Articles heavily crossposted are probably junk.
19924 @item
19925 To lower a single inappropriate article, lower by @code{Message-ID}.
19926 @item
19927 Particularly brilliant authors can be raised on a permanent basis.
19928 @item
19929 Authors that repeatedly post off-charter for the group can safely be
19930 lowered out of existence.
19931 @item
19932 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
19933 articles completely.
19934
19935 @item
19936 Use expiring score entries to keep the size of the file down.  You
19937 should probably have a long expiry period, though, as some sites keep
19938 old articles for a long time.
19939 @end itemize
19940
19941 @dots{} I wonder whether other newsreaders will support global score files
19942 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
19943 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
19944 holding our breath yet?
19945
19946
19947 @node Kill Files
19948 @section Kill Files
19949 @cindex kill files
19950
19951 Gnus still supports those pesky old kill files.  In fact, the kill file
19952 entries can now be expiring, which is something I wrote before Daniel
19953 Quinlan thought of doing score files, so I've left the code in there.
19954
19955 In short, kill processing is a lot slower (and I do mean @emph{a lot})
19956 than score processing, so it might be a good idea to rewrite your kill
19957 files into score files.
19958
19959 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
19960 forms into this file, which means that you can use kill files as some
19961 sort of primitive hook function to be run on group entry, even though
19962 that isn't a very good idea.
19963
19964 Normal kill files look like this:
19965
19966 @lisp
19967 (gnus-kill "From" "Lars Ingebrigtsen")
19968 (gnus-kill "Subject" "ding")
19969 (gnus-expunge "X")
19970 @end lisp
19971
19972 This will mark every article written by me as read, and remove the
19973 marked articles from the summary buffer.  Very useful, you'll agree.
19974
19975 Other programs use a totally different kill file syntax.  If Gnus
19976 encounters what looks like a @code{rn} kill file, it will take a stab at
19977 interpreting it.
19978
19979 Two summary functions for editing a @sc{gnus} kill file:
19980
19981 @table @kbd
19982
19983 @item M-k
19984 @kindex M-k (Summary)
19985 @findex gnus-summary-edit-local-kill
19986 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
19987
19988 @item M-K
19989 @kindex M-K (Summary)
19990 @findex gnus-summary-edit-global-kill
19991 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
19992 @end table
19993
19994 Two group mode functions for editing the kill files:
19995
19996 @table @kbd
19997
19998 @item M-k
19999 @kindex M-k (Group)
20000 @findex gnus-group-edit-local-kill
20001 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
20002
20003 @item M-K
20004 @kindex M-K (Group)
20005 @findex gnus-group-edit-global-kill
20006 Edit the general kill file (@code{gnus-group-edit-global-kill}).
20007 @end table
20008
20009 Kill file variables:
20010
20011 @table @code
20012 @item gnus-kill-file-name
20013 @vindex gnus-kill-file-name
20014 A kill file for the group @samp{soc.motss} is normally called
20015 @file{soc.motss.KILL}.  The suffix appended to the group name to get
20016 this file name is detailed by the @code{gnus-kill-file-name} variable.
20017 The ``global'' kill file (not in the score file sense of ``global'', of
20018 course) is just called @file{KILL}.
20019
20020 @vindex gnus-kill-save-kill-file
20021 @item gnus-kill-save-kill-file
20022 If this variable is non-@code{nil}, Gnus will save the
20023 kill file after processing, which is necessary if you use expiring
20024 kills.
20025
20026 @item gnus-apply-kill-hook
20027 @vindex gnus-apply-kill-hook
20028 @findex gnus-apply-kill-file-unless-scored
20029 @findex gnus-apply-kill-file
20030 A hook called to apply kill files to a group.  It is
20031 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
20032 kill file if you have a score file for the same group, you can set this
20033 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
20034 kill files to be processed, you should set this variable to @code{nil}.
20035
20036 @item gnus-kill-file-mode-hook
20037 @vindex gnus-kill-file-mode-hook
20038 A hook called in kill-file mode buffers.
20039
20040 @end table
20041
20042
20043 @node Converting Kill Files
20044 @section Converting Kill Files
20045 @cindex kill files
20046 @cindex converting kill files
20047
20048 If you have loads of old kill files, you may want to convert them into
20049 score files.  If they are ``regular'', you can use
20050 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
20051 by hand.
20052
20053 The kill to score conversion package isn't included in Gnus by default.
20054 You can fetch it from
20055 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
20056
20057 If your old kill files are very complex---if they contain more
20058 non-@code{gnus-kill} forms than not, you'll have to convert them by
20059 hand.  Or just let them be as they are.  Gnus will still use them as
20060 before.
20061
20062
20063 @node GroupLens
20064 @section GroupLens
20065 @cindex GroupLens
20066
20067 @sc{Note:} Unfortunately the GroupLens system seems to have shut down,
20068 so this section is mostly of historical interest.
20069
20070 @uref{http://www.cs.umn.edu/Research/GroupLens/, GroupLens} is a
20071 collaborative filtering system that helps you work together with other
20072 people to find the quality news articles out of the huge volume of
20073 news articles generated every day.
20074
20075 To accomplish this the GroupLens system combines your opinions about
20076 articles you have already read with the opinions of others who have done
20077 likewise and gives you a personalized prediction for each unread news
20078 article.  Think of GroupLens as a matchmaker.  GroupLens watches how you
20079 rate articles, and finds other people that rate articles the same way.
20080 Once it has found some people you agree with it tells you, in the form
20081 of a prediction, what they thought of the article.  You can use this
20082 prediction to help you decide whether or not you want to read the
20083 article.
20084
20085 @menu
20086 * Using GroupLens::             How to make Gnus use GroupLens.
20087 * Rating Articles::             Letting GroupLens know how you rate articles.
20088 * Displaying Predictions::      Displaying predictions given by GroupLens.
20089 * GroupLens Variables::         Customizing GroupLens.
20090 @end menu
20091
20092
20093 @node Using GroupLens
20094 @subsection Using GroupLens
20095
20096 To use GroupLens you must register a pseudonym with your local
20097 @uref{http://www.cs.umn.edu/Research/GroupLens/bbb.html, Better Bit
20098 Bureau (BBB)} is the only better bit in town at the moment.
20099
20100 Once you have registered you'll need to set a couple of variables.
20101
20102 @table @code
20103
20104 @item gnus-use-grouplens
20105 @vindex gnus-use-grouplens
20106 Setting this variable to a non-@code{nil} value will make Gnus hook into
20107 all the relevant GroupLens functions.
20108
20109 @item grouplens-pseudonym
20110 @vindex grouplens-pseudonym
20111 This variable should be set to the pseudonym you got when registering
20112 with the Better Bit Bureau.
20113
20114 @item grouplens-newsgroups
20115 @vindex grouplens-newsgroups
20116 A list of groups that you want to get GroupLens predictions for.
20117
20118 @end table
20119
20120 That's the minimum of what you need to get up and running with GroupLens.
20121 Once you've registered, GroupLens will start giving you scores for
20122 articles based on the average of what other people think.  But, to get
20123 the real benefit of GroupLens you need to start rating articles
20124 yourself.  Then the scores GroupLens gives you will be personalized for
20125 you, based on how the people you usually agree with have already rated.
20126
20127
20128 @node Rating Articles
20129 @subsection Rating Articles
20130
20131 In GroupLens, an article is rated on a scale from 1 to 5, inclusive.
20132 Where 1 means something like this article is a waste of bandwidth and 5
20133 means that the article was really good.  The basic question to ask
20134 yourself is, ``on a scale from 1 to 5 would I like to see more articles
20135 like this one?''
20136
20137 There are four ways to enter a rating for an article in GroupLens.
20138
20139 @table @kbd
20140
20141 @item r
20142 @kindex r (GroupLens)
20143 @findex bbb-summary-rate-article
20144 This function will prompt you for a rating on a scale of one to five.
20145
20146 @item k
20147 @kindex k (GroupLens)
20148 @findex grouplens-score-thread
20149 This function will prompt you for a rating, and rate all the articles in
20150 the thread.  This is really useful for some of those long running giant
20151 threads in rec.humor.
20152
20153 @end table
20154
20155 The next two commands, @kbd{n} and @kbd{,} take a numerical prefix to be
20156 the score of the article you're reading.
20157
20158 @table @kbd
20159
20160 @item 1-5 n
20161 @kindex n (GroupLens)
20162 @findex grouplens-next-unread-article
20163 Rate the article and go to the next unread article.
20164
20165 @item 1-5 ,
20166 @kindex , (GroupLens)
20167 @findex grouplens-best-unread-article
20168 Rate the article and go to the next unread article with the highest score.
20169
20170 @end table
20171
20172 If you want to give the current article a score of 4 and then go to the
20173 next article, just type @kbd{4 n}.
20174
20175
20176 @node Displaying Predictions
20177 @subsection Displaying Predictions
20178
20179 GroupLens makes a prediction for you about how much you will like a
20180 news article.  The predictions from GroupLens are on a scale from 1 to
20181 5, where 1 is the worst and 5 is the best.  You can use the predictions
20182 from GroupLens in one of three ways controlled by the variable
20183 @code{gnus-grouplens-override-scoring}.
20184
20185 @vindex gnus-grouplens-override-scoring
20186 There are three ways to display predictions in grouplens.  You may
20187 choose to have the GroupLens scores contribute to, or override the
20188 regular Gnus scoring mechanism.  override is the default; however, some
20189 people prefer to see the Gnus scores plus the grouplens scores.  To get
20190 the separate scoring behavior you need to set
20191 @code{gnus-grouplens-override-scoring} to @code{'separate}.  To have the
20192 GroupLens predictions combined with the grouplens scores set it to
20193 @code{'override} and to combine the scores set
20194 @code{gnus-grouplens-override-scoring} to @code{'combine}.  When you use
20195 the combine option you will also want to set the values for
20196 @code{grouplens-prediction-offset} and
20197 @code{grouplens-score-scale-factor}.
20198
20199 @vindex grouplens-prediction-display
20200 In either case, GroupLens gives you a few choices for how you would like
20201 to see your predictions displayed.  The display of predictions is
20202 controlled by the @code{grouplens-prediction-display} variable.
20203
20204 The following are valid values for that variable.
20205
20206 @table @code
20207 @item prediction-spot
20208 The higher the prediction, the further to the right an @samp{*} is
20209 displayed.
20210
20211 @item confidence-interval
20212 A numeric confidence interval.
20213
20214 @item prediction-bar
20215 The higher the prediction, the longer the bar.
20216
20217 @item confidence-bar
20218 Numerical confidence.
20219
20220 @item confidence-spot
20221 The spot gets bigger with more confidence.
20222
20223 @item prediction-num
20224 Plain-old numeric value.
20225
20226 @item confidence-plus-minus
20227 Prediction +/- confidence.
20228
20229 @end table
20230
20231
20232 @node GroupLens Variables
20233 @subsection GroupLens Variables
20234
20235 @table @code
20236
20237 @item gnus-summary-grouplens-line-format
20238 The summary line format used in GroupLens-enhanced summary buffers.  It
20239 accepts the same specs as the normal summary line format (@pxref{Summary
20240 Buffer Lines}).  The default is @samp{%U%R%z%l%I%(%[%4L: %-23,23n%]%)
20241 %s\n}.
20242
20243 @item grouplens-bbb-host
20244 Host running the bbbd server.  @samp{grouplens.cs.umn.edu} is the
20245 default.
20246
20247 @item grouplens-bbb-port
20248 Port of the host running the bbbd server.  The default is 9000.
20249
20250 @item grouplens-score-offset
20251 Offset the prediction by this value.  In other words, subtract the
20252 prediction value by this number to arrive at the effective score.  The
20253 default is 0.
20254
20255 @item grouplens-score-scale-factor
20256 This variable allows the user to magnify the effect of GroupLens scores.
20257 The scale factor is applied after the offset.  The default is 1.
20258
20259 @end table
20260
20261
20262 @node Advanced Scoring
20263 @section Advanced Scoring
20264
20265 Scoring on Subjects and From headers is nice enough, but what if you're
20266 really interested in what a person has to say only when she's talking
20267 about a particular subject?  Or what if you really don't want to
20268 read what person A has to say when she's following up to person B, but
20269 want to read what she says when she's following up to person C?
20270
20271 By using advanced scoring rules you may create arbitrarily complex
20272 scoring patterns.
20273
20274 @menu
20275 * Advanced Scoring Syntax::     A definition.
20276 * Advanced Scoring Examples::   What they look like.
20277 * Advanced Scoring Tips::       Getting the most out of it.
20278 @end menu
20279
20280
20281 @node Advanced Scoring Syntax
20282 @subsection Advanced Scoring Syntax
20283
20284 Ordinary scoring rules have a string as the first element in the rule.
20285 Advanced scoring rules have a list as the first element.  The second
20286 element is the score to be applied if the first element evaluated to a
20287 non-@code{nil} value.
20288
20289 These lists may consist of three logical operators, one redirection
20290 operator, and various match operators.
20291
20292 Logical operators:
20293
20294 @table @code
20295 @item &
20296 @itemx and
20297 This logical operator will evaluate each of its arguments until it finds
20298 one that evaluates to @code{false}, and then it'll stop.  If all arguments
20299 evaluate to @code{true} values, then this operator will return
20300 @code{true}.
20301
20302 @item |
20303 @itemx or
20304 This logical operator will evaluate each of its arguments until it finds
20305 one that evaluates to @code{true}.  If no arguments are @code{true},
20306 then this operator will return @code{false}.
20307
20308 @item !
20309 @itemx not
20310 @itemx Â¬
20311 This logical operator only takes a single argument.  It returns the
20312 logical negation of the value of its argument.
20313
20314 @end table
20315
20316 There is an @dfn{indirection operator} that will make its arguments
20317 apply to the ancestors of the current article being scored.  For
20318 instance, @code{1-} will make score rules apply to the parent of the
20319 current article.  @code{2-} will make score rules apply to the
20320 grandparent of the current article.  Alternatively, you can write
20321 @code{^^}, where the number of @code{^}s (carets) says how far back into
20322 the ancestry you want to go.
20323
20324 Finally, we have the match operators.  These are the ones that do the
20325 real work.  Match operators are header name strings followed by a match
20326 and a match type.  A typical match operator looks like @samp{("from"
20327 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
20328 simple scoring, and the match types are also the same.
20329
20330
20331 @node Advanced Scoring Examples
20332 @subsection Advanced Scoring Examples
20333
20334 Please note that the following examples are score file rules.  To
20335 make a complete score file from them, surround them with another pair
20336 of parentheses.
20337
20338 Let's say you want to increase the score of articles written by Lars
20339 when he's talking about Gnus:
20340
20341 @example
20342 @group
20343 ((&
20344   ("from" "Lars Ingebrigtsen")
20345   ("subject" "Gnus"))
20346  1000)
20347 @end group
20348 @end example
20349
20350 Quite simple, huh?
20351
20352 When he writes long articles, he sometimes has something nice to say:
20353
20354 @example
20355 ((&
20356   ("from" "Lars Ingebrigtsen")
20357   (|
20358    ("subject" "Gnus")
20359    ("lines" 100 >)))
20360  1000)
20361 @end example
20362
20363 However, when he responds to things written by Reig Eigil Logge, you
20364 really don't want to read what he's written:
20365
20366 @example
20367 ((&
20368   ("from" "Lars Ingebrigtsen")
20369   (1- ("from" "Reig Eigir Logge")))
20370  -100000)
20371 @end example
20372
20373 Everybody that follows up Redmondo when he writes about disappearing
20374 socks should have their scores raised, but only when they talk about
20375 white socks.  However, when Lars talks about socks, it's usually not
20376 very interesting:
20377
20378 @example
20379 ((&
20380   (1-
20381    (&
20382     ("from" "redmondo@@.*no" r)
20383     ("body" "disappearing.*socks" t)))
20384   (! ("from" "Lars Ingebrigtsen"))
20385   ("body" "white.*socks"))
20386  1000)
20387 @end example
20388
20389 The possibilities are endless.
20390
20391
20392 @node Advanced Scoring Tips
20393 @subsection Advanced Scoring Tips
20394
20395 The @code{&} and @code{|} logical operators do short-circuit logic.
20396 That is, they stop processing their arguments when it's clear what the
20397 result of the operation will be.  For instance, if one of the arguments
20398 of an @code{&} evaluates to @code{false}, there's no point in evaluating
20399 the rest of the arguments.  This means that you should put slow matches
20400 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
20401 @samp{subject}) first.
20402
20403 The indirection arguments (@code{1-} and so on) will make their
20404 arguments work on previous generations of the thread.  If you say
20405 something like:
20406
20407 @example
20408 ...
20409 (1-
20410  (1-
20411   ("from" "lars")))
20412 ...
20413 @end example
20414
20415 Then that means "score on the from header of the grandparent of the
20416 current article".  An indirection is quite fast, but it's better to say:
20417
20418 @example
20419 (1-
20420  (&
20421   ("from" "Lars")
20422   ("subject" "Gnus")))
20423 @end example
20424
20425 than it is to say:
20426
20427 @example
20428 (&
20429  (1- ("from" "Lars"))
20430  (1- ("subject" "Gnus")))
20431 @end example
20432
20433
20434 @node Score Decays
20435 @section Score Decays
20436 @cindex score decays
20437 @cindex decays
20438
20439 You may find that your scores have a tendency to grow without
20440 bounds, especially if you're using adaptive scoring.  If scores get too
20441 big, they lose all meaning---they simply max out and it's difficult to
20442 use them in any sensible way.
20443
20444 @vindex gnus-decay-scores
20445 @findex gnus-decay-score
20446 @vindex gnus-decay-score-function
20447 Gnus provides a mechanism for decaying scores to help with this problem.
20448 When score files are loaded and @code{gnus-decay-scores} is
20449 non-@code{nil}, Gnus will run the score files through the decaying
20450 mechanism thereby lowering the scores of all non-permanent score rules.
20451 The decay itself if performed by the @code{gnus-decay-score-function}
20452 function, which is @code{gnus-decay-score} by default.  Here's the
20453 definition of that function:
20454
20455 @lisp
20456 (defun gnus-decay-score (score)
20457   "Decay SCORE according to `gnus-score-decay-constant'
20458 and `gnus-score-decay-scale'."
20459   (let ((n (- score
20460               (* (if (< score 0) -1 1)
20461                  (min (abs score)
20462                       (max gnus-score-decay-constant
20463                            (* (abs score)
20464                               gnus-score-decay-scale)))))))
20465     (if (and (featurep 'xemacs)
20466              ;; XEmacs' floor can handle only the floating point
20467              ;; number below the half of the maximum integer.
20468              (> (abs n) (lsh -1 -2)))
20469         (string-to-number
20470          (car (split-string (number-to-string n) "\\.")))
20471       (floor n))))
20472 @end lisp
20473
20474 @vindex gnus-score-decay-scale
20475 @vindex gnus-score-decay-constant
20476 @code{gnus-score-decay-constant} is 3 by default and
20477 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
20478
20479 @enumerate
20480 @item
20481 Scores between -3 and 3 will be set to 0 when this function is called.
20482
20483 @item
20484 Scores with magnitudes between 3 and 60 will be shrunk by 3.
20485
20486 @item
20487 Scores with magnitudes greater than 60 will be shrunk by 5% of the
20488 score.
20489 @end enumerate
20490
20491 If you don't like this decay function, write your own.  It is called
20492 with the score to be decayed as its only parameter, and it should return
20493 the new score, which should be an integer.
20494
20495 Gnus will try to decay scores once a day.  If you haven't run Gnus for
20496 four days, Gnus will decay the scores four times, for instance.
20497
20498 @iftex
20499 @iflatex
20500 @chapter Message
20501 @include message.texi
20502 @chapter Emacs MIME
20503 @include emacs-mime.texi
20504 @chapter Sieve
20505 @include sieve.texi
20506 @chapter PGG
20507 @include pgg.texi
20508 @chapter SASL
20509 @include sasl.texi
20510 @end iflatex
20511 @end iftex
20512
20513 @node Various
20514 @chapter Various
20515
20516 @menu
20517 * Process/Prefix::              A convention used by many treatment commands.
20518 * Interactive::                 Making Gnus ask you many questions.
20519 * Symbolic Prefixes::           How to supply some Gnus functions with options.
20520 * Formatting Variables::        You can specify what buffers should look like.
20521 * Window Layout::               Configuring the Gnus buffer windows.
20522 * Faces and Fonts::             How to change how faces look.
20523 * Compilation::                 How to speed Gnus up.
20524 * Mode Lines::                  Displaying information in the mode lines.
20525 * Highlighting and Menus::      Making buffers look all nice and cozy.
20526 * Buttons::                     Get tendinitis in ten easy steps!
20527 * Daemons::                     Gnus can do things behind your back.
20528 * NoCeM::                       How to avoid spam and other fatty foods.
20529 * Undo::                        Some actions can be undone.
20530 * Predicate Specifiers::        Specifying predicates.
20531 * Moderation::                  What to do if you're a moderator.
20532 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
20533 * Fuzzy Matching::              What's the big fuzz?
20534 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
20535 * Other modes::                 Interaction with other modes.
20536 * Various Various::             Things that are really various.
20537 @end menu
20538
20539
20540 @node Process/Prefix
20541 @section Process/Prefix
20542 @cindex process/prefix convention
20543
20544 Many functions, among them functions for moving, decoding and saving
20545 articles, use what is known as the @dfn{Process/Prefix convention}.
20546
20547 This is a method for figuring out what articles the user wants the
20548 command to be performed on.
20549
20550 It goes like this:
20551
20552 If the numeric prefix is N, perform the operation on the next N
20553 articles, starting with the current one.  If the numeric prefix is
20554 negative, perform the operation on the previous N articles, starting
20555 with the current one.
20556
20557 @vindex transient-mark-mode
20558 If @code{transient-mark-mode} in non-@code{nil} and the region is
20559 active, all articles in the region will be worked upon.
20560
20561 If there is no numeric prefix, but some articles are marked with the
20562 process mark, perform the operation on the articles marked with
20563 the process mark.
20564
20565 If there is neither a numeric prefix nor any articles marked with the
20566 process mark, just perform the operation on the current article.
20567
20568 Quite simple, really, but it needs to be made clear so that surprises
20569 are avoided.
20570
20571 Commands that react to the process mark will push the current list of
20572 process marked articles onto a stack and will then clear all process
20573 marked articles.  You can restore the previous configuration with the
20574 @kbd{M P y} command (@pxref{Setting Process Marks}).
20575
20576 @vindex gnus-summary-goto-unread
20577 One thing that seems to shock & horrify lots of people is that, for
20578 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
20579 Since each @kbd{d} (which marks the current article as read) by default
20580 goes to the next unread article after marking, this means that @kbd{3 d}
20581 will mark the next three unread articles as read, no matter what the
20582 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
20583 @code{nil} for a more straightforward action.
20584
20585 Many commands do not use the process/prefix convention.  All commands
20586 that do explicitly say so in this manual.  To apply the process/prefix
20587 convention to commands that do not use it, you can use the @kbd{M-&}
20588 command.  For instance, to mark all the articles in the group as
20589 expirable, you could say @kbd{M P b M-& E}.
20590
20591
20592 @node Interactive
20593 @section Interactive
20594 @cindex interaction
20595
20596 @table @code
20597
20598 @item gnus-novice-user
20599 @vindex gnus-novice-user
20600 If this variable is non-@code{nil}, you are either a newcomer to the
20601 World of Usenet, or you are very cautious, which is a nice thing to be,
20602 really.  You will be given questions of the type ``Are you sure you want
20603 to do this?'' before doing anything dangerous.  This is @code{t} by
20604 default.
20605
20606 @item gnus-expert-user
20607 @vindex gnus-expert-user
20608 If this variable is non-@code{nil}, you will seldom be asked any
20609 questions by Gnus.  It will simply assume you know what you're doing, no
20610 matter how strange.
20611
20612 @item gnus-interactive-catchup
20613 @vindex gnus-interactive-catchup
20614 Require confirmation before catching up a group if non-@code{nil}.  It
20615 is @code{t} by default.
20616
20617 @item gnus-interactive-exit
20618 @vindex gnus-interactive-exit
20619 Require confirmation before exiting Gnus.  This variable is @code{t} by
20620 default.
20621 @end table
20622
20623
20624 @node Symbolic Prefixes
20625 @section Symbolic Prefixes
20626 @cindex symbolic prefixes
20627
20628 Quite a lot of Emacs commands react to the (numeric) prefix.  For
20629 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
20630 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
20631 rule of 900 to the current article.
20632
20633 This is all nice and well, but what if you want to give a command some
20634 additional information?  Well, what most commands do is interpret the
20635 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
20636 doesn't want a backup file to be created when saving the current buffer,
20637 for instance.  But what if you want to save without making a backup
20638 file, and you want Emacs to flash lights and play a nice tune at the
20639 same time?  You can't, and you're probably perfectly happy that way.
20640
20641 @kindex M-i (Summary)
20642 @findex gnus-symbolic-argument
20643 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
20644 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
20645 character typed in is the value.  You can stack as many @kbd{M-i}
20646 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
20647 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
20648 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
20649 @code{b}''.  You get the drift.
20650
20651 Typing in symbolic prefixes to commands that don't accept them doesn't
20652 hurt, but it doesn't do any good either.  Currently not many Gnus
20653 functions make use of the symbolic prefix.
20654
20655 If you're interested in how Gnus implements this, @pxref{Extended
20656 Interactive}.
20657
20658
20659 @node Formatting Variables
20660 @section Formatting Variables
20661 @cindex formatting variables
20662
20663 Throughout this manual you've probably noticed lots of variables called
20664 things like @code{gnus-group-line-format} and
20665 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
20666 output lines in the various buffers.  There's quite a lot of them.
20667 Fortunately, they all use the same syntax, so there's not that much to
20668 be annoyed by.
20669
20670 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
20671 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
20672 lots of percentages everywhere.
20673
20674 @menu
20675 * Formatting Basics::           A formatting variable is basically a format string.
20676 * Mode Line Formatting::        Some rules about mode line formatting variables.
20677 * Advanced Formatting::         Modifying output in various ways.
20678 * User-Defined Specs::          Having Gnus call your own functions.
20679 * Formatting Fonts::            Making the formatting look colorful and nice.
20680 * Positioning Point::           Moving point to a position after an operation.
20681 * Tabulation::                  Tabulating your output.
20682 * Wide Characters::             Dealing with wide characters.
20683 @end menu
20684
20685 Currently Gnus uses the following formatting variables:
20686 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
20687 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
20688 @code{gnus-group-mode-line-format},
20689 @code{gnus-summary-mode-line-format},
20690 @code{gnus-article-mode-line-format},
20691 @code{gnus-server-mode-line-format}, and
20692 @code{gnus-summary-pick-line-format}.
20693
20694 All these format variables can also be arbitrary elisp forms.  In that
20695 case, they will be @code{eval}ed to insert the required lines.
20696
20697 @kindex M-x gnus-update-format
20698 @findex gnus-update-format
20699 Gnus includes a command to help you while creating your own format
20700 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
20701 update the spec in question and pop you to a buffer where you can
20702 examine the resulting Lisp code to be run to generate the line.
20703
20704
20705
20706 @node Formatting Basics
20707 @subsection Formatting Basics
20708
20709 Each @samp{%} element will be replaced by some string or other when the
20710 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
20711 spec, and pad with spaces to get a 5-character field''.
20712
20713 As with normal C and Emacs Lisp formatting strings, the numerical
20714 modifier between the @samp{%} and the formatting type character will
20715 @dfn{pad} the output so that it is always at least that long.
20716 @samp{%5y} will make the field always (at least) five characters wide by
20717 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
20718 the right instead.
20719
20720 You may also wish to limit the length of the field to protect against
20721 particularly wide values.  For that you can say @samp{%4,6y}, which
20722 means that the field will never be more than 6 characters wide and never
20723 less than 4 characters wide.
20724
20725 Also Gnus supports some extended format specifications, such as
20726 @samp{%&user-date;}.
20727
20728
20729 @node Mode Line Formatting
20730 @subsection Mode Line Formatting
20731
20732 Mode line formatting variables (e.g.,
20733 @code{gnus-summary-mode-line-format}) follow the same rules as other,
20734 buffer line oriented formatting variables (@pxref{Formatting Basics})
20735 with the following two differences:
20736
20737 @enumerate
20738
20739 @item
20740 There must be no newline (@samp{\n}) at the end.
20741
20742 @item
20743 The special @samp{%%b} spec can be used to display the buffer name.
20744 Well, it's no spec at all, really---@samp{%%} is just a way to quote
20745 @samp{%} to allow it to pass through the formatting machinery unmangled,
20746 so that Emacs receives @samp{%b}, which is something the Emacs mode line
20747 display interprets to mean ``show the buffer name''.  For a full list of
20748 mode line specs Emacs understands, see the documentation of the
20749 @code{mode-line-format} variable.
20750
20751 @end enumerate
20752
20753
20754 @node Advanced Formatting
20755 @subsection Advanced Formatting
20756
20757 It is frequently useful to post-process the fields in some way.
20758 Padding, limiting, cutting off parts and suppressing certain values can
20759 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
20760 look like @samp{%~(cut 3)~(ignore "0")y}.
20761
20762 These are the valid modifiers:
20763
20764 @table @code
20765 @item pad
20766 @itemx pad-left
20767 Pad the field to the left with spaces until it reaches the required
20768 length.
20769
20770 @item pad-right
20771 Pad the field to the right with spaces until it reaches the required
20772 length.
20773
20774 @item max
20775 @itemx max-left
20776 Cut off characters from the left until it reaches the specified length.
20777
20778 @item max-right
20779 Cut off characters from the right until it reaches the specified
20780 length.
20781
20782 @item cut
20783 @itemx cut-left
20784 Cut off the specified number of characters from the left.
20785
20786 @item cut-right
20787 Cut off the specified number of characters from the right.
20788
20789 @item ignore
20790 Return an empty string if the field is equal to the specified value.
20791
20792 @item form
20793 Use the specified form as the field value when the @samp{@@} spec is
20794 used.
20795
20796 Here's an example:
20797
20798 @lisp
20799 "~(form (current-time-string))@@"
20800 @end lisp
20801
20802 @end table
20803
20804 Let's take an example.  The @samp{%o} spec in the summary mode lines
20805 will return a date in compact ISO8601 format---@samp{19960809T230410}.
20806 This is quite a mouthful, so we want to shave off the century number and
20807 the time, leaving us with a six-character date.  That would be
20808 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
20809 maxing, and we need the padding to ensure that the date is never less
20810 than 6 characters to make it look nice in columns.)
20811
20812 Ignoring is done first; then cutting; then maxing; and then as the very
20813 last operation, padding.
20814
20815 If you use lots of these advanced thingies, you'll find that Gnus gets
20816 quite slow.  This can be helped enormously by running @kbd{M-x
20817 gnus-compile} when you are satisfied with the look of your lines.
20818 @xref{Compilation}.
20819
20820
20821 @node User-Defined Specs
20822 @subsection User-Defined Specs
20823
20824 All the specs allow for inserting user defined specifiers---@samp{u}.
20825 The next character in the format string should be a letter.  Gnus
20826 will call the function @code{gnus-user-format-function-}@samp{X}, where
20827 @samp{X} is the letter following @samp{%u}.  The function will be passed
20828 a single parameter---what the parameter means depends on what buffer
20829 it's being called from.  The function should return a string, which will
20830 be inserted into the buffer just like information from any other
20831 specifier.  This function may also be called with dummy values, so it
20832 should protect against that.
20833
20834 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
20835 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
20836
20837 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
20838 much the same without defining new functions.  Here's an example:
20839 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
20840 given here will be evaluated to yield the current line number, and then
20841 inserted.
20842
20843
20844 @node Formatting Fonts
20845 @subsection Formatting Fonts
20846
20847 There are specs for highlighting, and these are shared by all the format
20848 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
20849 the special @code{mouse-face} property set, which means that it will be
20850 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
20851 over it.
20852
20853 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
20854 normal faces set using @code{gnus-face-0}, which is @code{bold} by
20855 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
20856 and so on.  Create as many faces as you wish.  The same goes for the
20857 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
20858 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
20859
20860 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
20861 special @code{balloon-help} property set to
20862 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
20863 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
20864 variables should be either strings or symbols naming functions that
20865 return a string.  When the mouse passes over text with this property
20866 set, a balloon window will appear and display the string.  Please
20867 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
20868 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
20869 XEmacs) for more information on this.  (For technical reasons, the
20870 guillemets have been approximated as @samp{<<} and @samp{>>} in this
20871 paragraph.)
20872
20873 Here's an alternative recipe for the group buffer:
20874
20875 @lisp
20876 ;; @r{Create three face types.}
20877 (setq gnus-face-1 'bold)
20878 (setq gnus-face-3 'italic)
20879
20880 ;; @r{We want the article count to be in}
20881 ;; @r{a bold and green face.  So we create}
20882 ;; @r{a new face called @code{my-green-bold}.}
20883 (copy-face 'bold 'my-green-bold)
20884 ;; @r{Set the color.}
20885 (set-face-foreground 'my-green-bold "ForestGreen")
20886 (setq gnus-face-2 'my-green-bold)
20887
20888 ;; @r{Set the new & fancy format.}
20889 (setq gnus-group-line-format
20890       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
20891 @end lisp
20892
20893 I'm sure you'll be able to use this scheme to create totally unreadable
20894 and extremely vulgar displays.  Have fun!
20895
20896 Note that the @samp{%(} specs (and friends) do not make any sense on the
20897 mode-line variables.
20898
20899 @node Positioning Point
20900 @subsection Positioning Point
20901
20902 Gnus usually moves point to a pre-defined place on each line in most
20903 buffers.  By default, point move to the first colon character on the
20904 line.  You can customize this behaviour in three different ways.
20905
20906 You can move the colon character to somewhere else on the line.
20907
20908 @findex gnus-goto-colon
20909 You can redefine the function that moves the point to the colon.  The
20910 function is called @code{gnus-goto-colon}.
20911
20912 But perhaps the most convenient way to deal with this, if you don't want
20913 to have a colon in your line, is to use the @samp{%*} specifier.  If you
20914 put a @samp{%*} somewhere in your format line definition, Gnus will
20915 place point there.
20916
20917
20918 @node Tabulation
20919 @subsection Tabulation
20920
20921 You can usually line up your displays by padding and cutting your
20922 strings.  However, when combining various strings of different size, it
20923 can often be more convenient to just output the strings, and then worry
20924 about lining up the following text afterwards.
20925
20926 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
20927 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
20928
20929 @samp{%50=} will insert space characters to pad the line up to column
20930 50.  If the text is already past column 50, nothing will be inserted.
20931 This is the soft tabulator.
20932
20933 @samp{%-50=} will insert space characters to pad the line up to column
20934 50.  If the text is already past column 50, the excess text past column
20935 50 will be removed.  This is the hard tabulator.
20936
20937
20938 @node Wide Characters
20939 @subsection Wide Characters
20940
20941 Fixed width fonts in most countries have characters of the same width.
20942 Some countries, however, use Latin characters mixed with wider
20943 characters---most notable East Asian countries.
20944
20945 The problem is that when formatting, Gnus assumes that if a string is 10
20946 characters wide, it'll be 10 Latin characters wide on the screen.  In
20947 these countries, that's not true.
20948
20949 @vindex gnus-use-correct-string-widths
20950 To help fix this, you can set @code{gnus-use-correct-string-widths} to
20951 @code{t}.  This makes buffer generation slower, but the results will be
20952 prettier.  The default value under XEmacs is @code{t} but @code{nil}
20953 for Emacs.
20954
20955
20956 @node Window Layout
20957 @section Window Layout
20958 @cindex window layout
20959
20960 No, there's nothing here about X, so be quiet.
20961
20962 @vindex gnus-use-full-window
20963 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
20964 other windows and occupy the entire Emacs screen by itself.  It is
20965 @code{t} by default.
20966
20967 Setting this variable to @code{nil} kinda works, but there are
20968 glitches.  Use at your own peril.
20969
20970 @vindex gnus-buffer-configuration
20971 @code{gnus-buffer-configuration} describes how much space each Gnus
20972 buffer should be given.  Here's an excerpt of this variable:
20973
20974 @lisp
20975 ((group (vertical 1.0 (group 1.0 point)
20976                       (if gnus-carpal (group-carpal 4))))
20977  (article (vertical 1.0 (summary 0.25 point)
20978                         (article 1.0))))
20979 @end lisp
20980
20981 This is an alist.  The @dfn{key} is a symbol that names some action or
20982 other.  For instance, when displaying the group buffer, the window
20983 configuration function will use @code{group} as the key.  A full list of
20984 possible names is listed below.
20985
20986 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
20987 should occupy.  To take the @code{article} split as an example -
20988
20989 @lisp
20990 (article (vertical 1.0 (summary 0.25 point)
20991                        (article 1.0)))
20992 @end lisp
20993
20994 This @dfn{split} says that the summary buffer should occupy 25% of upper
20995 half of the screen, and that it is placed over the article buffer.  As
20996 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
20997 reaching for that calculator there).  However, the special number
20998 @code{1.0} is used to signal that this buffer should soak up all the
20999 rest of the space available after the rest of the buffers have taken
21000 whatever they need.  There should be only one buffer with the @code{1.0}
21001 size spec per split.
21002
21003 Point will be put in the buffer that has the optional third element
21004 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
21005 split where the tag @code{frame-focus} is a member (i.e. is the third or
21006 fourth element in the list, depending on whether the @code{point} tag is
21007 present) gets focus.
21008
21009 Here's a more complicated example:
21010
21011 @lisp
21012 (article (vertical 1.0 (group 4)
21013                        (summary 0.25 point)
21014                        (if gnus-carpal (summary-carpal 4))
21015                        (article 1.0)))
21016 @end lisp
21017
21018 If the size spec is an integer instead of a floating point number,
21019 then that number will be used to say how many lines a buffer should
21020 occupy, not a percentage.
21021
21022 If the @dfn{split} looks like something that can be @code{eval}ed (to be
21023 precise---if the @code{car} of the split is a function or a subr), this
21024 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
21025 be used as a split.  This means that there will be three buffers if
21026 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
21027 is non-@code{nil}.
21028
21029 Not complicated enough for you?  Well, try this on for size:
21030
21031 @lisp
21032 (article (horizontal 1.0
21033              (vertical 0.5
21034                  (group 1.0)
21035                  (gnus-carpal 4))
21036              (vertical 1.0
21037                  (summary 0.25 point)
21038                  (summary-carpal 4)
21039                  (article 1.0))))
21040 @end lisp
21041
21042 Whoops.  Two buffers with the mystery 100% tag.  And what's that
21043 @code{horizontal} thingie?
21044
21045 If the first element in one of the split is @code{horizontal}, Gnus will
21046 split the window horizontally, giving you two windows side-by-side.
21047 Inside each of these strips you may carry on all you like in the normal
21048 fashion.  The number following @code{horizontal} says what percentage of
21049 the screen is to be given to this strip.
21050
21051 For each split, there @emph{must} be one element that has the 100% tag.
21052 The splitting is never accurate, and this buffer will eat any leftover
21053 lines from the splits.
21054
21055 To be slightly more formal, here's a definition of what a valid split
21056 may look like:
21057
21058 @example
21059 @group
21060 split      = frame | horizontal | vertical | buffer | form
21061 frame      = "(frame " size *split ")"
21062 horizontal = "(horizontal " size *split ")"
21063 vertical   = "(vertical " size *split ")"
21064 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
21065 size       = number | frame-params
21066 buf-name   = group | article | summary ...
21067 @end group
21068 @end example
21069
21070 The limitations are that the @code{frame} split can only appear as the
21071 top-level split.  @var{form} should be an Emacs Lisp form that should
21072 return a valid split.  We see that each split is fully recursive, and
21073 may contain any number of @code{vertical} and @code{horizontal} splits.
21074
21075 @vindex gnus-window-min-width
21076 @vindex gnus-window-min-height
21077 @cindex window height
21078 @cindex window width
21079 Finding the right sizes can be a bit complicated.  No window may be less
21080 than @code{gnus-window-min-height} (default 1) characters high, and all
21081 windows must be at least @code{gnus-window-min-width} (default 1)
21082 characters wide.  Gnus will try to enforce this before applying the
21083 splits.  If you want to use the normal Emacs window width/height limit,
21084 you can just set these two variables to @code{nil}.
21085
21086 If you're not familiar with Emacs terminology, @code{horizontal} and
21087 @code{vertical} splits may work the opposite way of what you'd expect.
21088 Windows inside a @code{horizontal} split are shown side-by-side, and
21089 windows within a @code{vertical} split are shown above each other.
21090
21091 @findex gnus-configure-frame
21092 If you want to experiment with window placement, a good tip is to call
21093 @code{gnus-configure-frame} directly with a split.  This is the function
21094 that does all the real work when splitting buffers.  Below is a pretty
21095 nonsensical configuration with 5 windows; two for the group buffer and
21096 three for the article buffer.  (I said it was nonsensical.)  If you
21097 @code{eval} the statement below, you can get an idea of how that would
21098 look straight away, without going through the normal Gnus channels.
21099 Play with it until you're satisfied, and then use
21100 @code{gnus-add-configuration} to add your new creation to the buffer
21101 configuration list.
21102
21103 @lisp
21104 (gnus-configure-frame
21105  '(horizontal 1.0
21106     (vertical 10
21107       (group 1.0)
21108       (article 0.3 point))
21109     (vertical 1.0
21110       (article 1.0)
21111       (horizontal 4
21112         (group 1.0)
21113         (article 10)))))
21114 @end lisp
21115
21116 You might want to have several frames as well.  No prob---just use the
21117 @code{frame} split:
21118
21119 @lisp
21120 (gnus-configure-frame
21121  '(frame 1.0
21122          (vertical 1.0
21123                    (summary 0.25 point frame-focus)
21124                    (article 1.0))
21125          (vertical ((height . 5) (width . 15)
21126                     (user-position . t)
21127                     (left . -1) (top . 1))
21128                    (picon 1.0))))
21129
21130 @end lisp
21131
21132 This split will result in the familiar summary/article window
21133 configuration in the first (or ``main'') frame, while a small additional
21134 frame will be created where picons will be shown.  As you can see,
21135 instead of the normal @code{1.0} top-level spec, each additional split
21136 should have a frame parameter alist as the size spec.
21137 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
21138 Reference Manual}.  Under XEmacs, a frame property list will be
21139 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
21140 is such a plist.
21141 The list of all possible keys for @code{gnus-buffer-configuration} can
21142 be found in its default value.
21143
21144 Note that the @code{message} key is used for both
21145 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
21146 it is desirable to distinguish between the two, something like this
21147 might be used:
21148
21149 @lisp
21150 (message (horizontal 1.0
21151                      (vertical 1.0 (message 1.0 point))
21152                      (vertical 0.24
21153                                (if (buffer-live-p gnus-summary-buffer)
21154                                    '(summary 0.5))
21155                                (group 1.0))))
21156 @end lisp
21157
21158 One common desire for a multiple frame split is to have a separate frame
21159 for composing mail and news while leaving the original frame intact.  To
21160 accomplish that, something like the following can be done:
21161
21162 @lisp
21163 (message
21164   (frame 1.0
21165          (if (not (buffer-live-p gnus-summary-buffer))
21166              (car (cdr (assoc 'group gnus-buffer-configuration)))
21167            (car (cdr (assoc 'summary gnus-buffer-configuration))))
21168          (vertical ((user-position . t) (top . 1) (left . 1)
21169                     (name . "Message"))
21170                    (message 1.0 point))))
21171 @end lisp
21172
21173 @findex gnus-add-configuration
21174 Since the @code{gnus-buffer-configuration} variable is so long and
21175 complicated, there's a function you can use to ease changing the config
21176 of a single setting: @code{gnus-add-configuration}.  If, for instance,
21177 you want to change the @code{article} setting, you could say:
21178
21179 @lisp
21180 (gnus-add-configuration
21181  '(article (vertical 1.0
21182                (group 4)
21183                (summary .25 point)
21184                (article 1.0))))
21185 @end lisp
21186
21187 You'd typically stick these @code{gnus-add-configuration} calls in your
21188 @file{~/.gnus.el} file or in some startup hook---they should be run after
21189 Gnus has been loaded.
21190
21191 @vindex gnus-always-force-window-configuration
21192 If all windows mentioned in the configuration are already visible, Gnus
21193 won't change the window configuration.  If you always want to force the
21194 ``right'' window configuration, you can set
21195 @code{gnus-always-force-window-configuration} to non-@code{nil}.
21196
21197 If you're using tree displays (@pxref{Tree Display}), and the tree
21198 window is displayed vertically next to another window, you may also want
21199 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
21200 windows resized.
21201
21202 @subsection Example Window Configurations
21203
21204 @itemize @bullet
21205 @item
21206 Narrow left hand side occupied by group buffer.  Right hand side split
21207 between summary buffer (top one-sixth) and article buffer (bottom).
21208
21209 @ifinfo
21210 @example
21211 +---+---------+
21212 | G | Summary |
21213 | r +---------+
21214 | o |         |
21215 | u | Article |
21216 | p |         |
21217 +---+---------+
21218 @end example
21219 @end ifinfo
21220
21221 @lisp
21222 (gnus-add-configuration
21223  '(article
21224    (horizontal 1.0
21225                (vertical 25 (group 1.0))
21226                (vertical 1.0
21227                          (summary 0.16 point)
21228                          (article 1.0)))))
21229
21230 (gnus-add-configuration
21231  '(summary
21232    (horizontal 1.0
21233                (vertical 25 (group 1.0))
21234                (vertical 1.0 (summary 1.0 point)))))
21235 @end lisp
21236
21237 @end itemize
21238
21239
21240 @node Faces and Fonts
21241 @section Faces and Fonts
21242 @cindex faces
21243 @cindex fonts
21244 @cindex colors
21245
21246 Fiddling with fonts and faces used to be very difficult, but these days
21247 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
21248 the face you want to alter, and alter it via the standard Customize
21249 interface.
21250
21251
21252 @node Compilation
21253 @section Compilation
21254 @cindex compilation
21255 @cindex byte-compilation
21256
21257 @findex gnus-compile
21258
21259 Remember all those line format specification variables?
21260 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
21261 on.  Now, Gnus will of course heed whatever these variables are, but,
21262 unfortunately, changing them will mean a quite significant slow-down.
21263 (The default values of these variables have byte-compiled functions
21264 associated with them, while the user-generated versions do not, of
21265 course.)
21266
21267 To help with this, you can run @kbd{M-x gnus-compile} after you've
21268 fiddled around with the variables and feel that you're (kind of)
21269 satisfied.  This will result in the new specs being byte-compiled, and
21270 you'll get top speed again.  Gnus will save these compiled specs in the
21271 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
21272 this function, though---you should compile them yourself by sticking
21273 them into the @file{~/.gnus.el} file and byte-compiling that file.)
21274
21275
21276 @node Mode Lines
21277 @section Mode Lines
21278 @cindex mode lines
21279
21280 @vindex gnus-updated-mode-lines
21281 @code{gnus-updated-mode-lines} says what buffers should keep their mode
21282 lines updated.  It is a list of symbols.  Supported symbols include
21283 @code{group}, @code{article}, @code{summary}, @code{server},
21284 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
21285 Gnus will keep that mode line updated with information that may be
21286 pertinent.  If this variable is @code{nil}, screen refresh may be
21287 quicker.
21288
21289 @cindex display-time
21290
21291 @vindex gnus-mode-non-string-length
21292 By default, Gnus displays information on the current article in the mode
21293 lines of the summary and article buffers.  The information Gnus wishes
21294 to display (e.g. the subject of the article) is often longer than the
21295 mode lines, and therefore have to be cut off at some point.  The
21296 @code{gnus-mode-non-string-length} variable says how long the other
21297 elements on the line is (i.e., the non-info part).  If you put
21298 additional elements on the mode line (e.g. a clock), you should modify
21299 this variable:
21300
21301 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
21302 @lisp
21303 (add-hook 'display-time-hook
21304           (lambda () (setq gnus-mode-non-string-length
21305                            (+ 21
21306                               (if line-number-mode 5 0)
21307                               (if column-number-mode 4 0)
21308                               (length display-time-string)))))
21309 @end lisp
21310
21311 If this variable is @code{nil} (which is the default), the mode line
21312 strings won't be chopped off, and they won't be padded either.  Note
21313 that the default is unlikely to be desirable, as even the percentage
21314 complete in the buffer may be crowded off the mode line; the user should
21315 configure this variable appropriately for her configuration.
21316
21317
21318 @node Highlighting and Menus
21319 @section Highlighting and Menus
21320 @cindex visual
21321 @cindex highlighting
21322 @cindex menus
21323
21324 @vindex gnus-visual
21325 The @code{gnus-visual} variable controls most of the Gnus-prettifying
21326 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
21327 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
21328 file.
21329
21330 This variable can be a list of visual properties that are enabled.  The
21331 following elements are valid, and are all included by default:
21332
21333 @table @code
21334 @item group-highlight
21335 Do highlights in the group buffer.
21336 @item summary-highlight
21337 Do highlights in the summary buffer.
21338 @item article-highlight
21339 Do highlights in the article buffer.
21340 @item highlight
21341 Turn on highlighting in all buffers.
21342 @item group-menu
21343 Create menus in the group buffer.
21344 @item summary-menu
21345 Create menus in the summary buffers.
21346 @item article-menu
21347 Create menus in the article buffer.
21348 @item browse-menu
21349 Create menus in the browse buffer.
21350 @item server-menu
21351 Create menus in the server buffer.
21352 @item score-menu
21353 Create menus in the score buffers.
21354 @item menu
21355 Create menus in all buffers.
21356 @end table
21357
21358 So if you only want highlighting in the article buffer and menus in all
21359 buffers, you could say something like:
21360
21361 @lisp
21362 (setq gnus-visual '(article-highlight menu))
21363 @end lisp
21364
21365 If you want highlighting only and no menus whatsoever, you'd say:
21366
21367 @lisp
21368 (setq gnus-visual '(highlight))
21369 @end lisp
21370
21371 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
21372 in all Gnus buffers.
21373
21374 Other general variables that influence the look of all buffers include:
21375
21376 @table @code
21377 @item gnus-mouse-face
21378 @vindex gnus-mouse-face
21379 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
21380 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
21381
21382 @end table
21383
21384 There are hooks associated with the creation of all the different menus:
21385
21386 @table @code
21387
21388 @item gnus-article-menu-hook
21389 @vindex gnus-article-menu-hook
21390 Hook called after creating the article mode menu.
21391
21392 @item gnus-group-menu-hook
21393 @vindex gnus-group-menu-hook
21394 Hook called after creating the group mode menu.
21395
21396 @item gnus-summary-menu-hook
21397 @vindex gnus-summary-menu-hook
21398 Hook called after creating the summary mode menu.
21399
21400 @item gnus-server-menu-hook
21401 @vindex gnus-server-menu-hook
21402 Hook called after creating the server mode menu.
21403
21404 @item gnus-browse-menu-hook
21405 @vindex gnus-browse-menu-hook
21406 Hook called after creating the browse mode menu.
21407
21408 @item gnus-score-menu-hook
21409 @vindex gnus-score-menu-hook
21410 Hook called after creating the score mode menu.
21411
21412 @end table
21413
21414
21415 @node Buttons
21416 @section Buttons
21417 @cindex buttons
21418 @cindex mouse
21419 @cindex click
21420
21421 Those new-fangled @dfn{mouse} contraptions is very popular with the
21422 young, hep kids who don't want to learn the proper way to do things
21423 these days.  Why, I remember way back in the summer of '89, when I was
21424 using Emacs on a Tops 20 system.  Three hundred users on one single
21425 machine, and every user was running Simula compilers.  Bah!
21426
21427 Right.
21428
21429 @vindex gnus-carpal
21430 Well, you can make Gnus display bufferfuls of buttons you can click to
21431 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
21432 really.  Tell the chiropractor I sent you.
21433
21434
21435 @table @code
21436
21437 @item gnus-carpal-mode-hook
21438 @vindex gnus-carpal-mode-hook
21439 Hook run in all carpal mode buffers.
21440
21441 @item gnus-carpal-button-face
21442 @vindex gnus-carpal-button-face
21443 Face used on buttons.
21444
21445 @item gnus-carpal-header-face
21446 @vindex gnus-carpal-header-face
21447 Face used on carpal buffer headers.
21448
21449 @item gnus-carpal-group-buffer-buttons
21450 @vindex gnus-carpal-group-buffer-buttons
21451 Buttons in the group buffer.
21452
21453 @item gnus-carpal-summary-buffer-buttons
21454 @vindex gnus-carpal-summary-buffer-buttons
21455 Buttons in the summary buffer.
21456
21457 @item gnus-carpal-server-buffer-buttons
21458 @vindex gnus-carpal-server-buffer-buttons
21459 Buttons in the server buffer.
21460
21461 @item gnus-carpal-browse-buffer-buttons
21462 @vindex gnus-carpal-browse-buffer-buttons
21463 Buttons in the browse buffer.
21464 @end table
21465
21466 All the @code{buttons} variables are lists.  The elements in these list
21467 are either cons cells where the @code{car} contains a text to be displayed and
21468 the @code{cdr} contains a function symbol, or a simple string.
21469
21470
21471 @node Daemons
21472 @section Daemons
21473 @cindex demons
21474 @cindex daemons
21475
21476 Gnus, being larger than any program ever written (allegedly), does lots
21477 of strange stuff that you may wish to have done while you're not
21478 present.  For instance, you may want it to check for new mail once in a
21479 while.  Or you may want it to close down all connections to all servers
21480 when you leave Emacs idle.  And stuff like that.
21481
21482 Gnus will let you do stuff like that by defining various
21483 @dfn{handlers}.  Each handler consists of three elements:  A
21484 @var{function}, a @var{time}, and an @var{idle} parameter.
21485
21486 Here's an example of a handler that closes connections when Emacs has
21487 been idle for thirty minutes:
21488
21489 @lisp
21490 (gnus-demon-close-connections nil 30)
21491 @end lisp
21492
21493 Here's a handler that scans for @acronym{PGP} headers every hour when
21494 Emacs is idle:
21495
21496 @lisp
21497 (gnus-demon-scan-pgp 60 t)
21498 @end lisp
21499
21500 This @var{time} parameter and that @var{idle} parameter work together
21501 in a strange, but wonderful fashion.  Basically, if @var{idle} is
21502 @code{nil}, then the function will be called every @var{time} minutes.
21503
21504 If @var{idle} is @code{t}, then the function will be called after
21505 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
21506 the function will never be called.  But once Emacs goes idle, the
21507 function will be called every @var{time} minutes.
21508
21509 If @var{idle} is a number and @var{time} is a number, the function will
21510 be called every @var{time} minutes only when Emacs has been idle for
21511 @var{idle} minutes.
21512
21513 If @var{idle} is a number and @var{time} is @code{nil}, the function
21514 will be called once every time Emacs has been idle for @var{idle}
21515 minutes.
21516
21517 And if @var{time} is a string, it should look like @samp{07:31}, and
21518 the function will then be called once every day somewhere near that
21519 time.  Modified by the @var{idle} parameter, of course.
21520
21521 @vindex gnus-demon-timestep
21522 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
21523 seconds.  This is 60 by default.  If you change that variable,
21524 all the timings in the handlers will be affected.)
21525
21526 So, if you want to add a handler, you could put something like this in
21527 your @file{~/.gnus.el} file:
21528
21529 @findex gnus-demon-add-handler
21530 @lisp
21531 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
21532 @end lisp
21533
21534 @findex gnus-demon-add-nocem
21535 @findex gnus-demon-add-scanmail
21536 @findex gnus-demon-add-rescan
21537 @findex gnus-demon-add-scan-timestamps
21538 @findex gnus-demon-add-disconnection
21539 Some ready-made functions to do this have been created:
21540 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
21541 @code{gnus-demon-add-nntp-close-connection},
21542 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
21543 @code{gnus-demon-add-scanmail}.  Just put those functions in your
21544 @file{~/.gnus.el} if you want those abilities.
21545
21546 @findex gnus-demon-init
21547 @findex gnus-demon-cancel
21548 @vindex gnus-demon-handlers
21549 If you add handlers to @code{gnus-demon-handlers} directly, you should
21550 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
21551 daemons, you can use the @code{gnus-demon-cancel} function.
21552
21553 Note that adding daemons can be pretty naughty if you over do it.  Adding
21554 functions that scan all news and mail from all servers every two seconds
21555 is a sure-fire way of getting booted off any respectable system.  So
21556 behave.
21557
21558
21559 @node NoCeM
21560 @section NoCeM
21561 @cindex nocem
21562 @cindex spam
21563
21564 @dfn{Spamming} is posting the same article lots and lots of times.
21565 Spamming is bad.  Spamming is evil.
21566
21567 Spamming is usually canceled within a day or so by various anti-spamming
21568 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
21569 NoCeM is pronounced ``no see-'em'', and means what the name
21570 implies---these are messages that make the offending articles, like, go
21571 away.
21572
21573 What use are these NoCeM messages if the articles are canceled anyway?
21574 Some sites do not honor cancel messages and some sites just honor cancels
21575 from a select few people.  Then you may wish to make use of the NoCeM
21576 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
21577
21578 Gnus can read and parse the messages in this group automatically, and
21579 this will make spam disappear.
21580
21581 There are some variables to customize, of course:
21582
21583 @table @code
21584 @item gnus-use-nocem
21585 @vindex gnus-use-nocem
21586 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
21587 by default.
21588
21589 @item gnus-nocem-groups
21590 @vindex gnus-nocem-groups
21591 Gnus will look for NoCeM messages in the groups in this list.  The
21592 default is
21593 @lisp
21594 ("news.lists.filters" "news.admin.net-abuse.bulletins"
21595  "alt.nocem.misc" "news.admin.net-abuse.announce")
21596 @end lisp
21597
21598 @item gnus-nocem-issuers
21599 @vindex gnus-nocem-issuers
21600 There are many people issuing NoCeM messages.  This list says what
21601 people you want to listen to.  The default is
21602 @lisp
21603 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
21604  "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
21605 @end lisp
21606 fine, upstanding citizens all of them.
21607
21608 Known despammers that you can put in this list are listed at@*
21609 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
21610
21611 You do not have to heed NoCeM messages from all these people---just the
21612 ones you want to listen to.  You also don't have to accept all NoCeM
21613 messages from the people you like.  Each NoCeM message has a @dfn{type}
21614 header that gives the message a (more or less, usually less) rigorous
21615 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
21616 @samp{binary}, and @samp{troll}.  To specify this, you have to use
21617 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
21618 Each condition is either a string (which is a regexp that matches types
21619 you want to use) or a list on the form @code{(not @var{string})}, where
21620 @var{string} is a regexp that matches types you don't want to use.
21621
21622 For instance, if you want all NoCeM messages from Chris Lewis except his
21623 @samp{troll} messages, you'd say:
21624
21625 @lisp
21626 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
21627 @end lisp
21628
21629 On the other hand, if you just want nothing but his @samp{spam} and
21630 @samp{spew} messages, you'd say:
21631
21632 @lisp
21633 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
21634 @end lisp
21635
21636 The specs are applied left-to-right.
21637
21638
21639 @item gnus-nocem-verifyer
21640 @vindex gnus-nocem-verifyer
21641 @findex mc-verify
21642 This should be a function for verifying that the NoCeM issuer is who she
21643 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
21644 function.  If this is too slow and you don't care for verification
21645 (which may be dangerous), you can set this variable to @code{nil}.
21646
21647 If you want signed NoCeM messages to be verified and unsigned messages
21648 not to be verified (but used anyway), you could do something like:
21649
21650 @lisp
21651 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
21652
21653 (defun my-gnus-mc-verify ()
21654   (not (eq 'forged
21655            (ignore-errors
21656              (if (mc-verify)
21657                  t
21658                'forged)))))
21659 @end lisp
21660
21661 This might be dangerous, though.
21662
21663 @item gnus-nocem-directory
21664 @vindex gnus-nocem-directory
21665 This is where Gnus will store its NoCeM cache files.  The default is@*
21666 @file{~/News/NoCeM/}.
21667
21668 @item gnus-nocem-expiry-wait
21669 @vindex gnus-nocem-expiry-wait
21670 The number of days before removing old NoCeM entries from the cache.
21671 The default is 15.  If you make it shorter Gnus will be faster, but you
21672 might then see old spam.
21673
21674 @item gnus-nocem-check-from
21675 @vindex gnus-nocem-check-from
21676 Non-@code{nil} means check for valid issuers in message bodies.
21677 Otherwise don't bother fetching articles unless their author matches a
21678 valid issuer; that is much faster if you are selective about the
21679 issuers.
21680
21681 @item gnus-nocem-check-article-limit
21682 @vindex gnus-nocem-check-article-limit
21683 If non-@code{nil}, the maximum number of articles to check in any NoCeM
21684 group.  NoCeM groups can be huge and very slow to process.
21685
21686 @end table
21687
21688 Using NoCeM could potentially be a memory hog.  If you have many living
21689 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
21690 big.  If this is a problem, you should kill off all (or most) of your
21691 unsubscribed groups (@pxref{Subscription Commands}).
21692
21693
21694 @node Undo
21695 @section Undo
21696 @cindex undo
21697
21698 It is very useful to be able to undo actions one has done.  In normal
21699 Emacs buffers, it's easy enough---you just push the @code{undo} button.
21700 In Gnus buffers, however, it isn't that simple.
21701
21702 The things Gnus displays in its buffer is of no value whatsoever to
21703 Gnus---it's all just data designed to look nice to the user.
21704 Killing a group in the group buffer with @kbd{C-k} makes the line
21705 disappear, but that's just a side-effect of the real action---the
21706 removal of the group in question from the internal Gnus structures.
21707 Undoing something like that can't be done by the normal Emacs
21708 @code{undo} function.
21709
21710 Gnus tries to remedy this somewhat by keeping track of what the user
21711 does and coming up with actions that would reverse the actions the user
21712 takes.  When the user then presses the @code{undo} key, Gnus will run
21713 the code to reverse the previous action, or the previous actions.
21714 However, not all actions are easily reversible, so Gnus currently offers
21715 a few key functions to be undoable.  These include killing groups,
21716 yanking groups, and changing the list of read articles of groups.
21717 That's it, really.  More functions may be added in the future, but each
21718 added function means an increase in data to be stored, so Gnus will
21719 never be totally undoable.
21720
21721 @findex gnus-undo-mode
21722 @vindex gnus-use-undo
21723 @findex gnus-undo
21724 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
21725 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
21726 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
21727 command, which should feel kinda like the normal Emacs @code{undo}
21728 command.
21729
21730
21731 @node Predicate Specifiers
21732 @section Predicate Specifiers
21733 @cindex predicate specifiers
21734
21735 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
21736 form that allows flexible specification of predicates without having
21737 to type all that much.
21738
21739 These specifiers are lists consisting of functions, symbols and lists.
21740
21741 Here's an example:
21742
21743 @lisp
21744 (or gnus-article-unseen-p
21745     gnus-article-unread-p)
21746 @end lisp
21747
21748 The available symbols are @code{or}, @code{and} and @code{not}.  The
21749 functions all take one parameter.
21750
21751 @findex gnus-make-predicate
21752 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
21753 to create a function that can be called.  This input parameter to this
21754 function will be passed along to all the functions in the predicate
21755 specifier.
21756
21757
21758 @node Moderation
21759 @section Moderation
21760 @cindex moderation
21761
21762 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
21763 It is not included in the standard Gnus package.  Write a mail to
21764 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
21765 get a copy.
21766
21767 The moderation package is implemented as a minor mode for summary
21768 buffers.  Put
21769
21770 @lisp
21771 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
21772 @end lisp
21773
21774 in your @file{~/.gnus.el} file.
21775
21776 If you are the moderator of @samp{rec.zoofle}, this is how it's
21777 supposed to work:
21778
21779 @enumerate
21780 @item
21781 You split your incoming mail by matching on
21782 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
21783 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
21784
21785 @item
21786 You enter that group once in a while and post articles using the @kbd{e}
21787 (edit-and-post) or @kbd{s} (just send unedited) commands.
21788
21789 @item
21790 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
21791 articles that weren't approved by you, you can cancel them with the
21792 @kbd{c} command.
21793 @end enumerate
21794
21795 To use moderation mode in these two groups, say:
21796
21797 @lisp
21798 (setq gnus-moderated-list
21799       "^nnml:rec.zoofle$\\|^rec.zoofle$")
21800 @end lisp
21801
21802
21803 @node Image Enhancements
21804 @section Image Enhancements
21805
21806 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
21807 support images yet.}, is able to display pictures and stuff, so Gnus has
21808 taken advantage of that.
21809
21810 @menu
21811 * X-Face::                      Display a funky, teensy black-and-white image.
21812 * Face::                        Display a funkier, teensier colored image.
21813 * Smileys::                     Show all those happy faces the way they were meant to be shown.
21814 * Picons::                      How to display pictures of what you're reading.
21815 * XVarious::                    Other XEmacsy Gnusey variables.
21816 @end menu
21817
21818
21819 @node X-Face
21820 @subsection X-Face
21821 @cindex x-face
21822
21823 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
21824 depth) image that's supposed to represent the author of the message.
21825 It seems to be supported by an ever-growing number of mail and news
21826 readers.
21827
21828 @cindex x-face
21829 @findex gnus-article-display-x-face
21830 @vindex gnus-article-x-face-command
21831 @vindex gnus-article-x-face-too-ugly
21832 @iftex
21833 @iflatex
21834 \include{xface}
21835 @end iflatex
21836 @end iftex
21837 @c @anchor{X-Face}
21838
21839 Decoding an @code{X-Face} header either requires an Emacs that has
21840 @samp{compface} support (which most XEmacs versions has), or that you
21841 have @samp{compface} installed on your system.  If either is true,
21842 Gnus will default to displaying @code{X-Face} headers.
21843
21844 The variable that controls this is the
21845 @code{gnus-article-x-face-command} variable.  If this variable is a
21846 string, this string will be executed in a sub-shell.  If it is a
21847 function, this function will be called with the face as the argument.
21848 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
21849 the @code{From} header, the face will not be shown.
21850
21851 The default action under Emacs 20 is to fork off the @code{display}
21852 program@footnote{@code{display} is from the ImageMagick package.  For
21853 the @code{uncompface} and @code{icontopbm} programs look for a package
21854 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
21855 view the face.
21856
21857 Under XEmacs or Emacs 21+ with suitable image support, the default
21858 action is to display the face before the @code{From} header.  (It's
21859 nicer if XEmacs has been compiled with @code{X-Face} support---that
21860 will make display somewhat faster.  If there's no native @code{X-Face}
21861 support, Gnus will try to convert the @code{X-Face} header using
21862 external programs from the @code{pbmplus} package and
21863 friends.@footnote{On a GNU/Linux system look for packages with names
21864 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
21865
21866 (Note: @code{x-face} is used in the variable/function names, not
21867 @code{xface}).
21868
21869 Gnus provides a few convenience functions and variables to allow
21870 easier insertion of X-Face headers in outgoing messages.
21871
21872 @findex gnus-random-x-face
21873 @vindex gnus-convert-pbm-to-x-face-command
21874 @vindex gnus-x-face-directory
21875 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
21876 @code{gnus-x-face-directory} and picks one at random, and then
21877 converts it to the X-Face format by using the
21878 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
21879 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
21880 header data as a string.
21881
21882 @findex gnus-insert-random-x-face-header
21883 @code{gnus-insert-random-x-face-header} calls
21884 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
21885 randomly generated data.
21886
21887 @findex gnus-x-face-from-file
21888 @vindex gnus-convert-image-to-x-face-command
21889 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
21890 converts the file to X-Face format by using the
21891 @code{gnus-convert-image-to-x-face-command} shell command.
21892
21893 Here's how you would typically use the first function.  Put something
21894 like the following in your @file{~/.gnus.el} file:
21895
21896 @lisp
21897 (setq message-required-news-headers
21898       (nconc message-required-news-headers
21899              (list '(X-Face . gnus-random-x-face))))
21900 @end lisp
21901
21902 Using the last function would be something like this:
21903
21904 @lisp
21905 (setq message-required-news-headers
21906       (nconc message-required-news-headers
21907              (list '(X-Face . (lambda ()
21908                                 (gnus-x-face-from-file
21909                                  "~/My-face.gif"))))))
21910 @end lisp
21911
21912
21913 @node Face
21914 @subsection Face
21915 @cindex face
21916
21917 @c #### FIXME: faces and x-faces'implementations should really be harmonized.
21918
21919 @code{Face} headers are essentially a funkier version of @code{X-Face}
21920 ones. They describe a 48x48 pixel colored image that's supposed to
21921 represent the author of the message.
21922
21923 @cindex face
21924 @findex gnus-article-display-face
21925 The contents of a @code{Face} header must be a base64 encoded PNG image.
21926 See @uref{http://quimby.gnus.org/circus/face/} for the precise
21927 specifications.
21928
21929 Gnus provides a few convenience functions and variables to allow
21930 easier insertion of Face headers in outgoing messages.
21931
21932 @findex gnus-convert-png-to-face
21933 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
21934 726 bytes long, and converts it to a face.
21935
21936 @findex gnus-face-from-file
21937 @vindex gnus-convert-image-to-face-command
21938 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
21939 converts the file to Face format by using the
21940 @code{gnus-convert-image-to-face-command} shell command.
21941
21942 Here's how you would typically use this function. Put something like the
21943 following in your @file{~/.gnus.el} file:
21944
21945 @lisp
21946 (setq message-required-news-headers
21947       (nconc message-required-news-headers
21948              (list '(Face . (lambda ()
21949                               (gnus-face-from-file "~/face.jpg"))))))
21950 @end lisp
21951
21952
21953 @node Smileys
21954 @subsection Smileys
21955 @cindex smileys
21956
21957 @iftex
21958 @iflatex
21959 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
21960 \input{smiley}
21961 @end iflatex
21962 @end iftex
21963
21964 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
21965 currently the only package that uses Smiley, it is documented here.
21966
21967 In short---to use Smiley in Gnus, put the following in your
21968 @file{~/.gnus.el} file:
21969
21970 @lisp
21971 (setq gnus-treat-display-smileys t)
21972 @end lisp
21973
21974 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
21975 the like---to pictures and displays those instead of the text smiley
21976 faces.  The conversion is controlled by a list of regexps that matches
21977 text and maps that to file names.
21978
21979 @vindex smiley-regexp-alist
21980 The alist used is specified by the @code{smiley-regexp-alist}
21981 variable.  The first item in each element is the regexp to be matched;
21982 the second element is the regexp match group that is to be replaced by
21983 the picture; and the third element is the name of the file to be
21984 displayed.
21985
21986 The following variables customize where Smiley will look for these
21987 files:
21988
21989 @table @code
21990
21991 @item smiley-data-directory
21992 @vindex smiley-data-directory
21993 Where Smiley will look for smiley faces files.
21994
21995 @item gnus-smiley-file-types
21996 @vindex gnus-smiley-file-types
21997 List of suffixes on smiley file names to try.
21998
21999 @end table
22000
22001
22002 @node Picons
22003 @subsection Picons
22004
22005 @iftex
22006 @iflatex
22007 \include{picons}
22008 @end iflatex
22009 @end iftex
22010
22011 So@dots{}  You want to slow down your news reader even more!  This is a
22012 good way to do so.  It's also a great way to impress people staring
22013 over your shoulder as you read news.
22014
22015 What are Picons?  To quote directly from the Picons Web site:
22016
22017 @iftex
22018 @iflatex
22019 \margindex{}
22020 @end iflatex
22021 @end iftex
22022
22023 @quotation
22024 @dfn{Picons} is short for ``personal icons''.  They're small,
22025 constrained images used to represent users and domains on the net,
22026 organized into databases so that the appropriate image for a given
22027 e-mail address can be found.  Besides users and domains, there are picon
22028 databases for Usenet newsgroups and weather forecasts.  The picons are
22029 in either monochrome @code{XBM} format or color @code{XPM} and
22030 @code{GIF} formats.
22031 @end quotation
22032
22033 @vindex gnus-picon-databases
22034 For instructions on obtaining and installing the picons databases,
22035 point your Web browser at
22036 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
22037
22038 If you are using Debian GNU/Linux, saying @samp{apt-get install
22039 picons.*} will install the picons where Gnus can find them.
22040
22041 To enable displaying picons, simply make sure that
22042 @code{gnus-picon-databases} points to the directory containing the
22043 Picons databases.
22044
22045 The following variables offer control over where things are located.
22046
22047 @table @code
22048
22049 @item gnus-picon-databases
22050 @vindex gnus-picon-databases
22051 The location of the picons database.  This is a list of directories
22052 containing the @file{news}, @file{domains}, @file{users} (and so on)
22053 subdirectories.  Defaults to @code{("/usr/lib/picon"
22054 "/usr/local/faces")}.
22055
22056 @item gnus-picon-news-directories
22057 @vindex gnus-picon-news-directories
22058 List of subdirectories to search in @code{gnus-picon-databases} for
22059 newsgroups faces.  @code{("news")} is the default.
22060
22061 @item gnus-picon-user-directories
22062 @vindex gnus-picon-user-directories
22063 List of subdirectories to search in @code{gnus-picon-databases} for user
22064 faces.  @code{("users" "usenix" "local" "misc")} is the default.
22065
22066 @item gnus-picon-domain-directories
22067 @vindex gnus-picon-domain-directories
22068 List of subdirectories to search in @code{gnus-picon-databases} for
22069 domain name faces.  Defaults to @code{("domains")}.  Some people may
22070 want to add @samp{"unknown"} to this list.
22071
22072 @item gnus-picon-file-types
22073 @vindex gnus-picon-file-types
22074 Ordered list of suffixes on picon file names to try.  Defaults to
22075 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
22076
22077 @end table
22078
22079
22080 @node XVarious
22081 @subsection Various XEmacs Variables
22082
22083 @table @code
22084 @item gnus-xmas-glyph-directory
22085 @vindex gnus-xmas-glyph-directory
22086 This is where Gnus will look for pictures.  Gnus will normally
22087 auto-detect this directory, but you may set it manually if you have an
22088 unusual directory structure.
22089
22090 @item gnus-xmas-logo-color-alist
22091 @vindex gnus-xmas-logo-color-alist
22092 This is an alist where the key is a type symbol and the values are the
22093 foreground and background color of the splash page glyph.
22094
22095 @item gnus-xmas-logo-color-style
22096 @vindex gnus-xmas-logo-color-style
22097 This is the key used to look up the color in the alist described above.
22098 Valid values include @code{flame}, @code{pine}, @code{moss},
22099 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
22100 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
22101
22102 @item gnus-xmas-modeline-glyph
22103 @vindex gnus-xmas-modeline-glyph
22104 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
22105 default.
22106
22107 @end table
22108
22109 @subsubsection Toolbar
22110
22111 @table @code
22112
22113 @item gnus-use-toolbar
22114 @vindex gnus-use-toolbar
22115 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
22116 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
22117 @code{right-toolbar}, or @code{left-toolbar}.
22118
22119 @item gnus-group-toolbar
22120 @vindex gnus-group-toolbar
22121 The toolbar in the group buffer.
22122
22123 @item gnus-summary-toolbar
22124 @vindex gnus-summary-toolbar
22125 The toolbar in the summary buffer.
22126
22127 @item gnus-summary-mail-toolbar
22128 @vindex gnus-summary-mail-toolbar
22129 The toolbar in the summary buffer of mail groups.
22130
22131 @end table
22132
22133 @iftex
22134 @iflatex
22135 \margindex{}
22136 @end iflatex
22137 @end iftex
22138
22139
22140 @node Fuzzy Matching
22141 @section Fuzzy Matching
22142 @cindex fuzzy matching
22143
22144 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
22145 things like scoring, thread gathering and thread comparison.
22146
22147 As opposed to regular expression matching, fuzzy matching is very fuzzy.
22148 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
22149 means, and the implementation has changed over time.
22150
22151 Basically, it tries to remove all noise from lines before comparing.
22152 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
22153 out of the strings before comparing the results.  This often leads to
22154 adequate results---even when faced with strings generated by text
22155 manglers masquerading as newsreaders.
22156
22157
22158 @node Thwarting Email Spam
22159 @section Thwarting Email Spam
22160 @cindex email spam
22161 @cindex spam
22162 @cindex UCE
22163 @cindex unsolicited commercial email
22164
22165 In these last days of the Usenet, commercial vultures are hanging about
22166 and grepping through news like crazy to find email addresses they can
22167 foist off their scams and products to.  As a reaction to this, many
22168 people have started putting nonsense addresses into their @code{From}
22169 lines.  I think this is counterproductive---it makes it difficult for
22170 people to send you legitimate mail in response to things you write, as
22171 well as making it difficult to see who wrote what.  This rewriting may
22172 perhaps be a bigger menace than the unsolicited commercial email itself
22173 in the end.
22174
22175 The biggest problem I have with email spam is that it comes in under
22176 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
22177 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
22178 mail group, only to find two pyramid schemes, seven advertisements
22179 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
22180 and one mail asking me to repent and find some god.
22181
22182 This is annoying.  Here's what you can do about it.
22183
22184 @menu
22185 * The problem of spam::         Some background, and some solutions
22186 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
22187 * SpamAssassin::                How to use external anti-spam tools.
22188 * Hashcash::                    Reduce spam by burning CPU time.
22189 * Filtering Spam Using The Spam ELisp Package::
22190 * Filtering Spam Using Statistics with spam-stat::
22191 @end menu
22192
22193 @node The problem of spam
22194 @subsection The problem of spam
22195 @cindex email spam
22196 @cindex spam filtering approaches
22197 @cindex filtering approaches, spam
22198 @cindex UCE
22199 @cindex unsolicited commercial email
22200
22201 First, some background on spam.
22202
22203 If you have access to e-mail, you are familiar with spam (technically
22204 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it
22205 exists because e-mail delivery is very cheap compared to paper mail,
22206 so only a very small percentage of people need to respond to an UCE to
22207 make it worthwhile to the advertiser.  Ironically, one of the most
22208 common spams is the one offering a database of e-mail addresses for
22209 further spamming.  Senders of spam are usually called @emph{spammers},
22210 but terms like @emph{vermin}, @emph{scum}, @emph{sociopaths}, and
22211 @emph{morons} are in common use as well.
22212
22213 Spam comes from a wide variety of sources.  It is simply impossible to
22214 dispose of all spam without discarding useful messages.  A good
22215 example is the TMDA system, which requires senders
22216 unknown to you to confirm themselves as legitimate senders before
22217 their e-mail can reach you.  Without getting into the technical side
22218 of TMDA, a downside is clearly that e-mail from legitimate sources may
22219 be discarded if those sources can't or won't confirm themselves
22220 through the TMDA system.  Another problem with TMDA is that it
22221 requires its users to have a basic understanding of e-mail delivery
22222 and processing.
22223
22224 The simplest approach to filtering spam is filtering, at the mail
22225 server or when you sort through incoming mail.  If you get 200 spam
22226 messages per day from @samp{random-address@@vmadmin.com}, you block
22227 @samp{vmadmin.com}.  If you get 200 messages about @samp{VIAGRA}, you
22228 discard all messages with @samp{VIAGRA} in the message.  If you get
22229 lots of spam from Elbonia, for example, you try to filter all mail
22230 from Elbonian IPs.
22231
22232 This, unfortunately, is a great way to discard legitimate e-mail.  For
22233 instance, the very informative and useful RISKS digest has been
22234 blocked by overzealous mail filters because it @strong{contained}
22235 words that were common in spam messages.  The risks of blocking a
22236 whole country from contacting you should also be obvious, so don't do
22237 it if you have the choice.  Nevertheless, in isolated cases, with
22238 great care, direct filtering of mail can be useful.
22239
22240 Another approach to filtering e-mail is the distributed spam
22241 processing, for instance DCC implements such a system.  In essence,
22242 @var{N} systems around the world agree that a machine @var{X} in
22243 Ghana, Estonia, or California is sending out spam e-mail, and these
22244 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into a
22245 database.  The criteria for spam detection vary---it may be the number
22246 of messages sent, the content of the messages, and so on.  When a user
22247 of the distributed processing system wants to find out if a message is
22248 spam, he consults one of those @var{N} systems.
22249
22250 Distributed spam processing works very well against spammers that send
22251 a large number of messages at once, but it requires the user to set up
22252 fairly complicated checks.  There are commercial and free distributed
22253 spam processing systems.  Distributed spam processing has its risks as
22254 well.  For instance legitimate e-mail senders have been accused of
22255 sending spam, and their web sites and mailing lists have been shut
22256 down for some time because of the incident.
22257
22258 The statistical approach to spam filtering is also popular.  It is
22259 based on a statistical analysis of previous spam messages.  Usually
22260 the analysis is a simple word frequency count, with perhaps pairs of
22261 words or 3-word combinations thrown into the mix.  Statistical
22262 analysis of spam works very well in most of the cases, but it can
22263 classify legitimate e-mail as spam in some cases.  It takes time to
22264 run the analysis, the full message must be analyzed, and the user has
22265 to store the database of spam analyses.  Statistical analysis on the
22266 server is gaining popularity.  This has the advantage of letting the
22267 user Just Read Mail, but has the disadvantage that it's harder to tell
22268 the server that it has misclassified mail.
22269
22270 Fighting spam is not easy, no matter what anyone says.  There is no
22271 magic switch that will distinguish Viagra ads from Mom's e-mails.
22272 Even people are having a hard time telling spam apart from non-spam,
22273 because spammers are actively looking to fool us into thinking they
22274 are Mom, essentially.  Spamming is irritating, irresponsible, and
22275 idiotic behavior from a bunch of people who think the world owes them
22276 a favor.  We hope the following sections will help you in fighting the
22277 spam plague.
22278
22279 @node Anti-Spam Basics
22280 @subsection Anti-Spam Basics
22281 @cindex email spam
22282 @cindex spam
22283 @cindex UCE
22284 @cindex unsolicited commercial email
22285
22286 One way of dealing with spam is having Gnus split out all spam into a
22287 @samp{spam} mail group (@pxref{Splitting Mail}).
22288
22289 First, pick one (1) valid mail address that you can be reached at, and
22290 put it in your @code{From} header of all your news articles.  (I've
22291 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
22292 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
22293 sysadmin whether your sendmail installation accepts keywords in the local
22294 part of the mail address.)
22295
22296 @lisp
22297 (setq message-default-news-headers
22298       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
22299 @end lisp
22300
22301 Then put the following split rule in @code{nnmail-split-fancy}
22302 (@pxref{Fancy Mail Splitting}):
22303
22304 @lisp
22305 (...
22306  (to "larsi@@trym.ifi.uio.no"
22307      (| ("subject" "re:.*" "misc")
22308         ("references" ".*@@.*" "misc")
22309         "spam"))
22310  ...)
22311 @end lisp
22312
22313 This says that all mail to this address is suspect, but if it has a
22314 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
22315 header, it's probably ok.  All the rest goes to the @samp{spam} group.
22316 (This idea probably comes from Tim Pierce.)
22317
22318 In addition, many mail spammers talk directly to your @acronym{SMTP} server
22319 and do not include your email address explicitly in the @code{To}
22320 header.  Why they do this is unknown---perhaps it's to thwart this
22321 thwarting scheme?  In any case, this is trivial to deal with---you just
22322 put anything not addressed to you in the @samp{spam} group by ending
22323 your fancy split rule in this way:
22324
22325 @lisp
22326 (
22327  ...
22328  (to "larsi" "misc")
22329  "spam")
22330 @end lisp
22331
22332 In my experience, this will sort virtually everything into the right
22333 group.  You still have to check the @samp{spam} group from time to time to
22334 check for legitimate mail, though.  If you feel like being a good net
22335 citizen, you can even send off complaints to the proper authorities on
22336 each unsolicited commercial email---at your leisure.
22337
22338 This works for me.  It allows people an easy way to contact me (they can
22339 just press @kbd{r} in the usual way), and I'm not bothered at all with
22340 spam.  It's a win-win situation.  Forging @code{From} headers to point
22341 to non-existent domains is yucky, in my opinion.
22342
22343 Be careful with this approach.  Spammers are wise to it.
22344
22345
22346 @node SpamAssassin
22347 @subsection SpamAssassin, Vipul's Razor, DCC, etc
22348 @cindex SpamAssassin
22349 @cindex Vipul's Razor
22350 @cindex DCC
22351
22352 The days where the hints in the previous section were sufficient in
22353 avoiding spam are coming to an end.  There are many tools out there
22354 that claim to reduce the amount of spam you get.  This section could
22355 easily become outdated fast, as new products replace old, but
22356 fortunately most of these tools seem to have similar interfaces.  Even
22357 though this section will use SpamAssassin as an example, it should be
22358 easy to adapt it to most other tools.
22359
22360 Note that this section does not involve the @code{spam.el} package,
22361 which is discussed in the next section.  If you don't care for all
22362 the features of @code{spam.el}, you can make do with these simple
22363 recipes.
22364
22365 If the tool you are using is not installed on the mail server, you
22366 need to invoke it yourself.  Ideas on how to use the
22367 @code{:postscript} mail source parameter (@pxref{Mail Source
22368 Specifiers}) follow.
22369
22370 @lisp
22371 (setq mail-sources
22372       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
22373         (pop :user "jrl"
22374              :server "pophost"
22375              :postscript
22376              "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
22377 @end lisp
22378
22379 Once you manage to process your incoming spool somehow, thus making
22380 the mail contain e.g.@: a header indicating it is spam, you are ready to
22381 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
22382
22383 @lisp
22384 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
22385                              ...))
22386 @end lisp
22387
22388 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
22389
22390 @lisp
22391 (setq nnmail-split-methods 'nnmail-split-fancy
22392       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
22393                              ...))
22394 @end lisp
22395
22396 Some people might not like the idea of piping the mail through various
22397 programs using a @code{:prescript} (if some program is buggy, you
22398 might lose all mail).  If you are one of them, another solution is to
22399 call the external tools during splitting.  Example fancy split method:
22400
22401 @lisp
22402 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
22403                              ...))
22404 (defun kevin-spamassassin ()
22405   (save-excursion
22406     (save-restriction
22407       (widen)
22408       (if (eq 1 (call-process-region (point-min) (point-max)
22409                                      "spamc" nil nil nil "-c"))
22410           "spam"))))
22411 @end lisp
22412
22413 Note that with the nnimap backend, message bodies will not be
22414 downloaded by default.  You need to set
22415 @code{nnimap-split-download-body} to @code{t} to do that
22416 (@pxref{Splitting in IMAP}).
22417
22418 That is about it.  As some spam is likely to get through anyway, you
22419 might want to have a nifty function to call when you happen to read
22420 spam.  And here is the nifty function:
22421
22422 @lisp
22423  (defun my-gnus-raze-spam ()
22424   "Submit SPAM to Vipul's Razor, then mark it as expirable."
22425   (interactive)
22426   (gnus-summary-show-raw-article)
22427   (gnus-summary-save-in-pipe "razor-report -f -d")
22428   (gnus-summary-mark-as-expirable 1))
22429 @end lisp
22430
22431 @node Hashcash
22432 @subsection Hashcash
22433 @cindex hashcash
22434
22435 A novel technique to fight spam is to require senders to do something
22436 costly for each message they send.  This has the obvious drawback that
22437 you cannot rely on everyone in the world using this technique,
22438 since it is not part of the Internet standards, but it may be useful
22439 in smaller communities.
22440
22441 While the tools in the previous section work well in practice, they
22442 work only because the tools are constantly maintained and updated as
22443 new form of spam appears.  This means that a small percentage of spam
22444 will always get through.  It also means that somewhere, someone needs
22445 to read lots of spam to update these tools.  Hashcash avoids that, but
22446 instead prefers that everyone you contact through e-mail supports the
22447 scheme.  You can view the two approaches as pragmatic vs dogmatic.
22448 The approaches have their own advantages and disadvantages, but as
22449 often in the real world, a combination of them is stronger than either
22450 one of them separately.
22451
22452 @cindex X-Hashcash
22453 The ``something costly'' is to burn CPU time, more specifically to
22454 compute a hash collision up to a certain number of bits.  The
22455 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
22456 header.  For more details, and for the external application
22457 @code{hashcash} you need to install to use this feature, see
22458 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
22459 information can be found at @uref{http://www.camram.org/}.
22460
22461 If you wish to call hashcash for each message you send, say something
22462 like:
22463
22464 @lisp
22465 (require 'hashcash)
22466 (add-hook 'message-send-hook 'mail-add-payment)
22467 @end lisp
22468
22469 The @file{hashcash.el} library can be found in the Gnus development
22470 contrib directory or at
22471 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}.
22472
22473 You will need to set up some additional variables as well:
22474
22475 @table @code
22476
22477 @item hashcash-default-payment
22478 @vindex hashcash-default-payment
22479 This variable indicates the default number of bits the hash collision
22480 should consist of.  By default this is 0, meaning nothing will be
22481 done.  Suggested useful values include 17 to 29.
22482
22483 @item hashcash-payment-alist
22484 @vindex hashcash-payment-alist
22485 Some receivers may require you to spend burn more CPU time than the
22486 default.  This variable contains a list of @samp{(@var{addr}
22487 @var{amount})} cells, where @var{addr} is the receiver (email address
22488 or newsgroup) and @var{amount} is the number of bits in the collision
22489 that is needed.  It can also contain @samp{(@var{addr} @var{string}
22490 @var{amount})} cells, where the @var{string} is the string to use
22491 (normally the email address or newsgroup name is used).
22492
22493 @item hashcash
22494 @vindex hashcash
22495 Where the @code{hashcash} binary is installed.
22496
22497 @end table
22498
22499 Currently there is no built in functionality in Gnus to verify
22500 hashcash cookies, it is expected that this is performed by your hand
22501 customized mail filtering scripts.  Improvements in this area would be
22502 a useful contribution, however.
22503
22504 @node Filtering Spam Using The Spam ELisp Package
22505 @subsection Filtering Spam Using The Spam ELisp Package
22506 @cindex spam filtering
22507 @cindex spam
22508
22509 The idea behind @file{spam.el} is to have a control center for spam detection
22510 and filtering in Gnus.  To that end, @file{spam.el} does two things: it
22511 filters new mail, and it analyzes mail known to be spam or ham.
22512 @dfn{Ham} is the name used throughout @file{spam.el} to indicate
22513 non-spam messages.
22514
22515 First of all, you @strong{must} run the function
22516 @code{spam-initialize} to autoload @code{spam.el} and to install the
22517 @code{spam.el} hooks.  There is one exception: if you use the
22518 @code{spam-use-stat} (@pxref{spam-stat spam filtering}) setting, you
22519 should turn it on before @code{spam-initialize}:
22520
22521 @example
22522 (setq spam-use-stat t) ;; if needed
22523 (spam-initialize)
22524 @end example
22525
22526 So, what happens when you load @file{spam.el}?
22527
22528 First, some hooks will get installed by @code{spam-initialize}.  There
22529 are some hooks for @code{spam-stat} so it can save its databases, and
22530 there are hooks so interesting things will happen when you enter and
22531 leave a group.  More on the sequence of events later (@pxref{Spam
22532 ELisp Package Sequence of Events}).
22533
22534 You get the following keyboard commands:
22535
22536 @table @kbd
22537
22538 @item M-d
22539 @itemx M s x
22540 @itemx S x
22541 @kindex M-d
22542 @kindex S x
22543 @kindex M s x
22544 @findex gnus-summary-mark-as-spam
22545 @code{gnus-summary-mark-as-spam}.
22546
22547 Mark current article as spam, showing it with the @samp{$} mark.
22548 Whenever you see a spam article, make sure to mark its summary line
22549 with @kbd{M-d} before leaving the group.  This is done automatically
22550 for unread articles in @emph{spam} groups.
22551
22552 @item M s t
22553 @itemx S t
22554 @kindex M s t
22555 @kindex S t
22556 @findex spam-bogofilter-score
22557 @code{spam-bogofilter-score}.
22558
22559 You must have Bogofilter installed for that command to work properly.
22560
22561 @xref{Bogofilter}.
22562
22563 @end table
22564
22565 Also, when you load @file{spam.el}, you will be able to customize its
22566 variables.  Try @code{customize-group} on the @samp{spam} variable
22567 group.
22568
22569 @menu
22570 * Spam ELisp Package Sequence of Events::  
22571 * Spam ELisp Package Filtering of Incoming Mail::  
22572 * Spam ELisp Package Global Variables::  
22573 * Spam ELisp Package Configuration Examples::  
22574 * Blacklists and Whitelists::   
22575 * BBDB Whitelists::             
22576 * Gmane Spam Reporting::        
22577 * Anti-spam Hashcash Payments::  
22578 * Blackholes::                  
22579 * Regular Expressions Header Matching::  
22580 * Bogofilter::                  
22581 * ifile spam filtering::        
22582 * spam-stat spam filtering::    
22583 * SpamOracle::                  
22584 * Extending the Spam ELisp package::  
22585 @end menu 
22586
22587 @node Spam ELisp Package Sequence of Events
22588 @subsubsection Spam ELisp Package Sequence of Events
22589 @cindex spam filtering
22590 @cindex spam filtering sequence of events
22591 @cindex spam
22592
22593 You must read this section to understand how @code{spam.el} works.
22594 Do not skip, speed-read, or glance through this section.
22595
22596 There are two @emph{contact points}, if you will, between
22597 @code{spam.el} and the rest of Gnus: checking new mail for spam, and
22598 leaving a group.
22599
22600 Getting new mail is done in one of two ways.  You can either split
22601 your incoming mail or you can classify new articles as ham or spam
22602 when you enter the group.
22603
22604 Splitting incoming mail is better suited to mail backends such as
22605 @code{nnml} or @code{nnimap} where new mail appears in a single file
22606 called a @dfn{Spool File}.  See @xref{Spam ELisp Package Filtering of
22607 Incoming Mail}.
22608
22609 For backends such as @code{nntp} there is no incoming mail spool, so
22610 an alternate mechanism must be used.  This may also happen for
22611 backends where the server is in charge of splitting incoming mail, and
22612 Gnus does not do further splitting.  The @code{spam-autodetect} and
22613 @code{spam-autodetect-methods} group parameters (accessible with
22614 @kbd{G c} and @kbd{G p} as usual), and the corresponding variables
22615 @code{gnus-spam-autodetect-methods} and
22616 @code{gnus-spam-autodetect-methods} (accessible with @kbd{M-x
22617 customize-variable} as usual).
22618
22619 When @code{spam-autodetect} is used, it hooks into the process of
22620 entering a group.  Thus, entering a group with unseen or unread
22621 articles becomes the substitute for checking incoming mail.  Whether
22622 only unseen articles or all unread articles will be processed is
22623 determined by the @code{spam-autodetect-recheck-messages}.  When set
22624 to t, unread messages will be rechecked.
22625
22626 @code{spam-autodetect} grants the user at once more and less control
22627 of spam filtering.  The user will have more control over each group's
22628 spam methods, so for instance the @samp{ding} group may have
22629 @code{spam-use-BBDB} as the autodetection method, while the
22630 @samp{suspect} group may have the @code{spam-use-blacklist} and
22631 @code{spam-use-bogofilter} methods enabled.  Every article detected to
22632 be spam will be marked with the spam mark @samp{$} and processed on
22633 exit from the group as normal spam.  The user has less control over
22634 the @emph{sequence} of checks, as he might with @code{spam-split}.
22635
22636 When the newly split mail goes into groups, or messages are
22637 autodetected to be ham or spam, those groups must be exited (after
22638 entering, if needed) for further spam processing to happen.  It
22639 matters whether the group is considered a ham group, a spam group, or
22640 is unclassified, based on its @code{spam-content} parameter
22641 (@pxref{Spam ELisp Package Global Variables}).  Spam groups have the
22642 additional characteristic that, when entered, any unseen or unread
22643 articles (depending on the @code{spam-mark-only-unseen-as-spam}
22644 variable) will be marked as spam.  Thus, mail split into a spam group
22645 gets automatically marked as spam when you enter the group.
22646
22647 So, when you exit a group, the @code{spam-processors} are applied, if
22648 any are set, and the processed mail is moved to the
22649 @code{ham-process-destination} or the @code{spam-process-destination}
22650 depending on the article's classification.  If the
22651 @code{ham-process-destination} or the @code{spam-process-destination},
22652 whichever is appropriate, are @code{nil}, the article is left in the
22653 current group.
22654
22655 If a spam is found in any group (this can be changed to only non-spam
22656 groups with @code{spam-move-spam-nonspam-groups-only}), it is
22657 processed by the active @code{spam-processors} (@pxref{Spam ELisp
22658 Package Global Variables}) when the group is exited.  Furthermore, the
22659 spam is moved to the @code{spam-process-destination} (@pxref{Spam
22660 ELisp Package Global Variables}) for further training or deletion.
22661 You have to load the @code{gnus-registry.el} package and enable the
22662 @code{spam-log-to-registry} variable if you want spam to be processed
22663 no more than once.  Thus, spam is detected and processed everywhere,
22664 which is what most people want.  If the
22665 @code{spam-process-destination} is @code{nil}, the spam is marked as
22666 expired, which is usually the right thing to do.
22667
22668 If spam can not be moved - because of a read-only backend such as NNTP,
22669 for example, it will be copied.
22670
22671 If a ham mail is found in a ham group, as determined by the
22672 @code{ham-marks} parameter, it is processed as ham by the active ham
22673 @code{spam-processor} when the group is exited.  With the variables
22674 @code{spam-process-ham-in-spam-groups} and
22675 @code{spam-process-ham-in-nonham-groups} the behavior can be further
22676 altered so ham found anywhere can be processed.  You have to load the
22677 @code{gnus-registry.el} package and enable the
22678 @code{spam-log-to-registry} variable if you want ham to be processed
22679 no more than once.  Thus, ham is detected and processed only when
22680 necessary, which is what most people want.  More on this in
22681 @xref{Spam ELisp Package Configuration Examples}.
22682
22683 If ham can not be moved - because of a read-only backend such as NNTP,
22684 for example, it will be copied.
22685
22686 If all this seems confusing, don't worry.  Soon it will be as natural
22687 as typing Lisp one-liners on a neural interface... err, sorry, that's
22688 50 years in the future yet.  Just trust us, it's not so bad.
22689
22690 @node Spam ELisp Package Filtering of Incoming Mail
22691 @subsubsection Spam ELisp Package Filtering of Incoming Mail
22692 @cindex spam filtering
22693 @cindex spam filtering incoming mail
22694 @cindex spam
22695
22696 To use the @file{spam.el} facilities for incoming mail filtering, you
22697 must add the following to your fancy split list
22698 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
22699
22700 @example
22701 (: spam-split)
22702 @end example
22703
22704 Note that the fancy split may be called @code{nnmail-split-fancy} or
22705 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
22706 nnimap back ends to retrieve your mail.
22707
22708 The @code{spam-split} function will process incoming mail and send the
22709 mail considered to be spam into the group name given by the variable
22710 @code{spam-split-group}.  By default that group name is @samp{spam},
22711 but you can customize @code{spam-split-group}.  Make sure the contents
22712 of @code{spam-split-group} are an @emph{unqualified} group name, for
22713 instance in an @code{nnimap} server @samp{your-server} the value
22714 @samp{spam} will turn out to be @samp{nnimap+your-server:spam}.  The
22715 value @samp{nnimap+server:spam}, therefore, is wrong and will
22716 actually give you the group
22717 @samp{nnimap+your-server:nnimap+server:spam} which may or may not
22718 work depending on your server's tolerance for strange group names.
22719
22720 You can also give @code{spam-split} a parameter,
22721 e.g. @samp{'spam-use-regex-headers} or @samp{"maybe-spam"}.  Why is
22722 this useful?
22723
22724 Take these split rules (with @code{spam-use-regex-headers} and
22725 @code{spam-use-blackholes} set):
22726
22727 @example
22728  nnimap-split-fancy '(|
22729                       (any "ding" "ding")
22730                       (: spam-split)
22731                       ;; default mailbox
22732                       "mail")
22733 @end example
22734
22735 Now, the problem is that you want all ding messages to make it to the
22736 ding folder.  But that will let obvious spam (for example, spam
22737 detected by SpamAssassin, and @code{spam-use-regex-headers}) through,
22738 when it's sent to the ding list.  On the other hand, some messages to
22739 the ding list are from a mail server in the blackhole list, so the
22740 invocation of @code{spam-split} can't be before the ding rule.
22741
22742 You can let SpamAssassin headers supersede ding rules, but all other
22743 @code{spam-split} rules (including a second invocation of the
22744 regex-headers check) will be after the ding rule:
22745
22746 @example
22747  nnimap-split-fancy '(|
22748 ;;; all spam detected by spam-use-regex-headers goes to "regex-spam"
22749                       (: spam-split "regex-spam" 'spam-use-regex-headers)
22750                       (any "ding" "ding")
22751 ;;; all other spam detected by spam-split goes to spam-split-group
22752                       (: spam-split)
22753                       ;; default mailbox
22754                       "mail")
22755 @end example
22756
22757 This lets you invoke specific @code{spam-split} checks depending on
22758 your particular needs, and to target the results of those checks to a
22759 particular spam group.  You don't have to throw all mail into all the
22760 spam tests.  Another reason why this is nice is that messages to
22761 mailing lists you have rules for don't have to have resource-intensive
22762 blackhole checks performed on them.  You could also specify different
22763 spam checks for your nnmail split vs. your nnimap split.  Go crazy.
22764
22765 You should still have specific checks such as
22766 @code{spam-use-regex-headers} set to @code{t}, even if you
22767 specifically invoke @code{spam-split} with the check.  The reason is
22768 that when loading @file{spam.el}, some conditional loading is done
22769 depending on what @code{spam-use-xyz} variables you have set.  This
22770 is usually not critical, though.
22771
22772 @emph{Note for IMAP users}
22773
22774 The boolean variable @code{nnimap-split-download-body} needs to be
22775 set, if you want to split based on the whole message instead of just
22776 the headers.  By default, the nnimap back end will only retrieve the
22777 message headers.  If you use @code{spam-check-bogofilter},
22778 @code{spam-check-ifile}, or @code{spam-check-stat} (the splitters that
22779 can benefit from the full message body), you should set this variable.
22780 It is not set by default because it will slow @acronym{IMAP} down, and
22781 that is not an appropriate decision to make on behalf of the user.
22782
22783 @xref{Splitting in IMAP}.
22784
22785 @emph{TODO: spam.el needs to provide a uniform way of training all the
22786 statistical databases.  Some have that functionality built-in, others
22787 don't.}
22788
22789 @node Spam ELisp Package Global Variables
22790 @subsubsection Spam ELisp Package Global Variables
22791 @cindex spam filtering
22792 @cindex spam filtering variables
22793 @cindex spam variables
22794 @cindex spam
22795
22796 @vindex gnus-spam-process-newsgroups
22797 The concepts of ham processors and spam processors are very important.
22798 Ham processors and spam processors for a group can be set with the
22799 @code{spam-process} group parameter, or the
22800 @code{gnus-spam-process-newsgroups} variable.  Ham processors take
22801 mail known to be non-spam (@emph{ham}) and process it in some way so
22802 that later similar mail will also be considered non-spam.  Spam
22803 processors take mail known to be spam and process it so similar spam
22804 will be detected later.
22805
22806 The format of the spam or ham processor entry used to be a symbol,
22807 but now it is a cons cell.  See the individual spam processor entries
22808 for more information.
22809
22810 @vindex gnus-spam-newsgroup-contents
22811 Gnus learns from the spam you get.  You have to collect your spam in
22812 one or more spam groups, and set or customize the variable
22813 @code{spam-junk-mailgroups} as appropriate.  You can also declare
22814 groups to contain spam by setting their group parameter
22815 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
22816 by customizing the corresponding variable
22817 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
22818 parameter and the @code{gnus-spam-newsgroup-contents} variable can
22819 also be used to declare groups as @emph{ham} groups if you set their
22820 classification to @code{gnus-group-spam-classification-ham}.  If
22821 groups are not classified by means of @code{spam-junk-mailgroups},
22822 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
22823 considered @emph{unclassified}.  All groups are unclassified by
22824 default.
22825
22826 @vindex gnus-spam-mark
22827 @cindex $
22828 In spam groups, all messages are considered to be spam by default:
22829 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
22830 group.  If you have seen a message, had it marked as spam, then
22831 unmarked it, it won't be marked as spam when you enter the group
22832 thereafter.  You can disable that behavior, so all unread messages
22833 will get the @samp{$} mark, if you set the
22834 @code{spam-mark-only-unseen-as-spam} parameter to @code{nil}.  You
22835 should remove the @samp{$} mark when you are in the group summary
22836 buffer for every message that is not spam after all.  To remove the
22837 @samp{$} mark, you can use @kbd{M-u} to ``unread'' the article, or
22838 @kbd{d} for declaring it read the non-spam way.  When you leave a
22839 group, all spam-marked (@samp{$}) articles are sent to a spam
22840 processor which will study them as spam samples.
22841
22842 Messages may also be deleted in various other ways, and unless
22843 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
22844 and @samp{r} for default read or explicit delete, marks @samp{X} and
22845 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
22846 low scores, are all considered to be associated with articles which
22847 are not spam.  This assumption might be false, in particular if you
22848 use kill files or score files as means for detecting genuine spam, you
22849 should then adjust the @code{ham-marks} group parameter.
22850
22851 @defvar ham-marks
22852 You can customize this group or topic parameter to be the list of
22853 marks you want to consider ham.  By default, the list contains the
22854 deleted, read, killed, kill-filed, and low-score marks (the idea is
22855 that these articles have been read, but are not spam).  It can be
22856 useful to also include the tick mark in the ham marks.  It is not
22857 recommended to make the unread mark a ham mark, because it normally
22858 indicates a lack of classification.  But you can do it, and we'll be
22859 happy for you.
22860 @end defvar
22861
22862 @defvar spam-marks
22863 You can customize this group or topic parameter to be the list of
22864 marks you want to consider spam.  By default, the list contains only
22865 the spam mark.  It is not recommended to change that, but you can if
22866 you really want to.
22867 @end defvar
22868
22869 When you leave @emph{any} group, regardless of its
22870 @code{spam-contents} classification, all spam-marked articles are sent
22871 to a spam processor, which will study these as spam samples.  If you
22872 explicit kill a lot, you might sometimes end up with articles marked
22873 @samp{K} which you never saw, and which might accidentally contain
22874 spam.  Best is to make sure that real spam is marked with @samp{$},
22875 and nothing else.
22876
22877 @vindex gnus-ham-process-destinations
22878 When you leave a @emph{spam} group, all spam-marked articles are
22879 marked as expired after processing with the spam processor.  This is
22880 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
22881 @strong{ham} articles in a spam group will be moved to a location
22882 determined by either the @code{ham-process-destination} group
22883 parameter or a match in the @code{gnus-ham-process-destinations}
22884 variable, which is a list of regular expressions matched with group
22885 names (it's easiest to customize this variable with
22886 @code{customize-variable gnus-ham-process-destinations}).  Each
22887 newsgroup specification has the format (REGEXP PROCESSOR) in a
22888 standard Lisp list, if you prefer to customize the variable manually.
22889 The ultimate location is a group name or names.  If the
22890 @code{ham-process-destination} parameter is not set, ham articles are
22891 left in place.  If the
22892 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
22893 set, the ham articles are marked as unread before being moved.  
22894
22895 If ham can not be moved - because of a read-only backend such as NNTP,
22896 for example, it will be copied.
22897
22898 Note that you can use multiples destinations per group or regular
22899 expression!  This enables you to send your ham to a regular mail
22900 group and to a @emph{ham training} group.
22901
22902 When you leave a @emph{ham} group, all ham-marked articles are sent to
22903 a ham processor, which will study these as non-spam samples.
22904
22905 @vindex spam-process-ham-in-spam-groups
22906 By default the variable @code{spam-process-ham-in-spam-groups} is
22907 @code{nil}.  Set it to @code{t} if you want ham found in spam groups
22908 to be processed.  Normally this is not done, you are expected instead
22909 to send your ham to a ham group and process it there.
22910
22911 @vindex spam-process-ham-in-nonham-groups
22912 By default the variable @code{spam-process-ham-in-nonham-groups} is
22913 @code{nil}.  Set it to @code{t} if you want ham found in non-ham (spam
22914 or unclassified) groups to be processed.  Normally this is not done,
22915 you are expected instead to send your ham to a ham group and process
22916 it there.
22917
22918 @vindex gnus-spam-process-destinations
22919 When you leave a @emph{ham} or @emph{unclassified} group, all
22920 @strong{spam} articles are moved to a location determined by either
22921 the @code{spam-process-destination} group parameter or a match in the
22922 @code{gnus-spam-process-destinations} variable, which is a list of
22923 regular expressions matched with group names (it's easiest to
22924 customize this variable with @code{customize-variable
22925 gnus-spam-process-destinations}).  Each newsgroup specification has
22926 the repeated format (REGEXP GROUP) and they are all in a standard Lisp
22927 list, if you prefer to customize the variable manually.  The ultimate
22928 location is a group name or names.  If the
22929 @code{spam-process-destination} parameter is not set, the spam
22930 articles are only expired.  The group name is fully qualified, meaning
22931 that if you see @samp{nntp:servername} before the group name in the
22932 group buffer then you need it here as well.  
22933
22934 If spam can not be moved - because of a read-only backend such as NNTP,
22935 for example, it will be copied.
22936
22937 Note that you can use multiples destinations per group or regular
22938 expression!  This enables you to send your spam to multiple @emph{spam
22939 training} groups.
22940
22941 @vindex spam-log-to-registry
22942 The problem with processing ham and spam is that Gnus doesn't track
22943 this processing by default.  Enable the @code{spam-log-to-registry}
22944 variable so @code{spam.el} will use @code{gnus-registry.el} to track
22945 what articles have been processed, and avoid processing articles
22946 multiple times.  Keep in mind that if you limit the number of registry
22947 entries, this won't work as well as it does without a limit.
22948
22949 @vindex spam-mark-only-unseen-as-spam
22950 Set this variable if you want only unseen articles in spam groups to
22951 be marked as spam.  By default, it is set.  If you set it to
22952 @code{nil}, unread articles will also be marked as spam.
22953
22954 @vindex spam-mark-ham-unread-before-move-from-spam-group
22955 Set this variable if you want ham to be unmarked before it is moved
22956 out of the spam group.  This is very useful when you use something
22957 like the tick mark @samp{!} to mark ham - the article will be placed
22958 in your ham-process-destination, unmarked as if it came fresh from
22959 the mail server.
22960
22961 @vindex spam-autodetect-recheck-messages
22962 When autodetecting spam, this variable tells @code{spam.el} whether
22963 only unseen articles or all unread articles should be checked for
22964 spam.  It is recommended that you leave it off.
22965
22966 @node Spam ELisp Package Configuration Examples
22967 @subsubsection Spam ELisp Package Configuration Examples
22968 @cindex spam filtering
22969 @cindex spam filtering configuration examples
22970 @cindex spam configuration examples
22971 @cindex spam
22972
22973 @subsubheading Ted's setup
22974
22975 From Ted Zlatanov <tzz@@lifelogs.com>.
22976 @example
22977
22978 ;; for gnus-registry-split-fancy-with-parent and spam autodetection
22979 ;; see gnus-registry.el for more information
22980 (gnus-registry-initialize)
22981 (spam-initialize)
22982
22983 ;; I like control-S for marking spam
22984 (define-key gnus-summary-mode-map "\C-s" 'gnus-summary-mark-as-spam)
22985
22986 (setq
22987  spam-log-to-registry t ;; for spam autodetection
22988  spam-use-BBDB t
22989  spam-use-regex-headers t               ; catch X-Spam-Flag (SpamAssassin)
22990  ;; all groups with "spam" in the name contain spam
22991  gnus-spam-newsgroup-contents '(("spam" gnus-group-spam-classification-spam))
22992  ;; see documentation for these
22993  spam-move-spam-nonspam-groups-only nil
22994  spam-mark-only-unseen-as-spam t
22995  spam-mark-ham-unread-before-move-from-spam-group t
22996  nnimap-split-rule 'nnimap-split-fancy
22997  ;; understand what this does before you copy it to your own setup!
22998  nnimap-split-fancy '(|
22999                       ;; trace references to parents and put in their group
23000                       (: gnus-registry-split-fancy-with-parent)
23001                       ;; this will catch server-side SpamAssassin tags
23002                       (: spam-split 'spam-use-regex-headers)
23003                       (any "ding" "ding")
23004                       ;; note that spam by default will go to "spam"
23005                       (: spam-split)
23006                       ;; default mailbox
23007                       "mail"))
23008
23009 ;; my parameters, set with `G p'
23010
23011 ;; all nnml groups, and all nnimap groups except
23012 ;; "nnimap+mail.lifelogs.com:train" and
23013 ;; "nnimap+mail.lifelogs.com:spam": any spam goes to nnimap training,
23014 ;; because it must have been detected manually
23015
23016 ((spam-process-destination . "nnimap+mail.lifelogs.com:train"))
23017
23018 ;; all NNTP groups
23019 ;; autodetect spam with the blacklist and ham with the BBDB
23020 ((spam-autodetect-methods spam-use-blacklist spam-use-BBDB)
23021 ;; send all spam to the training group
23022  (spam-process-destination . "nnimap+mail.lifelogs.com:train"))
23023
23024 ;; only some NNTP groups, where I want to autodetect spam
23025 ((spam-autodetect . t))
23026
23027 ;; my nnimap "nnimap+mail.lifelogs.com:spam" group
23028
23029 ;; this is a spam group
23030 ((spam-contents gnus-group-spam-classification-spam)
23031
23032  ;; any spam (which happens when I enter for all unseen messages,
23033  ;; because of the gnus-spam-newsgroup-contents setting above), goes to
23034  ;; "nnimap+mail.lifelogs.com:train" unless I mark it as ham
23035
23036  (spam-process-destination "nnimap+mail.lifelogs.com:train")
23037
23038  ;; any ham goes to my "nnimap+mail.lifelogs.com:mail" folder, but
23039  ;; also to my "nnimap+mail.lifelogs.com:trainham" folder for training
23040
23041  (ham-process-destination "nnimap+mail.lifelogs.com:mail" 
23042                           "nnimap+mail.lifelogs.com:trainham")
23043  ;; in this group, only '!' marks are ham
23044  (ham-marks
23045   (gnus-ticked-mark))
23046  ;; remembers senders in the blacklist on the way out - this is
23047  ;; definitely not needed, it just makes me feel better
23048  (spam-process (gnus-group-spam-exit-processor-blacklist)))
23049
23050 ;; Later, on the IMAP server I use the "train" group for training
23051 ;; SpamAssassin to recognize spam, and the "trainham" group for
23052 ;; recognizing ham - but Gnus has nothing to do with it.
23053
23054 @end example
23055
23056 @subsubheading Using @file{spam.el} on an IMAP server with a statistical filter on the server
23057
23058 From Reiner Steib <reiner.steib@@gmx.de>.
23059
23060 My provider has set up bogofilter (in combination with @acronym{DCC}) on
23061 the mail server (@acronym{IMAP}).  Recognized spam goes to
23062 @samp{spam.detected}, the rest goes through the normal filter rules,
23063 i.e. to @samp{some.folder} or to @samp{INBOX}.  Training on false
23064 positives or negatives is done by copying or moving the article to
23065 @samp{training.ham} or @samp{training.spam} respectively.  A cron job on
23066 the server feeds those to bogofilter with the suitable ham or spam
23067 options and deletes them from the @samp{training.ham} and
23068 @samp{training.spam} folders.
23069
23070 With the following entries in @code{gnus-parameters}, @code{spam.el}
23071 does most of the job for me:
23072
23073 @lisp
23074    ("nnimap:spam\\.detected"
23075     (gnus-article-sort-functions '(gnus-article-sort-by-chars))
23076     (ham-process-destination "nnimap:INBOX" "nnimap:training.ham")
23077     (spam-contents gnus-group-spam-classification-spam))
23078    ("nnimap:\\(INBOX\\|other-folders\\)"
23079     (spam-process-destination . "nnimap:training.spam")
23080     (spam-contents gnus-group-spam-classification-ham))
23081 @end lisp
23082
23083 @itemize 
23084
23085 @item @b{The Spam folder:}
23086
23087 In the folder @samp{spam.detected}, I have to check for false positives
23088 (i.e. legitimate mails, that were wrongly judged as spam by
23089 bogofilter or DCC).
23090
23091 Because of the @code{gnus-group-spam-classification-spam} entry, all
23092 messages are marked as spam (with @code{$}).  When I find a false
23093 positive, I mark the message with some other ham mark (@code{ham-marks},
23094 @ref{Spam ELisp Package Global Variables}).  On group exit, those
23095 messages are copied to both groups, @samp{INBOX} (were I want to have
23096 the article) and @samp{training.ham} (for training bogofilter) and
23097 deleted from the @samp{spam.detected} folder.
23098
23099 The @code{gnus-article-sort-by-chars} entry simplifies detection of
23100 false positives for me.  I receive lots of worms (sweN, @dots{}), that all
23101 have a similar size.  Grouping them by size (i.e. chars) makes finding
23102 other false positives easier.  (Of course worms aren't @i{spam}
23103 (@acronym{UCE}, @acronym{UBE}) strictly speaking.  Anyhow, bogofilter is
23104 an excellent tool for filtering those unwanted mails for me.)
23105
23106 @item @b{Ham folders:}
23107
23108 In my ham folders, I just hit @kbd{S x}
23109 (@code{gnus-summary-mark-as-spam}) whenever I see an unrecognized spam
23110 mail (false negative).  On group exit, those messages are moved to
23111 @samp{training.ham}.
23112 @end itemize
23113
23114 @subsubheading Reporting spam articles in Gmane groups with @code{spam-report.el}
23115
23116 From Reiner Steib <reiner.steib@@gmx.de>.
23117
23118 With following entry in @code{gnus-parameters}, @kbd{S x}
23119 (@code{gnus-summary-mark-as-spam}) marks articles in @code{gmane.*}
23120 groups as spam and reports the to Gmane at group exit:
23121
23122 @lisp
23123    ("^gmane\\."
23124     (spam-process (gnus-group-spam-exit-processor-report-gmane)))
23125 @end lisp
23126
23127 Additionally, I use @code{(setq spam-report-gmane-use-article-number nil)}
23128 because I don't read the groups directly from news.gmane.org, but
23129 through my local news server (leafnode).  I.e. the article numbers are
23130 not the same as on news.gmane.org, thus @code{spam-report.el} has to check
23131 the @code{X-Report-Spam} header to find the correct number.
23132
23133 @node Blacklists and Whitelists
23134 @subsubsection Blacklists and Whitelists
23135 @cindex spam filtering
23136 @cindex whitelists, spam filtering
23137 @cindex blacklists, spam filtering
23138 @cindex spam
23139
23140 @defvar spam-use-blacklist
23141
23142 Set this variable to @code{t} if you want to use blacklists when
23143 splitting incoming mail.  Messages whose senders are in the blacklist
23144 will be sent to the @code{spam-split-group}.  This is an explicit
23145 filter, meaning that it acts only on mail senders @emph{declared} to
23146 be spammers.
23147
23148 @end defvar
23149
23150 @defvar spam-use-whitelist
23151
23152 Set this variable to @code{t} if you want to use whitelists when
23153 splitting incoming mail.  Messages whose senders are not in the
23154 whitelist will be sent to the next spam-split rule.  This is an
23155 explicit filter, meaning that unless someone is in the whitelist, their
23156 messages are not assumed to be spam or ham.
23157
23158 @end defvar
23159
23160 @defvar spam-use-whitelist-exclusive
23161
23162 Set this variable to @code{t} if you want to use whitelists as an
23163 implicit filter, meaning that every message will be considered spam
23164 unless the sender is in the whitelist.  Use with care.
23165
23166 @end defvar
23167
23168 @defvar gnus-group-spam-exit-processor-blacklist
23169
23170 Add this symbol to a group's @code{spam-process} parameter by
23171 customizing the group parameters or the
23172 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23173 added to a group's @code{spam-process} parameter, the senders of
23174 spam-marked articles will be added to the blacklist.
23175
23176 @emph{WARNING} 
23177
23178 Instead of the obsolete
23179 @code{gnus-group-spam-exit-processor-blacklist}, it is recommended
23180 that you use @code{'(spam spam-use-blacklist)}.  Everything will work
23181 the same way, we promise.
23182
23183 @end defvar
23184
23185 @defvar gnus-group-ham-exit-processor-whitelist
23186
23187 Add this symbol to a group's @code{spam-process} parameter by
23188 customizing the group parameters or the
23189 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23190 added to a group's @code{spam-process} parameter, the senders of
23191 ham-marked articles in @emph{ham} groups will be added to the
23192 whitelist.  Note that this ham processor has no effect in @emph{spam}
23193 or @emph{unclassified} groups.
23194
23195 @emph{WARNING} 
23196
23197 Instead of the obsolete
23198 @code{gnus-group-ham-exit-processor-whitelist}, it is recommended
23199 that you use @code{'(ham spam-use-whitelist)}.  Everything will work
23200 the same way, we promise.
23201
23202 @end defvar
23203
23204 Blacklists are lists of regular expressions matching addresses you
23205 consider to be spam senders.  For instance, to block mail from any
23206 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
23207 blacklist.  You start out with an empty blacklist.  Blacklist entries
23208 use the Emacs regular expression syntax.
23209
23210 Conversely, whitelists tell Gnus what addresses are considered
23211 legitimate.  All messages from whitelisted addresses are considered
23212 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
23213 Emacs regular expression syntax.
23214
23215 The blacklist and whitelist file locations can be customized with the
23216 @code{spam-directory} variable (@file{~/News/spam} by default), or
23217 the @code{spam-whitelist} and @code{spam-blacklist} variables
23218 directly.  The whitelist and blacklist files will by default be in the
23219 @code{spam-directory} directory, named @file{whitelist} and
23220 @file{blacklist} respectively.
23221
23222 @node BBDB Whitelists
23223 @subsubsection BBDB Whitelists
23224 @cindex spam filtering
23225 @cindex BBDB whitelists, spam filtering
23226 @cindex BBDB, spam filtering
23227 @cindex spam
23228
23229 @defvar spam-use-BBDB
23230
23231 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
23232 Whitelists}), but uses the BBDB as the source of whitelisted
23233 addresses, without regular expressions.  You must have the BBDB loaded
23234 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
23235 not in the BBDB will be sent to the next spam-split rule.  This is an
23236 explicit filter, meaning that unless someone is in the BBDB, their
23237 messages are not assumed to be spam or ham.
23238
23239 @end defvar
23240
23241 @defvar spam-use-BBDB-exclusive
23242
23243 Set this variable to @code{t} if you want to use the BBDB as an
23244 implicit filter, meaning that every message will be considered spam
23245 unless the sender is in the BBDB.  Use with care.  Only sender
23246 addresses in the BBDB will be allowed through; all others will be
23247 classified as spammers.
23248
23249 @end defvar
23250
23251 @defvar gnus-group-ham-exit-processor-BBDB
23252
23253 Add this symbol to a group's @code{spam-process} parameter by
23254 customizing the group parameters or the
23255 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23256 added to a group's @code{spam-process} parameter, the senders of
23257 ham-marked articles in @emph{ham} groups will be added to the
23258 BBDB.  Note that this ham processor has no effect in @emph{spam}
23259 or @emph{unclassified} groups.
23260
23261 @emph{WARNING} 
23262
23263 Instead of the obsolete
23264 @code{gnus-group-ham-exit-processor-BBDB}, it is recommended
23265 that you use @code{'(ham spam-use-BBDB)}.  Everything will work
23266 the same way, we promise.
23267
23268 @end defvar
23269
23270 @node Gmane Spam Reporting
23271 @subsubsection Gmane Spam Reporting
23272 @cindex spam reporting
23273 @cindex Gmane, spam reporting
23274 @cindex Gmane, spam reporting
23275 @cindex spam
23276
23277 @defvar gnus-group-spam-exit-processor-report-gmane
23278
23279 Add this symbol to a group's @code{spam-process} parameter by
23280 customizing the group parameters or the
23281 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23282 added to a group's @code{spam-process} parameter, the spam-marked
23283 articles groups will be reported to the Gmane administrators via a
23284 HTTP request.
23285
23286 Gmane can be found at @uref{http://gmane.org}.
23287
23288 @emph{WARNING} 
23289
23290 Instead of the obsolete
23291 @code{gnus-group-spam-exit-processor-report-gmane}, it is recommended
23292 that you use @code{'(spam spam-use-gmane)}.  Everything will work the
23293 same way, we promise.
23294
23295 @end defvar
23296
23297 @defvar spam-report-gmane-use-article-number
23298
23299 This variable is @code{t} by default.  Set it to @code{nil} if you are
23300 running your own news server, for instance, and the local article
23301 numbers don't correspond to the Gmane article numbers.  When
23302 @code{spam-report-gmane-use-article-number} is @code{nil},
23303 @code{spam-report.el} will use the @code{X-Report-Spam} header that
23304 Gmane provides.
23305
23306 @end defvar
23307
23308 @node Anti-spam Hashcash Payments
23309 @subsubsection Anti-spam Hashcash Payments
23310 @cindex spam filtering
23311 @cindex hashcash, spam filtering
23312 @cindex spam
23313
23314 @defvar spam-use-hashcash
23315
23316 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
23317 Whitelists}), but uses hashcash tokens for whitelisting messages
23318 instead of the sender address.  You must have the @code{hashcash.el}
23319 package loaded for @code{spam-use-hashcash} to work properly.
23320 Messages without a hashcash payment token will be sent to the next
23321 spam-split rule.  This is an explicit filter, meaning that unless a
23322 hashcash token is found, the messages are not assumed to be spam or
23323 ham.
23324
23325 @end defvar
23326
23327 @node Blackholes
23328 @subsubsection Blackholes
23329 @cindex spam filtering
23330 @cindex blackholes, spam filtering
23331 @cindex spam
23332
23333 @defvar spam-use-blackholes
23334
23335 This option is disabled by default.  You can let Gnus consult the
23336 blackhole-type distributed spam processing systems (DCC, for instance)
23337 when you set this option.  The variable @code{spam-blackhole-servers}
23338 holds the list of blackhole servers Gnus will consult.  The current
23339 list is fairly comprehensive, but make sure to let us know if it
23340 contains outdated servers.
23341
23342 The blackhole check uses the @code{dig.el} package, but you can tell
23343 @file{spam.el} to use @code{dns.el} instead for better performance if
23344 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
23345 this time to set @code{spam-use-dig} to @code{nil} despite the
23346 possible performance improvements, because some users may be unable to
23347 use it, but you can try it and see if it works for you.
23348
23349 @end defvar
23350
23351 @defvar spam-blackhole-servers
23352
23353 The list of servers to consult for blackhole checks.
23354
23355 @end defvar
23356
23357 @defvar spam-blackhole-good-server-regex
23358
23359 A regular expression for IPs that should not be checked against the
23360 blackhole server list.  When set to @code{nil}, it has no effect.
23361
23362 @end defvar
23363
23364 @defvar spam-use-dig
23365
23366 Use the @code{dig.el} package instead of the @code{dns.el} package.
23367 The default setting of @code{t} is recommended.
23368
23369 @end defvar
23370
23371 Blackhole checks are done only on incoming mail.  There is no spam or
23372 ham processor for blackholes.
23373
23374 @node Regular Expressions Header Matching
23375 @subsubsection Regular Expressions Header Matching
23376 @cindex spam filtering
23377 @cindex regular expressions header matching, spam filtering
23378 @cindex spam
23379
23380 @defvar spam-use-regex-headers
23381
23382 This option is disabled by default.  You can let Gnus check the
23383 message headers against lists of regular expressions when you set this
23384 option.  The variables @code{spam-regex-headers-spam} and
23385 @code{spam-regex-headers-ham} hold the list of regular expressions.
23386 Gnus will check against the message headers to determine if the
23387 message is spam or ham, respectively.
23388
23389 @end defvar
23390
23391 @defvar spam-regex-headers-spam
23392
23393 The list of regular expressions that, when matched in the headers of
23394 the message, positively identify it as spam.
23395
23396 @end defvar
23397
23398 @defvar spam-regex-headers-ham
23399
23400 The list of regular expressions that, when matched in the headers of
23401 the message, positively identify it as ham.
23402
23403 @end defvar
23404
23405 Regular expression header checks are done only on incoming mail.
23406 There is no specific spam or ham processor for regular expressions.
23407
23408 @node Bogofilter
23409 @subsubsection Bogofilter
23410 @cindex spam filtering
23411 @cindex bogofilter, spam filtering
23412 @cindex spam
23413
23414 @defvar spam-use-bogofilter
23415
23416 Set this variable if you want @code{spam-split} to use Eric Raymond's
23417 speedy Bogofilter.
23418
23419 With a minimum of care for associating the @samp{$} mark for spam
23420 articles only, Bogofilter training all gets fairly automatic.  You
23421 should do this until you get a few hundreds of articles in each
23422 category, spam or not.  The command @kbd{S t} in summary mode, either
23423 for debugging or for curiosity, shows the @emph{spamicity} score of
23424 the current article (between 0.0 and 1.0).
23425
23426 Bogofilter determines if a message is spam based on a specific
23427 threshold.  That threshold can be customized, consult the Bogofilter
23428 documentation.
23429
23430 If the @code{bogofilter} executable is not in your path, Bogofilter
23431 processing will be turned off.
23432
23433 You should not enable this if you use @code{spam-use-bogofilter-headers}.
23434
23435 @end defvar
23436
23437 @defvar spam-use-bogofilter-headers
23438
23439 Set this variable if you want @code{spam-split} to use Eric Raymond's
23440 speedy Bogofilter, looking only at the message headers.  It works
23441 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
23442 must be in the message already.  Normally you would do this with a
23443 procmail recipe or something similar; consult the Bogofilter
23444 installation documents for details.
23445
23446 You should not enable this if you use @code{spam-use-bogofilter}.
23447
23448 @end defvar
23449
23450 @defvar gnus-group-spam-exit-processor-bogofilter
23451 Add this symbol to a group's @code{spam-process} parameter by
23452 customizing the group parameters or the
23453 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23454 added to a group's @code{spam-process} parameter, spam-marked articles
23455 will be added to the Bogofilter spam database.
23456
23457 @emph{WARNING} 
23458
23459 Instead of the obsolete
23460 @code{gnus-group-spam-exit-processor-bogofilter}, it is recommended
23461 that you use @code{'(spam spam-use-bogofilter)}.  Everything will work
23462 the same way, we promise.
23463 @end defvar
23464
23465 @defvar gnus-group-ham-exit-processor-bogofilter
23466 Add this symbol to a group's @code{spam-process} parameter by
23467 customizing the group parameters or the
23468 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23469 added to a group's @code{spam-process} parameter, the ham-marked
23470 articles in @emph{ham} groups will be added to the Bogofilter database
23471 of non-spam messages.  Note that this ham processor has no effect in
23472 @emph{spam} or @emph{unclassified} groups.
23473
23474 @emph{WARNING} 
23475
23476 Instead of the obsolete
23477 @code{gnus-group-ham-exit-processor-bogofilter}, it is recommended
23478 that you use @code{'(ham spam-use-bogofilter)}.  Everything will work
23479 the same way, we promise.
23480 @end defvar
23481
23482 @defvar spam-bogofilter-database-directory
23483
23484 This is the directory where Bogofilter will store its databases.  It
23485 is not specified by default, so Bogofilter will use its own default
23486 database directory.
23487
23488 @end defvar
23489
23490 The Bogofilter mail classifier is similar to @command{ifile} in intent and
23491 purpose.  A ham and a spam processor are provided, plus the
23492 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
23493 variables to indicate to spam-split that Bogofilter should either be
23494 used, or has already been used on the article.  The 0.9.2.1 version of
23495 Bogofilter was used to test this functionality.
23496
23497 @node ifile spam filtering
23498 @subsubsection ifile spam filtering
23499 @cindex spam filtering
23500 @cindex ifile, spam filtering
23501 @cindex spam
23502
23503 @defvar spam-use-ifile
23504
23505 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
23506 statistical analyzer similar to Bogofilter.
23507
23508 @end defvar
23509
23510 @defvar spam-ifile-all-categories
23511
23512 Enable this variable if you want @code{spam-use-ifile} to give you all
23513 the ifile categories, not just spam/non-spam.  If you use this, make
23514 sure you train ifile as described in its documentation.
23515
23516 @end defvar
23517
23518 @defvar spam-ifile-spam-category
23519
23520 This is the category of spam messages as far as ifile is concerned.
23521 The actual string used is irrelevant, but you probably want to leave
23522 the default value of @samp{spam}.
23523 @end defvar
23524
23525 @defvar spam-ifile-database-path
23526
23527 This is the filename for the ifile database.  It is not specified by
23528 default, so ifile will use its own default database name.
23529
23530 @end defvar
23531
23532 The ifile mail classifier is similar to Bogofilter in intent and
23533 purpose.  A ham and a spam processor are provided, plus the
23534 @code{spam-use-ifile} variable to indicate to spam-split that ifile
23535 should be used.  The 1.2.1 version of ifile was used to test this
23536 functionality.
23537
23538 @node spam-stat spam filtering
23539 @subsubsection spam-stat spam filtering
23540 @cindex spam filtering
23541 @cindex spam-stat, spam filtering
23542 @cindex spam-stat
23543 @cindex spam
23544
23545 @xref{Filtering Spam Using Statistics with spam-stat}.
23546
23547 @defvar spam-use-stat
23548
23549 Enable this variable if you want @code{spam-split} to use
23550 spam-stat.el, an Emacs Lisp statistical analyzer.
23551
23552 @end defvar
23553
23554 @defvar gnus-group-spam-exit-processor-stat
23555 Add this symbol to a group's @code{spam-process} parameter by
23556 customizing the group parameters or the
23557 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23558 added to a group's @code{spam-process} parameter, the spam-marked
23559 articles will be added to the spam-stat database of spam messages.
23560
23561 @emph{WARNING} 
23562
23563 Instead of the obsolete
23564 @code{gnus-group-spam-exit-processor-stat}, it is recommended
23565 that you use @code{'(spam spam-use-stat)}.  Everything will work
23566 the same way, we promise.
23567 @end defvar
23568
23569 @defvar gnus-group-ham-exit-processor-stat
23570 Add this symbol to a group's @code{spam-process} parameter by
23571 customizing the group parameters or the
23572 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23573 added to a group's @code{spam-process} parameter, the ham-marked
23574 articles in @emph{ham} groups will be added to the spam-stat database
23575 of non-spam messages.  Note that this ham processor has no effect in
23576 @emph{spam} or @emph{unclassified} groups.
23577
23578 @emph{WARNING} 
23579
23580 Instead of the obsolete
23581 @code{gnus-group-ham-exit-processor-stat}, it is recommended
23582 that you use @code{'(ham spam-use-stat)}.  Everything will work
23583 the same way, we promise.
23584 @end defvar
23585
23586 This enables @file{spam.el} to cooperate with @file{spam-stat.el}.
23587 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
23588 which unlike ifile or Bogofilter does not require external programs.
23589 A spam and a ham processor, and the @code{spam-use-stat} variable for
23590 @code{spam-split} are provided.
23591
23592 @node SpamOracle
23593 @subsubsection Using SpamOracle with Gnus
23594 @cindex spam filtering
23595 @cindex SpamOracle
23596 @cindex spam
23597
23598 An easy way to filter out spam is to use SpamOracle.  SpamOracle is an
23599 statistical mail filtering tool written by Xavier Leroy and needs to be
23600 installed separately.
23601
23602 There are several ways to use SpamOracle with Gnus.  In all cases, your
23603 mail is piped through SpamOracle in its @emph{mark} mode.  SpamOracle will
23604 then enter an @samp{X-Spam} header indicating whether it regards the
23605 mail as a spam mail or not.
23606
23607 One possibility is to run SpamOracle as a @code{:prescript} from the
23608 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
23609 the advantage that the user can see the @emph{X-Spam} headers.
23610
23611 The easiest method is to make @file{spam.el} (@pxref{Filtering Spam
23612 Using The Spam ELisp Package}) call SpamOracle.
23613
23614 @vindex spam-use-spamoracle
23615 To enable SpamOracle usage by @file{spam.el}, set the variable
23616 @code{spam-use-spamoracle} to @code{t} and configure the
23617 @code{nnmail-split-fancy} or @code{nnimap-split-fancy} as described in
23618 the section @xref{Filtering Spam Using The Spam ELisp Package}.  In
23619 this example the @samp{INBOX} of an nnimap server is filtered using
23620 SpamOracle.  Mails recognized as spam mails will be moved to
23621 @code{spam-split-group}, @samp{Junk} in this case.  Ham messages stay
23622 in @samp{INBOX}:
23623
23624 @example
23625 (setq spam-use-spamoracle t
23626       spam-split-group "Junk"
23627       nnimap-split-inbox '("INBOX")
23628       nnimap-split-rule 'nnimap-split-fancy
23629       nnimap-split-fancy '(| (: spam-split) "INBOX"))
23630 @end example
23631
23632 @defvar spam-use-spamoracle
23633 Set to @code{t} if you want Gnus to enable spam filtering using
23634 SpamOracle.
23635 @end defvar
23636
23637 @defvar spam-spamoracle-binary
23638 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
23639 user's PATH.  Using the variable @code{spam-spamoracle-binary}, this
23640 can be customized.
23641 @end defvar
23642
23643 @defvar spam-spamoracle-database
23644 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
23645 store its analyses.  This is controlled by the variable
23646 @code{spam-spamoracle-database} which defaults to @code{nil}.  That means
23647 the default SpamOracle database will be used.  In case you want your
23648 database to live somewhere special, set
23649 @code{spam-spamoracle-database} to this path.
23650 @end defvar
23651
23652 SpamOracle employs a statistical algorithm to determine whether a
23653 message is spam or ham.  In order to get good results, meaning few
23654 false hits or misses, SpamOracle needs training.  SpamOracle learns the
23655 characteristics of your spam mails.  Using the @emph{add} mode
23656 (training mode) one has to feed good (ham) and spam mails to
23657 SpamOracle.  This can be done by pressing @kbd{|} in the Summary buffer
23658 and pipe the mail to a SpamOracle process or using @file{spam.el}'s
23659 spam- and ham-processors, which is much more convenient.  For a
23660 detailed description of spam- and ham-processors, @xref{Filtering Spam
23661 Using The Spam ELisp Package}.
23662
23663 @defvar gnus-group-spam-exit-processor-spamoracle
23664 Add this symbol to a group's @code{spam-process} parameter by
23665 customizing the group parameter or the
23666 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
23667 to a group's @code{spam-process} parameter, spam-marked articles will be
23668 sent to SpamOracle as spam samples.
23669
23670 @emph{WARNING} 
23671
23672 Instead of the obsolete
23673 @code{gnus-group-spam-exit-processor-spamoracle}, it is recommended
23674 that you use @code{'(spam spam-use-spamoracle)}.  Everything will work
23675 the same way, we promise.
23676 @end defvar
23677
23678 @defvar gnus-group-ham-exit-processor-spamoracle
23679 Add this symbol to a group's @code{spam-process} parameter by
23680 customizing the group parameter or the
23681 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
23682 to a group's @code{spam-process} parameter, the ham-marked articles in
23683 @emph{ham} groups will be sent to the SpamOracle as samples of ham
23684 messages.  Note that this ham processor has no effect in @emph{spam} or
23685 @emph{unclassified} groups.
23686
23687 @emph{WARNING} 
23688
23689 Instead of the obsolete
23690 @code{gnus-group-ham-exit-processor-spamoracle}, it is recommended
23691 that you use @code{'(ham spam-use-spamoracle)}.  Everything will work
23692 the same way, we promise.
23693 @end defvar
23694
23695 @emph{Example:} These are the Group Parameters of a group that has been
23696 classified as a ham group, meaning that it should only contain ham
23697 messages.
23698 @example
23699  ((spam-contents gnus-group-spam-classification-ham)
23700   (spam-process ((ham spam-use-spamoracle)
23701                  (spam spam-use-spamoracle))))
23702 @end example
23703 For this group the @code{spam-use-spamoracle} is installed for both
23704 ham and spam processing.  If the group contains spam message
23705 (e.g. because SpamOracle has not had enough sample messages yet) and
23706 the user marks some messages as spam messages, these messages will be
23707 processed by SpamOracle.  The processor sends the messages to
23708 SpamOracle as new samples for spam.
23709
23710 @node Extending the Spam ELisp package
23711 @subsubsection Extending the Spam ELisp package
23712 @cindex spam filtering
23713 @cindex spam elisp package, extending
23714 @cindex extending the spam elisp package
23715
23716 Say you want to add a new back end called blackbox.  For filtering
23717 incoming mail, provide the following:
23718
23719 @enumerate
23720
23721 @item
23722 code
23723
23724 @lisp
23725 (defvar spam-use-blackbox nil
23726   "True if blackbox should be used.")
23727 @end lisp
23728
23729 Add
23730 @example
23731     (spam-use-blackbox   . spam-check-blackbox)
23732 @end example
23733 to @code{spam-list-of-checks}.
23734
23735 Add
23736 @example
23737     (gnus-group-ham-exit-processor-blackbox     ham spam-use-blackbox)
23738     (gnus-group-spam-exit-processor-blackbox    spam spam-use-blackbox)
23739 @end example
23740 to @code{spam-list-of-processors}.
23741
23742 Add
23743 @example
23744     (spam-use-blackbox  spam-blackbox-register-routine
23745                  nil
23746                  spam-blackbox-unregister-routine
23747                  nil)
23748 @end example
23749 to @code{spam-registration-functions}.  Write the register/unregister
23750 routines using the bogofilter register/unregister routines as a
23751 start, or other restister/unregister routines more appropriate to
23752 Blackbox.
23753
23754 @item
23755 functionality
23756
23757 Write the @code{spam-check-blackbox} function.  It should return
23758 @samp{nil} or @code{spam-split-group}, observing the other
23759 conventions.  See the existing @code{spam-check-*} functions for
23760 examples of what you can do, and stick to the template unless you
23761 fully understand the reasons why you aren't.
23762
23763 Make sure to add @code{spam-use-blackbox} to
23764 @code{spam-list-of-statistical-checks} if Blackbox is a statistical
23765 mail analyzer that needs the full message body to operate.
23766
23767 @end enumerate
23768
23769 For processing spam and ham messages, provide the following:
23770
23771 @enumerate
23772
23773 @item
23774 code
23775
23776 Note you don't have to provide a spam or a ham processor.  Only
23777 provide them if Blackbox supports spam or ham processing.
23778
23779 Also, ham and spam processors are being phased out as single
23780 variables.  Instead the form @code{'(spam spam-use-blackbox)} or 
23781 @code{'(ham spam-use-blackbox)} is favored.  For now, spam/ham
23782 processor variables are still around but they won't be for long.
23783
23784 @lisp
23785 (defvar gnus-group-spam-exit-processor-blackbox "blackbox-spam"
23786   "The Blackbox summary exit spam processor.
23787 Only applicable to spam groups.")
23788
23789 (defvar gnus-group-ham-exit-processor-blackbox "blackbox-ham"
23790   "The whitelist summary exit ham processor.
23791 Only applicable to non-spam (unclassified and ham) groups.")
23792
23793 @end lisp
23794
23795 @item
23796 Gnus parameters
23797
23798 Add
23799 @example
23800                    (const :tag "Spam: Blackbox"   (spam spam-use-blackbox))
23801                    (const :tag "Ham: Blackbox"    (ham spam-use-blackbox))
23802 @end example
23803 to the @code{spam-process} group parameter in @code{gnus.el}.  Make
23804 sure you do it twice, once for the parameter and once for the
23805 variable customization.
23806
23807 Add
23808 @example
23809           (variable-item spam-use-blackbox)
23810 @end example
23811 to the @code{spam-autodetect-methods} group parameter in
23812 @code{gnus.el}.
23813
23814 @end enumerate
23815
23816
23817 @node Filtering Spam Using Statistics with spam-stat
23818 @subsection Filtering Spam Using Statistics with spam-stat
23819 @cindex Paul Graham
23820 @cindex Graham, Paul
23821 @cindex naive Bayesian spam filtering
23822 @cindex Bayesian spam filtering, naive
23823 @cindex spam filtering, naive Bayesian
23824
23825 Paul Graham has written an excellent essay about spam filtering using
23826 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
23827 Spam}.  In it he describes the inherent deficiency of rule-based
23828 filtering as used by SpamAssassin, for example: Somebody has to write
23829 the rules, and everybody else has to install these rules.  You are
23830 always late.  It would be much better, he argues, to filter mail based
23831 on whether it somehow resembles spam or non-spam.  One way to measure
23832 this is word distribution.  He then goes on to describe a solution
23833 that checks whether a new mail resembles any of your other spam mails
23834 or not.
23835
23836 The basic idea is this:  Create a two collections of your mail, one
23837 with spam, one with non-spam.  Count how often each word appears in
23838 either collection, weight this by the total number of mails in the
23839 collections, and store this information in a dictionary.  For every
23840 word in a new mail, determine its probability to belong to a spam or a
23841 non-spam mail.  Use the 15 most conspicuous words, compute the total
23842 probability of the mail being spam.  If this probability is higher
23843 than a certain threshold, the mail is considered to be spam.
23844
23845 Gnus supports this kind of filtering.  But it needs some setting up.
23846 First, you need two collections of your mail, one with spam, one with
23847 non-spam.  Then you need to create a dictionary using these two
23848 collections, and save it.  And last but not least, you need to use
23849 this dictionary in your fancy mail splitting rules.
23850
23851 @menu
23852 * Creating a spam-stat dictionary::
23853 * Splitting mail using spam-stat::
23854 * Low-level interface to the spam-stat dictionary::
23855 @end menu
23856
23857 @node Creating a spam-stat dictionary
23858 @subsubsection Creating a spam-stat dictionary
23859
23860 Before you can begin to filter spam based on statistics, you must
23861 create these statistics based on two mail collections, one with spam,
23862 one with non-spam.  These statistics are then stored in a dictionary
23863 for later use.  In order for these statistics to be meaningful, you
23864 need several hundred emails in both collections.
23865
23866 Gnus currently supports only the nnml back end for automated dictionary
23867 creation.  The nnml back end stores all mails in a directory, one file
23868 per mail.  Use the following:
23869
23870 @defun spam-stat-process-spam-directory
23871 Create spam statistics for every file in this directory.  Every file
23872 is treated as one spam mail.
23873 @end defun
23874
23875 @defun spam-stat-process-non-spam-directory
23876 Create non-spam statistics for every file in this directory.  Every
23877 file is treated as one non-spam mail.
23878 @end defun
23879
23880 Usually you would call @code{spam-stat-process-spam-directory} on a
23881 directory such as @file{~/Mail/mail/spam} (this usually corresponds
23882 the the group @samp{nnml:mail.spam}), and you would call
23883 @code{spam-stat-process-non-spam-directory} on a directory such as
23884 @file{~/Mail/mail/misc} (this usually corresponds the the group
23885 @samp{nnml:mail.misc}).
23886
23887 When you are using @acronym{IMAP}, you won't have the mails available
23888 locally, so that will not work.  One solution is to use the Gnus Agent
23889 to cache the articles.  Then you can use directories such as
23890 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
23891 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
23892
23893 @defvar spam-stat
23894 This variable holds the hash-table with all the statistics---the
23895 dictionary we have been talking about.  For every word in either
23896 collection, this hash-table stores a vector describing how often the
23897 word appeared in spam and often it appeared in non-spam mails.
23898 @end defvar
23899
23900 If you want to regenerate the statistics from scratch, you need to
23901 reset the dictionary.
23902
23903 @defun spam-stat-reset
23904 Reset the @code{spam-stat} hash-table, deleting all the statistics.
23905 @end defun
23906
23907 When you are done, you must save the dictionary.  The dictionary may
23908 be rather large.  If you will not update the dictionary incrementally
23909 (instead, you will recreate it once a month, for example), then you
23910 can reduce the size of the dictionary by deleting all words that did
23911 not appear often enough or that do not clearly belong to only spam or
23912 only non-spam mails.
23913
23914 @defun spam-stat-reduce-size
23915 Reduce the size of the dictionary.  Use this only if you do not want
23916 to update the dictionary incrementally.
23917 @end defun
23918
23919 @defun spam-stat-save
23920 Save the dictionary.
23921 @end defun
23922
23923 @defvar spam-stat-file
23924 The filename used to store the dictionary.  This defaults to
23925 @file{~/.spam-stat.el}.
23926 @end defvar
23927
23928 @node Splitting mail using spam-stat
23929 @subsubsection Splitting mail using spam-stat
23930
23931 In order to use @code{spam-stat} to split your mail, you need to add the
23932 following to your @file{~/.gnus.el} file:
23933
23934 @lisp
23935 (require 'spam-stat)
23936 (spam-stat-load)
23937 @end lisp
23938
23939 This will load the necessary Gnus code, and the dictionary you
23940 created.
23941
23942 Next, you need to adapt your fancy splitting rules:  You need to
23943 determine how to use @code{spam-stat}.  The following examples are for
23944 the nnml back end.  Using the nnimap back end works just as well.  Just
23945 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
23946
23947 In the simplest case, you only have two groups, @samp{mail.misc} and
23948 @samp{mail.spam}.  The following expression says that mail is either
23949 spam or it should go into @samp{mail.misc}.  If it is spam, then
23950 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
23951
23952 @lisp
23953 (setq nnmail-split-fancy
23954       `(| (: spam-stat-split-fancy)
23955           "mail.misc"))
23956 @end lisp
23957
23958 @defvar spam-stat-split-fancy-spam-group
23959 The group to use for spam.  Default is @samp{mail.spam}.
23960 @end defvar
23961
23962 If you also filter mail with specific subjects into other groups, use
23963 the following expression.  Only mails not matching the regular
23964 expression are considered potential spam.
23965
23966 @lisp
23967 (setq nnmail-split-fancy
23968       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
23969           (: spam-stat-split-fancy)
23970           "mail.misc"))
23971 @end lisp
23972
23973 If you want to filter for spam first, then you must be careful when
23974 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
23975 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
23976 non-spam, therefore both should be in your collection of non-spam
23977 mails, when creating the dictionary!
23978
23979 @lisp
23980 (setq nnmail-split-fancy
23981       `(| (: spam-stat-split-fancy)
23982           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23983           "mail.misc"))
23984 @end lisp
23985
23986 You can combine this with traditional filtering.  Here, we move all
23987 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
23988 @code{spam-stat-split-fancy} will never see them, the mails in
23989 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
23990 nor in your collection of non-spam mails, when creating the
23991 dictionary!
23992
23993 @lisp
23994 (setq nnmail-split-fancy
23995       `(| ("Content-Type" "text/html" "mail.spam.filtered")
23996           (: spam-stat-split-fancy)
23997           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23998           "mail.misc"))
23999 @end lisp
24000
24001
24002 @node Low-level interface to the spam-stat dictionary
24003 @subsubsection Low-level interface to the spam-stat dictionary
24004
24005 The main interface to using @code{spam-stat}, are the following functions:
24006
24007 @defun spam-stat-buffer-is-spam
24008 Called in a buffer, that buffer is considered to be a new spam mail.
24009 Use this for new mail that has not been processed before.
24010 @end defun
24011
24012 @defun spam-stat-buffer-is-no-spam
24013 Called in a buffer, that buffer is considered to be a new non-spam
24014 mail.  Use this for new mail that has not been processed before.
24015 @end defun
24016
24017 @defun spam-stat-buffer-change-to-spam
24018 Called in a buffer, that buffer is no longer considered to be normal
24019 mail but spam.  Use this to change the status of a mail that has
24020 already been processed as non-spam.
24021 @end defun
24022
24023 @defun spam-stat-buffer-change-to-non-spam
24024 Called in a buffer, that buffer is no longer considered to be spam but
24025 normal mail.  Use this to change the status of a mail that has already
24026 been processed as spam.
24027 @end defun
24028
24029 @defun spam-stat-save
24030 Save the hash table to the file.  The filename used is stored in the
24031 variable @code{spam-stat-file}.
24032 @end defun
24033
24034 @defun spam-stat-load
24035 Load the hash table from a file.  The filename used is stored in the
24036 variable @code{spam-stat-file}.
24037 @end defun
24038
24039 @defun spam-stat-score-word
24040 Return the spam score for a word.
24041 @end defun
24042
24043 @defun spam-stat-score-buffer
24044 Return the spam score for a buffer.
24045 @end defun
24046
24047 @defun spam-stat-split-fancy
24048 Use this function for fancy mail splitting.  Add the rule @samp{(:
24049 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
24050 @end defun
24051
24052 Make sure you load the dictionary before using it.  This requires the
24053 following in your @file{~/.gnus.el} file:
24054
24055 @lisp
24056 (require 'spam-stat)
24057 (spam-stat-load)
24058 @end lisp
24059
24060 Typical test will involve calls to the following functions:
24061
24062 @smallexample
24063 Reset: (setq spam-stat (make-hash-table :test 'equal))
24064 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
24065 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
24066 Save table: (spam-stat-save)
24067 File size: (nth 7 (file-attributes spam-stat-file))
24068 Number of words: (hash-table-count spam-stat)
24069 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
24070 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
24071 Reduce table size: (spam-stat-reduce-size)
24072 Save table: (spam-stat-save)
24073 File size: (nth 7 (file-attributes spam-stat-file))
24074 Number of words: (hash-table-count spam-stat)
24075 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
24076 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
24077 @end smallexample
24078
24079 Here is how you would create your dictionary:
24080
24081 @smallexample
24082 Reset: (setq spam-stat (make-hash-table :test 'equal))
24083 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
24084 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
24085 Repeat for any other non-spam group you need...
24086 Reduce table size: (spam-stat-reduce-size)
24087 Save table: (spam-stat-save)
24088 @end smallexample
24089
24090 @node Other modes
24091 @section Interaction with other modes
24092
24093 @subsection Dired
24094 @cindex dired
24095
24096 @code{gnus-dired-minor-mode} provided some useful functions for dired
24097 buffers.  It is enabled with
24098 @lisp
24099 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
24100 @end lisp
24101
24102 @table @kbd
24103 @item C-c C-m C-a
24104 @findex gnus-dired-attach
24105 Send dired's marked files as an attachment (@code{gnus-dired-attach}).
24106 You will be prompted for a message buffer.
24107
24108 @item C-c C-m C-l
24109 @findex gnus-dired-find-file-mailcap
24110 Visit a file according to the appropriate mailcap entry
24111 (@code{gnus-dired-find-file-mailcap}).  With prefix, open file in a new
24112 buffer.
24113
24114 @item C-c C-m C-p
24115 @findex gnus-dired-print
24116 Print file according to the mailcap entry (@code{gnus-dired-print}).  If
24117 there is no print command, print in a PostScript image.
24118 @end table
24119
24120 @node Various Various
24121 @section Various Various
24122 @cindex mode lines
24123 @cindex highlights
24124
24125 @table @code
24126
24127 @item gnus-home-directory
24128 @vindex gnus-home-directory
24129 All Gnus file and directory variables will be initialized from this
24130 variable, which defaults to @file{~/}.
24131
24132 @item gnus-directory
24133 @vindex gnus-directory
24134 Most Gnus storage file and directory variables will be initialized from
24135 this variable, which defaults to the @env{SAVEDIR} environment
24136 variable, or @file{~/News/} if that variable isn't set.
24137
24138 Note that Gnus is mostly loaded when the @file{~/.gnus.el} file is read.
24139 This means that other directory variables that are initialized from this
24140 variable won't be set properly if you set this variable in
24141 @file{~/.gnus.el}.  Set this variable in @file{.emacs} instead.
24142
24143 @item gnus-default-directory
24144 @vindex gnus-default-directory
24145 Not related to the above variable at all---this variable says what the
24146 default directory of all Gnus buffers should be.  If you issue commands
24147 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
24148 default directory.  If this variable is @code{nil} (which is the
24149 default), the default directory will be the default directory of the
24150 buffer you were in when you started Gnus.
24151
24152 @item gnus-verbose
24153 @vindex gnus-verbose
24154 This variable is an integer between zero and ten.  The higher the value,
24155 the more messages will be displayed.  If this variable is zero, Gnus
24156 will never flash any messages, if it is seven (which is the default),
24157 most important messages will be shown, and if it is ten, Gnus won't ever
24158 shut up, but will flash so many messages it will make your head swim.
24159
24160 @item gnus-verbose-backends
24161 @vindex gnus-verbose-backends
24162 This variable works the same way as @code{gnus-verbose}, but it applies
24163 to the Gnus back ends instead of Gnus proper.
24164
24165 @item nnheader-max-head-length
24166 @vindex nnheader-max-head-length
24167 When the back ends read straight heads of articles, they all try to read
24168 as little as possible.  This variable (default 4096) specifies
24169 the absolute max length the back ends will try to read before giving up
24170 on finding a separator line between the head and the body.  If this
24171 variable is @code{nil}, there is no upper read bound.  If it is
24172 @code{t}, the back ends won't try to read the articles piece by piece,
24173 but read the entire articles.  This makes sense with some versions of
24174 @code{ange-ftp} or @code{efs}.
24175
24176 @item nnheader-head-chop-length
24177 @vindex nnheader-head-chop-length
24178 This variable (default 2048) says how big a piece of each article to
24179 read when doing the operation described above.
24180
24181 @item nnheader-file-name-translation-alist
24182 @vindex nnheader-file-name-translation-alist
24183 @cindex file names
24184 @cindex invalid characters in file names
24185 @cindex characters in file names
24186 This is an alist that says how to translate characters in file names.
24187 For instance, if @samp{:} is invalid as a file character in file names
24188 on your system (you OS/2 user you), you could say something like:
24189
24190 @lisp
24191 @group
24192 (setq nnheader-file-name-translation-alist
24193       '((?: . ?_)))
24194 @end group
24195 @end lisp
24196
24197 In fact, this is the default value for this variable on OS/2 and MS
24198 Windows (phooey) systems.
24199
24200 @item gnus-hidden-properties
24201 @vindex gnus-hidden-properties
24202 This is a list of properties to use to hide ``invisible'' text.  It is
24203 @code{(invisible t intangible t)} by default on most systems, which
24204 makes invisible text invisible and intangible.
24205
24206 @item gnus-parse-headers-hook
24207 @vindex gnus-parse-headers-hook
24208 A hook called before parsing headers.  It can be used, for instance, to
24209 gather statistics on the headers fetched, or perhaps you'd like to prune
24210 some headers.  I don't see why you'd want that, though.
24211
24212 @item gnus-shell-command-separator
24213 @vindex gnus-shell-command-separator
24214 String used to separate two shell commands.  The default is @samp{;}.
24215
24216 @item gnus-invalid-group-regexp
24217 @vindex gnus-invalid-group-regexp
24218
24219 Regexp to match ``invalid'' group names when querying user for a group
24220 name.  The default value catches some @strong{really} invalid group
24221 names who could possibly mess up Gnus internally (like allowing
24222 @samp{:} in a group name, which is normally used to delimit method and
24223 group).
24224
24225 @acronym{IMAP} users might want to allow @samp{/} in group names though.
24226
24227
24228 @end table
24229
24230 @node The End
24231 @chapter The End
24232
24233 Well, that's the manual---you can get on with your life now.  Keep in
24234 touch.  Say hello to your cats from me.
24235
24236 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
24237
24238 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
24239
24240 @quotation
24241 @strong{Te Deum}
24242
24243 @sp 1
24244 Not because of victories @*
24245 I sing,@*
24246 having none,@*
24247 but for the common sunshine,@*
24248 the breeze,@*
24249 the largess of the spring.
24250
24251 @sp 1
24252 Not for victory@*
24253 but for the day's work done@*
24254 as well as I was able;@*
24255 not for a seat upon the dais@*
24256 but at the common table.@*
24257 @end quotation
24258
24259
24260 @node Appendices
24261 @chapter Appendices
24262
24263 @menu
24264 * XEmacs::                      Requirements for installing under XEmacs.
24265 * History::                     How Gnus got where it is today.
24266 * On Writing Manuals::          Why this is not a beginner's guide.
24267 * Terminology::                 We use really difficult, like, words here.
24268 * Customization::               Tailoring Gnus to your needs.
24269 * Troubleshooting::             What you might try if things do not work.
24270 * Gnus Reference Guide::        Rilly, rilly technical stuff.
24271 * Emacs for Heathens::          A short introduction to Emacsian terms.
24272 * Frequently Asked Questions::  The Gnus FAQ
24273 @end menu
24274
24275
24276 @node XEmacs
24277 @section XEmacs
24278 @cindex XEmacs
24279 @cindex installing under XEmacs
24280
24281 XEmacs is distributed as a collection of packages.  You should install
24282 whatever packages the Gnus XEmacs package requires.  The current
24283 requirements are @samp{gnus}, @samp{mail-lib}, @samp{xemacs-base},
24284 @samp{eterm}, @samp{sh-script}, @samp{net-utils}, @samp{os-utils},
24285 @samp{dired}, @samp{mh-e}, @samp{sieve}, @samp{ps-print}, @samp{w3},
24286 @samp{pgg}, @samp{mailcrypt}, @samp{ecrypto}, and @samp{sasl}.
24287
24288
24289 @node History
24290 @section History
24291
24292 @cindex history
24293 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
24294 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
24295
24296 If you want to investigate the person responsible for this outrage,
24297 you can point your (feh!) web browser to
24298 @uref{http://quimby.gnus.org/}.  This is also the primary
24299 distribution point for the new and spiffy versions of Gnus, and is
24300 known as The Site That Destroys Newsrcs And Drives People Mad.
24301
24302 During the first extended alpha period of development, the new Gnus was
24303 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
24304 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
24305 (Besides, the ``Gnus'' in this abbreviation should probably be
24306 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
24307 appropriate name, don't you think?)
24308
24309 In any case, after spending all that energy on coming up with a new and
24310 spunky name, we decided that the name was @emph{too} spunky, so we
24311 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
24312 ``@sc{gnus}''.  New vs. old.
24313
24314 @menu
24315 * Gnus Versions::               What Gnus versions have been released.
24316 * Other Gnus Versions::         Other Gnus versions that also have been released.
24317 * Why?::                        What's the point of Gnus?
24318 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
24319 * Conformity::                  Gnus tries to conform to all standards.
24320 * Emacsen::                     Gnus can be run on a few modern Emacsen.
24321 * Gnus Development::            How Gnus is developed.
24322 * Contributors::                Oodles of people.
24323 * New Features::                Pointers to some of the new stuff in Gnus.
24324 @end menu
24325
24326
24327 @node Gnus Versions
24328 @subsection Gnus Versions
24329 @cindex ding Gnus
24330 @cindex September Gnus
24331 @cindex Red Gnus
24332 @cindex Quassia Gnus
24333 @cindex Pterodactyl Gnus
24334 @cindex Oort Gnus
24335 @cindex No Gnus
24336 @cindex Gnus versions
24337
24338 The first ``proper'' release of Gnus 5 was done in November 1995 when it
24339 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
24340 plus 15 Gnus 5.0 releases).
24341
24342 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
24343 releases)) was released under the name ``Gnus 5.2'' (40 releases).
24344
24345 On July 28th 1996 work on Red Gnus was begun, and it was released on
24346 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
24347
24348 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
24349 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
24350
24351 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
24352 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
24353 1999.
24354
24355 On the 26th of October 2000, Oort Gnus was begun.
24356
24357 If you happen upon a version of Gnus that has a prefixed name --
24358 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
24359 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
24360 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
24361 run.  Walk away, calmly, until you're out of its reach.  Find a proper
24362 released version of Gnus and snuggle up to that instead.
24363
24364
24365 @node Other Gnus Versions
24366 @subsection Other Gnus Versions
24367 @cindex Semi-gnus
24368
24369 In addition to the versions of Gnus which have had their releases
24370 coordinated by Lars, one major development has been Semi-gnus from
24371 Japan.  It's based on a library called @acronym{SEMI}, which provides
24372 @acronym{MIME} capabilities.
24373
24374 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
24375 Collectively, they are called ``Semi-gnus'', and different strains are
24376 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
24377 @acronym{MIME} and multilingualization things, especially important for
24378 Japanese users.
24379
24380
24381 @node Why?
24382 @subsection Why?
24383
24384 What's the point of Gnus?
24385
24386 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
24387 newsreader, that lets you do anything you can think of.  That was my
24388 original motivation, but while working on Gnus, it has become clear to
24389 me that this generation of newsreaders really belong in the stone age.
24390 Newsreaders haven't developed much since the infancy of the net.  If the
24391 volume continues to rise with the current rate of increase, all current
24392 newsreaders will be pretty much useless.  How do you deal with
24393 newsgroups that have thousands of new articles each day?  How do you
24394 keep track of millions of people who post?
24395
24396 Gnus offers no real solutions to these questions, but I would very much
24397 like to see Gnus being used as a testing ground for new methods of
24398 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
24399 to separate the newsreader from the back ends, Gnus now offers a simple
24400 interface for anybody who wants to write new back ends for fetching mail
24401 and news from different sources.  I have added hooks for customizations
24402 everywhere I could imagine it being useful.  By doing so, I'm inviting
24403 every one of you to explore and invent.
24404
24405 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
24406 @kbd{C-u 100 M-x all-hail-xemacs}.
24407
24408
24409 @node Compatibility
24410 @subsection Compatibility
24411
24412 @cindex compatibility
24413 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
24414 bindings have been kept.  More key bindings have been added, of course,
24415 but only in one or two obscure cases have old bindings been changed.
24416
24417 Our motto is:
24418 @quotation
24419 @cartouche
24420 @center In a cloud bones of steel.
24421 @end cartouche
24422 @end quotation
24423
24424 All commands have kept their names.  Some internal functions have changed
24425 their names.
24426
24427 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
24428 Articles}.
24429
24430 One major compatibility question is the presence of several summary
24431 buffers.  All variables relevant while reading a group are
24432 buffer-local to the summary buffer they belong in.  Although many
24433 important variables have their values copied into their global
24434 counterparts whenever a command is executed in the summary buffer, this
24435 change might lead to incorrect values being used unless you are careful.
24436
24437 All code that relies on knowledge of @sc{gnus} internals will probably
24438 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
24439 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
24440 maintains a hash table that points to the entries in this alist (which
24441 speeds up many functions), and changing the alist directly will lead to
24442 peculiar results.
24443
24444 @cindex hilit19
24445 @cindex highlighting
24446 Old hilit19 code does not work at all.  In fact, you should probably
24447 remove all hilit code from all Gnus hooks
24448 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
24449 Gnus provides various integrated functions for highlighting.  These are
24450 faster and more accurate.  To make life easier for everybody, Gnus will
24451 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
24452 Away!
24453
24454 Packages like @code{expire-kill} will no longer work.  As a matter of
24455 fact, you should probably remove all old @sc{gnus} packages (and other
24456 code) when you start using Gnus.  More likely than not, Gnus already
24457 does what you have written code to make @sc{gnus} do.  (Snicker.)
24458
24459 Even though old methods of doing things are still supported, only the
24460 new methods are documented in this manual.  If you detect a new method of
24461 doing something while reading this manual, that does not mean you have
24462 to stop doing it the old way.
24463
24464 Gnus understands all @sc{gnus} startup files.
24465
24466 @kindex M-x gnus-bug
24467 @findex gnus-bug
24468 @cindex reporting bugs
24469 @cindex bugs
24470 Overall, a casual user who hasn't written much code that depends on
24471 @sc{gnus} internals should suffer no problems.  If problems occur,
24472 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
24473
24474 @vindex gnus-bug-create-help-buffer
24475 If you are in the habit of sending bug reports @emph{very} often, you
24476 may find the helpful help buffer annoying after a while.  If so, set
24477 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
24478 up at you.
24479
24480
24481 @node Conformity
24482 @subsection Conformity
24483
24484 No rebels without a clue here, ma'am.  We conform to all standards known
24485 to (wo)man.  Except for those standards and/or conventions we disagree
24486 with, of course.
24487
24488 @table @strong
24489
24490 @item RFC (2)822
24491 @cindex RFC 822
24492 @cindex RFC 2822
24493 There are no known breaches of this standard.
24494
24495 @item RFC 1036
24496 @cindex RFC 1036
24497 There are no known breaches of this standard, either.
24498
24499 @item Son-of-RFC 1036
24500 @cindex Son-of-RFC 1036
24501 We do have some breaches to this one.
24502
24503 @table @emph
24504
24505 @item X-Newsreader
24506 @itemx User-Agent
24507 These are considered to be ``vanity headers'', while I consider them
24508 to be consumer information.  After seeing so many badly formatted
24509 articles coming from @code{tin} and @code{Netscape} I know not to use
24510 either of those for posting articles.  I would not have known that if
24511 it wasn't for the @code{X-Newsreader} header.
24512 @end table
24513
24514 @item USEFOR
24515 @cindex USEFOR
24516 USEFOR is an IETF working group writing a successor to RFC 1036, based
24517 on Son-of-RFC 1036.  They have produced a number of drafts proposing
24518 various changes to the format of news articles.  The Gnus towers will
24519 look into implementing the changes when the draft is accepted as an RFC.
24520
24521 @item MIME - RFC 2045-2049 etc
24522 @cindex @acronym{MIME}
24523 All the various @acronym{MIME} RFCs are supported.
24524
24525 @item Disposition Notifications - RFC 2298
24526 Message Mode is able to request notifications from the receiver.
24527
24528 @item PGP - RFC 1991 and RFC 2440
24529 @cindex RFC 1991
24530 @cindex RFC 2440
24531 RFC 1991 is the original @acronym{PGP} message specification,
24532 published as an informational RFC.  RFC 2440 was the follow-up, now
24533 called Open PGP, and put on the Standards Track.  Both document a
24534 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
24535 encoding (signing and encryption) and decoding (verification and
24536 decryption).
24537
24538 @item PGP/MIME - RFC 2015/3156
24539 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
24540 1991) describes the @acronym{MIME}-wrapping around the RF 1991/2440 format.
24541 Gnus supports both encoding and decoding.
24542
24543 @item S/MIME - RFC 2633
24544 RFC 2633 describes the @acronym{S/MIME} format.
24545
24546 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
24547 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
24548 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
24549 authentication for @acronym{IMAP}.  RFC 2086 describes access control
24550 lists (ACLs) for @acronym{IMAP}.  RFC 2359 describes a @acronym{IMAP}
24551 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
24552 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
24553 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
24554
24555 @end table
24556
24557 If you ever notice Gnus acting non-compliant with regards to the texts
24558 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
24559 know.
24560
24561
24562 @node Emacsen
24563 @subsection Emacsen
24564 @cindex Emacsen
24565 @cindex XEmacs
24566 @cindex Mule
24567 @cindex Emacs
24568
24569 Gnus should work on:
24570
24571 @itemize @bullet
24572
24573 @item
24574 Emacs 21.1 and up.
24575
24576 @item
24577 XEmacs 21.4 and up.
24578
24579 @end itemize
24580
24581 This Gnus version will absolutely not work on any Emacsen older than
24582 that.  Not reliably, at least.  Older versions of Gnus may work on older
24583 Emacs versions.
24584
24585 There are some vague differences between Gnus on the various
24586 platforms---XEmacs features more graphics (a logo and a toolbar)---but
24587 other than that, things should look pretty much the same under all
24588 Emacsen.
24589
24590
24591 @node Gnus Development
24592 @subsection Gnus Development
24593
24594 Gnus is developed in a two-phased cycle.  The first phase involves much
24595 discussion on the @samp{ding@@gnus.org} mailing list, where people
24596 propose changes and new features, post patches and new back ends.  This
24597 phase is called the @dfn{alpha} phase, since the Gnusae released in this
24598 phase are @dfn{alpha releases}, or (perhaps more commonly in other
24599 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
24600 unstable and should not be used by casual users.  Gnus alpha releases
24601 have names like ``Red Gnus'' and ``Quassia Gnus''.
24602
24603 After futzing around for 50-100 alpha releases, Gnus is declared
24604 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
24605 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
24606 supposed to be able to use these, and these are mostly discussed on the
24607 @samp{gnu.emacs.gnus} newsgroup.
24608
24609 @cindex Incoming*
24610 @vindex mail-source-delete-incoming
24611 Some variable defaults differ between alpha Gnusae and released Gnusae.
24612 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
24613 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
24614 lossage of mail if an alpha release hiccups while handling the mail.
24615
24616 The division of discussion between the ding mailing list and the Gnus
24617 newsgroup is not purely based on publicity concerns.  It's true that
24618 having people write about the horrible things that an alpha Gnus release
24619 can do (sometimes) in a public forum may scare people off, but more
24620 importantly, talking about new experimental features that have been
24621 introduced may confuse casual users.  New features are frequently
24622 introduced, fiddled with, and judged to be found wanting, and then
24623 either discarded or totally rewritten.  People reading the mailing list
24624 usually keep up with these rapid changes, while people on the newsgroup
24625 can't be assumed to do so.
24626
24627
24628
24629 @node Contributors
24630 @subsection Contributors
24631 @cindex contributors
24632
24633 The new Gnus version couldn't have been done without the help of all the
24634 people on the (ding) mailing list.  Every day for over a year I have
24635 gotten billions of nice bug reports from them, filling me with joy,
24636 every single one of them.  Smooches.  The people on the list have been
24637 tried beyond endurance, what with my ``oh, that's a neat idea <type
24638 type>, yup, I'll release it right away <ship off> no wait, that doesn't
24639 work at all <type type>, yup, I'll ship that one off right away <ship
24640 off> no, wait, that absolutely does not work'' policy for releases.
24641 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
24642 ``worser''? ``much worser''?  ``worsest''?)
24643
24644 I would like to take this opportunity to thank the Academy for@dots{}  oops,
24645 wrong show.
24646
24647 @itemize @bullet
24648
24649 @item
24650 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
24651
24652 @item
24653 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
24654 nnwarchive and many, many other things connected with @acronym{MIME} and
24655 other types of en/decoding, as well as general bug fixing, new
24656 functionality and stuff.
24657
24658 @item
24659 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
24660 well as numerous other things).
24661
24662 @item
24663 Luis Fernandes---design and graphics.
24664
24665 @item
24666 Joe Reiss---creator of the smiley faces.
24667
24668 @item
24669 Justin Sheehy---the @acronym{FAQ} maintainer.
24670
24671 @item
24672 Erik Naggum---help, ideas, support, code and stuff.
24673
24674 @item
24675 Wes Hardaker---@file{gnus-picon.el} and the manual section on
24676 @dfn{picons} (@pxref{Picons}).
24677
24678 @item
24679 Kim-Minh Kaplan---further work on the picon code.
24680
24681 @item
24682 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section
24683 (@pxref{GroupLens}).
24684
24685 @item
24686 Sudish Joseph---innumerable bug fixes.
24687
24688 @item
24689 Ilja Weis---@file{gnus-topic.el}.
24690
24691 @item
24692 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
24693
24694 @item
24695 Vladimir Alexiev---the refcard and reference booklets.
24696
24697 @item
24698 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
24699 distribution by Felix Lee and JWZ.
24700
24701 @item
24702 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
24703
24704 @item
24705 Peter Mutsaers---orphan article scoring code.
24706
24707 @item
24708 Ken Raeburn---POP mail support.
24709
24710 @item
24711 Hallvard B Furuseth---various bits and pieces, especially dealing with
24712 .newsrc files.
24713
24714 @item
24715 Brian Edmonds---@file{gnus-bbdb.el}.
24716
24717 @item
24718 David Moore---rewrite of @file{nnvirtual.el} and many other things.
24719
24720 @item
24721 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
24722
24723 @item
24724 François Pinard---many, many interesting and thorough bug reports, as
24725 well as autoconf support.
24726
24727 @end itemize
24728
24729 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
24730 Borges, and Jost Krieger proof-reading parts of the manual.
24731
24732 The following people have contributed many patches and suggestions:
24733
24734 Christopher Davis,
24735 Andrew Eskilsson,
24736 Kai Grossjohann,
24737 Kevin Greiner,
24738 Jesper Harder,
24739 Paul Jarc,
24740 Simon Josefsson,
24741 David KÃ¥gedal,
24742 Richard Pieri,
24743 Fabrice Popineau,
24744 Daniel Quinlan,
24745 Michael Shields,
24746 Reiner Steib,
24747 Jason L. Tibbitts, III,
24748 Jack Vinson,
24749 Katsumi Yamaoka, @c Yamaoka
24750 and
24751 Teodor Zlatanov.
24752
24753 Also thanks to the following for patches and stuff:
24754
24755 Jari Aalto,
24756 Adrian Aichner,
24757 Vladimir Alexiev,
24758 Russ Allbery,
24759 Peter Arius,
24760 Matt Armstrong,
24761 Marc Auslander,
24762 Miles Bader,
24763 Alexei V. Barantsev,
24764 Frank Bennett,
24765 Robert Bihlmeyer,
24766 Chris Bone,
24767 Mark Borges,
24768 Mark Boyns,
24769 Lance A. Brown,
24770 Rob Browning,
24771 Kees de Bruin,
24772 Martin Buchholz,
24773 Joe Buehler,
24774 Kevin Buhr,
24775 Alastair Burt,
24776 Joao Cachopo,
24777 Zlatko Calusic,
24778 Massimo Campostrini,
24779 Castor,
24780 David Charlap,
24781 Dan Christensen,
24782 Kevin Christian,
24783 Jae-you Chung, @c ?
24784 James H. Cloos, Jr.,
24785 Laura Conrad,
24786 Michael R. Cook,
24787 Glenn Coombs,
24788 Andrew J. Cosgriff,
24789 Neil Crellin,
24790 Frank D. Cringle,
24791 Geoffrey T. Dairiki,
24792 Andre Deparade,
24793 Ulrik Dickow,
24794 Dave Disser,
24795 Rui-Tao Dong, @c ?
24796 Joev Dubach,
24797 Michael Welsh Duggan,
24798 Dave Edmondson,
24799 Paul Eggert,
24800 Mark W. Eichin,
24801 Karl Eichwalder,
24802 Enami Tsugutomo, @c Enami
24803 Michael Ernst,
24804 Luc Van Eycken,
24805 Sam Falkner,
24806 Nelson Jose dos Santos Ferreira,
24807 Sigbjorn Finne,
24808 Sven Fischer,
24809 Paul Fisher,
24810 Decklin Foster,
24811 Gary D. Foster,
24812 Paul Franklin,
24813 Guy Geens,
24814 Arne Georg Gleditsch,
24815 David S. Goldberg,
24816 Michelangelo Grigni,
24817 Dale Hagglund,
24818 D. Hall,
24819 Magnus Hammerin,
24820 Kenichi Handa, @c Handa
24821 Raja R. Harinath,
24822 Yoshiki Hayashi, @c Hayashi
24823 P. E. Jareth Hein,
24824 Hisashige Kenji, @c Hisashige
24825 Scott Hofmann,
24826 Marc Horowitz,
24827 Gunnar Horrigmo,
24828 Richard Hoskins,
24829 Brad Howes,
24830 Miguel de Icaza,
24831 François Felix Ingrand,
24832 Tatsuya Ichikawa, @c Ichikawa
24833 Ishikawa Ichiro, @c Ishikawa
24834 Lee Iverson,
24835 Iwamuro Motonori, @c Iwamuro
24836 Rajappa Iyer,
24837 Andreas Jaeger,
24838 Adam P. Jenkins,
24839 Randell Jesup,
24840 Fred Johansen,
24841 Gareth Jones,
24842 Greg Klanderman,
24843 Karl Kleinpaste,
24844 Michael Klingbeil,
24845 Peter Skov Knudsen,
24846 Shuhei Kobayashi, @c Kobayashi
24847 Petr Konecny,
24848 Koseki Yoshinori, @c Koseki
24849 Thor Kristoffersen,
24850 Jens Lautenbacher,
24851 Martin Larose,
24852 Seokchan Lee, @c Lee
24853 Joerg Lenneis,
24854 Carsten Leonhardt,
24855 James LewisMoss,
24856 Christian Limpach,
24857 Markus Linnala,
24858 Dave Love,
24859 Mike McEwan,
24860 Tonny Madsen,
24861 Shlomo Mahlab,
24862 Nat Makarevitch,
24863 Istvan Marko,
24864 David Martin,
24865 Jason R. Mastaler,
24866 Gordon Matzigkeit,
24867 Timo Metzemakers,
24868 Richard Mlynarik,
24869 Lantz Moore,
24870 Morioka Tomohiko, @c Morioka
24871 Erik Toubro Nielsen,
24872 Hrvoje Niksic,
24873 Andy Norman,
24874 Fred Oberhauser,
24875 C. R. Oldham,
24876 Alexandre Oliva,
24877 Ken Olstad,
24878 Masaharu Onishi, @c Onishi
24879 Hideki Ono, @c Ono
24880 Ettore Perazzoli,
24881 William Perry,
24882 Stephen Peters,
24883 Jens-Ulrik Holger Petersen,
24884 Ulrich Pfeifer,
24885 Matt Pharr,
24886 Andy Piper,
24887 John McClary Prevost,
24888 Bill Pringlemeir,
24889 Mike Pullen,
24890 Jim Radford,
24891 Colin Rafferty,
24892 Lasse Rasinen,
24893 Lars Balker Rasmussen,
24894 Joe Reiss,
24895 Renaud Rioboo,
24896 Roland B. Roberts,
24897 Bart Robinson,
24898 Christian von Roques,
24899 Markus Rost,
24900 Jason Rumney,
24901 Wolfgang Rupprecht,
24902 Jay Sachs,
24903 Dewey M. Sasser,
24904 Conrad Sauerwald,
24905 Loren Schall,
24906 Dan Schmidt,
24907 Ralph Schleicher,
24908 Philippe Schnoebelen,
24909 Andreas Schwab,
24910 Randal L. Schwartz,
24911 Danny Siu,
24912 Matt Simmons,
24913 Paul D. Smith,
24914 Jeff Sparkes,
24915 Toby Speight,
24916 Michael Sperber,
24917 Darren Stalder,
24918 Richard Stallman,
24919 Greg Stark,
24920 Sam Steingold,
24921 Paul Stevenson,
24922 Jonas Steverud,
24923 Paul Stodghill,
24924 Kiyokazu Suto, @c Suto
24925 Kurt Swanson,
24926 Samuel Tardieu,
24927 Teddy,
24928 Chuck Thompson,
24929 Tozawa Akihiko, @c Tozawa
24930 Philippe Troin,
24931 James Troup,
24932 Trung Tran-Duc,
24933 Jack Twilley,
24934 Aaron M. Ucko,
24935 Aki Vehtari,
24936 Didier Verna,
24937 Vladimir Volovich,
24938 Jan Vroonhof,
24939 Stefan Waldherr,
24940 Pete Ware,
24941 Barry A. Warsaw,
24942 Christoph Wedler,
24943 Joe Wells,
24944 Lee Willis,
24945 and
24946 Lloyd Zusman.
24947
24948
24949 For a full overview of what each person has done, the ChangeLogs
24950 included in the Gnus alpha distributions should give ample reading
24951 (550kB and counting).
24952
24953 Apologies to everybody that I've forgotten, of which there are many, I'm
24954 sure.
24955
24956 Gee, that's quite a list of people.  I guess that must mean that there
24957 actually are people who are using Gnus.  Who'd'a thunk it!
24958
24959
24960 @node New Features
24961 @subsection New Features
24962 @cindex new features
24963
24964 @menu
24965 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
24966 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
24967 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
24968 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
24969 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
24970 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
24971 * No Gnus::                     Lars, FIXME!
24972 @end menu
24973
24974 These lists are, of course, just @emph{short} overviews of the
24975 @emph{most} important new features.  No, really.  There are tons more.
24976 Yes, we have feeping creaturism in full effect.
24977
24978 @node ding Gnus
24979 @subsubsection (ding) Gnus
24980
24981 New features in Gnus 5.0/5.1:
24982
24983 @itemize @bullet
24984
24985 @item
24986 The look of all buffers can be changed by setting format-like variables
24987 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
24988
24989 @item
24990 Local spool and several @acronym{NNTP} servers can be used at once
24991 (@pxref{Select Methods}).
24992
24993 @item
24994 You can combine groups into virtual groups (@pxref{Virtual Groups}).
24995
24996 @item
24997 You can read a number of different mail formats (@pxref{Getting Mail}).
24998 All the mail back ends implement a convenient mail expiry scheme
24999 (@pxref{Expiring Mail}).
25000
25001 @item
25002 Gnus can use various strategies for gathering threads that have lost
25003 their roots (thereby gathering loose sub-threads into one thread) or it
25004 can go back and retrieve enough headers to build a complete thread
25005 (@pxref{Customizing Threading}).
25006
25007 @item
25008 Killed groups can be displayed in the group buffer, and you can read
25009 them as well (@pxref{Listing Groups}).
25010
25011 @item
25012 Gnus can do partial group updates---you do not have to retrieve the
25013 entire active file just to check for new articles in a few groups
25014 (@pxref{The Active File}).
25015
25016 @item
25017 Gnus implements a sliding scale of subscribedness to groups
25018 (@pxref{Group Levels}).
25019
25020 @item
25021 You can score articles according to any number of criteria
25022 (@pxref{Scoring}).  You can even get Gnus to find out how to score
25023 articles for you (@pxref{Adaptive Scoring}).
25024
25025 @item
25026 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
25027 manner, so it should be difficult to lose much data on what you have
25028 read if your machine should go down (@pxref{Auto Save}).
25029
25030 @item
25031 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
25032 cluttering up the @file{.emacs} file.
25033
25034 @item
25035 You can set the process mark on both groups and articles and perform
25036 operations on all the marked items (@pxref{Process/Prefix}).
25037
25038 @item
25039 You can grep through a subset of groups and create a group from the
25040 results (@pxref{Kibozed Groups}).
25041
25042 @item
25043 You can list subsets of groups according to, well, anything
25044 (@pxref{Listing Groups}).
25045
25046 @item
25047 You can browse foreign servers and subscribe to groups from those
25048 servers (@pxref{Browse Foreign Server}).
25049
25050 @item
25051 Gnus can fetch articles, asynchronously, on a second connection to the
25052 server (@pxref{Asynchronous Fetching}).
25053
25054 @item
25055 You can cache articles locally (@pxref{Article Caching}).
25056
25057 @item
25058 The uudecode functions have been expanded and generalized
25059 (@pxref{Decoding Articles}).
25060
25061 @item
25062 You can still post uuencoded articles, which was a little-known feature
25063 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
25064
25065 @item
25066 Fetching parents (and other articles) now actually works without
25067 glitches (@pxref{Finding the Parent}).
25068
25069 @item
25070 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
25071
25072 @item
25073 Digests (and other files) can be used as the basis for groups
25074 (@pxref{Document Groups}).
25075
25076 @item
25077 Articles can be highlighted and customized (@pxref{Customizing
25078 Articles}).
25079
25080 @item
25081 URLs and other external references can be buttonized (@pxref{Article
25082 Buttons}).
25083
25084 @item
25085 You can do lots of strange stuff with the Gnus window & frame
25086 configuration (@pxref{Window Layout}).
25087
25088 @item
25089 You can click on buttons instead of using the keyboard
25090 (@pxref{Buttons}).
25091
25092 @end itemize
25093
25094
25095 @node September Gnus
25096 @subsubsection September Gnus
25097
25098 @iftex
25099 @iflatex
25100 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
25101 @end iflatex
25102 @end iftex
25103
25104 New features in Gnus 5.2/5.3:
25105
25106 @itemize @bullet
25107
25108 @item
25109 A new message composition mode is used.  All old customization variables
25110 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
25111 now obsolete.
25112
25113 @item
25114 Gnus is now able to generate @dfn{sparse} threads---threads where
25115 missing articles are represented by empty nodes (@pxref{Customizing
25116 Threading}).
25117
25118 @lisp
25119 (setq gnus-build-sparse-threads 'some)
25120 @end lisp
25121
25122 @item
25123 Outgoing articles are stored on a special archive server
25124 (@pxref{Archived Messages}).
25125
25126 @item
25127 Partial thread regeneration now happens when articles are
25128 referred.
25129
25130 @item
25131 Gnus can make use of GroupLens predictions (@pxref{GroupLens}).
25132
25133 @item
25134 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
25135
25136 @item
25137 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
25138
25139 @lisp
25140 (setq gnus-use-trees t)
25141 @end lisp
25142
25143 @item
25144 An @code{nn}-like pick-and-read minor mode is available for the summary
25145 buffers (@pxref{Pick and Read}).
25146
25147 @lisp
25148 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
25149 @end lisp
25150
25151 @item
25152 In binary groups you can use a special binary minor mode (@pxref{Binary
25153 Groups}).
25154
25155 @item
25156 Groups can be grouped in a folding topic hierarchy (@pxref{Group
25157 Topics}).
25158
25159 @lisp
25160 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
25161 @end lisp
25162
25163 @item
25164 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
25165
25166 @item
25167 Groups can now have a score, and bubbling based on entry frequency
25168 is possible (@pxref{Group Score}).
25169
25170 @lisp
25171 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
25172 @end lisp
25173
25174 @item
25175 Groups can be process-marked, and commands can be performed on
25176 groups of groups (@pxref{Marking Groups}).
25177
25178 @item
25179 Caching is possible in virtual groups.
25180
25181 @item
25182 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
25183 news batches, ClariNet briefs collections, and just about everything
25184 else (@pxref{Document Groups}).
25185
25186 @item
25187 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
25188 (@pxref{SOUP}).
25189
25190 @item
25191 The Gnus cache is much faster.
25192
25193 @item
25194 Groups can be sorted according to many criteria (@pxref{Sorting
25195 Groups}).
25196
25197 @item
25198 New group parameters have been introduced to set list-addresses and
25199 expiry times (@pxref{Group Parameters}).
25200
25201 @item
25202 All formatting specs allow specifying faces to be used
25203 (@pxref{Formatting Fonts}).
25204
25205 @item
25206 There are several more commands for setting/removing/acting on process
25207 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
25208
25209 @item
25210 The summary buffer can be limited to show parts of the available
25211 articles based on a wide range of criteria.  These commands have been
25212 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
25213
25214 @item
25215 Articles can be made persistent with the @kbd{*} command
25216 (@pxref{Persistent Articles}).
25217
25218 @item
25219 All functions for hiding article elements are now toggles.
25220
25221 @item
25222 Article headers can be buttonized (@pxref{Article Washing}).
25223
25224 @item
25225 All mail back ends support fetching articles by @code{Message-ID}.
25226
25227 @item
25228 Duplicate mail can now be treated properly (@pxref{Duplicates}).
25229
25230 @item
25231 All summary mode commands are available directly from the article
25232 buffer (@pxref{Article Keymap}).
25233
25234 @item
25235 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
25236 Layout}).
25237
25238 @item
25239 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
25240 @iftex
25241 @iflatex
25242 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
25243 @end iflatex
25244 @end iftex
25245
25246 @item
25247 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
25248
25249 @lisp
25250 (setq gnus-use-nocem t)
25251 @end lisp
25252
25253 @item
25254 Groups can be made permanently visible (@pxref{Listing Groups}).
25255
25256 @lisp
25257 (setq gnus-permanently-visible-groups "^nnml:")
25258 @end lisp
25259
25260 @item
25261 Many new hooks have been introduced to make customizing easier.
25262
25263 @item
25264 Gnus respects the @code{Mail-Copies-To} header.
25265
25266 @item
25267 Threads can be gathered by looking at the @code{References} header
25268 (@pxref{Customizing Threading}).
25269
25270 @lisp
25271 (setq gnus-summary-thread-gathering-function
25272       'gnus-gather-threads-by-references)
25273 @end lisp
25274
25275 @item
25276 Read articles can be stored in a special backlog buffer to avoid
25277 refetching (@pxref{Article Backlog}).
25278
25279 @lisp
25280 (setq gnus-keep-backlog 50)
25281 @end lisp
25282
25283 @item
25284 A clean copy of the current article is always stored in a separate
25285 buffer to allow easier treatment.
25286
25287 @item
25288 Gnus can suggest where to save articles (@pxref{Saving Articles}).
25289
25290 @item
25291 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
25292 Articles}).
25293
25294 @lisp
25295 (setq gnus-prompt-before-saving t)
25296 @end lisp
25297
25298 @item
25299 @code{gnus-uu} can view decoded files asynchronously while fetching
25300 articles (@pxref{Other Decode Variables}).
25301
25302 @lisp
25303 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
25304 @end lisp
25305
25306 @item
25307 Filling in the article buffer now works properly on cited text
25308 (@pxref{Article Washing}).
25309
25310 @item
25311 Hiding cited text adds buttons to toggle hiding, and how much
25312 cited text to hide is now customizable (@pxref{Article Hiding}).
25313
25314 @lisp
25315 (setq gnus-cited-lines-visible 2)
25316 @end lisp
25317
25318 @item
25319 Boring headers can be hidden (@pxref{Article Hiding}).
25320
25321 @item
25322 Default scoring values can now be set from the menu bar.
25323
25324 @item
25325 Further syntax checking of outgoing articles have been added.
25326
25327 @end itemize
25328
25329
25330 @node Red Gnus
25331 @subsubsection Red Gnus
25332
25333 New features in Gnus 5.4/5.5:
25334
25335 @iftex
25336 @iflatex
25337 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
25338 @end iflatex
25339 @end iftex
25340
25341 @itemize @bullet
25342
25343 @item
25344 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
25345
25346 @item
25347 Article prefetching functionality has been moved up into
25348 Gnus (@pxref{Asynchronous Fetching}).
25349
25350 @item
25351 Scoring can now be performed with logical operators like @code{and},
25352 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
25353 Scoring}).
25354
25355 @item
25356 Article washing status can be displayed in the
25357 article mode line (@pxref{Misc Article}).
25358
25359 @item
25360 @file{gnus.el} has been split into many smaller files.
25361
25362 @item
25363 Suppression of duplicate articles based on Message-ID can be done
25364 (@pxref{Duplicate Suppression}).
25365
25366 @lisp
25367 (setq gnus-suppress-duplicates t)
25368 @end lisp
25369
25370 @item
25371 New variables for specifying what score and adapt files are to be
25372 considered home score and adapt files (@pxref{Home Score File}) have
25373 been added.
25374
25375 @item
25376 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
25377 Server Internals}).
25378
25379 @item
25380 Groups can inherit group parameters from parent topics (@pxref{Topic
25381 Parameters}).
25382
25383 @item
25384 Article editing has been revamped and is now actually usable.
25385
25386 @item
25387 Signatures can be recognized in more intelligent fashions
25388 (@pxref{Article Signature}).
25389
25390 @item
25391 Summary pick mode has been made to look more @code{nn}-like.  Line
25392 numbers are displayed and the @kbd{.} command can be used to pick
25393 articles (@code{Pick and Read}).
25394
25395 @item
25396 Commands for moving the @file{.newsrc.eld} from one server to
25397 another have been added (@pxref{Changing Servers}).
25398
25399 @item
25400 There's a way now to specify that ``uninteresting'' fields be suppressed
25401 when generating lines in buffers (@pxref{Advanced Formatting}).
25402
25403 @item
25404 Several commands in the group buffer can be undone with @kbd{C-M-_}
25405 (@pxref{Undo}).
25406
25407 @item
25408 Scoring can be done on words using the new score type @code{w}
25409 (@pxref{Score File Format}).
25410
25411 @item
25412 Adaptive scoring can be done on a Subject word-by-word basis
25413 (@pxref{Adaptive Scoring}).
25414
25415 @lisp
25416 (setq gnus-use-adaptive-scoring '(word))
25417 @end lisp
25418
25419 @item
25420 Scores can be decayed (@pxref{Score Decays}).
25421
25422 @lisp
25423 (setq gnus-decay-scores t)
25424 @end lisp
25425
25426 @item
25427 Scoring can be performed using a regexp on the Date header.  The Date is
25428 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
25429
25430 @item
25431 A new command has been added to remove all data on articles from
25432 the native server (@pxref{Changing Servers}).
25433
25434 @item
25435 A new command for reading collections of documents
25436 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
25437 (@pxref{Really Various Summary Commands}).
25438
25439 @item
25440 Process mark sets can be pushed and popped (@pxref{Setting Process
25441 Marks}).
25442
25443 @item
25444 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
25445 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
25446
25447 @item
25448 A new back end for reading searches from Web search engines
25449 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
25450 (@pxref{Web Searches}).
25451
25452 @item
25453 Groups inside topics can now be sorted using the standard sorting
25454 functions, and each topic can be sorted independently (@pxref{Topic
25455 Sorting}).
25456
25457 @item
25458 Subsets of the groups can be sorted independently (@code{Sorting
25459 Groups}).
25460
25461 @item
25462 Cached articles can be pulled into the groups (@pxref{Summary Generation
25463 Commands}).
25464 @iftex
25465 @iflatex
25466 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
25467 @end iflatex
25468 @end iftex
25469
25470 @item
25471 Score files are now applied in a more reliable order (@pxref{Score
25472 Variables}).
25473
25474 @item
25475 Reports on where mail messages end up can be generated (@pxref{Splitting
25476 Mail}).
25477
25478 @item
25479 More hooks and functions have been added to remove junk from incoming
25480 mail before saving the mail (@pxref{Washing Mail}).
25481
25482 @item
25483 Emphasized text can be properly fontisized:
25484
25485 @end itemize
25486
25487
25488 @node Quassia Gnus
25489 @subsubsection Quassia Gnus
25490
25491 New features in Gnus 5.6:
25492
25493 @itemize @bullet
25494
25495 @item
25496 New functionality for using Gnus as an offline newsreader has been
25497 added.  A plethora of new commands and modes have been added.
25498 @xref{Gnus Unplugged}, for the full story.
25499
25500 @item
25501 The @code{nndraft} back end has returned, but works differently than
25502 before.  All Message buffers are now also articles in the @code{nndraft}
25503 group, which is created automatically.
25504
25505 @item
25506 @code{gnus-alter-header-function} can now be used to alter header
25507 values.
25508
25509 @item
25510 @code{gnus-summary-goto-article} now accept Message-ID's.
25511
25512 @item
25513 A new Message command for deleting text in the body of a message
25514 outside the region: @kbd{C-c C-v}.
25515
25516 @item
25517 You can now post to component group in @code{nnvirtual} groups with
25518 @kbd{C-u C-c C-c}.
25519
25520 @item
25521  @code{nntp-rlogin-program}---new variable to ease customization.
25522
25523 @item
25524 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
25525 re-highlighting of the article buffer.
25526
25527 @item
25528 New element in @code{gnus-boring-article-headers}---@code{long-to}.
25529
25530 @item
25531 @kbd{M-i} symbolic prefix command.  @xref{Symbolic Prefixes}, for
25532 details.
25533
25534 @item
25535 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
25536 @kbd{a} to add the score rule to the @file{all.SCORE} file.
25537
25538 @item
25539 @code{gnus-simplify-subject-functions} variable to allow greater
25540 control over simplification.
25541
25542 @item
25543 @kbd{A T}---new command for fetching the current thread.
25544
25545 @item
25546 @kbd{/ T}---new command for including the current thread in the
25547 limit.
25548
25549 @item
25550 @kbd{M-RET} is a new Message command for breaking cited text.
25551
25552 @item
25553 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
25554
25555 @item
25556 The @code{custom-face-lookup} function has been removed.
25557 If you used this function in your initialization files, you must
25558 rewrite them to use @code{face-spec-set} instead.
25559
25560 @item
25561 Canceling now uses the current select method.  Symbolic prefix
25562 @kbd{a} forces normal posting method.
25563
25564 @item
25565 New command to translate M******** sm*rtq**t*s into proper
25566 text---@kbd{W d}.
25567
25568 @item
25569 For easier debugging of @code{nntp}, you can set
25570 @code{nntp-record-commands} to a non-@code{nil} value.
25571
25572 @item
25573 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
25574 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
25575
25576 @item
25577 A command for editing group parameters from the summary buffer
25578 has been added.
25579
25580 @item
25581 A history of where mails have been split is available.
25582
25583 @item
25584 A new article date command has been added---@code{article-date-iso8601}.
25585
25586 @item
25587 Subjects can be simplified when threading by setting
25588 @code{gnus-score-thread-simplify}.
25589
25590 @item
25591 A new function for citing in Message has been
25592 added---@code{message-cite-original-without-signature}.
25593
25594 @item
25595 @code{article-strip-all-blank-lines}---new article command.
25596
25597 @item
25598 A new Message command to kill to the end of the article has
25599 been added.
25600
25601 @item
25602 A minimum adaptive score can be specified by using the
25603 @code{gnus-adaptive-word-minimum} variable.
25604
25605 @item
25606 The ``lapsed date'' article header can be kept continually
25607 updated by the @code{gnus-start-date-timer} command.
25608
25609 @item
25610 Web listserv archives can be read with the @code{nnlistserv} back end.
25611
25612 @item
25613 Old dejanews archives can now be read by @code{nnweb}.
25614
25615 @end itemize
25616
25617 @node Pterodactyl Gnus
25618 @subsubsection Pterodactyl Gnus
25619
25620 New features in Gnus 5.8:
25621
25622 @itemize @bullet
25623
25624 @item
25625 The mail-fetching functions have changed.  See the manual for the
25626 many details.  In particular, all procmail fetching variables are gone.
25627
25628 If you used procmail like in
25629
25630 @lisp
25631 (setq nnmail-use-procmail t)
25632 (setq nnmail-spool-file 'procmail)
25633 (setq nnmail-procmail-directory "~/mail/incoming/")
25634 (setq nnmail-procmail-suffix "\\.in")
25635 @end lisp
25636
25637 this now has changed to
25638
25639 @lisp
25640 (setq mail-sources
25641       '((directory :path "~/mail/incoming/"
25642                    :suffix ".in")))
25643 @end lisp
25644
25645 @xref{Mail Source Specifiers}.
25646
25647 @item
25648 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
25649 Gnus, and adds a slew of new commands.  See the manual for details.
25650
25651 @item
25652 Gnus has also been multilingualized.  This also affects too
25653 many parts of Gnus to summarize here, and adds many new variables.
25654
25655 @item
25656 @code{gnus-auto-select-first} can now be a function to be
25657 called to position point.
25658
25659 @item
25660 The user can now decide which extra headers should be included in
25661 summary buffers and @acronym{NOV} files.
25662
25663 @item
25664 @code{gnus-article-display-hook} has been removed.  Instead, a number
25665 of variables starting with @code{gnus-treat-} have been added.
25666
25667 @item
25668 The Gnus posting styles have been redone again and now works in a
25669 subtly different manner.
25670
25671 @item
25672 New web-based back ends have been added: @code{nnslashdot},
25673 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
25674 again, to keep up with ever-changing layouts.
25675
25676 @item
25677 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
25678
25679 @end itemize
25680
25681 @node Oort Gnus
25682 @subsubsection Oort Gnus
25683 @cindex Oort Gnus
25684
25685 New features in Gnus 5.10:
25686
25687 @itemize @bullet
25688
25689 @item
25690 @code{gnus-group-read-ephemeral-group} can be called interactively,
25691 using @kbd{G M}.
25692
25693 @item
25694 In draft groups, @kbd{e} is now bound to @code{gnus-draft-edit-message}.
25695 Use @kbd{B w} for @code{gnus-summary-edit-article} instead.
25696
25697 @item
25698 The revised Gnus @acronym{FAQ} is included in the manual,
25699 @xref{Frequently Asked Questions}.
25700
25701 @item
25702 Upgrading from previous (stable) version if you have used Oort.
25703
25704 If you have tried Oort (the unstable Gnus branch leading to this
25705 release) but went back to a stable version, be careful when upgrading to
25706 this version.  In particular, you will probably want to remove all
25707 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
25708 read from your @file{.newsrc.eld} instead of from the
25709 @file{.marks}/@file{.mrk} file where this release store flags.  See a
25710 later entry for more information about marks.  Note that downgrading
25711 isn't save in general.
25712
25713 @item
25714 Article Buttons
25715
25716 More buttons for URLs, mail addresses, Message-IDs, Info links, man
25717 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
25718 variables @code{gnus-button-@var{*}-level} can be used to control the
25719 appearance of all article buttons.  @xref{Article Button Levels}.
25720
25721 @item
25722 Dired integration
25723
25724 @code{gnus-dired-minor-mode} (see @ref{Other modes}) installs key
25725 bindings in dired buffers to send a file as an attachment, open a file
25726 using the appropriate mailcap entry, and print a file using the mailcap
25727 entry.
25728
25729 @item
25730 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
25731
25732 @item
25733 Single-part yenc encoded attachments can be decoded.
25734
25735 @item
25736 Picons
25737
25738 The picons code has been reimplemented to work in GNU Emacs---some of
25739 the previous options have been removed or renamed.
25740
25741 Picons are small ``personal icons'' representing users, domain and
25742 newsgroups, which can be displayed in the Article buffer.
25743 @xref{Picons}.
25744
25745 @item
25746 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
25747 boundary line is drawn at the end of the headers.
25748
25749 @item
25750 Retrieval of charters and control messages
25751
25752 There are new commands for fetching newsgroup charters (@kbd{H c}) and
25753 control messages (@kbd{H C}).
25754
25755 @item
25756 Delayed articles
25757
25758 You can delay the sending of a message with @kbd{C-c C-j} in the Message
25759 buffer.  The messages are delivered at specified time.  This is useful
25760 for sending yourself reminders.  @xref{Delayed Articles}.
25761
25762 @item
25763 If @code{auto-compression-mode} is enabled, attachments are automatically
25764 decompressed when activated.
25765
25766 @item
25767 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
25768 the nnml back end allows compressed message files.
25769
25770 @item
25771 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
25772
25773 @item
25774 The Summary Buffer uses an arrow in the fringe to indicate the current
25775 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
25776
25777 @item
25778 Warn about email replies to news
25779
25780 Do you often find yourself replying to news by email by mistake?  Then
25781 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
25782 you.
25783
25784 @item
25785 If the new option @code{gnus-summary-display-while-building} is
25786 non-@code{nil}, the summary buffer is shown and updated as it's being
25787 built.
25788
25789 @item
25790 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
25791 opposed to old but unread messages).
25792
25793 @item
25794 The new option @code{gnus-gcc-mark-as-read} automatically marks
25795 Gcc articles as read.
25796
25797 @item
25798 The nndoc back end now supports mailman digests and exim bounces.
25799
25800 @item
25801 Gnus supports RFC 2369 mailing list headers, and adds a number of
25802 related commands in mailing list groups.  @xref{Mailing List}.
25803
25804 @item
25805 The Date header can be displayed in a format that can be read aloud
25806 in English.  @xref{Article Date}.
25807
25808 @item
25809 The envelope sender address can be customized when using Sendmail.
25810 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
25811
25812 @item
25813 diffs are automatically highlighted in groups matching
25814 @code{mm-uu-diff-groups-regexp}
25815
25816 @item
25817 @acronym{TLS} wrapper shipped with Gnus
25818
25819 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
25820 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
25821 @acronym{TLS}/@acronym{SSL} support via (external third party)
25822 @file{ssl.el} and OpenSSL still works.
25823
25824 @item
25825 New @file{make.bat} for compiling and installing Gnus under MS Windows
25826
25827 Use @file{make.bat} if you want to install Gnus under MS Windows, the
25828 first argument to the batch-program should be the directory where
25829 @file{xemacs.exe} respectively @file{emacs.exe} is located, iff you want
25830 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
25831 the second parameter.
25832
25833 @file{make.bat} has been rewritten from scratch, it now features
25834 automatic recognition of XEmacs and GNU Emacs, generates
25835 @file{gnus-load.el}, checks if errors occur while compilation and
25836 generation of info files and reports them at the end of the build
25837 process.  It now uses @code{makeinfo} if it is available and falls
25838 back to @file{infohack.el} otherwise.  @file{make.bat} should now
25839 install all files which are necessary to run Gnus and be generally a
25840 complete replacement for the @code{configure; make; make install}
25841 cycle used under Unix systems.
25842
25843 The new @file{make.bat} makes @file{make-x.bat} superfluous, so it has
25844 been removed.
25845
25846 @item
25847 Support for non-@acronym{ASCII} domain names
25848
25849 Message supports non-@acronym{ASCII} domain names in From:, To: and
25850 Cc: and will query you whether to perform encoding when you try to
25851 send a message.  The variable @code{message-use-idna} controls this.
25852 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
25853 and Cc: when you view a message.  The variable @code{gnus-use-idna}
25854 controls this.
25855
25856 @item
25857 Better handling of Microsoft citation styles
25858
25859 Gnus now tries to recognize the mangled header block that some Microsoft
25860 mailers use to indicate that the rest of the message is a citation, even
25861 though it is not quoted in any way.  The variable
25862 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
25863 citations.
25864
25865 @item
25866 @code{gnus-article-skip-boring}
25867
25868 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
25869 not scroll down to show you a page that contains only boring text,
25870 which by default means cited text and signature.  You can customize
25871 what is skippable using @code{gnus-article-boring-faces}.
25872
25873 This feature is especially useful if you read many articles that
25874 consist of a little new content at the top with a long, untrimmed
25875 message cited below.
25876
25877 @item
25878 The format spec @code{%C} for positioning point has changed to @code{%*}.
25879
25880 @item
25881 The new variable @code{gnus-parameters} can be used to set group parameters.
25882
25883 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
25884 the parameters in @file{~/.newsrc.eld}, but via this variable you can
25885 enjoy the powers of customize, and simplified backups since you set the
25886 variable in @file{~/.emacs} instead of @file{~/.newsrc.eld}.  The
25887 variable maps regular expressions matching group names to group
25888 parameters, a'la:
25889 @lisp
25890 (setq gnus-parameters
25891       '(("mail\\..*"
25892          (gnus-show-threads nil)
25893          (gnus-use-scoring nil))
25894         ("^nnimap:\\(foo.bar\\)$"
25895          (to-group . "\\1"))))
25896 @end lisp
25897
25898 @item
25899 Smileys (@samp{:-)}, @samp{;-)} etc) are now iconized for Emacs too.
25900
25901 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.emacs} to
25902 disable it.
25903
25904 @item
25905 Gnus no longer generate the Sender: header automatically.
25906
25907 Earlier it was generated iff the user configurable email address was
25908 different from the Gnus guessed default user address.  As the guessing
25909 algorithm is rarely correct these days, and (more controversially) the
25910 only use of the Sender: header was to check if you are entitled to
25911 cancel/supersede news (which is now solved by Cancel Locks instead,
25912 see another entry), generation of the header has been disabled by
25913 default.  See the variables @code{message-required-headers},
25914 @code{message-required-news-headers}, and
25915 @code{message-required-mail-headers}.
25916
25917 @item
25918 Features from third party @file{message-utils.el} added to @file{message.el}.
25919
25920 Message now asks if you wish to remove @samp{(was: <old subject>)} from
25921 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
25922 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
25923 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
25924 appropriate headers and a note in the body for cross-postings and
25925 followups (see the variables @code{message-cross-post-@var{*}}).
25926
25927 @item
25928 References and X-Draft-Headers are no longer generated when you start
25929 composing messages and @code{message-generate-headers-first} is
25930 @code{nil}.
25931
25932 @item
25933 Improved anti-spam features.
25934
25935 Gnus is now able to take out spam from your mail and news streams
25936 using a wide variety of programs and filter rules.  Among the supported
25937 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
25938 for easy use of external packages such as SpamAssassin and Hashcash
25939 are also new.  @xref{Thwarting Email Spam}.
25940
25941 @item
25942 Easy inclusion of X-Faces headers.
25943
25944 @item
25945 Face headers handling.
25946
25947 @item
25948 In the summary buffer, the new command @kbd{/ N} inserts new messages
25949 and @kbd{/ o} inserts old messages.
25950
25951 @item
25952 Gnus decodes morse encoded messages if you press @kbd{W m}.
25953
25954 @item
25955 Unread count correct in nnimap groups.
25956
25957 The estimated number of unread articles in the group buffer should now
25958 be correct for nnimap groups.  This is achieved by calling
25959 @code{nnimap-fixup-unread-after-getting-new-news} from the
25960 @code{gnus-setup-news-hook} (called on startup) and
25961 @code{gnus-after-getting-new-news-hook}. (called after getting new
25962 mail).  If you have modified those variables from the default, you may
25963 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
25964 you were happy with the estimate and want to save some (minimal) time
25965 when getting new mail, remove the function.
25966
25967 @item
25968 Group Carbon Copy (GCC) quoting
25969
25970 To support groups that contains SPC and other weird characters, groups
25971 are quoted before they are placed in the Gcc: header.  This means
25972 variables such as @code{gnus-message-archive-group} should no longer
25973 contain quote characters to make groups containing SPC work.  Also, if
25974 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
25975 into two groups) you must change it to return the list
25976 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
25977 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
25978 was incorrect earlier, it just didn't generate any problems since it
25979 was inserted directly.
25980
25981 @item
25982 @file{~/News/overview/} not used.
25983
25984 As a result of the following change, the @file{~/News/overview/}
25985 directory is not used any more.  You can safely delete the entire
25986 hierarchy.
25987
25988 @item
25989 @code{gnus-agent}
25990
25991 The Gnus Agent has seen a major updated and is now enabled by default,
25992 and all nntp and nnimap servers from @code{gnus-select-method} and
25993 @code{gnus-secondary-select-method} are agentized by default.  Earlier
25994 only the server in @code{gnus-select-method} was agentized by the
25995 default, and the agent was disabled by default.  When the agent is
25996 enabled, headers are now also retrieved from the Agent cache instead
25997 of the back ends when possible.  Earlier this only happened in the
25998 unplugged state.  You can enroll or remove servers with @kbd{J a} and
25999 @kbd{J r} in the server buffer.  Gnus will not download articles into
26000 the Agent cache, unless you instruct it to do so, though, by using
26001 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
26002 behaviour of having the Agent disabled with @code{(setq gnus-agent
26003 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
26004 is not needed any more.
26005
26006 @item
26007 @code{gnus-summary-line-format}
26008
26009 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
26010 %s\n}.  Moreover @code{gnus-extra-headers},
26011 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
26012 changed their default so that the users name will be replaced by the
26013 recipient's name or the group name posting to for @acronym{NNTP}
26014 groups.
26015
26016 @item
26017 @file{deuglify.el} (@code{gnus-article-outlook-deuglify-article})
26018
26019 A new file from Raymond Scholz @email{rscholz@@zonix.de} for deuglifying
26020 broken Outlook (Express) articles.
26021
26022 @item
26023 @code{(require 'gnus-load)}
26024
26025 If you use a stand-alone Gnus distribution, you'd better add
26026 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
26027 lisp directory into load-path.
26028
26029 File @file{gnus-load.el} contains autoload commands, functions and variables,
26030 some of which may not be included in distributions of Emacsen.
26031
26032 @item
26033 @code{gnus-slave-unplugged}
26034
26035 A new command which starts Gnus offline in slave mode.
26036
26037 @item
26038 @code{message-insinuate-rmail}
26039
26040 Adding @code{(message-insinuate-rmail)} and @code{(setq
26041 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
26042 compose, reply and forward messages in message-mode, where you can
26043 enjoy the power of @acronym{MML}.
26044
26045 @item
26046 @code{message-minibuffer-local-map}
26047
26048 The line below enables BBDB in resending a message:
26049 @lisp
26050 (define-key message-minibuffer-local-map [(tab)]
26051   'bbdb-complete-name)
26052 @end lisp
26053
26054 @item
26055 Externalizing and deleting of attachments.
26056
26057 If @code{gnus-gcc-externalize-attachments} or
26058 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
26059 local files as external parts.
26060
26061 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
26062 on @acronym{MIME} buttons) saves a part and replaces the part with an
26063 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
26064 @acronym{MIME} buttons) removes a part.  It works only on back ends
26065 that support editing.
26066
26067 @item
26068 @code{gnus-default-charset}
26069
26070 The default value is determined from the
26071 @code{current-language-environment} variable, instead of
26072 @code{iso-8859-1}.  Also the @samp{.*} item in
26073 @code{gnus-group-charset-alist} is removed.
26074
26075 @item
26076 @code{gnus-posting-styles}
26077
26078 Add a new format of match like
26079 @lisp
26080 ((header "to" "larsi.*org")
26081  (Organization "Somewhere, Inc."))
26082 @end lisp
26083 The old format like the lines below is obsolete, but still accepted.
26084 @lisp
26085 (header "to" "larsi.*org"
26086         (Organization "Somewhere, Inc."))
26087 @end lisp
26088
26089 @item
26090 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
26091
26092 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
26093 added into these two variables.  If you customized those, perhaps you
26094 need add those two headers too.
26095
26096 @item
26097 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
26098
26099 If one reads an article while plugged, and the article already exists
26100 in the Agent, it won't get downloaded once more.  @code{(setq
26101 gnus-agent-cache nil)} reverts to the old behavior.
26102
26103 @item
26104 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
26105 composing messages, it is enabled by @code{use-hard-newlines}.
26106 Decoding format=flowed was present but not documented in earlier
26107 versions.
26108
26109 @item
26110 Gnus supports the generation of RFC 2298 Disposition Notification requests.
26111
26112 This is invoked with the @kbd{C-c M-n} key binding from message mode.
26113
26114 @item
26115 Gnus supports Maildir groups.
26116
26117 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
26118
26119 @item
26120 Printing capabilities are enhanced.
26121
26122 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
26123 Article buffers.  Also, each individual @acronym{MIME} part can be
26124 printed using @kbd{p} on the @acronym{MIME} button.
26125
26126 @item
26127 Message supports the Importance: (RFC 2156) header.
26128
26129 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
26130 the valid values.
26131
26132 @item
26133 Gnus supports Cancel Locks in News.
26134
26135 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
26136 used to determine if you wrote an article or not (for canceling and
26137 superseding).  Gnus generates a random password string the first time
26138 you post a message, and saves it in your @file{~/.emacs} using the Custom
26139 system.  While the variable is called @code{canlock-password}, it is not
26140 security sensitive data.  Publishing your canlock string on the web
26141 will not allow anyone to be able to anything she could not already do.
26142 The behaviour can be changed by customizing @code{message-insert-canlock}.
26143
26144 @item
26145 Gnus supports server-side mail filtering using Sieve.
26146
26147 Sieve rules can be added as Group Parameters for groups, and the
26148 complete Sieve script is generated using @kbd{D g} from the Group
26149 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
26150 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
26151 manual @ref{Top, , Top, sieve, Emacs Sieve}.
26152
26153 @item
26154 Extended format specs.
26155
26156 Format spec @samp{%&user-date;} is added into
26157 @code{gnus-summary-line-format-alist}.  Also, user defined extended
26158 format specs are supported.  The extended format specs look like
26159 @samp{%u&foo;}, which invokes function
26160 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
26161 escape character, old user defined format @samp{%u&} is no longer supported.
26162
26163 @item
26164 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
26165
26166 It was aliased to @kbd{Y c}
26167 (@code{gnus-summary-insert-cached-articles}).  The new function filters
26168 out other articles.
26169
26170 @item Some limiting commands accept a @kbd{C-u} prefix to negate the match.
26171
26172 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
26173 s}, @kbd{/ a}, and @kbd{/ x}
26174 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
26175 result will be to display all articles that do not match the expression.
26176
26177 @item
26178 Group names are treated as UTF-8 by default.
26179
26180 This is supposedly what USEFOR wanted to migrate to.  See
26181 @code{gnus-group-name-charset-group-alist} and
26182 @code{gnus-group-name-charset-method-alist} for customization.
26183
26184 @item
26185 The nnml and nnfolder back ends store marks for each groups.
26186
26187 This makes it possible to take backup of nnml/nnfolder servers/groups
26188 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
26189 makes it possible to share articles and marks between users (without
26190 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
26191 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
26192 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
26193 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
26194 another machine, Gnus will automatically use the @file{.marks} or
26195 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
26196 The new server variables @code{nnml-marks-is-evil} and
26197 @code{nnfolder-marks-is-evil} can be used to disable this feature.
26198
26199 @item
26200 The menu bar item (in Group and Summary buffer) named ``Misc'' has
26201 been renamed to ``Gnus''.
26202
26203 @item
26204 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
26205 renamed to ``Attachments''.  Note that this menu also contains security
26206 related stuff, like signing and encryption (@pxref{Security, Security,,
26207 message, Message Manual}).
26208
26209 @item
26210 @code{gnus-group-charset-alist} and
26211 @code{gnus-group-ignored-charsets-alist}.
26212
26213 The regexps in these variables are compared with full group names
26214 instead of real group names in 5.8.  Users who customize these
26215 variables should change those regexps accordingly.  For example:
26216 @lisp
26217 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
26218 @end lisp
26219
26220 @item
26221 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
26222 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
26223
26224 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
26225 additional Lisp libraries.  This add several menu items to the
26226 Attachments menu, and @kbd{C-c RET} key bindings, when composing
26227 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
26228
26229 @item
26230 Gnus inlines external parts (message/external).
26231
26232 @item
26233 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
26234 C-m}.
26235
26236 This change was made to avoid conflict with the standard binding of
26237 @code{back-to-indentation}, which is also useful in message mode.
26238
26239 @item
26240 The default for @code{message-forward-show-mml} changed to symbol @code{best}.
26241
26242 The behaviour for the @code{best} value is to show @acronym{MML} (i.e.,
26243 convert to @acronym{MIME}) when appropriate.  @acronym{MML} will not be
26244 used when forwarding signed or encrypted messages, as the conversion
26245 invalidate the digital signature.
26246 @end itemize
26247
26248 @node No Gnus
26249 @subsubsection No Gnus
26250 @cindex No Gnus
26251
26252 New features in No Gnus:
26253 @c FIXME: Gnus 5.12?
26254
26255 @include gnus-news.texi
26256
26257 @iftex
26258
26259 @page
26260 @node The Manual
26261 @section The Manual
26262 @cindex colophon
26263 @cindex manual
26264
26265 This manual was generated from a TeXinfo file and then run through
26266 either @code{texi2dvi}
26267 @iflatex
26268 or my own home-brewed TeXinfo to \LaTeX\ transformer,
26269 and then run through @code{latex} and @code{dvips}
26270 @end iflatex
26271 to get what you hold in your hands now.
26272
26273 The following conventions have been used:
26274
26275 @enumerate
26276
26277 @item
26278 This is a @samp{string}
26279
26280 @item
26281 This is a @kbd{keystroke}
26282
26283 @item
26284 This is a @file{file}
26285
26286 @item
26287 This is a @code{symbol}
26288
26289 @end enumerate
26290
26291 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
26292 mean:
26293
26294 @lisp
26295 (setq flargnoze "yes")
26296 @end lisp
26297
26298 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
26299
26300 @lisp
26301 (setq flumphel 'yes)
26302 @end lisp
26303
26304 @samp{yes} and @code{yes} are two @emph{very} different things---don't
26305 ever get them confused.
26306
26307 @iflatex
26308 @c @head
26309 Of course, everything in this manual is of vital interest, so you should
26310 read it all.  Several times.  However, if you feel like skimming the
26311 manual, look for that gnu head you should see in the margin over
26312 there---it means that what's being discussed is of more importance than
26313 the rest of the stuff.  (On the other hand, if everything is infinitely
26314 important, how can anything be more important than that?  Just one more
26315 of the mysteries of this world, I guess.)
26316 @end iflatex
26317
26318 @end iftex
26319
26320
26321 @node On Writing Manuals
26322 @section On Writing Manuals
26323
26324 I guess most manuals are written after-the-fact; documenting a program
26325 that's already there.  This is not how this manual is written.  When
26326 implementing something, I write the manual entry for that something
26327 straight away.  I then see that it's difficult to explain the
26328 functionality, so I write how it's supposed to be, and then I change the
26329 implementation.  Writing the documentation and writing the code goes
26330 hand in hand.
26331
26332 This, of course, means that this manual has no, or little, flow.  It
26333 documents absolutely everything in Gnus, but often not where you're
26334 looking for it.  It is a reference manual, and not a guide to how to get
26335 started with Gnus.
26336
26337 That would be a totally different book, that should be written using the
26338 reference manual as source material.  It would look quite differently.
26339
26340
26341 @page
26342 @node Terminology
26343 @section Terminology
26344
26345 @cindex terminology
26346 @table @dfn
26347
26348 @item news
26349 @cindex news
26350 This is what you are supposed to use this thing for---reading news.
26351 News is generally fetched from a nearby @acronym{NNTP} server, and is
26352 generally publicly available to everybody.  If you post news, the entire
26353 world is likely to read just what you have written, and they'll all
26354 snigger mischievously.  Behind your back.
26355
26356 @item mail
26357 @cindex mail
26358 Everything that's delivered to you personally is mail.  Some news/mail
26359 readers (like Gnus) blur the distinction between mail and news, but
26360 there is a difference.  Mail is private.  News is public.  Mailing is
26361 not posting, and replying is not following up.
26362
26363 @item reply
26364 @cindex reply
26365 Send a mail to the person who has written what you are reading.
26366
26367 @item follow up
26368 @cindex follow up
26369 Post an article to the current newsgroup responding to the article you
26370 are reading.
26371
26372 @item back end
26373 @cindex back end
26374 Gnus considers mail and news to be mostly the same, really.  The only
26375 difference is how to access the actual articles.  News articles are
26376 commonly fetched via the protocol @acronym{NNTP}, whereas mail
26377 messages could be read from a file on the local disk.  The internal
26378 architecture of Gnus thus comprises a ``front end'' and a number of
26379 ``back ends''.  Internally, when you enter a group (by hitting
26380 @key{RET}, say), you thereby invoke a function in the front end in
26381 Gnus.  The front end then ``talks'' to a back end and says things like
26382 ``Give me the list of articles in the foo group'' or ``Show me article
26383 number 4711''.
26384
26385 So a back end mainly defines either a protocol (the @code{nntp} back
26386 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
26387 accesses mail via @acronym{IMAP}) or a file format and directory
26388 layout (the @code{nnspool} back end accesses news via the common
26389 ``spool directory'' format, the @code{nnml} back end access mail via a
26390 file format and directory layout that's quite similar).
26391
26392 Gnus does not handle the underlying media, so to speak---this is all
26393 done by the back ends.  A back end is a collection of functions to
26394 access the articles.
26395
26396 However, sometimes the term ``back end'' is also used where ``server''
26397 would have been more appropriate.  And then there is the term ``select
26398 method'' which can mean either.  The Gnus terminology can be quite
26399 confusing.
26400
26401 @item native
26402 @cindex native
26403 Gnus will always use one method (and back end) as the @dfn{native}, or
26404 default, way of getting news.
26405
26406 @item foreign
26407 @cindex foreign
26408 You can also have any number of foreign groups active at the same time.
26409 These are groups that use non-native non-secondary back ends for getting
26410 news.
26411
26412 @item secondary
26413 @cindex secondary
26414 Secondary back ends are somewhere half-way between being native and being
26415 foreign, but they mostly act like they are native.
26416
26417 @item article
26418 @cindex article
26419 A message that has been posted as news.
26420
26421 @item mail message
26422 @cindex mail message
26423 A message that has been mailed.
26424
26425 @item message
26426 @cindex message
26427 A mail message or news article
26428
26429 @item head
26430 @cindex head
26431 The top part of a message, where administrative information (etc.) is
26432 put.
26433
26434 @item body
26435 @cindex body
26436 The rest of an article.  Everything not in the head is in the
26437 body.
26438
26439 @item header
26440 @cindex header
26441 A line from the head of an article.
26442
26443 @item headers
26444 @cindex headers
26445 A collection of such lines, or a collection of heads.  Or even a
26446 collection of @acronym{NOV} lines.
26447
26448 @item @acronym{NOV}
26449 @cindex @acronym{NOV}
26450 When Gnus enters a group, it asks the back end for the headers of all
26451 unread articles in the group.  Most servers support the News OverView
26452 format, which is more compact and much faster to read and parse than the
26453 normal @sc{head} format.
26454
26455 @item level
26456 @cindex levels
26457 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
26458 that have a lower level are ``more'' subscribed than the groups with a
26459 higher level.  In fact, groups on levels 1-5 are considered
26460 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
26461 are @dfn{killed}.  Commands for listing groups and scanning for new
26462 articles will all use the numeric prefix as @dfn{working level}.
26463
26464 @item killed groups
26465 @cindex killed groups
26466 No information on killed groups is stored or updated, which makes killed
26467 groups much easier to handle than subscribed groups.
26468
26469 @item zombie groups
26470 @cindex zombie groups
26471 Just like killed groups, only slightly less dead.
26472
26473 @item active file
26474 @cindex active file
26475 The news server has to keep track of what articles it carries, and what
26476 groups exist.  All this information in stored in the active file, which
26477 is rather large, as you might surmise.
26478
26479 @item bogus groups
26480 @cindex bogus groups
26481 A group that exists in the @file{.newsrc} file, but isn't known to the
26482 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
26483 This means that the group probably doesn't exist (any more).
26484
26485 @item activating
26486 @cindex activating groups
26487 The act of asking the server for info on a group and computing the
26488 number of unread articles is called @dfn{activating the group}.
26489 Un-activated groups are listed with @samp{*} in the group buffer.
26490
26491 @item server
26492 @cindex server
26493 A machine one can connect to and get news (or mail) from.
26494
26495 @item select method
26496 @cindex select method
26497 A structure that specifies the back end, the server and the virtual
26498 server settings.
26499
26500 @item virtual server
26501 @cindex virtual server
26502 A named select method.  Since a select method defines all there is to
26503 know about connecting to a (physical) server, taking the thing as a
26504 whole is a virtual server.
26505
26506 @item washing
26507 @cindex washing
26508 Taking a buffer and running it through a filter of some sort.  The
26509 result will (more often than not) be cleaner and more pleasing than the
26510 original.
26511
26512 @item ephemeral groups
26513 @cindex ephemeral groups
26514 @cindex temporary groups
26515 Most groups store data on what articles you have read.  @dfn{Ephemeral}
26516 groups are groups that will have no data stored---when you exit the
26517 group, it'll disappear into the aether.
26518
26519 @item solid groups
26520 @cindex solid groups
26521 This is the opposite of ephemeral groups.  All groups listed in the
26522 group buffer are solid groups.
26523
26524 @item sparse articles
26525 @cindex sparse articles
26526 These are article placeholders shown in the summary buffer when
26527 @code{gnus-build-sparse-threads} has been switched on.
26528
26529 @item threading
26530 @cindex threading
26531 To put responses to articles directly after the articles they respond
26532 to---in a hierarchical fashion.
26533
26534 @item root
26535 @cindex root
26536 @cindex thread root
26537 The first article in a thread is the root.  It is the ancestor of all
26538 articles in the thread.
26539
26540 @item parent
26541 @cindex parent
26542 An article that has responses.
26543
26544 @item child
26545 @cindex child
26546 An article that responds to a different article---its parent.
26547
26548 @item digest
26549 @cindex digest
26550 A collection of messages in one file.  The most common digest format is
26551 specified by RFC 1153.
26552
26553 @item splitting
26554 @cindex splitting, terminolgy
26555 @cindex mail sorting
26556 @cindex mail filtering (splitting)
26557 The action of sorting your emails according to certain rules. Sometimes
26558 incorrectly called mail filtering.
26559
26560 @end table
26561
26562
26563 @page
26564 @node Customization
26565 @section Customization
26566 @cindex general customization
26567
26568 All variables are properly documented elsewhere in this manual.  This
26569 section is designed to give general pointers on how to customize Gnus
26570 for some quite common situations.
26571
26572 @menu
26573 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
26574 * Slow Terminal Connection::    You run a remote Emacs.
26575 * Little Disk Space::           You feel that having large setup files is icky.
26576 * Slow Machine::                You feel like buying a faster machine.
26577 @end menu
26578
26579
26580 @node Slow/Expensive Connection
26581 @subsection Slow/Expensive NNTP Connection
26582
26583 If you run Emacs on a machine locally, and get your news from a machine
26584 over some very thin strings, you want to cut down on the amount of data
26585 Gnus has to get from the @acronym{NNTP} server.
26586
26587 @table @code
26588
26589 @item gnus-read-active-file
26590 Set this to @code{nil}, which will inhibit Gnus from requesting the
26591 entire active file from the server.  This file is often v.  large.  You
26592 also have to set @code{gnus-check-new-newsgroups} and
26593 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
26594 doesn't suddenly decide to fetch the active file anyway.
26595
26596 @item gnus-nov-is-evil
26597 This one has to be @code{nil}.  If not, grabbing article headers from
26598 the @acronym{NNTP} server will not be very fast.  Not all @acronym{NNTP} servers
26599 support @sc{xover}; Gnus will detect this by itself.
26600 @end table
26601
26602
26603 @node Slow Terminal Connection
26604 @subsection Slow Terminal Connection
26605
26606 Let's say you use your home computer for dialing up the system that runs
26607 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
26608 possible) the amount of data sent over the wires.
26609
26610 @table @code
26611
26612 @item gnus-auto-center-summary
26613 Set this to @code{nil} to inhibit Gnus from re-centering the summary
26614 buffer all the time.  If it is @code{vertical}, do only vertical
26615 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
26616 horizontal and vertical recentering.
26617
26618 @item gnus-visible-headers
26619 Cut down on the headers included in the articles to the
26620 minimum.  You can, in fact, make do without them altogether---most of the
26621 useful data is in the summary buffer, anyway.  Set this variable to
26622 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
26623
26624 Set this hook to all the available hiding commands:
26625 @lisp
26626 (setq gnus-treat-hide-headers 'head
26627       gnus-treat-hide-signature t
26628       gnus-treat-hide-citation t)
26629 @end lisp
26630
26631 @item gnus-use-full-window
26632 By setting this to @code{nil}, you can make all the windows smaller.
26633 While this doesn't really cut down much generally, it means that you
26634 have to see smaller portions of articles before deciding that you didn't
26635 want to read them anyway.
26636
26637 @item gnus-thread-hide-subtree
26638 If this is non-@code{nil}, all threads in the summary buffer will be
26639 hidden initially.
26640
26641
26642 @item gnus-updated-mode-lines
26643 If this is @code{nil}, Gnus will not put information in the buffer mode
26644 lines, which might save some time.
26645 @end table
26646
26647
26648 @node Little Disk Space
26649 @subsection Little Disk Space
26650 @cindex disk space
26651
26652 The startup files can get rather large, so you may want to cut their
26653 sizes a bit if you are running out of space.
26654
26655 @table @code
26656
26657 @item gnus-save-newsrc-file
26658 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
26659 only save @file{.newsrc.eld}.  This means that you will not be able to
26660 use any other newsreaders than Gnus.  This variable is @code{t} by
26661 default.
26662
26663 @item gnus-read-newsrc-file
26664 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
26665 only read @file{.newsrc.eld}.  This means that you will not be able to
26666 use any other newsreaders than Gnus.  This variable is @code{t} by
26667 default.
26668
26669 @item gnus-save-killed-list
26670 If this is @code{nil}, Gnus will not save the list of dead groups.  You
26671 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
26672 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
26673 variable to @code{nil}.  This variable is @code{t} by default.
26674
26675 @end table
26676
26677
26678 @node Slow Machine
26679 @subsection Slow Machine
26680 @cindex slow machine
26681
26682 If you have a slow machine, or are just really impatient, there are a
26683 few things you can do to make Gnus run faster.
26684
26685 Set @code{gnus-check-new-newsgroups} and
26686 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
26687
26688 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
26689 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
26690 summary buffer faster.
26691
26692
26693 @page
26694 @node Troubleshooting
26695 @section Troubleshooting
26696 @cindex troubleshooting
26697
26698 Gnus works @emph{so} well straight out of the box---I can't imagine any
26699 problems, really.
26700
26701 Ahem.
26702
26703 @enumerate
26704
26705 @item
26706 Make sure your computer is switched on.
26707
26708 @item
26709 Make sure that you really load the current Gnus version.  If you have
26710 been running @sc{gnus}, you need to exit Emacs and start it up again before
26711 Gnus will work.
26712
26713 @item
26714 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
26715 like @samp{Gnus v5.10.6} you have the right files loaded.  Otherwise
26716 you have some old @file{.el} files lying around.  Delete these.
26717
26718 @item
26719 Read the help group (@kbd{G h} in the group buffer) for a
26720 @acronym{FAQ} and a how-to.
26721
26722 @item
26723 @vindex max-lisp-eval-depth
26724 Gnus works on many recursive structures, and in some extreme (and very
26725 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
26726 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
26727 something like that.
26728 @end enumerate
26729
26730 If all else fails, report the problem as a bug.
26731
26732 @cindex bugs
26733 @cindex reporting bugs
26734
26735 @kindex M-x gnus-bug
26736 @findex gnus-bug
26737 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
26738 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
26739 me the backtrace.  I will fix bugs, but I can only fix them if you send
26740 me a precise description as to how to reproduce the bug.
26741
26742 You really can never be too detailed in a bug report.  Always use the
26743 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
26744 a 10Kb mail each time you use it, and even if you have sent me your
26745 environment 500 times before.  I don't care.  I want the full info each
26746 time.
26747
26748 It is also important to remember that I have no memory whatsoever.  If
26749 you send a bug report, and I send you a reply, and then you just send
26750 back ``No, it's not! Moron!'', I will have no idea what you are
26751 insulting me about.  Always over-explain everything.  It's much easier
26752 for all of us---if I don't have all the information I need, I will just
26753 mail you and ask for more info, and everything takes more time.
26754
26755 If the problem you're seeing is very visual, and you can't quite explain
26756 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
26757 it somewhere it can be reached, and include the URL of the picture in
26758 the bug report.
26759
26760 @cindex patches
26761 If you would like to contribute a patch to fix bugs or make
26762 improvements, please produce the patch using @samp{diff -u}.
26763
26764 @cindex edebug
26765 If you want to debug your problem further before reporting, possibly
26766 in order to solve the problem yourself and send a patch, you can use
26767 edebug.  Debugging Lisp code is documented in the Elisp manual
26768 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
26769 Lisp Reference Manual}).  To get you started with edebug, consider if
26770 you discover some weird behaviour when pressing @kbd{c}, the first
26771 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
26772 the documentation buffer that leads you to the function definition,
26773 then press @kbd{M-x edebug-defun RET} with point inside that function,
26774 return to Gnus and press @kbd{c} to invoke the code.  You will be
26775 placed in the lisp buffer and can single step using @kbd{SPC} and
26776 evaluate expressions using @kbd{M-:} or inspect variables using
26777 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
26778 @kbd{c} or @kbd{g}.
26779
26780 @cindex elp
26781 @cindex profile
26782 @cindex slow
26783 Sometimes, a problem do not directly generate an elisp error but
26784 manifests itself by causing Gnus to be very slow.  In these cases, you
26785 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
26786 slow, and then try to analyze the backtrace (repeating the procedure
26787 helps isolating the real problem areas).
26788
26789 A fancier approach is to use the elisp profiler, ELP.  The profiler is
26790 (or should be) fully documented elsewhere, but to get you started
26791 there are a few steps that need to be followed.  First, instrument the
26792 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
26793 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
26794 RET message}.  Then perform the operation that is slow and press
26795 @kbd{M-x elp-results}.  You will then see which operations that takes
26796 time, and can debug them further.  If the entire operation takes much
26797 longer than the time spent in the slowest function in the profiler
26798 output, you probably profiled the wrong part of Gnus.  To reset
26799 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
26800 elp-restore-all} is supposed to remove profiling, but given the
26801 complexities and dynamic code generation in Gnus, it might not always
26802 work perfectly.
26803
26804 @cindex gnu.emacs.gnus
26805 @cindex ding mailing list
26806 If you just need help, you are better off asking on
26807 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
26808 @email{ding@@gnus.org, the ding mailing list}.  Write to
26809 @email{ding-request@@gnus.org} to subscribe.
26810
26811
26812 @page
26813 @node Gnus Reference Guide
26814 @section Gnus Reference Guide
26815
26816 It is my hope that other people will figure out smart stuff that Gnus
26817 can do, and that other people will write those smart things as well.  To
26818 facilitate that I thought it would be a good idea to describe the inner
26819 workings of Gnus.  And some of the not-so-inner workings, while I'm at
26820 it.
26821
26822 You can never expect the internals of a program not to change, but I
26823 will be defining (in some details) the interface between Gnus and its
26824 back ends (this is written in stone), the format of the score files
26825 (ditto), data structures (some are less likely to change than others)
26826 and general methods of operation.
26827
26828 @menu
26829 * Gnus Utility Functions::      Common functions and variable to use.
26830 * Back End Interface::          How Gnus communicates with the servers.
26831 * Score File Syntax::           A BNF definition of the score file standard.
26832 * Headers::                     How Gnus stores headers internally.
26833 * Ranges::                      A handy format for storing mucho numbers.
26834 * Group Info::                  The group info format.
26835 * Extended Interactive::        Symbolic prefixes and stuff.
26836 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
26837 * Various File Formats::        Formats of files that Gnus use.
26838 @end menu
26839
26840
26841 @node Gnus Utility Functions
26842 @subsection Gnus Utility Functions
26843 @cindex Gnus utility functions
26844 @cindex utility functions
26845 @cindex functions
26846 @cindex internal variables
26847
26848 When writing small functions to be run from hooks (and stuff), it's
26849 vital to have access to the Gnus internal functions and variables.
26850 Below is a list of the most common ones.
26851
26852 @table @code
26853
26854 @item gnus-newsgroup-name
26855 @vindex gnus-newsgroup-name
26856 This variable holds the name of the current newsgroup.
26857
26858 @item gnus-find-method-for-group
26859 @findex gnus-find-method-for-group
26860 A function that returns the select method for @var{group}.
26861
26862 @item gnus-group-real-name
26863 @findex gnus-group-real-name
26864 Takes a full (prefixed) Gnus group name, and returns the unprefixed
26865 name.
26866
26867 @item gnus-group-prefixed-name
26868 @findex gnus-group-prefixed-name
26869 Takes an unprefixed group name and a select method, and returns the full
26870 (prefixed) Gnus group name.
26871
26872 @item gnus-get-info
26873 @findex gnus-get-info
26874 Returns the group info list for @var{group}.
26875
26876 @item gnus-group-unread
26877 @findex gnus-group-unread
26878 The number of unread articles in @var{group}, or @code{t} if that is
26879 unknown.
26880
26881 @item gnus-active
26882 @findex gnus-active
26883 The active entry for @var{group}.
26884
26885 @item gnus-set-active
26886 @findex gnus-set-active
26887 Set the active entry for @var{group}.
26888
26889 @item gnus-add-current-to-buffer-list
26890 @findex gnus-add-current-to-buffer-list
26891 Adds the current buffer to the list of buffers to be killed on Gnus
26892 exit.
26893
26894 @item gnus-continuum-version
26895 @findex gnus-continuum-version
26896 Takes a Gnus version string as a parameter and returns a floating point
26897 number.  Earlier versions will always get a lower number than later
26898 versions.
26899
26900 @item gnus-group-read-only-p
26901 @findex gnus-group-read-only-p
26902 Says whether @var{group} is read-only or not.
26903
26904 @item gnus-news-group-p
26905 @findex gnus-news-group-p
26906 Says whether @var{group} came from a news back end.
26907
26908 @item gnus-ephemeral-group-p
26909 @findex gnus-ephemeral-group-p
26910 Says whether @var{group} is ephemeral or not.
26911
26912 @item gnus-server-to-method
26913 @findex gnus-server-to-method
26914 Returns the select method corresponding to @var{server}.
26915
26916 @item gnus-server-equal
26917 @findex gnus-server-equal
26918 Says whether two virtual servers are equal.
26919
26920 @item gnus-group-native-p
26921 @findex gnus-group-native-p
26922 Says whether @var{group} is native or not.
26923
26924 @item gnus-group-secondary-p
26925 @findex gnus-group-secondary-p
26926 Says whether @var{group} is secondary or not.
26927
26928 @item gnus-group-foreign-p
26929 @findex gnus-group-foreign-p
26930 Says whether @var{group} is foreign or not.
26931
26932 @item gnus-group-find-parameter
26933 @findex gnus-group-find-parameter
26934 Returns the parameter list of @var{group}.  If given a second parameter,
26935 returns the value of that parameter for @var{group}.
26936
26937 @item gnus-group-set-parameter
26938 @findex gnus-group-set-parameter
26939 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
26940
26941 @item gnus-narrow-to-body
26942 @findex gnus-narrow-to-body
26943 Narrows the current buffer to the body of the article.
26944
26945 @item gnus-check-backend-function
26946 @findex gnus-check-backend-function
26947 Takes two parameters, @var{function} and @var{group}.  If the back end
26948 @var{group} comes from supports @var{function}, return non-@code{nil}.
26949
26950 @lisp
26951 (gnus-check-backend-function "request-scan" "nnml:misc")
26952 @result{} t
26953 @end lisp
26954
26955 @item gnus-read-method
26956 @findex gnus-read-method
26957 Prompts the user for a select method.
26958
26959 @end table
26960
26961
26962 @node Back End Interface
26963 @subsection Back End Interface
26964
26965 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
26966 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
26967 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
26968 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
26969 examples of the latter we have @code{nntp-port-number} and
26970 @code{nnmbox-directory}.
26971
26972 When Gnus asks for information from a back end---say @code{nntp}---on
26973 something, it will normally include a virtual server name in the
26974 function parameters.  (If not, the back end should use the ``current''
26975 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
26976 server as its only (optional) parameter.  If this virtual server hasn't
26977 been opened, the function should fail.
26978
26979 Note that a virtual server name has no relation to some physical server
26980 name.  Take this example:
26981
26982 @lisp
26983 (nntp "odd-one"
26984       (nntp-address "ifi.uio.no")
26985       (nntp-port-number 4324))
26986 @end lisp
26987
26988 Here the virtual server name is @samp{odd-one} while the name of
26989 the physical server is @samp{ifi.uio.no}.
26990
26991 The back ends should be able to switch between several virtual servers.
26992 The standard back ends implement this by keeping an alist of virtual
26993 server environments that they pull down/push up when needed.
26994
26995 There are two groups of interface functions: @dfn{required functions},
26996 which must be present, and @dfn{optional functions}, which Gnus will
26997 always check for presence before attempting to call 'em.
26998
26999 All these functions are expected to return data in the buffer
27000 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
27001 unfortunately named, but we'll have to live with it.  When I talk about
27002 @dfn{resulting data}, I always refer to the data in that buffer.  When I
27003 talk about @dfn{return value}, I talk about the function value returned by
27004 the function call.  Functions that fail should return @code{nil} as the
27005 return value.
27006
27007 Some back ends could be said to be @dfn{server-forming} back ends, and
27008 some might be said not to be.  The latter are back ends that generally
27009 only operate on one group at a time, and have no concept of ``server''
27010 ---they have a group, and they deliver info on that group and nothing
27011 more.
27012
27013 Gnus identifies each message by way of group name and article number.  A
27014 few remarks about these article numbers might be useful.  First of all,
27015 the numbers are positive integers.  Secondly, it is normally not
27016 possible for later articles to ``re-use'' older article numbers without
27017 confusing Gnus.  That is, if a group has ever contained a message
27018 numbered 42, then no other message may get that number, or Gnus will get
27019 mightily confused.@footnote{See the function
27020 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
27021 Third, article numbers must be assigned in order of arrival in the
27022 group; this is not necessarily the same as the date of the message.
27023
27024 The previous paragraph already mentions all the ``hard'' restrictions that
27025 article numbers must fulfill.  But it seems that it might be useful to
27026 assign @emph{consecutive} article numbers, for Gnus gets quite confused
27027 if there are holes in the article numbering sequence.  However, due to
27028 the ``no-reuse'' restriction, holes cannot be avoided altogether.  It's
27029 also useful for the article numbers to start at 1 to avoid running out
27030 of numbers as long as possible.
27031
27032 Note that by convention, back ends are named @code{nnsomething}, but
27033 Gnus also comes with some @code{nnnotbackends}, such as
27034 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
27035
27036 In the examples and definitions I will refer to the imaginary back end
27037 @code{nnchoke}.
27038
27039 @cindex @code{nnchoke}
27040
27041 @menu
27042 * Required Back End Functions::  Functions that must be implemented.
27043 * Optional Back End Functions::  Functions that need not be implemented.
27044 * Error Messaging::             How to get messages and report errors.
27045 * Writing New Back Ends::       Extending old back ends.
27046 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
27047 * Mail-like Back Ends::         Some tips on mail back ends.
27048 @end menu
27049
27050
27051 @node Required Back End Functions
27052 @subsubsection Required Back End Functions
27053
27054 @table @code
27055
27056 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
27057
27058 @var{articles} is either a range of article numbers or a list of
27059 @code{Message-ID}s.  Current back ends do not fully support either---only
27060 sequences (lists) of article numbers, and most back ends do not support
27061 retrieval of @code{Message-ID}s.  But they should try for both.
27062
27063 The result data should either be HEADs or @acronym{NOV} lines, and the result
27064 value should either be @code{headers} or @code{nov} to reflect this.
27065 This might later be expanded to @code{various}, which will be a mixture
27066 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
27067
27068 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
27069 headers'', in some meaning of the word.  This is generally done by
27070 fetching (at most) @var{fetch-old} extra headers less than the smallest
27071 article number in @code{articles}, and filling the gaps as well.  The
27072 presence of this parameter can be ignored if the back end finds it
27073 cumbersome to follow the request.  If this is non-@code{nil} and not a
27074 number, do maximum fetches.
27075
27076 Here's an example HEAD:
27077
27078 @example
27079 221 1056 Article retrieved.
27080 Path: ifi.uio.no!sturles
27081 From: sturles@@ifi.uio.no (Sturle Sunde)
27082 Newsgroups: ifi.discussion
27083 Subject: Re: Something very droll
27084 Date: 27 Oct 1994 14:02:57 +0100
27085 Organization: Dept. of Informatics, University of Oslo, Norway
27086 Lines: 26
27087 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
27088 References: <38jdmq$4qu@@visbur.ifi.uio.no>
27089 NNTP-Posting-Host: holmenkollen.ifi.uio.no
27090 .
27091 @end example
27092
27093 So a @code{headers} return value would imply that there's a number of
27094 these in the data buffer.
27095
27096 Here's a BNF definition of such a buffer:
27097
27098 @example
27099 headers        = *head
27100 head           = error / valid-head
27101 error-message  = [ "4" / "5" ] 2number " " <error message> eol
27102 valid-head     = valid-message *header "." eol
27103 valid-message  = "221 " <number> " Article retrieved." eol
27104 header         = <text> eol
27105 @end example
27106
27107 @cindex BNF
27108 (The version of BNF used here is the one used in RFC822.)
27109
27110 If the return value is @code{nov}, the data buffer should contain
27111 @dfn{network overview database} lines.  These are basically fields
27112 separated by tabs.
27113
27114 @example
27115 nov-buffer = *nov-line
27116 nov-line   = field 7*8[ <TAB> field ] eol
27117 field      = <text except TAB>
27118 @end example
27119
27120 For a closer look at what should be in those fields,
27121 @pxref{Headers}.
27122
27123
27124 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
27125
27126 @var{server} is here the virtual server name.  @var{definitions} is a
27127 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
27128
27129 If the server can't be opened, no error should be signaled.  The back end
27130 may then choose to refuse further attempts at connecting to this
27131 server.  In fact, it should do so.
27132
27133 If the server is opened already, this function should return a
27134 non-@code{nil} value.  There should be no data returned.
27135
27136
27137 @item (nnchoke-close-server &optional SERVER)
27138
27139 Close connection to @var{server} and free all resources connected
27140 to it.  Return @code{nil} if the server couldn't be closed for some
27141 reason.
27142
27143 There should be no data returned.
27144
27145
27146 @item (nnchoke-request-close)
27147
27148 Close connection to all servers and free all resources that the back end
27149 have reserved.  All buffers that have been created by that back end
27150 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
27151 function is generally only called when Gnus is shutting down.
27152
27153 There should be no data returned.
27154
27155
27156 @item (nnchoke-server-opened &optional SERVER)
27157
27158 If @var{server} is the current virtual server, and the connection to the
27159 physical server is alive, then this function should return a
27160 non-@code{nil} value.  This function should under no circumstances
27161 attempt to reconnect to a server we have lost connection to.
27162
27163 There should be no data returned.
27164
27165
27166 @item (nnchoke-status-message &optional SERVER)
27167
27168 This function should return the last error message from @var{server}.
27169
27170 There should be no data returned.
27171
27172
27173 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
27174
27175 The result data from this function should be the article specified by
27176 @var{article}.  This might either be a @code{Message-ID} or a number.
27177 It is optional whether to implement retrieval by @code{Message-ID}, but
27178 it would be nice if that were possible.
27179
27180 If @var{to-buffer} is non-@code{nil}, the result data should be returned
27181 in this buffer instead of the normal data buffer.  This is to make it
27182 possible to avoid copying large amounts of data from one buffer to
27183 another, while Gnus mainly requests articles to be inserted directly
27184 into its article buffer.
27185
27186 If it is at all possible, this function should return a cons cell where
27187 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
27188 the article number.  This will enable Gnus to find out what the real
27189 group and article numbers are when fetching articles by
27190 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
27191 on successful article retrieval.
27192
27193
27194 @item (nnchoke-request-group GROUP &optional SERVER FAST)
27195
27196 Get data on @var{group}.  This function also has the side effect of
27197 making @var{group} the current group.
27198
27199 If @var{fast}, don't bother to return useful data, just make @var{group}
27200 the current group.
27201
27202 Here's an example of some result data and a definition of the same:
27203
27204 @example
27205 211 56 1000 1059 ifi.discussion
27206 @end example
27207
27208 The first number is the status, which should be 211.  Next is the
27209 total number of articles in the group, the lowest article number, the
27210 highest article number, and finally the group name.  Note that the total
27211 number of articles may be less than one might think while just
27212 considering the highest and lowest article numbers, but some articles
27213 may have been canceled.  Gnus just discards the total-number, so
27214 whether one should take the bother to generate it properly (if that is a
27215 problem) is left as an exercise to the reader.  If the group contains no
27216 articles, the lowest article number should be reported as 1 and the
27217 highest as 0.
27218
27219 @example
27220 group-status = [ error / info ] eol
27221 error        = [ "4" / "5" ] 2<number> " " <Error message>
27222 info         = "211 " 3* [ <number> " " ] <string>
27223 @end example
27224
27225
27226 @item (nnchoke-close-group GROUP &optional SERVER)
27227
27228 Close @var{group} and free any resources connected to it.  This will be
27229 a no-op on most back ends.
27230
27231 There should be no data returned.
27232
27233
27234 @item (nnchoke-request-list &optional SERVER)
27235
27236 Return a list of all groups available on @var{server}.  And that means
27237 @emph{all}.
27238
27239 Here's an example from a server that only carries two groups:
27240
27241 @example
27242 ifi.test 0000002200 0000002000 y
27243 ifi.discussion 3324 3300 n
27244 @end example
27245
27246 On each line we have a group name, then the highest article number in
27247 that group, the lowest article number, and finally a flag.  If the group
27248 contains no articles, the lowest article number should be reported as 1
27249 and the highest as 0.
27250
27251 @example
27252 active-file = *active-line
27253 active-line = name " " <number> " " <number> " " flags eol
27254 name        = <string>
27255 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
27256 @end example
27257
27258 The flag says whether the group is read-only (@samp{n}), is moderated
27259 (@samp{m}), is dead (@samp{x}), is aliased to some other group
27260 (@samp{=other-group}) or none of the above (@samp{y}).
27261
27262
27263 @item (nnchoke-request-post &optional SERVER)
27264
27265 This function should post the current buffer.  It might return whether
27266 the posting was successful or not, but that's not required.  If, for
27267 instance, the posting is done asynchronously, it has generally not been
27268 completed by the time this function concludes.  In that case, this
27269 function should set up some kind of sentinel to beep the user loud and
27270 clear if the posting could not be completed.
27271
27272 There should be no result data from this function.
27273
27274 @end table
27275
27276
27277 @node Optional Back End Functions
27278 @subsubsection Optional Back End Functions
27279
27280 @table @code
27281
27282 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
27283
27284 @var{groups} is a list of groups, and this function should request data
27285 on all those groups.  How it does it is of no concern to Gnus, but it
27286 should attempt to do this in a speedy fashion.
27287
27288 The return value of this function can be either @code{active} or
27289 @code{group}, which says what the format of the result data is.  The
27290 former is in the same format as the data from
27291 @code{nnchoke-request-list}, while the latter is a buffer full of lines
27292 in the same format as @code{nnchoke-request-group} gives.
27293
27294 @example
27295 group-buffer = *active-line / *group-status
27296 @end example
27297
27298
27299 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
27300
27301 A Gnus group info (@pxref{Group Info}) is handed to the back end for
27302 alterations.  This comes in handy if the back end really carries all
27303 the information (as is the case with virtual and imap groups).  This
27304 function should destructively alter the info to suit its needs, and
27305 should return a non-@code{nil} value.
27306
27307 There should be no result data from this function.
27308
27309
27310 @item (nnchoke-request-type GROUP &optional ARTICLE)
27311
27312 When the user issues commands for ``sending news'' (@kbd{F} in the
27313 summary buffer, for instance), Gnus has to know whether the article the
27314 user is following up on is news or mail.  This function should return
27315 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
27316 is mail and @code{unknown} if the type can't be decided.  (The
27317 @var{article} parameter is necessary in @code{nnvirtual} groups which
27318 might very well combine mail groups and news groups.)  Both @var{group}
27319 and @var{article} may be @code{nil}.
27320
27321 There should be no result data from this function.
27322
27323
27324 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
27325
27326 Set/remove/add marks on articles.  Normally Gnus handles the article
27327 marks (such as read, ticked, expired etc) internally, and store them in
27328 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
27329 all information about the articles on the server, so Gnus need to
27330 propagate the mark information to the server.
27331
27332 @var{action} is a list of mark setting requests, having this format:
27333
27334 @example
27335 (RANGE ACTION MARK)
27336 @end example
27337
27338 @var{range} is a range of articles you wish to update marks on.
27339 @var{action} is @code{add} or @code{del}, used to add marks or remove
27340 marks (preserving all marks not mentioned).  @var{mark} is a list of
27341 marks; where each mark is a symbol.  Currently used marks are
27342 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
27343 @code{dormant}, @code{save}, @code{download}, @code{unsend},
27344 @code{forward} and @code{recent}, but your back end should, if
27345 possible, not limit itself to these.
27346
27347 Given contradictory actions, the last action in the list should be the
27348 effective one.  That is, if your action contains a request to add the
27349 @code{tick} mark on article 1 and, later in the list, a request to
27350 remove the mark on the same article, the mark should in fact be removed.
27351
27352 An example action list:
27353
27354 @example
27355 (((5 12 30) 'del '(tick))
27356  ((10 . 90) 'add '(read expire))
27357  ((92 94) 'del '(read)))
27358 @end example
27359
27360 The function should return a range of articles it wasn't able to set the
27361 mark on (currently not used for anything).
27362
27363 There should be no result data from this function.
27364
27365 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
27366
27367 If the user tries to set a mark that the back end doesn't like, this
27368 function may change the mark.  Gnus will use whatever this function
27369 returns as the mark for @var{article} instead of the original
27370 @var{mark}.  If the back end doesn't care, it must return the original
27371 @var{mark}, and not @code{nil} or any other type of garbage.
27372
27373 The only use for this I can see is what @code{nnvirtual} does with
27374 it---if a component group is auto-expirable, marking an article as read
27375 in the virtual group should result in the article being marked as
27376 expirable.
27377
27378 There should be no result data from this function.
27379
27380
27381 @item (nnchoke-request-scan &optional GROUP SERVER)
27382
27383 This function may be called at any time (by Gnus or anything else) to
27384 request that the back end check for incoming articles, in one way or
27385 another.  A mail back end will typically read the spool file or query
27386 the @acronym{POP} server when this function is invoked.  The
27387 @var{group} doesn't have to be heeded---if the back end decides that
27388 it is too much work just scanning for a single group, it may do a
27389 total scan of all groups.  It would be nice, however, to keep things
27390 local if that's practical.
27391
27392 There should be no result data from this function.
27393
27394
27395 @item (nnchoke-request-group-description GROUP &optional SERVER)
27396
27397 The result data from this function should be a description of
27398 @var{group}.
27399
27400 @example
27401 description-line = name <TAB> description eol
27402 name             = <string>
27403 description      = <text>
27404 @end example
27405
27406 @item (nnchoke-request-list-newsgroups &optional SERVER)
27407
27408 The result data from this function should be the description of all
27409 groups available on the server.
27410
27411 @example
27412 description-buffer = *description-line
27413 @end example
27414
27415
27416 @item (nnchoke-request-newgroups DATE &optional SERVER)
27417
27418 The result data from this function should be all groups that were
27419 created after @samp{date}, which is in normal human-readable date format
27420 (i.e., the date format used in mail and news headers, and returned by
27421 the function @code{message-make-date} by default).  The data should be
27422 in the active buffer format.
27423
27424 It is okay for this function to return ``too many'' groups; some back ends
27425 might find it cheaper to return the full list of groups, rather than
27426 just the new groups.  But don't do this for back ends with many groups.
27427 Normally, if the user creates the groups herself, there won't be too
27428 many groups, so @code{nnml} and the like are probably safe.  But for
27429 back ends like @code{nntp}, where the groups have been created by the
27430 server, it is quite likely that there can be many groups.
27431
27432
27433 @item (nnchoke-request-create-group GROUP &optional SERVER)
27434
27435 This function should create an empty group with name @var{group}.
27436
27437 There should be no return data.
27438
27439
27440 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
27441
27442 This function should run the expiry process on all articles in the
27443 @var{articles} range (which is currently a simple list of article
27444 numbers.)  It is left up to the back end to decide how old articles
27445 should be before they are removed by this function.  If @var{force} is
27446 non-@code{nil}, all @var{articles} should be deleted, no matter how new
27447 they are.
27448
27449 This function should return a list of articles that it did not/was not
27450 able to delete.
27451
27452 There should be no result data returned.
27453
27454
27455 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
27456
27457 This function should move @var{article} (which is a number) from
27458 @var{group} by calling @var{accept-form}.
27459
27460 This function should ready the article in question for moving by
27461 removing any header lines it has added to the article, and generally
27462 should ``tidy up'' the article.  Then it should @code{eval}
27463 @var{accept-form} in the buffer where the ``tidy'' article is.  This
27464 will do the actual copying.  If this @code{eval} returns a
27465 non-@code{nil} value, the article should be removed.
27466
27467 If @var{last} is @code{nil}, that means that there is a high likelihood
27468 that there will be more requests issued shortly, so that allows some
27469 optimizations.
27470
27471 The function should return a cons where the @code{car} is the group name and
27472 the @code{cdr} is the article number that the article was entered as.
27473
27474 There should be no data returned.
27475
27476
27477 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
27478
27479 This function takes the current buffer and inserts it into @var{group}.
27480 If @var{last} in @code{nil}, that means that there will be more calls to
27481 this function in short order.
27482
27483 The function should return a cons where the @code{car} is the group name and
27484 the @code{cdr} is the article number that the article was entered as.
27485
27486 The group should exist before the back end is asked to accept the
27487 article for that group.
27488
27489 There should be no data returned.
27490
27491
27492 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
27493
27494 This function should remove @var{article} (which is a number) from
27495 @var{group} and insert @var{buffer} there instead.
27496
27497 There should be no data returned.
27498
27499
27500 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
27501
27502 This function should delete @var{group}.  If @var{force}, it should
27503 really delete all the articles in the group, and then delete the group
27504 itself.  (If there is such a thing as ``the group itself''.)
27505
27506 There should be no data returned.
27507
27508
27509 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
27510
27511 This function should rename @var{group} into @var{new-name}.  All
27512 articles in @var{group} should move to @var{new-name}.
27513
27514 There should be no data returned.
27515
27516 @end table
27517
27518
27519 @node Error Messaging
27520 @subsubsection Error Messaging
27521
27522 @findex nnheader-report
27523 @findex nnheader-get-report
27524 The back ends should use the function @code{nnheader-report} to report
27525 error conditions---they should not raise errors when they aren't able to
27526 perform a request.  The first argument to this function is the back end
27527 symbol, and the rest are interpreted as arguments to @code{format} if
27528 there are multiple of them, or just a string if there is one of them.
27529 This function must always returns @code{nil}.
27530
27531 @lisp
27532 (nnheader-report 'nnchoke "You did something totally bogus")
27533
27534 (nnheader-report 'nnchoke "Could not request group %s" group)
27535 @end lisp
27536
27537 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
27538 @code{nil} back from a server, and this function returns the most
27539 recently reported message for the back end in question.  This function
27540 takes one argument---the server symbol.
27541
27542 Internally, these functions access @var{back-end}@code{-status-string},
27543 so the @code{nnchoke} back end will have its error message stored in
27544 @code{nnchoke-status-string}.
27545
27546
27547 @node Writing New Back Ends
27548 @subsubsection Writing New Back Ends
27549
27550 Many back ends are quite similar.  @code{nnml} is just like
27551 @code{nnspool}, but it allows you to edit the articles on the server.
27552 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
27553 and it doesn't maintain overview databases.  @code{nndir} is just like
27554 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
27555 editing articles.
27556
27557 It would make sense if it were possible to ``inherit'' functions from
27558 back ends when writing new back ends.  And, indeed, you can do that if you
27559 want to.  (You don't have to if you don't want to, of course.)
27560
27561 All the back ends declare their public variables and functions by using a
27562 package called @code{nnoo}.
27563
27564 To inherit functions from other back ends (and allow other back ends to
27565 inherit functions from the current back end), you should use the
27566 following macros:
27567
27568 @table @code
27569
27570 @item nnoo-declare
27571 This macro declares the first parameter to be a child of the subsequent
27572 parameters.  For instance:
27573
27574 @lisp
27575 (nnoo-declare nndir
27576   nnml nnmh)
27577 @end lisp
27578
27579 @code{nndir} has declared here that it intends to inherit functions from
27580 both @code{nnml} and @code{nnmh}.
27581
27582 @item defvoo
27583 This macro is equivalent to @code{defvar}, but registers the variable as
27584 a public server variable.  Most state-oriented variables should be
27585 declared with @code{defvoo} instead of @code{defvar}.
27586
27587 In addition to the normal @code{defvar} parameters, it takes a list of
27588 variables in the parent back ends to map the variable to when executing
27589 a function in those back ends.
27590
27591 @lisp
27592 (defvoo nndir-directory nil
27593   "Where nndir will look for groups."
27594   nnml-current-directory nnmh-current-directory)
27595 @end lisp
27596
27597 This means that @code{nnml-current-directory} will be set to
27598 @code{nndir-directory} when an @code{nnml} function is called on behalf
27599 of @code{nndir}.  (The same with @code{nnmh}.)
27600
27601 @item nnoo-define-basics
27602 This macro defines some common functions that almost all back ends should
27603 have.
27604
27605 @lisp
27606 (nnoo-define-basics nndir)
27607 @end lisp
27608
27609 @item deffoo
27610 This macro is just like @code{defun} and takes the same parameters.  In
27611 addition to doing the normal @code{defun} things, it registers the
27612 function as being public so that other back ends can inherit it.
27613
27614 @item nnoo-map-functions
27615 This macro allows mapping of functions from the current back end to
27616 functions from the parent back ends.
27617
27618 @lisp
27619 (nnoo-map-functions nndir
27620   (nnml-retrieve-headers 0 nndir-current-group 0 0)
27621   (nnmh-request-article 0 nndir-current-group 0 0))
27622 @end lisp
27623
27624 This means that when @code{nndir-retrieve-headers} is called, the first,
27625 third, and fourth parameters will be passed on to
27626 @code{nnml-retrieve-headers}, while the second parameter is set to the
27627 value of @code{nndir-current-group}.
27628
27629 @item nnoo-import
27630 This macro allows importing functions from back ends.  It should be the
27631 last thing in the source file, since it will only define functions that
27632 haven't already been defined.
27633
27634 @lisp
27635 (nnoo-import nndir
27636   (nnmh
27637    nnmh-request-list
27638    nnmh-request-newgroups)
27639   (nnml))
27640 @end lisp
27641
27642 This means that calls to @code{nndir-request-list} should just be passed
27643 on to @code{nnmh-request-list}, while all public functions from
27644 @code{nnml} that haven't been defined in @code{nndir} yet should be
27645 defined now.
27646
27647 @end table
27648
27649 Below is a slightly shortened version of the @code{nndir} back end.
27650
27651 @lisp
27652 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
27653 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
27654
27655 ;;; @r{Code:}
27656
27657 (require 'nnheader)
27658 (require 'nnmh)
27659 (require 'nnml)
27660 (require 'nnoo)
27661 (eval-when-compile (require 'cl))
27662
27663 (nnoo-declare nndir
27664   nnml nnmh)
27665
27666 (defvoo nndir-directory nil
27667   "Where nndir will look for groups."
27668   nnml-current-directory nnmh-current-directory)
27669
27670 (defvoo nndir-nov-is-evil nil
27671   "*Non-nil means that nndir will never retrieve NOV headers."
27672   nnml-nov-is-evil)
27673
27674 (defvoo nndir-current-group ""
27675   nil
27676   nnml-current-group nnmh-current-group)
27677 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
27678 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
27679
27680 (defvoo nndir-status-string "" nil nnmh-status-string)
27681 (defconst nndir-version "nndir 1.0")
27682
27683 ;;; @r{Interface functions.}
27684
27685 (nnoo-define-basics nndir)
27686
27687 (deffoo nndir-open-server (server &optional defs)
27688   (setq nndir-directory
27689         (or (cadr (assq 'nndir-directory defs))
27690             server))
27691   (unless (assq 'nndir-directory defs)
27692     (push `(nndir-directory ,server) defs))
27693   (push `(nndir-current-group
27694           ,(file-name-nondirectory
27695             (directory-file-name nndir-directory)))
27696         defs)
27697   (push `(nndir-top-directory
27698           ,(file-name-directory (directory-file-name nndir-directory)))
27699         defs)
27700   (nnoo-change-server 'nndir server defs))
27701
27702 (nnoo-map-functions nndir
27703   (nnml-retrieve-headers 0 nndir-current-group 0 0)
27704   (nnmh-request-article 0 nndir-current-group 0 0)
27705   (nnmh-request-group nndir-current-group 0 0)
27706   (nnmh-close-group nndir-current-group 0))
27707
27708 (nnoo-import nndir
27709   (nnmh
27710    nnmh-status-message
27711    nnmh-request-list
27712    nnmh-request-newgroups))
27713
27714 (provide 'nndir)
27715 @end lisp
27716
27717
27718 @node Hooking New Back Ends Into Gnus
27719 @subsubsection Hooking New Back Ends Into Gnus
27720
27721 @vindex gnus-valid-select-methods
27722 @findex gnus-declare-backend
27723 Having Gnus start using your new back end is rather easy---you just
27724 declare it with the @code{gnus-declare-backend} functions.  This will
27725 enter the back end into the @code{gnus-valid-select-methods} variable.
27726
27727 @code{gnus-declare-backend} takes two parameters---the back end name and
27728 an arbitrary number of @dfn{abilities}.
27729
27730 Here's an example:
27731
27732 @lisp
27733 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
27734 @end lisp
27735
27736 The above line would then go in the @file{nnchoke.el} file.
27737
27738 The abilities can be:
27739
27740 @table @code
27741 @item mail
27742 This is a mailish back end---followups should (probably) go via mail.
27743 @item post
27744 This is a newsish back end---followups should (probably) go via news.
27745 @item post-mail
27746 This back end supports both mail and news.
27747 @item none
27748 This is neither a post nor mail back end---it's something completely
27749 different.
27750 @item respool
27751 It supports respooling---or rather, it is able to modify its source
27752 articles and groups.
27753 @item address
27754 The name of the server should be in the virtual server name.  This is
27755 true for almost all back ends.
27756 @item prompt-address
27757 The user should be prompted for an address when doing commands like
27758 @kbd{B} in the group buffer.  This is true for back ends like
27759 @code{nntp}, but not @code{nnmbox}, for instance.
27760 @end table
27761
27762
27763 @node Mail-like Back Ends
27764 @subsubsection Mail-like Back Ends
27765
27766 One of the things that separate the mail back ends from the rest of the
27767 back ends is the heavy dependence by most of the mail back ends on
27768 common functions in @file{nnmail.el}.  For instance, here's the
27769 definition of @code{nnml-request-scan}:
27770
27771 @lisp
27772 (deffoo nnml-request-scan (&optional group server)
27773   (setq nnml-article-file-alist nil)
27774   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
27775 @end lisp
27776
27777 It simply calls @code{nnmail-get-new-mail} with a few parameters,
27778 and @code{nnmail} takes care of all the moving and splitting of the
27779 mail.
27780
27781 This function takes four parameters.
27782
27783 @table @var
27784 @item method
27785 This should be a symbol to designate which back end is responsible for
27786 the call.
27787
27788 @item exit-function
27789 This function should be called after the splitting has been performed.
27790
27791 @item temp-directory
27792 Where the temporary files should be stored.
27793
27794 @item group
27795 This optional argument should be a group name if the splitting is to be
27796 performed for one group only.
27797 @end table
27798
27799 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
27800 save each article.  @var{back-end}@code{-active-number} will be called to
27801 find the article number assigned to this article.
27802
27803 The function also uses the following variables:
27804 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
27805 this back end); and @var{back-end}@code{-group-alist} and
27806 @var{back-end}@code{-active-file} to generate the new active file.
27807 @var{back-end}@code{-group-alist} should be a group-active alist, like
27808 this:
27809
27810 @example
27811 (("a-group" (1 . 10))
27812  ("some-group" (34 . 39)))
27813 @end example
27814
27815
27816 @node Score File Syntax
27817 @subsection Score File Syntax
27818
27819 Score files are meant to be easily parseable, but yet extremely
27820 mallable.  It was decided that something that had the same read syntax
27821 as an Emacs Lisp list would fit that spec.
27822
27823 Here's a typical score file:
27824
27825 @lisp
27826 (("summary"
27827   ("win95" -10000 nil s)
27828   ("Gnus"))
27829  ("from"
27830   ("Lars" -1000))
27831  (mark -100))
27832 @end lisp
27833
27834 BNF definition of a score file:
27835
27836 @example
27837 score-file      = "" / "(" *element ")"
27838 element         = rule / atom
27839 rule            = string-rule / number-rule / date-rule
27840 string-rule     = "(" quote string-header quote space *string-match ")"
27841 number-rule     = "(" quote number-header quote space *number-match ")"
27842 date-rule       = "(" quote date-header quote space *date-match ")"
27843 quote           = <ascii 34>
27844 string-header   = "subject" / "from" / "references" / "message-id" /
27845                   "xref" / "body" / "head" / "all" / "followup"
27846 number-header   = "lines" / "chars"
27847 date-header     = "date"
27848 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
27849                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
27850 score           = "nil" / <integer>
27851 date            = "nil" / <natural number>
27852 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
27853                   "r" / "regex" / "R" / "Regex" /
27854                   "e" / "exact" / "E" / "Exact" /
27855                   "f" / "fuzzy" / "F" / "Fuzzy"
27856 number-match    = "(" <integer> [ "" / [ space score [ "" /
27857                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
27858 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
27859 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
27860                   space date [ "" / [ space date-match-t ] ] ] ] ")"
27861 date-match-t    = "nil" / "at" / "before" / "after"
27862 atom            = "(" [ required-atom / optional-atom ] ")"
27863 required-atom   = mark / expunge / mark-and-expunge / files /
27864                   exclude-files / read-only / touched
27865 optional-atom   = adapt / local / eval
27866 mark            = "mark" space nil-or-number
27867 nil-or-number   = "nil" / <integer>
27868 expunge         = "expunge" space nil-or-number
27869 mark-and-expunge = "mark-and-expunge" space nil-or-number
27870 files           = "files" *[ space <string> ]
27871 exclude-files   = "exclude-files" *[ space <string> ]
27872 read-only       = "read-only" [ space "nil" / space "t" ]
27873 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
27874 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
27875 local           = "local" *[ space "(" <string> space <form> ")" ]
27876 eval            = "eval" space <form>
27877 space           = *[ " " / <TAB> / <NEWLINE> ]
27878 @end example
27879
27880 Any unrecognized elements in a score file should be ignored, but not
27881 discarded.
27882
27883 As you can see, white space is needed, but the type and amount of white
27884 space is irrelevant.  This means that formatting of the score file is
27885 left up to the programmer---if it's simpler to just spew it all out on
27886 one looong line, then that's ok.
27887
27888 The meaning of the various atoms are explained elsewhere in this
27889 manual (@pxref{Score File Format}).
27890
27891
27892 @node Headers
27893 @subsection Headers
27894
27895 Internally Gnus uses a format for storing article headers that
27896 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
27897 almost suspect that the author looked at the @acronym{NOV} specification and
27898 just shamelessly @emph{stole} the entire thing, and one would be right.
27899
27900 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
27901 RFC 1036 to talk about lines in the head of an article (e.g.,
27902 @code{From}).  It is used by many people as a synonym for
27903 ``head''---``the header and the body''.  (That should be avoided, in my
27904 opinion.)  And Gnus uses a format internally that it calls ``header'',
27905 which is what I'm talking about here.  This is a 9-element vector,
27906 basically, with each header (ouch) having one slot.
27907
27908 These slots are, in order: @code{number}, @code{subject}, @code{from},
27909 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
27910 @code{xref}, and @code{extra}.  There are macros for accessing and
27911 setting these slots---they all have predictable names beginning with
27912 @code{mail-header-} and @code{mail-header-set-}, respectively.
27913
27914 All these slots contain strings, except the @code{extra} slot, which
27915 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
27916
27917
27918 @node Ranges
27919 @subsection Ranges
27920
27921 @sc{gnus} introduced a concept that I found so useful that I've started
27922 using it a lot and have elaborated on it greatly.
27923
27924 The question is simple: If you have a large amount of objects that are
27925 identified by numbers (say, articles, to take a @emph{wild} example)
27926 that you want to qualify as being ``included'', a normal sequence isn't
27927 very useful.  (A 200,000 length sequence is a bit long-winded.)
27928
27929 The solution is as simple as the question: You just collapse the
27930 sequence.
27931
27932 @example
27933 (1 2 3 4 5 6 10 11 12)
27934 @end example
27935
27936 is transformed into
27937
27938 @example
27939 ((1 . 6) (10 . 12))
27940 @end example
27941
27942 To avoid having those nasty @samp{(13 . 13)} elements to denote a
27943 lonesome object, a @samp{13} is a valid element:
27944
27945 @example
27946 ((1 . 6) 7 (10 . 12))
27947 @end example
27948
27949 This means that comparing two ranges to find out whether they are equal
27950 is slightly tricky:
27951
27952 @example
27953 ((1 . 5) 7 8 (10 . 12))
27954 @end example
27955
27956 and
27957
27958 @example
27959 ((1 . 5) (7 . 8) (10 . 12))
27960 @end example
27961
27962 are equal.  In fact, any non-descending list is a range:
27963
27964 @example
27965 (1 2 3 4 5)
27966 @end example
27967
27968 is a perfectly valid range, although a pretty long-winded one.  This is
27969 also valid:
27970
27971 @example
27972 (1 . 5)
27973 @end example
27974
27975 and is equal to the previous range.
27976
27977 Here's a BNF definition of ranges.  Of course, one must remember the
27978 semantic requirement that the numbers are non-descending.  (Any number
27979 of repetition of the same number is allowed, but apt to disappear in
27980 range handling.)
27981
27982 @example
27983 range           = simple-range / normal-range
27984 simple-range    = "(" number " . " number ")"
27985 normal-range    = "(" start-contents ")"
27986 contents        = "" / simple-range *[ " " contents ] /
27987                   number *[ " " contents ]
27988 @end example
27989
27990 Gnus currently uses ranges to keep track of read articles and article
27991 marks.  I plan on implementing a number of range operators in C if The
27992 Powers That Be are willing to let me.  (I haven't asked yet, because I
27993 need to do some more thinking on what operators I need to make life
27994 totally range-based without ever having to convert back to normal
27995 sequences.)
27996
27997
27998 @node Group Info
27999 @subsection Group Info
28000
28001 Gnus stores all permanent info on groups in a @dfn{group info} list.
28002 This list is from three to six elements (or more) long and exhaustively
28003 describes the group.
28004
28005 Here are two example group infos; one is a very simple group while the
28006 second is a more complex one:
28007
28008 @example
28009 ("no.group" 5 ((1 . 54324)))
28010
28011 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
28012                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
28013                 (nnml "")
28014                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
28015 @end example
28016
28017 The first element is the @dfn{group name}---as Gnus knows the group,
28018 anyway.  The second element is the @dfn{subscription level}, which
28019 normally is a small integer.  (It can also be the @dfn{rank}, which is a
28020 cons cell where the @code{car} is the level and the @code{cdr} is the
28021 score.)  The third element is a list of ranges of read articles.  The
28022 fourth element is a list of lists of article marks of various kinds.
28023 The fifth element is the select method (or virtual server, if you like).
28024 The sixth element is a list of @dfn{group parameters}, which is what
28025 this section is about.
28026
28027 Any of the last three elements may be missing if they are not required.
28028 In fact, the vast majority of groups will normally only have the first
28029 three elements, which saves quite a lot of cons cells.
28030
28031 Here's a BNF definition of the group info format:
28032
28033 @example
28034 info          = "(" group space ralevel space read
28035                 [ "" / [ space marks-list [ "" / [ space method [ "" /
28036                 space parameters ] ] ] ] ] ")"
28037 group         = quote <string> quote
28038 ralevel       = rank / level
28039 level         = <integer in the range of 1 to inf>
28040 rank          = "(" level "." score ")"
28041 score         = <integer in the range of 1 to inf>
28042 read          = range
28043 marks-lists   = nil / "(" *marks ")"
28044 marks         = "(" <string> range ")"
28045 method        = "(" <string> *elisp-forms ")"
28046 parameters    = "(" *elisp-forms ")"
28047 @end example
28048
28049 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
28050 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
28051 in pseudo-BNF.
28052
28053 If you have a Gnus info and want to access the elements, Gnus offers a
28054 series of macros for getting/setting these elements.
28055
28056 @table @code
28057 @item gnus-info-group
28058 @itemx gnus-info-set-group
28059 @findex gnus-info-group
28060 @findex gnus-info-set-group
28061 Get/set the group name.
28062
28063 @item gnus-info-rank
28064 @itemx gnus-info-set-rank
28065 @findex gnus-info-rank
28066 @findex gnus-info-set-rank
28067 Get/set the group rank (@pxref{Group Score}).
28068
28069 @item gnus-info-level
28070 @itemx gnus-info-set-level
28071 @findex gnus-info-level
28072 @findex gnus-info-set-level
28073 Get/set the group level.
28074
28075 @item gnus-info-score
28076 @itemx gnus-info-set-score
28077 @findex gnus-info-score
28078 @findex gnus-info-set-score
28079 Get/set the group score (@pxref{Group Score}).
28080
28081 @item gnus-info-read
28082 @itemx gnus-info-set-read
28083 @findex gnus-info-read
28084 @findex gnus-info-set-read
28085 Get/set the ranges of read articles.
28086
28087 @item gnus-info-marks
28088 @itemx gnus-info-set-marks
28089 @findex gnus-info-marks
28090 @findex gnus-info-set-marks
28091 Get/set the lists of ranges of marked articles.
28092
28093 @item gnus-info-method
28094 @itemx gnus-info-set-method
28095 @findex gnus-info-method
28096 @findex gnus-info-set-method
28097 Get/set the group select method.
28098
28099 @item gnus-info-params
28100 @itemx gnus-info-set-params
28101 @findex gnus-info-params
28102 @findex gnus-info-set-params
28103 Get/set the group parameters.
28104 @end table
28105
28106 All the getter functions take one parameter---the info list.  The setter
28107 functions take two parameters---the info list and the new value.
28108
28109 The last three elements in the group info aren't mandatory, so it may be
28110 necessary to extend the group info before setting the element.  If this
28111 is necessary, you can just pass on a non-@code{nil} third parameter to
28112 the three final setter functions to have this happen automatically.
28113
28114
28115 @node Extended Interactive
28116 @subsection Extended Interactive
28117 @cindex interactive
28118 @findex gnus-interactive
28119
28120 Gnus extends the standard Emacs @code{interactive} specification
28121 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
28122 Prefixes}).  Here's an example of how this is used:
28123
28124 @lisp
28125 (defun gnus-summary-increase-score (&optional score symp)
28126   (interactive (gnus-interactive "P\ny"))
28127   ...
28128   )
28129 @end lisp
28130
28131 The best thing to do would have been to implement
28132 @code{gnus-interactive} as a macro which would have returned an
28133 @code{interactive} form, but this isn't possible since Emacs checks
28134 whether a function is interactive or not by simply doing an @code{assq}
28135 on the lambda form.  So, instead we have @code{gnus-interactive}
28136 function that takes a string and returns values that are usable to
28137 @code{interactive}.
28138
28139 This function accepts (almost) all normal @code{interactive} specs, but
28140 adds a few more.
28141
28142 @table @samp
28143 @item y
28144 @vindex gnus-current-prefix-symbol
28145 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
28146 variable.
28147
28148 @item Y
28149 @vindex gnus-current-prefix-symbols
28150 A list of the current symbolic prefixes---the
28151 @code{gnus-current-prefix-symbol} variable.
28152
28153 @item A
28154 The current article number---the @code{gnus-summary-article-number}
28155 function.
28156
28157 @item H
28158 The current article header---the @code{gnus-summary-article-header}
28159 function.
28160
28161 @item g
28162 The current group name---the @code{gnus-group-group-name}
28163 function.
28164
28165 @end table
28166
28167
28168 @node Emacs/XEmacs Code
28169 @subsection Emacs/XEmacs Code
28170 @cindex XEmacs
28171 @cindex Emacsen
28172
28173 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
28174 platforms must be the primary one.  I chose Emacs.  Not because I don't
28175 like XEmacs or Mule, but because it comes first alphabetically.
28176
28177 This means that Gnus will byte-compile under Emacs with nary a warning,
28178 while XEmacs will pump out gigabytes of warnings while byte-compiling.
28179 As I use byte-compilation warnings to help me root out trivial errors in
28180 Gnus, that's very useful.
28181
28182 I've also consistently used Emacs function interfaces, but have used
28183 Gnusey aliases for the functions.  To take an example:  Emacs defines a
28184 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
28185 function.  I then define a function called @code{gnus-run-at-time} that
28186 takes the same parameters as the Emacs @code{run-at-time}.  When running
28187 Gnus under Emacs, the former function is just an alias for the latter.
28188 However, when running under XEmacs, the former is an alias for the
28189 following function:
28190
28191 @lisp
28192 (defun gnus-xmas-run-at-time (time repeat function &rest args)
28193   (start-itimer
28194    "gnus-run-at-time"
28195    `(lambda ()
28196       (,function ,@@args))
28197    time repeat))
28198 @end lisp
28199
28200 This sort of thing has been done for bunches of functions.  Gnus does
28201 not redefine any native Emacs functions while running under XEmacs---it
28202 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
28203 all over.
28204
28205 In the cases where the XEmacs function interface was obviously cleaner,
28206 I used it instead.  For example @code{gnus-region-active-p} is an alias
28207 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
28208
28209 Of course, I could have chosen XEmacs as my native platform and done
28210 mapping functions the other way around.  But I didn't.  The performance
28211 hit these indirections impose on Gnus under XEmacs should be slight.
28212
28213
28214 @node Various File Formats
28215 @subsection Various File Formats
28216
28217 @menu
28218 * Active File Format::          Information on articles and groups available.
28219 * Newsgroups File Format::      Group descriptions.
28220 @end menu
28221
28222
28223 @node Active File Format
28224 @subsubsection Active File Format
28225
28226 The active file lists all groups available on the server in
28227 question.  It also lists the highest and lowest current article numbers
28228 in each group.
28229
28230 Here's an excerpt from a typical active file:
28231
28232 @example
28233 soc.motss 296030 293865 y
28234 alt.binaries.pictures.fractals 3922 3913 n
28235 comp.sources.unix 1605 1593 m
28236 comp.binaries.ibm.pc 5097 5089 y
28237 no.general 1000 900 y
28238 @end example
28239
28240 Here's a pseudo-BNF definition of this file:
28241
28242 @example
28243 active      = *group-line
28244 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
28245 group       = <non-white-space string>
28246 spc         = " "
28247 high-number = <non-negative integer>
28248 low-number  = <positive integer>
28249 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
28250 @end example
28251
28252 For a full description of this file, see the manual pages for
28253 @samp{innd}, in particular @samp{active(5)}.
28254
28255
28256 @node Newsgroups File Format
28257 @subsubsection Newsgroups File Format
28258
28259 The newsgroups file lists groups along with their descriptions.  Not all
28260 groups on the server have to be listed,  and not all groups in the file
28261 have to exist on the server.  The file is meant purely as information to
28262 the user.
28263
28264 The format is quite simple; a group name, a tab, and the description.
28265 Here's the definition:
28266
28267 @example
28268 newsgroups    = *line
28269 line          = group tab description <NEWLINE>
28270 group         = <non-white-space string>
28271 tab           = <TAB>
28272 description   = <string>
28273 @end example
28274
28275
28276 @page
28277 @node Emacs for Heathens
28278 @section Emacs for Heathens
28279
28280 Believe it or not, but some people who use Gnus haven't really used
28281 Emacs much before they embarked on their journey on the Gnus Love Boat.
28282 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
28283 region'', and ``set @code{gnus-flargblossen} to an alist where the key
28284 is a regexp that is used for matching on the group name'' are magical
28285 phrases with little or no meaning, then this appendix is for you.  If
28286 you are already familiar with Emacs, just ignore this and go fondle your
28287 cat instead.
28288
28289 @menu
28290 * Keystrokes::                  Entering text and executing commands.
28291 * Emacs Lisp::                  The built-in Emacs programming language.
28292 @end menu
28293
28294
28295 @node Keystrokes
28296 @subsection Keystrokes
28297
28298 @itemize @bullet
28299 @item
28300 Q: What is an experienced Emacs user?
28301
28302 @item
28303 A: A person who wishes that the terminal had pedals.
28304 @end itemize
28305
28306 Yes, when you use Emacs, you are apt to use the control key, the shift
28307 key and the meta key a lot.  This is very annoying to some people
28308 (notably @code{vi}le users), and the rest of us just love the hell out
28309 of it.  Just give up and submit.  Emacs really does stand for
28310 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
28311 may have heard from other disreputable sources (like the Emacs author).
28312
28313 The shift keys are normally located near your pinky fingers, and are
28314 normally used to get capital letters and stuff.  You probably use it all
28315 the time.  The control key is normally marked ``CTRL'' or something like
28316 that.  The meta key is, funnily enough, never marked as such on any
28317 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
28318 which is the meta key on this keyboard.  It's usually located somewhere
28319 to the left hand side of the keyboard, usually on the bottom row.
28320
28321 Now, us Emacs people don't say ``press the meta-control-m key'',
28322 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
28323 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
28324 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
28325 down the control key, and hold it down while you press @kbd{k}''.
28326 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
28327 the control key and then press @kbd{k}''.  Simple, ay?
28328
28329 This is somewhat complicated by the fact that not all keyboards have a
28330 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
28331 means ``press escape, release escape, press @kbd{k}''.  That's much more
28332 work than if you have a meta key, so if that's the case, I respectfully
28333 suggest you get a real keyboard with a meta key.  You can't live without
28334 it.
28335
28336
28337
28338 @node Emacs Lisp
28339 @subsection Emacs Lisp
28340
28341 Emacs is the King of Editors because it's really a Lisp interpreter.
28342 Each and every key you tap runs some Emacs Lisp code snippet, and since
28343 Emacs Lisp is an interpreted language, that means that you can configure
28344 any key to run any arbitrary code.  You just, like, do it.
28345
28346 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
28347 functions.  (These are byte-compiled for speed, but it's still
28348 interpreted.)  If you decide that you don't like the way Gnus does
28349 certain things, it's trivial to have it do something a different way.
28350 (Well, at least if you know how to write Lisp code.)  However, that's
28351 beyond the scope of this manual, so we are simply going to talk about
28352 some common constructs that you normally use in your @file{.emacs} file
28353 to customize Gnus.
28354
28355 If you want to set the variable @code{gnus-florgbnize} to four (4), you
28356 write the following:
28357
28358 @lisp
28359 (setq gnus-florgbnize 4)
28360 @end lisp
28361
28362 This function (really ``special form'') @code{setq} is the one that can
28363 set a variable to some value.  This is really all you need to know.  Now
28364 you can go and fill your @file{.emacs} file with lots of these to change
28365 how Gnus works.
28366
28367 If you have put that thing in your @file{.emacs} file, it will be read
28368 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
28369 start Emacs.  If you want to change the variable right away, simply say
28370 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
28371 previous ``form'', which is a simple @code{setq} statement here.
28372
28373 Go ahead---just try it, if you're located at your Emacs.  After you
28374 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
28375 is the return value of the form you @code{eval}ed.
28376
28377 Some pitfalls:
28378
28379 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
28380 that means:
28381
28382 @lisp
28383 (setq gnus-read-active-file 'some)
28384 @end lisp
28385
28386 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
28387 @samp{nntp.ifi.uio.no}'', that means:
28388
28389 @lisp
28390 (setq gnus-nntp-server "nntp.ifi.uio.no")
28391 @end lisp
28392
28393 So be careful not to mix up strings (the latter) with symbols (the
28394 former).  The manual is unambiguous, but it can be confusing.
28395
28396 @page
28397 @include gnus-faq.texi
28398
28399 @node Index
28400 @chapter Index
28401 @printindex cp
28402
28403 @node Key Index
28404 @chapter Key Index
28405 @printindex ky
28406
28407 @summarycontents
28408 @contents
28409 @bye
28410
28411 @iftex
28412 @iflatex
28413 \end{document}
28414 @end iflatex
28415 @end iftex
28416
28417 @c Local Variables:
28418 @c mode: texinfo
28419 @c coding: iso-8859-1
28420 @c End: