(Spam ELisp Package Filtering of Incoming Mail):
[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 * Advanced Scoring::            Using logical expressions to build score rules.
807 * Score Decays::                It can be useful to let scores wither away.
808
809 Advanced Scoring
810
811 * Advanced Scoring Syntax::     A definition.
812 * Advanced Scoring Examples::   What they look like.
813 * Advanced Scoring Tips::       Getting the most out of it.
814
815 Various
816
817 * Process/Prefix::              A convention used by many treatment commands.
818 * Interactive::                 Making Gnus ask you many questions.
819 * Symbolic Prefixes::           How to supply some Gnus functions with options.
820 * Formatting Variables::        You can specify what buffers should look like.
821 * Window Layout::               Configuring the Gnus buffer windows.
822 * Faces and Fonts::             How to change how faces look.
823 * Compilation::                 How to speed Gnus up.
824 * Mode Lines::                  Displaying information in the mode lines.
825 * Highlighting and Menus::      Making buffers look all nice and cozy.
826 * Buttons::                     Get tendinitis in ten easy steps!
827 * Daemons::                     Gnus can do things behind your back.
828 * NoCeM::                       How to avoid spam and other fatty foods.
829 * Undo::                        Some actions can be undone.
830 * Predicate Specifiers::        Specifying predicates.
831 * Moderation::                  What to do if you're a moderator.
832 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
833 * Fuzzy Matching::              What's the big fuzz?
834 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
835 * Other modes::                 Interaction with other modes.
836 * Various Various::             Things that are really various.
837
838 Formatting Variables
839
840 * Formatting Basics::           A formatting variable is basically a format string.
841 * Mode Line Formatting::        Some rules about mode line formatting variables.
842 * Advanced Formatting::         Modifying output in various ways.
843 * User-Defined Specs::          Having Gnus call your own functions.
844 * Formatting Fonts::            Making the formatting look colorful and nice.
845 * Positioning Point::           Moving point to a position after an operation.
846 * Tabulation::                  Tabulating your output.
847 * Wide Characters::             Dealing with wide characters.
848
849 Image Enhancements
850
851 * X-Face::                      Display a funky, teensy black-and-white image.
852 * Face::                        Display a funkier, teensier colored image.
853 * Smileys::                     Show all those happy faces the way they were meant to be shown.
854 * Picons::                      How to display pictures of what you're reading.
855 * XVarious::                    Other XEmacsy Gnusey variables.
856
857 Thwarting Email Spam
858
859 * The problem of spam::         Some background, and some solutions
860 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
861 * SpamAssassin::                How to use external anti-spam tools.
862 * Hashcash::                    Reduce spam by burning CPU time.
863 * Filtering Spam Using The Spam ELisp Package::
864 * Filtering Spam Using Statistics with spam-stat::
865
866 Filtering Spam Using The Spam ELisp Package
867
868 * Spam ELisp Package Sequence of Events::  
869 * Spam ELisp Package Filtering of Incoming Mail::  
870 * Spam ELisp Package Global Variables::  
871 * Spam ELisp Package Configuration Examples::  
872 * Blacklists and Whitelists::   
873 * BBDB Whitelists::             
874 * Gmane Spam Reporting::        
875 * Anti-spam Hashcash Payments::  
876 * Blackholes::                  
877 * Regular Expressions Header Matching::  
878 * Bogofilter::                  
879 * ifile spam filtering::        
880 * spam-stat spam filtering::    
881 * SpamOracle::                  
882 * Extending the Spam ELisp package::  
883
884 Filtering Spam Using Statistics with spam-stat
885
886 * Creating a spam-stat dictionary::
887 * Splitting mail using spam-stat::
888 * Low-level interface to the spam-stat dictionary::
889
890 Appendices
891
892 * XEmacs::                      Requirements for installing under XEmacs.
893 * History::                     How Gnus got where it is today.
894 * On Writing Manuals::          Why this is not a beginner's guide.
895 * Terminology::                 We use really difficult, like, words here.
896 * Customization::               Tailoring Gnus to your needs.
897 * Troubleshooting::             What you might try if things do not work.
898 * Gnus Reference Guide::        Rilly, rilly technical stuff.
899 * Emacs for Heathens::          A short introduction to Emacsian terms.
900 * Frequently Asked Questions::  The Gnus FAQ
901
902 History
903
904 * Gnus Versions::               What Gnus versions have been released.
905 * Other Gnus Versions::         Other Gnus versions that also have been released.
906 * Why?::                        What's the point of Gnus?
907 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
908 * Conformity::                  Gnus tries to conform to all standards.
909 * Emacsen::                     Gnus can be run on a few modern Emacsen.
910 * Gnus Development::            How Gnus is developed.
911 * Contributors::                Oodles of people.
912 * New Features::                Pointers to some of the new stuff in Gnus.
913
914 New Features
915
916 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
917 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
918 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
919 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
920 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
921 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
922 * No Gnus::                     Lars, FIXME!
923
924 Customization
925
926 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
927 * Slow Terminal Connection::    You run a remote Emacs.
928 * Little Disk Space::           You feel that having large setup files is icky.
929 * Slow Machine::                You feel like buying a faster machine.
930
931 Gnus Reference Guide
932
933 * Gnus Utility Functions::      Common functions and variable to use.
934 * Back End Interface::          How Gnus communicates with the servers.
935 * Score File Syntax::           A BNF definition of the score file standard.
936 * Headers::                     How Gnus stores headers internally.
937 * Ranges::                      A handy format for storing mucho numbers.
938 * Group Info::                  The group info format.
939 * Extended Interactive::        Symbolic prefixes and stuff.
940 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
941 * Various File Formats::        Formats of files that Gnus use.
942
943 Back End Interface
944
945 * Required Back End Functions::  Functions that must be implemented.
946 * Optional Back End Functions::  Functions that need not be implemented.
947 * Error Messaging::             How to get messages and report errors.
948 * Writing New Back Ends::       Extending old back ends.
949 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
950 * Mail-like Back Ends::         Some tips on mail back ends.
951
952 Various File Formats
953
954 * Active File Format::          Information on articles and groups available.
955 * Newsgroups File Format::      Group descriptions.
956
957 Emacs for Heathens
958
959 * Keystrokes::                  Entering text and executing commands.
960 * Emacs Lisp::                  The built-in Emacs programming language.
961
962 @end detailmenu
963 @end menu
964
965 @node Starting Up
966 @chapter Starting Gnus
967 @cindex starting up
968
969 @kindex M-x gnus
970 @findex gnus
971 If your system administrator has set things up properly, starting Gnus
972 and reading news is extremely easy---you just type @kbd{M-x gnus} in
973 your Emacs.
974
975 @findex gnus-other-frame
976 @kindex M-x gnus-other-frame
977 If you want to start Gnus in a different frame, you can use the command
978 @kbd{M-x gnus-other-frame} instead.
979
980 If things do not go smoothly at startup, you have to twiddle some
981 variables in your @file{~/.gnus.el} file.  This file is similar to
982 @file{~/.emacs}, but is read when Gnus starts.
983
984 If you puzzle at any terms used in this manual, please refer to the
985 terminology section (@pxref{Terminology}).
986
987 @menu
988 * Finding the News::            Choosing a method for getting news.
989 * The First Time::              What does Gnus do the first time you start it?
990 * The Server is Down::          How can I read my mail then?
991 * Slave Gnusae::                You can have more than one Gnus active at a time.
992 * Fetching a Group::            Starting Gnus just to read a group.
993 * New Groups::                  What is Gnus supposed to do with new groups?
994 * Changing Servers::            You may want to move from one server to another.
995 * Startup Files::               Those pesky startup files---@file{.newsrc}.
996 * Auto Save::                   Recovering from a crash.
997 * The Active File::             Reading the active file over a slow line Takes Time.
998 * Startup Variables::           Other variables you might change.
999 @end menu
1000
1001
1002 @node Finding the News
1003 @section Finding the News
1004 @cindex finding news
1005
1006 @vindex gnus-select-method
1007 @c @head
1008 The @code{gnus-select-method} variable says where Gnus should look for
1009 news.  This variable should be a list where the first element says
1010 @dfn{how} and the second element says @dfn{where}.  This method is your
1011 native method.  All groups not fetched with this method are
1012 foreign groups.
1013
1014 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
1015 you want to get your daily dosage of news from, you'd say:
1016
1017 @lisp
1018 (setq gnus-select-method '(nntp "news.somewhere.edu"))
1019 @end lisp
1020
1021 If you want to read directly from the local spool, say:
1022
1023 @lisp
1024 (setq gnus-select-method '(nnspool ""))
1025 @end lisp
1026
1027 If you can use a local spool, you probably should, as it will almost
1028 certainly be much faster.  But do not use the local spool if your
1029 server is running Leafnode; in this case, use @code{(nntp "localhost")}.
1030
1031 @vindex gnus-nntpserver-file
1032 @cindex NNTPSERVER
1033 @cindex @acronym{NNTP} server
1034 If this variable is not set, Gnus will take a look at the
1035 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1036 Gnus will see whether @code{gnus-nntpserver-file}
1037 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1038 If that fails as well, Gnus will try to use the machine running Emacs
1039 as an @acronym{NNTP} server.  That's a long shot, though.
1040
1041 @vindex gnus-nntp-server
1042 If @code{gnus-nntp-server} is set, this variable will override
1043 @code{gnus-select-method}.  You should therefore set
1044 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1045
1046 @vindex gnus-secondary-servers
1047 @vindex gnus-nntp-server
1048 You can also make Gnus prompt you interactively for the name of an
1049 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1050 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
1051 in the @code{gnus-secondary-servers} list (if any).  You can also just
1052 type in the name of any server you feel like visiting.  (Note that this
1053 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1054 gnus} later in the same Emacs session, Gnus will contact the same
1055 server.)
1056
1057 @findex gnus-group-browse-foreign-server
1058 @kindex B (Group)
1059 However, if you use one @acronym{NNTP} server regularly and are just
1060 interested in a couple of groups from a different server, you would be
1061 better served by using the @kbd{B} command in the group buffer.  It will
1062 let you have a look at what groups are available, and you can subscribe
1063 to any of the groups you want to.  This also makes @file{.newsrc}
1064 maintenance much tidier.  @xref{Foreign Groups}.
1065
1066 @vindex gnus-secondary-select-methods
1067 @c @head
1068 A slightly different approach to foreign groups is to set the
1069 @code{gnus-secondary-select-methods} variable.  The select methods
1070 listed in this variable are in many ways just as native as the
1071 @code{gnus-select-method} server.  They will also be queried for active
1072 files during startup (if that's required), and new newsgroups that
1073 appear on these servers will be subscribed (or not) just as native
1074 groups are.
1075
1076 For instance, if you use the @code{nnmbox} back end to read your mail,
1077 you would typically set this variable to
1078
1079 @lisp
1080 (setq gnus-secondary-select-methods '((nnmbox "")))
1081 @end lisp
1082
1083
1084 @node The First Time
1085 @section The First Time
1086 @cindex first time usage
1087
1088 If no startup files exist, Gnus will try to determine what groups should
1089 be subscribed by default.
1090
1091 @vindex gnus-default-subscribed-newsgroups
1092 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
1093 will subscribe you to just those groups in that list, leaving the rest
1094 killed.  Your system administrator should have set this variable to
1095 something useful.
1096
1097 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
1098 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1099 here as @dfn{whatever Lars thinks you should read}.)
1100
1101 You'll also be subscribed to the Gnus documentation group, which should
1102 help you with most common problems.
1103
1104 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
1105 use the normal functions for handling new groups, and not do anything
1106 special.
1107
1108
1109 @node The Server is Down
1110 @section The Server is Down
1111 @cindex server errors
1112
1113 If the default server is down, Gnus will understandably have some
1114 problems starting.  However, if you have some mail groups in addition to
1115 the news groups, you may want to start Gnus anyway.
1116
1117 Gnus, being the trusting sort of program, will ask whether to proceed
1118 without a native select method if that server can't be contacted.  This
1119 will happen whether the server doesn't actually exist (i.e., you have
1120 given the wrong address) or the server has just momentarily taken ill
1121 for some reason or other.  If you decide to continue and have no foreign
1122 groups, you'll find it difficult to actually do anything in the group
1123 buffer.  But, hey, that's your problem.  Blllrph!
1124
1125 @findex gnus-no-server
1126 @kindex M-x gnus-no-server
1127 @c @head
1128 If you know that the server is definitely down, or you just want to read
1129 your mail without bothering with the server at all, you can use the
1130 @code{gnus-no-server} command to start Gnus.  That might come in handy
1131 if you're in a hurry as well.  This command will not attempt to contact
1132 your primary server---instead, it will just activate all groups on level
1133 1 and 2.  (You should preferably keep no native groups on those two
1134 levels.) Also @pxref{Group Levels}.
1135
1136
1137 @node Slave Gnusae
1138 @section Slave Gnusae
1139 @cindex slave
1140
1141 You might want to run more than one Emacs with more than one Gnus at the
1142 same time.  If you are using different @file{.newsrc} files (e.g., if you
1143 are using the two different Gnusae to read from two different servers),
1144 that is no problem whatsoever.  You just do it.
1145
1146 The problem appears when you want to run two Gnusae that use the same
1147 @file{.newsrc} file.
1148
1149 To work around that problem some, we here at the Think-Tank at the Gnus
1150 Towers have come up with a new concept: @dfn{Masters} and
1151 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1152 taken out a copyright on those words.  If you wish to use those words in
1153 conjunction with each other, you have to send $1 per usage instance to
1154 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1155 Applications}) will be much more expensive, of course.)
1156
1157 @findex gnus-slave
1158 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1159 however you do it).  Each subsequent slave Gnusae should be started with
1160 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1161 files, but instead save @dfn{slave files} that contain information only
1162 on what groups have been read in the slave session.  When a master Gnus
1163 starts, it will read (and delete) these slave files, incorporating all
1164 information from them.  (The slave files will be read in the sequence
1165 they were created, so the latest changes will have precedence.)
1166
1167 Information from the slave files has, of course, precedence over the
1168 information in the normal (i.e., master) @file{.newsrc} file.
1169
1170 If the @file{.newsrc*} files have not been saved in the master when the
1171 slave starts, you may be prompted as to whether to read an auto-save
1172 file.  If you answer ``yes'', the unsaved changes to the master will be
1173 incorporated into the slave.  If you answer ``no'', the slave may see some
1174 messages as unread that have been read in the master.
1175
1176 @node Fetching a Group
1177 @section Fetching a Group
1178 @cindex fetching a group
1179
1180 @findex gnus-fetch-group
1181 It is sometimes convenient to be able to just say ``I want to read this
1182 group and I don't care whether Gnus has been started or not''.  This is
1183 perhaps more useful for people who write code than for users, but the
1184 command @code{gnus-fetch-group} provides this functionality in any case.
1185 It takes the group name as a parameter.
1186
1187
1188 @node New Groups
1189 @section New Groups
1190 @cindex new groups
1191 @cindex subscription
1192
1193 @vindex gnus-check-new-newsgroups
1194 If you are satisfied that you really never want to see any new groups,
1195 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1196 also save you some time at startup.  Even if this variable is
1197 @code{nil}, you can always subscribe to the new groups just by pressing
1198 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1199 is @code{ask-server} by default.  If you set this variable to
1200 @code{always}, then Gnus will query the back ends for new groups even
1201 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1202
1203 @menu
1204 * Checking New Groups::         Determining what groups are new.
1205 * Subscription Methods::        What Gnus should do with new groups.
1206 * Filtering New Groups::        Making Gnus ignore certain new groups.
1207 @end menu
1208
1209
1210 @node Checking New Groups
1211 @subsection Checking New Groups
1212
1213 Gnus normally determines whether a group is new or not by comparing the
1214 list of groups from the active file(s) with the lists of subscribed and
1215 dead groups.  This isn't a particularly fast method.  If
1216 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
1217 server for new groups since the last time.  This is both faster and
1218 cheaper.  This also means that you can get rid of the list of killed
1219 groups altogether, so you may set @code{gnus-save-killed-list} to
1220 @code{nil}, which will save time both at startup, at exit, and all over.
1221 Saves disk space, too.  Why isn't this the default, then?
1222 Unfortunately, not all servers support this command.
1223
1224 I bet I know what you're thinking now: How do I find out whether my
1225 server supports @code{ask-server}?  No?  Good, because I don't have a
1226 fail-safe answer.  I would suggest just setting this variable to
1227 @code{ask-server} and see whether any new groups appear within the next
1228 few days.  If any do, then it works.  If none do, then it doesn't
1229 work.  I could write a function to make Gnus guess whether the server
1230 supports @code{ask-server}, but it would just be a guess.  So I won't.
1231 You could @code{telnet} to the server and say @code{HELP} and see
1232 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1233 it does, then it might work.  (But there are servers that lists
1234 @samp{NEWGROUPS} without supporting the function properly.)
1235
1236 This variable can also be a list of select methods.  If so, Gnus will
1237 issue an @code{ask-server} command to each of the select methods, and
1238 subscribe them (or not) using the normal methods.  This might be handy
1239 if you are monitoring a few servers for new groups.  A side effect is
1240 that startup will take much longer, so you can meditate while waiting.
1241 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1242
1243
1244 @node Subscription Methods
1245 @subsection Subscription Methods
1246
1247 @vindex gnus-subscribe-newsgroup-method
1248 What Gnus does when it encounters a new group is determined by the
1249 @code{gnus-subscribe-newsgroup-method} variable.
1250
1251 This variable should contain a function.  This function will be called
1252 with the name of the new group as the only parameter.
1253
1254 Some handy pre-fab functions are:
1255
1256 @table @code
1257
1258 @item gnus-subscribe-zombies
1259 @vindex gnus-subscribe-zombies
1260 Make all new groups zombies.  This is the default.  You can browse the
1261 zombies later (with @kbd{A z}) and either kill them all off properly
1262 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1263
1264 @item gnus-subscribe-randomly
1265 @vindex gnus-subscribe-randomly
1266 Subscribe all new groups in arbitrary order.  This really means that all
1267 new groups will be added at ``the top'' of the group buffer.
1268
1269 @item gnus-subscribe-alphabetically
1270 @vindex gnus-subscribe-alphabetically
1271 Subscribe all new groups in alphabetical order.
1272
1273 @item gnus-subscribe-hierarchically
1274 @vindex gnus-subscribe-hierarchically
1275 Subscribe all new groups hierarchically.  The difference between this
1276 function and @code{gnus-subscribe-alphabetically} is slight.
1277 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1278 alphabetical fashion, while this function will enter groups into its
1279 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1280 @samp{comp} hierarchy, this function will not mess that configuration
1281 up.  Or something like that.
1282
1283 @item gnus-subscribe-interactively
1284 @vindex gnus-subscribe-interactively
1285 Subscribe new groups interactively.  This means that Gnus will ask
1286 you about @strong{all} new groups.  The groups you choose to subscribe
1287 to will be subscribed hierarchically.
1288
1289 @item gnus-subscribe-killed
1290 @vindex gnus-subscribe-killed
1291 Kill all new groups.
1292
1293 @item gnus-subscribe-topics
1294 @vindex gnus-subscribe-topics
1295 Put the groups into the topic that has a matching @code{subscribe} topic
1296 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1297 topic parameter that looks like
1298
1299 @example
1300 "nnslashdot"
1301 @end example
1302
1303 will mean that all groups that match that regex will be subscribed under
1304 that topic.
1305
1306 If no topics match the groups, the groups will be subscribed in the
1307 top-level topic.
1308
1309 @end table
1310
1311 @vindex gnus-subscribe-hierarchical-interactive
1312 A closely related variable is
1313 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1314 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
1315 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1316 will ask you for each sub-hierarchy whether you want to descend the
1317 hierarchy or not.
1318
1319 One common mistake is to set the variable a few paragraphs above
1320 (@code{gnus-subscribe-newsgroup-method}) to
1321 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1322 will not work.  This is ga-ga.  So don't do it.
1323
1324
1325 @node Filtering New Groups
1326 @subsection Filtering New Groups
1327
1328 A nice and portable way to control which new newsgroups should be
1329 subscribed (or ignored) is to put an @dfn{options} line at the start of
1330 the @file{.newsrc} file.  Here's an example:
1331
1332 @example
1333 options -n !alt.all !rec.all sci.all
1334 @end example
1335
1336 @vindex gnus-subscribe-options-newsgroup-method
1337 This line obviously belongs to a serious-minded intellectual scientific
1338 person (or she may just be plain old boring), because it says that all
1339 groups that have names beginning with @samp{alt} and @samp{rec} should
1340 be ignored, and all groups with names beginning with @samp{sci} should
1341 be subscribed.  Gnus will not use the normal subscription method for
1342 subscribing these groups.
1343 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1344 variable defaults to @code{gnus-subscribe-alphabetically}.
1345
1346 @vindex gnus-options-not-subscribe
1347 @vindex gnus-options-subscribe
1348 If you don't want to mess with your @file{.newsrc} file, you can just
1349 set the two variables @code{gnus-options-subscribe} and
1350 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1351 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1352 and if the new group matches the former, it will be unconditionally
1353 subscribed, and if it matches the latter, it will be ignored.
1354
1355 @vindex gnus-auto-subscribed-groups
1356 Yet another variable that meddles here is
1357 @code{gnus-auto-subscribed-groups}.  It works exactly like
1358 @code{gnus-options-subscribe}, and is therefore really superfluous,
1359 but I thought it would be nice to have two of these.  This variable is
1360 more meant for setting some ground rules, while the other variable is
1361 used more for user fiddling.  By default this variable makes all new
1362 groups that come from mail back ends (@code{nnml}, @code{nnbabyl},
1363 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1364 subscribed.  If you don't like that, just set this variable to
1365 @code{nil}.
1366
1367 New groups that match this regexp are subscribed using
1368 @code{gnus-subscribe-options-newsgroup-method}.
1369
1370
1371 @node Changing Servers
1372 @section Changing Servers
1373 @cindex changing servers
1374
1375 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1376 This happens very rarely, but perhaps you change jobs, or one server is
1377 very flaky and you want to use another.
1378
1379 Changing the server is pretty easy, right?  You just change
1380 @code{gnus-select-method} to point to the new server?
1381
1382 @emph{Wrong!}
1383
1384 Article numbers are not (in any way) kept synchronized between different
1385 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1386 you have read is by keeping track of article numbers.  So when you
1387 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1388 worthless.
1389
1390 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1391 file from one server to another.  They all have one thing in
1392 common---they take a looong time to run.  You don't want to use these
1393 functions more than absolutely necessary.
1394
1395 @kindex M-x gnus-change-server
1396 @findex gnus-change-server
1397 If you have access to both servers, Gnus can request the headers for all
1398 the articles you have read and compare @code{Message-ID}s and map the
1399 article numbers of the read articles and article marks.  The @kbd{M-x
1400 gnus-change-server} command will do this for all your native groups.  It
1401 will prompt for the method you want to move to.
1402
1403 @kindex M-x gnus-group-move-group-to-server
1404 @findex gnus-group-move-group-to-server
1405 You can also move individual groups with the @kbd{M-x
1406 gnus-group-move-group-to-server} command.  This is useful if you want to
1407 move a (foreign) group from one server to another.
1408
1409 @kindex M-x gnus-group-clear-data-on-native-groups
1410 @findex gnus-group-clear-data-on-native-groups
1411 If you don't have access to both the old and new server, all your marks
1412 and read ranges have become worthless.  You can use the @kbd{M-x
1413 gnus-group-clear-data-on-native-groups} command to clear out all data
1414 that you have on your native groups.  Use with caution.
1415
1416 @kindex M-x gnus-group-clear-data
1417 @findex gnus-group-clear-data
1418 Clear the data from the current group only---nix out marks and the
1419 list of read articles (@code{gnus-group-clear-data}).
1420
1421 After changing servers, you @strong{must} move the cache hierarchy away,
1422 since the cached articles will have wrong article numbers, which will
1423 affect which articles Gnus thinks are read.
1424 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1425 to have it done automatically; for @code{gnus-group-clear-data}, you
1426 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1427 cache for all groups).
1428
1429
1430 @node Startup Files
1431 @section Startup Files
1432 @cindex startup files
1433 @cindex .newsrc
1434 @cindex .newsrc.el
1435 @cindex .newsrc.eld
1436
1437 Now, you all know about the @file{.newsrc} file.  All subscription
1438 information is traditionally stored in this file.
1439
1440 Things got a bit more complicated with @sc{gnus}.  In addition to
1441 keeping the @file{.newsrc} file updated, it also used a file called
1442 @file{.newsrc.el} for storing all the information that didn't fit into
1443 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1444 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1445 files was the most recently saved, which enabled people to swap between
1446 @sc{gnus} and other newsreaders.
1447
1448 That was kinda silly, so Gnus went one better: In addition to the
1449 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1450 @file{.newsrc.eld}.  It will read whichever of these files that are most
1451 recent, but it will never write a @file{.newsrc.el} file.  You should
1452 never delete the @file{.newsrc.eld} file---it contains much information
1453 not stored in the @file{.newsrc} file.
1454
1455 @vindex gnus-save-newsrc-file
1456 @vindex gnus-read-newsrc-file
1457 You can turn off writing the @file{.newsrc} file by setting
1458 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1459 the file and save some space, as well as exiting from Gnus faster.
1460 However, this will make it impossible to use other newsreaders than
1461 Gnus.  But hey, who would want to, right?  Similarly, setting
1462 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1463 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which is
1464 convenient if you have a tendency to use Netscape once in a while.
1465
1466 @vindex gnus-save-killed-list
1467 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1468 will not save the list of killed groups to the startup file.  This will
1469 save both time (when starting and quitting) and space (on disk).  It
1470 will also mean that Gnus has no record of what groups are new or old,
1471 so the automatic new groups subscription methods become meaningless.
1472 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1473 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1474 Groups}).  This variable can also be a regular expression.  If that's
1475 the case, remove all groups that do not match this regexp before
1476 saving.  This can be useful in certain obscure situations that involve
1477 several servers where not all servers support @code{ask-server}.
1478
1479 @vindex gnus-startup-file
1480 @vindex gnus-backup-startup-file
1481 @vindex version-control
1482 The @code{gnus-startup-file} variable says where the startup files are.
1483 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1484 file being whatever that one is, with a @samp{.eld} appended.
1485 If you want version control for this file, set
1486 @code{gnus-backup-startup-file}.  It respects the same values as the
1487 @code{version-control} variable.
1488
1489 @vindex gnus-save-newsrc-hook
1490 @vindex gnus-save-quick-newsrc-hook
1491 @vindex gnus-save-standard-newsrc-hook
1492 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1493 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1494 saving the @file{.newsrc.eld} file, and
1495 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1496 @file{.newsrc} file.  The latter two are commonly used to turn version
1497 control on or off.  Version control is on by default when saving the
1498 startup files.  If you want to turn backup creation off, say something like:
1499
1500 @lisp
1501 (defun turn-off-backup ()
1502   (set (make-local-variable 'backup-inhibited) t))
1503
1504 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1505 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1506 @end lisp
1507
1508 @vindex gnus-init-file
1509 @vindex gnus-site-init-file
1510 When Gnus starts, it will read the @code{gnus-site-init-file}
1511 (@file{.../site-lisp/gnus} by default) and @code{gnus-init-file}
1512 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1513 and can be used to avoid cluttering your @file{~/.emacs} and
1514 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1515 with the same names as these, but with @file{.elc} and @file{.el}
1516 suffixes.  In other words, if you have set @code{gnus-init-file} to
1517 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1518 and finally @file{~/.gnus} (in this order).
1519
1520
1521
1522 @node Auto Save
1523 @section Auto Save
1524 @cindex dribble file
1525 @cindex auto-save
1526
1527 Whenever you do something that changes the Gnus data (reading articles,
1528 catching up, killing/subscribing groups), the change is added to a
1529 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1530 Emacs way.  If your Emacs should crash before you have saved the
1531 @file{.newsrc} files, all changes you have made can be recovered from
1532 this file.
1533
1534 If Gnus detects this file at startup, it will ask the user whether to
1535 read it.  The auto save file is deleted whenever the real startup file is
1536 saved.
1537
1538 @vindex gnus-use-dribble-file
1539 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1540 maintain a dribble buffer.  The default is @code{t}.
1541
1542 @vindex gnus-dribble-directory
1543 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1544 this variable is @code{nil}, which it is by default, Gnus will dribble
1545 into the directory where the @file{.newsrc} file is located.  (This is
1546 normally the user's home directory.)  The dribble file will get the same
1547 file permissions as the @file{.newsrc} file.
1548
1549 @vindex gnus-always-read-dribble-file
1550 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1551 read the dribble file on startup without querying the user.
1552
1553
1554 @node The Active File
1555 @section The Active File
1556 @cindex active file
1557 @cindex ignored groups
1558
1559 When Gnus starts, or indeed whenever it tries to determine whether new
1560 articles have arrived, it reads the active file.  This is a very large
1561 file that lists all the active groups and articles on the server.
1562
1563 @vindex gnus-ignored-newsgroups
1564 Before examining the active file, Gnus deletes all lines that match the
1565 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1566 any groups with bogus names, but you can use this variable to make Gnus
1567 ignore hierarchies you aren't ever interested in.  However, this is not
1568 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1569 Groups} for an overview of other variables that can be used instead.
1570
1571 @c This variable is
1572 @c @code{nil} by default, and will slow down active file handling somewhat
1573 @c if you set it to anything else.
1574
1575 @vindex gnus-read-active-file
1576 @c @head
1577 The active file can be rather Huge, so if you have a slow network, you
1578 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1579 reading the active file.  This variable is @code{some} by default.
1580
1581 Gnus will try to make do by getting information just on the groups that
1582 you actually subscribe to.
1583
1584 Note that if you subscribe to lots and lots of groups, setting this
1585 variable to @code{nil} will probably make Gnus slower, not faster.  At
1586 present, having this variable @code{nil} will slow Gnus down
1587 considerably, unless you read news over a 2400 baud modem.
1588
1589 This variable can also have the value @code{some}.  Gnus will then
1590 attempt to read active info only on the subscribed groups.  On some
1591 servers this is quite fast (on sparkling, brand new INN servers that
1592 support the @code{LIST ACTIVE group} command), on others this isn't fast
1593 at all.  In any case, @code{some} should be faster than @code{nil}, and
1594 is certainly faster than @code{t} over slow lines.
1595
1596 Some news servers (old versions of Leafnode and old versions of INN, for
1597 instance) do not support the @code{LIST ACTIVE group}.  For these
1598 servers, @code{nil} is probably the most efficient value for this
1599 variable.
1600
1601 If this variable is @code{nil}, Gnus will ask for group info in total
1602 lock-step, which isn't very fast.  If it is @code{some} and you use an
1603 @acronym{NNTP} server, Gnus will pump out commands as fast as it can, and
1604 read all the replies in one swoop.  This will normally result in better
1605 performance, but if the server does not support the aforementioned
1606 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1607
1608 If you think that starting up Gnus takes too long, try all the three
1609 different values for this variable and see what works best for you.
1610
1611 In any case, if you use @code{some} or @code{nil}, you should definitely
1612 kill all groups that you aren't interested in to speed things up.
1613
1614 Note that this variable also affects active file retrieval from
1615 secondary select methods.
1616
1617
1618 @node Startup Variables
1619 @section Startup Variables
1620
1621 @table @code
1622
1623 @item gnus-load-hook
1624 @vindex gnus-load-hook
1625 A hook run while Gnus is being loaded.  Note that this hook will
1626 normally be run just once in each Emacs session, no matter how many
1627 times you start Gnus.
1628
1629 @item gnus-before-startup-hook
1630 @vindex gnus-before-startup-hook
1631 A hook run after starting up Gnus successfully.
1632
1633 @item gnus-startup-hook
1634 @vindex gnus-startup-hook
1635 A hook run as the very last thing after starting up Gnus
1636
1637 @item gnus-started-hook
1638 @vindex gnus-started-hook
1639 A hook that is run as the very last thing after starting up Gnus
1640 successfully.
1641
1642 @item gnus-setup-news-hook
1643 @vindex gnus-setup-news-hook
1644 A hook that is run after reading the @file{.newsrc} file(s), but before
1645 generating the group buffer.
1646
1647 @item gnus-check-bogus-newsgroups
1648 @vindex gnus-check-bogus-newsgroups
1649 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1650 startup.  A @dfn{bogus group} is a group that you have in your
1651 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1652 bogus groups can take quite a while, so to save time and resources it's
1653 best to leave this option off, and do the checking for bogus groups once
1654 in a while from the group buffer instead (@pxref{Group Maintenance}).
1655
1656 @item gnus-inhibit-startup-message
1657 @vindex gnus-inhibit-startup-message
1658 If non-@code{nil}, the startup message won't be displayed.  That way,
1659 your boss might not notice as easily that you are reading news instead
1660 of doing your job.  Note that this variable is used before
1661 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1662
1663 @item gnus-no-groups-message
1664 @vindex gnus-no-groups-message
1665 Message displayed by Gnus when no groups are available.
1666
1667 @item gnus-play-startup-jingle
1668 @vindex gnus-play-startup-jingle
1669 If non-@code{nil}, play the Gnus jingle at startup.
1670
1671 @item gnus-startup-jingle
1672 @vindex gnus-startup-jingle
1673 Jingle to be played if the above variable is non-@code{nil}.  The
1674 default is @samp{Tuxedomoon.Jingle4.au}.
1675
1676 @end table
1677
1678
1679 @node Group Buffer
1680 @chapter Group Buffer
1681 @cindex group buffer
1682
1683 @c Alex Schroeder suggests to rearrange this as follows:
1684 @c
1685 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1686 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1687 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1688 @c   7. Group Score, 8. Group Buffer Format
1689 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1690 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1691 @c <kensanata> First, "Gnus considers groups... (default 9)."
1692 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1693 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1694 @c <kensanata> Then expand the next paragraph or add some more to it.
1695 @c    This short one sentence explains levels 1 and 2, therefore I understand
1696 @c    that I should keep important news at 3 and boring news at 4.
1697 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1698 @c    Maybe keep those that you don't want to read temporarily at 6,
1699 @c    those that you never want to read at 8, those that offend your
1700 @c    human rights at 9...
1701
1702
1703 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1704 is the first buffer shown when Gnus starts, and will never be killed as
1705 long as Gnus is active.
1706
1707 @iftex
1708 @iflatex
1709 \gnusfigure{The Group Buffer}{320}{
1710 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1711 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1712 \put(120,38){\vector(1,2){10}}
1713 \put(40,60){\makebox(0,0)[r]{Mode line}}
1714 \put(40,58){\vector(1,0){30}}
1715 \put(200,28){\makebox(0,0)[t]{Native select method}}
1716 \put(200,26){\vector(-1,2){15}}
1717 }
1718 @end iflatex
1719 @end iftex
1720
1721 @menu
1722 * Group Buffer Format::         Information listed and how you can change it.
1723 * Group Maneuvering::           Commands for moving in the group buffer.
1724 * Selecting a Group::           Actually reading news.
1725 * Subscription Commands::       Unsubscribing, killing, subscribing.
1726 * Group Data::                  Changing the info for a group.
1727 * Group Levels::                Levels? What are those, then?
1728 * Group Score::                 A mechanism for finding out what groups you like.
1729 * Marking Groups::              You can mark groups for later processing.
1730 * Foreign Groups::              Creating and editing groups.
1731 * Group Parameters::            Each group may have different parameters set.
1732 * Listing Groups::              Gnus can list various subsets of the groups.
1733 * Sorting Groups::              Re-arrange the group order.
1734 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1735 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1736 * Exiting Gnus::                Stop reading news and get some work done.
1737 * Group Topics::                A folding group mode divided into topics.
1738 * Misc Group Stuff::            Other stuff that you can to do.
1739 @end menu
1740
1741
1742 @node Group Buffer Format
1743 @section Group Buffer Format
1744
1745 @menu
1746 * Group Line Specification::    Deciding how the group buffer is to look.
1747 * Group Mode Line Specification::  The group buffer mode line.
1748 * Group Highlighting::          Having nice colors in the group buffer.
1749 @end menu
1750
1751
1752 @node Group Line Specification
1753 @subsection Group Line Specification
1754 @cindex group buffer format
1755
1756 The default format of the group buffer is nice and dull, but you can
1757 make it as exciting and ugly as you feel like.
1758
1759 Here's a couple of example group lines:
1760
1761 @example
1762      25: news.announce.newusers
1763  *    0: alt.fan.andrea-dworkin
1764 @end example
1765
1766 Quite simple, huh?
1767
1768 You can see that there are 25 unread articles in
1769 @samp{news.announce.newusers}.  There are no unread articles, but some
1770 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1771 asterisk at the beginning of the line?).
1772
1773 @vindex gnus-group-line-format
1774 You can change that format to whatever you want by fiddling with the
1775 @code{gnus-group-line-format} variable.  This variable works along the
1776 lines of a @code{format} specification, which is pretty much the same as
1777 a @code{printf} specifications, for those of you who use (feh!) C.
1778 @xref{Formatting Variables}.
1779
1780 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1781
1782 There should always be a colon on the line; the cursor always moves to
1783 the colon after performing an operation.  @xref{Positioning
1784 Point}.  Nothing else is required---not even the group name.  All
1785 displayed text is just window dressing, and is never examined by Gnus.
1786 Gnus stores all real information it needs using text properties.
1787
1788 (Note that if you make a really strange, wonderful, spreadsheet-like
1789 layout, everybody will believe you are hard at work with the accounting
1790 instead of wasting time reading news.)
1791
1792 Here's a list of all available format characters:
1793
1794 @table @samp
1795
1796 @item M
1797 An asterisk if the group only has marked articles.
1798
1799 @item S
1800 Whether the group is subscribed.
1801
1802 @item L
1803 Level of subscribedness.
1804
1805 @item N
1806 Number of unread articles.
1807
1808 @item I
1809 Number of dormant articles.
1810
1811 @item T
1812 Number of ticked articles.
1813
1814 @item R
1815 Number of read articles.
1816
1817 @item U
1818 Number of unseen articles.
1819
1820 @item t
1821 Estimated total number of articles.  (This is really @var{max-number}
1822 minus @var{min-number} plus 1.)
1823
1824 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1825 efficient access to @var{max-number} and @var{min-number} but getting
1826 the true unread message count is not possible efficiently.  For
1827 hysterical raisins, even the mail back ends, where the true number of
1828 unread messages might be available efficiently, use the same limited
1829 interface.  To remove this restriction from Gnus means that the back
1830 end interface has to be changed, which is not an easy job.  If you
1831 want to work on this, please contact the Gnus mailing list.
1832
1833 @item y
1834 Number of unread, unticked, non-dormant articles.
1835
1836 @item i
1837 Number of ticked and dormant articles.
1838
1839 @item g
1840 Full group name.
1841
1842 @item G
1843 Group name.
1844
1845 @item C
1846 Group comment (@pxref{Group Parameters}) or group name if there is no
1847 comment element in the group parameters.
1848
1849 @item D
1850 Newsgroup description.  You need to read the group descriptions
1851 before these will appear, and to do that, you either have to set
1852 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1853 command.
1854
1855 @item o
1856 @samp{m} if moderated.
1857
1858 @item O
1859 @samp{(m)} if moderated.
1860
1861 @item s
1862 Select method.
1863
1864 @item B
1865 If the summary buffer for the group is open or not.
1866
1867 @item n
1868 Select from where.
1869
1870 @item z
1871 A string that looks like @samp{<%s:%n>} if a foreign select method is
1872 used.
1873
1874 @item P
1875 Indentation based on the level of the topic (@pxref{Group Topics}).
1876
1877 @item c
1878 @vindex gnus-group-uncollapsed-levels
1879 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1880 variable says how many levels to leave at the end of the group name.
1881 The default is 1---this will mean that group names like
1882 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1883
1884 @item m
1885 @vindex gnus-new-mail-mark
1886 @cindex %
1887 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1888 the group lately.
1889
1890 @item p
1891 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1892
1893 @item d
1894 A string that says when you last read the group (@pxref{Group
1895 Timestamp}).
1896
1897 @item u
1898 User defined specifier.  The next character in the format string should
1899 be a letter.  Gnus will call the function
1900 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1901 following @samp{%u}.  The function will be passed a single dummy
1902 parameter as argument.  The function should return a string, which will
1903 be inserted into the buffer just like information from any other
1904 specifier.
1905 @end table
1906
1907 @cindex *
1908 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1909 if no info is available---for instance, if it is a non-activated foreign
1910 group, or a bogus native group.
1911
1912
1913 @node Group Mode Line Specification
1914 @subsection Group Mode Line Specification
1915 @cindex group mode line
1916
1917 @vindex gnus-group-mode-line-format
1918 The mode line can be changed by setting
1919 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1920 doesn't understand that many format specifiers:
1921
1922 @table @samp
1923 @item S
1924 The native news server.
1925 @item M
1926 The native select method.
1927 @end table
1928
1929
1930 @node Group Highlighting
1931 @subsection Group Highlighting
1932 @cindex highlighting
1933 @cindex group highlighting
1934
1935 @vindex gnus-group-highlight
1936 Highlighting in the group buffer is controlled by the
1937 @code{gnus-group-highlight} variable.  This is an alist with elements
1938 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1939 something non-@code{nil}, the @var{face} will be used on the line.
1940
1941 Here's an example value for this variable that might look nice if the
1942 background is dark:
1943
1944 @lisp
1945 (cond (window-system
1946        (setq custom-background-mode 'light)
1947        (defface my-group-face-1
1948          '((t (:foreground "Red" :bold t))) "First group face")
1949        (defface my-group-face-2
1950          '((t (:foreground "DarkSeaGreen4" :bold t)))
1951          "Second group face")
1952        (defface my-group-face-3
1953          '((t (:foreground "Green4" :bold t))) "Third group face")
1954        (defface my-group-face-4
1955          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1956        (defface my-group-face-5
1957          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1958
1959 (setq gnus-group-highlight
1960       '(((> unread 200) . my-group-face-1)
1961         ((and (< level 3) (zerop unread)) . my-group-face-2)
1962         ((< level 3) . my-group-face-3)
1963         ((zerop unread) . my-group-face-4)
1964         (t . my-group-face-5)))
1965 @end lisp
1966
1967 Also @pxref{Faces and Fonts}.
1968
1969 Variables that are dynamically bound when the forms are evaluated
1970 include:
1971
1972 @table @code
1973 @item group
1974 The group name.
1975 @item unread
1976 The number of unread articles in the group.
1977 @item method
1978 The select method.
1979 @item mailp
1980 Whether the group is a mail group.
1981 @item level
1982 The level of the group.
1983 @item score
1984 The score of the group.
1985 @item ticked
1986 The number of ticked articles in the group.
1987 @item total
1988 The total number of articles in the group.  Or rather,
1989 @var{max-number} minus @var{min-number} plus one.
1990 @item topic
1991 When using the topic minor mode, this variable is bound to the current
1992 topic being inserted.
1993 @end table
1994
1995 When the forms are @code{eval}ed, point is at the beginning of the line
1996 of the group in question, so you can use many of the normal Gnus
1997 functions for snarfing info on the group.
1998
1999 @vindex gnus-group-update-hook
2000 @findex gnus-group-highlight-line
2001 @code{gnus-group-update-hook} is called when a group line is changed.
2002 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
2003 calls @code{gnus-group-highlight-line} by default.
2004
2005
2006 @node Group Maneuvering
2007 @section Group Maneuvering
2008 @cindex group movement
2009
2010 All movement commands understand the numeric prefix and will behave as
2011 expected, hopefully.
2012
2013 @table @kbd
2014
2015 @item n
2016 @kindex n (Group)
2017 @findex gnus-group-next-unread-group
2018 Go to the next group that has unread articles
2019 (@code{gnus-group-next-unread-group}).
2020
2021 @item p
2022 @itemx DEL
2023 @kindex DEL (Group)
2024 @kindex p (Group)
2025 @findex gnus-group-prev-unread-group
2026 Go to the previous group that has unread articles
2027 (@code{gnus-group-prev-unread-group}).
2028
2029 @item N
2030 @kindex N (Group)
2031 @findex gnus-group-next-group
2032 Go to the next group (@code{gnus-group-next-group}).
2033
2034 @item P
2035 @kindex P (Group)
2036 @findex gnus-group-prev-group
2037 Go to the previous group (@code{gnus-group-prev-group}).
2038
2039 @item M-n
2040 @kindex M-n (Group)
2041 @findex gnus-group-next-unread-group-same-level
2042 Go to the next unread group on the same (or lower) level
2043 (@code{gnus-group-next-unread-group-same-level}).
2044
2045 @item M-p
2046 @kindex M-p (Group)
2047 @findex gnus-group-prev-unread-group-same-level
2048 Go to the previous unread group on the same (or lower) level
2049 (@code{gnus-group-prev-unread-group-same-level}).
2050 @end table
2051
2052 Three commands for jumping to groups:
2053
2054 @table @kbd
2055
2056 @item j
2057 @kindex j (Group)
2058 @findex gnus-group-jump-to-group
2059 Jump to a group (and make it visible if it isn't already)
2060 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2061 like living groups.
2062
2063 @item ,
2064 @kindex , (Group)
2065 @findex gnus-group-best-unread-group
2066 Jump to the unread group with the lowest level
2067 (@code{gnus-group-best-unread-group}).
2068
2069 @item .
2070 @kindex . (Group)
2071 @findex gnus-group-first-unread-group
2072 Jump to the first group with unread articles
2073 (@code{gnus-group-first-unread-group}).
2074 @end table
2075
2076 @vindex gnus-group-goto-unread
2077 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2078 commands will move to the next group, not the next unread group.  Even
2079 the commands that say they move to the next unread group.  The default
2080 is @code{t}.
2081
2082
2083 @node Selecting a Group
2084 @section Selecting a Group
2085 @cindex group selection
2086
2087 @table @kbd
2088
2089 @item SPACE
2090 @kindex SPACE (Group)
2091 @findex gnus-group-read-group
2092 Select the current group, switch to the summary buffer and display the
2093 first unread article (@code{gnus-group-read-group}).  If there are no
2094 unread articles in the group, or if you give a non-numerical prefix to
2095 this command, Gnus will offer to fetch all the old articles in this
2096 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2097 determines the number of articles Gnus will fetch.  If @var{n} is
2098 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2099 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2100
2101 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2102 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2103 - 4 2 SPC} fetches the 42 oldest ones.
2104
2105 When you are in the group (in the Summary buffer), you can type
2106 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2107 ones.
2108
2109 @item RET
2110 @kindex RET (Group)
2111 @findex gnus-group-select-group
2112 Select the current group and switch to the summary buffer
2113 (@code{gnus-group-select-group}).  Takes the same arguments as
2114 @code{gnus-group-read-group}---the only difference is that this command
2115 does not display the first unread article automatically upon group
2116 entry.
2117
2118 @item M-RET
2119 @kindex M-RET (Group)
2120 @findex gnus-group-quick-select-group
2121 This does the same as the command above, but tries to do it with the
2122 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2123 scoring/killing will be performed, there will be no highlights and no
2124 expunging.  This might be useful if you're in a real hurry and have to
2125 enter some humongous group.  If you give a 0 prefix to this command
2126 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2127 which is useful if you want to toggle threading before generating the
2128 summary buffer (@pxref{Summary Generation Commands}).
2129
2130 @item M-SPACE
2131 @kindex M-SPACE (Group)
2132 @findex gnus-group-visible-select-group
2133 This is yet one more command that does the same as the @kbd{RET}
2134 command, but this one does it without expunging and hiding dormants
2135 (@code{gnus-group-visible-select-group}).
2136
2137 @item C-M-RET
2138 @kindex C-M-RET (Group)
2139 @findex gnus-group-select-group-ephemerally
2140 Finally, this command selects the current group ephemerally without
2141 doing any processing of its contents
2142 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2143 turned off.  Everything you do in the group after selecting it in this
2144 manner will have no permanent effects.
2145
2146 @end table
2147
2148 @vindex gnus-large-newsgroup
2149 The @code{gnus-large-newsgroup} variable says what Gnus should
2150 consider to be a big group.  If it is @code{nil}, no groups are
2151 considered big.  The default value is 200.  If the group has more
2152 (unread and/or ticked) articles than this, Gnus will query the user
2153 before entering the group.  The user can then specify how many
2154 articles should be fetched from the server.  If the user specifies a
2155 negative number (@var{-n}), the @var{n} oldest articles will be
2156 fetched.  If it is positive, the @var{n} articles that have arrived
2157 most recently will be fetched.
2158
2159 @vindex gnus-large-ephemeral-newsgroup
2160 @code{gnus-large-ephemeral-newsgroup} is the same as
2161 @code{gnus-large-newsgroup}, but is only used for ephemeral
2162 newsgroups.
2163
2164 @vindex gnus-select-group-hook
2165 @vindex gnus-auto-select-first
2166 @vindex gnus-auto-select-subject
2167 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2168 automatically when entering a group with the @kbd{SPACE} command.
2169 Which article this is is controlled by the
2170 @code{gnus-auto-select-subject} variable.  Valid values for this
2171 variable is:
2172
2173 @table @code
2174
2175 @item unread
2176 Place point on the subject line of the first unread article.
2177
2178 @item first
2179 Place point on the subject line of the first article.
2180
2181 @item unseen
2182 Place point on the subject line of the first unseen article.
2183
2184 @item unseen-or-unread
2185 Place point on the subject line of the first unseen article, and if
2186 there is no such article, place point on the subject line of the first
2187 unread article.
2188
2189 @item best
2190 Place point on the subject line of the highest-scored unread article.
2191
2192 @end table
2193
2194 This variable can also be a function.  In that case, that function
2195 will be called to place point on a subject line.
2196
2197 If you want to prevent automatic selection in some group (say, in a
2198 binary group with Huge articles) you can set the
2199 @code{gnus-auto-select-first} variable to @code{nil} in
2200 @code{gnus-select-group-hook}, which is called when a group is
2201 selected.
2202
2203
2204 @node Subscription Commands
2205 @section Subscription Commands
2206 @cindex subscription
2207
2208 @table @kbd
2209
2210 @item S t
2211 @itemx u
2212 @kindex S t (Group)
2213 @kindex u (Group)
2214 @findex gnus-group-unsubscribe-current-group
2215 @c @icon{gnus-group-unsubscribe}
2216 Toggle subscription to the current group
2217 (@code{gnus-group-unsubscribe-current-group}).
2218
2219 @item S s
2220 @itemx U
2221 @kindex S s (Group)
2222 @kindex U (Group)
2223 @findex gnus-group-unsubscribe-group
2224 Prompt for a group to subscribe, and then subscribe it.  If it was
2225 subscribed already, unsubscribe it instead
2226 (@code{gnus-group-unsubscribe-group}).
2227
2228 @item S k
2229 @itemx C-k
2230 @kindex S k (Group)
2231 @kindex C-k (Group)
2232 @findex gnus-group-kill-group
2233 @c @icon{gnus-group-kill-group}
2234 Kill the current group (@code{gnus-group-kill-group}).
2235
2236 @item S y
2237 @itemx C-y
2238 @kindex S y (Group)
2239 @kindex C-y (Group)
2240 @findex gnus-group-yank-group
2241 Yank the last killed group (@code{gnus-group-yank-group}).
2242
2243 @item C-x C-t
2244 @kindex C-x C-t (Group)
2245 @findex gnus-group-transpose-groups
2246 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2247 really a subscription command, but you can use it instead of a
2248 kill-and-yank sequence sometimes.
2249
2250 @item S w
2251 @itemx C-w
2252 @kindex S w (Group)
2253 @kindex C-w (Group)
2254 @findex gnus-group-kill-region
2255 Kill all groups in the region (@code{gnus-group-kill-region}).
2256
2257 @item S z
2258 @kindex S z (Group)
2259 @findex gnus-group-kill-all-zombies
2260 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2261
2262 @item S C-k
2263 @kindex S C-k (Group)
2264 @findex gnus-group-kill-level
2265 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2266 These groups can't be yanked back after killing, so this command should
2267 be used with some caution.  The only time where this command comes in
2268 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2269 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2270 kill off all unsubscribed groups that do not have message numbers in the
2271 @file{.newsrc} file.
2272
2273 @end table
2274
2275 Also @pxref{Group Levels}.
2276
2277
2278 @node Group Data
2279 @section Group Data
2280
2281 @table @kbd
2282
2283 @item c
2284 @kindex c (Group)
2285 @findex gnus-group-catchup-current
2286 @vindex gnus-group-catchup-group-hook
2287 @c @icon{gnus-group-catchup-current}
2288 Mark all unticked articles in this group as read
2289 (@code{gnus-group-catchup-current}).
2290 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2291 the group buffer.
2292
2293 @item C
2294 @kindex C (Group)
2295 @findex gnus-group-catchup-current-all
2296 Mark all articles in this group, even the ticked ones, as read
2297 (@code{gnus-group-catchup-current-all}).
2298
2299 @item M-c
2300 @kindex M-c (Group)
2301 @findex gnus-group-clear-data
2302 Clear the data from the current group---nix out marks and the list of
2303 read articles (@code{gnus-group-clear-data}).
2304
2305 @item M-x gnus-group-clear-data-on-native-groups
2306 @kindex M-x gnus-group-clear-data-on-native-groups
2307 @findex gnus-group-clear-data-on-native-groups
2308 If you have switched from one @acronym{NNTP} server to another, all your marks
2309 and read ranges have become worthless.  You can use this command to
2310 clear out all data that you have on your native groups.  Use with
2311 caution.
2312
2313 @end table
2314
2315
2316 @node Group Levels
2317 @section Group Levels
2318 @cindex group level
2319 @cindex level
2320
2321 All groups have a level of @dfn{subscribedness}.  For instance, if a
2322 group is on level 2, it is more subscribed than a group on level 5.  You
2323 can ask Gnus to just list groups on a given level or lower
2324 (@pxref{Listing Groups}), or to just check for new articles in groups on
2325 a given level or lower (@pxref{Scanning New Messages}).
2326
2327 Remember:  The higher the level of the group, the less important it is.
2328
2329 @table @kbd
2330
2331 @item S l
2332 @kindex S l (Group)
2333 @findex gnus-group-set-current-level
2334 Set the level of the current group.  If a numeric prefix is given, the
2335 next @var{n} groups will have their levels set.  The user will be
2336 prompted for a level.
2337 @end table
2338
2339 @vindex gnus-level-killed
2340 @vindex gnus-level-zombie
2341 @vindex gnus-level-unsubscribed
2342 @vindex gnus-level-subscribed
2343 Gnus considers groups from levels 1 to
2344 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2345 @code{gnus-level-subscribed} (exclusive) and
2346 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2347 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2348 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2349 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2350 same, but zombie and killed groups have no information on what articles
2351 you have read, etc, stored.  This distinction between dead and living
2352 groups isn't done because it is nice or clever, it is done purely for
2353 reasons of efficiency.
2354
2355 It is recommended that you keep all your mail groups (if any) on quite
2356 low levels (e.g. 1 or 2).
2357
2358 Maybe the following description of the default behavior of Gnus helps to
2359 understand what these levels are all about.  By default, Gnus shows you
2360 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2361 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2362 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2363 groups are hidden, in a way.
2364
2365 Zombie and killed groups are similar to unsubscribed groups in that they
2366 are hidden by default.  But they are different from subscribed and
2367 unsubscribed groups in that Gnus doesn't ask the news server for
2368 information (number of messages, number of unread messages) on zombie
2369 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2370 aren't interested in.  If most groups are killed, Gnus is faster.
2371
2372 Why does Gnus distinguish between zombie and killed groups?  Well, when
2373 a new group arrives on the server, Gnus by default makes it a zombie
2374 group.  This means that you are normally not bothered with new groups,
2375 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2376 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2377 list of killed groups.)
2378
2379 If you want to play with the level variables, you should show some care.
2380 Set them once, and don't touch them ever again.  Better yet, don't touch
2381 them at all unless you know exactly what you're doing.
2382
2383 @vindex gnus-level-default-unsubscribed
2384 @vindex gnus-level-default-subscribed
2385 Two closely related variables are @code{gnus-level-default-subscribed}
2386 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2387 which are the levels that new groups will be put on if they are
2388 (un)subscribed.  These two variables should, of course, be inside the
2389 relevant valid ranges.
2390
2391 @vindex gnus-keep-same-level
2392 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2393 will only move to groups of the same level (or lower).  In
2394 particular, going from the last article in one group to the next group
2395 will go to the next group of the same level (or lower).  This might be
2396 handy if you want to read the most important groups before you read the
2397 rest.
2398
2399 If this variable is @code{best}, Gnus will make the next newsgroup the
2400 one with the best level.
2401
2402 @vindex gnus-group-default-list-level
2403 All groups with a level less than or equal to
2404 @code{gnus-group-default-list-level} will be listed in the group buffer
2405 by default.
2406
2407 @vindex gnus-group-list-inactive-groups
2408 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2409 groups will be listed along with the unread groups.  This variable is
2410 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2411 listed.
2412
2413 @vindex gnus-group-use-permanent-levels
2414 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2415 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2416 use this level as the ``work'' level.
2417
2418 @vindex gnus-activate-level
2419 Gnus will normally just activate (i. e., query the server about) groups
2420 on level @code{gnus-activate-level} or less.  If you don't want to
2421 activate unsubscribed groups, for instance, you might set this variable
2422 to 5.  The default is 6.
2423
2424
2425 @node Group Score
2426 @section Group Score
2427 @cindex group score
2428 @cindex group rank
2429 @cindex rank
2430
2431 You would normally keep important groups on high levels, but that scheme
2432 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2433 group buffer according to how often you read groups, perhaps?  Within
2434 reason?
2435
2436 This is what @dfn{group score} is for.  You can have Gnus assign a score
2437 to each group through the mechanism described below.  You can then sort
2438 the group buffer based on this score.  Alternatively, you can sort on
2439 score and then level.  (Taken together, the level and the score is
2440 called the @dfn{rank} of the group.  A group that is on level 4 and has
2441 a score of 1 has a higher rank than a group on level 5 that has a score
2442 of 300.  (The level is the most significant part and the score is the
2443 least significant part.))
2444
2445 @findex gnus-summary-bubble-group
2446 If you want groups you read often to get higher scores than groups you
2447 read seldom you can add the @code{gnus-summary-bubble-group} function to
2448 the @code{gnus-summary-exit-hook} hook.  This will result (after
2449 sorting) in a bubbling sort of action.  If you want to see that in
2450 action after each summary exit, you can add
2451 @code{gnus-group-sort-groups-by-rank} or
2452 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2453 slow things down somewhat.
2454
2455
2456 @node Marking Groups
2457 @section Marking Groups
2458 @cindex marking groups
2459
2460 If you want to perform some command on several groups, and they appear
2461 subsequently in the group buffer, you would normally just give a
2462 numerical prefix to the command.  Most group commands will then do your
2463 bidding on those groups.
2464
2465 However, if the groups are not in sequential order, you can still
2466 perform a command on several groups.  You simply mark the groups first
2467 with the process mark and then execute the command.
2468
2469 @table @kbd
2470
2471 @item #
2472 @kindex # (Group)
2473 @itemx M m
2474 @kindex M m (Group)
2475 @findex gnus-group-mark-group
2476 Set the mark on the current group (@code{gnus-group-mark-group}).
2477
2478 @item M-#
2479 @kindex M-# (Group)
2480 @itemx M u
2481 @kindex M u (Group)
2482 @findex gnus-group-unmark-group
2483 Remove the mark from the current group
2484 (@code{gnus-group-unmark-group}).
2485
2486 @item M U
2487 @kindex M U (Group)
2488 @findex gnus-group-unmark-all-groups
2489 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2490
2491 @item M w
2492 @kindex M w (Group)
2493 @findex gnus-group-mark-region
2494 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2495
2496 @item M b
2497 @kindex M b (Group)
2498 @findex gnus-group-mark-buffer
2499 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2500
2501 @item M r
2502 @kindex M r (Group)
2503 @findex gnus-group-mark-regexp
2504 Mark all groups that match some regular expression
2505 (@code{gnus-group-mark-regexp}).
2506 @end table
2507
2508 Also @pxref{Process/Prefix}.
2509
2510 @findex gnus-group-universal-argument
2511 If you want to execute some command on all groups that have been marked
2512 with the process mark, you can use the @kbd{M-&}
2513 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2514 the command to be executed.
2515
2516
2517 @node Foreign Groups
2518 @section Foreign Groups
2519 @cindex foreign groups
2520
2521 Below are some group mode commands for making and editing general foreign
2522 groups, as well as commands to ease the creation of a few
2523 special-purpose groups.  All these commands insert the newly created
2524 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2525 consulted.
2526
2527 @table @kbd
2528
2529 @item G m
2530 @kindex G m (Group)
2531 @findex gnus-group-make-group
2532 @cindex making groups
2533 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2534 for a name, a method and possibly an @dfn{address}.  For an easier way
2535 to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}).
2536
2537 @item G M
2538 @kindex G M (Group)
2539 @findex gnus-group-read-ephemeral-group
2540 Make an ephemeral group (@code{gnus-group-read-ephemeral-group}).  Gnus
2541 will prompt you for a name, a method and an @dfn{address}.
2542
2543 @item G r
2544 @kindex G r (Group)
2545 @findex gnus-group-rename-group
2546 @cindex renaming groups
2547 Rename the current group to something else
2548 (@code{gnus-group-rename-group}).  This is valid only on some
2549 groups---mail groups mostly.  This command might very well be quite slow
2550 on some back ends.
2551
2552 @item G c
2553 @kindex G c (Group)
2554 @cindex customizing
2555 @findex gnus-group-customize
2556 Customize the group parameters (@code{gnus-group-customize}).
2557
2558 @item G e
2559 @kindex G e (Group)
2560 @findex gnus-group-edit-group-method
2561 @cindex renaming groups
2562 Enter a buffer where you can edit the select method of the current
2563 group (@code{gnus-group-edit-group-method}).
2564
2565 @item G p
2566 @kindex G p (Group)
2567 @findex gnus-group-edit-group-parameters
2568 Enter a buffer where you can edit the group parameters
2569 (@code{gnus-group-edit-group-parameters}).
2570
2571 @item G E
2572 @kindex G E (Group)
2573 @findex gnus-group-edit-group
2574 Enter a buffer where you can edit the group info
2575 (@code{gnus-group-edit-group}).
2576
2577 @item G d
2578 @kindex G d (Group)
2579 @findex gnus-group-make-directory-group
2580 @cindex nndir
2581 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2582 for a directory name (@code{gnus-group-make-directory-group}).
2583
2584 @item G h
2585 @kindex G h (Group)
2586 @cindex help group
2587 @findex gnus-group-make-help-group
2588 Make the Gnus help group (@code{gnus-group-make-help-group}).
2589
2590 @item G a
2591 @kindex G a (Group)
2592 @cindex (ding) archive
2593 @cindex archive group
2594 @findex gnus-group-make-archive-group
2595 @vindex gnus-group-archive-directory
2596 @vindex gnus-group-recent-archive-directory
2597 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
2598 default a group pointing to the most recent articles will be created
2599 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2600 group will be created from @code{gnus-group-archive-directory}.
2601
2602 @item G k
2603 @kindex G k (Group)
2604 @findex gnus-group-make-kiboze-group
2605 @cindex nnkiboze
2606 Make a kiboze group.  You will be prompted for a name, for a regexp to
2607 match groups to be ``included'' in the kiboze group, and a series of
2608 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2609 @xref{Kibozed Groups}.
2610
2611 @item G D
2612 @kindex G D (Group)
2613 @findex gnus-group-enter-directory
2614 @cindex nneething
2615 Read an arbitrary directory as if it were a newsgroup with the
2616 @code{nneething} back end (@code{gnus-group-enter-directory}).
2617 @xref{Anything Groups}.
2618
2619 @item G f
2620 @kindex G f (Group)
2621 @findex gnus-group-make-doc-group
2622 @cindex ClariNet Briefs
2623 @cindex nndoc
2624 Make a group based on some file or other
2625 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2626 command, you will be prompted for a file name and a file type.
2627 Currently supported types are @code{mbox}, @code{babyl},
2628 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2629 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2630 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2631 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2632 you run this command without a prefix, Gnus will guess at the file
2633 type.  @xref{Document Groups}.
2634
2635 @item G u
2636 @kindex G u (Group)
2637 @vindex gnus-useful-groups
2638 @findex gnus-group-make-useful-group
2639 Create one of the groups mentioned in @code{gnus-useful-groups}
2640 (@code{gnus-group-make-useful-group}).
2641
2642 @item G w
2643 @kindex G w (Group)
2644 @findex gnus-group-make-web-group
2645 @cindex Google
2646 @cindex nnweb
2647 @cindex gmane
2648 Make an ephemeral group based on a web search
2649 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2650 command, make a solid group instead.  You will be prompted for the
2651 search engine type and the search string.  Valid search engine types
2652 include @code{google}, @code{dejanews}, and @code{gmane}.
2653 @xref{Web Searches}.
2654
2655 If you use the @code{google} search engine, you can limit the search
2656 to a particular group by using a match string like
2657 @samp{shaving group:alt.sysadmin.recovery}.
2658
2659 @item G R
2660 @kindex G R (Group)
2661 @findex gnus-group-make-rss-group
2662 Make a group based on an @acronym{RSS} feed
2663 (@code{gnus-group-make-rss-group}).  You will be prompted for an URL.
2664 @xref{RSS}.
2665
2666 @item G DEL
2667 @kindex G DEL (Group)
2668 @findex gnus-group-delete-group
2669 This function will delete the current group
2670 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2671 actually delete all the articles in the group, and forcibly remove the
2672 group itself from the face of the Earth.  Use a prefix only if you are
2673 absolutely sure of what you are doing.  This command can't be used on
2674 read-only groups (like @code{nntp} groups), though.
2675
2676 @item G V
2677 @kindex G V (Group)
2678 @findex gnus-group-make-empty-virtual
2679 Make a new, fresh, empty @code{nnvirtual} group
2680 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2681
2682 @item G v
2683 @kindex G v (Group)
2684 @findex gnus-group-add-to-virtual
2685 Add the current group to an @code{nnvirtual} group
2686 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2687 @end table
2688
2689 @xref{Select Methods}, for more information on the various select
2690 methods.
2691
2692 @vindex gnus-activate-foreign-newsgroups
2693 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2694 Gnus will check all foreign groups with this level or lower at startup.
2695 This might take quite a while, especially if you subscribe to lots of
2696 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2697 @code{gnus-activate-level} also affects activation of foreign
2698 newsgroups.
2699
2700
2701 @node Group Parameters
2702 @section Group Parameters
2703 @cindex group parameters
2704
2705 The group parameters store information local to a particular group.
2706 Here's an example group parameter list:
2707
2708 @example
2709 ((to-address . "ding@@gnus.org")
2710  (auto-expire . t))
2711 @end example
2712
2713 We see that each element consists of a ``dotted pair''---the thing before
2714 the dot is the key, while the thing after the dot is the value.  All the
2715 parameters have this form @emph{except} local variable specs, which are
2716 not dotted pairs, but proper lists.
2717
2718 Some parameters have correspondent customizable variables, each of which
2719 is an alist of regexps and values.
2720
2721 The following group parameters can be used:
2722
2723 @table @code
2724 @item to-address
2725 @cindex to-address
2726 Address used by when doing followups and new posts.
2727
2728 @example
2729 (to-address . "some@@where.com")
2730 @end example
2731
2732 This is primarily useful in mail groups that represent closed mailing
2733 lists---mailing lists where it's expected that everybody that writes to
2734 the mailing list is subscribed to it.  Since using this parameter
2735 ensures that the mail only goes to the mailing list itself, it means
2736 that members won't receive two copies of your followups.
2737
2738 Using @code{to-address} will actually work whether the group is foreign
2739 or not.  Let's say there's a group on the server that is called
2740 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2741 the articles from a mail-to-news gateway.  Posting directly to this
2742 group is therefore impossible---you have to send mail to the mailing
2743 list address instead.
2744
2745 See also @code{gnus-parameter-to-address-alist}.
2746
2747 @item to-list
2748 @cindex to-list
2749 Address used when doing @kbd{a} in that group.
2750
2751 @example
2752 (to-list . "some@@where.com")
2753 @end example
2754
2755 It is totally ignored
2756 when doing a followup---except that if it is present in a news group,
2757 you'll get mail group semantics when doing @kbd{f}.
2758
2759 If you do an @kbd{a} command in a mail group and you have neither a
2760 @code{to-list} group parameter nor a @code{to-address} group parameter,
2761 then a @code{to-list} group parameter will be added automatically upon
2762 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2763 @vindex gnus-add-to-list
2764
2765 @findex gnus-mailing-list-mode
2766 @cindex mail list groups
2767 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2768 entering summary buffer.
2769
2770 See also @code{gnus-parameter-to-list-alist}.
2771
2772 @anchor{subscribed}
2773 @item subscribed
2774 @cindex subscribed
2775 @cindex Mail-Followup-To
2776 @findex gnus-find-subscribed-addresses
2777 If this parameter is set to @code{t}, Gnus will consider the
2778 to-address and to-list parameters for this group as addresses of
2779 mailing lists you are subscribed to.  Giving Gnus this information is
2780 (only) a first step in getting it to generate correct Mail-Followup-To
2781 headers for your posts to these lists.  The second step is to put the
2782 following in your @file{.gnus.el}
2783
2784 @lisp
2785 (setq message-subscribed-address-functions
2786       '(gnus-find-subscribed-addresses))
2787 @end lisp
2788
2789 @xref{Mailing Lists, ,Mailing Lists, message, The Message Manual}, for
2790 a complete treatment of available MFT support.
2791
2792 @item visible
2793 @cindex visible
2794 If the group parameter list has the element @code{(visible . t)},
2795 that group will always be visible in the Group buffer, regardless
2796 of whether it has any unread articles.
2797
2798 @item broken-reply-to
2799 @cindex broken-reply-to
2800 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2801 headers in this group are to be ignored, and for the header to be hidden
2802 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2803 can be useful if you're reading a mailing list group where the listserv
2804 has inserted @code{Reply-To} headers that point back to the listserv
2805 itself.  That is broken behavior.  So there!
2806
2807 @item to-group
2808 @cindex to-group
2809 Elements like @code{(to-group . "some.group.name")} means that all
2810 posts in that group will be sent to @code{some.group.name}.
2811
2812 @item newsgroup
2813 @cindex newsgroup
2814 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2815 will treat all responses as if they were responses to news articles.
2816 This can be useful if you have a mail group that's really a mirror of a
2817 news group.
2818
2819 @item gcc-self
2820 @cindex gcc-self
2821 If @code{(gcc-self . t)} is present in the group parameter list, newly
2822 composed messages will be @code{Gcc}'d to the current group.  If
2823 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2824 generated, if @code{(gcc-self . "string")} is present, this string will
2825 be inserted literally as a @code{gcc} header.  This parameter takes
2826 precedence over any default @code{Gcc} rules as described later
2827 (@pxref{Archived Messages}).
2828
2829 @strong{Caveat}: Adding @code{(gcc-self . t)} to the parameter list of
2830 @code{nntp} groups (or the like) isn't valid.  An @code{nntp} server
2831 doesn't accept articles.
2832
2833 @item auto-expire
2834 @cindex auto-expire
2835 If the group parameter has an element that looks like @code{(auto-expire
2836 . t)}, all articles read will be marked as expirable.  For an
2837 alternative approach, @pxref{Expiring Mail}.
2838
2839 See also @code{gnus-auto-expirable-newsgroups}.
2840
2841 @item total-expire
2842 @cindex total-expire
2843 If the group parameter has an element that looks like
2844 @code{(total-expire . t)}, all read articles will be put through the
2845 expiry process, even if they are not marked as expirable.  Use with
2846 caution.  Unread, ticked and dormant articles are not eligible for
2847 expiry.
2848
2849 See also @code{gnus-total-expirable-newsgroups}.
2850
2851 @item expiry-wait
2852 @cindex expiry-wait
2853 @vindex nnmail-expiry-wait-function
2854 If the group parameter has an element that looks like
2855 @code{(expiry-wait . 10)}, this value will override any
2856 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2857 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2858 can either be a number of days (not necessarily an integer) or the
2859 symbols @code{never} or @code{immediate}.
2860
2861 @item expiry-target
2862 @cindex expiry-target
2863 Where expired messages end up.  This parameter overrides
2864 @code{nnmail-expiry-target}.
2865
2866 @item score-file
2867 @cindex score file group parameter
2868 Elements that look like @code{(score-file . "file")} will make
2869 @file{file} into the current score file for the group in question.  All
2870 interactive score entries will be put into this file.
2871
2872 @item adapt-file
2873 @cindex adapt file group parameter
2874 Elements that look like @code{(adapt-file . "file")} will make
2875 @file{file} into the current adaptive file for the group in question.
2876 All adaptive score entries will be put into this file.
2877
2878 @item admin-address
2879 @cindex admin-address
2880 When unsubscribing from a mailing list you should never send the
2881 unsubscription notice to the mailing list itself.  Instead, you'd send
2882 messages to the administrative address.  This parameter allows you to
2883 put the admin address somewhere convenient.
2884
2885 @item display
2886 @cindex display
2887 Elements that look like @code{(display . MODE)} say which articles to
2888 display on entering the group.  Valid values are:
2889
2890 @table @code
2891 @item all
2892 Display all articles, both read and unread.
2893
2894 @item an integer
2895 Display the last @var{integer} articles in the group.  This is the same as
2896 entering the group with @kbd{C-u @var{integer}}.
2897
2898 @item default
2899 Display the default visible articles, which normally includes unread and
2900 ticked articles.
2901
2902 @item an array
2903 Display articles that satisfy a predicate.
2904
2905 Here are some examples:
2906
2907 @table @code
2908 @item [unread]
2909 Display only unread articles.
2910
2911 @item [not expire]
2912 Display everything except expirable articles.
2913
2914 @item [and (not reply) (not expire)]
2915 Display everything except expirable and articles you've already
2916 responded to.
2917 @end table
2918
2919 The available operators are @code{not}, @code{and} and @code{or}.
2920 Predicates include @code{tick}, @code{unsend}, @code{undownload},
2921 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
2922 @code{killed}, @code{bookmark}, @code{score}, @code{save},
2923 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
2924
2925 @end table
2926
2927 The @code{display} parameter works by limiting the summary buffer to
2928 the subset specified.  You can pop the limit by using the @kbd{/ w}
2929 command (@pxref{Limiting}).
2930
2931 @item comment
2932 @cindex comment
2933 Elements that look like @code{(comment . "This is a comment")} are
2934 arbitrary comments on the group.  You can display comments in the
2935 group line (@pxref{Group Line Specification}).
2936
2937 @item charset
2938 @cindex charset
2939 Elements that look like @code{(charset . iso-8859-1)} will make
2940 @code{iso-8859-1} the default charset; that is, the charset that will be
2941 used for all articles that do not specify a charset.
2942
2943 See also @code{gnus-group-charset-alist}.
2944
2945 @item ignored-charsets
2946 @cindex ignored-charset
2947 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
2948 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
2949 default charset will be used for decoding articles.
2950
2951 See also @code{gnus-group-ignored-charsets-alist}.
2952
2953 @item posting-style
2954 @cindex posting-style
2955 You can store additional posting style information for this group
2956 here (@pxref{Posting Styles}).  The format is that of an entry in the
2957 @code{gnus-posting-styles} alist, except that there's no regexp matching
2958 the group name (of course).  Style elements in this group parameter will
2959 take precedence over the ones found in @code{gnus-posting-styles}.
2960
2961 For instance, if you want a funky name and signature in this group only,
2962 instead of hacking @code{gnus-posting-styles}, you could put something
2963 like this in the group parameters:
2964
2965 @example
2966 (posting-style
2967   (name "Funky Name")
2968   ("X-My-Header" "Funky Value")
2969   (signature "Funky Signature"))
2970 @end example
2971
2972 @item post-method
2973 @cindex post-method
2974 If it is set, the value is used as the method for posting message
2975 instead of @code{gnus-post-method}.
2976
2977 @item banner
2978 @cindex banner
2979 An item like @code{(banner . @var{regexp})} causes any part of an article
2980 that matches the regular expression @var{regexp} to be stripped.  Instead of
2981 @var{regexp}, you can also use the symbol @code{signature} which strips the
2982 last signature or any of the elements of the alist
2983 @code{gnus-article-banner-alist}.
2984
2985 @item sieve
2986 @cindex sieve
2987 This parameter contains a Sieve test that should match incoming mail
2988 that should be placed in this group.  From this group parameter, a
2989 Sieve @samp{IF} control structure is generated, having the test as the
2990 condition and @samp{fileinto "group.name";} as the body.
2991
2992 For example, if the @samp{INBOX.list.sieve} group has the @code{(sieve
2993 address "sender" "sieve-admin@@extundo.com")} group parameter, when
2994 translating the group parameter into a Sieve script (@pxref{Sieve
2995 Commands}) the following Sieve code is generated:
2996
2997 @example
2998 if address \"sender\" \"sieve-admin@@extundo.com\" @{
2999         fileinto \"INBOX.list.sieve\";
3000 @}
3001 @end example
3002
3003 The Sieve language is described in RFC 3028.  @xref{Top, Emacs Sieve,
3004 Top, sieve, Emacs Sieve}.
3005
3006 @item (agent parameters)
3007 If the agent has been enabled, you can set any of the its parameters
3008 to control the behavior of the agent in individual groups. See Agent
3009 Parameters in @ref{Category Syntax}.  Most users will choose to set
3010 agent parameters in either an agent category or group topic to
3011 minimize the configuration effort.
3012
3013 @item (@var{variable} @var{form})
3014 You can use the group parameters to set variables local to the group you
3015 are entering.  If you want to turn threading off in @samp{news.answers},
3016 you could put @code{(gnus-show-threads nil)} in the group parameters of
3017 that group.  @code{gnus-show-threads} will be made into a local variable
3018 in the summary buffer you enter, and the form @code{nil} will be
3019 @code{eval}ed there.
3020
3021 Note that this feature sets the variable locally to the summary buffer.
3022 But some variables are evaluated in the article buffer, or in the
3023 message buffer (of a reply or followup or otherwise newly created
3024 message).  As a workaround, it might help to add the variable in
3025 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
3026 Stuff}.  So if you want to set @code{message-from-style} via the group
3027 parameters, then you may need the following statement elsewhere in your
3028 @file{~/.gnus} file:
3029
3030 @lisp
3031 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
3032 @end lisp
3033
3034 @vindex gnus-list-identifiers
3035 A use for this feature is to remove a mailing list identifier tag in
3036 the subject fields of articles.  E.g. if the news group
3037
3038 @example
3039 nntp+news.gnus.org:gmane.text.docbook.apps
3040 @end example
3041
3042 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
3043 tag can be removed from the article subjects in the summary buffer for
3044 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
3045 into the group parameters for the group.
3046
3047 This can also be used as a group-specific hook function, if you'd like.
3048 If you want to hear a beep when you enter a group, you could put
3049 something like @code{(dummy-variable (ding))} in the parameters of that
3050 group.  @code{dummy-variable} will be set to the result of the
3051 @code{(ding)} form, but who cares?
3052
3053 @end table
3054
3055 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
3056 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
3057 presents you with a Customize-like interface.  The latter helps avoid
3058 silly Lisp errors.)  You might also be interested in reading about topic
3059 parameters (@pxref{Topic Parameters}).
3060
3061 @vindex gnus-parameters
3062 Group parameters can be set via the @code{gnus-parameters} variable too.
3063 But some variables, such as @code{visible}, have no effect.  For
3064 example:
3065
3066 @lisp
3067 (setq gnus-parameters
3068       '(("mail\\..*"
3069          (gnus-show-threads nil)
3070          (gnus-use-scoring nil)
3071          (gnus-summary-line-format
3072           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3073          (gcc-self . t)
3074          (display . all))
3075
3076         ("^nnimap:\\(foo.bar\\)$"
3077          (to-group . "\\1"))
3078
3079         ("mail\\.me"
3080          (gnus-use-scoring  t))
3081
3082         ("list\\..*"
3083          (total-expire . t)
3084          (broken-reply-to . t))))
3085 @end lisp
3086
3087 String value of parameters will be subjected to regexp substitution, as
3088 the @code{to-group} example shows.
3089
3090
3091 @node Listing Groups
3092 @section Listing Groups
3093 @cindex group listing
3094
3095 These commands all list various slices of the groups available.
3096
3097 @table @kbd
3098
3099 @item l
3100 @itemx A s
3101 @kindex A s (Group)
3102 @kindex l (Group)
3103 @findex gnus-group-list-groups
3104 List all groups that have unread articles
3105 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3106 command will list only groups of level ARG and lower.  By default, it
3107 only lists groups of level five (i.e.,
3108 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3109 groups).
3110
3111 @item L
3112 @itemx A u
3113 @kindex A u (Group)
3114 @kindex L (Group)
3115 @findex gnus-group-list-all-groups
3116 List all groups, whether they have unread articles or not
3117 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3118 this command will list only groups of level ARG and lower.  By default,
3119 it lists groups of level seven or lower (i.e., just subscribed and
3120 unsubscribed groups).
3121
3122 @item A l
3123 @kindex A l (Group)
3124 @findex gnus-group-list-level
3125 List all unread groups on a specific level
3126 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3127 with no unread articles.
3128
3129 @item A k
3130 @kindex A k (Group)
3131 @findex gnus-group-list-killed
3132 List all killed groups (@code{gnus-group-list-killed}).  If given a
3133 prefix argument, really list all groups that are available, but aren't
3134 currently (un)subscribed.  This could entail reading the active file
3135 from the server.
3136
3137 @item A z
3138 @kindex A z (Group)
3139 @findex gnus-group-list-zombies
3140 List all zombie groups (@code{gnus-group-list-zombies}).
3141
3142 @item A m
3143 @kindex A m (Group)
3144 @findex gnus-group-list-matching
3145 List all unread, subscribed groups with names that match a regexp
3146 (@code{gnus-group-list-matching}).
3147
3148 @item A M
3149 @kindex A M (Group)
3150 @findex gnus-group-list-all-matching
3151 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3152
3153 @item A A
3154 @kindex A A (Group)
3155 @findex gnus-group-list-active
3156 List absolutely all groups in the active file(s) of the
3157 server(s) you are connected to (@code{gnus-group-list-active}).  This
3158 might very well take quite a while.  It might actually be a better idea
3159 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3160 thing to match on.  Also note that this command may list groups that
3161 don't exist (yet)---these will be listed as if they were killed groups.
3162 Take the output with some grains of salt.
3163
3164 @item A a
3165 @kindex A a (Group)
3166 @findex gnus-group-apropos
3167 List all groups that have names that match a regexp
3168 (@code{gnus-group-apropos}).
3169
3170 @item A d
3171 @kindex A d (Group)
3172 @findex gnus-group-description-apropos
3173 List all groups that have names or descriptions that match a regexp
3174 (@code{gnus-group-description-apropos}).
3175
3176 @item A c
3177 @kindex A c (Group)
3178 @findex gnus-group-list-cached
3179 List all groups with cached articles (@code{gnus-group-list-cached}).
3180
3181 @item A ?
3182 @kindex A ? (Group)
3183 @findex gnus-group-list-dormant
3184 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3185
3186 @item A /
3187 @kindex A / (Group)
3188 @findex gnus-group-list-limit
3189 List groups limited within the current selection
3190 (@code{gnus-group-list-limit}).
3191
3192 @item A f
3193 @kindex A f (Group)
3194 @findex gnus-group-list-flush
3195 Flush groups from the current selection (@code{gnus-group-list-flush}).
3196
3197 @item A p
3198 @kindex A p (Group)
3199 @findex gnus-group-list-plus
3200 List groups plus the current selection (@code{gnus-group-list-plus}).
3201
3202 @end table
3203
3204 @vindex gnus-permanently-visible-groups
3205 @cindex visible group parameter
3206 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3207 always be shown, whether they have unread articles or not.  You can also
3208 add the @code{visible} element to the group parameters in question to
3209 get the same effect.
3210
3211 @vindex gnus-list-groups-with-ticked-articles
3212 Groups that have just ticked articles in it are normally listed in the
3213 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3214 @code{nil}, these groups will be treated just like totally empty
3215 groups.  It is @code{t} by default.
3216
3217
3218 @node Sorting Groups
3219 @section Sorting Groups
3220 @cindex sorting groups
3221
3222 @kindex C-c C-s (Group)
3223 @findex gnus-group-sort-groups
3224 @vindex gnus-group-sort-function
3225 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3226 group buffer according to the function(s) given by the
3227 @code{gnus-group-sort-function} variable.  Available sorting functions
3228 include:
3229
3230 @table @code
3231
3232 @item gnus-group-sort-by-alphabet
3233 @findex gnus-group-sort-by-alphabet
3234 Sort the group names alphabetically.  This is the default.
3235
3236 @item gnus-group-sort-by-real-name
3237 @findex gnus-group-sort-by-real-name
3238 Sort the group alphabetically on the real (unprefixed) group names.
3239
3240 @item gnus-group-sort-by-level
3241 @findex gnus-group-sort-by-level
3242 Sort by group level.
3243
3244 @item gnus-group-sort-by-score
3245 @findex gnus-group-sort-by-score
3246 Sort by group score.  @xref{Group Score}.
3247
3248 @item gnus-group-sort-by-rank
3249 @findex gnus-group-sort-by-rank
3250 Sort by group score and then the group level.  The level and the score
3251 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3252
3253 @item gnus-group-sort-by-unread
3254 @findex gnus-group-sort-by-unread
3255 Sort by number of unread articles.
3256
3257 @item gnus-group-sort-by-method
3258 @findex gnus-group-sort-by-method
3259 Sort alphabetically on the select method.
3260
3261 @item gnus-group-sort-by-server
3262 @findex gnus-group-sort-by-server
3263 Sort alphabetically on the Gnus server name.
3264
3265
3266 @end table
3267
3268 @code{gnus-group-sort-function} can also be a list of sorting
3269 functions.  In that case, the most significant sort key function must be
3270 the last one.
3271
3272
3273 There are also a number of commands for sorting directly according to
3274 some sorting criteria:
3275
3276 @table @kbd
3277 @item G S a
3278 @kindex G S a (Group)
3279 @findex gnus-group-sort-groups-by-alphabet
3280 Sort the group buffer alphabetically by group name
3281 (@code{gnus-group-sort-groups-by-alphabet}).
3282
3283 @item G S u
3284 @kindex G S u (Group)
3285 @findex gnus-group-sort-groups-by-unread
3286 Sort the group buffer by the number of unread articles
3287 (@code{gnus-group-sort-groups-by-unread}).
3288
3289 @item G S l
3290 @kindex G S l (Group)
3291 @findex gnus-group-sort-groups-by-level
3292 Sort the group buffer by group level
3293 (@code{gnus-group-sort-groups-by-level}).
3294
3295 @item G S v
3296 @kindex G S v (Group)
3297 @findex gnus-group-sort-groups-by-score
3298 Sort the group buffer by group score
3299 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3300
3301 @item G S r
3302 @kindex G S r (Group)
3303 @findex gnus-group-sort-groups-by-rank
3304 Sort the group buffer by group rank
3305 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3306
3307 @item G S m
3308 @kindex G S m (Group)
3309 @findex gnus-group-sort-groups-by-method
3310 Sort the group buffer alphabetically by back end name@*
3311 (@code{gnus-group-sort-groups-by-method}).
3312
3313 @item G S n
3314 @kindex G S n (Group)
3315 @findex gnus-group-sort-groups-by-real-name
3316 Sort the group buffer alphabetically by real (unprefixed) group name
3317 (@code{gnus-group-sort-groups-by-real-name}).
3318
3319 @end table
3320
3321 All the commands below obey the process/prefix convention
3322 (@pxref{Process/Prefix}).
3323
3324 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3325 commands will sort in reverse order.
3326
3327 You can also sort a subset of the groups:
3328
3329 @table @kbd
3330 @item G P a
3331 @kindex G P a (Group)
3332 @findex gnus-group-sort-selected-groups-by-alphabet
3333 Sort the groups alphabetically by group name
3334 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3335
3336 @item G P u
3337 @kindex G P u (Group)
3338 @findex gnus-group-sort-selected-groups-by-unread
3339 Sort the groups by the number of unread articles
3340 (@code{gnus-group-sort-selected-groups-by-unread}).
3341
3342 @item G P l
3343 @kindex G P l (Group)
3344 @findex gnus-group-sort-selected-groups-by-level
3345 Sort the groups by group level
3346 (@code{gnus-group-sort-selected-groups-by-level}).
3347
3348 @item G P v
3349 @kindex G P v (Group)
3350 @findex gnus-group-sort-selected-groups-by-score
3351 Sort the groups by group score
3352 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3353
3354 @item G P r
3355 @kindex G P r (Group)
3356 @findex gnus-group-sort-selected-groups-by-rank
3357 Sort the groups by group rank
3358 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3359
3360 @item G P m
3361 @kindex G P m (Group)
3362 @findex gnus-group-sort-selected-groups-by-method
3363 Sort the groups alphabetically by back end name@*
3364 (@code{gnus-group-sort-selected-groups-by-method}).
3365
3366 @item G P n
3367 @kindex G P n (Group)
3368 @findex gnus-group-sort-selected-groups-by-real-name
3369 Sort the groups alphabetically by real (unprefixed) group name
3370 (@code{gnus-group-sort-selected-groups-by-real-name}).
3371
3372 @item G P s
3373 @kindex G P s (Group)
3374 @findex gnus-group-sort-selected-groups
3375 Sort the groups according to @code{gnus-group-sort-function}.
3376
3377 @end table
3378
3379 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3380 move groups around.
3381
3382
3383 @node Group Maintenance
3384 @section Group Maintenance
3385 @cindex bogus groups
3386
3387 @table @kbd
3388 @item b
3389 @kindex b (Group)
3390 @findex gnus-group-check-bogus-groups
3391 Find bogus groups and delete them
3392 (@code{gnus-group-check-bogus-groups}).
3393
3394 @item F
3395 @kindex F (Group)
3396 @findex gnus-group-find-new-groups
3397 Find new groups and process them (@code{gnus-group-find-new-groups}).
3398 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3399 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3400 to query the server for new groups, and subscribe the new groups as
3401 zombies.
3402
3403 @item C-c C-x
3404 @kindex C-c C-x (Group)
3405 @findex gnus-group-expire-articles
3406 Run all expirable articles in the current group through the expiry
3407 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3408 all expirable articles in the group that have been around for a while.
3409 (@pxref{Expiring Mail}).
3410
3411 @item C-c C-M-x
3412 @kindex C-c C-M-x (Group)
3413 @findex gnus-group-expire-all-groups
3414 Run all expirable articles in all groups through the expiry process
3415 (@code{gnus-group-expire-all-groups}).
3416
3417 @end table
3418
3419
3420 @node Browse Foreign Server
3421 @section Browse Foreign Server
3422 @cindex foreign servers
3423 @cindex browsing servers
3424
3425 @table @kbd
3426 @item B
3427 @kindex B (Group)
3428 @findex gnus-group-browse-foreign-server
3429 You will be queried for a select method and a server name.  Gnus will
3430 then attempt to contact this server and let you browse the groups there
3431 (@code{gnus-group-browse-foreign-server}).
3432 @end table
3433
3434 @findex gnus-browse-mode
3435 A new buffer with a list of available groups will appear.  This buffer
3436 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3437 a lot) like a normal group buffer.
3438
3439 Here's a list of keystrokes available in the browse mode:
3440
3441 @table @kbd
3442 @item n
3443 @kindex n (Browse)
3444 @findex gnus-group-next-group
3445 Go to the next group (@code{gnus-group-next-group}).
3446
3447 @item p
3448 @kindex p (Browse)
3449 @findex gnus-group-prev-group
3450 Go to the previous group (@code{gnus-group-prev-group}).
3451
3452 @item SPACE
3453 @kindex SPACE (Browse)
3454 @findex gnus-browse-read-group
3455 Enter the current group and display the first article
3456 (@code{gnus-browse-read-group}).
3457
3458 @item RET
3459 @kindex RET (Browse)
3460 @findex gnus-browse-select-group
3461 Enter the current group (@code{gnus-browse-select-group}).
3462
3463 @item u
3464 @kindex u (Browse)
3465 @findex gnus-browse-unsubscribe-current-group
3466 Unsubscribe to the current group, or, as will be the case here,
3467 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3468
3469 @item l
3470 @itemx q
3471 @kindex q (Browse)
3472 @kindex l (Browse)
3473 @findex gnus-browse-exit
3474 Exit browse mode (@code{gnus-browse-exit}).
3475
3476 @item d
3477 @kindex d (Browse)
3478 @findex gnus-browse-describe-group
3479 Describe the current group (@code{gnus-browse-describe-group}).
3480
3481 @item ?
3482 @kindex ? (Browse)
3483 @findex gnus-browse-describe-briefly
3484 Describe browse mode briefly (well, there's not much to describe, is
3485 there) (@code{gnus-browse-describe-briefly}).
3486 @end table
3487
3488
3489 @node Exiting Gnus
3490 @section Exiting Gnus
3491 @cindex exiting Gnus
3492
3493 Yes, Gnus is ex(c)iting.
3494
3495 @table @kbd
3496 @item z
3497 @kindex z (Group)
3498 @findex gnus-group-suspend
3499 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3500 but it kills all buffers except the Group buffer.  I'm not sure why this
3501 is a gain, but then who am I to judge?
3502
3503 @item q
3504 @kindex q (Group)
3505 @findex gnus-group-exit
3506 @c @icon{gnus-group-exit}
3507 Quit Gnus (@code{gnus-group-exit}).
3508
3509 @item Q
3510 @kindex Q (Group)
3511 @findex gnus-group-quit
3512 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3513 The dribble file will be saved, though (@pxref{Auto Save}).
3514 @end table
3515
3516 @vindex gnus-exit-gnus-hook
3517 @vindex gnus-suspend-gnus-hook
3518 @vindex gnus-after-exiting-gnus-hook
3519 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3520 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3521 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3522 exiting Gnus.
3523
3524 Note:
3525
3526 @quotation
3527 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3528 numbly heavy and herself fall into a hazy trance as the boy sitting
3529 behind her drew repeated lines with his pencil across the back of her
3530 plastic chair.
3531 @end quotation
3532
3533
3534 @node Group Topics
3535 @section Group Topics
3536 @cindex topics
3537
3538 If you read lots and lots of groups, it might be convenient to group
3539 them hierarchically according to topics.  You put your Emacs groups over
3540 here, your sex groups over there, and the rest (what, two groups or so?)
3541 you put in some misc section that you never bother with anyway.  You can
3542 even group the Emacs sex groups as a sub-topic to either the Emacs
3543 groups or the sex groups---or both!  Go wild!
3544
3545 @iftex
3546 @iflatex
3547 \gnusfigure{Group Topics}{400}{
3548 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3549 }
3550 @end iflatex
3551 @end iftex
3552
3553 Here's an example:
3554
3555 @example
3556 Gnus
3557   Emacs -- I wuw it!
3558      3: comp.emacs
3559      2: alt.religion.emacs
3560     Naughty Emacs
3561      452: alt.sex.emacs
3562        0: comp.talk.emacs.recovery
3563   Misc
3564      8: comp.binaries.fractals
3565     13: comp.sources.unix
3566 @end example
3567
3568 @findex gnus-topic-mode
3569 @kindex t (Group)
3570 To get this @emph{fab} functionality you simply turn on (ooh!) the
3571 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3572 is a toggling command.)
3573
3574 Go ahead, just try it.  I'll still be here when you get back.  La de
3575 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3576 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3577 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3578 Hot and bothered?
3579
3580 If you want this permanently enabled, you should add that minor mode to
3581 the hook for the group mode.  Put the following line in your
3582 @file{~/.gnus.el} file:
3583
3584 @lisp
3585 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3586 @end lisp
3587
3588 @menu
3589 * Topic Commands::              Interactive E-Z commands.
3590 * Topic Variables::             How to customize the topics the Lisp Way.
3591 * Topic Sorting::               Sorting each topic individually.
3592 * Topic Topology::              A map of the world.
3593 * Topic Parameters::            Parameters that apply to all groups in a topic.
3594 @end menu
3595
3596
3597 @node Topic Commands
3598 @subsection Topic Commands
3599 @cindex topic commands
3600
3601 When the topic minor mode is turned on, a new @kbd{T} submap will be
3602 available.  In addition, a few of the standard keys change their
3603 definitions slightly.
3604
3605 In general, the following kinds of operations are possible on topics.
3606 First of all, you want to create topics.  Secondly, you want to put
3607 groups in topics and to move them around until you have an order you
3608 like.  The third kind of operation is to show/hide parts of the whole
3609 shebang.  You might want to hide a topic including its subtopics and
3610 groups, to get a better overview of the other groups.
3611
3612 Here is a list of the basic keys that you might need to set up topics
3613 the way you like.
3614
3615 @table @kbd
3616
3617 @item T n
3618 @kindex T n (Topic)
3619 @findex gnus-topic-create-topic
3620 Prompt for a new topic name and create it
3621 (@code{gnus-topic-create-topic}).
3622
3623 @item T TAB
3624 @itemx TAB
3625 @kindex T TAB (Topic)
3626 @kindex TAB (Topic)
3627 @findex gnus-topic-indent
3628 ``Indent'' the current topic so that it becomes a sub-topic of the
3629 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3630 ``un-indent'' the topic instead.
3631
3632 @item M-TAB
3633 @kindex M-TAB (Topic)
3634 @findex gnus-topic-unindent
3635 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3636 parent of its current parent (@code{gnus-topic-unindent}).
3637
3638 @end table
3639
3640 The following two keys can be used to move groups and topics around.
3641 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3642 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3643 kill and yank rather than cut and paste.
3644
3645 @table @kbd
3646
3647 @item C-k
3648 @kindex C-k (Topic)
3649 @findex gnus-topic-kill-group
3650 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3651 topic will be removed along with the topic.
3652
3653 @item C-y
3654 @kindex C-y (Topic)
3655 @findex gnus-topic-yank-group
3656 Yank the previously killed group or topic
3657 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3658 before all groups.
3659
3660 So, to move a topic to the beginning of the list of topics, just hit
3661 @kbd{C-k} on it.  This is like the ``cut'' part of cut and paste.  Then,
3662 move the cursor to the beginning of the buffer (just below the ``Gnus''
3663 topic) and hit @kbd{C-y}.  This is like the ``paste'' part of cut and
3664 paste.  Like I said -- E-Z.
3665
3666 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3667 you can move topics around as well as groups.
3668
3669 @end table
3670
3671 After setting up the topics the way you like them, you might wish to
3672 hide a topic, or to show it again.  That's why we have the following
3673 key.
3674
3675 @table @kbd
3676
3677 @item RET
3678 @kindex RET (Topic)
3679 @findex gnus-topic-select-group
3680 @itemx SPACE
3681 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3682 When you perform this command on a group, you'll enter the group, as
3683 usual.  When done on a topic line, the topic will be folded (if it was
3684 visible) or unfolded (if it was folded already).  So it's basically a
3685 toggling command on topics.  In addition, if you give a numerical
3686 prefix, group on that level (and lower) will be displayed.
3687
3688 @end table
3689
3690 Now for a list of other commands, in no particular order.
3691
3692 @table @kbd
3693
3694 @item T m
3695 @kindex T m (Topic)
3696 @findex gnus-topic-move-group
3697 Move the current group to some other topic
3698 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3699 convention (@pxref{Process/Prefix}).
3700
3701 @item T j
3702 @kindex T j (Topic)
3703 @findex gnus-topic-jump-to-topic
3704 Go to a topic (@code{gnus-topic-jump-to-topic}).
3705
3706 @item T c
3707 @kindex T c (Topic)
3708 @findex gnus-topic-copy-group
3709 Copy the current group to some other topic
3710 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3711 convention (@pxref{Process/Prefix}).
3712
3713 @item T h
3714 @kindex T h (Topic)
3715 @findex gnus-topic-hide-topic
3716 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3717 a prefix, hide the topic permanently.
3718
3719 @item T s
3720 @kindex T s (Topic)
3721 @findex gnus-topic-show-topic
3722 Show the current topic (@code{gnus-topic-show-topic}).  If given
3723 a prefix, show the topic permanently.
3724
3725 @item T D
3726 @kindex T D (Topic)
3727 @findex gnus-topic-remove-group
3728 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3729 This command is mainly useful if you have the same group in several
3730 topics and wish to remove it from one of the topics.  You may also
3731 remove a group from all topics, but in that case, Gnus will add it to
3732 the root topic the next time you start Gnus.  In fact, all new groups
3733 (which, naturally, don't belong to any topic) will show up in the root
3734 topic.
3735
3736 This command uses the process/prefix convention
3737 (@pxref{Process/Prefix}).
3738
3739 @item T M
3740 @kindex T M (Topic)
3741 @findex gnus-topic-move-matching
3742 Move all groups that match some regular expression to a topic
3743 (@code{gnus-topic-move-matching}).
3744
3745 @item T C
3746 @kindex T C (Topic)
3747 @findex gnus-topic-copy-matching
3748 Copy all groups that match some regular expression to a topic
3749 (@code{gnus-topic-copy-matching}).
3750
3751 @item T H
3752 @kindex T H (Topic)
3753 @findex gnus-topic-toggle-display-empty-topics
3754 Toggle hiding empty topics
3755 (@code{gnus-topic-toggle-display-empty-topics}).
3756
3757 @item T #
3758 @kindex T # (Topic)
3759 @findex gnus-topic-mark-topic
3760 Mark all groups in the current topic with the process mark
3761 (@code{gnus-topic-mark-topic}).  This command works recursively on
3762 sub-topics unless given a prefix.
3763
3764 @item T M-#
3765 @kindex T M-# (Topic)
3766 @findex gnus-topic-unmark-topic
3767 Remove the process mark from all groups in the current topic
3768 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3769 sub-topics unless given a prefix.
3770
3771 @item C-c C-x
3772 @kindex C-c C-x (Topic)
3773 @findex gnus-topic-expire-articles
3774 Run all expirable articles in the current group or topic through the
3775 expiry process (if any)
3776 (@code{gnus-topic-expire-articles}).  (@pxref{Expiring Mail}).
3777
3778 @item T r
3779 @kindex T r (Topic)
3780 @findex gnus-topic-rename
3781 Rename a topic (@code{gnus-topic-rename}).
3782
3783 @item T DEL
3784 @kindex T DEL (Topic)
3785 @findex gnus-topic-delete
3786 Delete an empty topic (@code{gnus-topic-delete}).
3787
3788 @item A T
3789 @kindex A T (Topic)
3790 @findex gnus-topic-list-active
3791 List all groups that Gnus knows about in a topics-ified way
3792 (@code{gnus-topic-list-active}).
3793
3794 @item T M-n
3795 @kindex T M-n (Topic)
3796 @findex gnus-topic-goto-next-topic
3797 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3798
3799 @item T M-p
3800 @kindex T M-p (Topic)
3801 @findex gnus-topic-goto-previous-topic
3802 Go to the next topic (@code{gnus-topic-goto-previous-topic}).
3803
3804 @item G p
3805 @kindex G p (Topic)
3806 @findex gnus-topic-edit-parameters
3807 @cindex group parameters
3808 @cindex topic parameters
3809 @cindex parameters
3810 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3811 @xref{Topic Parameters}.
3812
3813 @end table
3814
3815
3816 @node Topic Variables
3817 @subsection Topic Variables
3818 @cindex topic variables
3819
3820 The previous section told you how to tell Gnus which topics to display.
3821 This section explains how to tell Gnus what to display about each topic.
3822
3823 @vindex gnus-topic-line-format
3824 The topic lines themselves are created according to the
3825 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
3826 Valid elements are:
3827
3828 @table @samp
3829 @item i
3830 Indentation.
3831 @item n
3832 Topic name.
3833 @item v
3834 Visibility.
3835 @item l
3836 Level.
3837 @item g
3838 Number of groups in the topic.
3839 @item a
3840 Number of unread articles in the topic.
3841 @item A
3842 Number of unread articles in the topic and all its subtopics.
3843 @end table
3844
3845 @vindex gnus-topic-indent-level
3846 Each sub-topic (and the groups in the sub-topics) will be indented with
3847 @code{gnus-topic-indent-level} times the topic level number of spaces.
3848 The default is 2.
3849
3850 @vindex gnus-topic-mode-hook
3851 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
3852
3853 @vindex gnus-topic-display-empty-topics
3854 The @code{gnus-topic-display-empty-topics} says whether to display even
3855 topics that have no unread articles in them.  The default is @code{t}.
3856
3857
3858 @node Topic Sorting
3859 @subsection Topic Sorting
3860 @cindex topic sorting
3861
3862 You can sort the groups in each topic individually with the following
3863 commands:
3864
3865
3866 @table @kbd
3867 @item T S a
3868 @kindex T S a (Topic)
3869 @findex gnus-topic-sort-groups-by-alphabet
3870 Sort the current topic alphabetically by group name
3871 (@code{gnus-topic-sort-groups-by-alphabet}).
3872
3873 @item T S u
3874 @kindex T S u (Topic)
3875 @findex gnus-topic-sort-groups-by-unread
3876 Sort the current topic by the number of unread articles
3877 (@code{gnus-topic-sort-groups-by-unread}).
3878
3879 @item T S l
3880 @kindex T S l (Topic)
3881 @findex gnus-topic-sort-groups-by-level
3882 Sort the current topic by group level
3883 (@code{gnus-topic-sort-groups-by-level}).
3884
3885 @item T S v
3886 @kindex T S v (Topic)
3887 @findex gnus-topic-sort-groups-by-score
3888 Sort the current topic by group score
3889 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
3890
3891 @item T S r
3892 @kindex T S r (Topic)
3893 @findex gnus-topic-sort-groups-by-rank
3894 Sort the current topic by group rank
3895 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
3896
3897 @item T S m
3898 @kindex T S m (Topic)
3899 @findex gnus-topic-sort-groups-by-method
3900 Sort the current topic alphabetically by back end name
3901 (@code{gnus-topic-sort-groups-by-method}).
3902
3903 @item T S e
3904 @kindex T S e (Topic)
3905 @findex gnus-topic-sort-groups-by-server
3906 Sort the current topic alphabetically by server name
3907 (@code{gnus-topic-sort-groups-by-server}).
3908
3909 @item T S s
3910 @kindex T S s (Topic)
3911 @findex gnus-topic-sort-groups
3912 Sort the current topic according to the function(s) given by the
3913 @code{gnus-group-sort-function} variable
3914 (@code{gnus-topic-sort-groups}).
3915
3916 @end table
3917
3918 When given a prefix argument, all these commands will sort in reverse
3919 order.  @xref{Sorting Groups}, for more information about group
3920 sorting.
3921
3922
3923 @node Topic Topology
3924 @subsection Topic Topology
3925 @cindex topic topology
3926 @cindex topology
3927
3928 So, let's have a look at an example group buffer:
3929
3930 @example
3931 @group
3932 Gnus
3933   Emacs -- I wuw it!
3934      3: comp.emacs
3935      2: alt.religion.emacs
3936     Naughty Emacs
3937      452: alt.sex.emacs
3938        0: comp.talk.emacs.recovery
3939   Misc
3940      8: comp.binaries.fractals
3941     13: comp.sources.unix
3942 @end group
3943 @end example
3944
3945 So, here we have one top-level topic (@samp{Gnus}), two topics under
3946 that, and one sub-topic under one of the sub-topics.  (There is always
3947 just one (1) top-level topic).  This topology can be expressed as
3948 follows:
3949
3950 @lisp
3951 (("Gnus" visible)
3952  (("Emacs -- I wuw it!" visible)
3953   (("Naughty Emacs" visible)))
3954  (("Misc" visible)))
3955 @end lisp
3956
3957 @vindex gnus-topic-topology
3958 This is in fact how the variable @code{gnus-topic-topology} would look
3959 for the display above.  That variable is saved in the @file{.newsrc.eld}
3960 file, and shouldn't be messed with manually---unless you really want
3961 to.  Since this variable is read from the @file{.newsrc.eld} file,
3962 setting it in any other startup files will have no effect.
3963
3964 This topology shows what topics are sub-topics of what topics (right),
3965 and which topics are visible.  Two settings are currently
3966 allowed---@code{visible} and @code{invisible}.
3967
3968
3969 @node Topic Parameters
3970 @subsection Topic Parameters
3971 @cindex topic parameters
3972
3973 All groups in a topic will inherit group parameters from the parent
3974 (and ancestor) topic parameters.  All valid group parameters are valid
3975 topic parameters (@pxref{Group Parameters}).  When the agent is
3976 enabled, all agent parameters (See Agent Parameters in @ref{Category
3977 Syntax}) are also valid topic parameters.
3978
3979 In addition, the following parameters are only valid as topic
3980 parameters:
3981
3982 @table @code
3983 @item subscribe
3984 When subscribing new groups by topic (@pxref{Subscription Methods}), the
3985 @code{subscribe} topic parameter says what groups go in what topic.  Its
3986 value should be a regexp to match the groups that should go in that
3987 topic.
3988
3989 @item subscribe-level
3990 When subscribing new groups by topic (see the @code{subscribe} parameter),
3991 the group will be subscribed with the level specified in the
3992 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
3993
3994 @end table
3995
3996 Group parameters (of course) override topic parameters, and topic
3997 parameters in sub-topics override topic parameters in super-topics.  You
3998 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
3999 verb, although you may feel free to disagree with me here.)
4000
4001 @example
4002 @group
4003 Gnus
4004   Emacs
4005      3: comp.emacs
4006      2: alt.religion.emacs
4007    452: alt.sex.emacs
4008     Relief
4009      452: alt.sex.emacs
4010        0: comp.talk.emacs.recovery
4011   Misc
4012      8: comp.binaries.fractals
4013     13: comp.sources.unix
4014    452: alt.sex.emacs
4015 @end group   
4016 @end example
4017
4018 The @samp{Emacs} topic has the topic parameter @code{(score-file
4019 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
4020 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
4021 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
4022 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
4023 . "religion.SCORE")}.
4024
4025 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
4026 will get the @file{relief.SCORE} home score file.  If you enter the same
4027 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
4028 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
4029 get the @file{religion.SCORE} home score file.
4030
4031 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
4032 there are some problems, especially with the @code{total-expiry}
4033 parameter.  Say you have a mail group in two topics; one with
4034 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
4035 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
4036 of these topics you mean to expire articles from, so anything may
4037 happen.  In fact, I hereby declare that it is @dfn{undefined} what
4038 happens.  You just have to be careful if you do stuff like that.
4039
4040
4041 @node Misc Group Stuff
4042 @section Misc Group Stuff
4043
4044 @menu
4045 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
4046 * Group Information::           Information and help on groups and Gnus.
4047 * Group Timestamp::             Making Gnus keep track of when you last read a group.
4048 * File Commands::               Reading and writing the Gnus files.
4049 * Sieve Commands::              Managing Sieve scripts.
4050 @end menu
4051
4052 @table @kbd
4053
4054 @item ^
4055 @kindex ^ (Group)
4056 @findex gnus-group-enter-server-mode
4057 Enter the server buffer (@code{gnus-group-enter-server-mode}).
4058 @xref{Server Buffer}.
4059
4060 @item a
4061 @kindex a (Group)
4062 @findex gnus-group-post-news
4063 Start composing a message (a news by default)
4064 (@code{gnus-group-post-news}).  If given a prefix, post to the group
4065 under the point.  If the prefix is 1, prompt for a group to post to.
4066 Contrary to what the name of this function suggests, the prepared
4067 article might be a mail instead of a news, if a mail group is specified
4068 with the prefix argument.  @xref{Composing Messages}.
4069
4070 @item m
4071 @kindex m (Group)
4072 @findex gnus-group-mail
4073 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
4074 use the posting style of the group under the point.  If the prefix is 1,
4075 prompt for a group name to find the posting style.
4076 @xref{Composing Messages}.
4077
4078 @item i
4079 @kindex i (Group)
4080 @findex gnus-group-news
4081 Start composing a news (@code{gnus-group-news}).  If given a prefix,
4082 post to the group under the point.  If the prefix is 1, prompt
4083 for group to post to.  @xref{Composing Messages}.
4084
4085 This function actually prepares a news even when using mail groups.
4086 This is useful for ``posting'' messages to mail groups without actually
4087 sending them over the network: they're just saved directly to the group
4088 in question.  The corresponding back end must have a request-post method
4089 for this to work though.
4090
4091 @end table
4092
4093 Variables for the group buffer:
4094
4095 @table @code
4096
4097 @item gnus-group-mode-hook
4098 @vindex gnus-group-mode-hook
4099 is called after the group buffer has been
4100 created.
4101
4102 @item gnus-group-prepare-hook
4103 @vindex gnus-group-prepare-hook
4104 is called after the group buffer is
4105 generated.  It may be used to modify the buffer in some strange,
4106 unnatural way.
4107
4108 @item gnus-group-prepared-hook
4109 @vindex gnus-group-prepare-hook
4110 is called as the very last thing after the group buffer has been
4111 generated.  It may be used to move point around, for instance.
4112
4113 @item gnus-permanently-visible-groups
4114 @vindex gnus-permanently-visible-groups
4115 Groups matching this regexp will always be listed in the group buffer,
4116 whether they are empty or not.
4117
4118 @item gnus-group-name-charset-method-alist
4119 @vindex gnus-group-name-charset-method-alist
4120 An alist of method and the charset for group names.  It is used to show
4121 non-@acronym{ASCII} group names.
4122
4123 For example:
4124 @lisp
4125 (setq gnus-group-name-charset-method-alist
4126     '(((nntp "news.com.cn") . cn-gb-2312)))
4127 @end lisp
4128
4129 @item gnus-group-name-charset-group-alist
4130 @cindex UTF-8 group names
4131 @vindex gnus-group-name-charset-group-alist
4132 An alist of regexp of group name and the charset for group names.  It
4133 is used to show non-@acronym{ASCII} group names.  @code{((".*"
4134 utf-8))} is the default value if UTF-8 is supported, otherwise the
4135 default is @code{nil}.
4136
4137 For example:
4138 @lisp
4139 (setq gnus-group-name-charset-group-alist
4140     '(("\\.com\\.cn:" . cn-gb-2312)))
4141 @end lisp
4142
4143 @end table
4144
4145 @node Scanning New Messages
4146 @subsection Scanning New Messages
4147 @cindex new messages
4148 @cindex scanning new news
4149
4150 @table @kbd
4151
4152 @item g
4153 @kindex g (Group)
4154 @findex gnus-group-get-new-news
4155 @c @icon{gnus-group-get-new-news}
4156 Check the server(s) for new articles.  If the numerical prefix is used,
4157 this command will check only groups of level @var{arg} and lower
4158 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
4159 command will force a total re-reading of the active file(s) from the
4160 back end(s).
4161
4162 @item M-g
4163 @kindex M-g (Group)
4164 @findex gnus-group-get-new-news-this-group
4165 @vindex gnus-goto-next-group-when-activating
4166 @c @icon{gnus-group-get-new-news-this-group}
4167 Check whether new articles have arrived in the current group
4168 (@code{gnus-group-get-new-news-this-group}).
4169 @code{gnus-goto-next-group-when-activating} says whether this command is
4170 to move point to the next group or not.  It is @code{t} by default.
4171
4172 @findex gnus-activate-all-groups
4173 @cindex activating groups
4174 @item C-c M-g
4175 @kindex C-c M-g (Group)
4176 Activate absolutely all groups (@code{gnus-activate-all-groups}).
4177
4178 @item R
4179 @kindex R (Group)
4180 @cindex restarting
4181 @findex gnus-group-restart
4182 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
4183 file(s), closes the connection to all servers, clears up all run-time
4184 Gnus variables, and then starts Gnus all over again.
4185
4186 @end table
4187
4188 @vindex gnus-get-new-news-hook
4189 @code{gnus-get-new-news-hook} is run just before checking for new news.
4190
4191 @vindex gnus-after-getting-new-news-hook
4192 @code{gnus-after-getting-new-news-hook} is run after checking for new
4193 news.
4194
4195
4196 @node Group Information
4197 @subsection Group Information
4198 @cindex group information
4199 @cindex information on groups
4200
4201 @table @kbd
4202
4203
4204 @item H f
4205 @kindex H f (Group)
4206 @findex gnus-group-fetch-faq
4207 @vindex gnus-group-faq-directory
4208 @cindex FAQ
4209 @cindex ange-ftp
4210 Try to fetch the @acronym{FAQ} for the current group
4211 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
4212 from @code{gnus-group-faq-directory}, which is usually a directory on
4213 a remote machine.  This variable can also be a list of directories.
4214 In that case, giving a prefix to this command will allow you to choose
4215 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
4216 used for fetching the file.
4217
4218 If fetching from the first site is unsuccessful, Gnus will attempt to go
4219 through @code{gnus-group-faq-directory} and try to open them one by one.
4220
4221 @item H c
4222 @kindex H c (Group)
4223 @findex gnus-group-fetch-charter
4224 @vindex gnus-group-charter-alist
4225 @cindex charter
4226 Try to open the charter for the current group in a web browser
4227 (@code{gnus-group-fetch-charter}).  Query for a group if given a
4228 prefix argument.
4229
4230 Gnus will use @code{gnus-group-charter-alist} to find the location of
4231 the charter.  If no location is known, Gnus will fetch the control
4232 messages for the group, which in some cases includes the charter.
4233
4234 @item H C
4235 @kindex H C (Group)
4236 @findex gnus-group-fetch-control
4237 @vindex gnus-group-fetch-control-use-browse-url
4238 @cindex control message
4239 Fetch the control messages for the group from the archive at
4240 @code{ftp.isc.org} (@code{gnus-group-fetch-control}).  Query for a
4241 group if given a prefix argument.
4242
4243 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
4244 Gnus will open the control messages in a browser using
4245 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
4246 and displayed in an ephemeral group.
4247
4248 Note that the control messages are compressed.  To use this command
4249 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
4250 Files, ,Compressed Files, emacs, The Emacs Manual}).
4251
4252 @item H d
4253 @itemx C-c C-d
4254 @c @icon{gnus-group-describe-group}
4255 @kindex H d (Group)
4256 @kindex C-c C-d (Group)
4257 @cindex describing groups
4258 @cindex group description
4259 @findex gnus-group-describe-group
4260 Describe the current group (@code{gnus-group-describe-group}).  If given
4261 a prefix, force Gnus to re-read the description from the server.
4262
4263 @item M-d
4264 @kindex M-d (Group)
4265 @findex gnus-group-describe-all-groups
4266 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
4267 prefix, force Gnus to re-read the description file from the server.
4268
4269 @item H v
4270 @itemx V
4271 @kindex V (Group)
4272 @kindex H v (Group)
4273 @cindex version
4274 @findex gnus-version
4275 Display current Gnus version numbers (@code{gnus-version}).
4276
4277 @item ?
4278 @kindex ? (Group)
4279 @findex gnus-group-describe-briefly
4280 Give a very short help message (@code{gnus-group-describe-briefly}).
4281
4282 @item C-c C-i
4283 @kindex C-c C-i (Group)
4284 @cindex info
4285 @cindex manual
4286 @findex gnus-info-find-node
4287 Go to the Gnus info node (@code{gnus-info-find-node}).
4288 @end table
4289
4290
4291 @node Group Timestamp
4292 @subsection Group Timestamp
4293 @cindex timestamps
4294 @cindex group timestamps
4295
4296 It can be convenient to let Gnus keep track of when you last read a
4297 group.  To set the ball rolling, you should add
4298 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
4299
4300 @lisp
4301 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
4302 @end lisp
4303
4304 After doing this, each time you enter a group, it'll be recorded.
4305
4306 This information can be displayed in various ways---the easiest is to
4307 use the @samp{%d} spec in the group line format:
4308
4309 @lisp
4310 (setq gnus-group-line-format
4311       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
4312 @end lisp
4313
4314 This will result in lines looking like:
4315
4316 @example
4317 *        0: mail.ding                                19961002T012943
4318          0: custom                                   19961002T012713
4319 @end example
4320
4321 As you can see, the date is displayed in compact ISO 8601 format.  This
4322 may be a bit too much, so to just display the date, you could say
4323 something like:
4324
4325 @lisp
4326 (setq gnus-group-line-format
4327       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
4328 @end lisp
4329
4330 If you would like greater control of the time format, you can use a
4331 user-defined format spec.  Something like the following should do the
4332 trick:
4333
4334 @lisp
4335 (setq gnus-group-line-format
4336       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
4337 (defun gnus-user-format-function-d (headers)
4338   (let ((time (gnus-group-timestamp gnus-tmp-group)))
4339     (if time
4340         (format-time-string "%b %d  %H:%M" time)
4341       "")))
4342 @end lisp
4343
4344
4345 @node File Commands
4346 @subsection File Commands
4347 @cindex file commands
4348
4349 @table @kbd
4350
4351 @item r
4352 @kindex r (Group)
4353 @findex gnus-group-read-init-file
4354 @vindex gnus-init-file
4355 @cindex reading init file
4356 Re-read the init file (@code{gnus-init-file}, which defaults to
4357 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
4358
4359 @item s
4360 @kindex s (Group)
4361 @findex gnus-group-save-newsrc
4362 @cindex saving .newsrc
4363 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
4364 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
4365 file(s) whether Gnus thinks it is necessary or not.
4366
4367 @c @item Z
4368 @c @kindex Z (Group)
4369 @c @findex gnus-group-clear-dribble
4370 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
4371
4372 @end table
4373
4374
4375 @node Sieve Commands
4376 @subsection Sieve Commands
4377 @cindex group sieve commands
4378
4379 Sieve is a server-side mail filtering language.  In Gnus you can use
4380 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
4381 sieve rules that should apply to each group.  Gnus provides two
4382 commands to translate all these group parameters into a proper Sieve
4383 script that can be transfered to the server somehow.
4384
4385 @vindex gnus-sieve-file
4386 @vindex gnus-sieve-region-start
4387 @vindex gnus-sieve-region-end
4388 The generated Sieve script is placed in @code{gnus-sieve-file} (by
4389 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
4390 between two delimiters, @code{gnus-sieve-region-start} and
4391 @code{gnus-sieve-region-end}, so you may write additional Sieve code
4392 outside these delimiters that will not be removed the next time you
4393 regenerate the Sieve script.
4394
4395 @vindex gnus-sieve-crosspost
4396 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
4397 is generated.  If it is non-@code{nil} (the default) articles is
4398 placed in all groups that have matching rules, otherwise the article
4399 is only placed in the group with the first matching rule.  For
4400 example, the group parameter @samp{(sieve address "sender"
4401 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
4402 code if @code{gnus-sieve-crosspost} is @code{nil}.  (When
4403 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
4404 except that the line containing the call to @code{stop} is removed.)
4405
4406 @example
4407 if address "sender" "owner-ding@@hpc.uh.edu" @{
4408         fileinto "INBOX.ding";
4409         stop;
4410 @}
4411 @end example
4412
4413 @xref{Top, Emacs Sieve, Top, sieve, Emacs Sieve}.
4414
4415 @table @kbd
4416
4417 @item D g
4418 @kindex D g (Group)
4419 @findex gnus-sieve-generate
4420 @vindex gnus-sieve-file
4421 @cindex generating sieve script
4422 Regenerate a Sieve script from the @code{sieve} group parameters and
4423 put you into the @code{gnus-sieve-file} without saving it.
4424
4425 @item D u
4426 @kindex D u (Group)
4427 @findex gnus-sieve-update
4428 @vindex gnus-sieve-file
4429 @cindex updating sieve script
4430 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
4431 @code{sieve} group parameters, save the file and upload it to the
4432 server using the @code{sieveshell} program.
4433
4434 @end table
4435
4436
4437 @node Summary Buffer
4438 @chapter Summary Buffer
4439 @cindex summary buffer
4440
4441 A line for each article is displayed in the summary buffer.  You can
4442 move around, read articles, post articles and reply to articles.
4443
4444 The most common way to a summary buffer is to select a group from the
4445 group buffer (@pxref{Selecting a Group}).
4446
4447 You can have as many summary buffers open as you wish.
4448
4449 @menu
4450 * Summary Buffer Format::       Deciding how the summary buffer is to look.
4451 * Summary Maneuvering::         Moving around the summary buffer.
4452 * Choosing Articles::           Reading articles.
4453 * Paging the Article::          Scrolling the current article.
4454 * Reply Followup and Post::     Posting articles.
4455 * Delayed Articles::            Send articles at a later time.
4456 * Marking Articles::            Marking articles as read, expirable, etc.
4457 * Limiting::                    You can limit the summary buffer.
4458 * Threading::                   How threads are made.
4459 * Sorting the Summary Buffer::  How articles and threads are sorted.
4460 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
4461 * Article Caching::             You may store articles in a cache.
4462 * Persistent Articles::         Making articles expiry-resistant.
4463 * Article Backlog::             Having already read articles hang around.
4464 * Saving Articles::             Ways of customizing article saving.
4465 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
4466 * Article Treatment::           The article buffer can be mangled at will.
4467 * MIME Commands::               Doing MIMEy things with the articles.
4468 * Charsets::                    Character set issues.
4469 * Article Commands::            Doing various things with the article buffer.
4470 * Summary Sorting::             Sorting the summary buffer in various ways.
4471 * Finding the Parent::          No child support? Get the parent.
4472 * Alternative Approaches::      Reading using non-default summaries.
4473 * Tree Display::                A more visual display of threads.
4474 * Mail Group Commands::         Some commands can only be used in mail groups.
4475 * Various Summary Stuff::       What didn't fit anywhere else.
4476 * Exiting the Summary Buffer::  Returning to the Group buffer,
4477                                 or reselecting the current group.
4478 * Crosspost Handling::          How crossposted articles are dealt with.
4479 * Duplicate Suppression::       An alternative when crosspost handling fails.
4480 * Security::                    Decrypt and Verify.
4481 * Mailing List::                Mailing list minor mode.
4482 @end menu
4483
4484
4485 @node Summary Buffer Format
4486 @section Summary Buffer Format
4487 @cindex summary buffer format
4488
4489 @iftex
4490 @iflatex
4491 \gnusfigure{The Summary Buffer}{180}{
4492 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
4493 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
4494 }
4495 @end iflatex
4496 @end iftex
4497
4498 @menu
4499 * Summary Buffer Lines::        You can specify how summary lines should look.
4500 * To From Newsgroups::          How to not display your own name.
4501 * Summary Buffer Mode Line::    You can say how the mode line should look.
4502 * Summary Highlighting::        Making the summary buffer all pretty and nice.
4503 @end menu
4504
4505 @findex mail-extract-address-components
4506 @findex gnus-extract-address-components
4507 @vindex gnus-extract-address-components
4508 Gnus will use the value of the @code{gnus-extract-address-components}
4509 variable as a function for getting the name and address parts of a
4510 @code{From} header.  Two pre-defined functions exist:
4511 @code{gnus-extract-address-components}, which is the default, quite
4512 fast, and too simplistic solution; and
4513 @code{mail-extract-address-components}, which works very nicely, but is
4514 slower.  The default function will return the wrong answer in 5% of the
4515 cases.  If this is unacceptable to you, use the other function instead:
4516
4517 @lisp
4518 (setq gnus-extract-address-components
4519       'mail-extract-address-components)
4520 @end lisp
4521
4522 @vindex gnus-summary-same-subject
4523 @code{gnus-summary-same-subject} is a string indicating that the current
4524 article has the same subject as the previous.  This string will be used
4525 with those specs that require it.  The default is @code{""}.
4526
4527
4528 @node Summary Buffer Lines
4529 @subsection Summary Buffer Lines
4530
4531 @vindex gnus-summary-line-format
4532 You can change the format of the lines in the summary buffer by changing
4533 the @code{gnus-summary-line-format} variable.  It works along the same
4534 lines as a normal @code{format} string, with some extensions
4535 (@pxref{Formatting Variables}).
4536
4537 There should always be a colon or a point position marker on the line;
4538 the cursor always moves to the point position marker or the colon after
4539 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
4540 possible to change this.  Just write a new function
4541 @code{gnus-goto-colon} which does whatever you like with the cursor.)
4542 @xref{Positioning Point}.
4543
4544 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
4545
4546 The following format specification characters and extended format
4547 specification(s) are understood:
4548
4549 @table @samp
4550 @item N
4551 Article number.
4552 @item S
4553 Subject string.  List identifiers stripped,
4554 @code{gnus-list-identifies}.  @xref{Article Hiding}.
4555 @item s
4556 Subject if the article is the root of the thread or the previous article
4557 had a different subject, @code{gnus-summary-same-subject} otherwise.
4558 (@code{gnus-summary-same-subject} defaults to @code{""}.)
4559 @item F
4560 Full @code{From} header.
4561 @item n
4562 The name (from the @code{From} header).
4563 @item f
4564 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
4565 From Newsgroups}).
4566 @item a
4567 The name (from the @code{From} header).  This differs from the @code{n}
4568 spec in that it uses the function designated by the
4569 @code{gnus-extract-address-components} variable, which is slower, but
4570 may be more thorough.
4571 @item A
4572 The address (from the @code{From} header).  This works the same way as
4573 the @code{a} spec.
4574 @item L
4575 Number of lines in the article.
4576 @item c
4577 Number of characters in the article.  This specifier is not supported
4578 in some methods (like nnfolder).
4579 @item k
4580 Pretty-printed version of the number of characters in the article;
4581 for example, @samp{1.2k} or @samp{0.4M}.
4582 @item I
4583 Indentation based on thread level (@pxref{Customizing Threading}).
4584 @item B
4585 A complex trn-style thread tree, showing response-connecting trace
4586 lines.  A thread could be drawn like this:
4587
4588 @example
4589 >
4590 +->
4591 | +->
4592 | | \->
4593 | |   \->
4594 | \->
4595 +->
4596 \->
4597 @end example
4598
4599 You can customize the appearance with the following options.  Note
4600 that it is possible to make the thread display look really neat by
4601 replacing the default @acronym{ASCII} characters with graphic
4602 line-drawing glyphs.
4603 @table @code
4604 @item gnus-sum-thread-tree-root
4605 @vindex gnus-sum-thread-tree-root
4606 Used for the root of a thread.  If @code{nil}, use subject
4607 instead.  The default is @samp{> }.
4608
4609 @item gnus-sum-thread-tree-false-root
4610 @vindex gnus-sum-thread-tree-false-root
4611 Used for the false root of a thread (@pxref{Loose Threads}).  If
4612 @code{nil}, use subject instead.  The default is @samp{> }.
4613
4614 @item gnus-sum-thread-tree-single-indent
4615 @vindex gnus-sum-thread-tree-single-indent
4616 Used for a thread with just one message.  If @code{nil}, use subject
4617 instead.  The default is @samp{}.
4618
4619 @item gnus-sum-thread-tree-vertical
4620 @vindex gnus-sum-thread-tree-vertical
4621 Used for drawing a vertical line.  The default is @samp{| }.
4622
4623 @item gnus-sum-thread-tree-indent
4624 @vindex gnus-sum-thread-tree-indent
4625 Used for indenting.  The default is @samp{  }.
4626
4627 @item gnus-sum-thread-tree-leaf-with-other
4628 @vindex gnus-sum-thread-tree-leaf-with-other
4629 Used for a leaf with brothers.  The default is @samp{+-> }.
4630
4631 @item gnus-sum-thread-tree-single-leaf
4632 @vindex gnus-sum-thread-tree-single-leaf
4633 Used for a leaf without brothers.  The default is @samp{\-> }
4634
4635 @end table
4636
4637 @item T
4638 Nothing if the article is a root and lots of spaces if it isn't (it
4639 pushes everything after it off the screen).
4640 @item [
4641 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
4642 for adopted articles (@pxref{Customizing Threading}).
4643 @item ]
4644 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
4645 for adopted articles.
4646 @item >
4647 One space for each thread level.
4648 @item <
4649 Twenty minus thread level spaces.
4650 @item U
4651 Unread.  @xref{Read Articles}.
4652
4653 @item R
4654 This misleadingly named specifier is the @dfn{secondary mark}.  This
4655 mark will say whether the article has been replied to, has been cached,
4656 or has been saved.  @xref{Other Marks}.
4657
4658 @item i
4659 Score as a number (@pxref{Scoring}).
4660 @item z
4661 @vindex gnus-summary-zcore-fuzz
4662 Zcore, @samp{+} if above the default level and @samp{-} if below the
4663 default level.  If the difference between
4664 @code{gnus-summary-default-score} and the score is less than
4665 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
4666 @item V
4667 Total thread score.
4668 @item x
4669 @code{Xref}.
4670 @item D
4671 @code{Date}.
4672 @item d
4673 The @code{Date} in @code{DD-MMM} format.
4674 @item o
4675 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
4676 @item M
4677 @code{Message-ID}.
4678 @item r
4679 @code{References}.
4680 @item t
4681 Number of articles in the current sub-thread.  Using this spec will slow
4682 down summary buffer generation somewhat.
4683 @item e
4684 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
4685 article has any children.
4686 @item P
4687 The line number.
4688 @item O
4689 Download mark.
4690 @item &user-date;
4691 Age sensitive date format.  Various date format is defined in
4692 @code{gnus-user-date-format-alist}.
4693 @item u
4694 User defined specifier.  The next character in the format string should
4695 be a letter.  Gnus will call the function
4696 @code{gnus-user-format-function-@var{x}}, where @var{x} is the letter
4697 following @samp{%u}.  The function will be passed the current header as
4698 argument.  The function should return a string, which will be inserted
4699 into the summary just like information from any other summary specifier.
4700 @end table
4701
4702 Text between @samp{%(} and @samp{%)} will be highlighted with
4703 @code{gnus-mouse-face} when the mouse point is placed inside the area.
4704 There can only be one such area.
4705
4706 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
4707 have to be handled with care.  For reasons of efficiency, Gnus will
4708 compute what column these characters will end up in, and ``hard-code''
4709 that.  This means that it is invalid to have these specs after a
4710 variable-length spec.  Well, you might not be arrested, but your summary
4711 buffer will look strange, which is bad enough.
4712
4713 The smart choice is to have these specs as far to the left as possible.
4714 (Isn't that the case with everything, though?  But I digress.)
4715
4716 This restriction may disappear in later versions of Gnus.
4717
4718
4719 @node To From Newsgroups
4720 @subsection To From Newsgroups
4721 @cindex To
4722 @cindex Newsgroups
4723
4724 In some groups (particularly in archive groups), the @code{From} header
4725 isn't very interesting, since all the articles there are written by
4726 you.  To display the information in the @code{To} or @code{Newsgroups}
4727 headers instead, you need to decide three things: What information to
4728 gather; where to display it; and when to display it.
4729
4730 @enumerate
4731 @item
4732 @vindex gnus-extra-headers
4733 The reading of extra header information is controlled by the
4734 @code{gnus-extra-headers}.  This is a list of header symbols.  For
4735 instance:
4736
4737 @lisp
4738 (setq gnus-extra-headers
4739       '(To Newsgroups X-Newsreader))
4740 @end lisp
4741
4742 This will result in Gnus trying to obtain these three headers, and
4743 storing it in header structures for later easy retrieval.
4744
4745 @item
4746 @findex gnus-extra-header
4747 The value of these extra headers can be accessed via the
4748 @code{gnus-extra-header} function.  Here's a format line spec that will
4749 access the @code{X-Newsreader} header:
4750
4751 @example
4752 "%~(form (gnus-extra-header 'X-Newsreader))@@"
4753 @end example
4754
4755 @item
4756 @vindex gnus-ignored-from-addresses
4757 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
4758 summary line spec returns the @code{To}, @code{Newsreader} or
4759 @code{From} header.  If this regexp matches the contents of the
4760 @code{From} header, the value of the @code{To} or @code{Newsreader}
4761 headers are used instead.
4762
4763 @end enumerate
4764
4765 @vindex nnmail-extra-headers
4766 A related variable is @code{nnmail-extra-headers}, which controls when
4767 to include extra headers when generating overview (@acronym{NOV}) files.
4768 If you have old overview files, you should regenerate them after
4769 changing this variable, by entering the server buffer using @kbd{^},
4770 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
4771 regeneration.
4772
4773 @vindex gnus-summary-line-format
4774 You also have to instruct Gnus to display the data by changing the
4775 @code{%n} spec to the @code{%f} spec in the
4776 @code{gnus-summary-line-format} variable.
4777
4778 In summary, you'd typically put something like the following in
4779 @file{~/.gnus.el}:
4780
4781 @lisp
4782 (setq gnus-extra-headers
4783       '(To Newsgroups))
4784 (setq nnmail-extra-headers gnus-extra-headers)
4785 (setq gnus-summary-line-format
4786       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
4787 (setq gnus-ignored-from-addresses
4788       "Your Name Here")
4789 @end lisp
4790
4791 (The values listed above are the default values in Gnus.  Alter them
4792 to fit your needs.)
4793
4794 A note for news server administrators, or for users who wish to try to
4795 convince their news server administrator to provide some additional
4796 support:
4797
4798 The above is mostly useful for mail groups, where you have control over
4799 the @acronym{NOV} files that are created.  However, if you can persuade your
4800 nntp admin to add (in the usual implementation, notably INN):
4801
4802 @example
4803 Newsgroups:full
4804 @end example
4805
4806 to the end of her @file{overview.fmt} file, then you can use that just
4807 as you would the extra headers from the mail groups.
4808
4809
4810 @node Summary Buffer Mode Line
4811 @subsection Summary Buffer Mode Line
4812
4813 @vindex gnus-summary-mode-line-format
4814 You can also change the format of the summary mode bar (@pxref{Mode Line
4815 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
4816 like.  The default is @samp{Gnus: %%b [%A] %Z}.
4817
4818 Here are the elements you can play with:
4819
4820 @table @samp
4821 @item G
4822 Group name.
4823 @item p
4824 Unprefixed group name.
4825 @item A
4826 Current article number.
4827 @item z
4828 Current article score.
4829 @item V
4830 Gnus version.
4831 @item U
4832 Number of unread articles in this group.
4833 @item e
4834 Number of unread articles in this group that aren't displayed in the
4835 summary buffer.
4836 @item Z
4837 A string with the number of unread and unselected articles represented
4838 either as @samp{<%U(+%e) more>} if there are both unread and unselected
4839 articles, and just as @samp{<%U more>} if there are just unread articles
4840 and no unselected ones.
4841 @item g
4842 Shortish group name.  For instance, @samp{rec.arts.anime} will be
4843 shortened to @samp{r.a.anime}.
4844 @item S
4845 Subject of the current article.
4846 @item u
4847 User-defined spec (@pxref{User-Defined Specs}).
4848 @item s
4849 Name of the current score file (@pxref{Scoring}).
4850 @item d
4851 Number of dormant articles (@pxref{Unread Articles}).
4852 @item t
4853 Number of ticked articles (@pxref{Unread Articles}).
4854 @item r
4855 Number of articles that have been marked as read in this session.
4856 @item E
4857 Number of articles expunged by the score files.
4858 @end table
4859
4860
4861 @node Summary Highlighting
4862 @subsection Summary Highlighting
4863
4864 @table @code
4865
4866 @item gnus-visual-mark-article-hook
4867 @vindex gnus-visual-mark-article-hook
4868 This hook is run after selecting an article.  It is meant to be used for
4869 highlighting the article in some way.  It is not run if
4870 @code{gnus-visual} is @code{nil}.
4871
4872 @item gnus-summary-update-hook
4873 @vindex gnus-summary-update-hook
4874 This hook is called when a summary line is changed.  It is not run if
4875 @code{gnus-visual} is @code{nil}.
4876
4877 @item gnus-summary-selected-face
4878 @vindex gnus-summary-selected-face
4879 This is the face (or @dfn{font} as some people call it) used to
4880 highlight the current article in the summary buffer.
4881
4882 @item gnus-summary-highlight
4883 @vindex gnus-summary-highlight
4884 Summary lines are highlighted according to this variable, which is a
4885 list where the elements are of the format @code{(@var{form}
4886 . @var{face})}.  If you would, for instance, like ticked articles to be
4887 italic and high-scored articles to be bold, you could set this variable
4888 to something like
4889 @lisp
4890 (((eq mark gnus-ticked-mark) . italic)
4891  ((> score default) . bold))
4892 @end lisp
4893 As you may have guessed, if @var{form} returns a non-@code{nil} value,
4894 @var{face} will be applied to the line.
4895 @end table
4896
4897
4898 @node Summary Maneuvering
4899 @section Summary Maneuvering
4900 @cindex summary movement
4901
4902 All the straight movement commands understand the numeric prefix and
4903 behave pretty much as you'd expect.
4904
4905 None of these commands select articles.
4906
4907 @table @kbd
4908 @item G M-n
4909 @itemx M-n
4910 @kindex M-n (Summary)
4911 @kindex G M-n (Summary)
4912 @findex gnus-summary-next-unread-subject
4913 Go to the next summary line of an unread article
4914 (@code{gnus-summary-next-unread-subject}).
4915
4916 @item G M-p
4917 @itemx M-p
4918 @kindex M-p (Summary)
4919 @kindex G M-p (Summary)
4920 @findex gnus-summary-prev-unread-subject
4921 Go to the previous summary line of an unread article
4922 (@code{gnus-summary-prev-unread-subject}).
4923
4924 @item G g
4925 @kindex G g (Summary)
4926 @findex gnus-summary-goto-subject
4927 Ask for an article number and then go to the summary line of that article
4928 without displaying the article (@code{gnus-summary-goto-subject}).
4929 @end table
4930
4931 If Gnus asks you to press a key to confirm going to the next group, you
4932 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
4933 buffer, searching for the next group to read without actually returning
4934 to the group buffer.
4935
4936 Variables related to summary movement:
4937
4938 @table @code
4939
4940 @vindex gnus-auto-select-next
4941 @item gnus-auto-select-next
4942 If you issue one of the movement commands (like @kbd{n}) and there are
4943 no more unread articles after the current one, Gnus will offer to go to
4944 the next group.  If this variable is @code{t} and the next group is
4945 empty, Gnus will exit summary mode and return to the group buffer.  If
4946 this variable is neither @code{t} nor @code{nil}, Gnus will select the
4947 next group with unread articles.  As a special case, if this variable
4948 is @code{quietly}, Gnus will select the next group without asking for
4949 confirmation.  If this variable is @code{almost-quietly}, the same
4950 will happen only if you are located on the last article in the group.
4951 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
4952 command will go to the next group without confirmation.  Also
4953 @pxref{Group Levels}.
4954
4955 @item gnus-auto-select-same
4956 @vindex gnus-auto-select-same
4957 If non-@code{nil}, all the movement commands will try to go to the next
4958 article with the same subject as the current.  (@dfn{Same} here might
4959 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
4960 for details (@pxref{Customizing Threading}).)  If there are no more
4961 articles with the same subject, go to the first unread article.
4962
4963 This variable is not particularly useful if you use a threaded display.
4964
4965 @item gnus-summary-check-current
4966 @vindex gnus-summary-check-current
4967 If non-@code{nil}, all the ``unread'' movement commands will not proceed
4968 to the next (or previous) article if the current article is unread.
4969 Instead, they will choose the current article.
4970
4971 @item gnus-auto-center-summary
4972 @vindex gnus-auto-center-summary
4973 If non-@code{nil}, Gnus will keep the point in the summary buffer
4974 centered at all times.  This makes things quite tidy, but if you have a
4975 slow network connection, or simply do not like this un-Emacsism, you can
4976 set this variable to @code{nil} to get the normal Emacs scrolling
4977 action.  This will also inhibit horizontal re-centering of the summary
4978 buffer, which might make it more inconvenient to read extremely long
4979 threads.
4980
4981 This variable can also be a number.  In that case, center the window at
4982 the given number of lines from the top.
4983
4984 @end table
4985
4986
4987 @node Choosing Articles
4988 @section Choosing Articles
4989 @cindex selecting articles
4990
4991 @menu
4992 * Choosing Commands::           Commands for choosing articles.
4993 * Choosing Variables::          Variables that influence these commands.
4994 @end menu
4995
4996
4997 @node Choosing Commands
4998 @subsection Choosing Commands
4999
5000 None of the following movement commands understand the numeric prefix,
5001 and they all select and display an article.
5002
5003 If you want to fetch new articles or redisplay the group, see
5004 @ref{Exiting the Summary Buffer}.
5005
5006 @table @kbd
5007 @item SPACE
5008 @kindex SPACE (Summary)
5009 @findex gnus-summary-next-page
5010 Select the current article, or, if that one's read already, the next
5011 unread article (@code{gnus-summary-next-page}).
5012
5013 If you have an article window open already and you press @kbd{SPACE}
5014 again, the article will be scrolled.  This lets you conveniently
5015 @kbd{SPACE} through an entire newsgroup.  @xref{Paging the Article}.
5016
5017 @item G n
5018 @itemx n
5019 @kindex n (Summary)
5020 @kindex G n (Summary)
5021 @findex gnus-summary-next-unread-article
5022 @c @icon{gnus-summary-next-unread}
5023 Go to next unread article (@code{gnus-summary-next-unread-article}).
5024
5025 @item G p
5026 @itemx p
5027 @kindex p (Summary)
5028 @findex gnus-summary-prev-unread-article
5029 @c @icon{gnus-summary-prev-unread}
5030 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
5031
5032 @item G N
5033 @itemx N
5034 @kindex N (Summary)
5035 @kindex G N (Summary)
5036 @findex gnus-summary-next-article
5037 Go to the next article (@code{gnus-summary-next-article}).
5038
5039 @item G P
5040 @itemx P
5041 @kindex P (Summary)
5042 @kindex G P (Summary)
5043 @findex gnus-summary-prev-article
5044 Go to the previous article (@code{gnus-summary-prev-article}).
5045
5046 @item G C-n
5047 @kindex G C-n (Summary)
5048 @findex gnus-summary-next-same-subject
5049 Go to the next article with the same subject
5050 (@code{gnus-summary-next-same-subject}).
5051
5052 @item G C-p
5053 @kindex G C-p (Summary)
5054 @findex gnus-summary-prev-same-subject
5055 Go to the previous article with the same subject
5056 (@code{gnus-summary-prev-same-subject}).
5057
5058 @item G f
5059 @itemx .
5060 @kindex G f  (Summary)
5061 @kindex .  (Summary)
5062 @findex gnus-summary-first-unread-article
5063 Go to the first unread article
5064 (@code{gnus-summary-first-unread-article}).
5065
5066 @item G b
5067 @itemx ,
5068 @kindex G b (Summary)
5069 @kindex , (Summary)
5070 @findex gnus-summary-best-unread-article
5071 Go to the unread article with the highest score
5072 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
5073 go to the first unread article that has a score over the default score.
5074
5075 @item G l
5076 @itemx l
5077 @kindex l (Summary)
5078 @kindex G l (Summary)
5079 @findex gnus-summary-goto-last-article
5080 Go to the previous article read (@code{gnus-summary-goto-last-article}).
5081
5082 @item G o
5083 @kindex G o (Summary)
5084 @findex gnus-summary-pop-article
5085 @cindex history
5086 @cindex article history
5087 Pop an article off the summary history and go to this article
5088 (@code{gnus-summary-pop-article}).  This command differs from the
5089 command above in that you can pop as many previous articles off the
5090 history as you like, while @kbd{l} toggles the two last read articles.
5091 For a somewhat related issue (if you use these commands a lot),
5092 @pxref{Article Backlog}.
5093
5094 @item G j
5095 @itemx j
5096 @kindex j (Summary)
5097 @kindex G j (Summary)
5098 @findex gnus-summary-goto-article
5099 Ask for an article number or @code{Message-ID}, and then go to that
5100 article (@code{gnus-summary-goto-article}).
5101
5102 @end table
5103
5104
5105 @node Choosing Variables
5106 @subsection Choosing Variables
5107
5108 Some variables relevant for moving and selecting articles:
5109
5110 @table @code
5111 @item gnus-auto-extend-newsgroup
5112 @vindex gnus-auto-extend-newsgroup
5113 All the movement commands will try to go to the previous (or next)
5114 article, even if that article isn't displayed in the Summary buffer if
5115 this variable is non-@code{nil}.  Gnus will then fetch the article from
5116 the server and display it in the article buffer.
5117
5118 @item gnus-select-article-hook
5119 @vindex gnus-select-article-hook
5120 This hook is called whenever an article is selected.  By default it
5121 exposes any threads hidden under the selected article.  If you would
5122 like each article to be saved in the Agent as you read it, putting
5123 @code{gnus-agent-fetch-selected-article} on this hook will do so.
5124
5125 @item gnus-mark-article-hook
5126 @vindex gnus-mark-article-hook
5127 @findex gnus-summary-mark-unread-as-read
5128 @findex gnus-summary-mark-read-and-unread-as-read
5129 @findex gnus-unread-mark
5130 This hook is called whenever an article is selected.  It is intended to
5131 be used for marking articles as read.  The default value is
5132 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
5133 mark of almost any article you read to @code{gnus-unread-mark}.  The
5134 only articles not affected by this function are ticked, dormant, and
5135 expirable articles.  If you'd instead like to just have unread articles
5136 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
5137 instead.  It will leave marks like @code{gnus-low-score-mark},
5138 @code{gnus-del-mark} (and so on) alone.
5139
5140 @end table
5141
5142
5143 @node Paging the Article
5144 @section Scrolling the Article
5145 @cindex article scrolling
5146
5147 @table @kbd
5148
5149 @item SPACE
5150 @kindex SPACE (Summary)
5151 @findex gnus-summary-next-page
5152 Pressing @kbd{SPACE} will scroll the current article forward one page,
5153 or, if you have come to the end of the current article, will choose the
5154 next article (@code{gnus-summary-next-page}).
5155
5156 @vindex gnus-article-boring-faces
5157 @vindex gnus-article-skip-boring
5158 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
5159 the article consists only of citations and signature, then it will be
5160 skipped; the next article will be shown instead.  You can customize
5161 what is considered uninteresting with
5162 @code{gnus-article-boring-faces}.  You can manually view the article's
5163 pages, no matter how boring, using @kbd{C-M-v}.
5164
5165 @item DEL
5166 @kindex DEL (Summary)
5167 @findex gnus-summary-prev-page
5168 Scroll the current article back one page (@code{gnus-summary-prev-page}).
5169
5170 @item RET
5171 @kindex RET (Summary)
5172 @findex gnus-summary-scroll-up
5173 Scroll the current article one line forward
5174 (@code{gnus-summary-scroll-up}).
5175
5176 @item M-RET
5177 @kindex M-RET (Summary)
5178 @findex gnus-summary-scroll-down
5179 Scroll the current article one line backward
5180 (@code{gnus-summary-scroll-down}).
5181
5182 @item A g
5183 @itemx g
5184 @kindex A g (Summary)
5185 @kindex g (Summary)
5186 @findex gnus-summary-show-article
5187 @vindex gnus-summary-show-article-charset-alist
5188 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
5189 given a prefix, fetch the current article, but don't run any of the
5190 article treatment functions.  This will give you a ``raw'' article, just
5191 the way it came from the server.
5192
5193 If given a numerical prefix, you can do semi-manual charset stuff.
5194 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
5195 encoded in the @code{cn-gb-2312} charset.  If you have
5196
5197 @lisp
5198 (setq gnus-summary-show-article-charset-alist
5199       '((1 . cn-gb-2312)
5200         (2 . big5)))
5201 @end lisp
5202
5203 then you can say @kbd{C-u 1 g} to get the same effect.
5204
5205 @item A <
5206 @itemx <
5207 @kindex < (Summary)
5208 @kindex A < (Summary)
5209 @findex gnus-summary-beginning-of-article
5210 Scroll to the beginning of the article
5211 (@code{gnus-summary-beginning-of-article}).
5212
5213 @item A >
5214 @itemx >
5215 @kindex > (Summary)
5216 @kindex A > (Summary)
5217 @findex gnus-summary-end-of-article
5218 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
5219
5220 @item A s
5221 @itemx s
5222 @kindex A s (Summary)
5223 @kindex s (Summary)
5224 @findex gnus-summary-isearch-article
5225 Perform an isearch in the article buffer
5226 (@code{gnus-summary-isearch-article}).
5227
5228 @item h
5229 @kindex h (Summary)
5230 @findex gnus-summary-select-article-buffer
5231 Select the article buffer (@code{gnus-summary-select-article-buffer}).
5232
5233 @end table
5234
5235
5236 @node Reply Followup and Post
5237 @section Reply, Followup and Post
5238
5239 @menu
5240 * Summary Mail Commands::       Sending mail.
5241 * Summary Post Commands::       Sending news.
5242 * Summary Message Commands::    Other Message-related commands.
5243 * Canceling and Superseding::
5244 @end menu
5245
5246
5247 @node Summary Mail Commands
5248 @subsection Summary Mail Commands
5249 @cindex mail
5250 @cindex composing mail
5251
5252 Commands for composing a mail message:
5253
5254 @table @kbd
5255
5256 @item S r
5257 @itemx r
5258 @kindex S r (Summary)
5259 @kindex r (Summary)
5260 @findex gnus-summary-reply
5261 @c @icon{gnus-summary-mail-reply}
5262 @c @icon{gnus-summary-reply}
5263 Mail a reply to the author of the current article
5264 (@code{gnus-summary-reply}).
5265
5266 @item S R
5267 @itemx R
5268 @kindex R (Summary)
5269 @kindex S R (Summary)
5270 @findex gnus-summary-reply-with-original
5271 @c @icon{gnus-summary-reply-with-original}
5272 Mail a reply to the author of the current article and include the
5273 original message (@code{gnus-summary-reply-with-original}).  This
5274 command uses the process/prefix convention.
5275
5276 @item S w
5277 @kindex S w (Summary)
5278 @findex gnus-summary-wide-reply
5279 Mail a wide reply to the author of the current article
5280 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
5281 goes out to all people listed in the @code{To}, @code{From} (or
5282 @code{Reply-to}) and @code{Cc} headers.  If @code{Mail-Followup-To} is
5283 present, that's used instead.
5284
5285 @item S W
5286 @kindex S W (Summary)
5287 @findex gnus-summary-wide-reply-with-original
5288 Mail a wide reply to the current article and include the original
5289 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
5290 the process/prefix convention.
5291
5292 @item S v
5293 @kindex S v (Summary)
5294 @findex gnus-summary-very-wide-reply
5295 Mail a very wide reply to the author of the current article
5296 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
5297 that goes out to all people listed in the @code{To}, @code{From} (or
5298 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
5299 articles.  This command uses the process/prefix convention.
5300
5301 @item S V
5302 @kindex S V (Summary)
5303 @findex gnus-summary-very-wide-reply-with-original
5304 Mail a very wide reply to the author of the current article and include the
5305 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
5306 command uses the process/prefix convention.
5307
5308 @item S B r
5309 @kindex S B r (Summary)
5310 @findex gnus-summary-reply-broken-reply-to
5311 Mail a reply to the author of the current article but ignore the
5312 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
5313 If you need this because a mailing list incorrectly sets a
5314 @code{Reply-To} header pointing to the list, you probably want to set
5315 the @code{broken-reply-to} group parameter instead, so things will work
5316 correctly.  @xref{Group Parameters}.
5317
5318 @item S B R
5319 @kindex S B R (Summary)
5320 @findex gnus-summary-reply-broken-reply-to-with-original
5321 Mail a reply to the author of the current article and include the
5322 original message but ignore the @code{Reply-To} field
5323 (@code{gnus-summary-reply-broken-reply-to-with-original}).
5324
5325 @item S o m
5326 @itemx C-c C-f
5327 @kindex S o m (Summary)
5328 @kindex C-c C-f (Summary)
5329 @findex gnus-summary-mail-forward
5330 @c @icon{gnus-summary-mail-forward}
5331 Forward the current article to some other person
5332 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
5333 is forwarded according to the value of (@code{message-forward-as-mime})
5334 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
5335 message and forward directly inline; if the prefix is 2, forward message
5336 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5337 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5338 directly inline; otherwise, the message is forwarded as no prefix given
5339 but use the flipped value of (@code{message-forward-as-mime}).  By
5340 default, the message is decoded and forwarded as an rfc822 @acronym{MIME}
5341 section.
5342
5343 @item S m
5344 @itemx m
5345 @kindex m (Summary)
5346 @kindex S m (Summary)
5347 @findex gnus-summary-mail-other-window
5348 @c @icon{gnus-summary-mail-originate}
5349 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
5350 the posting style of the current group.  If given a prefix, disable that.
5351 If the prefix is 1, prompt for a group name to find the posting style.
5352
5353 @item S i
5354 @itemx i
5355 @kindex i (Summary)
5356 @kindex S i (Summary)
5357 @findex gnus-summary-news-other-window
5358 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
5359 post to the current group.  If given a prefix, disable that.  If the
5360 prefix is 1, prompt for a group to post to.
5361
5362 This function actually prepares a news even when using mail groups.
5363 This is useful for ``posting'' messages to mail groups without actually
5364 sending them over the network: they're just saved directly to the group
5365 in question.  The corresponding back end must have a request-post method
5366 for this to work though.
5367
5368 @item S D b
5369 @kindex S D b (Summary)
5370 @findex gnus-summary-resend-bounced-mail
5371 @cindex bouncing mail
5372 If you have sent a mail, but the mail was bounced back to you for some
5373 reason (wrong address, transient failure), you can use this command to
5374 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
5375 will be popped into a mail buffer where you can edit the headers before
5376 sending the mail off again.  If you give a prefix to this command, and
5377 the bounced mail is a reply to some other mail, Gnus will try to fetch
5378 that mail and display it for easy perusal of its headers.  This might
5379 very well fail, though.
5380
5381 @item S D r
5382 @kindex S D r (Summary)
5383 @findex gnus-summary-resend-message
5384 Not to be confused with the previous command,
5385 @code{gnus-summary-resend-message} will prompt you for an address to
5386 send the current message off to, and then send it to that place.  The
5387 headers of the message won't be altered---but lots of headers that say
5388 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
5389 means that you actually send a mail to someone that has a @code{To}
5390 header that (probably) points to yourself.  This will confuse people.
5391 So, natcherly you'll only do that if you're really eVIl.
5392
5393 This command is mainly used if you have several accounts and want to
5394 ship a mail to a different account of yours.  (If you're both
5395 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
5396 to the @code{root} account, you may want to resend it to
5397 @code{postmaster}.  Ordnung muss sein!
5398
5399 This command understands the process/prefix convention
5400 (@pxref{Process/Prefix}).
5401
5402 @item S D e
5403 @kindex S D e (Summary)
5404 @findex gnus-summary-resend-message-edit
5405
5406 Like the previous command, but will allow you to edit the message as
5407 if it were a new message before resending.
5408
5409 @item S O m
5410 @kindex S O m (Summary)
5411 @findex gnus-uu-digest-mail-forward
5412 Digest the current series (@pxref{Decoding Articles}) and forward the
5413 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
5414 uses the process/prefix convention (@pxref{Process/Prefix}).
5415
5416 @item S M-c
5417 @kindex S M-c (Summary)
5418 @findex gnus-summary-mail-crosspost-complaint
5419 @cindex crossposting
5420 @cindex excessive crossposting
5421 Send a complaint about excessive crossposting to the author of the
5422 current article (@code{gnus-summary-mail-crosspost-complaint}).
5423
5424 @findex gnus-crosspost-complaint
5425 This command is provided as a way to fight back against the current
5426 crossposting pandemic that's sweeping Usenet.  It will compose a reply
5427 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
5428 command understands the process/prefix convention
5429 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
5430
5431 @end table
5432
5433 Also @xref{Header Commands, ,Header Commands, message, The Message
5434 Manual}, for more information.
5435
5436
5437 @node Summary Post Commands
5438 @subsection Summary Post Commands
5439 @cindex post
5440 @cindex composing news
5441
5442 Commands for posting a news article:
5443
5444 @table @kbd
5445 @item S p
5446 @itemx a
5447 @kindex a (Summary)
5448 @kindex S p (Summary)
5449 @findex gnus-summary-post-news
5450 @c @icon{gnus-summary-post-news}
5451 Prepare for posting an article (@code{gnus-summary-post-news}).  By
5452 default, post to the current group.  If given a prefix, disable that.
5453 If the prefix is 1, prompt for another group instead.
5454
5455 @item S f
5456 @itemx f
5457 @kindex f (Summary)
5458 @kindex S f (Summary)
5459 @findex gnus-summary-followup
5460 @c @icon{gnus-summary-followup}
5461 Post a followup to the current article (@code{gnus-summary-followup}).
5462
5463 @item S F
5464 @itemx F
5465 @kindex S F (Summary)
5466 @kindex F (Summary)
5467 @c @icon{gnus-summary-followup-with-original}
5468 @findex gnus-summary-followup-with-original
5469 Post a followup to the current article and include the original message
5470 (@code{gnus-summary-followup-with-original}).  This command uses the
5471 process/prefix convention.
5472
5473 @item S n
5474 @kindex S n (Summary)
5475 @findex gnus-summary-followup-to-mail
5476 Post a followup to the current article via news, even if you got the
5477 message through mail (@code{gnus-summary-followup-to-mail}).
5478
5479 @item S N
5480 @kindex S N (Summary)
5481 @findex gnus-summary-followup-to-mail-with-original
5482 Post a followup to the current article via news, even if you got the
5483 message through mail and include the original message
5484 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
5485 the process/prefix convention.
5486
5487 @item S o p
5488 @kindex S o p (Summary)
5489 @findex gnus-summary-post-forward
5490 Forward the current article to a newsgroup
5491 (@code{gnus-summary-post-forward}).
5492  If no prefix is given, the message is forwarded according to the value
5493 of (@code{message-forward-as-mime}) and
5494 (@code{message-forward-show-mml}); if the prefix is 1, decode the
5495 message and forward directly inline; if the prefix is 2, forward message
5496 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
5497 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
5498 directly inline; otherwise, the message is forwarded as no prefix given
5499 but use the flipped value of (@code{message-forward-as-mime}).  By
5500 default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section.
5501
5502 @item S O p
5503 @kindex S O p (Summary)
5504 @findex gnus-uu-digest-post-forward
5505 @cindex digests
5506 @cindex making digests
5507 Digest the current series and forward the result to a newsgroup
5508 (@code{gnus-uu-digest-mail-forward}).  This command uses the
5509 process/prefix convention.
5510
5511 @item S u
5512 @kindex S u (Summary)
5513 @findex gnus-uu-post-news
5514 @c @icon{gnus-uu-post-news}
5515 Uuencode a file, split it into parts, and post it as a series
5516 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
5517 @end table
5518
5519 Also @xref{Header Commands, ,Header Commands, message, The Message
5520 Manual}, for more information.
5521
5522
5523 @node Summary Message Commands
5524 @subsection Summary Message Commands
5525
5526 @table @kbd
5527 @item S y
5528 @kindex S y (Summary)
5529 @findex gnus-summary-yank-message
5530 Yank the current article into an already existing Message composition
5531 buffer (@code{gnus-summary-yank-message}).  This command prompts for
5532 what message buffer you want to yank into, and understands the
5533 process/prefix convention (@pxref{Process/Prefix}).
5534
5535 @end table
5536
5537
5538 @node Canceling and Superseding
5539 @subsection Canceling Articles
5540 @cindex canceling articles
5541 @cindex superseding articles
5542
5543 Have you ever written something, and then decided that you really,
5544 really, really wish you hadn't posted that?
5545
5546 Well, you can't cancel mail, but you can cancel posts.
5547
5548 @findex gnus-summary-cancel-article
5549 @kindex C (Summary)
5550 @c @icon{gnus-summary-cancel-article}
5551 Find the article you wish to cancel (you can only cancel your own
5552 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
5553 c} (@code{gnus-summary-cancel-article}).  Your article will be
5554 canceled---machines all over the world will be deleting your article.
5555 This command uses the process/prefix convention (@pxref{Process/Prefix}).
5556
5557 Be aware, however, that not all sites honor cancels, so your article may
5558 live on here and there, while most sites will delete the article in
5559 question.
5560
5561 Gnus will use the ``current'' select method when canceling.  If you
5562 want to use the standard posting method, use the @samp{a} symbolic
5563 prefix (@pxref{Symbolic Prefixes}).
5564
5565 Gnus ensures that only you can cancel your own messages using a
5566 @code{Cancel-Lock} header (@pxref{Canceling News, Canceling News, ,
5567 message, Message Manual}).
5568
5569 If you discover that you have made some mistakes and want to do some
5570 corrections, you can post a @dfn{superseding} article that will replace
5571 your original article.
5572
5573 @findex gnus-summary-supersede-article
5574 @kindex S (Summary)
5575 Go to the original article and press @kbd{S s}
5576 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
5577 where you can edit the article all you want before sending it off the
5578 usual way.
5579
5580 The same goes for superseding as for canceling, only more so: Some
5581 sites do not honor superseding.  On those sites, it will appear that you
5582 have posted almost the same article twice.
5583
5584 If you have just posted the article, and change your mind right away,
5585 there is a trick you can use to cancel/supersede the article without
5586 waiting for the article to appear on your site first.  You simply return
5587 to the post buffer (which is called @code{*sent ...*}).  There you will
5588 find the article you just posted, with all the headers intact.  Change
5589 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
5590 header by substituting one of those words for the word
5591 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
5592 you would do normally.  The previous article will be
5593 canceled/superseded.
5594
5595 Just remember, kids: There is no 'c' in 'supersede'.
5596
5597 @node Delayed Articles
5598 @section Delayed Articles
5599 @cindex delayed sending
5600 @cindex send delayed
5601
5602 Sometimes, you might wish to delay the sending of a message.  For
5603 example, you might wish to arrange for a message to turn up just in time
5604 to remind your about the birthday of your Significant Other.  For this,
5605 there is the @code{gnus-delay} package.  Setup is simple:
5606
5607 @lisp
5608 (gnus-delay-initialize)
5609 @end lisp
5610
5611 @findex gnus-delay-article
5612 Normally, to send a message you use the @kbd{C-c C-c} command from
5613 Message mode.  To delay a message, use @kbd{C-c C-j}
5614 (@code{gnus-delay-article}) instead.  This will ask you for how long the
5615 message should be delayed.  Possible answers are:
5616
5617 @itemize @bullet
5618 @item
5619 A time span.  Consists of an integer and a letter.  For example,
5620 @code{42d} means to delay for 42 days.  Available letters are @code{m}
5621 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
5622 (months) and @code{Y} (years).
5623
5624 @item
5625 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
5626 delayed until that day, at a specific time (eight o'clock by default).
5627 See also @code{gnus-delay-default-hour}.
5628
5629 @item
5630 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
5631 stuff.  The deadline will be at that time today, except if that time has
5632 already passed, then it's at the given time tomorrow.  So if it's ten
5633 o'clock in the morning and you specify @code{11:15}, then the deadline
5634 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
5635 that means a time tomorrow.
5636 @end itemize
5637
5638 The action of the @code{gnus-delay-article} command is influenced by a
5639 couple of variables:
5640
5641 @table @code
5642 @item gnus-delay-default-hour
5643 @vindex gnus-delay-default-hour
5644 When you specify a specific date, the message will be due on that hour
5645 on the given date.  Possible values are integers 0 through 23.
5646
5647 @item gnus-delay-default-delay
5648 @vindex gnus-delay-default-delay
5649 This is a string and gives the default delay.  It can be of any of the
5650 formats described above.
5651
5652 @item gnus-delay-group
5653 @vindex gnus-delay-group
5654 Delayed articles will be kept in this group on the drafts server until
5655 they are due.  You probably don't need to change this.  The default
5656 value is @code{"delayed"}.
5657
5658 @item gnus-delay-header
5659 @vindex gnus-delay-header
5660 The deadline for each article will be stored in a header.  This variable
5661 is a string and gives the header name.  You probably don't need to
5662 change this.  The default value is @code{"X-Gnus-Delayed"}.
5663 @end table
5664
5665 The way delaying works is like this: when you use the
5666 @code{gnus-delay-article} command, you give a certain delay.  Gnus
5667 calculates the deadline of the message and stores it in the
5668 @code{X-Gnus-Delayed} header and puts the message in the
5669 @code{nndraft:delayed} group.
5670
5671 @findex gnus-delay-send-queue
5672 And whenever you get new news, Gnus looks through the group for articles
5673 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
5674 function for this.  By default, this function is added to the hook
5675 @code{gnus-get-new-news-hook}.  But of course, you can change this.
5676 Maybe you want to use the demon to send drafts?  Just tell the demon to
5677 execute the @code{gnus-delay-send-queue} function.
5678
5679 @table @code
5680 @item gnus-delay-initialize
5681 @findex gnus-delay-initialize
5682 By default, this function installs @code{gnus-delay-send-queue} in
5683 @code{gnus-get-new-news-hook}.  But it accepts the optional second
5684 argument @code{no-check}.  If it is non-@code{nil},
5685 @code{gnus-get-new-news-hook} is not changed.  The optional first
5686 argument is ignored.
5687
5688 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
5689 Presumably, you want to use the demon for sending due delayed articles.
5690 Just don't forget to set that up :-)
5691 @end table
5692
5693
5694 @node Marking Articles
5695 @section Marking Articles
5696 @cindex article marking
5697 @cindex article ticking
5698 @cindex marks
5699
5700 There are several marks you can set on an article.
5701
5702 You have marks that decide the @dfn{readedness} (whoo, neato-keano
5703 neologism ohoy!) of the article.  Alphabetic marks generally mean
5704 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
5705
5706 In addition, you also have marks that do not affect readedness.
5707
5708 @menu
5709 * Unread Articles::             Marks for unread articles.
5710 * Read Articles::               Marks for read articles.
5711 * Other Marks::                 Marks that do not affect readedness.
5712 @end menu
5713
5714 @ifinfo
5715 There's a plethora of commands for manipulating these marks:
5716 @end ifinfo
5717
5718 @menu
5719 * Setting Marks::             How to set and remove marks.
5720 * Generic Marking Commands::  How to customize the marking.
5721 * Setting Process Marks::     How to mark articles for later processing.
5722 @end menu
5723
5724
5725 @node Unread Articles
5726 @subsection Unread Articles
5727
5728 The following marks mark articles as (kinda) unread, in one form or
5729 other.
5730
5731 @table @samp
5732 @item !
5733 @vindex gnus-ticked-mark
5734 Marked as ticked (@code{gnus-ticked-mark}).
5735
5736 @dfn{Ticked articles} are articles that will remain visible always.  If
5737 you see an article that you find interesting, or you want to put off
5738 reading it, or replying to it, until sometime later, you'd typically
5739 tick it.  However, articles can be expired (from news servers by the
5740 news server software, Gnus itself never expires ticked messages), so if
5741 you want to keep an article forever, you'll have to make it persistent
5742 (@pxref{Persistent Articles}).
5743
5744 @item ?
5745 @vindex gnus-dormant-mark
5746 Marked as dormant (@code{gnus-dormant-mark}).
5747
5748 @dfn{Dormant articles} will only appear in the summary buffer if there
5749 are followups to it.  If you want to see them even if they don't have
5750 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
5751 Otherwise (except for the visibility issue), they are just like ticked
5752 messages.
5753
5754 @item SPACE
5755 @vindex gnus-unread-mark
5756 Marked as unread (@code{gnus-unread-mark}).
5757
5758 @dfn{Unread articles} are articles that haven't been read at all yet.
5759 @end table
5760
5761
5762 @node Read Articles
5763 @subsection Read Articles
5764 @cindex expirable mark
5765
5766 All the following marks mark articles as read.
5767
5768 @table @samp
5769
5770 @item r
5771 @vindex gnus-del-mark
5772 These are articles that the user has marked as read with the @kbd{d}
5773 command manually, more or less (@code{gnus-del-mark}).
5774
5775 @item R
5776 @vindex gnus-read-mark
5777 Articles that have actually been read (@code{gnus-read-mark}).
5778
5779 @item O
5780 @vindex gnus-ancient-mark
5781 Articles that were marked as read in previous sessions and are now
5782 @dfn{old} (@code{gnus-ancient-mark}).
5783
5784 @item K
5785 @vindex gnus-killed-mark
5786 Marked as killed (@code{gnus-killed-mark}).
5787
5788 @item X
5789 @vindex gnus-kill-file-mark
5790 Marked as killed by kill files (@code{gnus-kill-file-mark}).
5791
5792 @item Y
5793 @vindex gnus-low-score-mark
5794 Marked as read by having too low a score (@code{gnus-low-score-mark}).
5795
5796 @item C
5797 @vindex gnus-catchup-mark
5798 Marked as read by a catchup (@code{gnus-catchup-mark}).
5799
5800 @item G
5801 @vindex gnus-canceled-mark
5802 Canceled article (@code{gnus-canceled-mark})
5803
5804 @item F
5805 @vindex gnus-souped-mark
5806 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
5807
5808 @item Q
5809 @vindex gnus-sparse-mark
5810 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
5811 Threading}.
5812
5813 @item M
5814 @vindex gnus-duplicate-mark
5815 Article marked as read by duplicate suppression
5816 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
5817
5818 @end table
5819
5820 All these marks just mean that the article is marked as read, really.
5821 They are interpreted differently when doing adaptive scoring, though.
5822
5823 One more special mark, though:
5824
5825 @table @samp
5826 @item E
5827 @vindex gnus-expirable-mark
5828 Marked as expirable (@code{gnus-expirable-mark}).
5829
5830 Marking articles as @dfn{expirable} (or have them marked as such
5831 automatically) doesn't make much sense in normal groups---a user doesn't
5832 control expiring of news articles, but in mail groups, for instance,
5833 articles marked as @dfn{expirable} can be deleted by Gnus at
5834 any time.
5835 @end table
5836
5837
5838 @node Other Marks
5839 @subsection Other Marks
5840 @cindex process mark
5841 @cindex bookmarks
5842
5843 There are some marks that have nothing to do with whether the article is
5844 read or not.
5845
5846 @itemize @bullet
5847
5848 @item
5849 You can set a bookmark in the current article.  Say you are reading a
5850 long thesis on cats' urinary tracts, and have to go home for dinner
5851 before you've finished reading the thesis.  You can then set a bookmark
5852 in the article, and Gnus will jump to this bookmark the next time it
5853 encounters the article.  @xref{Setting Marks}.
5854
5855 @item
5856 @vindex gnus-replied-mark
5857 All articles that you have replied to or made a followup to (i.e., have
5858 answered) will be marked with an @samp{A} in the second column
5859 (@code{gnus-replied-mark}).
5860
5861 @item
5862 @vindex gnus-forwarded-mark
5863 All articles that you have forwarded will be marked with an @samp{F} in
5864 the second column (@code{gnus-forwarded-mark}).
5865
5866 @item
5867 @vindex gnus-cached-mark
5868 Articles stored in the article cache will be marked with an @samp{*} in
5869 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
5870
5871 @item
5872 @vindex gnus-saved-mark
5873 Articles ``saved'' (in some manner or other; not necessarily
5874 religiously) are marked with an @samp{S} in the second column
5875 (@code{gnus-saved-mark}).
5876
5877 @item
5878 @vindex gnus-recent-mark
5879 Articles that according to the server haven't been shown to the user
5880 before are marked with a @samp{N} in the second column
5881 (@code{gnus-recent-mark}).  Note that not all servers support this
5882 mark, in which case it simply never appears.  Compare with
5883 @code{gnus-unseen-mark}.
5884
5885 @item
5886 @vindex gnus-unseen-mark
5887 Articles that haven't been seen before in Gnus by the user are marked
5888 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
5889 Compare with @code{gnus-recent-mark}.
5890
5891 @item
5892 @vindex gnus-downloaded-mark
5893 When using the Gnus agent (@pxref{Agent Basics}), articles may be
5894 downloaded for unplugged (offline) viewing.  If you are using the
5895 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
5896 (The variable @code{gnus-downloaded-mark} controls which character to
5897 use.)
5898
5899 @item
5900 @vindex gnus-undownloaded-mark
5901 When using the Gnus agent (@pxref{Agent Basics}), some articles might
5902 not have been downloaded.  Such articles cannot be viewed while you
5903 are unplugged (offline).  If you are using the @samp{%O} spec, these
5904 articles get the @samp{-} mark in that spec.  (The variable
5905 @code{gnus-undownloaded-mark} controls which character to use.)
5906
5907 @item
5908 @vindex gnus-downloadable-mark
5909 The Gnus agent (@pxref{Agent Basics}) downloads some articles
5910 automatically, but it is also possible to explicitly mark articles for
5911 download, even if they would not be downloaded automatically.  Such
5912 explicitly-marked articles get the @samp{%} mark in the first column.
5913 (The variable @code{gnus-downloadable-mark} controls which character to
5914 use.)
5915
5916 @item
5917 @vindex gnus-not-empty-thread-mark
5918 @vindex gnus-empty-thread-mark
5919 If the @samp{%e} spec is used, the presence of threads or not will be
5920 marked with @code{gnus-not-empty-thread-mark} and
5921 @code{gnus-empty-thread-mark} in the third column, respectively.
5922
5923 @item
5924 @vindex gnus-process-mark
5925 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
5926 variety of commands react to the presence of the process mark.  For
5927 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
5928 all articles that have been marked with the process mark.  Articles
5929 marked with the process mark have a @samp{#} in the second column.
5930
5931 @end itemize
5932
5933 You might have noticed that most of these ``non-readedness'' marks
5934 appear in the second column by default.  So if you have a cached, saved,
5935 replied article that you have process-marked, what will that look like?
5936
5937 Nothing much.  The precedence rules go as follows: process -> cache ->
5938 replied -> saved.  So if the article is in the cache and is replied,
5939 you'll only see the cache mark and not the replied mark.
5940
5941
5942 @node Setting Marks
5943 @subsection Setting Marks
5944 @cindex setting marks
5945
5946 All the marking commands understand the numeric prefix.
5947
5948 @table @kbd
5949 @item M c
5950 @itemx M-u
5951 @kindex M c (Summary)
5952 @kindex M-u (Summary)
5953 @findex gnus-summary-clear-mark-forward
5954 @cindex mark as unread
5955 Clear all readedness-marks from the current article
5956 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
5957 article as unread.
5958
5959 @item M t
5960 @itemx !
5961 @kindex ! (Summary)
5962 @kindex M t (Summary)
5963 @findex gnus-summary-tick-article-forward
5964 Tick the current article (@code{gnus-summary-tick-article-forward}).
5965 @xref{Article Caching}.
5966
5967 @item M ?
5968 @itemx ?
5969 @kindex ? (Summary)
5970 @kindex M ? (Summary)
5971 @findex gnus-summary-mark-as-dormant
5972 Mark the current article as dormant
5973 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
5974
5975 @item M d
5976 @itemx d
5977 @kindex M d (Summary)
5978 @kindex d (Summary)
5979 @findex gnus-summary-mark-as-read-forward
5980 Mark the current article as read
5981 (@code{gnus-summary-mark-as-read-forward}).
5982
5983 @item D
5984 @kindex D (Summary)
5985 @findex gnus-summary-mark-as-read-backward
5986 Mark the current article as read and move point to the previous line
5987 (@code{gnus-summary-mark-as-read-backward}).
5988
5989 @item M k
5990 @itemx k
5991 @kindex k (Summary)
5992 @kindex M k (Summary)
5993 @findex gnus-summary-kill-same-subject-and-select
5994 Mark all articles that have the same subject as the current one as read,
5995 and then select the next unread article
5996 (@code{gnus-summary-kill-same-subject-and-select}).
5997
5998 @item M K
5999 @itemx C-k
6000 @kindex M K (Summary)
6001 @kindex C-k (Summary)
6002 @findex gnus-summary-kill-same-subject
6003 Mark all articles that have the same subject as the current one as read
6004 (@code{gnus-summary-kill-same-subject}).
6005
6006 @item M C
6007 @kindex M C (Summary)
6008 @findex gnus-summary-catchup
6009 @c @icon{gnus-summary-catchup}
6010 Mark all unread articles as read (@code{gnus-summary-catchup}).
6011
6012 @item M C-c
6013 @kindex M C-c (Summary)
6014 @findex gnus-summary-catchup-all
6015 Mark all articles in the group as read---even the ticked and dormant
6016 articles (@code{gnus-summary-catchup-all}).
6017
6018 @item M H
6019 @kindex M H (Summary)
6020 @findex gnus-summary-catchup-to-here
6021 Catchup the current group to point (before the point)
6022 (@code{gnus-summary-catchup-to-here}).
6023
6024 @item M h
6025 @kindex M h (Summary)
6026 @findex gnus-summary-catchup-from-here
6027 Catchup the current group from point (after the point)
6028 (@code{gnus-summary-catchup-from-here}).
6029
6030 @item C-w
6031 @kindex C-w (Summary)
6032 @findex gnus-summary-mark-region-as-read
6033 Mark all articles between point and mark as read
6034 (@code{gnus-summary-mark-region-as-read}).
6035
6036 @item M V k
6037 @kindex M V k (Summary)
6038 @findex gnus-summary-kill-below
6039 Kill all articles with scores below the default score (or below the
6040 numeric prefix) (@code{gnus-summary-kill-below}).
6041
6042 @item M e
6043 @itemx E
6044 @kindex M e (Summary)
6045 @kindex E (Summary)
6046 @findex gnus-summary-mark-as-expirable
6047 Mark the current article as expirable
6048 (@code{gnus-summary-mark-as-expirable}).
6049
6050 @item M b
6051 @kindex M b (Summary)
6052 @findex gnus-summary-set-bookmark
6053 Set a bookmark in the current article
6054 (@code{gnus-summary-set-bookmark}).
6055
6056 @item M B
6057 @kindex M B (Summary)
6058 @findex gnus-summary-remove-bookmark
6059 Remove the bookmark from the current article
6060 (@code{gnus-summary-remove-bookmark}).
6061
6062 @item M V c
6063 @kindex M V c (Summary)
6064 @findex gnus-summary-clear-above
6065 Clear all marks from articles with scores over the default score (or
6066 over the numeric prefix) (@code{gnus-summary-clear-above}).
6067
6068 @item M V u
6069 @kindex M V u (Summary)
6070 @findex gnus-summary-tick-above
6071 Tick all articles with scores over the default score (or over the
6072 numeric prefix) (@code{gnus-summary-tick-above}).
6073
6074 @item M V m
6075 @kindex M V m (Summary)
6076 @findex gnus-summary-mark-above
6077 Prompt for a mark, and mark all articles with scores over the default
6078 score (or over the numeric prefix) with this mark
6079 (@code{gnus-summary-clear-above}).
6080 @end table
6081
6082 @vindex gnus-summary-goto-unread
6083 The @code{gnus-summary-goto-unread} variable controls what action should
6084 be taken after setting a mark.  If non-@code{nil}, point will move to
6085 the next/previous unread article.  If @code{nil}, point will just move
6086 one line up or down.  As a special case, if this variable is
6087 @code{never}, all the marking commands as well as other commands (like
6088 @kbd{SPACE}) will move to the next article, whether it is unread or not.
6089 The default is @code{t}.
6090
6091
6092 @node Generic Marking Commands
6093 @subsection Generic Marking Commands
6094
6095 Some people would like the command that ticks an article (@kbd{!}) go to
6096 the next article.  Others would like it to go to the next unread
6097 article.  Yet others would like it to stay on the current article.  And
6098 even though I haven't heard of anybody wanting it to go to the
6099 previous (unread) article, I'm sure there are people that want that as
6100 well.
6101
6102 Multiply these five behaviors with five different marking commands, and
6103 you get a potentially complex set of variable to control what each
6104 command should do.
6105
6106 To sidestep that mess, Gnus provides commands that do all these
6107 different things.  They can be found on the @kbd{M M} map in the summary
6108 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
6109 to list in this manual.
6110
6111 While you can use these commands directly, most users would prefer
6112 altering the summary mode keymap.  For instance, if you would like the
6113 @kbd{!} command to go to the next article instead of the next unread
6114 article, you could say something like:
6115
6116 @lisp
6117 @group
6118 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
6119 (defun my-alter-summary-map ()
6120   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
6121 @end group
6122 @end lisp
6123
6124 @noindent
6125 or
6126
6127 @lisp
6128 (defun my-alter-summary-map ()
6129   (local-set-key "!" "MM!n"))
6130 @end lisp
6131
6132
6133 @node Setting Process Marks
6134 @subsection Setting Process Marks
6135 @cindex setting process marks
6136
6137 Process marks are displayed as @code{#} in the summary buffer, and are
6138 used for marking articles in such a way that other commands will
6139 process these articles.  For instance, if you process mark four
6140 articles and then use the @kbd{*} command, Gnus will enter these four
6141 commands into the cache.  For more information,
6142 @pxref{Process/Prefix}.
6143
6144 @table @kbd
6145
6146 @item M P p
6147 @itemx #
6148 @kindex # (Summary)
6149 @kindex M P p (Summary)
6150 @findex gnus-summary-mark-as-processable
6151 Mark the current article with the process mark
6152 (@code{gnus-summary-mark-as-processable}).
6153 @findex gnus-summary-unmark-as-processable
6154
6155 @item M P u
6156 @itemx M-#
6157 @kindex M P u (Summary)
6158 @kindex M-# (Summary)
6159 Remove the process mark, if any, from the current article
6160 (@code{gnus-summary-unmark-as-processable}).
6161
6162 @item M P U
6163 @kindex M P U (Summary)
6164 @findex gnus-summary-unmark-all-processable
6165 Remove the process mark from all articles
6166 (@code{gnus-summary-unmark-all-processable}).
6167
6168 @item M P i
6169 @kindex M P i (Summary)
6170 @findex gnus-uu-invert-processable
6171 Invert the list of process marked articles
6172 (@code{gnus-uu-invert-processable}).
6173
6174 @item M P R
6175 @kindex M P R (Summary)
6176 @findex gnus-uu-mark-by-regexp
6177 Mark articles that have a @code{Subject} header that matches a regular
6178 expression (@code{gnus-uu-mark-by-regexp}).
6179
6180 @item M P G
6181 @kindex M P G (Summary)
6182 @findex gnus-uu-unmark-by-regexp
6183 Unmark articles that have a @code{Subject} header that matches a regular
6184 expression (@code{gnus-uu-unmark-by-regexp}).
6185
6186 @item M P r
6187 @kindex M P r (Summary)
6188 @findex gnus-uu-mark-region
6189 Mark articles in region (@code{gnus-uu-mark-region}).
6190
6191 @item M P g
6192 @kindex M P g (Summary)
6193 @findex gnus-uu-unmark-region
6194 Unmark articles in region (@code{gnus-uu-unmark-region}).
6195
6196 @item M P t
6197 @kindex M P t (Summary)
6198 @findex gnus-uu-mark-thread
6199 Mark all articles in the current (sub)thread
6200 (@code{gnus-uu-mark-thread}).
6201
6202 @item M P T
6203 @kindex M P T (Summary)
6204 @findex gnus-uu-unmark-thread
6205 Unmark all articles in the current (sub)thread
6206 (@code{gnus-uu-unmark-thread}).
6207
6208 @item M P v
6209 @kindex M P v (Summary)
6210 @findex gnus-uu-mark-over
6211 Mark all articles that have a score above the prefix argument
6212 (@code{gnus-uu-mark-over}).
6213
6214 @item M P s
6215 @kindex M P s (Summary)
6216 @findex gnus-uu-mark-series
6217 Mark all articles in the current series (@code{gnus-uu-mark-series}).
6218
6219 @item M P S
6220 @kindex M P S (Summary)
6221 @findex gnus-uu-mark-sparse
6222 Mark all series that have already had some articles marked
6223 (@code{gnus-uu-mark-sparse}).
6224
6225 @item M P a
6226 @kindex M P a (Summary)
6227 @findex gnus-uu-mark-all
6228 Mark all articles in series order (@code{gnus-uu-mark-series}).
6229
6230 @item M P b
6231 @kindex M P b (Summary)
6232 @findex gnus-uu-mark-buffer
6233 Mark all articles in the buffer in the order they appear
6234 (@code{gnus-uu-mark-buffer}).
6235
6236 @item M P k
6237 @kindex M P k (Summary)
6238 @findex gnus-summary-kill-process-mark
6239 Push the current process mark set onto the stack and unmark all articles
6240 (@code{gnus-summary-kill-process-mark}).
6241
6242 @item M P y
6243 @kindex M P y (Summary)
6244 @findex gnus-summary-yank-process-mark
6245 Pop the previous process mark set from the stack and restore it
6246 (@code{gnus-summary-yank-process-mark}).
6247
6248 @item M P w
6249 @kindex M P w (Summary)
6250 @findex gnus-summary-save-process-mark
6251 Push the current process mark set onto the stack
6252 (@code{gnus-summary-save-process-mark}).
6253
6254 @end table
6255
6256 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
6257 set process marks based on article body contents.
6258
6259
6260 @node Limiting
6261 @section Limiting
6262 @cindex limiting
6263
6264 It can be convenient to limit the summary buffer to just show some
6265 subset of the articles currently in the group.  The effect most limit
6266 commands have is to remove a few (or many) articles from the summary
6267 buffer.
6268
6269 All limiting commands work on subsets of the articles already fetched
6270 from the servers.  None of these commands query the server for
6271 additional articles.
6272
6273 @table @kbd
6274
6275 @item / /
6276 @itemx / s
6277 @kindex / / (Summary)
6278 @findex gnus-summary-limit-to-subject
6279 Limit the summary buffer to articles that match some subject
6280 (@code{gnus-summary-limit-to-subject}).  If given a prefix, exclude
6281 matching articles.
6282
6283 @item / a
6284 @kindex / a (Summary)
6285 @findex gnus-summary-limit-to-author
6286 Limit the summary buffer to articles that match some author
6287 (@code{gnus-summary-limit-to-author}).  If given a prefix, exclude
6288 matching articles.
6289
6290 @item / x
6291 @kindex / x (Summary)
6292 @findex gnus-summary-limit-to-extra
6293 Limit the summary buffer to articles that match one of the ``extra''
6294 headers (@pxref{To From Newsgroups})
6295 (@code{gnus-summary-limit-to-extra}).  If given a prefix, exclude
6296 matching articles.
6297
6298 @item / u
6299 @itemx x
6300 @kindex / u (Summary)
6301 @kindex x (Summary)
6302 @findex gnus-summary-limit-to-unread
6303 Limit the summary buffer to articles not marked as read
6304 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
6305 buffer to articles strictly unread.  This means that ticked and
6306 dormant articles will also be excluded.
6307
6308 @item / m
6309 @kindex / m (Summary)
6310 @findex gnus-summary-limit-to-marks
6311 Ask for a mark and then limit to all articles that have been marked
6312 with that mark (@code{gnus-summary-limit-to-marks}).
6313
6314 @item / t
6315 @kindex / t (Summary)
6316 @findex gnus-summary-limit-to-age
6317 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
6318 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
6319 articles younger than that number of days.
6320
6321 @item / n
6322 @kindex / n (Summary)
6323 @findex gnus-summary-limit-to-articles
6324 Limit the summary buffer to the current article
6325 (@code{gnus-summary-limit-to-articles}).  Uses the process/prefix
6326 convention (@pxref{Process/Prefix}).
6327
6328 @item / w
6329 @kindex / w (Summary)
6330 @findex gnus-summary-pop-limit
6331 Pop the previous limit off the stack and restore it
6332 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
6333 the stack.
6334
6335 @item / .
6336 @kindex / . (Summary)
6337 @findex gnus-summary-limit-to-unseen
6338 Limit the summary buffer to the unseen articles
6339 (@code{gnus-summary-limit-to-unseen}).
6340
6341 @item / v
6342 @kindex / v (Summary)
6343 @findex gnus-summary-limit-to-score
6344 Limit the summary buffer to articles that have a score at or above some
6345 score (@code{gnus-summary-limit-to-score}).
6346
6347 @item / p
6348 @kindex / p (Summary)
6349 @findex gnus-summary-limit-to-display-predicate
6350 Limit the summary buffer to articles that satisfy the @code{display}
6351 group parameter predicate
6352 (@code{gnus-summary-limit-to-display-predicate}).  @xref{Group
6353 Parameters}, for more on this predicate.
6354
6355 @item / r
6356 @kindex / r (Summary)
6357 @findex gnus-summary-limit-to-replied
6358 Limit the summary buffer to replied articles
6359 (@code{gnus-summary-limit-to-replied}).  If given a prefix, exclude
6360 replied articles.
6361
6362 @item / E
6363 @itemx M S
6364 @kindex M S (Summary)
6365 @kindex / E (Summary)
6366 @findex gnus-summary-limit-include-expunged
6367 Include all expunged articles in the limit
6368 (@code{gnus-summary-limit-include-expunged}).
6369
6370 @item / D
6371 @kindex / D (Summary)
6372 @findex gnus-summary-limit-include-dormant
6373 Include all dormant articles in the limit
6374 (@code{gnus-summary-limit-include-dormant}).
6375
6376 @item / *
6377 @kindex / * (Summary)
6378 @findex gnus-summary-limit-include-cached
6379 Include all cached articles in the limit
6380 (@code{gnus-summary-limit-include-cached}).
6381
6382 @item / d
6383 @kindex / d (Summary)
6384 @findex gnus-summary-limit-exclude-dormant
6385 Exclude all dormant articles from the limit
6386 (@code{gnus-summary-limit-exclude-dormant}).
6387
6388 @item / M
6389 @kindex / M (Summary)
6390 @findex gnus-summary-limit-exclude-marks
6391 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
6392
6393 @item / T
6394 @kindex / T (Summary)
6395 @findex gnus-summary-limit-include-thread
6396 Include all the articles in the current thread in the limit.
6397
6398 @item / c
6399 @kindex / c (Summary)
6400 @findex gnus-summary-limit-exclude-childless-dormant
6401 Exclude all dormant articles that have no children from the limit@*
6402 (@code{gnus-summary-limit-exclude-childless-dormant}).
6403
6404 @item / C
6405 @kindex / C (Summary)
6406 @findex gnus-summary-limit-mark-excluded-as-read
6407 Mark all excluded unread articles as read
6408 (@code{gnus-summary-limit-mark-excluded-as-read}).  If given a prefix,
6409 also mark excluded ticked and dormant articles as read.
6410
6411 @item / N
6412 @kindex / N (Summary)
6413 @findex gnus-summary-insert-new-articles
6414 Insert all new articles in the summary buffer.  It scans for new emails
6415 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
6416
6417 @item / o
6418 @kindex / o (Summary)
6419 @findex gnus-summary-insert-old-articles
6420 Insert all old articles in the summary buffer.  If given a numbered
6421 prefix, fetch this number of articles.
6422
6423 @end table
6424
6425
6426 @node Threading
6427 @section Threading
6428 @cindex threading
6429 @cindex article threading
6430
6431 Gnus threads articles by default.  @dfn{To thread} is to put responses
6432 to articles directly after the articles they respond to---in a
6433 hierarchical fashion.
6434
6435 Threading is done by looking at the @code{References} headers of the
6436 articles.  In a perfect world, this would be enough to build pretty
6437 trees, but unfortunately, the @code{References} header is often broken
6438 or simply missing.  Weird news propagation exacerbates the problem,
6439 so one has to employ other heuristics to get pleasing results.  A
6440 plethora of approaches exists, as detailed in horrible detail in
6441 @ref{Customizing Threading}.
6442
6443 First, a quick overview of the concepts:
6444
6445 @table @dfn
6446 @item root
6447 The top-most article in a thread; the first article in the thread.
6448
6449 @item thread
6450 A tree-like article structure.
6451
6452 @item sub-thread
6453 A small(er) section of this tree-like structure.
6454
6455 @item loose threads
6456 Threads often lose their roots due to article expiry, or due to the root
6457 already having been read in a previous session, and not displayed in the
6458 summary buffer.  We then typically have many sub-threads that really
6459 belong to one thread, but are without connecting roots.  These are
6460 called loose threads.
6461
6462 @item thread gathering
6463 An attempt to gather loose threads into bigger threads.
6464
6465 @item sparse threads
6466 A thread where the missing articles have been ``guessed'' at, and are
6467 displayed as empty lines in the summary buffer.
6468
6469 @end table
6470
6471
6472 @menu
6473 * Customizing Threading::       Variables you can change to affect the threading.
6474 * Thread Commands::             Thread based commands in the summary buffer.
6475 @end menu
6476
6477
6478 @node Customizing Threading
6479 @subsection Customizing Threading
6480 @cindex customizing threading
6481
6482 @menu
6483 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
6484 * Filling In Threads::          Making the threads displayed look fuller.
6485 * More Threading::              Even more variables for fiddling with threads.
6486 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
6487 @end menu
6488
6489
6490 @node Loose Threads
6491 @subsubsection Loose Threads
6492 @cindex <
6493 @cindex >
6494 @cindex loose threads
6495
6496 @table @code
6497 @item gnus-summary-make-false-root
6498 @vindex gnus-summary-make-false-root
6499 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
6500 and create a dummy root at the top.  (Wait a minute.  Root at the top?
6501 Yup.)  Loose subtrees occur when the real root has expired, or you've
6502 read or killed the root in a previous session.
6503
6504 When there is no real root of a thread, Gnus will have to fudge
6505 something.  This variable says what fudging method Gnus should use.
6506 There are four possible values:
6507
6508 @iftex
6509 @iflatex
6510 \gnusfigure{The Summary Buffer}{390}{
6511 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
6512 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
6513 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
6514 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
6515 }
6516 @end iflatex
6517 @end iftex
6518
6519 @cindex adopting articles
6520
6521 @table @code
6522
6523 @item adopt
6524 Gnus will make the first of the orphaned articles the parent.  This
6525 parent will adopt all the other articles.  The adopted articles will be
6526 marked as such by pointy brackets (@samp{<>}) instead of the standard
6527 square brackets (@samp{[]}).  This is the default method.
6528
6529 @item dummy
6530 @vindex gnus-summary-dummy-line-format
6531 @vindex gnus-summary-make-false-root-always
6532 Gnus will create a dummy summary line that will pretend to be the
6533 parent.  This dummy line does not correspond to any real article, so
6534 selecting it will just select the first real article after the dummy
6535 article.  @code{gnus-summary-dummy-line-format} is used to specify the
6536 format of the dummy roots.  It accepts only one format spec:  @samp{S},
6537 which is the subject of the article.  @xref{Formatting Variables}.
6538 If you want all threads to have a dummy root, even the non-gathered
6539 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
6540
6541 @item empty
6542 Gnus won't actually make any article the parent, but simply leave the
6543 subject field of all orphans except the first empty.  (Actually, it will
6544 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
6545 Buffer Format}).)
6546
6547 @item none
6548 Don't make any article parent at all.  Just gather the threads and
6549 display them after one another.
6550
6551 @item nil
6552 Don't gather loose threads.
6553 @end table
6554
6555 @item gnus-summary-gather-subject-limit
6556 @vindex gnus-summary-gather-subject-limit
6557 Loose threads are gathered by comparing subjects of articles.  If this
6558 variable is @code{nil}, Gnus requires an exact match between the
6559 subjects of the loose threads before gathering them into one big
6560 super-thread.  This might be too strict a requirement, what with the
6561 presence of stupid newsreaders that chop off long subject lines.  If
6562 you think so, set this variable to, say, 20 to require that only the
6563 first 20 characters of the subjects have to match.  If you set this
6564 variable to a really low number, you'll find that Gnus will gather
6565 everything in sight into one thread, which isn't very helpful.
6566
6567 @cindex fuzzy article gathering
6568 If you set this variable to the special value @code{fuzzy}, Gnus will
6569 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
6570 Matching}).
6571
6572 @item gnus-simplify-subject-fuzzy-regexp
6573 @vindex gnus-simplify-subject-fuzzy-regexp
6574 This can either be a regular expression or list of regular expressions
6575 that match strings that will be removed from subjects if fuzzy subject
6576 simplification is used.
6577
6578 @item gnus-simplify-ignored-prefixes
6579 @vindex gnus-simplify-ignored-prefixes
6580 If you set @code{gnus-summary-gather-subject-limit} to something as low
6581 as 10, you might consider setting this variable to something sensible:
6582
6583 @c Written by Michael Ernst <mernst@cs.rice.edu>
6584 @lisp
6585 (setq gnus-simplify-ignored-prefixes
6586       (concat
6587        "\\`\\[?\\("
6588        (mapconcat
6589         'identity
6590         '("looking"
6591           "wanted" "followup" "summary\\( of\\)?"
6592           "help" "query" "problem" "question"
6593           "answer" "reference" "announce"
6594           "How can I" "How to" "Comparison of"
6595           ;; ...
6596           )
6597         "\\|")
6598        "\\)\\s *\\("
6599        (mapconcat 'identity
6600                   '("for" "for reference" "with" "about")
6601                   "\\|")
6602        "\\)?\\]?:?[ \t]*"))
6603 @end lisp
6604
6605 All words that match this regexp will be removed before comparing two
6606 subjects.
6607
6608 @item gnus-simplify-subject-functions
6609 @vindex gnus-simplify-subject-functions
6610 If non-@code{nil}, this variable overrides
6611 @code{gnus-summary-gather-subject-limit}.  This variable should be a
6612 list of functions to apply to the @code{Subject} string iteratively to
6613 arrive at the simplified version of the string.
6614
6615 Useful functions to put in this list include:
6616
6617 @table @code
6618 @item gnus-simplify-subject-re
6619 @findex gnus-simplify-subject-re
6620 Strip the leading @samp{Re:}.
6621
6622 @item gnus-simplify-subject-fuzzy
6623 @findex gnus-simplify-subject-fuzzy
6624 Simplify fuzzily.
6625
6626 @item gnus-simplify-whitespace
6627 @findex gnus-simplify-whitespace
6628 Remove excessive whitespace.
6629
6630 @item gnus-simplify-all-whitespace
6631 @findex gnus-simplify-all-whitespace
6632 Remove all whitespace.
6633 @end table
6634
6635 You may also write your own functions, of course.
6636
6637
6638 @item gnus-summary-gather-exclude-subject
6639 @vindex gnus-summary-gather-exclude-subject
6640 Since loose thread gathering is done on subjects only, that might lead
6641 to many false hits, especially with certain common subjects like
6642 @samp{} and @samp{(none)}.  To make the situation slightly better,
6643 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
6644 what subjects should be excluded from the gathering process.@*
6645 The default is @samp{^ *$\\|^(none)$}.
6646
6647 @item gnus-summary-thread-gathering-function
6648 @vindex gnus-summary-thread-gathering-function
6649 Gnus gathers threads by looking at @code{Subject} headers.  This means
6650 that totally unrelated articles may end up in the same ``thread'', which
6651 is confusing.  An alternate approach is to look at all the
6652 @code{Message-ID}s in all the @code{References} headers to find matches.
6653 This will ensure that no gathered threads ever include unrelated
6654 articles, but it also means that people who have posted with broken
6655 newsreaders won't be gathered properly.  The choice is yours---plague or
6656 cholera:
6657
6658 @table @code
6659 @item gnus-gather-threads-by-subject
6660 @findex gnus-gather-threads-by-subject
6661 This function is the default gathering function and looks at
6662 @code{Subject}s exclusively.
6663
6664 @item gnus-gather-threads-by-references
6665 @findex gnus-gather-threads-by-references
6666 This function looks at @code{References} headers exclusively.
6667 @end table
6668
6669 If you want to test gathering by @code{References}, you could say
6670 something like:
6671
6672 @lisp
6673 (setq gnus-summary-thread-gathering-function
6674       'gnus-gather-threads-by-references)
6675 @end lisp
6676
6677 @end table
6678
6679
6680 @node Filling In Threads
6681 @subsubsection Filling In Threads
6682
6683 @table @code
6684 @item gnus-fetch-old-headers
6685 @vindex gnus-fetch-old-headers
6686 If non-@code{nil}, Gnus will attempt to build old threads by fetching
6687 more old headers---headers to articles marked as read.  If you would
6688 like to display as few summary lines as possible, but still connect as
6689 many loose threads as possible, you should set this variable to
6690 @code{some} or a number.  If you set it to a number, no more than that
6691 number of extra old headers will be fetched.  In either case, fetching
6692 old headers only works if the back end you are using carries overview
6693 files---this would normally be @code{nntp}, @code{nnspool},
6694 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
6695 the thread has been expired by the server, there's not much Gnus can
6696 do about that.
6697
6698 This variable can also be set to @code{invisible}.  This won't have any
6699 visible effects, but is useful if you use the @kbd{A T} command a lot
6700 (@pxref{Finding the Parent}).
6701
6702 @item gnus-fetch-old-ephemeral-headers
6703 @vindex gnus-fetch-old-ephemeral-headers
6704 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
6705 newsgroups.
6706
6707 @item gnus-build-sparse-threads
6708 @vindex gnus-build-sparse-threads
6709 Fetching old headers can be slow.  A low-rent similar effect can be
6710 gotten by setting this variable to @code{some}.  Gnus will then look at
6711 the complete @code{References} headers of all articles and try to string
6712 together articles that belong in the same thread.  This will leave
6713 @dfn{gaps} in the threading display where Gnus guesses that an article
6714 is missing from the thread.  (These gaps appear like normal summary
6715 lines.  If you select a gap, Gnus will try to fetch the article in
6716 question.)  If this variable is @code{t}, Gnus will display all these
6717 ``gaps'' without regard for whether they are useful for completing the
6718 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
6719 off sparse leaf nodes that don't lead anywhere.  This variable is
6720 @code{nil} by default.
6721
6722 @item gnus-read-all-available-headers
6723 @vindex gnus-read-all-available-headers
6724 This is a rather obscure variable that few will find useful.  It's
6725 intended for those non-news newsgroups where the back end has to fetch
6726 quite a lot to present the summary buffer, and where it's impossible to
6727 go back to parents of articles.  This is mostly the case in the
6728 web-based groups, like the @code{nnultimate} groups.
6729
6730 If you don't use those, then it's safe to leave this as the default
6731 @code{nil}.  If you want to use this variable, it should be a regexp
6732 that matches the group name, or @code{t} for all groups.
6733
6734 @end table
6735
6736
6737 @node More Threading
6738 @subsubsection More Threading
6739
6740 @table @code
6741 @item gnus-show-threads
6742 @vindex gnus-show-threads
6743 If this variable is @code{nil}, no threading will be done, and all of
6744 the rest of the variables here will have no effect.  Turning threading
6745 off will speed group selection up a bit, but it is sure to make reading
6746 slower and more awkward.
6747
6748 @item gnus-thread-hide-subtree
6749 @vindex gnus-thread-hide-subtree
6750 If non-@code{nil}, all threads will be hidden when the summary buffer is
6751 generated.
6752
6753 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
6754 Available predicates are @code{gnus-article-unread-p} and
6755 @code{gnus-article-unseen-p}.
6756
6757 Here's an example:
6758
6759 @lisp
6760 (setq gnus-thread-hide-subtree
6761       '(or gnus-article-unread-p
6762            gnus-article-unseen-p))
6763 @end lisp
6764
6765 (It's a pretty nonsensical example, since all unseen articles are also
6766 unread, but you get my drift.)
6767
6768
6769 @item gnus-thread-expunge-below
6770 @vindex gnus-thread-expunge-below
6771 All threads that have a total score (as defined by
6772 @code{gnus-thread-score-function}) less than this number will be
6773 expunged.  This variable is @code{nil} by default, which means that no
6774 threads are expunged.
6775
6776 @item gnus-thread-hide-killed
6777 @vindex gnus-thread-hide-killed
6778 if you kill a thread and this variable is non-@code{nil}, the subtree
6779 will be hidden.
6780
6781 @item gnus-thread-ignore-subject
6782 @vindex gnus-thread-ignore-subject
6783 Sometimes somebody changes the subject in the middle of a thread.  If
6784 this variable is non-@code{nil}, which is the default, the subject
6785 change is ignored.  If it is @code{nil}, a change in the subject will
6786 result in a new thread.
6787
6788 @item gnus-thread-indent-level
6789 @vindex gnus-thread-indent-level
6790 This is a number that says how much each sub-thread should be indented.
6791 The default is 4.
6792
6793 @item gnus-sort-gathered-threads-function
6794 @vindex gnus-sort-gathered-threads-function
6795 Sometimes, particularly with mailing lists, the order in which mails
6796 arrive locally is not necessarily the same as the order in which they
6797 arrived on the mailing list.  Consequently, when sorting sub-threads
6798 using the default @code{gnus-thread-sort-by-number}, responses can end
6799 up appearing before the article to which they are responding to.
6800 Setting this variable to an alternate value
6801 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
6802 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
6803 more logical sub-thread ordering in such instances.
6804
6805 @end table
6806
6807
6808 @node Low-Level Threading
6809 @subsubsection Low-Level Threading
6810
6811 @table @code
6812
6813 @item gnus-parse-headers-hook
6814 @vindex gnus-parse-headers-hook
6815 Hook run before parsing any headers.
6816
6817 @item gnus-alter-header-function
6818 @vindex gnus-alter-header-function
6819 If non-@code{nil}, this function will be called to allow alteration of
6820 article header structures.  The function is called with one parameter,
6821 the article header vector, which it may alter in any way.  For instance,
6822 if you have a mail-to-news gateway which alters the @code{Message-ID}s
6823 in systematic ways (by adding prefixes and such), you can use this
6824 variable to un-scramble the @code{Message-ID}s so that they are more
6825 meaningful.  Here's one example:
6826
6827 @lisp
6828 (setq gnus-alter-header-function 'my-alter-message-id)
6829
6830 (defun my-alter-message-id (header)
6831   (let ((id (mail-header-id header)))
6832     (when (string-match
6833            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
6834       (mail-header-set-id
6835        (concat (match-string 1 id) "@@" (match-string 2 id))
6836        header))))
6837 @end lisp
6838
6839 @end table
6840
6841
6842 @node Thread Commands
6843 @subsection Thread Commands
6844 @cindex thread commands
6845
6846 @table @kbd
6847
6848 @item T k
6849 @itemx C-M-k
6850 @kindex T k (Summary)
6851 @kindex C-M-k (Summary)
6852 @findex gnus-summary-kill-thread
6853 Mark all articles in the current (sub-)thread as read
6854 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
6855 remove all marks instead.  If the prefix argument is negative, tick
6856 articles instead.
6857
6858 @item T l
6859 @itemx C-M-l
6860 @kindex T l (Summary)
6861 @kindex C-M-l (Summary)
6862 @findex gnus-summary-lower-thread
6863 Lower the score of the current (sub-)thread
6864 (@code{gnus-summary-lower-thread}).
6865
6866 @item T i
6867 @kindex T i (Summary)
6868 @findex gnus-summary-raise-thread
6869 Increase the score of the current (sub-)thread
6870 (@code{gnus-summary-raise-thread}).
6871
6872 @item T #
6873 @kindex T # (Summary)
6874 @findex gnus-uu-mark-thread
6875 Set the process mark on the current (sub-)thread
6876 (@code{gnus-uu-mark-thread}).
6877
6878 @item T M-#
6879 @kindex T M-# (Summary)
6880 @findex gnus-uu-unmark-thread
6881 Remove the process mark from the current (sub-)thread
6882 (@code{gnus-uu-unmark-thread}).
6883
6884 @item T T
6885 @kindex T T (Summary)
6886 @findex gnus-summary-toggle-threads
6887 Toggle threading (@code{gnus-summary-toggle-threads}).
6888
6889 @item T s
6890 @kindex T s (Summary)
6891 @findex gnus-summary-show-thread
6892 Expose the (sub-)thread hidden under the current article, if any@*
6893 (@code{gnus-summary-show-thread}).
6894
6895 @item T h
6896 @kindex T h (Summary)
6897 @findex gnus-summary-hide-thread
6898 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
6899
6900 @item T S
6901 @kindex T S (Summary)
6902 @findex gnus-summary-show-all-threads
6903 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
6904
6905 @item T H
6906 @kindex T H (Summary)
6907 @findex gnus-summary-hide-all-threads
6908 Hide all threads (@code{gnus-summary-hide-all-threads}).
6909
6910 @item T t
6911 @kindex T t (Summary)
6912 @findex gnus-summary-rethread-current
6913 Re-thread the current article's thread
6914 (@code{gnus-summary-rethread-current}).  This works even when the
6915 summary buffer is otherwise unthreaded.
6916
6917 @item T ^
6918 @kindex T ^ (Summary)
6919 @findex gnus-summary-reparent-thread
6920 Make the current article the child of the marked (or previous) article
6921 (@code{gnus-summary-reparent-thread}).
6922
6923 @end table
6924
6925 The following commands are thread movement commands.  They all
6926 understand the numeric prefix.
6927
6928 @table @kbd
6929
6930 @item T n
6931 @kindex T n (Summary)
6932 @itemx C-M-f
6933 @kindex C-M-n (Summary)
6934 @itemx M-down
6935 @kindex M-down (Summary)
6936 @findex gnus-summary-next-thread
6937 Go to the next thread (@code{gnus-summary-next-thread}).
6938
6939 @item T p
6940 @kindex T p (Summary)
6941 @itemx C-M-b
6942 @kindex C-M-p (Summary)
6943 @itemx M-up
6944 @kindex M-up (Summary)
6945 @findex gnus-summary-prev-thread
6946 Go to the previous thread (@code{gnus-summary-prev-thread}).
6947
6948 @item T d
6949 @kindex T d (Summary)
6950 @findex gnus-summary-down-thread
6951 Descend the thread (@code{gnus-summary-down-thread}).
6952
6953 @item T u
6954 @kindex T u (Summary)
6955 @findex gnus-summary-up-thread
6956 Ascend the thread (@code{gnus-summary-up-thread}).
6957
6958 @item T o
6959 @kindex T o (Summary)
6960 @findex gnus-summary-top-thread
6961 Go to the top of the thread (@code{gnus-summary-top-thread}).
6962 @end table
6963
6964 @vindex gnus-thread-operation-ignore-subject
6965 If you ignore subject while threading, you'll naturally end up with
6966 threads that have several different subjects in them.  If you then issue
6967 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
6968 wish to kill the entire thread, but just those parts of the thread that
6969 have the same subject as the current article.  If you like this idea,
6970 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
6971 is non-@code{nil} (which it is by default), subjects will be ignored
6972 when doing thread commands.  If this variable is @code{nil}, articles in
6973 the same thread with different subjects will not be included in the
6974 operation in question.  If this variable is @code{fuzzy}, only articles
6975 that have subjects fuzzily equal will be included (@pxref{Fuzzy
6976 Matching}).
6977
6978
6979 @node Sorting the Summary Buffer
6980 @section Sorting the Summary Buffer
6981
6982 @findex gnus-thread-sort-by-total-score
6983 @findex gnus-thread-sort-by-date
6984 @findex gnus-thread-sort-by-score
6985 @findex gnus-thread-sort-by-subject
6986 @findex gnus-thread-sort-by-author
6987 @findex gnus-thread-sort-by-number
6988 @findex gnus-thread-sort-by-random
6989 @vindex gnus-thread-sort-functions
6990 @findex gnus-thread-sort-by-most-recent-number
6991 @findex gnus-thread-sort-by-most-recent-date
6992 If you are using a threaded summary display, you can sort the threads by
6993 setting @code{gnus-thread-sort-functions}, which can be either a single
6994 function, a list of functions, or a list containing functions and
6995 @code{(not some-function)} elements.
6996
6997 By default, sorting is done on article numbers.  Ready-made sorting
6998 predicate functions include @code{gnus-thread-sort-by-number},
6999 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-subject},
7000 @code{gnus-thread-sort-by-date}, @code{gnus-thread-sort-by-score},
7001 @code{gnus-thread-sort-by-most-recent-number},
7002 @code{gnus-thread-sort-by-most-recent-date},
7003 @code{gnus-thread-sort-by-random} and
7004 @code{gnus-thread-sort-by-total-score}.
7005
7006 Each function takes two threads and returns non-@code{nil} if the first
7007 thread should be sorted before the other.  Note that sorting really is
7008 normally done by looking only at the roots of each thread.
7009
7010 If you use more than one function, the primary sort key should be the
7011 last function in the list.  You should probably always include
7012 @code{gnus-thread-sort-by-number} in the list of sorting
7013 functions---preferably first.  This will ensure that threads that are
7014 equal with respect to the other sort criteria will be displayed in
7015 ascending article order.
7016
7017 If you would like to sort by reverse score, then by subject, and finally
7018 by number, you could do something like:
7019
7020 @lisp
7021 (setq gnus-thread-sort-functions
7022       '(gnus-thread-sort-by-number
7023         gnus-thread-sort-by-subject
7024         (not gnus-thread-sort-by-total-score)))
7025 @end lisp
7026
7027 The threads that have highest score will be displayed first in the
7028 summary buffer.  When threads have the same score, they will be sorted
7029 alphabetically.  The threads that have the same score and the same
7030 subject will be sorted by number, which is (normally) the sequence in
7031 which the articles arrived.
7032
7033 If you want to sort by score and then reverse arrival order, you could
7034 say something like:
7035
7036 @lisp
7037 (setq gnus-thread-sort-functions
7038       '((lambda (t1 t2)
7039           (not (gnus-thread-sort-by-number t1 t2)))
7040         gnus-thread-sort-by-score))
7041 @end lisp
7042
7043 @vindex gnus-thread-score-function
7044 The function in the @code{gnus-thread-score-function} variable (default
7045 @code{+}) is used for calculating the total score of a thread.  Useful
7046 functions might be @code{max}, @code{min}, or squared means, or whatever
7047 tickles your fancy.
7048
7049 @findex gnus-article-sort-functions
7050 @findex gnus-article-sort-by-date
7051 @findex gnus-article-sort-by-score
7052 @findex gnus-article-sort-by-subject
7053 @findex gnus-article-sort-by-author
7054 @findex gnus-article-sort-by-random
7055 @findex gnus-article-sort-by-number
7056 If you are using an unthreaded display for some strange reason or
7057 other, you have to fiddle with the @code{gnus-article-sort-functions}
7058 variable.  It is very similar to the
7059 @code{gnus-thread-sort-functions}, except that it uses slightly
7060 different functions for article comparison.  Available sorting
7061 predicate functions are @code{gnus-article-sort-by-number},
7062 @code{gnus-article-sort-by-author},
7063 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
7064 @code{gnus-article-sort-by-random}, and
7065 @code{gnus-article-sort-by-score}.
7066
7067 If you want to sort an unthreaded summary display by subject, you could
7068 say something like:
7069
7070 @lisp
7071 (setq gnus-article-sort-functions
7072       '(gnus-article-sort-by-number
7073         gnus-article-sort-by-subject))
7074 @end lisp
7075
7076
7077
7078 @node Asynchronous Fetching
7079 @section Asynchronous Article Fetching
7080 @cindex asynchronous article fetching
7081 @cindex article pre-fetch
7082 @cindex pre-fetch
7083
7084 If you read your news from an @acronym{NNTP} server that's far away, the
7085 network latencies may make reading articles a chore.  You have to wait
7086 for a while after pressing @kbd{n} to go to the next article before the
7087 article appears.  Why can't Gnus just go ahead and fetch the article
7088 while you are reading the previous one?  Why not, indeed.
7089
7090 First, some caveats.  There are some pitfalls to using asynchronous
7091 article fetching, especially the way Gnus does it.
7092
7093 Let's say you are reading article 1, which is short, and article 2 is
7094 quite long, and you are not interested in reading that.  Gnus does not
7095 know this, so it goes ahead and fetches article 2.  You decide to read
7096 article 3, but since Gnus is in the process of fetching article 2, the
7097 connection is blocked.
7098
7099 To avoid these situations, Gnus will open two (count 'em two)
7100 connections to the server.  Some people may think this isn't a very nice
7101 thing to do, but I don't see any real alternatives.  Setting up that
7102 extra connection takes some time, so Gnus startup will be slower.
7103
7104 Gnus will fetch more articles than you will read.  This will mean that
7105 the link between your machine and the @acronym{NNTP} server will become more
7106 loaded than if you didn't use article pre-fetch.  The server itself will
7107 also become more loaded---both with the extra article requests, and the
7108 extra connection.
7109
7110 Ok, so now you know that you shouldn't really use this thing@dots{} unless
7111 you really want to.
7112
7113 @vindex gnus-asynchronous
7114 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
7115 happen automatically.
7116
7117 @vindex gnus-use-article-prefetch
7118 You can control how many articles are to be pre-fetched by setting
7119 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
7120 that when you read an article in the group, the back end will pre-fetch
7121 the next 30 articles.  If this variable is @code{t}, the back end will
7122 pre-fetch all the articles it can without bound.  If it is
7123 @code{nil}, no pre-fetching will be done.
7124
7125 @vindex gnus-async-prefetch-article-p
7126 @findex gnus-async-read-p
7127 There are probably some articles that you don't want to pre-fetch---read
7128 articles, for instance.  The @code{gnus-async-prefetch-article-p}
7129 variable controls whether an article is to be pre-fetched.  This
7130 function should return non-@code{nil} when the article in question is
7131 to be pre-fetched.  The default is @code{gnus-async-read-p}, which
7132 returns @code{nil} on read articles.  The function is called with an
7133 article data structure as the only parameter.
7134
7135 If, for instance, you wish to pre-fetch only unread articles shorter
7136 than 100 lines, you could say something like:
7137
7138 @lisp
7139 (defun my-async-short-unread-p (data)
7140   "Return non-nil for short, unread articles."
7141   (and (gnus-data-unread-p data)
7142        (< (mail-header-lines (gnus-data-header data))
7143           100)))
7144
7145 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
7146 @end lisp
7147
7148 These functions will be called many, many times, so they should
7149 preferably be short and sweet to avoid slowing down Gnus too much.
7150 It's probably a good idea to byte-compile things like this.
7151
7152 @vindex gnus-prefetched-article-deletion-strategy
7153 Articles have to be removed from the asynch buffer sooner or later.  The
7154 @code{gnus-prefetched-article-deletion-strategy} says when to remove
7155 articles.  This is a list that may contain the following elements:
7156
7157 @table @code
7158 @item read
7159 Remove articles when they are read.
7160
7161 @item exit
7162 Remove articles when exiting the group.
7163 @end table
7164
7165 The default value is @code{(read exit)}.
7166
7167 @c @vindex gnus-use-header-prefetch
7168 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
7169 @c from the next group.
7170
7171
7172 @node Article Caching
7173 @section Article Caching
7174 @cindex article caching
7175 @cindex caching
7176
7177 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
7178 consider turning article caching on.  Each article will then be stored
7179 locally under your home directory.  As you may surmise, this could
7180 potentially use @emph{huge} amounts of disk space, as well as eat up all
7181 your inodes so fast it will make your head swim.  In vodka.
7182
7183 Used carefully, though, it could be just an easier way to save articles.
7184
7185 @vindex gnus-use-long-file-name
7186 @vindex gnus-cache-directory
7187 @vindex gnus-use-cache
7188 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
7189 all articles ticked or marked as dormant will then be copied
7190 over to your local cache (@code{gnus-cache-directory}).  Whether this
7191 cache is flat or hierarchical is controlled by the
7192 @code{gnus-use-long-file-name} variable, as usual.
7193
7194 When re-selecting a ticked or dormant article, it will be fetched from the
7195 cache instead of from the server.  As articles in your cache will never
7196 expire, this might serve as a method of saving articles while still
7197 keeping them where they belong.  Just mark all articles you want to save
7198 as dormant, and don't worry.
7199
7200 When an article is marked as read, is it removed from the cache.
7201
7202 @vindex gnus-cache-remove-articles
7203 @vindex gnus-cache-enter-articles
7204 The entering/removal of articles from the cache is controlled by the
7205 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
7206 variables.  Both are lists of symbols.  The first is @code{(ticked
7207 dormant)} by default, meaning that ticked and dormant articles will be
7208 put in the cache.  The latter is @code{(read)} by default, meaning that
7209 articles marked as read are removed from the cache.  Possibly
7210 symbols in these two lists are @code{ticked}, @code{dormant},
7211 @code{unread} and @code{read}.
7212
7213 @findex gnus-jog-cache
7214 So where does the massive article-fetching and storing come into the
7215 picture?  The @code{gnus-jog-cache} command will go through all
7216 subscribed newsgroups, request all unread articles, score them, and
7217 store them in the cache.  You should only ever, ever ever ever, use this
7218 command if 1) your connection to the @acronym{NNTP} server is really, really,
7219 really slow and 2) you have a really, really, really huge disk.
7220 Seriously.  One way to cut down on the number of articles downloaded is
7221 to score unwanted articles down and have them marked as read.  They will
7222 not then be downloaded by this command.
7223
7224 @vindex gnus-uncacheable-groups
7225 @vindex gnus-cacheable-groups
7226 It is likely that you do not want caching on all groups.  For instance,
7227 if your @code{nnml} mail is located under your home directory, it makes no
7228 sense to cache it somewhere else under your home directory.  Unless you
7229 feel that it's neat to use twice as much space.
7230
7231 To limit the caching, you could set @code{gnus-cacheable-groups} to a
7232 regexp of groups to cache, @samp{^nntp} for instance, or set the
7233 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
7234 Both variables are @code{nil} by default.  If a group matches both
7235 variables, the group is not cached.
7236
7237 @findex gnus-cache-generate-nov-databases
7238 @findex gnus-cache-generate-active
7239 @vindex gnus-cache-active-file
7240 The cache stores information on what articles it contains in its active
7241 file (@code{gnus-cache-active-file}).  If this file (or any other parts
7242 of the cache) becomes all messed up for some reason or other, Gnus
7243 offers two functions that will try to set things right.  @kbd{M-x
7244 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
7245 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
7246 file.
7247
7248 @findex gnus-cache-move-cache
7249 @code{gnus-cache-move-cache} will move your whole
7250 @code{gnus-cache-directory} to some other location.  You get asked to
7251 where, isn't that cool?
7252
7253 @node Persistent Articles
7254 @section Persistent Articles
7255 @cindex persistent articles
7256
7257 Closely related to article caching, we have @dfn{persistent articles}.
7258 In fact, it's just a different way of looking at caching, and much more
7259 useful in my opinion.
7260
7261 Say you're reading a newsgroup, and you happen on to some valuable gem
7262 that you want to keep and treasure forever.  You'd normally just save it
7263 (using one of the many saving commands) in some file.  The problem with
7264 that is that it's just, well, yucky.  Ideally you'd prefer just having
7265 the article remain in the group where you found it forever; untouched by
7266 the expiry going on at the news server.
7267
7268 This is what a @dfn{persistent article} is---an article that just won't
7269 be deleted.  It's implemented using the normal cache functions, but
7270 you use two explicit commands for managing persistent articles:
7271
7272 @table @kbd
7273
7274 @item *
7275 @kindex * (Summary)
7276 @findex gnus-cache-enter-article
7277 Make the current article persistent (@code{gnus-cache-enter-article}).
7278
7279 @item M-*
7280 @kindex M-* (Summary)
7281 @findex gnus-cache-remove-article
7282 Remove the current article from the persistent articles
7283 (@code{gnus-cache-remove-article}).  This will normally delete the
7284 article.
7285 @end table
7286
7287 Both these commands understand the process/prefix convention.
7288
7289 To avoid having all ticked articles (and stuff) entered into the cache,
7290 you should set @code{gnus-use-cache} to @code{passive} if you're just
7291 interested in persistent articles:
7292
7293 @lisp
7294 (setq gnus-use-cache 'passive)
7295 @end lisp
7296
7297
7298 @node Article Backlog
7299 @section Article Backlog
7300 @cindex backlog
7301 @cindex article backlog
7302
7303 If you have a slow connection, but the idea of using caching seems
7304 unappealing to you (and it is, really), you can help the situation some
7305 by switching on the @dfn{backlog}.  This is where Gnus will buffer
7306 already read articles so that it doesn't have to re-fetch articles
7307 you've already read.  This only helps if you are in the habit of
7308 re-selecting articles you've recently read, of course.  If you never do
7309 that, turning the backlog on will slow Gnus down a little bit, and
7310 increase memory usage some.
7311
7312 @vindex gnus-keep-backlog
7313 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
7314 at most @var{n} old articles in a buffer for later re-fetching.  If this
7315 variable is non-@code{nil} and is not a number, Gnus will store
7316 @emph{all} read articles, which means that your Emacs will grow without
7317 bound before exploding and taking your machine down with you.  I put
7318 that in there just to keep y'all on your toes.
7319
7320 The default value is 20.
7321
7322
7323 @node Saving Articles
7324 @section Saving Articles
7325 @cindex saving articles
7326
7327 Gnus can save articles in a number of ways.  Below is the documentation
7328 for saving articles in a fairly straight-forward fashion (i.e., little
7329 processing of the article is done before it is saved).  For a different
7330 approach (uudecoding, unsharing) you should use @code{gnus-uu}
7331 (@pxref{Decoding Articles}).
7332
7333 For the commands listed here, the target is a file.  If you want to
7334 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
7335 command (@pxref{Mail Group Commands}).
7336
7337 @vindex gnus-save-all-headers
7338 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
7339 unwanted headers before saving the article.
7340
7341 @vindex gnus-saved-headers
7342 If the preceding variable is @code{nil}, all headers that match the
7343 @code{gnus-saved-headers} regexp will be kept, while the rest will be
7344 deleted before saving.
7345
7346 @table @kbd
7347
7348 @item O o
7349 @itemx o
7350 @kindex O o (Summary)
7351 @kindex o (Summary)
7352 @findex gnus-summary-save-article
7353 @c @icon{gnus-summary-save-article}
7354 Save the current article using the default article saver
7355 (@code{gnus-summary-save-article}).
7356
7357 @item O m
7358 @kindex O m (Summary)
7359 @findex gnus-summary-save-article-mail
7360 Save the current article in mail format
7361 (@code{gnus-summary-save-article-mail}).
7362
7363 @item O r
7364 @kindex O r (Summary)
7365 @findex gnus-summary-save-article-rmail
7366 Save the current article in Rmail format
7367 (@code{gnus-summary-save-article-rmail}).
7368
7369 @item O f
7370 @kindex O f (Summary)
7371 @findex gnus-summary-save-article-file
7372 @c @icon{gnus-summary-save-article-file}
7373 Save the current article in plain file format
7374 (@code{gnus-summary-save-article-file}).
7375
7376 @item O F
7377 @kindex O F (Summary)
7378 @findex gnus-summary-write-article-file
7379 Write the current article in plain file format, overwriting any previous
7380 file contents (@code{gnus-summary-write-article-file}).
7381
7382 @item O b
7383 @kindex O b (Summary)
7384 @findex gnus-summary-save-article-body-file
7385 Save the current article body in plain file format
7386 (@code{gnus-summary-save-article-body-file}).
7387
7388 @item O h
7389 @kindex O h (Summary)
7390 @findex gnus-summary-save-article-folder
7391 Save the current article in mh folder format
7392 (@code{gnus-summary-save-article-folder}).
7393
7394 @item O v
7395 @kindex O v (Summary)
7396 @findex gnus-summary-save-article-vm
7397 Save the current article in a VM folder
7398 (@code{gnus-summary-save-article-vm}).
7399
7400 @item O p
7401 @itemx |
7402 @kindex O p (Summary)
7403 @kindex | (Summary)
7404 @findex gnus-summary-pipe-output
7405 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
7406 the current article to a process (@code{gnus-summary-pipe-output}).
7407 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
7408 complete headers in the piped output.
7409
7410 @item O P
7411 @kindex O P (Summary)
7412 @findex gnus-summary-muttprint
7413 @vindex gnus-summary-muttprint-program
7414 Save the current article into muttprint.  That is, print it using the
7415 external program @uref{http://muttprint.sourceforge.net/,
7416 Muttprint}.  The program name and options to use is controlled by the
7417 variable @code{gnus-summary-muttprint-program}.
7418 (@code{gnus-summary-muttprint}).
7419
7420 @end table
7421
7422 @vindex gnus-prompt-before-saving
7423 All these commands use the process/prefix convention
7424 (@pxref{Process/Prefix}).  If you save bunches of articles using these
7425 functions, you might get tired of being prompted for files to save each
7426 and every article in.  The prompting action is controlled by
7427 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
7428 default, giving you that excessive prompting action you know and
7429 loathe.  If you set this variable to @code{t} instead, you'll be prompted
7430 just once for each series of articles you save.  If you like to really
7431 have Gnus do all your thinking for you, you can even set this variable
7432 to @code{nil}, which means that you will never be prompted for files to
7433 save articles in.  Gnus will simply save all the articles in the default
7434 files.
7435
7436
7437 @vindex gnus-default-article-saver
7438 You can customize the @code{gnus-default-article-saver} variable to make
7439 Gnus do what you want it to.  You can use any of the six ready-made
7440 functions below, or you can create your own.
7441
7442 @table @code
7443
7444 @item gnus-summary-save-in-rmail
7445 @findex gnus-summary-save-in-rmail
7446 @vindex gnus-rmail-save-name
7447 @findex gnus-plain-save-name
7448 This is the default format, @dfn{Babyl}.  Uses the function in the
7449 @code{gnus-rmail-save-name} variable to get a file name to save the
7450 article in.  The default is @code{gnus-plain-save-name}.
7451
7452 @item gnus-summary-save-in-mail
7453 @findex gnus-summary-save-in-mail
7454 @vindex gnus-mail-save-name
7455 Save in a Unix mail (mbox) file.  Uses the function in the
7456 @code{gnus-mail-save-name} variable to get a file name to save the
7457 article in.  The default is @code{gnus-plain-save-name}.
7458
7459 @item gnus-summary-save-in-file
7460 @findex gnus-summary-save-in-file
7461 @vindex gnus-file-save-name
7462 @findex gnus-numeric-save-name
7463 Append the article straight to an ordinary file.  Uses the function in
7464 the @code{gnus-file-save-name} variable to get a file name to save the
7465 article in.  The default is @code{gnus-numeric-save-name}.
7466
7467 @item gnus-summary-write-to-file
7468 @findex gnus-summary-write-to-file
7469 Write the article straight to an ordinary file.  The file is
7470 overwritten if it exists.  Uses the function in the
7471 @code{gnus-file-save-name} variable to get a file name to save the
7472 article in.  The default is @code{gnus-numeric-save-name}.
7473
7474 @item gnus-summary-save-body-in-file
7475 @findex gnus-summary-save-body-in-file
7476 Append the article body to an ordinary file.  Uses the function in the
7477 @code{gnus-file-save-name} variable to get a file name to save the
7478 article in.  The default is @code{gnus-numeric-save-name}.
7479
7480 @item gnus-summary-save-in-folder
7481 @findex gnus-summary-save-in-folder
7482 @findex gnus-folder-save-name
7483 @findex gnus-Folder-save-name
7484 @vindex gnus-folder-save-name
7485 @cindex rcvstore
7486 @cindex MH folders
7487 Save the article to an MH folder using @code{rcvstore} from the MH
7488 library.  Uses the function in the @code{gnus-folder-save-name} variable
7489 to get a file name to save the article in.  The default is
7490 @code{gnus-folder-save-name}, but you can also use
7491 @code{gnus-Folder-save-name}, which creates capitalized names.
7492
7493 @item gnus-summary-save-in-vm
7494 @findex gnus-summary-save-in-vm
7495 Save the article in a VM folder.  You have to have the VM mail
7496 reader to use this setting.
7497 @end table
7498
7499 @vindex gnus-article-save-directory
7500 All of these functions, except for the last one, will save the article
7501 in the @code{gnus-article-save-directory}, which is initialized from the
7502 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
7503 default.
7504
7505 As you can see above, the functions use different functions to find a
7506 suitable name of a file to save the article in.  Below is a list of
7507 available functions that generate names:
7508
7509 @table @code
7510
7511 @item gnus-Numeric-save-name
7512 @findex gnus-Numeric-save-name
7513 File names like @file{~/News/Alt.andrea-dworkin/45}.
7514
7515 @item gnus-numeric-save-name
7516 @findex gnus-numeric-save-name
7517 File names like @file{~/News/alt.andrea-dworkin/45}.
7518
7519 @item gnus-Plain-save-name
7520 @findex gnus-Plain-save-name
7521 File names like @file{~/News/Alt.andrea-dworkin}.
7522
7523 @item gnus-plain-save-name
7524 @findex gnus-plain-save-name
7525 File names like @file{~/News/alt.andrea-dworkin}.
7526
7527 @item gnus-sender-save-name
7528 @findex gnus-sender-save-name
7529 File names like @file{~/News/larsi}.
7530 @end table
7531
7532 @vindex gnus-split-methods
7533 You can have Gnus suggest where to save articles by plonking a regexp into
7534 the @code{gnus-split-methods} alist.  For instance, if you would like to
7535 save articles related to Gnus in the file @file{gnus-stuff}, and articles
7536 related to VM in @file{vm-stuff}, you could set this variable to something
7537 like:
7538
7539 @lisp
7540 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
7541  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
7542  (my-choosing-function "../other-dir/my-stuff")
7543  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
7544 @end lisp
7545
7546 We see that this is a list where each element is a list that has two
7547 elements---the @dfn{match} and the @dfn{file}.  The match can either be
7548 a string (in which case it is used as a regexp to match on the article
7549 head); it can be a symbol (which will be called as a function with the
7550 group name as a parameter); or it can be a list (which will be
7551 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
7552 the @dfn{file} will be used as a default prompt.  In addition, the
7553 result of the operation itself will be used if the function or form
7554 called returns a string or a list of strings.
7555
7556 You basically end up with a list of file names that might be used when
7557 saving the current article.  (All ``matches'' will be used.)  You will
7558 then be prompted for what you really want to use as a name, with file
7559 name completion over the results from applying this variable.
7560
7561 This variable is @code{((gnus-article-archive-name))} by default, which
7562 means that Gnus will look at the articles it saves for an
7563 @code{Archive-name} line and use that as a suggestion for the file
7564 name.
7565
7566 Here's an example function to clean up file names somewhat.  If you have
7567 lots of mail groups called things like
7568 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
7569 these group names before creating the file name to save to.  The
7570 following will do just that:
7571
7572 @lisp
7573 (defun my-save-name (group)
7574   (when (string-match "^nnml:mail." group)
7575     (substring group (match-end 0))))
7576
7577 (setq gnus-split-methods
7578       '((gnus-article-archive-name)
7579         (my-save-name)))
7580 @end lisp
7581
7582
7583 @vindex gnus-use-long-file-name
7584 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
7585 @code{nil}, all the preceding functions will replace all periods
7586 (@samp{.}) in the group names with slashes (@samp{/})---which means that
7587 the functions will generate hierarchies of directories instead of having
7588 all the files in the top level directory
7589 (@file{~/News/alt/andrea-dworkin} instead of
7590 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
7591 on most systems.  However, for historical reasons, this is @code{nil} on
7592 Xenix and usg-unix-v machines by default.
7593
7594 This function also affects kill and score file names.  If this variable
7595 is a list, and the list contains the element @code{not-score}, long file
7596 names will not be used for score files, if it contains the element
7597 @code{not-save}, long file names will not be used for saving, and if it
7598 contains the element @code{not-kill}, long file names will not be used
7599 for kill files.
7600
7601 If you'd like to save articles in a hierarchy that looks something like
7602 a spool, you could
7603
7604 @lisp
7605 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
7606 (setq gnus-default-article-saver
7607       'gnus-summary-save-in-file)          ; @r{no encoding}
7608 @end lisp
7609
7610 Then just save with @kbd{o}.  You'd then read this hierarchy with
7611 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
7612 the top level directory as the argument (@file{~/News/}).  Then just walk
7613 around to the groups/directories with @code{nneething}.
7614
7615
7616 @node Decoding Articles
7617 @section Decoding Articles
7618 @cindex decoding articles
7619
7620 Sometime users post articles (or series of articles) that have been
7621 encoded in some way or other.  Gnus can decode them for you.
7622
7623 @menu
7624 * Uuencoded Articles::          Uudecode articles.
7625 * Shell Archives::              Unshar articles.
7626 * PostScript Files::            Split PostScript.
7627 * Other Files::                 Plain save and binhex.
7628 * Decoding Variables::          Variables for a happy decoding.
7629 * Viewing Files::               You want to look at the result of the decoding?
7630 @end menu
7631
7632 @cindex series
7633 @cindex article series
7634 All these functions use the process/prefix convention
7635 (@pxref{Process/Prefix}) for finding out what articles to work on, with
7636 the extension that a ``single article'' means ``a single series''.  Gnus
7637 can find out by itself what articles belong to a series, decode all the
7638 articles and unpack/view/save the resulting file(s).
7639
7640 Gnus guesses what articles are in the series according to the following
7641 simplish rule: The subjects must be (nearly) identical, except for the
7642 last two numbers of the line.  (Spaces are largely ignored, however.)
7643
7644 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
7645 will find all the articles that match the regexp @samp{^cat.gif
7646 ([0-9]+/[0-9]+).*$}.
7647
7648 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
7649 series}, will not be properly recognized by any of the automatic viewing
7650 commands, and you have to mark the articles manually with @kbd{#}.
7651
7652
7653 @node Uuencoded Articles
7654 @subsection Uuencoded Articles
7655 @cindex uudecode
7656 @cindex uuencoded articles
7657
7658 @table @kbd
7659
7660 @item X u
7661 @kindex X u (Summary)
7662 @findex gnus-uu-decode-uu
7663 @c @icon{gnus-uu-decode-uu}
7664 Uudecodes the current series (@code{gnus-uu-decode-uu}).
7665
7666 @item X U
7667 @kindex X U (Summary)
7668 @findex gnus-uu-decode-uu-and-save
7669 Uudecodes and saves the current series
7670 (@code{gnus-uu-decode-uu-and-save}).
7671
7672 @item X v u
7673 @kindex X v u (Summary)
7674 @findex gnus-uu-decode-uu-view
7675 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
7676
7677 @item X v U
7678 @kindex X v U (Summary)
7679 @findex gnus-uu-decode-uu-and-save-view
7680 Uudecodes, views and saves the current series
7681 (@code{gnus-uu-decode-uu-and-save-view}).
7682
7683 @end table
7684
7685 Remember that these all react to the presence of articles marked with
7686 the process mark.  If, for instance, you'd like to decode and save an
7687 entire newsgroup, you'd typically do @kbd{M P a}
7688 (@code{gnus-uu-mark-all}) and then @kbd{X U}
7689 (@code{gnus-uu-decode-uu-and-save}).
7690
7691 All this is very much different from how @code{gnus-uu} worked with
7692 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
7693 the sun.  This version of @code{gnus-uu} generally assumes that you mark
7694 articles in some way (@pxref{Setting Process Marks}) and then press
7695 @kbd{X u}.
7696
7697 @vindex gnus-uu-notify-files
7698 Note: When trying to decode articles that have names matching
7699 @code{gnus-uu-notify-files}, which is hard-coded to
7700 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
7701 automatically post an article on @samp{comp.unix.wizards} saying that
7702 you have just viewed the file in question.  This feature can't be turned
7703 off.
7704
7705
7706 @node Shell Archives
7707 @subsection Shell Archives
7708 @cindex unshar
7709 @cindex shell archives
7710 @cindex shared articles
7711
7712 Shell archives (``shar files'') used to be a popular way to distribute
7713 sources, but it isn't used all that much today.  In any case, we have
7714 some commands to deal with these:
7715
7716 @table @kbd
7717
7718 @item X s
7719 @kindex X s (Summary)
7720 @findex gnus-uu-decode-unshar
7721 Unshars the current series (@code{gnus-uu-decode-unshar}).
7722
7723 @item X S
7724 @kindex X S (Summary)
7725 @findex gnus-uu-decode-unshar-and-save
7726 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
7727
7728 @item X v s
7729 @kindex X v s (Summary)
7730 @findex gnus-uu-decode-unshar-view
7731 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
7732
7733 @item X v S
7734 @kindex X v S (Summary)
7735 @findex gnus-uu-decode-unshar-and-save-view
7736 Unshars, views and saves the current series
7737 (@code{gnus-uu-decode-unshar-and-save-view}).
7738 @end table
7739
7740
7741 @node PostScript Files
7742 @subsection PostScript Files
7743 @cindex PostScript
7744
7745 @table @kbd
7746
7747 @item X p
7748 @kindex X p (Summary)
7749 @findex gnus-uu-decode-postscript
7750 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
7751
7752 @item X P
7753 @kindex X P (Summary)
7754 @findex gnus-uu-decode-postscript-and-save
7755 Unpack and save the current PostScript series
7756 (@code{gnus-uu-decode-postscript-and-save}).
7757
7758 @item X v p
7759 @kindex X v p (Summary)
7760 @findex gnus-uu-decode-postscript-view
7761 View the current PostScript series
7762 (@code{gnus-uu-decode-postscript-view}).
7763
7764 @item X v P
7765 @kindex X v P (Summary)
7766 @findex gnus-uu-decode-postscript-and-save-view
7767 View and save the current PostScript series
7768 (@code{gnus-uu-decode-postscript-and-save-view}).
7769 @end table
7770
7771
7772 @node Other Files
7773 @subsection Other Files
7774
7775 @table @kbd
7776 @item X o
7777 @kindex X o (Summary)
7778 @findex gnus-uu-decode-save
7779 Save the current series
7780 (@code{gnus-uu-decode-save}).
7781
7782 @item X b
7783 @kindex X b (Summary)
7784 @findex gnus-uu-decode-binhex
7785 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
7786 doesn't really work yet.
7787 @end table
7788
7789
7790 @node Decoding Variables
7791 @subsection Decoding Variables
7792
7793 Adjective, not verb.
7794
7795 @menu
7796 * Rule Variables::              Variables that say how a file is to be viewed.
7797 * Other Decode Variables::      Other decode variables.
7798 * Uuencoding and Posting::      Variables for customizing uuencoding.
7799 @end menu
7800
7801
7802 @node Rule Variables
7803 @subsubsection Rule Variables
7804 @cindex rule variables
7805
7806 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
7807 variables are of the form
7808
7809 @lisp
7810       (list '(regexp1 command2)
7811             '(regexp2 command2)
7812             ...)
7813 @end lisp
7814
7815 @table @code
7816
7817 @item gnus-uu-user-view-rules
7818 @vindex gnus-uu-user-view-rules
7819 @cindex sox
7820 This variable is consulted first when viewing files.  If you wish to use,
7821 for instance, @code{sox} to convert an @file{.au} sound file, you could
7822 say something like:
7823 @lisp
7824 (setq gnus-uu-user-view-rules
7825       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
7826 @end lisp
7827
7828 @item gnus-uu-user-view-rules-end
7829 @vindex gnus-uu-user-view-rules-end
7830 This variable is consulted if Gnus couldn't make any matches from the
7831 user and default view rules.
7832
7833 @item gnus-uu-user-archive-rules
7834 @vindex gnus-uu-user-archive-rules
7835 This variable can be used to say what commands should be used to unpack
7836 archives.
7837 @end table
7838
7839
7840 @node Other Decode Variables
7841 @subsubsection Other Decode Variables
7842
7843 @table @code
7844 @vindex gnus-uu-grabbed-file-functions
7845
7846 @item gnus-uu-grabbed-file-functions
7847 All functions in this list will be called right after each file has been
7848 successfully decoded---so that you can move or view files right away,
7849 and don't have to wait for all files to be decoded before you can do
7850 anything.  Ready-made functions you can put in this list are:
7851
7852 @table @code
7853
7854 @item gnus-uu-grab-view
7855 @findex gnus-uu-grab-view
7856 View the file.
7857
7858 @item gnus-uu-grab-move
7859 @findex gnus-uu-grab-move
7860 Move the file (if you're using a saving function.)
7861 @end table
7862
7863 @item gnus-uu-be-dangerous
7864 @vindex gnus-uu-be-dangerous
7865 Specifies what to do if unusual situations arise during decoding.  If
7866 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
7867 that didn't work, and overwrite existing files.  Otherwise, ask each
7868 time.
7869
7870 @item gnus-uu-ignore-files-by-name
7871 @vindex gnus-uu-ignore-files-by-name
7872 Files with name matching this regular expression won't be viewed.
7873
7874 @item gnus-uu-ignore-files-by-type
7875 @vindex gnus-uu-ignore-files-by-type
7876 Files with a @acronym{MIME} type matching this variable won't be viewed.
7877 Note that Gnus tries to guess what type the file is based on the name.
7878 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
7879 kludgey.
7880
7881 @item gnus-uu-tmp-dir
7882 @vindex gnus-uu-tmp-dir
7883 Where @code{gnus-uu} does its work.
7884
7885 @item gnus-uu-do-not-unpack-archives
7886 @vindex gnus-uu-do-not-unpack-archives
7887 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
7888 looking for files to display.
7889
7890 @item gnus-uu-view-and-save
7891 @vindex gnus-uu-view-and-save
7892 Non-@code{nil} means that the user will always be asked to save a file
7893 after viewing it.
7894
7895 @item gnus-uu-ignore-default-view-rules
7896 @vindex gnus-uu-ignore-default-view-rules
7897 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
7898 rules.
7899
7900 @item gnus-uu-ignore-default-archive-rules
7901 @vindex gnus-uu-ignore-default-archive-rules
7902 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
7903 unpacking commands.
7904
7905 @item gnus-uu-kill-carriage-return
7906 @vindex gnus-uu-kill-carriage-return
7907 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
7908 from articles.
7909
7910 @item gnus-uu-unmark-articles-not-decoded
7911 @vindex gnus-uu-unmark-articles-not-decoded
7912 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
7913 decoded articles as unread.
7914
7915 @item gnus-uu-correct-stripped-uucode
7916 @vindex gnus-uu-correct-stripped-uucode
7917 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
7918 uuencoded files that have had trailing spaces deleted.
7919
7920 @item gnus-uu-pre-uudecode-hook
7921 @vindex gnus-uu-pre-uudecode-hook
7922 Hook run before sending a message to @code{uudecode}.
7923
7924 @item gnus-uu-view-with-metamail
7925 @vindex gnus-uu-view-with-metamail
7926 @cindex metamail
7927 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
7928 commands defined by the rule variables and just fudge a @acronym{MIME}
7929 content type based on the file name.  The result will be fed to
7930 @code{metamail} for viewing.
7931
7932 @item gnus-uu-save-in-digest
7933 @vindex gnus-uu-save-in-digest
7934 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
7935 decoding, will save in digests.  If this variable is @code{nil},
7936 @code{gnus-uu} will just save everything in a file without any
7937 embellishments.  The digesting almost conforms to RFC 1153---no easy way
7938 to specify any meaningful volume and issue numbers were found, so I
7939 simply dropped them.
7940
7941 @end table
7942
7943
7944 @node Uuencoding and Posting
7945 @subsubsection Uuencoding and Posting
7946
7947 @table @code
7948
7949 @item gnus-uu-post-include-before-composing
7950 @vindex gnus-uu-post-include-before-composing
7951 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
7952 before you compose the article.  If this variable is @code{t}, you can
7953 either include an encoded file with @kbd{C-c C-i} or have one included
7954 for you when you post the article.
7955
7956 @item gnus-uu-post-length
7957 @vindex gnus-uu-post-length
7958 Maximum length of an article.  The encoded file will be split into how
7959 many articles it takes to post the entire file.
7960
7961 @item gnus-uu-post-threaded
7962 @vindex gnus-uu-post-threaded
7963 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
7964 thread.  This may not be smart, as no other decoder I have seen is able
7965 to follow threads when collecting uuencoded articles.  (Well, I have
7966 seen one package that does that---@code{gnus-uu}, but somehow, I don't
7967 think that counts@dots{}) Default is @code{nil}.
7968
7969 @item gnus-uu-post-separate-description
7970 @vindex gnus-uu-post-separate-description
7971 Non-@code{nil} means that the description will be posted in a separate
7972 article.  The first article will typically be numbered (0/x).  If this
7973 variable is @code{nil}, the description the user enters will be included
7974 at the beginning of the first article, which will be numbered (1/x).
7975 Default is @code{t}.
7976
7977 @end table
7978
7979
7980 @node Viewing Files
7981 @subsection Viewing Files
7982 @cindex viewing files
7983 @cindex pseudo-articles
7984
7985 After decoding, if the file is some sort of archive, Gnus will attempt
7986 to unpack the archive and see if any of the files in the archive can be
7987 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
7988 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
7989 uncompress and de-tar the main file, and then view the two pictures.
7990 This unpacking process is recursive, so if the archive contains archives
7991 of archives, it'll all be unpacked.
7992
7993 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
7994 extracted file into the summary buffer.  If you go to these
7995 ``articles'', you will be prompted for a command to run (usually Gnus
7996 will make a suggestion), and then the command will be run.
7997
7998 @vindex gnus-view-pseudo-asynchronously
7999 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
8000 until the viewing is done before proceeding.
8001
8002 @vindex gnus-view-pseudos
8003 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
8004 the pseudo-articles into the summary buffer, but view them
8005 immediately.  If this variable is @code{not-confirm}, the user won't even
8006 be asked for a confirmation before viewing is done.
8007
8008 @vindex gnus-view-pseudos-separately
8009 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
8010 pseudo-article will be created for each file to be viewed.  If
8011 @code{nil}, all files that use the same viewing command will be given as
8012 a list of parameters to that command.
8013
8014 @vindex gnus-insert-pseudo-articles
8015 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
8016 pseudo-articles when decoding.  It is @code{t} by default.
8017
8018 So; there you are, reading your @emph{pseudo-articles} in your
8019 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
8020 Why isn't anything real anymore? How did we get here?
8021
8022
8023 @node Article Treatment
8024 @section Article Treatment
8025
8026 Reading through this huge manual, you may have quite forgotten that the
8027 object of newsreaders is to actually, like, read what people have
8028 written.  Reading articles.  Unfortunately, people are quite bad at
8029 writing, so there are tons of functions and variables to make reading
8030 these articles easier.
8031
8032 @menu
8033 * Article Highlighting::        You want to make the article look like fruit salad.
8034 * Article Fontisizing::         Making emphasized text look nice.
8035 * Article Hiding::              You also want to make certain info go away.
8036 * Article Washing::             Lots of way-neat functions to make life better.
8037 * Article Header::              Doing various header transformations.
8038 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
8039 * Article Button Levels::       Controlling appearance of buttons.
8040 * Article Date::                Grumble, UT!
8041 * Article Display::             Display various stuff---X-Face, Picons, Smileys
8042 * Article Signature::           What is a signature?
8043 * Article Miscellanea::         Various other stuff.
8044 @end menu
8045
8046
8047 @node Article Highlighting
8048 @subsection Article Highlighting
8049 @cindex highlighting
8050
8051 Not only do you want your article buffer to look like fruit salad, but
8052 you want it to look like technicolor fruit salad.
8053
8054 @table @kbd
8055
8056 @item W H a
8057 @kindex W H a (Summary)
8058 @findex gnus-article-highlight
8059 @findex gnus-article-maybe-highlight
8060 Do much highlighting of the current article
8061 (@code{gnus-article-highlight}).  This function highlights header, cited
8062 text, the signature, and adds buttons to the body and the head.
8063
8064 @item W H h
8065 @kindex W H h (Summary)
8066 @findex gnus-article-highlight-headers
8067 @vindex gnus-header-face-alist
8068 Highlight the headers (@code{gnus-article-highlight-headers}).  The
8069 highlighting will be done according to the @code{gnus-header-face-alist}
8070 variable, which is a list where each element has the form
8071 @code{(@var{regexp} @var{name} @var{content})}.
8072 @var{regexp} is a regular expression for matching the
8073 header, @var{name} is the face used for highlighting the header name
8074 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
8075 the header value.  The first match made will be used.  Note that
8076 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
8077
8078 @item W H c
8079 @kindex W H c (Summary)
8080 @findex gnus-article-highlight-citation
8081 Highlight cited text (@code{gnus-article-highlight-citation}).
8082
8083 Some variables to customize the citation highlights:
8084
8085 @table @code
8086 @vindex gnus-cite-parse-max-size
8087
8088 @item gnus-cite-parse-max-size
8089 If the article size if bigger than this variable (which is 25000 by
8090 default), no citation highlighting will be performed.
8091
8092 @item gnus-cite-max-prefix
8093 @vindex gnus-cite-max-prefix
8094 Maximum possible length for a citation prefix (default 20).
8095
8096 @item gnus-cite-face-list
8097 @vindex gnus-cite-face-list
8098 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
8099 When there are citations from multiple articles in the same message,
8100 Gnus will try to give each citation from each article its own face.
8101 This should make it easier to see who wrote what.
8102
8103 @item gnus-supercite-regexp
8104 @vindex gnus-supercite-regexp
8105 Regexp matching normal Supercite attribution lines.
8106
8107 @item gnus-supercite-secondary-regexp
8108 @vindex gnus-supercite-secondary-regexp
8109 Regexp matching mangled Supercite attribution lines.
8110
8111 @item gnus-cite-minimum-match-count
8112 @vindex gnus-cite-minimum-match-count
8113 Minimum number of identical prefixes we have to see before we believe
8114 that it's a citation.
8115
8116 @item gnus-cite-attribution-prefix
8117 @vindex gnus-cite-attribution-prefix
8118 Regexp matching the beginning of an attribution line.
8119
8120 @item gnus-cite-attribution-suffix
8121 @vindex gnus-cite-attribution-suffix
8122 Regexp matching the end of an attribution line.
8123
8124 @item gnus-cite-attribution-face
8125 @vindex gnus-cite-attribution-face
8126 Face used for attribution lines.  It is merged with the face for the
8127 cited text belonging to the attribution.
8128
8129 @end table
8130
8131
8132 @item W H s
8133 @kindex W H s (Summary)
8134 @vindex gnus-signature-separator
8135 @vindex gnus-signature-face
8136 @findex gnus-article-highlight-signature
8137 Highlight the signature (@code{gnus-article-highlight-signature}).
8138 Everything after @code{gnus-signature-separator} (@pxref{Article
8139 Signature}) in an article will be considered a signature and will be
8140 highlighted with @code{gnus-signature-face}, which is @code{italic} by
8141 default.
8142
8143 @end table
8144
8145 @xref{Customizing Articles}, for how to highlight articles automatically.
8146
8147
8148 @node Article Fontisizing
8149 @subsection Article Fontisizing
8150 @cindex emphasis
8151 @cindex article emphasis
8152
8153 @findex gnus-article-emphasize
8154 @kindex W e (Summary)
8155 People commonly add emphasis to words in news articles by writing things
8156 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
8157 this look nicer by running the article through the @kbd{W e}
8158 (@code{gnus-article-emphasize}) command.
8159
8160 @vindex gnus-emphasis-alist
8161 How the emphasis is computed is controlled by the
8162 @code{gnus-emphasis-alist} variable.  This is an alist where the first
8163 element is a regular expression to be matched.  The second is a number
8164 that says what regular expression grouping is used to find the entire
8165 emphasized word.  The third is a number that says what regexp grouping
8166 should be displayed and highlighted.  (The text between these two
8167 groupings will be hidden.)  The fourth is the face used for
8168 highlighting.
8169
8170 @lisp
8171 (setq gnus-emphasis-alist
8172       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
8173         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
8174 @end lisp
8175
8176 @cindex slash
8177 @cindex asterisk
8178 @cindex underline
8179 @cindex /
8180 @cindex *
8181
8182 @vindex gnus-emphasis-underline
8183 @vindex gnus-emphasis-bold
8184 @vindex gnus-emphasis-italic
8185 @vindex gnus-emphasis-underline-bold
8186 @vindex gnus-emphasis-underline-italic
8187 @vindex gnus-emphasis-bold-italic
8188 @vindex gnus-emphasis-underline-bold-italic
8189 By default, there are seven rules, and they use the following faces:
8190 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
8191 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
8192 @code{gnus-emphasis-underline-italic},
8193 @code{gnus-emphasis-underline-bold}, and
8194 @code{gnus-emphasis-underline-bold-italic}.
8195
8196 If you want to change these faces, you can either use @kbd{M-x
8197 customize}, or you can use @code{copy-face}.  For instance, if you want
8198 to make @code{gnus-emphasis-italic} use a red face instead, you could
8199 say something like:
8200
8201 @lisp
8202 (copy-face 'red 'gnus-emphasis-italic)
8203 @end lisp
8204
8205 @vindex gnus-group-highlight-words-alist
8206
8207 If you want to highlight arbitrary words, you can use the
8208 @code{gnus-group-highlight-words-alist} variable, which uses the same
8209 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
8210 parameter (@pxref{Group Parameters}) can also be used.
8211
8212 @xref{Customizing Articles}, for how to fontize articles automatically.
8213
8214
8215 @node Article Hiding
8216 @subsection Article Hiding
8217 @cindex article hiding
8218
8219 Or rather, hiding certain things in each article.  There usually is much
8220 too much cruft in most articles.
8221
8222 @table @kbd
8223
8224 @item W W a
8225 @kindex W W a (Summary)
8226 @findex gnus-article-hide
8227 Do quite a lot of hiding on the article buffer
8228 (@kbd{gnus-article-hide}).  In particular, this function will hide
8229 headers, @acronym{PGP}, cited text and the signature.
8230
8231 @item W W h
8232 @kindex W W h (Summary)
8233 @findex gnus-article-hide-headers
8234 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
8235 Headers}.
8236
8237 @item W W b
8238 @kindex W W b (Summary)
8239 @findex gnus-article-hide-boring-headers
8240 Hide headers that aren't particularly interesting
8241 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
8242
8243 @item W W s
8244 @kindex W W s (Summary)
8245 @findex gnus-article-hide-signature
8246 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
8247 Signature}.
8248
8249 @item W W l
8250 @kindex W W l (Summary)
8251 @findex gnus-article-hide-list-identifiers
8252 @vindex gnus-list-identifiers
8253 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
8254 are strings some mailing list servers add to the beginning of all
8255 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
8256 @samp{Re: } is skipped before stripping.  @code{gnus-list-identifiers}
8257 may not contain @code{\\(..\\)}.
8258
8259 @table @code
8260
8261 @item gnus-list-identifiers
8262 @vindex gnus-list-identifiers
8263 A regular expression that matches list identifiers to be removed from
8264 subject.  This can also be a list of regular expressions.
8265
8266 @end table
8267
8268 @item W W P
8269 @kindex W W P (Summary)
8270 @findex gnus-article-hide-pem
8271 Hide @acronym{PEM} (privacy enhanced messages) cruft
8272 (@code{gnus-article-hide-pem}).
8273
8274 @item W W B
8275 @kindex W W B (Summary)
8276 @findex gnus-article-strip-banner
8277 @vindex gnus-article-banner-alist
8278 @vindex gnus-article-address-banner-alist
8279 @cindex banner
8280 @cindex OneList
8281 @cindex stripping advertisements
8282 @cindex advertisements
8283 Strip the banner specified by the @code{banner} group parameter
8284 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
8285 annoying banners and/or signatures that some mailing lists and moderated
8286 groups adds to all the messages.  The way to use this function is to add
8287 the @code{banner} group parameter (@pxref{Group Parameters}) to the
8288 group you want banners stripped from.  The parameter either be a string,
8289 which will be interpreted as a regular expression matching text to be
8290 removed, or the symbol @code{signature}, meaning that the (last)
8291 signature should be removed, or other symbol, meaning that the
8292 corresponding regular expression in @code{gnus-article-banner-alist} is
8293 used.
8294
8295 Regardless of a group, you can hide things like advertisements only when
8296 the sender of an article has a certain mail address specified in
8297 @code{gnus-article-address-banner-alist}.
8298
8299 @table @code
8300
8301 @item gnus-article-address-banner-alist
8302 @vindex gnus-article-address-banner-alist
8303 Alist of mail addresses and banners.  Each element has the form
8304 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
8305 matching a mail address in the From header, @var{banner} is one of a
8306 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
8307 a regexp and @code{nil}.  If @var{address} matches author's mail
8308 address, it will remove things like advertisements.  For example, if a
8309 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
8310 banner something like @samp{Do You Yoo-hoo!?} in all articles he
8311 sends, you can use the following element to remove them:
8312
8313 @lisp
8314 ("@@yoo-hoo\\.co\\.jp\\'" .
8315  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
8316 @end lisp
8317
8318 @end table
8319
8320 @item W W c
8321 @kindex W W c (Summary)
8322 @findex gnus-article-hide-citation
8323 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
8324 customizing the hiding:
8325
8326 @table @code
8327
8328 @item gnus-cited-opened-text-button-line-format
8329 @itemx gnus-cited-closed-text-button-line-format
8330 @vindex gnus-cited-closed-text-button-line-format
8331 @vindex gnus-cited-opened-text-button-line-format
8332 Gnus adds buttons to show where the cited text has been hidden, and to
8333 allow toggle hiding the text.  The format of the variable is specified
8334 by these format-like variable (@pxref{Formatting Variables}).  These
8335 specs are valid:
8336
8337 @table @samp
8338 @item b
8339 Starting point of the hidden text.
8340 @item e
8341 Ending point of the hidden text.
8342 @item l
8343 Number of characters in the hidden region.
8344 @item n
8345 Number of lines of hidden text.
8346 @end table
8347
8348 @item gnus-cited-lines-visible
8349 @vindex gnus-cited-lines-visible
8350 The number of lines at the beginning of the cited text to leave
8351 shown.  This can also be a cons cell with the number of lines at the top
8352 and bottom of the text, respectively, to remain visible.
8353
8354 @end table
8355
8356 @item W W C-c
8357 @kindex W W C-c (Summary)
8358 @findex gnus-article-hide-citation-maybe
8359
8360 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
8361 following two variables:
8362
8363 @table @code
8364 @item gnus-cite-hide-percentage
8365 @vindex gnus-cite-hide-percentage
8366 If the cited text is of a bigger percentage than this variable (default
8367 50), hide the cited text.
8368
8369 @item gnus-cite-hide-absolute
8370 @vindex gnus-cite-hide-absolute
8371 The cited text must have at least this length (default 10) before it
8372 is hidden.
8373 @end table
8374
8375 @item W W C
8376 @kindex W W C (Summary)
8377 @findex gnus-article-hide-citation-in-followups
8378 Hide cited text in articles that aren't roots
8379 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
8380 useful as an interactive command, but might be a handy function to stick
8381 have happen automatically (@pxref{Customizing Articles}).
8382
8383 @end table
8384
8385 All these ``hiding'' commands are toggles, but if you give a negative
8386 prefix to these commands, they will show what they have previously
8387 hidden.  If you give a positive prefix, they will always hide.
8388
8389 Also @pxref{Article Highlighting} for further variables for
8390 citation customization.
8391
8392 @xref{Customizing Articles}, for how to hide article elements
8393 automatically.
8394
8395
8396 @node Article Washing
8397 @subsection Article Washing
8398 @cindex washing
8399 @cindex article washing
8400
8401 We call this ``article washing'' for a really good reason.  Namely, the
8402 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
8403
8404 @dfn{Washing} is defined by us as ``changing something from something to
8405 something else'', but normally results in something looking better.
8406 Cleaner, perhaps.
8407
8408 @xref{Customizing Articles}, if you want to change how Gnus displays
8409 articles by default.
8410
8411 @table @kbd
8412
8413 @item C-u g
8414 This is not really washing, it's sort of the opposite of washing.  If
8415 you type this, you see the article exactly as it exists on disk or on
8416 the server.
8417
8418 @item g
8419 Force redisplaying of the current article
8420 (@code{gnus-summary-show-article}).  This is also not really washing.
8421 If you type this, you see the article without any previously applied
8422 interactive Washing functions but with all default treatments
8423 (@pxref{Customizing Articles}).
8424
8425 @item W l
8426 @kindex W l (Summary)
8427 @findex gnus-summary-stop-page-breaking
8428 Remove page breaks from the current article
8429 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
8430 delimiters.
8431
8432 @item W r
8433 @kindex W r (Summary)
8434 @findex gnus-summary-caesar-message
8435 @c @icon{gnus-summary-caesar-message}
8436 Do a Caesar rotate (rot13) on the article buffer
8437 (@code{gnus-summary-caesar-message}).
8438 Unreadable articles that tell you to read them with Caesar rotate or rot13.
8439 (Typically offensive jokes and such.)
8440
8441 It's commonly called ``rot13'' because each letter is rotated 13
8442 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
8443 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
8444 is rumored to have employed this form of, uh, somewhat weak encryption.
8445
8446 @item W m
8447 @kindex W m (Summary)
8448 @findex gnus-summary-morse-message
8449 Morse decode the article buffer (@code{gnus-summary-morse-message}).
8450
8451 @item W t
8452 @item t
8453 @kindex W t (Summary)
8454 @kindex t (Summary)
8455 @findex gnus-summary-toggle-header
8456 Toggle whether to display all headers in the article buffer
8457 (@code{gnus-summary-toggle-header}).
8458
8459 @item W v
8460 @kindex W v (Summary)
8461 @findex gnus-summary-verbose-headers
8462 Toggle whether to display all headers in the article buffer permanently
8463 (@code{gnus-summary-verbose-headers}).
8464
8465 @item W o
8466 @kindex W o (Summary)
8467 @findex gnus-article-treat-overstrike
8468 Treat overstrike (@code{gnus-article-treat-overstrike}).
8469
8470 @item W d
8471 @kindex W d (Summary)
8472 @findex gnus-article-treat-dumbquotes
8473 @vindex gnus-article-dumbquotes-map
8474 @cindex Smartquotes
8475 @cindex M****s*** sm*rtq**t*s
8476 @cindex Latin 1
8477 Treat M****s*** sm*rtq**t*s according to
8478 @code{gnus-article-dumbquotes-map}
8479 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
8480 whether a character is a sm*rtq**t* or not, so it should only be used
8481 interactively.
8482
8483 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
8484 an attempt to provide more quoting characters.  If you see something
8485 like @code{\222} or @code{\264} where you're expecting some kind of
8486 apostrophe or quotation mark, then try this wash.
8487
8488 @item W Y f
8489 @kindex W Y f (Summary)
8490 @findex gnus-article-outlook-deuglify-article
8491 @cindex Outlook Express
8492 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
8493 unwrap lines, repair attribution and rearrange citation.
8494 (@code{gnus-article-outlook-deuglify-article}).
8495
8496 @item W Y u
8497 @kindex W Y u (Summary)
8498 @findex gnus-article-outlook-unwrap-lines
8499 @vindex gnus-outlook-deuglify-unwrap-min
8500 @vindex gnus-outlook-deuglify-unwrap-max
8501 Unwrap lines that appear to be wrapped citation lines.  You can control
8502 what lines will be unwrapped by frobbing
8503 @code{gnus-outlook-deuglify-unwrap-min} and
8504 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
8505 maximum length of an unwrapped citation line.
8506 (@code{gnus-article-outlook-unwrap-lines}).
8507
8508 @item W Y a
8509 @kindex W Y a (Summary)
8510 @findex gnus-article-outlook-repair-attribution
8511 Repair a broken attribution line.@*
8512 (@code{gnus-article-outlook-repair-attribution}).
8513
8514 @item W Y c
8515 @kindex W Y c (Summary)
8516 @findex gnus-article-outlook-rearrange-citation
8517 Repair broken citations by rearranging the text.
8518 (@code{gnus-article-outlook-rearrange-citation}).
8519
8520 @item W w
8521 @kindex W w (Summary)
8522 @findex gnus-article-fill-cited-article
8523 Do word wrap (@code{gnus-article-fill-cited-article}).
8524
8525 You can give the command a numerical prefix to specify the width to use
8526 when filling.
8527
8528 @item W Q
8529 @kindex W Q (Summary)
8530 @findex gnus-article-fill-long-lines
8531 Fill long lines (@code{gnus-article-fill-long-lines}).
8532
8533 @item W C
8534 @kindex W C (Summary)
8535 @findex gnus-article-capitalize-sentences
8536 Capitalize the first word in each sentence
8537 (@code{gnus-article-capitalize-sentences}).
8538
8539 @item W c
8540 @kindex W c (Summary)
8541 @findex gnus-article-remove-cr
8542 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
8543 (this takes care of DOS line endings), and then translate any remaining
8544 CRs into LF (this takes care of Mac line endings)
8545 (@code{gnus-article-remove-cr}).
8546
8547 @item W q
8548 @kindex W q (Summary)
8549 @findex gnus-article-de-quoted-unreadable
8550 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
8551 Quoted-Printable is one common @acronym{MIME} encoding employed when
8552 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
8553 makes strings like @samp{déjà vu} look like @samp{d=E9j=E0 vu}, which
8554 doesn't look very readable to me.  Note that this is usually done
8555 automatically by Gnus if the message in question has a
8556 @code{Content-Transfer-Encoding} header that says that this encoding
8557 has been done.  If a prefix is given, a charset will be asked for.
8558
8559 @item W 6
8560 @kindex W 6 (Summary)
8561 @findex gnus-article-de-base64-unreadable
8562 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
8563 one common @acronym{MIME} encoding employed when sending
8564 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
8565 usually done automatically by Gnus if the message in question has a
8566 @code{Content-Transfer-Encoding} header that says that this encoding
8567 has been done.  If a prefix is given, a charset will be asked for.
8568
8569 @item W Z
8570 @kindex W Z (Summary)
8571 @findex gnus-article-decode-HZ
8572 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
8573 common encoding employed when sending Chinese articles.  It typically
8574 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
8575
8576 @item W A
8577 @kindex W A (Summary)
8578 @findex gnus-article-treat-ansi-sequences
8579 Translate ANSI SGR control sequences into overlays or extents
8580 (@code{gnus-article-treat-ansi-sequences}).  ANSI sequences are used in
8581 some Chinese hierarchies for highlighting.
8582
8583 @item W u
8584 @kindex W u (Summary)
8585 @findex gnus-article-unsplit-urls
8586 Remove newlines from within URLs.  Some mailers insert newlines into
8587 outgoing email messages to keep lines short.  This reformatting can
8588 split long URLs onto multiple lines.  Repair those URLs by removing
8589 the newlines (@code{gnus-article-unsplit-urls}).
8590
8591 @item W h
8592 @kindex W h (Summary)
8593 @findex gnus-article-wash-html
8594 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
8595 usually done automatically by Gnus if the message in question has a
8596 @code{Content-Type} header that says that the message is @acronym{HTML}.
8597
8598 If a prefix is given, a charset will be asked for.
8599
8600 @vindex gnus-article-wash-function
8601 The default is to use the function specified by
8602 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
8603 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
8604 @acronym{HTML}, but this is controlled by the
8605 @code{gnus-article-wash-function} variable.  Pre-defined functions you
8606 can use include:
8607
8608 @table @code
8609 @item w3
8610 Use Emacs/w3.
8611
8612 @item w3m
8613 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
8614
8615 @item links
8616 Use @uref{http://links.sf.net/, Links}.
8617
8618 @item lynx
8619 Use @uref{http://lynx.isc.org/, Lynx}.
8620
8621 @item html2text
8622 Use html2text---a simple @acronym{HTML} converter included with Gnus.
8623
8624 @end table
8625
8626 @item W b
8627 @kindex W b (Summary)
8628 @findex gnus-article-add-buttons
8629 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
8630 @xref{Article Buttons}.
8631
8632 @item W B
8633 @kindex W B (Summary)
8634 @findex gnus-article-add-buttons-to-head
8635 Add clickable buttons to the article headers
8636 (@code{gnus-article-add-buttons-to-head}).
8637
8638 @item W p
8639 @kindex W p (Summary)
8640 @findex gnus-article-verify-x-pgp-sig
8641 Verify a signed control message
8642 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
8643 @code{newgroup} and @code{checkgroups} are usually signed by the
8644 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
8645 the maintainer to your keyring to verify the
8646 message.@footnote{@acronym{PGP} keys for many hierarchies are
8647 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
8648
8649 @item W s
8650 @kindex W s (Summary)
8651 @findex gnus-summary-force-verify-and-decrypt
8652 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
8653 @acronym{S/MIME}) message
8654 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
8655
8656 @item W a
8657 @kindex W a (Summary)
8658 @findex gnus-article-strip-headers-in-body
8659 Strip headers like the @code{X-No-Archive} header from the beginning of
8660 article bodies (@code{gnus-article-strip-headers-in-body}).
8661
8662 @item W E l
8663 @kindex W E l (Summary)
8664 @findex gnus-article-strip-leading-blank-lines
8665 Remove all blank lines from the beginning of the article
8666 (@code{gnus-article-strip-leading-blank-lines}).
8667
8668 @item W E m
8669 @kindex W E m (Summary)
8670 @findex gnus-article-strip-multiple-blank-lines
8671 Replace all blank lines with empty lines and then all multiple empty
8672 lines with a single empty line.
8673 (@code{gnus-article-strip-multiple-blank-lines}).
8674
8675 @item W E t
8676 @kindex W E t (Summary)
8677 @findex gnus-article-remove-trailing-blank-lines
8678 Remove all blank lines at the end of the article
8679 (@code{gnus-article-remove-trailing-blank-lines}).
8680
8681 @item W E a
8682 @kindex W E a (Summary)
8683 @findex gnus-article-strip-blank-lines
8684 Do all the three commands above
8685 (@code{gnus-article-strip-blank-lines}).
8686
8687 @item W E A
8688 @kindex W E A (Summary)
8689 @findex gnus-article-strip-all-blank-lines
8690 Remove all blank lines
8691 (@code{gnus-article-strip-all-blank-lines}).
8692
8693 @item W E s
8694 @kindex W E s (Summary)
8695 @findex gnus-article-strip-leading-space
8696 Remove all white space from the beginning of all lines of the article
8697 body (@code{gnus-article-strip-leading-space}).
8698
8699 @item W E e
8700 @kindex W E e (Summary)
8701 @findex gnus-article-strip-trailing-space
8702 Remove all white space from the end of all lines of the article
8703 body (@code{gnus-article-strip-trailing-space}).
8704
8705 @end table
8706
8707 @xref{Customizing Articles}, for how to wash articles automatically.
8708
8709
8710 @node Article Header
8711 @subsection Article Header
8712
8713 These commands perform various transformations of article header.
8714
8715 @table @kbd
8716
8717 @item W G u
8718 @kindex W G u (Summary)
8719 @findex gnus-article-treat-unfold-headers
8720 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
8721
8722 @item W G n
8723 @kindex W G n (Summary)
8724 @findex gnus-article-treat-fold-newsgroups
8725 Fold the @code{Newsgroups} and @code{Followup-To} headers
8726 (@code{gnus-article-treat-fold-newsgroups}).
8727
8728 @item W G f
8729 @kindex W G f (Summary)
8730 @findex gnus-article-treat-fold-headers
8731 Fold all the message headers
8732 (@code{gnus-article-treat-fold-headers}).
8733
8734 @item W E w
8735 @kindex W E w (Summary)
8736 @findex gnus-article-remove-leading-whitespace
8737 Remove excessive whitespace from all headers
8738 (@code{gnus-article-remove-leading-whitespace}).
8739
8740 @end table
8741
8742
8743 @node Article Buttons
8744 @subsection Article Buttons
8745 @cindex buttons
8746
8747 People often include references to other stuff in articles, and it would
8748 be nice if Gnus could just fetch whatever it is that people talk about
8749 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
8750 button on these references.
8751
8752 @vindex gnus-button-man-handler
8753 Gnus adds @dfn{buttons} to certain standard references by default:
8754 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
8755 Emacs or Gnus related references.  This is controlled by two variables,
8756 one that handles article bodies and one that handles article heads:
8757
8758 @table @code
8759
8760 @item gnus-button-alist
8761 @vindex gnus-button-alist
8762 This is an alist where each entry has this form:
8763
8764 @lisp
8765 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8766 @end lisp
8767
8768 @table @var
8769
8770 @item regexp
8771 All text that match this regular expression (case insensitive) will be
8772 considered an external reference.  Here's a typical regexp that matches
8773 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
8774 variable containing a regexp, useful variables to use include
8775 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
8776
8777 @item button-par
8778 Gnus has to know which parts of the matches is to be highlighted.  This
8779 is a number that says what sub-expression of the regexp is to be
8780 highlighted.  If you want it all highlighted, you use 0 here.
8781
8782 @item use-p
8783 This form will be @code{eval}ed, and if the result is non-@code{nil},
8784 this is considered a match.  This is useful if you want extra sifting to
8785 avoid false matches.  Often variables named
8786 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
8787 Levels}, but any other form may be used too.
8788
8789 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
8790
8791 @item function
8792 This function will be called when you click on this button.
8793
8794 @item data-par
8795 As with @var{button-par}, this is a sub-expression number, but this one
8796 says which part of the match is to be sent as data to @var{function}.
8797
8798 @end table
8799
8800 So the full entry for buttonizing URLs is then
8801
8802 @lisp
8803 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
8804 @end lisp
8805
8806 @item gnus-header-button-alist
8807 @vindex gnus-header-button-alist
8808 This is just like the other alist, except that it is applied to the
8809 article head only, and that each entry has an additional element that is
8810 used to say what headers to apply the buttonize coding to:
8811
8812 @lisp
8813 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
8814 @end lisp
8815
8816 @var{header} is a regular expression.
8817 @end table
8818
8819 @subsubsection Related variables and functions
8820
8821 @table @code
8822 @item gnus-button-@var{*}-level
8823 @xref{Article Button Levels}.
8824
8825 @c Stuff related to gnus-button-browse-level
8826
8827 @item gnus-button-url-regexp
8828 @vindex gnus-button-url-regexp
8829 A regular expression that matches embedded URLs.  It is used in the
8830 default values of the variables above.
8831
8832 @c Stuff related to gnus-button-man-level
8833
8834 @item gnus-button-man-handler
8835 @vindex gnus-button-man-handler
8836 The function to use for displaying man pages.  It must take at least one
8837 argument with a string naming the man page.
8838
8839 @c Stuff related to gnus-button-message-level
8840
8841 @item gnus-button-mid-or-mail-regexp
8842 @vindex gnus-button-mid-or-mail-regexp
8843 Regular expression that matches a message ID or a mail address.
8844
8845 @item gnus-button-prefer-mid-or-mail
8846 @vindex gnus-button-prefer-mid-or-mail
8847 This variable determines what to do when the button on a string as
8848 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
8849 message ID or a mail address.  If it is one of the symbols @code{mid} or
8850 @code{mail}, Gnus will always assume that the string is a message ID or
8851 a mail address, respectively.  If this variable is set to the symbol
8852 @code{ask}, always query the user what do do.  If it is a function, this
8853 function will be called with the string as its only argument.  The
8854 function must return @code{mid}, @code{mail}, @code{invalid} or
8855 @code{ask}.  The default value is the function
8856 @code{gnus-button-mid-or-mail-heuristic}.
8857
8858 @item gnus-button-mid-or-mail-heuristic
8859 @findex gnus-button-mid-or-mail-heuristic
8860 Function that guesses whether its argument is a message ID or a mail
8861 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
8862 it's a mail address, @code{ask} if unsure and @code{invalid} if the
8863 string is invalid.
8864
8865 @item gnus-button-mid-or-mail-heuristic-alist
8866 @vindex gnus-button-mid-or-mail-heuristic-alist
8867 An alist of @code{(RATE . REGEXP)} pairs used by the function
8868 @code{gnus-button-mid-or-mail-heuristic}.
8869
8870 @c Stuff related to gnus-button-tex-level
8871
8872 @item gnus-button-ctan-handler
8873 @findex gnus-button-ctan-handler
8874 The function to use for displaying CTAN links.  It must take one
8875 argument, the string naming the URL.
8876
8877 @item gnus-ctan-url
8878 @vindex gnus-ctan-url
8879 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
8880 by @code{gnus-button-ctan-handler}.
8881
8882 @c Misc stuff
8883
8884 @item gnus-article-button-face
8885 @vindex gnus-article-button-face
8886 Face used on buttons.
8887
8888 @item gnus-article-mouse-face
8889 @vindex gnus-article-mouse-face
8890 Face used when the mouse cursor is over a button.
8891
8892 @end table
8893
8894 @xref{Customizing Articles}, for how to buttonize articles automatically.
8895
8896
8897 @node Article Button Levels
8898 @subsection Article button levels
8899 @cindex button levels
8900 The higher the value of the variables @code{gnus-button-@var{*}-level},
8901 the more buttons will appear.  If the level is zero, no corresponding
8902 buttons are displayed.  With the default value (which is 5) you should
8903 already see quite a lot of buttons.  With higher levels, you will see
8904 more buttons, but you may also get more false positives.  To avoid them,
8905 you can set the variables @code{gnus-button-@var{*}-level} local to
8906 specific groups (@pxref{Group Parameters}).  Here's an example for the
8907 variable @code{gnus-parameters}:
8908
8909 @lisp
8910 ;; @r{increase @code{gnus-button-*-level} in some groups:}
8911 (setq gnus-parameters
8912       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
8913         ("\\<unix\\>"               (gnus-button-man-level 10))
8914         ("\\<tex\\>"                (gnus-button-tex-level 10))))
8915 @end lisp
8916
8917 @table @code
8918
8919 @item gnus-button-browse-level
8920 @vindex gnus-button-browse-level
8921 Controls the display of references to message IDs, mail addresses and
8922 news URLs.  Related variables and functions include
8923 @code{gnus-button-url-regexp}, @code{browse-url}, and
8924 @code{browse-url-browser-function}.
8925
8926 @item gnus-button-emacs-level
8927 @vindex gnus-button-emacs-level
8928 Controls the display of Emacs or Gnus references.  Related functions are
8929 @code{gnus-button-handle-custom},
8930 @code{gnus-button-handle-describe-function},
8931 @code{gnus-button-handle-describe-variable},
8932 @code{gnus-button-handle-symbol},
8933 @code{gnus-button-handle-describe-key},
8934 @code{gnus-button-handle-apropos},
8935 @code{gnus-button-handle-apropos-command},
8936 @code{gnus-button-handle-apropos-variable},
8937 @code{gnus-button-handle-apropos-documentation}, and
8938 @code{gnus-button-handle-library}.
8939
8940 @item gnus-button-man-level
8941 @vindex gnus-button-man-level
8942 Controls the display of references to (Unix) man pages.
8943 See @code{gnus-button-man-handler}.
8944
8945 @item gnus-button-message-level
8946 @vindex gnus-button-message-level
8947 Controls the display of message IDs, mail addresses and news URLs.
8948 Related variables and functions include
8949 @code{gnus-button-mid-or-mail-regexp},
8950 @code{gnus-button-prefer-mid-or-mail},
8951 @code{gnus-button-mid-or-mail-heuristic}, and
8952 @code{gnus-button-mid-or-mail-heuristic-alist}.
8953
8954 @item gnus-button-tex-level
8955 @vindex gnus-button-tex-level
8956 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
8957 URLs.  See the variables @code{gnus-ctan-url},
8958 @code{gnus-button-ctan-handler},
8959 @code{gnus-button-ctan-directory-regexp}, and
8960 @code{gnus-button-handle-ctan-bogus-regexp}.
8961
8962 @end table
8963
8964
8965 @node Article Date
8966 @subsection Article Date
8967
8968 The date is most likely generated in some obscure timezone you've never
8969 heard of, so it's quite nice to be able to find out what the time was
8970 when the article was sent.
8971
8972 @table @kbd
8973
8974 @item W T u
8975 @kindex W T u (Summary)
8976 @findex gnus-article-date-ut
8977 Display the date in UT (aka. GMT, aka ZULU)
8978 (@code{gnus-article-date-ut}).
8979
8980 @item W T i
8981 @kindex W T i (Summary)
8982 @findex gnus-article-date-iso8601
8983 @cindex ISO 8601
8984 Display the date in international format, aka. ISO 8601
8985 (@code{gnus-article-date-iso8601}).
8986
8987 @item W T l
8988 @kindex W T l (Summary)
8989 @findex gnus-article-date-local
8990 Display the date in the local timezone (@code{gnus-article-date-local}).
8991
8992 @item W T p
8993 @kindex W T p (Summary)
8994 @findex gnus-article-date-english
8995 Display the date in a format that's easily pronounceable in English
8996 (@code{gnus-article-date-english}).
8997
8998 @item W T s
8999 @kindex W T s (Summary)
9000 @vindex gnus-article-time-format
9001 @findex gnus-article-date-user
9002 @findex format-time-string
9003 Display the date using a user-defined format
9004 (@code{gnus-article-date-user}).  The format is specified by the
9005 @code{gnus-article-time-format} variable, and is a string that's passed
9006 to @code{format-time-string}.  See the documentation of that variable
9007 for a list of possible format specs.
9008
9009 @item W T e
9010 @kindex W T e (Summary)
9011 @findex gnus-article-date-lapsed
9012 @findex gnus-start-date-timer
9013 @findex gnus-stop-date-timer
9014 Say how much time has elapsed between the article was posted and now
9015 (@code{gnus-article-date-lapsed}).  It looks something like:
9016
9017 @example
9018 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
9019 @end example
9020
9021 @vindex gnus-article-date-lapsed-new-header
9022 The value of @code{gnus-article-date-lapsed-new-header} determines
9023 whether this header will just be added below the old Date one, or will
9024 replace it.
9025
9026 An advantage of using Gnus to read mail is that it converts simple bugs
9027 into wonderful absurdities.
9028
9029 If you want to have this line updated continually, you can put
9030
9031 @lisp
9032 (gnus-start-date-timer)
9033 @end lisp
9034
9035 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
9036 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
9037 command.
9038
9039 @item W T o
9040 @kindex W T o (Summary)
9041 @findex gnus-article-date-original
9042 Display the original date (@code{gnus-article-date-original}).  This can
9043 be useful if you normally use some other conversion function and are
9044 worried that it might be doing something totally wrong.  Say, claiming
9045 that the article was posted in 1854.  Although something like that is
9046 @emph{totally} impossible.  Don't you trust me? *titter*
9047
9048 @end table
9049
9050 @xref{Customizing Articles}, for how to display the date in your
9051 preferred format automatically.
9052
9053
9054 @node Article Display
9055 @subsection Article Display
9056 @cindex picons
9057 @cindex x-face
9058 @cindex smileys
9059
9060 These commands add various frivolous display gimmicks to the article
9061 buffer in Emacs versions that support them.
9062
9063 @code{X-Face} headers are small black-and-white images supplied by the
9064 message headers (@pxref{X-Face}).
9065
9066 @code{Face} headers are small colored images supplied by the message
9067 headers (@pxref{Face}).
9068
9069 Smileys are those little @samp{:-)} symbols that people like to litter
9070 their messages with (@pxref{Smileys}).
9071
9072 Picons, on the other hand, reside on your own system, and Gnus will
9073 try to match the headers to what you have (@pxref{Picons}).
9074
9075 All these functions are toggles---if the elements already exist,
9076 they'll be removed.
9077
9078 @table @kbd
9079 @item W D x
9080 @kindex W D x (Summary)
9081 @findex gnus-article-display-x-face
9082 Display an @code{X-Face} in the @code{From} header.
9083 (@code{gnus-article-display-x-face}).
9084
9085 @item W D d
9086 @kindex W D d (Summary)
9087 @findex gnus-article-display-face
9088 Display a @code{Face} in the @code{From} header.
9089 (@code{gnus-article-display-face}).
9090
9091 @item W D s
9092 @kindex W D s (Summary)
9093 @findex gnus-treat-smiley
9094 Display smileys (@code{gnus-treat-smiley}).
9095
9096 @item W D f
9097 @kindex W D f (Summary)
9098 @findex gnus-treat-from-picon
9099 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
9100
9101 @item W D m
9102 @kindex W D m (Summary)
9103 @findex gnus-treat-mail-picon
9104 Piconify all mail headers (i. e., @code{Cc}, @code{To})
9105 (@code{gnus-treat-mail-picon}).
9106
9107 @item W D n
9108 @kindex W D n (Summary)
9109 @findex gnus-treat-newsgroups-picon
9110 Piconify all news headers (i. e., @code{Newsgroups} and
9111 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
9112
9113 @item W D D
9114 @kindex W D D (Summary)
9115 @findex gnus-article-remove-images
9116 Remove all images from the article buffer
9117 (@code{gnus-article-remove-images}).
9118
9119 @end table
9120
9121
9122
9123 @node Article Signature
9124 @subsection Article Signature
9125 @cindex signatures
9126 @cindex article signature
9127
9128 @vindex gnus-signature-separator
9129 Each article is divided into two parts---the head and the body.  The
9130 body can be divided into a signature part and a text part.  The variable
9131 that says what is to be considered a signature is
9132 @code{gnus-signature-separator}.  This is normally the standard
9133 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
9134 non-standard signature separators, so this variable can also be a list
9135 of regular expressions to be tested, one by one.  (Searches are done
9136 from the end of the body towards the beginning.)  One likely value is:
9137
9138 @lisp
9139 (setq gnus-signature-separator
9140       '("^-- $"         ; @r{The standard}
9141         "^-- *$"        ; @r{A common mangling}
9142         "^-------*$"    ; @r{Many people just use a looong}
9143                         ; @r{line of dashes.  Shame!}
9144         "^ *--------*$" ; @r{Double-shame!}
9145         "^________*$"   ; @r{Underscores are also popular}
9146         "^========*$")) ; @r{Pervert!}
9147 @end lisp
9148
9149 The more permissive you are, the more likely it is that you'll get false
9150 positives.
9151
9152 @vindex gnus-signature-limit
9153 @code{gnus-signature-limit} provides a limit to what is considered a
9154 signature when displaying articles.
9155
9156 @enumerate
9157 @item
9158 If it is an integer, no signature may be longer (in characters) than
9159 that integer.
9160 @item
9161 If it is a floating point number, no signature may be longer (in lines)
9162 than that number.
9163 @item
9164 If it is a function, the function will be called without any parameters,
9165 and if it returns @code{nil}, there is no signature in the buffer.
9166 @item
9167 If it is a string, it will be used as a regexp.  If it matches, the text
9168 in question is not a signature.
9169 @end enumerate
9170
9171 This variable can also be a list where the elements may be of the types
9172 listed above.  Here's an example:
9173
9174 @lisp
9175 (setq gnus-signature-limit
9176       '(200.0 "^---*Forwarded article"))
9177 @end lisp
9178
9179 This means that if there are more than 200 lines after the signature
9180 separator, or the text after the signature separator is matched by
9181 the regular expression @samp{^---*Forwarded article}, then it isn't a
9182 signature after all.
9183
9184
9185 @node Article Miscellanea
9186 @subsection Article Miscellanea
9187
9188 @table @kbd
9189 @item A t
9190 @kindex A t (Summary)
9191 @findex gnus-article-babel
9192 Translate the article from one language to another
9193 (@code{gnus-article-babel}).
9194
9195 @end table
9196
9197
9198 @node MIME Commands
9199 @section MIME Commands
9200 @cindex MIME decoding
9201 @cindex attachments
9202 @cindex viewing attachments
9203
9204 The following commands all understand the numerical prefix.  For
9205 instance, @kbd{3 b} means ``view the third @acronym{MIME} part''.
9206
9207 @table @kbd
9208 @item b
9209 @itemx K v
9210 @kindex b (Summary)
9211 @kindex K v (Summary)
9212 View the @acronym{MIME} part.
9213
9214 @item K o
9215 @kindex K o (Summary)
9216 Save the @acronym{MIME} part.
9217
9218 @item K c
9219 @kindex K c (Summary)
9220 Copy the @acronym{MIME} part.
9221
9222 @item K e
9223 @kindex K e (Summary)
9224 View the @acronym{MIME} part externally.
9225
9226 @item K i
9227 @kindex K i (Summary)
9228 View the @acronym{MIME} part internally.
9229
9230 @item K |
9231 @kindex K | (Summary)
9232 Pipe the @acronym{MIME} part to an external command.
9233 @end table
9234
9235 The rest of these @acronym{MIME} commands do not use the numerical prefix in
9236 the same manner:
9237
9238 @table @kbd
9239 @item K b
9240 @kindex K b (Summary)
9241 Make all the @acronym{MIME} parts have buttons in front of them.  This is
9242 mostly useful if you wish to save (or perform other actions) on inlined
9243 parts.
9244
9245 @item K m
9246 @kindex K m (Summary)
9247 @findex gnus-summary-repair-multipart
9248 Some multipart messages are transmitted with missing or faulty headers.
9249 This command will attempt to ``repair'' these messages so that they can
9250 be viewed in a more pleasant manner
9251 (@code{gnus-summary-repair-multipart}).
9252
9253 @item X m
9254 @kindex X m (Summary)
9255 @findex gnus-summary-save-parts
9256 Save all parts matching a @acronym{MIME} type to a directory
9257 (@code{gnus-summary-save-parts}).  Understands the process/prefix
9258 convention (@pxref{Process/Prefix}).
9259
9260 @item M-t
9261 @kindex M-t (Summary)
9262 @findex gnus-summary-toggle-display-buttonized
9263 Toggle the buttonized display of the article buffer
9264 (@code{gnus-summary-toggle-display-buttonized}).
9265
9266 @item W M w
9267 @kindex W M w (Summary)
9268 @findex gnus-article-decode-mime-words
9269 Decode RFC 2047-encoded words in the article headers
9270 (@code{gnus-article-decode-mime-words}).
9271
9272 @item W M c
9273 @kindex W M c (Summary)
9274 @findex gnus-article-decode-charset
9275 Decode encoded article bodies as well as charsets
9276 (@code{gnus-article-decode-charset}).
9277
9278 This command looks in the @code{Content-Type} header to determine the
9279 charset.  If there is no such header in the article, you can give it a
9280 prefix, which will prompt for the charset to decode as.  In regional
9281 groups where people post using some common encoding (but do not
9282 include @acronym{MIME} headers), you can set the @code{charset} group/topic
9283 parameter to the required charset (@pxref{Group Parameters}).
9284
9285 @item W M v
9286 @kindex W M v (Summary)
9287 @findex gnus-mime-view-all-parts
9288 View all the @acronym{MIME} parts in the current article
9289 (@code{gnus-mime-view-all-parts}).
9290
9291 @end table
9292
9293 Relevant variables:
9294
9295 @table @code
9296 @item gnus-ignored-mime-types
9297 @vindex gnus-ignored-mime-types
9298 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9299 this list will be completely ignored by Gnus.  The default value is
9300 @code{nil}.
9301
9302 To have all Vcards be ignored, you'd say something like this:
9303
9304 @lisp
9305 (setq gnus-ignored-mime-types
9306       '("text/x-vcard"))
9307 @end lisp
9308
9309 @item gnus-article-loose-mime
9310 @vindex gnus-article-loose-mime
9311 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
9312 before interpreting the message as a @acronym{MIME} message.  This helps
9313 when reading messages from certain broken mail user agents.  The
9314 default is @code{nil}.
9315
9316 @item gnus-article-emulate-mime
9317 @vindex gnus-article-emulate-mime
9318 There are other, non-@acronym{MIME} encoding methods used.  The most common
9319 is @samp{uuencode}, but yEncode is also getting to be popular.  If
9320 this variable is non-@code{nil}, Gnus will look in message bodies to
9321 see if it finds these encodings, and if so, it'll run them through the
9322 Gnus @acronym{MIME} machinery.  The default is @code{t}.
9323
9324 @item gnus-unbuttonized-mime-types
9325 @vindex gnus-unbuttonized-mime-types
9326 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9327 this list won't have @acronym{MIME} buttons inserted unless they aren't
9328 displayed or this variable is overridden by
9329 @code{gnus-buttonized-mime-types}.  The default value is
9330 @code{(".*/.*")}.  This variable is only used when
9331 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
9332
9333 @item gnus-buttonized-mime-types
9334 @vindex gnus-buttonized-mime-types
9335 This is a list of regexps.  @acronym{MIME} types that match a regexp from
9336 this list will have @acronym{MIME} buttons inserted unless they aren't
9337 displayed.  This variable overrides
9338 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
9339 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
9340 is @code{nil}.
9341
9342 To see e.g. security buttons but no other buttons, you could set this
9343 variable to @code{("multipart/signed")} and leave
9344 @code{gnus-unbuttonized-mime-types} at the default value.
9345
9346 @item gnus-inhibit-mime-unbuttonizing
9347 @vindex gnus-inhibit-mime-unbuttonizing
9348 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
9349 default value is @code{nil}.
9350
9351 @item gnus-article-mime-part-function
9352 @vindex gnus-article-mime-part-function
9353 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
9354 handle as the parameter.  The function is meant to be used to allow
9355 users to gather information from the article (e. g., add Vcard info to
9356 the bbdb database) or to do actions based on parts (e. g., automatically
9357 save all jpegs into some directory).
9358
9359 Here's an example function the does the latter:
9360
9361 @lisp
9362 (defun my-save-all-jpeg-parts (handle)
9363   (when (equal (car (mm-handle-type handle)) "image/jpeg")
9364     (with-temp-buffer
9365       (insert (mm-get-part handle))
9366       (write-region (point-min) (point-max)
9367                     (read-file-name "Save jpeg to: ")))))
9368 (setq gnus-article-mime-part-function
9369       'my-save-all-jpeg-parts)
9370 @end lisp
9371
9372 @vindex gnus-mime-multipart-functions
9373 @item gnus-mime-multipart-functions
9374 Alist of @acronym{MIME} multipart types and functions to handle them.
9375
9376 @vindex mm-file-name-rewrite-functions
9377 @item mm-file-name-rewrite-functions
9378 List of functions used for rewriting file names of @acronym{MIME} parts.
9379 Each function takes a file name as input and returns a file name.
9380
9381 Ready-made functions include@*
9382 @code{mm-file-name-delete-whitespace},
9383 @code{mm-file-name-trim-whitespace},
9384 @code{mm-file-name-collapse-whitespace}, and
9385 @code{mm-file-name-replace-whitespace}.  The later uses the value of
9386 the variable @code{mm-file-name-replace-whitespace} to replace each
9387 whitespace character in a file name with that string; default value
9388 is @code{"_"} (a single underscore).
9389 @findex mm-file-name-delete-whitespace
9390 @findex mm-file-name-trim-whitespace
9391 @findex mm-file-name-collapse-whitespace
9392 @findex mm-file-name-replace-whitespace
9393 @vindex mm-file-name-replace-whitespace
9394
9395 The standard functions @code{capitalize}, @code{downcase},
9396 @code{upcase}, and @code{upcase-initials} may be useful, too.
9397
9398 Everybody knows that whitespace characters in file names are evil,
9399 except those who don't know.  If you receive lots of attachments from
9400 such unenlightened users, you can make live easier by adding
9401
9402 @lisp
9403 (setq mm-file-name-rewrite-functions
9404       '(mm-file-name-trim-whitespace
9405         mm-file-name-collapse-whitespace
9406         mm-file-name-replace-whitespace))
9407 @end lisp
9408
9409 @noindent
9410 to your @file{~/.gnus.el} file.
9411
9412 @end table
9413
9414
9415 @node Charsets
9416 @section Charsets
9417 @cindex charsets
9418
9419 People use different charsets, and we have @acronym{MIME} to let us know what
9420 charsets they use.  Or rather, we wish we had.  Many people use
9421 newsreaders and mailers that do not understand or use @acronym{MIME}, and
9422 just send out messages without saying what character sets they use.  To
9423 help a bit with this, some local news hierarchies have policies that say
9424 what character set is the default.  For instance, the @samp{fj}
9425 hierarchy uses @code{iso-2022-jp-2}.
9426
9427 @vindex gnus-group-charset-alist
9428 This knowledge is encoded in the @code{gnus-group-charset-alist}
9429 variable, which is an alist of regexps (use the first item to match full
9430 group names) and default charsets to be used when reading these groups.
9431
9432 @vindex gnus-newsgroup-ignored-charsets
9433 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
9434 aren't.  These blithely mark messages as being in @code{iso-8859-1}
9435 even if they really are in @code{koi-8}.  To help here, the
9436 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
9437 charsets that are listed here will be ignored.  The variable can be
9438 set on a group-by-group basis using the group parameters (@pxref{Group
9439 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
9440 which includes values some agents insist on having in there.
9441
9442 @vindex gnus-group-posting-charset-alist
9443 When posting, @code{gnus-group-posting-charset-alist} is used to
9444 determine which charsets should not be encoded using the @acronym{MIME}
9445 encodings.  For instance, some hierarchies discourage using
9446 quoted-printable header encoding.
9447
9448 This variable is an alist of regexps and permitted unencoded charsets
9449 for posting.  Each element of the alist has the form @code{(}@var{test
9450 header body-list}@code{)}, where:
9451
9452 @table @var
9453 @item test
9454 is either a regular expression matching the newsgroup header or a
9455 variable to query,
9456 @item header
9457 is the charset which may be left unencoded in the header (@code{nil}
9458 means encode all charsets),
9459 @item body-list
9460 is a list of charsets which may be encoded using 8bit content-transfer
9461 encoding in the body, or one of the special values @code{nil} (always
9462 encode using quoted-printable) or @code{t} (always use 8bit).
9463 @end table
9464
9465 @cindex Russian
9466 @cindex koi8-r
9467 @cindex koi8-u
9468 @cindex iso-8859-5
9469 @cindex coding system aliases
9470 @cindex preferred charset
9471
9472 Other charset tricks that may be useful, although not Gnus-specific:
9473
9474 If there are several @acronym{MIME} charsets that encode the same Emacs
9475 charset, you can choose what charset to use by saying the following:
9476
9477 @lisp
9478 (put-charset-property 'cyrillic-iso8859-5
9479                       'preferred-coding-system 'koi8-r)
9480 @end lisp
9481
9482 This means that Russian will be encoded using @code{koi8-r} instead of
9483 the default @code{iso-8859-5} @acronym{MIME} charset.
9484
9485 If you want to read messages in @code{koi8-u}, you can cheat and say
9486
9487 @lisp
9488 (define-coding-system-alias 'koi8-u 'koi8-r)
9489 @end lisp
9490
9491 This will almost do the right thing.
9492
9493 And finally, to read charsets like @code{windows-1251}, you can say
9494 something like
9495
9496 @lisp
9497 (codepage-setup 1251)
9498 (define-coding-system-alias 'windows-1251 'cp1251)
9499 @end lisp
9500
9501
9502 @node Article Commands
9503 @section Article Commands
9504
9505 @table @kbd
9506
9507 @item A P
9508 @cindex PostScript
9509 @cindex printing
9510 @kindex A P (Summary)
9511 @vindex gnus-ps-print-hook
9512 @findex gnus-summary-print-article
9513 Generate and print a PostScript image of the article buffer
9514 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
9515 be run just before printing the buffer.  An alternative way to print
9516 article is to use Muttprint (@pxref{Saving Articles}).
9517
9518 @end table
9519
9520
9521 @node Summary Sorting
9522 @section Summary Sorting
9523 @cindex summary sorting
9524
9525 You can have the summary buffer sorted in various ways, even though I
9526 can't really see why you'd want that.
9527
9528 @table @kbd
9529
9530 @item C-c C-s C-n
9531 @kindex C-c C-s C-n (Summary)
9532 @findex gnus-summary-sort-by-number
9533 Sort by article number (@code{gnus-summary-sort-by-number}).
9534
9535 @item C-c C-s C-a
9536 @kindex C-c C-s C-a (Summary)
9537 @findex gnus-summary-sort-by-author
9538 Sort by author (@code{gnus-summary-sort-by-author}).
9539
9540 @item C-c C-s C-s
9541 @kindex C-c C-s C-s (Summary)
9542 @findex gnus-summary-sort-by-subject
9543 Sort by subject (@code{gnus-summary-sort-by-subject}).
9544
9545 @item C-c C-s C-d
9546 @kindex C-c C-s C-d (Summary)
9547 @findex gnus-summary-sort-by-date
9548 Sort by date (@code{gnus-summary-sort-by-date}).
9549
9550 @item C-c C-s C-l
9551 @kindex C-c C-s C-l (Summary)
9552 @findex gnus-summary-sort-by-lines
9553 Sort by lines (@code{gnus-summary-sort-by-lines}).
9554
9555 @item C-c C-s C-c
9556 @kindex C-c C-s C-c (Summary)
9557 @findex gnus-summary-sort-by-chars
9558 Sort by article length (@code{gnus-summary-sort-by-chars}).
9559
9560 @item C-c C-s C-i
9561 @kindex C-c C-s C-i (Summary)
9562 @findex gnus-summary-sort-by-score
9563 Sort by score (@code{gnus-summary-sort-by-score}).
9564
9565 @item C-c C-s C-r
9566 @kindex C-c C-s C-r (Summary)
9567 @findex gnus-summary-sort-by-random
9568 Randomize (@code{gnus-summary-sort-by-random}).
9569
9570 @item C-c C-s C-o
9571 @kindex C-c C-s C-o (Summary)
9572 @findex gnus-summary-sort-by-original
9573 Sort using the default sorting method
9574 (@code{gnus-summary-sort-by-original}).
9575 @end table
9576
9577 These functions will work both when you use threading and when you don't
9578 use threading.  In the latter case, all summary lines will be sorted,
9579 line by line.  In the former case, sorting will be done on a
9580 root-by-root basis, which might not be what you were looking for.  To
9581 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
9582 Commands}).
9583
9584
9585 @node Finding the Parent
9586 @section Finding the Parent
9587 @cindex parent articles
9588 @cindex referring articles
9589
9590 @table @kbd
9591 @item ^
9592 @kindex ^ (Summary)
9593 @findex gnus-summary-refer-parent-article
9594 If you'd like to read the parent of the current article, and it is not
9595 displayed in the summary buffer, you might still be able to.  That is,
9596 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
9597 and the @code{References} in the current article are not mangled, you
9598 can just press @kbd{^} or @kbd{A r}
9599 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
9600 you'll get the parent.  If the parent is already displayed in the
9601 summary buffer, point will just move to this article.
9602
9603 If given a positive numerical prefix, fetch that many articles back into
9604 the ancestry.  If given a negative numerical prefix, fetch just that
9605 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
9606 grandparent and the grandgrandparent of the current article.  If you say
9607 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
9608 article.
9609
9610 @item A R (Summary)
9611 @findex gnus-summary-refer-references
9612 @kindex A R (Summary)
9613 Fetch all articles mentioned in the @code{References} header of the
9614 article (@code{gnus-summary-refer-references}).
9615
9616 @item A T (Summary)
9617 @findex gnus-summary-refer-thread
9618 @kindex A T (Summary)
9619 Display the full thread where the current article appears
9620 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
9621 headers in the current group to work, so it usually takes a while.  If
9622 you do it often, you may consider setting @code{gnus-fetch-old-headers}
9623 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
9624 visible effects normally, but it'll make this command work a whole lot
9625 faster.  Of course, it'll make group entry somewhat slow.
9626
9627 @vindex gnus-refer-thread-limit
9628 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
9629 articles before the first displayed in the current group) headers to
9630 fetch when doing this command.  The default is 200.  If @code{t}, all
9631 the available headers will be fetched.  This variable can be overridden
9632 by giving the @kbd{A T} command a numerical prefix.
9633
9634 @item M-^ (Summary)
9635 @findex gnus-summary-refer-article
9636 @kindex M-^ (Summary)
9637 @cindex Message-ID
9638 @cindex fetching by Message-ID
9639 You can also ask the @acronym{NNTP} server for an arbitrary article, no
9640 matter what group it belongs to.  @kbd{M-^}
9641 (@code{gnus-summary-refer-article}) will ask you for a
9642 @code{Message-ID}, which is one of those long, hard-to-read thingies
9643 that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.  You
9644 have to get it all exactly right.  No fuzzy searches, I'm afraid.
9645 @end table
9646
9647 The current select method will be used when fetching by
9648 @code{Message-ID} from non-news select method, but you can override this
9649 by giving this command a prefix.
9650
9651 @vindex gnus-refer-article-method
9652 If the group you are reading is located on a back end that does not
9653 support fetching by @code{Message-ID} very well (like @code{nnspool}),
9654 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
9655 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
9656 updating the spool you are reading from, but that's not really
9657 necessary.
9658
9659 It can also be a list of select methods, as well as the special symbol
9660 @code{current}, which means to use the current select method.  If it
9661 is a list, Gnus will try all the methods in the list until it finds a
9662 match.
9663
9664 Here's an example setting that will first try the current method, and
9665 then ask Google if that fails:
9666
9667 @lisp
9668 (setq gnus-refer-article-method
9669       '(current
9670         (nnweb "google" (nnweb-type google))))
9671 @end lisp
9672
9673 Most of the mail back ends support fetching by @code{Message-ID}, but
9674 do not do a particularly excellent job at it.  That is, @code{nnmbox},
9675 @code{nnbabyl}, @code{nnmaildir}, @code{nnml}, are able to locate
9676 articles from any groups, while @code{nnfolder}, and @code{nnimap} are
9677 only able to locate articles that have been posted to the current
9678 group.  (Anything else would be too time consuming.)  @code{nnmh} does
9679 not support this at all.
9680
9681
9682 @node Alternative Approaches
9683 @section Alternative Approaches
9684
9685 Different people like to read news using different methods.  This being
9686 Gnus, we offer a small selection of minor modes for the summary buffers.
9687
9688 @menu
9689 * Pick and Read::               First mark articles and then read them.
9690 * Binary Groups::               Auto-decode all articles.
9691 @end menu
9692
9693
9694 @node Pick and Read
9695 @subsection Pick and Read
9696 @cindex pick and read
9697
9698 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
9699 a two-phased reading interface.  The user first marks in a summary
9700 buffer the articles she wants to read.  Then she starts reading the
9701 articles with just an article buffer displayed.
9702
9703 @findex gnus-pick-mode
9704 @kindex M-x gnus-pick-mode
9705 Gnus provides a summary buffer minor mode that allows
9706 this---@code{gnus-pick-mode}.  This basically means that a few process
9707 mark commands become one-keystroke commands to allow easy marking, and
9708 it provides one additional command for switching to the summary buffer.
9709
9710 Here are the available keystrokes when using pick mode:
9711
9712 @table @kbd
9713 @item .
9714 @kindex . (Pick)
9715 @findex gnus-pick-article-or-thread
9716 Pick the article or thread on the current line
9717 (@code{gnus-pick-article-or-thread}).  If the variable
9718 @code{gnus-thread-hide-subtree} is true, then this key selects the
9719 entire thread when used at the first article of the thread.  Otherwise,
9720 it selects just the article.  If given a numerical prefix, go to that
9721 thread or article and pick it.  (The line number is normally displayed
9722 at the beginning of the summary pick lines.)
9723
9724 @item SPACE
9725 @kindex SPACE (Pick)
9726 @findex gnus-pick-next-page
9727 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
9728 at the end of the buffer, start reading the picked articles.
9729
9730 @item u
9731 @kindex u (Pick)
9732 @findex gnus-pick-unmark-article-or-thread.
9733 Unpick the thread or article
9734 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
9735 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
9736 thread if used at the first article of the thread.  Otherwise it unpicks
9737 just the article.  You can give this key a numerical prefix to unpick
9738 the thread or article at that line.
9739
9740 @item RET
9741 @kindex RET (Pick)
9742 @findex gnus-pick-start-reading
9743 @vindex gnus-pick-display-summary
9744 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
9745 given a prefix, mark all unpicked articles as read first.  If
9746 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
9747 will still be visible when you are reading.
9748
9749 @end table
9750
9751 All the normal summary mode commands are still available in the
9752 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
9753 which is mapped to the same function
9754 @code{gnus-summary-tick-article-forward}.
9755
9756 If this sounds like a good idea to you, you could say:
9757
9758 @lisp
9759 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
9760 @end lisp
9761
9762 @vindex gnus-pick-mode-hook
9763 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
9764
9765 @vindex gnus-mark-unpicked-articles-as-read
9766 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
9767 all unpicked articles as read.  The default is @code{nil}.
9768
9769 @vindex gnus-summary-pick-line-format
9770 The summary line format in pick mode is slightly different from the
9771 standard format.  At the beginning of each line the line number is
9772 displayed.  The pick mode line format is controlled by the
9773 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
9774 Variables}).  It accepts the same format specs that
9775 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
9776
9777
9778 @node Binary Groups
9779 @subsection Binary Groups
9780 @cindex binary groups
9781
9782 @findex gnus-binary-mode
9783 @kindex M-x gnus-binary-mode
9784 If you spend much time in binary groups, you may grow tired of hitting
9785 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
9786 is a minor mode for summary buffers that makes all ordinary Gnus article
9787 selection functions uudecode series of articles and display the result
9788 instead of just displaying the articles the normal way.
9789
9790 @kindex g (Binary)
9791 @findex gnus-binary-show-article
9792 The only way, in fact, to see the actual articles is the @kbd{g}
9793 command, when you have turned on this mode
9794 (@code{gnus-binary-show-article}).
9795
9796 @vindex gnus-binary-mode-hook
9797 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
9798
9799
9800 @node Tree Display
9801 @section Tree Display
9802 @cindex trees
9803
9804 @vindex gnus-use-trees
9805 If you don't like the normal Gnus summary display, you might try setting
9806 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
9807 additional @dfn{tree buffer}.  You can execute all summary mode commands
9808 in the tree buffer.
9809
9810 There are a few variables to customize the tree display, of course:
9811
9812 @table @code
9813 @item gnus-tree-mode-hook
9814 @vindex gnus-tree-mode-hook
9815 A hook called in all tree mode buffers.
9816
9817 @item gnus-tree-mode-line-format
9818 @vindex gnus-tree-mode-line-format
9819 A format string for the mode bar in the tree mode buffers (@pxref{Mode
9820 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
9821 of valid specs, @pxref{Summary Buffer Mode Line}.
9822
9823 @item gnus-selected-tree-face
9824 @vindex gnus-selected-tree-face
9825 Face used for highlighting the selected article in the tree buffer.  The
9826 default is @code{modeline}.
9827
9828 @item gnus-tree-line-format
9829 @vindex gnus-tree-line-format
9830 A format string for the tree nodes.  The name is a bit of a misnomer,
9831 though---it doesn't define a line, but just the node.  The default value
9832 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
9833 the name of the poster.  It is vital that all nodes are of the same
9834 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
9835
9836 Valid specs are:
9837
9838 @table @samp
9839 @item n
9840 The name of the poster.
9841 @item f
9842 The @code{From} header.
9843 @item N
9844 The number of the article.
9845 @item [
9846 The opening bracket.
9847 @item ]
9848 The closing bracket.
9849 @item s
9850 The subject.
9851 @end table
9852
9853 @xref{Formatting Variables}.
9854
9855 Variables related to the display are:
9856
9857 @table @code
9858 @item gnus-tree-brackets
9859 @vindex gnus-tree-brackets
9860 This is used for differentiating between ``real'' articles and
9861 ``sparse'' articles.  The format is
9862 @example
9863 ((@var{real-open} . @var{real-close})
9864  (@var{sparse-open} . @var{sparse-close})
9865  (@var{dummy-open} . @var{dummy-close}))
9866 @end example
9867 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
9868
9869 @item gnus-tree-parent-child-edges
9870 @vindex gnus-tree-parent-child-edges
9871 This is a list that contains the characters used for connecting parent
9872 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
9873
9874 @end table
9875
9876 @item gnus-tree-minimize-window
9877 @vindex gnus-tree-minimize-window
9878 If this variable is non-@code{nil}, Gnus will try to keep the tree
9879 buffer as small as possible to allow more room for the other Gnus
9880 windows.  If this variable is a number, the tree buffer will never be
9881 higher than that number.  The default is @code{t}.  Note that if you
9882 have several windows displayed side-by-side in a frame and the tree
9883 buffer is one of these, minimizing the tree window will also resize all
9884 other windows displayed next to it.
9885
9886 You may also wish to add the following hook to keep the window minimized
9887 at all times:
9888
9889 @lisp
9890 (add-hook 'gnus-configure-windows-hook
9891           'gnus-tree-perhaps-minimize)
9892 @end lisp
9893
9894 @item gnus-generate-tree-function
9895 @vindex gnus-generate-tree-function
9896 @findex gnus-generate-horizontal-tree
9897 @findex gnus-generate-vertical-tree
9898 The function that actually generates the thread tree.  Two predefined
9899 functions are available: @code{gnus-generate-horizontal-tree} and
9900 @code{gnus-generate-vertical-tree} (which is the default).
9901
9902 @end table
9903
9904 Here's an example from a horizontal tree buffer:
9905
9906 @example
9907 @{***@}-(***)-[odd]-[Gun]
9908      |      \[Jan]
9909      |      \[odd]-[Eri]
9910      |      \(***)-[Eri]
9911      |            \[odd]-[Paa]
9912      \[Bjo]
9913      \[Gun]
9914      \[Gun]-[Jor]
9915 @end example
9916
9917 Here's the same thread displayed in a vertical tree buffer:
9918
9919 @example
9920 @group
9921 @{***@}
9922   |--------------------------\-----\-----\
9923 (***)                         [Bjo] [Gun] [Gun]
9924   |--\-----\-----\                          |
9925 [odd] [Jan] [odd] (***)                   [Jor]
9926   |           |     |--\
9927 [Gun]       [Eri] [Eri] [odd]
9928                           |
9929                         [Paa]
9930 @end group
9931 @end example
9932
9933 If you're using horizontal trees, it might be nice to display the trees
9934 side-by-side with the summary buffer.  You could add something like the
9935 following to your @file{~/.gnus.el} file:
9936
9937 @lisp
9938 (setq gnus-use-trees t
9939       gnus-generate-tree-function 'gnus-generate-horizontal-tree
9940       gnus-tree-minimize-window nil)
9941 (gnus-add-configuration
9942  '(article
9943    (vertical 1.0
9944              (horizontal 0.25
9945                          (summary 0.75 point)
9946                          (tree 1.0))
9947              (article 1.0))))
9948 @end lisp
9949
9950 @xref{Window Layout}.
9951
9952
9953 @node Mail Group Commands
9954 @section Mail Group Commands
9955 @cindex mail group commands
9956
9957 Some commands only make sense in mail groups.  If these commands are
9958 invalid in the current group, they will raise a hell and let you know.
9959
9960 All these commands (except the expiry and edit commands) use the
9961 process/prefix convention (@pxref{Process/Prefix}).
9962
9963 @table @kbd
9964
9965 @item B e
9966 @kindex B e (Summary)
9967 @findex gnus-summary-expire-articles
9968 Run all expirable articles in the current group through the expiry
9969 process (@code{gnus-summary-expire-articles}).  That is, delete all
9970 expirable articles in the group that have been around for a while.
9971 (@pxref{Expiring Mail}).
9972
9973 @item B C-M-e
9974 @kindex B C-M-e (Summary)
9975 @findex gnus-summary-expire-articles-now
9976 Delete all the expirable articles in the group
9977 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
9978 articles eligible for expiry in the current group will
9979 disappear forever into that big @file{/dev/null} in the sky.
9980
9981 @item B DEL
9982 @kindex B DEL (Summary)
9983 @findex gnus-summary-delete-article
9984 @c @icon{gnus-summary-mail-delete}
9985 Delete the mail article.  This is ``delete'' as in ``delete it from your
9986 disk forever and ever, never to return again.'' Use with caution.
9987 (@code{gnus-summary-delete-article}).
9988
9989 @item B m
9990 @kindex B m (Summary)
9991 @cindex move mail
9992 @findex gnus-summary-move-article
9993 @vindex gnus-preserve-marks
9994 Move the article from one mail group to another
9995 (@code{gnus-summary-move-article}).  Marks will be preserved if
9996 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
9997
9998 @item B c
9999 @kindex B c (Summary)
10000 @cindex copy mail
10001 @findex gnus-summary-copy-article
10002 @c @icon{gnus-summary-mail-copy}
10003 Copy the article from one group (mail group or not) to a mail group
10004 (@code{gnus-summary-copy-article}).  Marks will be preserved if
10005 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
10006
10007 @item B B
10008 @kindex B B (Summary)
10009 @cindex crosspost mail
10010 @findex gnus-summary-crosspost-article
10011 Crosspost the current article to some other group
10012 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
10013 the article in the other group, and the Xref headers of the article will
10014 be properly updated.
10015
10016 @item B i
10017 @kindex B i (Summary)
10018 @findex gnus-summary-import-article
10019 Import an arbitrary file into the current mail newsgroup
10020 (@code{gnus-summary-import-article}).  You will be prompted for a file
10021 name, a @code{From} header and a @code{Subject} header.
10022
10023 @item B I
10024 @kindex B I (Summary)
10025 @findex gnus-summary-create-article
10026 Create an empty article in the current mail newsgroups
10027 (@code{gnus-summary-create-article}).  You will be prompted for a
10028 @code{From} header and a @code{Subject} header.
10029
10030 @item B r
10031 @kindex B r (Summary)
10032 @findex gnus-summary-respool-article
10033 @vindex gnus-summary-respool-default-method
10034 Respool the mail article (@code{gnus-summary-respool-article}).
10035 @code{gnus-summary-respool-default-method} will be used as the default
10036 select method when respooling.  This variable is @code{nil} by default,
10037 which means that the current group select method will be used instead.
10038 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
10039 (which is the default).
10040
10041 @item B w
10042 @itemx e
10043 @kindex B w (Summary)
10044 @kindex e (Summary)
10045 @findex gnus-summary-edit-article
10046 @kindex C-c C-c (Article)
10047 @findex gnus-summary-edit-article-done
10048 Edit the current article (@code{gnus-summary-edit-article}).  To finish
10049 editing and make the changes permanent, type @kbd{C-c C-c}
10050 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
10051 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
10052
10053 @item B q
10054 @kindex B q (Summary)
10055 @findex gnus-summary-respool-query
10056 If you want to re-spool an article, you might be curious as to what group
10057 the article will end up in before you do the re-spooling.  This command
10058 will tell you (@code{gnus-summary-respool-query}).
10059
10060 @item B t
10061 @kindex B t (Summary)
10062 @findex gnus-summary-respool-trace
10063 Similarly, this command will display all fancy splitting patterns used
10064 when respooling, if any (@code{gnus-summary-respool-trace}).
10065
10066 @item B p
10067 @kindex B p (Summary)
10068 @findex gnus-summary-article-posted-p
10069 Some people have a tendency to send you ``courtesy'' copies when they
10070 follow up to articles you have posted.  These usually have a
10071 @code{Newsgroups} header in them, but not always.  This command
10072 (@code{gnus-summary-article-posted-p}) will try to fetch the current
10073 article from your news server (or rather, from
10074 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
10075 report back whether it found the article or not.  Even if it says that
10076 it didn't find the article, it may have been posted anyway---mail
10077 propagation is much faster than news propagation, and the news copy may
10078 just not have arrived yet.
10079
10080 @item K E
10081 @kindex K E (Summary)
10082 @findex gnus-article-encrypt-body
10083 @vindex gnus-article-encrypt-protocol
10084 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
10085 The body is encrypted with the encryption protocol specified by the
10086 variable @code{gnus-article-encrypt-protocol}.
10087
10088 @end table
10089
10090 @vindex gnus-move-split-methods
10091 @cindex moving articles
10092 If you move (or copy) articles regularly, you might wish to have Gnus
10093 suggest where to put the articles.  @code{gnus-move-split-methods} is a
10094 variable that uses the same syntax as @code{gnus-split-methods}
10095 (@pxref{Saving Articles}).  You may customize that variable to create
10096 suggestions you find reasonable.  (Note that
10097 @code{gnus-move-split-methods} uses group names where
10098 @code{gnus-split-methods} uses file names.)
10099
10100 @lisp
10101 (setq gnus-move-split-methods
10102       '(("^From:.*Lars Magne" "nnml:junk")
10103         ("^Subject:.*gnus" "nnfolder:important")
10104         (".*" "nnml:misc")))
10105 @end lisp
10106
10107
10108 @node Various Summary Stuff
10109 @section Various Summary Stuff
10110
10111 @menu
10112 * Summary Group Information::   Information oriented commands.
10113 * Searching for Articles::      Multiple article commands.
10114 * Summary Generation Commands::
10115 * Really Various Summary Commands::  Those pesky non-conformant commands.
10116 @end menu
10117
10118 @table @code
10119 @vindex gnus-summary-display-while-building
10120 @item gnus-summary-display-while-building
10121 If non-@code{nil}, show and update the summary buffer as it's being
10122 built.  If @code{t}, update the buffer after every line is inserted.
10123 If the value is an integer, @var{n}, update the display every @var{n}
10124 lines.  The default is @code{nil}.
10125
10126 @vindex gnus-summary-display-arrow
10127 @item gnus-summary-display-arrow
10128 If non-@code{nil}, display an arrow in the fringe to indicate the
10129 current article.
10130
10131 @vindex gnus-summary-mode-hook
10132 @item gnus-summary-mode-hook
10133 This hook is called when creating a summary mode buffer.
10134
10135 @vindex gnus-summary-generate-hook
10136 @item gnus-summary-generate-hook
10137 This is called as the last thing before doing the threading and the
10138 generation of the summary buffer.  It's quite convenient for customizing
10139 the threading variables based on what data the newsgroup has.  This hook
10140 is called from the summary buffer after most summary buffer variables
10141 have been set.
10142
10143 @vindex gnus-summary-prepare-hook
10144 @item gnus-summary-prepare-hook
10145 It is called after the summary buffer has been generated.  You might use
10146 it to, for instance, highlight lines or modify the look of the buffer in
10147 some other ungodly manner.  I don't care.
10148
10149 @vindex gnus-summary-prepared-hook
10150 @item gnus-summary-prepared-hook
10151 A hook called as the very last thing after the summary buffer has been
10152 generated.
10153
10154 @vindex gnus-summary-ignore-duplicates
10155 @item gnus-summary-ignore-duplicates
10156 When Gnus discovers two articles that have the same @code{Message-ID},
10157 it has to do something drastic.  No articles are allowed to have the
10158 same @code{Message-ID}, but this may happen when reading mail from some
10159 sources.  Gnus allows you to customize what happens with this variable.
10160 If it is @code{nil} (which is the default), Gnus will rename the
10161 @code{Message-ID} (for display purposes only) and display the article as
10162 any other article.  If this variable is @code{t}, it won't display the
10163 article---it'll be as if it never existed.
10164
10165 @vindex gnus-alter-articles-to-read-function
10166 @item gnus-alter-articles-to-read-function
10167 This function, which takes two parameters (the group name and the list
10168 of articles to be selected), is called to allow the user to alter the
10169 list of articles to be selected.
10170
10171 For instance, the following function adds the list of cached articles to
10172 the list in one particular group:
10173
10174 @lisp
10175 (defun my-add-cached-articles (group articles)
10176   (if (string= group "some.group")
10177       (append gnus-newsgroup-cached articles)
10178     articles))
10179 @end lisp
10180
10181 @vindex gnus-newsgroup-variables
10182 @item gnus-newsgroup-variables
10183 A list of newsgroup (summary buffer) local variables, or cons of
10184 variables and their default values (when the default values are not
10185 @code{nil}), that should be made global while the summary buffer is
10186 active.  These variables can be used to set variables in the group
10187 parameters while still allowing them to affect operations done in
10188 other buffers.  For example:
10189
10190 @lisp
10191 (setq gnus-newsgroup-variables
10192       '(message-use-followup-to
10193         (gnus-visible-headers .
10194  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
10195 @end lisp
10196
10197 @end table
10198
10199
10200 @node Summary Group Information
10201 @subsection Summary Group Information
10202
10203 @table @kbd
10204
10205 @item H f
10206 @kindex H f (Summary)
10207 @findex gnus-summary-fetch-faq
10208 @vindex gnus-group-faq-directory
10209 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
10210 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
10211 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
10212 is usually a directory on a remote machine.  This variable can also be
10213 a list of directories.  In that case, giving a prefix to this command
10214 will allow you to choose between the various sites.  @code{ange-ftp}
10215 or @code{efs} will probably be used for fetching the file.
10216
10217 @item H d
10218 @kindex H d (Summary)
10219 @findex gnus-summary-describe-group
10220 Give a brief description of the current group
10221 (@code{gnus-summary-describe-group}).  If given a prefix, force
10222 rereading the description from the server.
10223
10224 @item H h
10225 @kindex H h (Summary)
10226 @findex gnus-summary-describe-briefly
10227 Give an extremely brief description of the most important summary
10228 keystrokes (@code{gnus-summary-describe-briefly}).
10229
10230 @item H i
10231 @kindex H i (Summary)
10232 @findex gnus-info-find-node
10233 Go to the Gnus info node (@code{gnus-info-find-node}).
10234 @end table
10235
10236
10237 @node Searching for Articles
10238 @subsection Searching for Articles
10239
10240 @table @kbd
10241
10242 @item M-s
10243 @kindex M-s (Summary)
10244 @findex gnus-summary-search-article-forward
10245 Search through all subsequent (raw) articles for a regexp
10246 (@code{gnus-summary-search-article-forward}).
10247
10248 @item M-r
10249 @kindex M-r (Summary)
10250 @findex gnus-summary-search-article-backward
10251 Search through all previous (raw) articles for a regexp
10252 (@code{gnus-summary-search-article-backward}).
10253
10254 @item &
10255 @kindex & (Summary)
10256 @findex gnus-summary-execute-command
10257 This command will prompt you for a header, a regular expression to match
10258 on this field, and a command to be executed if the match is made
10259 (@code{gnus-summary-execute-command}).  If the header is an empty
10260 string, the match is done on the entire article.  If given a prefix,
10261 search backward instead.
10262
10263 For instance, @kbd{& RET some.*string RET #} will put the process mark on
10264 all articles that have heads or bodies that match @samp{some.*string}.
10265
10266 @item M-&
10267 @kindex M-& (Summary)
10268 @findex gnus-summary-universal-argument
10269 Perform any operation on all articles that have been marked with
10270 the process mark (@code{gnus-summary-universal-argument}).
10271 @end table
10272
10273 @node Summary Generation Commands
10274 @subsection Summary Generation Commands
10275
10276 @table @kbd
10277
10278 @item Y g
10279 @kindex Y g (Summary)
10280 @findex gnus-summary-prepare
10281 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
10282
10283 @item Y c
10284 @kindex Y c (Summary)
10285 @findex gnus-summary-insert-cached-articles
10286 Pull all cached articles (for the current group) into the summary buffer
10287 (@code{gnus-summary-insert-cached-articles}).
10288
10289 @item Y d
10290 @kindex Y d (Summary)
10291 @findex gnus-summary-insert-dormant-articles
10292 Pull all dormant articles (for the current group) into the summary buffer
10293 (@code{gnus-summary-insert-dormant-articles}).
10294
10295 @end table
10296
10297
10298 @node Really Various Summary Commands
10299 @subsection Really Various Summary Commands
10300
10301 @table @kbd
10302
10303 @item A D
10304 @itemx C-d
10305 @kindex C-d (Summary)
10306 @kindex A D (Summary)
10307 @findex gnus-summary-enter-digest-group
10308 If the current article is a collection of other articles (for instance,
10309 a digest), you might use this command to enter a group based on the that
10310 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
10311 guess what article type is currently displayed unless you give a prefix
10312 to this command, which forces a ``digest'' interpretation.  Basically,
10313 whenever you see a message that is a collection of other messages of
10314 some format, you @kbd{C-d} and read these messages in a more convenient
10315 fashion.
10316
10317 @item C-M-d
10318 @kindex C-M-d (Summary)
10319 @findex gnus-summary-read-document
10320 This command is very similar to the one above, but lets you gather
10321 several documents into one biiig group
10322 (@code{gnus-summary-read-document}).  It does this by opening several
10323 @code{nndoc} groups for each document, and then opening an
10324 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
10325 command understands the process/prefix convention
10326 (@pxref{Process/Prefix}).
10327
10328 @item C-t
10329 @kindex C-t (Summary)
10330 @findex gnus-summary-toggle-truncation
10331 Toggle truncation of summary lines
10332 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
10333 line centering function in the summary buffer, so it's not a good idea
10334 to have truncation switched off while reading articles.
10335
10336 @item =
10337 @kindex = (Summary)
10338 @findex gnus-summary-expand-window
10339 Expand the summary buffer window (@code{gnus-summary-expand-window}).
10340 If given a prefix, force an @code{article} window configuration.
10341
10342 @item C-M-e
10343 @kindex C-M-e (Summary)
10344 @findex gnus-summary-edit-parameters
10345 Edit the group parameters (@pxref{Group Parameters}) of the current
10346 group (@code{gnus-summary-edit-parameters}).
10347
10348 @item C-M-a
10349 @kindex C-M-a (Summary)
10350 @findex gnus-summary-customize-parameters
10351 Customize the group parameters (@pxref{Group Parameters}) of the current
10352 group (@code{gnus-summary-customize-parameters}).
10353
10354 @end table
10355
10356
10357 @node Exiting the Summary Buffer
10358 @section Exiting the Summary Buffer
10359 @cindex summary exit
10360 @cindex exiting groups
10361
10362 Exiting from the summary buffer will normally update all info on the
10363 group and return you to the group buffer.
10364
10365 @table @kbd
10366
10367 @item Z Z
10368 @itemx Z Q
10369 @itemx q
10370 @kindex Z Z (Summary)
10371 @kindex Z Q (Summary)
10372 @kindex q (Summary)
10373 @findex gnus-summary-exit
10374 @vindex gnus-summary-exit-hook
10375 @vindex gnus-summary-prepare-exit-hook
10376 @vindex gnus-group-no-more-groups-hook
10377 @c @icon{gnus-summary-exit}
10378 Exit the current group and update all information on the group
10379 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
10380 called before doing much of the exiting, which calls
10381 @code{gnus-summary-expire-articles} by default.
10382 @code{gnus-summary-exit-hook} is called after finishing the exit
10383 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
10384 group mode having no more (unread) groups.
10385
10386 @item Z E
10387 @itemx Q
10388 @kindex Z E (Summary)
10389 @kindex Q (Summary)
10390 @findex gnus-summary-exit-no-update
10391 Exit the current group without updating any information on the group
10392 (@code{gnus-summary-exit-no-update}).
10393
10394 @item Z c
10395 @itemx c
10396 @kindex Z c (Summary)
10397 @kindex c (Summary)
10398 @findex gnus-summary-catchup-and-exit
10399 @c @icon{gnus-summary-catchup-and-exit}
10400 Mark all unticked articles in the group as read and then exit
10401 (@code{gnus-summary-catchup-and-exit}).
10402
10403 @item Z C
10404 @kindex Z C (Summary)
10405 @findex gnus-summary-catchup-all-and-exit
10406 Mark all articles, even the ticked ones, as read and then exit
10407 (@code{gnus-summary-catchup-all-and-exit}).
10408
10409 @item Z n
10410 @kindex Z n (Summary)
10411 @findex gnus-summary-catchup-and-goto-next-group
10412 Mark all articles as read and go to the next group
10413 (@code{gnus-summary-catchup-and-goto-next-group}).
10414
10415 @item Z R
10416 @itemx C-x C-s
10417 @kindex Z R (Summary)
10418 @kindex C-x C-s (Summary)
10419 @findex gnus-summary-reselect-current-group
10420 Exit this group, and then enter it again
10421 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
10422 all articles, both read and unread.
10423
10424 @item Z G
10425 @itemx M-g
10426 @kindex Z G (Summary)
10427 @kindex M-g (Summary)
10428 @findex gnus-summary-rescan-group
10429 @c @icon{gnus-summary-mail-get}
10430 Exit the group, check for new articles in the group, and select the
10431 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
10432 articles, both read and unread.
10433
10434 @item Z N
10435 @kindex Z N (Summary)
10436 @findex gnus-summary-next-group
10437 Exit the group and go to the next group
10438 (@code{gnus-summary-next-group}).
10439
10440 @item Z P
10441 @kindex Z P (Summary)
10442 @findex gnus-summary-prev-group
10443 Exit the group and go to the previous group
10444 (@code{gnus-summary-prev-group}).
10445
10446 @item Z s
10447 @kindex Z s (Summary)
10448 @findex gnus-summary-save-newsrc
10449 Save the current number of read/marked articles in the dribble buffer
10450 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
10451 given a prefix, also save the @file{.newsrc} file(s).  Using this
10452 command will make exit without updating (the @kbd{Q} command) worthless.
10453 @end table
10454
10455 @vindex gnus-exit-group-hook
10456 @code{gnus-exit-group-hook} is called when you exit the current group
10457 with an ``updating'' exit.  For instance @kbd{Q}
10458 (@code{gnus-summary-exit-no-update}) does not call this hook.
10459
10460 @findex gnus-summary-wake-up-the-dead
10461 @findex gnus-dead-summary-mode
10462 @vindex gnus-kill-summary-on-exit
10463 If you're in the habit of exiting groups, and then changing your mind
10464 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
10465 If you do that, Gnus won't kill the summary buffer when you exit it.
10466 (Quelle surprise!)  Instead it will change the name of the buffer to
10467 something like @samp{*Dead Summary ... *} and install a minor mode
10468 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
10469 buffer, you'll find that all keys are mapped to a function called
10470 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
10471 summary buffer will result in a live, normal summary buffer.
10472
10473 There will never be more than one dead summary buffer at any one time.
10474
10475 @vindex gnus-use-cross-reference
10476 The data on the current group will be updated (which articles you have
10477 read, which articles you have replied to, etc.) when you exit the
10478 summary buffer.  If the @code{gnus-use-cross-reference} variable is
10479 @code{t} (which is the default), articles that are cross-referenced to
10480 this group and are marked as read, will also be marked as read in the
10481 other subscribed groups they were cross-posted to.  If this variable is
10482 neither @code{nil} nor @code{t}, the article will be marked as read in
10483 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
10484
10485
10486 @node Crosspost Handling
10487 @section Crosspost Handling
10488
10489 @cindex velveeta
10490 @cindex spamming
10491 Marking cross-posted articles as read ensures that you'll never have to
10492 read the same article more than once.  Unless, of course, somebody has
10493 posted it to several groups separately.  Posting the same article to
10494 several groups (not cross-posting) is called @dfn{spamming}, and you are
10495 by law required to send nasty-grams to anyone who perpetrates such a
10496 heinous crime.  You may want to try NoCeM handling to filter out spam
10497 (@pxref{NoCeM}).
10498
10499 Remember: Cross-posting is kinda ok, but posting the same article
10500 separately to several groups is not.  Massive cross-posting (aka.
10501 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
10502 @code{gnus-summary-mail-crosspost-complaint} command to complain about
10503 excessive crossposting (@pxref{Summary Mail Commands}).
10504
10505 @cindex cross-posting
10506 @cindex Xref
10507 @cindex @acronym{NOV}
10508 One thing that may cause Gnus to not do the cross-posting thing
10509 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
10510 (which is very nice, because it speeds things up considerably) which
10511 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
10512 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
10513 even with @sc{xover} by registering the @code{Xref} lines of all
10514 articles you actually read, but if you kill the articles, or just mark
10515 them as read without reading them, Gnus will not get a chance to snoop
10516 the @code{Xref} lines out of these articles, and will be unable to use
10517 the cross reference mechanism.
10518
10519 @cindex LIST overview.fmt
10520 @cindex overview.fmt
10521 To check whether your @acronym{NNTP} server includes the @code{Xref} header
10522 in its overview files, try @samp{telnet your.nntp.server nntp},
10523 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
10524 overview.fmt}.  This may not work, but if it does, and the last line you
10525 get does not read @samp{Xref:full}, then you should shout and whine at
10526 your news admin until she includes the @code{Xref} header in the
10527 overview files.
10528
10529 @vindex gnus-nov-is-evil
10530 If you want Gnus to get the @code{Xref}s right all the time, you have to
10531 set @code{gnus-nov-is-evil} to @code{t}, which slows things down
10532 considerably.
10533
10534 C'est la vie.
10535
10536 For an alternative approach, @pxref{Duplicate Suppression}.
10537
10538
10539 @node Duplicate Suppression
10540 @section Duplicate Suppression
10541
10542 By default, Gnus tries to make sure that you don't have to read the same
10543 article more than once by utilizing the crossposting mechanism
10544 (@pxref{Crosspost Handling}).  However, that simple and efficient
10545 approach may not work satisfactory for some users for various
10546 reasons.
10547
10548 @enumerate
10549 @item
10550 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
10551 is evil and not very common.
10552
10553 @item
10554 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
10555 @file{.overview} data bases.  This is evil and all too common, alas.
10556
10557 @item
10558 You may be reading the same group (or several related groups) from
10559 different @acronym{NNTP} servers.
10560
10561 @item
10562 You may be getting mail that duplicates articles posted to groups.
10563 @end enumerate
10564
10565 I'm sure there are other situations where @code{Xref} handling fails as
10566 well, but these four are the most common situations.
10567
10568 If, and only if, @code{Xref} handling fails for you, then you may
10569 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
10570 will remember the @code{Message-ID}s of all articles you have read or
10571 otherwise marked as read, and then, as if by magic, mark them as read
10572 all subsequent times you see them---in @emph{all} groups.  Using this
10573 mechanism is quite likely to be somewhat inefficient, but not overly
10574 so.  It's certainly preferable to reading the same articles more than
10575 once.
10576
10577 Duplicate suppression is not a very subtle instrument.  It's more like a
10578 sledge hammer than anything else.  It works in a very simple
10579 fashion---if you have marked an article as read, it adds this Message-ID
10580 to a cache.  The next time it sees this Message-ID, it will mark the
10581 article as read with the @samp{M} mark.  It doesn't care what group it
10582 saw the article in.
10583
10584 @table @code
10585 @item gnus-suppress-duplicates
10586 @vindex gnus-suppress-duplicates
10587 If non-@code{nil}, suppress duplicates.
10588
10589 @item gnus-save-duplicate-list
10590 @vindex gnus-save-duplicate-list
10591 If non-@code{nil}, save the list of duplicates to a file.  This will
10592 make startup and shutdown take longer, so the default is @code{nil}.
10593 However, this means that only duplicate articles read in a single Gnus
10594 session are suppressed.
10595
10596 @item gnus-duplicate-list-length
10597 @vindex gnus-duplicate-list-length
10598 This variable says how many @code{Message-ID}s to keep in the duplicate
10599 suppression list.  The default is 10000.
10600
10601 @item gnus-duplicate-file
10602 @vindex gnus-duplicate-file
10603 The name of the file to store the duplicate suppression list in.  The
10604 default is @file{~/News/suppression}.
10605 @end table
10606
10607 If you have a tendency to stop and start Gnus often, setting
10608 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
10609 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
10610 the other hand, saving the list makes startup and shutdown much slower,
10611 so that means that if you stop and start Gnus often, you should set
10612 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
10613 to you to figure out, I think.
10614
10615 @node Security
10616 @section Security
10617
10618 Gnus is able to verify signed messages or decrypt encrypted messages.
10619 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
10620 and @acronym{S/MIME}, however you need some external programs to get
10621 things to work:
10622
10623 @enumerate
10624 @item
10625 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
10626 install an OpenPGP implementation such as GnuPG.  The Lisp interface
10627 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
10628 Manual}), but Mailcrypt and gpg.el are also supported.
10629
10630 @item
10631 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
10632 or newer is recommended.
10633
10634 @end enumerate
10635
10636 More information on how to set things up can be found in the message
10637 manual (@pxref{Security, ,Security, message, Message Manual}).
10638
10639 @table @code
10640 @item mm-verify-option
10641 @vindex mm-verify-option
10642 Option of verifying signed parts.  @code{never}, not verify;
10643 @code{always}, always verify; @code{known}, only verify known
10644 protocols.  Otherwise, ask user.
10645
10646 @item mm-decrypt-option
10647 @vindex mm-decrypt-option
10648 Option of decrypting encrypted parts.  @code{never}, no decryption;
10649 @code{always}, always decrypt; @code{known}, only decrypt known
10650 protocols.  Otherwise, ask user.
10651
10652 @item mml1991-use
10653 @vindex mml1991-use
10654 Symbol indicating elisp interface to OpenPGP implementation for
10655 @acronym{PGP} messages.  The default is @code{pgg}, but
10656 @code{mailcrypt} and @code{gpg} are also supported although
10657 deprecated.
10658
10659 @item mml2015-use
10660 @vindex mml2015-use
10661 Symbol indicating elisp interface to OpenPGP implementation for
10662 @acronym{PGP/MIME} messages.  The default is @code{pgg}, but
10663 @code{mailcrypt} and @code{gpg} are also supported although
10664 deprecated.
10665
10666 @end table
10667
10668 @cindex snarfing keys
10669 @cindex importing PGP keys
10670 @cindex PGP key ring import
10671 Snarfing OpenPGP keys (i.e., importing keys from articles into your
10672 key ring) is not supported explicitly through a menu item or command,
10673 rather Gnus do detect and label keys as @samp{application/pgp-keys},
10674 allowing you to specify whatever action you think is appropriate
10675 through the usual @acronym{MIME} infrastructure.  You can use a
10676 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
10677 Emacs MIME Manual}) such as the following to import keys using GNU
10678 Privacy Guard when you click on the @acronym{MIME} button
10679 (@pxref{Using MIME}).
10680
10681 @example
10682 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
10683 @end example
10684 @noindent
10685 This happens to also be the default action defined in
10686 @code{mailcap-mime-data}.
10687
10688 @node Mailing List
10689 @section Mailing List
10690 @cindex mailing list
10691 @cindex RFC 2396
10692
10693 @kindex A M (summary)
10694 @findex gnus-mailing-list-insinuate
10695 Gnus understands some mailing list fields of RFC 2369.  To enable it,
10696 add a @code{to-list} group parameter (@pxref{Group Parameters}),
10697 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
10698 summary buffer.
10699
10700 That enables the following commands to the summary buffer:
10701
10702 @table @kbd
10703
10704 @item C-c C-n h
10705 @kindex C-c C-n h (Summary)
10706 @findex gnus-mailing-list-help
10707 Send a message to fetch mailing list help, if List-Help field exists.
10708
10709 @item C-c C-n s
10710 @kindex C-c C-n s (Summary)
10711 @findex gnus-mailing-list-subscribe
10712 Send a message to subscribe the mailing list, if List-Subscribe field exists.
10713
10714 @item C-c C-n u
10715 @kindex C-c C-n u (Summary)
10716 @findex gnus-mailing-list-unsubscribe
10717 Send a message to unsubscribe the mailing list, if List-Unsubscribe
10718 field exists.
10719
10720 @item C-c C-n p
10721 @kindex C-c C-n p (Summary)
10722 @findex gnus-mailing-list-post
10723 Post to the mailing list, if List-Post field exists.
10724
10725 @item C-c C-n o
10726 @kindex C-c C-n o (Summary)
10727 @findex gnus-mailing-list-owner
10728 Send a message to the mailing list owner, if List-Owner field exists.
10729
10730 @item C-c C-n a
10731 @kindex C-c C-n a (Summary)
10732 @findex gnus-mailing-list-owner
10733 Browse the mailing list archive, if List-Archive field exists.
10734
10735 @end table
10736
10737
10738 @node Article Buffer
10739 @chapter Article Buffer
10740 @cindex article buffer
10741
10742 The articles are displayed in the article buffer, of which there is only
10743 one.  All the summary buffers share the same article buffer unless you
10744 tell Gnus otherwise.
10745
10746 @menu
10747 * Hiding Headers::              Deciding what headers should be displayed.
10748 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
10749 * Customizing Articles::        Tailoring the look of the articles.
10750 * Article Keymap::              Keystrokes available in the article buffer.
10751 * Misc Article::                Other stuff.
10752 @end menu
10753
10754
10755 @node Hiding Headers
10756 @section Hiding Headers
10757 @cindex hiding headers
10758 @cindex deleting headers
10759
10760 The top section of each article is the @dfn{head}.  (The rest is the
10761 @dfn{body}, but you may have guessed that already.)
10762
10763 @vindex gnus-show-all-headers
10764 There is a lot of useful information in the head: the name of the person
10765 who wrote the article, the date it was written and the subject of the
10766 article.  That's well and nice, but there's also lots of information
10767 most people do not want to see---what systems the article has passed
10768 through before reaching you, the @code{Message-ID}, the
10769 @code{References}, etc. ad nauseam---and you'll probably want to get rid
10770 of some of those lines.  If you want to keep all those lines in the
10771 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
10772
10773 Gnus provides you with two variables for sifting headers:
10774
10775 @table @code
10776
10777 @item gnus-visible-headers
10778 @vindex gnus-visible-headers
10779 If this variable is non-@code{nil}, it should be a regular expression
10780 that says what headers you wish to keep in the article buffer.  All
10781 headers that do not match this variable will be hidden.
10782
10783 For instance, if you only want to see the name of the person who wrote
10784 the article and the subject, you'd say:
10785
10786 @lisp
10787 (setq gnus-visible-headers "^From:\\|^Subject:")
10788 @end lisp
10789
10790 This variable can also be a list of regexps to match headers to
10791 remain visible.
10792
10793 @item gnus-ignored-headers
10794 @vindex gnus-ignored-headers
10795 This variable is the reverse of @code{gnus-visible-headers}.  If this
10796 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
10797 should be a regular expression that matches all lines that you want to
10798 hide.  All lines that do not match this variable will remain visible.
10799
10800 For instance, if you just want to get rid of the @code{References} line
10801 and the @code{Xref} line, you might say:
10802
10803 @lisp
10804 (setq gnus-ignored-headers "^References:\\|^Xref:")
10805 @end lisp
10806
10807 This variable can also be a list of regexps to match headers to
10808 be removed.
10809
10810 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
10811 variable will have no effect.
10812
10813 @end table
10814
10815 @vindex gnus-sorted-header-list
10816 Gnus can also sort the headers for you.  (It does this by default.)  You
10817 can control the sorting by setting the @code{gnus-sorted-header-list}
10818 variable.  It is a list of regular expressions that says in what order
10819 the headers are to be displayed.
10820
10821 For instance, if you want the name of the author of the article first,
10822 and then the subject, you might say something like:
10823
10824 @lisp
10825 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
10826 @end lisp
10827
10828 Any headers that are to remain visible, but are not listed in this
10829 variable, will be displayed in random order after all the headers listed in this variable.
10830
10831 @findex gnus-article-hide-boring-headers
10832 @vindex gnus-boring-article-headers
10833 You can hide further boring headers by setting
10834 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
10835 does depends on the @code{gnus-boring-article-headers} variable.  It's a
10836 list, but this list doesn't actually contain header names.  Instead it
10837 lists various @dfn{boring conditions} that Gnus can check and remove
10838 from sight.
10839
10840 These conditions are:
10841 @table @code
10842 @item empty
10843 Remove all empty headers.
10844 @item followup-to
10845 Remove the @code{Followup-To} header if it is identical to the
10846 @code{Newsgroups} header.
10847 @item reply-to
10848 Remove the @code{Reply-To} header if it lists the same addresses as
10849 the @code{From} header, or if the @code{broken-reply-to} group
10850 parameter is set.
10851 @item newsgroups
10852 Remove the @code{Newsgroups} header if it only contains the current group
10853 name.
10854 @item to-address
10855 Remove the @code{To} header if it only contains the address identical to
10856 the current group's @code{to-address} parameter.
10857 @item to-list
10858 Remove the @code{To} header if it only contains the address identical to
10859 the current group's @code{to-list} parameter.
10860 @item cc-list
10861 Remove the @code{CC} header if it only contains the address identical to
10862 the current group's @code{to-list} parameter.
10863 @item date
10864 Remove the @code{Date} header if the article is less than three days
10865 old.
10866 @item long-to
10867 Remove the @code{To} header if it is very long.
10868 @item many-to
10869 Remove all @code{To} headers if there are more than one.
10870 @end table
10871
10872 To include these three elements, you could say something like:
10873
10874 @lisp
10875 (setq gnus-boring-article-headers
10876       '(empty followup-to reply-to))
10877 @end lisp
10878
10879 This is also the default value for this variable.
10880
10881
10882 @node Using MIME
10883 @section Using MIME
10884 @cindex @acronym{MIME}
10885
10886 Mime is a standard for waving your hands through the air, aimlessly,
10887 while people stand around yawning.
10888
10889 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
10890 while all newsreaders die of fear.
10891
10892 @acronym{MIME} may specify what character set the article uses, the encoding
10893 of the characters, and it also makes it possible to embed pictures and
10894 other naughty stuff in innocent-looking articles.
10895
10896 @vindex gnus-display-mime-function
10897 @findex gnus-display-mime
10898 Gnus pushes @acronym{MIME} articles through @code{gnus-display-mime-function}
10899 to display the @acronym{MIME} parts.  This is @code{gnus-display-mime} by
10900 default, which creates a bundle of clickable buttons that can be used to
10901 display, save and manipulate the @acronym{MIME} objects.
10902
10903 The following commands are available when you have placed point over a
10904 @acronym{MIME} button:
10905
10906 @table @kbd
10907 @findex gnus-article-press-button
10908 @item RET (Article)
10909 @kindex RET (Article)
10910 @itemx BUTTON-2 (Article)
10911 Toggle displaying of the @acronym{MIME} object
10912 (@code{gnus-article-press-button}).  If built-in viewers can not display
10913 the object, Gnus resorts to external viewers in the @file{mailcap}
10914 files.  If a viewer has the @samp{copiousoutput} specification, the
10915 object is displayed inline.
10916
10917 @findex gnus-mime-view-part
10918 @item M-RET (Article)
10919 @kindex M-RET (Article)
10920 @itemx v (Article)
10921 Prompt for a method, and then view the @acronym{MIME} object using this
10922 method (@code{gnus-mime-view-part}).
10923
10924 @findex gnus-mime-view-part-as-type
10925 @item t (Article)
10926 @kindex t (Article)
10927 View the @acronym{MIME} object as if it were a different @acronym{MIME} media type
10928 (@code{gnus-mime-view-part-as-type}).
10929
10930 @findex gnus-mime-view-part-as-charset
10931 @item C (Article)
10932 @kindex C (Article)
10933 Prompt for a charset, and then view the @acronym{MIME} object using this
10934 charset (@code{gnus-mime-view-part-as-charset}).
10935
10936 @findex gnus-mime-save-part
10937 @item o (Article)
10938 @kindex o (Article)
10939 Prompt for a file name, and then save the @acronym{MIME} object
10940 (@code{gnus-mime-save-part}).
10941
10942 @findex gnus-mime-save-part-and-strip
10943 @item C-o (Article)
10944 @kindex C-o (Article)
10945 Prompt for a file name, then save the @acronym{MIME} object and strip it from
10946 the article.  Then proceed to article editing, where a reasonable
10947 suggestion is being made on how the altered article should look
10948 like.  The stripped @acronym{MIME} object will be referred via the
10949 message/external-body @acronym{MIME} type.
10950 (@code{gnus-mime-save-part-and-strip}).
10951
10952 @findex gnus-mime-delete-part
10953 @item d (Article)
10954 @kindex d (Article)
10955 Delete the @acronym{MIME} object from the article and replace it with some
10956 information about the removed @acronym{MIME} object
10957 (@code{gnus-mime-delete-part}).
10958
10959 @findex gnus-mime-copy-part
10960 @item c (Article)
10961 @kindex c (Article)
10962 Copy the @acronym{MIME} object to a fresh buffer and display this buffer
10963 (@code{gnus-mime-copy-part}).  Compressed files like @file{.gz} and
10964 @file{.bz2} are automatically decompressed if
10965 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
10966 Accessing Compressed Files, emacs, The Emacs Editor}).
10967
10968 @findex gnus-mime-print-part
10969 @item p (Article)
10970 @kindex p (Article)
10971 Print the @acronym{MIME} object (@code{gnus-mime-print-part}).  This
10972 command respects the @samp{print=} specifications in the
10973 @file{.mailcap} file.
10974
10975 @findex gnus-mime-inline-part
10976 @item i (Article)
10977 @kindex i (Article)
10978 Insert the contents of the @acronym{MIME} object into the buffer
10979 (@code{gnus-mime-inline-part}) as text/plain.  If given a prefix, insert
10980 the raw contents without decoding.  If given a numerical prefix, you can
10981 do semi-manual charset stuff (see
10982 @code{gnus-summary-show-article-charset-alist} in @ref{Paging the
10983 Article}).
10984
10985 @findex gnus-mime-view-part-internally
10986 @item E (Article)
10987 @kindex E (Article)
10988 View the @acronym{MIME} object with an internal viewer.  If no internal
10989 viewer is available, use an external viewer
10990 (@code{gnus-mime-view-part-internally}).
10991
10992 @findex gnus-mime-view-part-externally
10993 @item e (Article)
10994 @kindex e (Article)
10995 View the @acronym{MIME} object with an external viewer.
10996 (@code{gnus-mime-view-part-externally}).
10997
10998 @findex gnus-mime-pipe-part
10999 @item | (Article)
11000 @kindex | (Article)
11001 Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}).
11002
11003 @findex gnus-mime-action-on-part
11004 @item . (Article)
11005 @kindex . (Article)
11006 Interactively run an action on the @acronym{MIME} object
11007 (@code{gnus-mime-action-on-part}).
11008
11009 @end table
11010
11011 Gnus will display some @acronym{MIME} objects automatically.  The way Gnus
11012 determines which parts to do this with is described in the Emacs
11013 @acronym{MIME} manual.
11014
11015 It might be best to just use the toggling functions from the article
11016 buffer to avoid getting nasty surprises.  (For instance, you enter the
11017 group @samp{alt.sing-a-long} and, before you know it, @acronym{MIME} has
11018 decoded the sound file in the article and some horrible sing-a-long song
11019 comes screaming out your speakers, and you can't find the volume button,
11020 because there isn't one, and people are starting to look at you, and you
11021 try to stop the program, but you can't, and you can't find the program
11022 to control the volume, and everybody else in the room suddenly decides
11023 to look at you disdainfully, and you'll feel rather stupid.)
11024
11025 Any similarity to real events and people is purely coincidental.  Ahem.
11026
11027 Also @pxref{MIME Commands}.
11028
11029
11030 @node Customizing Articles
11031 @section Customizing Articles
11032 @cindex article customization
11033
11034 A slew of functions for customizing how the articles are to look like
11035 exist.  You can call these functions interactively
11036 (@pxref{Article Washing}), or you can have them
11037 called automatically when you select the articles.
11038
11039 To have them called automatically, you should set the corresponding
11040 ``treatment'' variable.  For instance, to have headers hidden, you'd set
11041 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
11042 be set, but first we discuss the values these variables can have.
11043
11044 Note: Some values, while valid, make little sense.  Check the list below
11045 for sensible values.
11046
11047 @enumerate
11048 @item
11049 @code{nil}: Don't do this treatment.
11050
11051 @item
11052 @code{t}: Do this treatment on all body parts.
11053
11054 @item
11055 @code{head}: Do the treatment on the headers.
11056
11057 @item
11058 @code{last}: Do this treatment on the last part.
11059
11060 @item
11061 An integer: Do this treatment on all body parts that have a length less
11062 than this number.
11063
11064 @item
11065 A list of strings: Do this treatment on all body parts that are in
11066 articles that are read in groups that have names that match one of the
11067 regexps in the list.
11068
11069 @item
11070 A list where the first element is not a string:
11071
11072 The list is evaluated recursively.  The first element of the list is a
11073 predicate.  The following predicates are recognized: @code{or},
11074 @code{and}, @code{not} and @code{typep}.  Here's an example:
11075
11076 @lisp
11077 (or last
11078     (typep "text/x-vcard"))
11079 @end lisp
11080
11081 @end enumerate
11082
11083 You may have noticed that the word @dfn{part} is used here.  This refers
11084 to the fact that some messages are @acronym{MIME} multipart articles that may
11085 be divided into several parts.  Articles that are not multiparts are
11086 considered to contain just a single part.
11087
11088 @vindex gnus-article-treat-types
11089 Are the treatments applied to all sorts of multipart parts?  Yes, if you
11090 want to, but by default, only @samp{text/plain} parts are given the
11091 treatment.  This is controlled by the @code{gnus-article-treat-types}
11092 variable, which is a list of regular expressions that are matched to the
11093 type of the part.  This variable is ignored if the value of the
11094 controlling variable is a predicate list, as described above.
11095
11096 The following treatment options are available.  The easiest way to
11097 customize this is to examine the @code{gnus-article-treat} customization
11098 group.  Values in parenthesis are suggested sensible values.  Others are
11099 possible but those listed are probably sufficient for most people.
11100
11101 @table @code
11102 @item gnus-treat-buttonize (t, integer)
11103 @item gnus-treat-buttonize-head (head)
11104
11105 @xref{Article Buttons}.
11106
11107 @item gnus-treat-capitalize-sentences (t, integer)
11108 @item gnus-treat-overstrike (t, integer)
11109 @item gnus-treat-strip-cr (t, integer)
11110 @item gnus-treat-strip-headers-in-body (t, integer)
11111 @item gnus-treat-strip-leading-blank-lines (t, integer)
11112 @item gnus-treat-strip-multiple-blank-lines (t, integer)
11113 @item gnus-treat-strip-pem (t, last, integer)
11114 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
11115 @item gnus-treat-unsplit-urls (t, integer)
11116 @item gnus-treat-wash-html (t, integer)
11117
11118 @xref{Article Washing}.
11119
11120 @item gnus-treat-date-english (head)
11121 @item gnus-treat-date-iso8601 (head)
11122 @item gnus-treat-date-lapsed (head)
11123 @item gnus-treat-date-local (head)
11124 @item gnus-treat-date-original (head)
11125 @item gnus-treat-date-user-defined (head)
11126 @item gnus-treat-date-ut (head)
11127
11128 @xref{Article Date}.
11129
11130 @item gnus-treat-from-picon (head)
11131 @item gnus-treat-mail-picon (head)
11132 @item gnus-treat-newsgroups-picon (head)
11133
11134 @xref{Picons}.
11135
11136 @item gnus-treat-display-smileys (t, integer)
11137
11138 @item gnus-treat-body-boundary (head)
11139
11140 @vindex gnus-body-boundary-delimiter
11141 Adds a delimiter between header and body, the string used as delimiter
11142 is controlled by @code{gnus-body-boundary-delimiter}.
11143
11144 @xref{Smileys}.
11145
11146 @item gnus-treat-display-x-face (head)
11147
11148 @xref{X-Face}.
11149
11150 @item gnus-treat-display-face (head)
11151
11152 @xref{Face}.
11153
11154 @item gnus-treat-emphasize (t, head, integer)
11155 @item gnus-treat-fill-article (t, integer)
11156 @item gnus-treat-fill-long-lines (t, integer)
11157 @item gnus-treat-hide-boring-headers (head)
11158 @item gnus-treat-hide-citation (t, integer)
11159 @item gnus-treat-hide-citation-maybe (t, integer)
11160 @item gnus-treat-hide-headers (head)
11161 @item gnus-treat-hide-signature (t, last)
11162 @item gnus-treat-strip-banner (t, last)
11163 @item gnus-treat-strip-list-identifiers (head)
11164
11165 @xref{Article Hiding}.
11166
11167 @item gnus-treat-highlight-citation (t, integer)
11168 @item gnus-treat-highlight-headers (head)
11169 @item gnus-treat-highlight-signature (t, last, integer)
11170
11171 @xref{Article Highlighting}.
11172
11173 @item gnus-treat-play-sounds
11174 @item gnus-treat-translate
11175 @item gnus-treat-x-pgp-sig (head)
11176
11177 @item gnus-treat-unfold-headers (head)
11178 @item gnus-treat-fold-headers (head)
11179 @item gnus-treat-fold-newsgroups (head)
11180 @item gnus-treat-leading-whitespace (head)
11181
11182 @xref{Article Header}.
11183
11184
11185 @end table
11186
11187 @vindex gnus-part-display-hook
11188 You can, of course, write your own functions to be called from
11189 @code{gnus-part-display-hook}.  The functions are called narrowed to the
11190 part, and you can do anything you like, pretty much.  There is no
11191 information that you have to keep in the buffer---you can change
11192 everything.
11193
11194
11195 @node Article Keymap
11196 @section Article Keymap
11197
11198 Most of the keystrokes in the summary buffer can also be used in the
11199 article buffer.  They should behave as if you typed them in the summary
11200 buffer, which means that you don't actually have to have a summary
11201 buffer displayed while reading.  You can do it all from the article
11202 buffer.
11203
11204 A few additional keystrokes are available:
11205
11206 @table @kbd
11207
11208 @item SPACE
11209 @kindex SPACE (Article)
11210 @findex gnus-article-next-page
11211 Scroll forwards one page (@code{gnus-article-next-page}).
11212 This is exactly the same as @kbd{h SPACE h}.
11213
11214 @item DEL
11215 @kindex DEL (Article)
11216 @findex gnus-article-prev-page
11217 Scroll backwards one page (@code{gnus-article-prev-page}).
11218 This is exactly the same as @kbd{h DEL h}.
11219
11220 @item C-c ^
11221 @kindex C-c ^ (Article)
11222 @findex gnus-article-refer-article
11223 If point is in the neighborhood of a @code{Message-ID} and you press
11224 @kbd{C-c ^}, Gnus will try to get that article from the server
11225 (@code{gnus-article-refer-article}).
11226
11227 @item C-c C-m
11228 @kindex C-c C-m (Article)
11229 @findex gnus-article-mail
11230 Send a reply to the address near point (@code{gnus-article-mail}).  If
11231 given a prefix, include the mail.
11232
11233 @item s
11234 @kindex s (Article)
11235 @findex gnus-article-show-summary
11236 Reconfigure the buffers so that the summary buffer becomes visible
11237 (@code{gnus-article-show-summary}).
11238
11239 @item ?
11240 @kindex ? (Article)
11241 @findex gnus-article-describe-briefly
11242 Give a very brief description of the available keystrokes
11243 (@code{gnus-article-describe-briefly}).
11244
11245 @item TAB
11246 @kindex TAB (Article)
11247 @findex gnus-article-next-button
11248 Go to the next button, if any (@code{gnus-article-next-button}).  This
11249 only makes sense if you have buttonizing turned on.
11250
11251 @item M-TAB
11252 @kindex M-TAB (Article)
11253 @findex gnus-article-prev-button
11254 Go to the previous button, if any (@code{gnus-article-prev-button}).
11255
11256 @item R
11257 @kindex R (Article)
11258 @findex gnus-article-reply-with-original
11259 Send a reply to the current article and yank the current article
11260 (@code{gnus-article-reply-with-original}).  If given a prefix, make a
11261 wide reply.  If the region is active, only yank the text in the
11262 region.
11263
11264 @item F
11265 @kindex F (Article)
11266 @findex gnus-article-followup-with-original
11267 Send a followup to the current article and yank the current article
11268 (@code{gnus-article-followup-with-original}).  If given a prefix, make
11269 a wide reply.  If the region is active, only yank the text in the
11270 region.
11271
11272
11273 @end table
11274
11275
11276 @node Misc Article
11277 @section Misc Article
11278
11279 @table @code
11280
11281 @item gnus-single-article-buffer
11282 @vindex gnus-single-article-buffer
11283 If non-@code{nil}, use the same article buffer for all the groups.
11284 (This is the default.)  If @code{nil}, each group will have its own
11285 article buffer.
11286
11287 @vindex gnus-article-decode-hook
11288 @item gnus-article-decode-hook
11289 @cindex @acronym{MIME}
11290 Hook used to decode @acronym{MIME} articles.  The default value is
11291 @code{(article-decode-charset article-decode-encoded-words)}
11292
11293 @vindex gnus-article-prepare-hook
11294 @item gnus-article-prepare-hook
11295 This hook is called right after the article has been inserted into the
11296 article buffer.  It is mainly intended for functions that do something
11297 depending on the contents; it should probably not be used for changing
11298 the contents of the article buffer.
11299
11300 @item gnus-article-mode-hook
11301 @vindex gnus-article-mode-hook
11302 Hook called in article mode buffers.
11303
11304 @item gnus-article-mode-syntax-table
11305 @vindex gnus-article-mode-syntax-table
11306 Syntax table used in article buffers.  It is initialized from
11307 @code{text-mode-syntax-table}.
11308
11309 @vindex gnus-article-over-scroll
11310 @item gnus-article-over-scroll
11311 If non-@code{nil}, allow scrolling the article buffer even when there
11312 no more new text to scroll in.  The default is @code{nil}.
11313
11314 @vindex gnus-article-mode-line-format
11315 @item gnus-article-mode-line-format
11316 This variable is a format string along the same lines as
11317 @code{gnus-summary-mode-line-format} (@pxref{Mode Line Formatting}).  It
11318 accepts the same format specifications as that variable, with two
11319 extensions:
11320
11321 @table @samp
11322
11323 @item w
11324 The @dfn{wash status} of the article.  This is a short string with one
11325 character for each possible article wash operation that may have been
11326 performed.  The characters and their meaning:
11327
11328 @table @samp
11329
11330 @item c
11331 Displayed when cited text may be hidden in the article buffer.
11332
11333 @item h
11334 Displayed when headers are hidden in the article buffer.
11335
11336 @item p
11337 Displayed when article is digitally signed or encrypted, and Gnus has
11338 hidden the security headers.  (N.B. does not tell anything about
11339 security status, i.e. good or bad signature.)
11340
11341 @item s
11342 Displayed when the signature has been hidden in the Article buffer.
11343
11344 @item o
11345 Displayed when Gnus has treated overstrike characters in the article buffer.
11346
11347 @item e
11348 Displayed when Gnus has treated emphasised strings in the article buffer.
11349
11350 @end table
11351
11352 @item m
11353 The number of @acronym{MIME} parts in the article.
11354
11355 @end table
11356
11357 @vindex gnus-break-pages
11358
11359 @item gnus-break-pages
11360 Controls whether @dfn{page breaking} is to take place.  If this variable
11361 is non-@code{nil}, the articles will be divided into pages whenever a
11362 page delimiter appears in the article.  If this variable is @code{nil},
11363 paging will not be done.
11364
11365 @item gnus-page-delimiter
11366 @vindex gnus-page-delimiter
11367 This is the delimiter mentioned above.  By default, it is @samp{^L}
11368 (formfeed).
11369
11370 @cindex IDNA
11371 @cindex internationalized domain names
11372 @vindex gnus-use-idna
11373 @item gnus-use-idna
11374 This variable controls whether Gnus performs IDNA decoding of
11375 internationalized domain names inside @samp{From}, @samp{To} and
11376 @samp{Cc} headers.  This requires
11377 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
11378 variable is only enabled if you have installed it.
11379
11380 @end table
11381
11382
11383 @node Composing Messages
11384 @chapter Composing Messages
11385 @cindex composing messages
11386 @cindex messages
11387 @cindex mail
11388 @cindex sending mail
11389 @cindex reply
11390 @cindex followup
11391 @cindex post
11392 @cindex using gpg
11393 @cindex using s/mime
11394 @cindex using smime
11395
11396 @kindex C-c C-c (Post)
11397 All commands for posting and mailing will put you in a message buffer
11398 where you can edit the article all you like, before you send the
11399 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
11400 Message Manual}.  Where the message will be posted/mailed to depends
11401 on your setup (@pxref{Posting Server}).
11402
11403 @menu
11404 * Mail::                        Mailing and replying.
11405 * Posting Server::              What server should you post and mail via?
11406 * Mail and Post::               Mailing and posting at the same time.
11407 * Archived Messages::           Where Gnus stores the messages you've sent.
11408 * Posting Styles::              An easier way to specify who you are.
11409 * Drafts::                      Postponing messages and rejected messages.
11410 * Rejected Articles::           What happens if the server doesn't like your article?
11411 * Signing and encrypting::      How to compose secure messages.
11412 @end menu
11413
11414 Also @pxref{Canceling and Superseding} for information on how to
11415 remove articles you shouldn't have posted.
11416
11417
11418 @node Mail
11419 @section Mail
11420
11421 Variables for customizing outgoing mail:
11422
11423 @table @code
11424 @item gnus-uu-digest-headers
11425 @vindex gnus-uu-digest-headers
11426 List of regexps to match headers included in digested messages.  The
11427 headers will be included in the sequence they are matched.  If
11428 @code{nil} include all headers.
11429
11430 @item gnus-add-to-list
11431 @vindex gnus-add-to-list
11432 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
11433 that have none when you do a @kbd{a}.
11434
11435 @item gnus-confirm-mail-reply-to-news
11436 @vindex gnus-confirm-mail-reply-to-news
11437 This can also be a function receiving the group name as the only
11438 parameter which should return non-@code{nil} if a confirmation is
11439 needed, or a regular expression matching group names, where
11440 confirmation is should be asked for.
11441
11442 If you find yourself never wanting to reply to mail, but occasionally
11443 press R anyway, this variable might be for you.
11444
11445 @item gnus-confirm-treat-mail-like-news
11446 @vindex gnus-confirm-treat-mail-like-news
11447 If non-@code{nil}, Gnus also requests confirmation according to
11448 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
11449 useful for treating mailing lists like newsgroups.
11450
11451 @end table
11452
11453
11454 @node Posting Server
11455 @section Posting Server
11456
11457 When you press those magical @kbd{C-c C-c} keys to ship off your latest
11458 (extremely intelligent, of course) article, where does it go?
11459
11460 Thank you for asking.  I hate you.
11461
11462 It can be quite complicated.
11463
11464 @vindex gnus-post-method
11465 When posting news, Message usually invokes @code{message-send-news}
11466 (@pxref{News Variables, , News Variables, message, Message Manual}).
11467 Normally, Gnus will post using the same select method as you're
11468 reading from (which might be convenient if you're reading lots of
11469 groups from different private servers).  However.  If the server
11470 you're reading from doesn't allow posting, just reading, you probably
11471 want to use some other server to post your (extremely intelligent and
11472 fabulously interesting) articles.  You can then set the
11473 @code{gnus-post-method} to some other method:
11474
11475 @lisp
11476 (setq gnus-post-method '(nnspool ""))
11477 @end lisp
11478
11479 Now, if you've done this, and then this server rejects your article, or
11480 this server is down, what do you do then?  To override this variable you
11481 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
11482 the ``current'' server, to get back the default behavior, for posting.
11483
11484 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
11485 Gnus will prompt you for what method to use for posting.
11486
11487 You can also set @code{gnus-post-method} to a list of select methods.
11488 If that's the case, Gnus will always prompt you for what method to use
11489 for posting.
11490
11491 Finally, if you want to always post using the native select method,
11492 you can set this variable to @code{native}.
11493
11494 When sending mail, Message invokes @code{message-send-mail-function}.
11495 The default function, @code{message-send-mail-with-sendmail}, pipes
11496 your article to the @code{sendmail} binary for further queuing and
11497 sending.  When your local system is not configured for sending mail
11498 using @code{sendmail}, and you have access to a remote @acronym{SMTP}
11499 server, you can set @code{message-send-mail-function} to
11500 @code{smtpmail-send-it} and make sure to setup the @code{smtpmail}
11501 package correctly.  An example:
11502
11503 @lisp
11504 (setq message-send-mail-function 'smtpmail-send-it
11505       smtpmail-default-smtp-server "YOUR SMTP HOST")
11506 @end lisp
11507
11508 To the thing similar to this, there is
11509 @code{message-smtpmail-send-it}.  It is useful if your ISP requires
11510 the @acronym{POP}-before-@acronym{SMTP} authentication.  See the
11511 documentation for the function @code{mail-source-touch-pop}.
11512
11513 Other possible choices for @code{message-send-mail-function} includes
11514 @code{message-send-mail-with-mh}, @code{message-send-mail-with-qmail},
11515 and @code{feedmail-send-it}.
11516
11517 @node Mail and Post
11518 @section Mail and Post
11519
11520 Here's a list of variables relevant to both mailing and
11521 posting:
11522
11523 @table @code
11524 @item gnus-mailing-list-groups
11525 @findex gnus-mailing-list-groups
11526 @cindex mailing lists
11527
11528 If your news server offers groups that are really mailing lists
11529 gatewayed to the @acronym{NNTP} server, you can read those groups without
11530 problems, but you can't post/followup to them without some difficulty.
11531 One solution is to add a @code{to-address} to the group parameters
11532 (@pxref{Group Parameters}).  An easier thing to do is set the
11533 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
11534 really are mailing lists.  Then, at least, followups to the mailing
11535 lists will work most of the time.  Posting to these groups (@kbd{a}) is
11536 still a pain, though.
11537
11538 @item gnus-user-agent
11539 @vindex gnus-user-agent
11540 @cindex User-Agent
11541
11542 This variable controls which information should be exposed in the
11543 User-Agent header.  It can be one of the symbols @code{gnus} (show only
11544 Gnus version), @code{emacs-gnus} (show only Emacs and Gnus versions),
11545 @code{emacs-gnus-config} (same as @code{emacs-gnus} plus system
11546 configuration), @code{emacs-gnus-type} (same as @code{emacs-gnus} plus
11547 system type) or a custom string.  If you set it to a string, be sure to
11548 use a valid format, see RFC 2616.
11549
11550 @end table
11551
11552 You may want to do spell-checking on messages that you send out.  Or, if
11553 you don't want to spell-check by hand, you could add automatic
11554 spell-checking via the @code{ispell} package:
11555
11556 @cindex ispell
11557 @findex ispell-message
11558 @lisp
11559 (add-hook 'message-send-hook 'ispell-message)
11560 @end lisp
11561
11562 If you want to change the @code{ispell} dictionary based on what group
11563 you're in, you could say something like the following:
11564
11565 @lisp
11566 (add-hook 'gnus-select-group-hook
11567           (lambda ()
11568             (cond
11569              ((string-match
11570                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
11571               (ispell-change-dictionary "deutsch"))
11572              (t
11573               (ispell-change-dictionary "english")))))
11574 @end lisp
11575
11576 Modify to suit your needs.
11577
11578
11579 @node Archived Messages
11580 @section Archived Messages
11581 @cindex archived messages
11582 @cindex sent messages
11583
11584 Gnus provides a few different methods for storing the mail and news you
11585 send.  The default method is to use the @dfn{archive virtual server} to
11586 store the messages.  If you want to disable this completely, the
11587 @code{gnus-message-archive-group} variable should be @code{nil}, which
11588 is the default.
11589
11590 For archiving interesting messages in a group you read, see the
11591 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
11592 Group Commands}).
11593
11594 @vindex gnus-message-archive-method
11595 @code{gnus-message-archive-method} says what virtual server Gnus is to
11596 use to store sent messages.  The default is:
11597
11598 @lisp
11599 (nnfolder "archive"
11600           (nnfolder-directory   "~/Mail/archive")
11601           (nnfolder-active-file "~/Mail/archive/active")
11602           (nnfolder-get-new-mail nil)
11603           (nnfolder-inhibit-expiry t))
11604 @end lisp
11605
11606 You can, however, use any mail select method (@code{nnml},
11607 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
11608 for doing this sort of thing, though.  If you don't like the default
11609 directory chosen, you could say something like:
11610
11611 @lisp
11612 (setq gnus-message-archive-method
11613       '(nnfolder "archive"
11614                  (nnfolder-inhibit-expiry t)
11615                  (nnfolder-active-file "~/News/sent-mail/active")
11616                  (nnfolder-directory "~/News/sent-mail/")))
11617 @end lisp
11618
11619 @vindex gnus-message-archive-group
11620 @cindex Gcc
11621 Gnus will insert @code{Gcc} headers in all outgoing messages that point
11622 to one or more group(s) on that server.  Which group to use is
11623 determined by the @code{gnus-message-archive-group} variable.
11624
11625 This variable can be used to do the following:
11626
11627 @table @asis
11628 @item a string
11629 Messages will be saved in that group.
11630
11631 Note that you can include a select method in the group name, then the
11632 message will not be stored in the select method given by
11633 @code{gnus-message-archive-method}, but in the select method specified
11634 by the group name, instead.  Suppose @code{gnus-message-archive-method}
11635 has the default value shown above.  Then setting
11636 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
11637 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
11638 value @code{"nnml:foo"}, then outgoing messages will be stored in
11639 @samp{nnml:foo}.
11640
11641 @item a list of strings
11642 Messages will be saved in all those groups.
11643
11644 @item an alist of regexps, functions and forms
11645 When a key ``matches'', the result is used.
11646
11647 @item @code{nil}
11648 No message archiving will take place.  This is the default.
11649 @end table
11650
11651 Let's illustrate:
11652
11653 Just saving to a single group called @samp{MisK}:
11654 @lisp
11655 (setq gnus-message-archive-group "MisK")
11656 @end lisp
11657
11658 Saving to two groups, @samp{MisK} and @samp{safe}:
11659 @lisp
11660 (setq gnus-message-archive-group '("MisK" "safe"))
11661 @end lisp
11662
11663 Save to different groups based on what group you are in:
11664 @lisp
11665 (setq gnus-message-archive-group
11666       '(("^alt" "sent-to-alt")
11667         ("mail" "sent-to-mail")
11668         (".*" "sent-to-misc")))
11669 @end lisp
11670
11671 More complex stuff:
11672 @lisp
11673 (setq gnus-message-archive-group
11674       '((if (message-news-p)
11675             "misc-news"
11676           "misc-mail")))
11677 @end lisp
11678
11679 How about storing all news messages in one file, but storing all mail
11680 messages in one file per month:
11681
11682 @lisp
11683 (setq gnus-message-archive-group
11684       '((if (message-news-p)
11685             "misc-news"
11686           (concat "mail." (format-time-string "%Y-%m")))))
11687 @end lisp
11688
11689 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
11690 @c use a different value for @code{gnus-message-archive-group} there.)
11691
11692 Now, when you send a message off, it will be stored in the appropriate
11693 group.  (If you want to disable storing for just one particular message,
11694 you can just remove the @code{Gcc} header that has been inserted.)  The
11695 archive group will appear in the group buffer the next time you start
11696 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
11697 enter it and read the articles in it just like you'd read any other
11698 group.  If the group gets really big and annoying, you can simply rename
11699 if (using @kbd{G r} in the group buffer) to something
11700 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
11701 continue to be stored in the old (now empty) group.
11702
11703 That's the default method of archiving sent messages.  Gnus offers a
11704 different way for the people who don't like the default method.  In that
11705 case you should set @code{gnus-message-archive-group} to @code{nil};
11706 this will disable archiving.
11707
11708 @table @code
11709 @item gnus-outgoing-message-group
11710 @vindex gnus-outgoing-message-group
11711 All outgoing messages will be put in this group.  If you want to store
11712 all your outgoing mail and articles in the group @samp{nnml:archive},
11713 you set this variable to that value.  This variable can also be a list of
11714 group names.
11715
11716 If you want to have greater control over what group to put each
11717 message in, you can set this variable to a function that checks the
11718 current newsgroup name and then returns a suitable group name (or list
11719 of names).
11720
11721 This variable can be used instead of @code{gnus-message-archive-group},
11722 but the latter is the preferred method.
11723
11724 @item gnus-gcc-mark-as-read
11725 @vindex gnus-gcc-mark-as-read
11726 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
11727
11728 @item gnus-gcc-externalize-attachments
11729 @vindex gnus-gcc-externalize-attachments
11730 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
11731 and matches the Gcc group name, attach files as external parts; if it is
11732 @code{all}, attach local files as external parts; if it is other
11733 non-@code{nil}, the behavior is the same as @code{all}, but it may be
11734 changed in the future.
11735
11736 @end table
11737
11738
11739 @node Posting Styles
11740 @section Posting Styles
11741 @cindex posting styles
11742 @cindex styles
11743
11744 All them variables, they make my head swim.
11745
11746 So what if you want a different @code{Organization} and signature based
11747 on what groups you post to?  And you post both from your home machine
11748 and your work machine, and you want different @code{From} lines, and so
11749 on?
11750
11751 @vindex gnus-posting-styles
11752 One way to do stuff like that is to write clever hooks that change the
11753 variables you need to have changed.  That's a bit boring, so somebody
11754 came up with the bright idea of letting the user specify these things in
11755 a handy alist.  Here's an example of a @code{gnus-posting-styles}
11756 variable:
11757
11758 @lisp
11759 ((".*"
11760   (signature "Peace and happiness")
11761   (organization "What me?"))
11762  ("^comp"
11763   (signature "Death to everybody"))
11764  ("comp.emacs.i-love-it"
11765   (organization "Emacs is it")))
11766 @end lisp
11767
11768 As you might surmise from this example, this alist consists of several
11769 @dfn{styles}.  Each style will be applicable if the first element
11770 ``matches'', in some form or other.  The entire alist will be iterated
11771 over, from the beginning towards the end, and each match will be
11772 applied, which means that attributes in later styles that match override
11773 the same attributes in earlier matching styles.  So
11774 @samp{comp.programming.literate} will have the @samp{Death to everybody}
11775 signature and the @samp{What me?} @code{Organization} header.
11776
11777 The first element in each style is called the @code{match}.  If it's a
11778 string, then Gnus will try to regexp match it against the group name.
11779 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
11780 will look in the original article for a header whose name is
11781 @var{match} and compare that @var{regexp}.  @var{match} and
11782 @var{regexp} are strings.  (The original article is the one you are
11783 replying or following up to.  If you are not composing a reply or a
11784 followup, then there is nothing to match against.)  If the
11785 @code{match} is a function symbol, that function will be called with
11786 no arguments.  If it's a variable symbol, then the variable will be
11787 referenced.  If it's a list, then that list will be @code{eval}ed.  In
11788 any case, if this returns a non-@code{nil} value, then the style is
11789 said to @dfn{match}.
11790
11791 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
11792 attribute consists of a @code{(@var{name} @var{value})} pair.  The
11793 attribute name can be one of:
11794
11795 @itemize @bullet
11796 @item @code{signature}
11797 @item @code{signature-file}
11798 @item @code{x-face-file}
11799 @item @code{address}, overriding @code{user-mail-address}
11800 @item @code{name}, overriding @code{(user-full-name)}
11801 @item @code{body}
11802 @end itemize
11803
11804 The attribute name can also be a string or a symbol.  In that case,
11805 this will be used as a header name, and the value will be inserted in
11806 the headers of the article; if the value is @code{nil}, the header
11807 name will be removed.  If the attribute name is @code{eval}, the form
11808 is evaluated, and the result is thrown away.
11809
11810 The attribute value can be a string (used verbatim), a function with
11811 zero arguments (the return value will be used), a variable (its value
11812 will be used) or a list (it will be @code{eval}ed and the return value
11813 will be used).  The functions and sexps are called/@code{eval}ed in the
11814 message buffer that is being set up.  The headers of the current article
11815 are available through the @code{message-reply-headers} variable, which
11816 is a vector of the following headers: number subject from date id
11817 references chars lines xref extra.
11818
11819 @vindex message-reply-headers
11820
11821 If you wish to check whether the message you are about to compose is
11822 meant to be a news article or a mail message, you can check the values
11823 of the @code{message-news-p} and @code{message-mail-p} functions.
11824
11825 @findex message-mail-p
11826 @findex message-news-p
11827
11828 So here's a new example:
11829
11830 @lisp
11831 (setq gnus-posting-styles
11832       '((".*"
11833          (signature-file "~/.signature")
11834          (name "User Name")
11835          ("X-Home-Page" (getenv "WWW_HOME"))
11836          (organization "People's Front Against MWM"))
11837         ("^rec.humor"
11838          (signature my-funny-signature-randomizer))
11839         ((equal (system-name) "gnarly")  ;; @r{A form}
11840          (signature my-quote-randomizer))
11841         (message-news-p        ;; @r{A function symbol}
11842          (signature my-news-signature))
11843         (window-system         ;; @r{A value symbol}
11844          ("X-Window-System" (format "%s" window-system)))
11845         ;; @r{If I'm replying to Larsi, set the Organization header.}
11846         ((header "from" "larsi.*org")
11847          (Organization "Somewhere, Inc."))
11848         ((posting-from-work-p) ;; @r{A user defined function}
11849          (signature-file "~/.work-signature")
11850          (address "user@@bar.foo")
11851          (body "You are fired.\n\nSincerely, your boss.")
11852          (organization "Important Work, Inc"))
11853         ("nnml:.*"
11854          (From (save-excursion
11855                  (set-buffer gnus-article-buffer)
11856                  (message-fetch-field "to"))))
11857         ("^nn.+:"
11858          (signature-file "~/.mail-signature"))))
11859 @end lisp
11860
11861 The @samp{nnml:.*} rule means that you use the @code{To} address as the
11862 @code{From} address in all your outgoing replies, which might be handy
11863 if you fill many roles.
11864
11865
11866 @node Drafts
11867 @section Drafts
11868 @cindex drafts
11869
11870 If you are writing a message (mail or news) and suddenly remember that
11871 you have a steak in the oven (or some pesto in the food processor, you
11872 craaazy vegetarians), you'll probably wish there was a method to save
11873 the message you are writing so that you can continue editing it some
11874 other day, and send it when you feel its finished.
11875
11876 Well, don't worry about it.  Whenever you start composing a message of
11877 some sort using the Gnus mail and post commands, the buffer you get will
11878 automatically associate to an article in a special @dfn{draft} group.
11879 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
11880 article will be saved there.  (Auto-save files also go to the draft
11881 group.)
11882
11883 @cindex nndraft
11884 @vindex nndraft-directory
11885 The draft group is a special group (which is implemented as an
11886 @code{nndraft} group, if you absolutely have to know) called
11887 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
11888 @code{nndraft} is to store its files.  What makes this group special is
11889 that you can't tick any articles in it or mark any articles as
11890 read---all articles in the group are permanently unread.
11891
11892 If the group doesn't exist, it will be created and you'll be subscribed
11893 to it.  The only way to make it disappear from the Group buffer is to
11894 unsubscribe it.  The special properties of the draft group comes from
11895 a group property (@pxref{Group Parameters}), and if lost the group
11896 behaves like any other group.  This means the commands below will not
11897 be available.  To restore the special properties of the group, the
11898 simplest way is to kill the group, using @kbd{C-k}, and restart
11899 Gnus.  The group is automatically created again with the
11900 correct parameters.  The content of the group is not lost.
11901
11902 @c @findex gnus-dissociate-buffer-from-draft
11903 @c @kindex C-c M-d (Mail)
11904 @c @kindex C-c M-d (Post)
11905 @c @findex gnus-associate-buffer-with-draft
11906 @c @kindex C-c C-d (Mail)
11907 @c @kindex C-c C-d (Post)
11908 @c If you're writing some super-secret message that you later want to
11909 @c encode with PGP before sending, you may wish to turn the auto-saving
11910 @c (and association with the draft group) off.  You never know who might be
11911 @c interested in reading all your extremely valuable and terribly horrible
11912 @c and interesting secrets.  The @kbd{C-c M-d}
11913 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
11914 @c If you change your mind and want to turn the auto-saving back on again,
11915 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
11916 @c
11917 @c @vindex gnus-use-draft
11918 @c To leave association with the draft group off by default, set
11919 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
11920
11921 @findex gnus-draft-edit-message
11922 @kindex D e (Draft)
11923 When you want to continue editing the article, you simply enter the
11924 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
11925 that.  You will be placed in a buffer where you left off.
11926
11927 Rejected articles will also be put in this draft group (@pxref{Rejected
11928 Articles}).
11929
11930 @findex gnus-draft-send-all-messages
11931 @kindex D s (Draft)
11932 @findex gnus-draft-send-message
11933 @kindex D S (Draft)
11934 If you have lots of rejected messages you want to post (or mail) without
11935 doing further editing, you can use the @kbd{D s} command
11936 (@code{gnus-draft-send-message}).  This command understands the
11937 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
11938 command (@code{gnus-draft-send-all-messages}) will ship off all messages
11939 in the buffer.
11940
11941 @findex gnus-draft-toggle-sending
11942 @kindex D t (Draft)
11943 If you have some messages that you wish not to send, you can use the
11944 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
11945 as unsendable.  This is a toggling command.
11946
11947
11948 @node Rejected Articles
11949 @section Rejected Articles
11950 @cindex rejected articles
11951
11952 Sometimes a news server will reject an article.  Perhaps the server
11953 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
11954 @emph{there be demons}.  Perhaps you have included too much cited text.
11955 Perhaps the disk is full.  Perhaps the server is down.
11956
11957 These situations are, of course, totally beyond the control of Gnus.
11958 (Gnus, of course, loves the way you look, always feels great, has angels
11959 fluttering around inside of it, doesn't care about how much cited text
11960 you include, never runs full and never goes down.)  So Gnus saves these
11961 articles until some later time when the server feels better.
11962
11963 The rejected articles will automatically be put in a special draft group
11964 (@pxref{Drafts}).  When the server comes back up again, you'd then
11965 typically enter that group and send all the articles off.
11966
11967 @node Signing and encrypting
11968 @section Signing and encrypting
11969 @cindex using gpg
11970 @cindex using s/mime
11971 @cindex using smime
11972
11973 Gnus can digitally sign and encrypt your messages, using vanilla
11974 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
11975 decoding such messages, see the @code{mm-verify-option} and
11976 @code{mm-decrypt-option} options (@pxref{Security}).
11977
11978 @vindex gnus-message-replysign
11979 @vindex gnus-message-replyencrypt
11980 @vindex gnus-message-replysignencrypted
11981 Often, you would like to sign replies to people who send you signed
11982 messages.  Even more often, you might want to encrypt messages which
11983 are in reply to encrypted messages.  Gnus offers
11984 @code{gnus-message-replysign} to enable the former, and
11985 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
11986 @code{gnus-message-replysignencrypted} (on by default) will sign
11987 automatically encrypted messages.
11988
11989 Instructing @acronym{MML} to perform security operations on a
11990 @acronym{MIME} part is done using the @kbd{C-c C-m s} key map for
11991 signing and the @kbd{C-c C-m c} key map for encryption, as follows.
11992
11993 @table @kbd
11994
11995 @item C-c C-m s s
11996 @kindex C-c C-m s s (Message)
11997 @findex mml-secure-message-sign-smime
11998
11999 Digitally sign current message using @acronym{S/MIME}.
12000
12001 @item C-c C-m s o
12002 @kindex C-c C-m s o (Message)
12003 @findex mml-secure-message-sign-pgp
12004
12005 Digitally sign current message using @acronym{PGP}.
12006
12007 @item C-c C-m s p
12008 @kindex C-c C-m s p (Message)
12009 @findex mml-secure-message-sign-pgp
12010
12011 Digitally sign current message using @acronym{PGP/MIME}.
12012
12013 @item C-c C-m c s
12014 @kindex C-c C-m c s (Message)
12015 @findex mml-secure-message-encrypt-smime
12016
12017 Digitally encrypt current message using @acronym{S/MIME}.
12018
12019 @item C-c C-m c o
12020 @kindex C-c C-m c o (Message)
12021 @findex mml-secure-message-encrypt-pgp
12022
12023 Digitally encrypt current message using @acronym{PGP}.
12024
12025 @item C-c C-m c p
12026 @kindex C-c C-m c p (Message)
12027 @findex mml-secure-message-encrypt-pgpmime
12028
12029 Digitally encrypt current message using @acronym{PGP/MIME}.
12030
12031 @item C-c C-m C-n
12032 @kindex C-c C-m C-n (Message)
12033 @findex mml-unsecure-message
12034 Remove security related @acronym{MML} tags from message.
12035
12036 @end table
12037
12038 @xref{Security, ,Security, message, Message Manual}, for more information.
12039
12040 @node Select Methods
12041 @chapter Select Methods
12042 @cindex foreign groups
12043 @cindex select methods
12044
12045 A @dfn{foreign group} is a group not read by the usual (or
12046 default) means.  It could be, for instance, a group from a different
12047 @acronym{NNTP} server, it could be a virtual group, or it could be your own
12048 personal mail group.
12049
12050 A foreign group (or any group, really) is specified by a @dfn{name} and
12051 a @dfn{select method}.  To take the latter first, a select method is a
12052 list where the first element says what back end to use (e.g. @code{nntp},
12053 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
12054 name}.  There may be additional elements in the select method, where the
12055 value may have special meaning for the back end in question.
12056
12057 One could say that a select method defines a @dfn{virtual server}---so
12058 we do just that (@pxref{Server Buffer}).
12059
12060 The @dfn{name} of the group is the name the back end will recognize the
12061 group as.
12062
12063 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
12064 @samp{some.where.edu} will have the name @samp{soc.motss} and select
12065 method @code{(nntp "some.where.edu")}.  Gnus will call this group
12066 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
12067 back end just knows this group as @samp{soc.motss}.
12068
12069 The different methods all have their peculiarities, of course.
12070
12071 @menu
12072 * Server Buffer::               Making and editing virtual servers.
12073 * Getting News::                Reading USENET news with Gnus.
12074 * Getting Mail::                Reading your personal mail with Gnus.
12075 * Browsing the Web::            Getting messages from a plethora of Web sources.
12076 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
12077 * Other Sources::               Reading directories, files, SOUP packets.
12078 * Combined Groups::             Combining groups into one group.
12079 * Gnus Unplugged::              Reading news and mail offline.
12080 @end menu
12081
12082
12083 @node Server Buffer
12084 @section Server Buffer
12085
12086 Traditionally, a @dfn{server} is a machine or a piece of software that
12087 one connects to, and then requests information from.  Gnus does not
12088 connect directly to any real servers, but does all transactions through
12089 one back end or other.  But that's just putting one layer more between
12090 the actual media and Gnus, so we might just as well say that each
12091 back end represents a virtual server.
12092
12093 For instance, the @code{nntp} back end may be used to connect to several
12094 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
12095 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
12096 use, and what parameters to set by specifying a @dfn{select method}.
12097
12098 These select method specifications can sometimes become quite
12099 complicated---say, for instance, that you want to read from the
12100 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
12101 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
12102 Anyway, if you had to specify that for each group that used this
12103 server, that would be too much work, so Gnus offers a way of naming
12104 select methods, which is what you do in the server buffer.
12105
12106 To enter the server buffer, use the @kbd{^}
12107 (@code{gnus-group-enter-server-mode}) command in the group buffer.
12108
12109 @menu
12110 * Server Buffer Format::        You can customize the look of this buffer.
12111 * Server Commands::             Commands to manipulate servers.
12112 * Example Methods::             Examples server specifications.
12113 * Creating a Virtual Server::   An example session.
12114 * Server Variables::            Which variables to set.
12115 * Servers and Methods::         You can use server names as select methods.
12116 * Unavailable Servers::         Some servers you try to contact may be down.
12117 @end menu
12118
12119 @vindex gnus-server-mode-hook
12120 @code{gnus-server-mode-hook} is run when creating the server buffer.
12121
12122
12123 @node Server Buffer Format
12124 @subsection Server Buffer Format
12125 @cindex server buffer format
12126
12127 @vindex gnus-server-line-format
12128 You can change the look of the server buffer lines by changing the
12129 @code{gnus-server-line-format} variable.  This is a @code{format}-like
12130 variable, with some simple extensions:
12131
12132 @table @samp
12133
12134 @item h
12135 How the news is fetched---the back end name.
12136
12137 @item n
12138 The name of this server.
12139
12140 @item w
12141 Where the news is to be fetched from---the address.
12142
12143 @item s
12144 The opened/closed/denied status of the server.
12145 @end table
12146
12147 @vindex gnus-server-mode-line-format
12148 The mode line can also be customized by using the
12149 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
12150 Formatting}).  The following specs are understood:
12151
12152 @table @samp
12153 @item S
12154 Server name.
12155
12156 @item M
12157 Server method.
12158 @end table
12159
12160 Also @pxref{Formatting Variables}.
12161
12162
12163 @node Server Commands
12164 @subsection Server Commands
12165 @cindex server commands
12166
12167 @table @kbd
12168
12169 @item a
12170 @kindex a (Server)
12171 @findex gnus-server-add-server
12172 Add a new server (@code{gnus-server-add-server}).
12173
12174 @item e
12175 @kindex e (Server)
12176 @findex gnus-server-edit-server
12177 Edit a server (@code{gnus-server-edit-server}).
12178
12179 @item SPACE
12180 @kindex SPACE (Server)
12181 @findex gnus-server-read-server
12182 Browse the current server (@code{gnus-server-read-server}).
12183
12184 @item q
12185 @kindex q (Server)
12186 @findex gnus-server-exit
12187 Return to the group buffer (@code{gnus-server-exit}).
12188
12189 @item k
12190 @kindex k (Server)
12191 @findex gnus-server-kill-server
12192 Kill the current server (@code{gnus-server-kill-server}).
12193
12194 @item y
12195 @kindex y (Server)
12196 @findex gnus-server-yank-server
12197 Yank the previously killed server (@code{gnus-server-yank-server}).
12198
12199 @item c
12200 @kindex c (Server)
12201 @findex gnus-server-copy-server
12202 Copy the current server (@code{gnus-server-copy-server}).
12203
12204 @item l
12205 @kindex l (Server)
12206 @findex gnus-server-list-servers
12207 List all servers (@code{gnus-server-list-servers}).
12208
12209 @item s
12210 @kindex s (Server)
12211 @findex gnus-server-scan-server
12212 Request that the server scan its sources for new articles
12213 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
12214 servers.
12215
12216 @item g
12217 @kindex g (Server)
12218 @findex gnus-server-regenerate-server
12219 Request that the server regenerate all its data structures
12220 (@code{gnus-server-regenerate-server}).  This can be useful if you have
12221 a mail back end that has gotten out of sync.
12222
12223 @end table
12224
12225
12226 @node Example Methods
12227 @subsection Example Methods
12228
12229 Most select methods are pretty simple and self-explanatory:
12230
12231 @lisp
12232 (nntp "news.funet.fi")
12233 @end lisp
12234
12235 Reading directly from the spool is even simpler:
12236
12237 @lisp
12238 (nnspool "")
12239 @end lisp
12240
12241 As you can see, the first element in a select method is the name of the
12242 back end, and the second is the @dfn{address}, or @dfn{name}, if you
12243 will.
12244
12245 After these two elements, there may be an arbitrary number of
12246 @code{(@var{variable} @var{form})} pairs.
12247
12248 To go back to the first example---imagine that you want to read from
12249 port 15 on that machine.  This is what the select method should
12250 look like then:
12251
12252 @lisp
12253 (nntp "news.funet.fi" (nntp-port-number 15))
12254 @end lisp
12255
12256 You should read the documentation to each back end to find out what
12257 variables are relevant, but here's an @code{nnmh} example:
12258
12259 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
12260 you have two structures that you wish to access: One is your private
12261 mail spool, and the other is a public one.  Here's the possible spec for
12262 your private mail:
12263
12264 @lisp
12265 (nnmh "private" (nnmh-directory "~/private/mail/"))
12266 @end lisp
12267
12268 (This server is then called @samp{private}, but you may have guessed
12269 that.)
12270
12271 Here's the method for a public spool:
12272
12273 @lisp
12274 (nnmh "public"
12275       (nnmh-directory "/usr/information/spool/")
12276       (nnmh-get-new-mail nil))
12277 @end lisp
12278
12279 @cindex proxy
12280 @cindex firewall
12281
12282 If you are behind a firewall and only have access to the @acronym{NNTP}
12283 server from the firewall machine, you can instruct Gnus to @code{rlogin}
12284 on the firewall machine and telnet from there to the @acronym{NNTP} server.
12285 Doing this can be rather fiddly, but your virtual server definition
12286 should probably look something like this:
12287
12288 @lisp
12289 (nntp "firewall"
12290       (nntp-open-connection-function nntp-open-via-rlogin-and-telnet)
12291       (nntp-via-address "the.firewall.machine")
12292       (nntp-address "the.real.nntp.host")
12293       (nntp-end-of-line "\n"))
12294 @end lisp
12295
12296 If you want to use the wonderful @code{ssh} program to provide a
12297 compressed connection over the modem line, you could add the following
12298 configuration to the example above:
12299
12300 @lisp
12301       (nntp-via-rlogin-command "ssh")
12302 @end lisp
12303
12304 See also @code{nntp-via-rlogin-command-switches}.
12305
12306 If you're behind a firewall, but have direct access to the outside world
12307 through a wrapper command like "runsocks", you could open a socksified
12308 telnet connection to the news server as follows:
12309
12310 @lisp
12311 (nntp "outside"
12312       (nntp-pre-command "runsocks")
12313       (nntp-open-connection-function nntp-open-via-telnet)
12314       (nntp-address "the.news.server")
12315       (nntp-end-of-line "\n"))
12316 @end lisp
12317
12318 This means that you have to have set up @code{ssh-agent} correctly to
12319 provide automatic authorization, of course.  And to get a compressed
12320 connection, you have to have the @samp{Compression} option in the
12321 @code{ssh} @file{config} file.
12322
12323
12324 @node Creating a Virtual Server
12325 @subsection Creating a Virtual Server
12326
12327 If you're saving lots of articles in the cache by using persistent
12328 articles, you may want to create a virtual server to read the cache.
12329
12330 First you need to add a new server.  The @kbd{a} command does that.  It
12331 would probably be best to use @code{nnml} to read the cache.  You
12332 could also use @code{nnspool} or @code{nnmh}, though.
12333
12334 Type @kbd{a nnml RET cache RET}.
12335
12336 You should now have a brand new @code{nnml} virtual server called
12337 @samp{cache}.  You now need to edit it to have the right definitions.
12338 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
12339 will contain the following:
12340
12341 @lisp
12342 (nnml "cache")
12343 @end lisp
12344
12345 Change that to:
12346
12347 @lisp
12348 (nnml "cache"
12349          (nnml-directory "~/News/cache/")
12350          (nnml-active-file "~/News/cache/active"))
12351 @end lisp
12352
12353 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
12354 @kbd{RET} over this virtual server, you should be entered into a browse
12355 buffer, and you should be able to enter any of the groups displayed.
12356
12357
12358 @node Server Variables
12359 @subsection Server Variables
12360 @cindex server variables
12361 @cindex server parameters
12362
12363 One sticky point when defining variables (both on back ends and in Emacs
12364 in general) is that some variables are typically initialized from other
12365 variables when the definition of the variables is being loaded.  If you
12366 change the ``base'' variable after the variables have been loaded, you
12367 won't change the ``derived'' variables.
12368
12369 This typically affects directory and file variables.  For instance,
12370 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
12371 directory variables are initialized from that variable, so
12372 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
12373 new virtual @code{nnml} server, it will @emph{not} suffice to set just
12374 @code{nnml-directory}---you have to explicitly set all the file
12375 variables to be what you want them to be.  For a complete list of
12376 variables for each back end, see each back end's section later in this
12377 manual, but here's an example @code{nnml} definition:
12378
12379 @lisp
12380 (nnml "public"
12381       (nnml-directory "~/my-mail/")
12382       (nnml-active-file "~/my-mail/active")
12383       (nnml-newsgroups-file "~/my-mail/newsgroups"))
12384 @end lisp
12385
12386 Server variables are often called @dfn{server parameters}.
12387
12388 @node Servers and Methods
12389 @subsection Servers and Methods
12390
12391 Wherever you would normally use a select method
12392 (e.g. @code{gnus-secondary-select-method}, in the group select method,
12393 when browsing a foreign server) you can use a virtual server name
12394 instead.  This could potentially save lots of typing.  And it's nice all
12395 over.
12396
12397
12398 @node Unavailable Servers
12399 @subsection Unavailable Servers
12400
12401 If a server seems to be unreachable, Gnus will mark that server as
12402 @code{denied}.  That means that any subsequent attempt to make contact
12403 with that server will just be ignored.  ``It can't be opened,'' Gnus
12404 will tell you, without making the least effort to see whether that is
12405 actually the case or not.
12406
12407 That might seem quite naughty, but it does make sense most of the time.
12408 Let's say you have 10 groups subscribed to on server
12409 @samp{nephelococcygia.com}.  This server is located somewhere quite far
12410 away from you and the machine is quite slow, so it takes 1 minute just
12411 to find out that it refuses connection to you today.  If Gnus were to
12412 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
12413 attempt to do that.  Once it has gotten a single ``connection refused'',
12414 it will regard that server as ``down''.
12415
12416 So, what happens if the machine was only feeling unwell temporarily?
12417 How do you test to see whether the machine has come up again?
12418
12419 You jump to the server buffer (@pxref{Server Buffer}) and poke it
12420 with the following commands:
12421
12422 @table @kbd
12423
12424 @item O
12425 @kindex O (Server)
12426 @findex gnus-server-open-server
12427 Try to establish connection to the server on the current line
12428 (@code{gnus-server-open-server}).
12429
12430 @item C
12431 @kindex C (Server)
12432 @findex gnus-server-close-server
12433 Close the connection (if any) to the server
12434 (@code{gnus-server-close-server}).
12435
12436 @item D
12437 @kindex D (Server)
12438 @findex gnus-server-deny-server
12439 Mark the current server as unreachable
12440 (@code{gnus-server-deny-server}).
12441
12442 @item M-o
12443 @kindex M-o (Server)
12444 @findex gnus-server-open-all-servers
12445 Open the connections to all servers in the buffer
12446 (@code{gnus-server-open-all-servers}).
12447
12448 @item M-c
12449 @kindex M-c (Server)
12450 @findex gnus-server-close-all-servers
12451 Close the connections to all servers in the buffer
12452 (@code{gnus-server-close-all-servers}).
12453
12454 @item R
12455 @kindex R (Server)
12456 @findex gnus-server-remove-denials
12457 Remove all marks to whether Gnus was denied connection from any servers
12458 (@code{gnus-server-remove-denials}).
12459
12460 @item L
12461 @kindex L (Server)
12462 @findex gnus-server-offline-server
12463 Set server status to offline (@code{gnus-server-offline-server}).
12464
12465 @end table
12466
12467
12468 @node Getting News
12469 @section Getting News
12470 @cindex reading news
12471 @cindex news back ends
12472
12473 A newsreader is normally used for reading news.  Gnus currently provides
12474 only two methods of getting news---it can read from an @acronym{NNTP} server,
12475 or it can read from a local spool.
12476
12477 @menu
12478 * NNTP::                        Reading news from an @acronym{NNTP} server.
12479 * News Spool::                  Reading news from the local spool.
12480 @end menu
12481
12482
12483 @node NNTP
12484 @subsection NNTP
12485 @cindex nntp
12486
12487 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
12488 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
12489 server as the, uhm, address.
12490
12491 If the @acronym{NNTP} server is located at a non-standard port, setting the
12492 third element of the select method to this port number should allow you
12493 to connect to the right port.  You'll have to edit the group info for
12494 that (@pxref{Foreign Groups}).
12495
12496 The name of the foreign group can be the same as a native group.  In
12497 fact, you can subscribe to the same group from as many different servers
12498 you feel like.  There will be no name collisions.
12499
12500 The following variables can be used to create a virtual @code{nntp}
12501 server:
12502
12503 @table @code
12504
12505 @item nntp-server-opened-hook
12506 @vindex nntp-server-opened-hook
12507 @cindex @sc{mode reader}
12508 @cindex authinfo
12509 @cindex authentification
12510 @cindex nntp authentification
12511 @findex nntp-send-authinfo
12512 @findex nntp-send-mode-reader
12513 is run after a connection has been made.  It can be used to send
12514 commands to the @acronym{NNTP} server after it has been contacted.  By
12515 default it sends the command @code{MODE READER} to the server with the
12516 @code{nntp-send-mode-reader} function.  This function should always be
12517 present in this hook.
12518
12519 @item nntp-authinfo-function
12520 @vindex nntp-authinfo-function
12521 @findex nntp-send-authinfo
12522 @vindex nntp-authinfo-file
12523 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
12524 server.  The default function is @code{nntp-send-authinfo}, which looks
12525 through your @file{~/.authinfo} (or whatever you've set the
12526 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
12527 are found, it will prompt you for a login name and a password.  The
12528 format of the @file{~/.authinfo} file is (almost) the same as the
12529 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
12530 manual page, but here are the salient facts:
12531
12532 @enumerate
12533 @item
12534 The file contains one or more line, each of which define one server.
12535
12536 @item
12537 Each line may contain an arbitrary number of token/value pairs.
12538
12539 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
12540 @samp{default}.  In addition Gnus introduces two new tokens, not present
12541 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
12542 @samp{force}.  (This is the only way the @file{.authinfo} file format
12543 deviates from the @file{.netrc} file format.)  @samp{port} is used to
12544 indicate what port on the server the credentials apply to and
12545 @samp{force} is explained below.
12546
12547 @end enumerate
12548
12549 Here's an example file:
12550
12551 @example
12552 machine news.uio.no login larsi password geheimnis
12553 machine nntp.ifi.uio.no login larsi force yes
12554 @end example
12555
12556 The token/value pairs may appear in any order; @samp{machine} doesn't
12557 have to be first, for instance.
12558
12559 In this example, both login name and password have been supplied for the
12560 former server, while the latter has only the login name listed, and the
12561 user will be prompted for the password.  The latter also has the
12562 @samp{force} tag, which means that the authinfo will be sent to the
12563 @var{nntp} server upon connection; the default (i.e., when there is not
12564 @samp{force} tag) is to not send authinfo to the @var{nntp} server
12565 until the @var{nntp} server asks for it.
12566
12567 You can also add @samp{default} lines that will apply to all servers
12568 that don't have matching @samp{machine} lines.
12569
12570 @example
12571 default force yes
12572 @end example
12573
12574 This will force sending @samp{AUTHINFO} commands to all servers not
12575 previously mentioned.
12576
12577 Remember to not leave the @file{~/.authinfo} file world-readable.
12578
12579 @item nntp-server-action-alist
12580 @vindex nntp-server-action-alist
12581 This is a list of regexps to match on server types and actions to be
12582 taken when matches are made.  For instance, if you want Gnus to beep
12583 every time you connect to innd, you could say something like:
12584
12585 @lisp
12586 (setq nntp-server-action-alist
12587       '(("innd" (ding))))
12588 @end lisp
12589
12590 You probably don't want to do that, though.
12591
12592 The default value is
12593
12594 @lisp
12595 '(("nntpd 1\\.5\\.11t"
12596    (remove-hook 'nntp-server-opened-hook
12597                 'nntp-send-mode-reader)))
12598 @end lisp
12599
12600 This ensures that Gnus doesn't send the @code{MODE READER} command to
12601 nntpd 1.5.11t, since that command chokes that server, I've been told.
12602
12603 @item nntp-maximum-request
12604 @vindex nntp-maximum-request
12605 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
12606 will collect headers by sending a series of @code{head} commands.  To
12607 speed things up, the back end sends lots of these commands without
12608 waiting for reply, and then reads all the replies.  This is controlled
12609 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
12610 your network is buggy, you should set this to 1.
12611
12612 @item nntp-connection-timeout
12613 @vindex nntp-connection-timeout
12614 If you have lots of foreign @code{nntp} groups that you connect to
12615 regularly, you're sure to have problems with @acronym{NNTP} servers not
12616 responding properly, or being too loaded to reply within reasonable
12617 time.  This is can lead to awkward problems, which can be helped
12618 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
12619 that says how many seconds the @code{nntp} back end should wait for a
12620 connection before giving up.  If it is @code{nil}, which is the default,
12621 no timeouts are done.
12622
12623 @c @item nntp-command-timeout
12624 @c @vindex nntp-command-timeout
12625 @c @cindex PPP connections
12626 @c @cindex dynamic IP addresses
12627 @c If you're running Gnus on a machine that has a dynamically assigned
12628 @c address, Gnus may become confused.  If the address of your machine
12629 @c changes after connecting to the @acronym{NNTP} server, Gnus will simply sit
12630 @c waiting forever for replies from the server.  To help with this
12631 @c unfortunate problem, you can set this command to a number.  Gnus will
12632 @c then, if it sits waiting for a reply from the server longer than that
12633 @c number of seconds, shut down the connection, start a new one, and resend
12634 @c the command.  This should hopefully be transparent to the user.  A
12635 @c likely number is 30 seconds.
12636 @c
12637 @c @item nntp-retry-on-break
12638 @c @vindex nntp-retry-on-break
12639 @c If this variable is non-@code{nil}, you can also @kbd{C-g} if Gnus
12640 @c hangs.  This will have much the same effect as the command timeout
12641 @c described above.
12642
12643 @item nntp-server-hook
12644 @vindex nntp-server-hook
12645 This hook is run as the last step when connecting to an @acronym{NNTP}
12646 server.
12647
12648 @item nntp-buggy-select
12649 @vindex nntp-buggy-select
12650 Set this to non-@code{nil} if your select routine is buggy.
12651
12652 @item nntp-nov-is-evil
12653 @vindex nntp-nov-is-evil
12654 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
12655 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
12656 can be used.
12657
12658 @item nntp-xover-commands
12659 @vindex nntp-xover-commands
12660 @cindex @acronym{NOV}
12661 @cindex XOVER
12662 List of strings used as commands to fetch @acronym{NOV} lines from a
12663 server.  The default value of this variable is @code{("XOVER"
12664 "XOVERVIEW")}.
12665
12666 @item nntp-nov-gap
12667 @vindex nntp-nov-gap
12668 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
12669 the server.  The server responds with one huge list of lines.  However,
12670 if you have read articles 2-5000 in the group, and only want to read
12671 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
12672 lines that you will not need.  This variable says how
12673 big a gap between two consecutive articles is allowed to be before the
12674 @code{XOVER} request is split into several request.  Note that if your
12675 network is fast, setting this variable to a really small number means
12676 that fetching will probably be slower.  If this variable is @code{nil},
12677 @code{nntp} will never split requests.  The default is 5.
12678
12679 @item nntp-prepare-server-hook
12680 @vindex nntp-prepare-server-hook
12681 A hook run before attempting to connect to an @acronym{NNTP} server.
12682
12683 @item nntp-warn-about-losing-connection
12684 @vindex nntp-warn-about-losing-connection
12685 If this variable is non-@code{nil}, some noise will be made when a
12686 server closes connection.
12687
12688 @item nntp-record-commands
12689 @vindex nntp-record-commands
12690 If non-@code{nil}, @code{nntp} will log all commands it sends to the
12691 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
12692 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
12693 that doesn't seem to work.
12694
12695 @item nntp-open-connection-function
12696 @vindex nntp-open-connection-function
12697 It is possible to customize how the connection to the nntp server will
12698 be opened.  If you specify an @code{nntp-open-connection-function}
12699 parameter, Gnus will use that function to establish the connection.
12700 Five pre-made functions are supplied.  These functions can be grouped in
12701 two categories: direct connection functions (three pre-made), and
12702 indirect ones (two pre-made).
12703
12704 @item nntp-prepare-post-hook
12705 @vindex nntp-prepare-post-hook
12706 A hook run just before posting an article.  If there is no
12707 @code{Message-ID} header in the article and the news server provides the
12708 recommended ID, it will be added to the article before running this
12709 hook.  It is useful to make @code{Cancel-Lock} headers even if you
12710 inhibit Gnus to add a @code{Message-ID} header, you could say:
12711
12712 @lisp
12713 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
12714 @end lisp
12715
12716 Note that not all servers support the recommended ID.  This works for
12717 INN versions 2.3.0 and later, for instance.
12718
12719 @item nntp-read-timeout
12720 @vindex nntp-read-timeout
12721 How long nntp should wait between checking for the end of output.
12722 Shorter values mean quicker response, but is more CPU intensive.  The
12723 default is 0.1 seconds.  If you have a slow line to the server (and
12724 don't like to see Emacs eat your available CPU power), you might set
12725 this to, say, 1.
12726
12727 @end table
12728
12729 @menu
12730 * Direct Functions::            Connecting directly to the server.
12731 * Indirect Functions::          Connecting indirectly to the server.
12732 * Common Variables::            Understood by several connection functions.
12733 @end menu
12734
12735
12736 @node Direct Functions
12737 @subsubsection Direct Functions
12738 @cindex direct connection functions
12739
12740 These functions are called direct because they open a direct connection
12741 between your machine and the @acronym{NNTP} server.  The behavior of these
12742 functions is also affected by commonly understood variables
12743 (@pxref{Common Variables}).
12744
12745 @table @code
12746 @findex nntp-open-network-stream
12747 @item nntp-open-network-stream
12748 This is the default, and simply connects to some port or other on the
12749 remote system.
12750
12751 @findex nntp-open-tls-stream
12752 @item nntp-open-tls-stream
12753 Opens a connection to a server over a @dfn{secure} channel.  To use
12754 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
12755 installed.  You then define a server as follows:
12756
12757 @lisp
12758 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
12759 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
12760 ;;
12761 (nntp "snews.bar.com"
12762       (nntp-open-connection-function nntp-open-tls-stream)
12763       (nntp-port-number )
12764       (nntp-address "snews.bar.com"))
12765 @end lisp
12766
12767 @findex nntp-open-ssl-stream
12768 @item nntp-open-ssl-stream
12769 Opens a connection to a server over a @dfn{secure} channel.  To use
12770 this you must have @uref{http://www.openssl.org, OpenSSL} or
12771 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
12772 then define a server as follows:
12773
12774 @lisp
12775 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
12776 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
12777 ;;
12778 (nntp "snews.bar.com"
12779       (nntp-open-connection-function nntp-open-ssl-stream)
12780       (nntp-port-number 563)
12781       (nntp-address "snews.bar.com"))
12782 @end lisp
12783
12784 @findex nntp-open-telnet-stream
12785 @item nntp-open-telnet-stream
12786 Opens a connection to an @acronym{NNTP} server by simply @samp{telnet}'ing
12787 it.  You might wonder why this function exists, since we have the
12788 default @code{nntp-open-network-stream} which would do the job.  (One
12789 of) the reason(s) is that if you are behind a firewall but have direct
12790 connections to the outside world thanks to a command wrapper like
12791 @code{runsocks}, you can use it like this:
12792
12793 @lisp
12794 (nntp "socksified"
12795       (nntp-pre-command "runsocks")
12796       (nntp-open-connection-function nntp-open-telnet-stream)
12797       (nntp-address "the.news.server"))
12798 @end lisp
12799
12800 With the default method, you would need to wrap your whole Emacs
12801 session, which is not a good idea.
12802 @end table
12803
12804
12805 @node Indirect Functions
12806 @subsubsection Indirect Functions
12807 @cindex indirect connection functions
12808
12809 These functions are called indirect because they connect to an
12810 intermediate host before actually connecting to the @acronym{NNTP} server.
12811 All of these functions and related variables are also said to belong to
12812 the ``via'' family of connection: they're all prefixed with ``via'' to make
12813 things cleaner.  The behavior of these functions is also affected by
12814 commonly understood variables (@pxref{Common Variables}).
12815
12816 @table @code
12817 @item nntp-open-via-rlogin-and-telnet
12818 @findex nntp-open-via-rlogin-and-telnet
12819 Does an @samp{rlogin} on a remote system, and then does a @samp{telnet}
12820 to the real @acronym{NNTP} server from there.  This is useful for instance if
12821 you need to connect to a firewall machine first.
12822
12823 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
12824
12825 @table @code
12826 @item nntp-via-rlogin-command
12827 @vindex nntp-via-rlogin-command
12828 Command used to log in on the intermediate host.  The default is
12829 @samp{rsh}, but @samp{ssh} is a popular alternative.
12830
12831 @item nntp-via-rlogin-command-switches
12832 @vindex nntp-via-rlogin-command-switches
12833 List of strings to be used as the switches to
12834 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
12835 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
12836 @samp{("-C")} in order to compress all data connections, otherwise set
12837 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
12838 the telnet command requires a pseudo-tty allocation on an intermediate
12839 host.
12840 @end table
12841
12842 @item nntp-open-via-telnet-and-telnet
12843 @findex nntp-open-via-telnet-and-telnet
12844 Does essentially the same, but uses @samp{telnet} instead of
12845 @samp{rlogin} to connect to the intermediate host.
12846
12847 @code{nntp-open-via-telnet-and-telnet}-specific variables:
12848
12849 @table @code
12850 @item nntp-via-telnet-command
12851 @vindex nntp-via-telnet-command
12852 Command used to @code{telnet} the intermediate host.  The default is
12853 @samp{telnet}.
12854
12855 @item nntp-via-telnet-switches
12856 @vindex nntp-via-telnet-switches
12857 List of strings to be used as the switches to the
12858 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
12859
12860 @item nntp-via-user-password
12861 @vindex nntp-via-user-password
12862 Password to use when logging in on the intermediate host.
12863
12864 @item nntp-via-envuser
12865 @vindex nntp-via-envuser
12866 If non-@code{nil}, the intermediate @code{telnet} session (client and
12867 server both) will support the @code{ENVIRON} option and not prompt for
12868 login name.  This works for Solaris @code{telnet}, for instance.
12869
12870 @item nntp-via-shell-prompt
12871 @vindex nntp-via-shell-prompt
12872 Regexp matching the shell prompt on the intermediate host.  The default
12873 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
12874
12875 @end table
12876
12877 @end table
12878
12879
12880 Here are some additional variables that are understood by all the above
12881 functions:
12882
12883 @table @code
12884
12885 @item nntp-via-user-name
12886 @vindex nntp-via-user-name
12887 User name to use when connecting to the intermediate host.
12888
12889 @item nntp-via-address
12890 @vindex nntp-via-address
12891 Address of the intermediate host to connect to.
12892
12893 @end table
12894
12895
12896 @node Common Variables
12897 @subsubsection Common Variables
12898
12899 The following variables affect the behavior of all, or several of the
12900 pre-made connection functions.  When not specified, all functions are
12901 affected.
12902
12903 @table @code
12904
12905 @item nntp-pre-command
12906 @vindex nntp-pre-command
12907 A command wrapper to use when connecting through a non native
12908 connection function (all except @code{nntp-open-network-stream},
12909 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}.  This is
12910 where you would put a @samp{SOCKS} wrapper for instance.
12911
12912 @item nntp-address
12913 @vindex nntp-address
12914 The address of the @acronym{NNTP} server.
12915
12916 @item nntp-port-number
12917 @vindex nntp-port-number
12918 Port number to connect to the @acronym{NNTP} server.  The default is
12919 @samp{nntp}.  If you use @acronym{NNTP} over
12920 @acronym{tls}/@acronym{ssl}, you may want to use integer ports rather
12921 than named ports (i.e, use @samp{563} instead of @samp{snews} or
12922 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
12923 not work with named ports.
12924
12925 @item nntp-end-of-line
12926 @vindex nntp-end-of-line
12927 String to use as end-of-line marker when talking to the @acronym{NNTP}
12928 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
12929 using a non native connection function.
12930
12931 @item nntp-telnet-command
12932 @vindex nntp-telnet-command
12933 Command to use when connecting to the @acronym{NNTP} server through
12934 @samp{telnet}.  This is @emph{not} for an intermediate host.  This is
12935 just for the real @acronym{NNTP} server.  The default is
12936 @samp{telnet}.
12937
12938 @item nntp-telnet-switches
12939 @vindex nntp-telnet-switches
12940 A list of switches to pass to @code{nntp-telnet-command}.  The default
12941 is @samp{("-8")}.
12942
12943 @end table
12944
12945
12946 @node News Spool
12947 @subsection News Spool
12948 @cindex nnspool
12949 @cindex news spool
12950
12951 Subscribing to a foreign group from the local spool is extremely easy,
12952 and might be useful, for instance, to speed up reading groups that
12953 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
12954 instance.
12955
12956 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
12957 anything else) as the address.
12958
12959 If you have access to a local spool, you should probably use that as the
12960 native select method (@pxref{Finding the News}).  It is normally faster
12961 than using an @code{nntp} select method, but might not be.  It depends.
12962 You just have to try to find out what's best at your site.
12963
12964 @table @code
12965
12966 @item nnspool-inews-program
12967 @vindex nnspool-inews-program
12968 Program used to post an article.
12969
12970 @item nnspool-inews-switches
12971 @vindex nnspool-inews-switches
12972 Parameters given to the inews program when posting an article.
12973
12974 @item nnspool-spool-directory
12975 @vindex nnspool-spool-directory
12976 Where @code{nnspool} looks for the articles.  This is normally
12977 @file{/usr/spool/news/}.
12978
12979 @item nnspool-nov-directory
12980 @vindex nnspool-nov-directory
12981 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
12982 @file{/usr/spool/news/over.view/}.
12983
12984 @item nnspool-lib-dir
12985 @vindex nnspool-lib-dir
12986 Where the news lib dir is (@file{/usr/lib/news/} by default).
12987
12988 @item nnspool-active-file
12989 @vindex nnspool-active-file
12990 The name of the active file.
12991
12992 @item nnspool-newsgroups-file
12993 @vindex nnspool-newsgroups-file
12994 The name of the group descriptions file.
12995
12996 @item nnspool-history-file
12997 @vindex nnspool-history-file
12998 The name of the news history file.
12999
13000 @item nnspool-active-times-file
13001 @vindex nnspool-active-times-file
13002 The name of the active date file.
13003
13004 @item nnspool-nov-is-evil
13005 @vindex nnspool-nov-is-evil
13006 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
13007 that it finds.
13008
13009 @item nnspool-sift-nov-with-sed
13010 @vindex nnspool-sift-nov-with-sed
13011 @cindex sed
13012 If non-@code{nil}, which is the default, use @code{sed} to get the
13013 relevant portion from the overview file.  If @code{nil},
13014 @code{nnspool} will load the entire file into a buffer and process it
13015 there.
13016
13017 @end table
13018
13019
13020 @node Getting Mail
13021 @section Getting Mail
13022 @cindex reading mail
13023 @cindex mail
13024
13025 Reading mail with a newsreader---isn't that just plain WeIrD? But of
13026 course.
13027
13028 @menu
13029 * Mail in a Newsreader::        Important introductory notes.
13030 * Getting Started Reading Mail::  A simple cookbook example.
13031 * Splitting Mail::              How to create mail groups.
13032 * Mail Sources::                How to tell Gnus where to get mail from.
13033 * Mail Back End Variables::     Variables for customizing mail handling.
13034 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
13035 * Group Mail Splitting::        Use group customize to drive mail splitting.
13036 * Incorporating Old Mail::      What about the old mail you have?
13037 * Expiring Mail::               Getting rid of unwanted mail.
13038 * Washing Mail::                Removing cruft from the mail you get.
13039 * Duplicates::                  Dealing with duplicated mail.
13040 * Not Reading Mail::            Using mail back ends for reading other files.
13041 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
13042 @end menu
13043
13044
13045 @node Mail in a Newsreader
13046 @subsection Mail in a Newsreader
13047
13048 If you are used to traditional mail readers, but have decided to switch
13049 to reading mail with Gnus, you may find yourself experiencing something
13050 of a culture shock.
13051
13052 Gnus does not behave like traditional mail readers.  If you want to make
13053 it behave that way, you can, but it's an uphill battle.
13054
13055 Gnus, by default, handles all its groups using the same approach.  This
13056 approach is very newsreaderly---you enter a group, see the new/unread
13057 messages, and when you read the messages, they get marked as read, and
13058 you don't see them any more.  (Unless you explicitly ask for them.)
13059
13060 In particular, you do not do anything explicitly to delete messages.
13061
13062 Does this mean that all the messages that have been marked as read are
13063 deleted?  How awful!
13064
13065 But, no, it means that old messages are @dfn{expired} according to some
13066 scheme or other.  For news messages, the expire process is controlled by
13067 the news administrator; for mail, the expire process is controlled by
13068 you.  The expire process for mail is covered in depth in @ref{Expiring
13069 Mail}.
13070
13071 What many Gnus users find, after using it a while for both news and
13072 mail, is that the transport mechanism has very little to do with how
13073 they want to treat a message.
13074
13075 Many people subscribe to several mailing lists.  These are transported
13076 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
13077 answering, or even reading these messages very carefully.  We may not
13078 need to save them because if we should need to read one again, they are
13079 archived somewhere else.
13080
13081 Some people have local news groups which have only a handful of readers.
13082 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
13083 to read and answer a large fraction of the messages very carefully in
13084 order to do our work.  And there may not be an archive, so we may need
13085 to save the interesting messages the same way we would personal mail.
13086
13087 The important distinction turns out to be not the transport mechanism,
13088 but other factors such as how interested we are in the subject matter,
13089 or how easy it is to retrieve the message if we need to read it again.
13090
13091 Gnus provides many options for sorting mail into ``groups'' which behave
13092 like newsgroups, and for treating each group (whether mail or news)
13093 differently.
13094
13095 Some users never get comfortable using the Gnus (ahem) paradigm and wish
13096 that Gnus should grow up and be a male, er, mail reader.  It is possible
13097 to whip Gnus into a more mailreaderly being, but, as said before, it's
13098 not easy.  People who prefer proper mail readers should try @sc{vm}
13099 instead, which is an excellent, and proper, mail reader.
13100
13101 I don't mean to scare anybody off, but I want to make it clear that you
13102 may be required to learn a new way of thinking about messages.  After
13103 you've been subjected to The Gnus Way, you will come to love it.  I can
13104 guarantee it.  (At least the guy who sold me the Emacs Subliminal
13105 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
13106 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
13107 You Do.)
13108
13109
13110 @node Getting Started Reading Mail
13111 @subsection Getting Started Reading Mail
13112
13113 It's quite easy to use Gnus to read your new mail.  You just plonk the
13114 mail back end of your choice into @code{gnus-secondary-select-methods},
13115 and things will happen automatically.
13116
13117 For instance, if you want to use @code{nnml} (which is a ``one file per
13118 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
13119
13120 @lisp
13121 (setq gnus-secondary-select-methods '((nnml "")))
13122 @end lisp
13123
13124 Now, the next time you start Gnus, this back end will be queried for new
13125 articles, and it will move all the messages in your spool file to its
13126 directory, which is @file{~/Mail/} by default.  The new group that will
13127 be created (@samp{mail.misc}) will be subscribed, and you can read it
13128 like any other group.
13129
13130 You will probably want to split the mail into several groups, though:
13131
13132 @lisp
13133 (setq nnmail-split-methods
13134       '(("junk" "^From:.*Lars Ingebrigtsen")
13135         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
13136         ("other" "")))
13137 @end lisp
13138
13139 This will result in three new @code{nnml} mail groups being created:
13140 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
13141 mail that doesn't fit into the first two groups will be placed in the
13142 last group.
13143
13144 This should be sufficient for reading mail with Gnus.  You might want to
13145 give the other sections in this part of the manual a perusal, though.
13146 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
13147
13148
13149 @node Splitting Mail
13150 @subsection Splitting Mail
13151 @cindex splitting mail
13152 @cindex mail splitting
13153 @cindex mail filtering (splitting)
13154
13155 @vindex nnmail-split-methods
13156 The @code{nnmail-split-methods} variable says how the incoming mail is
13157 to be split into groups.
13158
13159 @lisp
13160 (setq nnmail-split-methods
13161   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
13162     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
13163     ("mail.other" "")))
13164 @end lisp
13165
13166 This variable is a list of lists, where the first element of each of
13167 these lists is the name of the mail group (they do not have to be called
13168 something beginning with @samp{mail}, by the way), and the second
13169 element is a regular expression used on the header of each mail to
13170 determine if it belongs in this mail group.  The first string may
13171 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
13172 insert sub-expressions from the matched text.  For instance:
13173
13174 @lisp
13175 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
13176 @end lisp
13177
13178 The second element can also be a function.  In that case, it will be
13179 called narrowed to the headers with the first element of the rule as the
13180 argument.  It should return a non-@code{nil} value if it thinks that the
13181 mail belongs in that group.
13182
13183 The last of these groups should always be a general one, and the regular
13184 expression should @emph{always} be @samp{*} so that it matches any mails
13185 that haven't been matched by any of the other regexps.  (These rules are
13186 processed from the beginning of the alist toward the end.  The first
13187 rule to make a match will ``win'', unless you have crossposting enabled.
13188 In that case, all matching rules will ``win''.)
13189
13190 If you like to tinker with this yourself, you can set this variable to a
13191 function of your choice.  This function will be called without any
13192 arguments in a buffer narrowed to the headers of an incoming mail
13193 message.  The function should return a list of group names that it
13194 thinks should carry this mail message.
13195
13196 Note that the mail back ends are free to maul the poor, innocent,
13197 incoming headers all they want to.  They all add @code{Lines} headers;
13198 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
13199 @code{From<SPACE>} line to something else.
13200
13201 @vindex nnmail-crosspost
13202 The mail back ends all support cross-posting.  If several regexps match,
13203 the mail will be ``cross-posted'' to all those groups.
13204 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
13205 that no articles are crossposted to the general (@samp{*}) group.
13206
13207 @vindex nnmail-crosspost-link-function
13208 @cindex crosspost
13209 @cindex links
13210 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
13211 the crossposted articles.  However, not all file systems support hard
13212 links.  If that's the case for you, set
13213 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
13214 variable is @code{add-name-to-file} by default.)
13215
13216 @kindex M-x nnmail-split-history
13217 @findex nnmail-split-history
13218 If you wish to see where the previous mail split put the messages, you
13219 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
13220 where re-spooling messages would put the messages, you can use
13221 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
13222 Group Commands}).
13223
13224 @vindex nnmail-split-header-length-limit
13225 Header lines longer than the value of
13226 @code{nnmail-split-header-length-limit} are excluded from the split
13227 function.
13228
13229 @vindex nnmail-mail-splitting-charset
13230 @vindex nnmail-mail-splitting-decodes
13231 By default the splitting codes @acronym{MIME} decodes headers so you
13232 can match on non-@acronym{ASCII} strings.  The
13233 @code{nnmail-mail-splitting-charset} variable specifies the default
13234 charset for decoding.  The behaviour can be turned off completely by
13235 binding @code{nnmail-mail-splitting-decodes} to @code{nil}, which is
13236 useful if you want to match articles based on the raw header data.
13237
13238 @vindex nnmail-resplit-incoming
13239 By default, splitting is performed on all incoming messages.  If you
13240 specify a @code{directory} entry for the variable @code{mail-sources}
13241 (@pxref{Mail Source Specifiers}), however, then splitting does
13242 @emph{not} happen by default.  You can set the variable
13243 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
13244 splitting happen even in this case.  (This variable has no effect on
13245 other kinds of entries.)
13246
13247 Gnus gives you all the opportunity you could possibly want for shooting
13248 yourself in the foot.  Let's say you create a group that will contain
13249 all the mail you get from your boss.  And then you accidentally
13250 unsubscribe from the group.  Gnus will still put all the mail from your
13251 boss in the unsubscribed group, and so, when your boss mails you ``Have
13252 that report ready by Monday or you're fired!'', you'll never see it and,
13253 come Tuesday, you'll still believe that you're gainfully employed while
13254 you really should be out collecting empty bottles to save up for next
13255 month's rent money.
13256
13257
13258 @node Mail Sources
13259 @subsection Mail Sources
13260
13261 Mail can be gotten from many different sources---the mail spool, from
13262 a @acronym{POP} mail server, from a procmail directory, or from a
13263 maildir, for instance.
13264
13265 @menu
13266 * Mail Source Specifiers::      How to specify what a mail source is.
13267 * Mail Source Customization::   Some variables that influence things.
13268 * Fetching Mail::               Using the mail source specifiers.
13269 @end menu
13270
13271
13272 @node Mail Source Specifiers
13273 @subsubsection Mail Source Specifiers
13274 @cindex POP
13275 @cindex mail server
13276 @cindex procmail
13277 @cindex mail spool
13278 @cindex mail source
13279
13280 You tell Gnus how to fetch mail by setting @code{mail-sources}
13281 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
13282
13283 Here's an example:
13284
13285 @lisp
13286 (pop :server "pop3.mailserver.com" :user "myname")
13287 @end lisp
13288
13289 As can be observed, a mail source specifier is a list where the first
13290 element is a @dfn{mail source type}, followed by an arbitrary number of
13291 @dfn{keywords}.  Keywords that are not explicitly specified are given
13292 default values.
13293
13294 The following mail source types are available:
13295
13296 @table @code
13297 @item file
13298 Get mail from a single file; typically from the mail spool.
13299
13300 Keywords:
13301
13302 @table @code
13303 @item :path
13304 The file name.  Defaults to the value of the @env{MAIL}
13305 environment variable or the value of @code{rmail-spool-directory}
13306 (usually something like @file{/usr/mail/spool/user-name}).
13307
13308 @item :prescript
13309 @itemx :postscript
13310 Script run before/after fetching mail.
13311 @end table
13312
13313 An example file mail source:
13314
13315 @lisp
13316 (file :path "/usr/spool/mail/user-name")
13317 @end lisp
13318
13319 Or using the default file name:
13320
13321 @lisp
13322 (file)
13323 @end lisp
13324
13325 If the mail spool file is not located on the local machine, it's best
13326 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
13327 You can not use ange-ftp file names here---it has no way to lock the
13328 mail spool while moving the mail.
13329
13330 If it's impossible to set up a proper server, you can use ssh instead.
13331
13332 @lisp
13333 (setq mail-sources
13334       '((file :prescript "ssh host bin/getmail >%t")))
13335 @end lisp
13336
13337 The @samp{getmail} script would look something like the following:
13338
13339 @example
13340 #!/bin/sh
13341 #  getmail - move mail from spool to stdout
13342 #  flu@@iki.fi
13343
13344 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
13345 TMP=$HOME/Mail/tmp
13346 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
13347 @end example
13348
13349 Alter this script to fit find the @samp{movemail} you want to use.
13350
13351
13352 @item directory
13353 @vindex nnmail-scan-directory-mail-source-once
13354 Get mail from several files in a directory.  This is typically used
13355 when you have procmail split the incoming mail into several files.
13356 That is, there is a one-to-one correspondence between files in that
13357 directory and groups, so that mail from the file @file{foo.bar.spool}
13358 will be put in the group @code{foo.bar}.  (You can change the suffix
13359 to be used instead of @code{.spool}.)  Setting
13360 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
13361 Gnus to scan the mail source only once.  This is particularly useful
13362 if you want to scan mail groups at a specified level.
13363
13364 @vindex nnmail-resplit-incoming
13365 There is also the variable @code{nnmail-resplit-incoming}, if you set
13366 that to a non-@code{nil} value, then the normal splitting process is
13367 applied to all the files from the directory, @ref{Splitting Mail}.
13368
13369 Keywords:
13370
13371 @table @code
13372 @item :path
13373 The name of the directory where the files are.  There is no default
13374 value.
13375
13376 @item :suffix
13377 Only files ending with this suffix are used.  The default is
13378 @samp{.spool}.
13379
13380 @item :predicate
13381 Only files that have this predicate return non-@code{nil} are returned.
13382 The default is @code{identity}.  This is used as an additional
13383 filter---only files that have the right suffix @emph{and} satisfy this
13384 predicate are considered.
13385
13386 @item :prescript
13387 @itemx :postscript
13388 Script run before/after fetching mail.
13389
13390 @end table
13391
13392 An example directory mail source:
13393
13394 @lisp
13395 (directory :path "/home/user-name/procmail-dir/"
13396            :suffix ".prcml")
13397 @end lisp
13398
13399 @item pop
13400 Get mail from a @acronym{POP} server.
13401
13402 Keywords:
13403
13404 @table @code
13405 @item :server
13406 The name of the @acronym{POP} server.  The default is taken from the
13407 @env{MAILHOST} environment variable.
13408
13409 @item :port
13410 The port number of the @acronym{POP} server.  This can be a number (eg,
13411 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
13412 string, it should be a service name as listed in @file{/etc/services} on
13413 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
13414 need to specify it as @samp{"pop-3"} instead.
13415
13416 @item :user
13417 The user name to give to the @acronym{POP} server.  The default is the login
13418 name.
13419
13420 @item :password
13421 The password to give to the @acronym{POP} server.  If not specified,
13422 the user is prompted.
13423
13424 @item :program
13425 The program to use to fetch mail from the @acronym{POP} server.  This
13426 should be a @code{format}-like string.  Here's an example:
13427
13428 @example
13429 fetchmail %u@@%s -P %p %t
13430 @end example
13431
13432 The valid format specifier characters are:
13433
13434 @table @samp
13435 @item t
13436 The name of the file the mail is to be moved to.  This must always be
13437 included in this string.
13438
13439 @item s
13440 The name of the server.
13441
13442 @item P
13443 The port number of the server.
13444
13445 @item u
13446 The user name to use.
13447
13448 @item p
13449 The password to use.
13450 @end table
13451
13452 The values used for these specs are taken from the values you give the
13453 corresponding keywords.
13454
13455 @item :prescript
13456 A script to be run before fetching the mail.  The syntax is the same as
13457 the @code{:program} keyword.  This can also be a function to be run.
13458
13459 @item :postscript
13460 A script to be run after fetching the mail.  The syntax is the same as
13461 the @code{:program} keyword.  This can also be a function to be run.
13462
13463 @item :function
13464 The function to use to fetch mail from the @acronym{POP} server.  The
13465 function is called with one parameter---the name of the file where the
13466 mail should be moved to.
13467
13468 @item :authentication
13469 This can be either the symbol @code{password} or the symbol @code{apop}
13470 and says what authentication scheme to use.  The default is
13471 @code{password}.
13472
13473 @end table
13474
13475 If the @code{:program} and @code{:function} keywords aren't specified,
13476 @code{pop3-movemail} will be used.
13477
13478 Here are some examples.  Fetch from the default @acronym{POP} server,
13479 using the default user name, and default fetcher:
13480
13481 @lisp
13482 (pop)
13483 @end lisp
13484
13485 Fetch from a named server with a named user and password:
13486
13487 @lisp
13488 (pop :server "my.pop.server"
13489      :user "user-name" :password "secret")
13490 @end lisp
13491
13492 Use @samp{movemail} to move the mail:
13493
13494 @lisp
13495 (pop :program "movemail po:%u %t %p")
13496 @end lisp
13497
13498 @item maildir
13499 Get mail from a maildir.  This is a type of mailbox that is supported by
13500 at least qmail and postfix, where each file in a special directory
13501 contains exactly one mail.
13502
13503 Keywords:
13504
13505 @table @code
13506 @item :path
13507 The name of the directory where the mails are stored.  The default is
13508 taken from the @env{MAILDIR} environment variable or
13509 @file{~/Maildir/}.
13510 @item :subdirs
13511 The subdirectories of the Maildir.  The default is
13512 @samp{("new" "cur")}.
13513
13514 @c If you sometimes look at your mail through a pop3 daemon before fetching
13515 @c them with Gnus, you may also have to fetch your mails from the
13516 @c @code{cur} directory inside the maildir, like in the first example
13517 @c below.
13518
13519 You can also get mails from remote hosts (because maildirs don't suffer
13520 from locking problems).
13521
13522 @end table
13523
13524 Two example maildir mail sources:
13525
13526 @lisp
13527 (maildir :path "/home/user-name/Maildir/"
13528          :subdirs ("cur" "new"))
13529 @end lisp
13530
13531 @lisp
13532 (maildir :path "/user@@remotehost.org:~/Maildir/"
13533          :subdirs ("new"))
13534 @end lisp
13535
13536 @item imap
13537 Get mail from a @acronym{IMAP} server.  If you don't want to use
13538 @acronym{IMAP} as intended, as a network mail reading protocol (ie
13539 with nnimap), for some reason or other, Gnus let you treat it similar
13540 to a @acronym{POP} server and fetches articles from a given
13541 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
13542
13543 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
13544 may need external programs and libraries, @xref{IMAP}.
13545
13546 Keywords:
13547
13548 @table @code
13549 @item :server
13550 The name of the @acronym{IMAP} server.  The default is taken from the
13551 @env{MAILHOST} environment variable.
13552
13553 @item :port
13554 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
13555 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
13556
13557 @item :user
13558 The user name to give to the @acronym{IMAP} server.  The default is the login
13559 name.
13560
13561 @item :password
13562 The password to give to the @acronym{IMAP} server.  If not specified, the user is
13563 prompted.
13564
13565 @item :stream
13566 What stream to use for connecting to the server, this is one of the
13567 symbols in @code{imap-stream-alist}.  Right now, this means
13568 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
13569 @samp{ssl}, @samp{shell} or the default @samp{network}.
13570
13571 @item :authentication
13572 Which authenticator to use for authenticating to the server, this is
13573 one of the symbols in @code{imap-authenticator-alist}.  Right now,
13574 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
13575 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
13576
13577 @item :program
13578 When using the `shell' :stream, the contents of this variable is
13579 mapped into the @code{imap-shell-program} variable.  This should be a
13580 @code{format}-like string (or list of strings).  Here's an example:
13581
13582 @example
13583 ssh %s imapd
13584 @end example
13585
13586 The valid format specifier characters are:
13587
13588 @table @samp
13589 @item s
13590 The name of the server.
13591
13592 @item l
13593 User name from @code{imap-default-user}.
13594
13595 @item p
13596 The port number of the server.
13597 @end table
13598
13599 The values used for these specs are taken from the values you give the
13600 corresponding keywords.
13601
13602 @item :mailbox
13603 The name of the mailbox to get mail from.  The default is @samp{INBOX}
13604 which normally is the mailbox which receive incoming mail.
13605
13606 @item :predicate
13607 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
13608 UNDELETED}, is probably the best choice for most people, but if you
13609 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
13610 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
13611 Then all articles in the mailbox is fetched, no matter what.  For a
13612 complete list of predicates, see RFC 2060 section 6.4.4.
13613
13614 @item :fetchflag
13615 How to flag fetched articles on the server, the default @samp{\Deleted}
13616 will mark them as deleted, an alternative would be @samp{\Seen} which
13617 would simply mark them as read.  These are the two most likely choices,
13618 but more flags are defined in RFC 2060 section 2.3.2.
13619
13620 @item :dontexpunge
13621 If non-@code{nil}, don't remove all articles marked as deleted in the
13622 mailbox after finishing the fetch.
13623
13624 @end table
13625
13626 An example @acronym{IMAP} mail source:
13627
13628 @lisp
13629 (imap :server "mail.mycorp.com"
13630       :stream kerberos4
13631       :fetchflag "\\Seen")
13632 @end lisp
13633
13634 @item webmail
13635 Get mail from a webmail server, such as @uref{http://www.hotmail.com/},
13636 @uref{http://webmail.netscape.com/}, @uref{http://www.netaddress.com/},
13637 @uref{http://mail.yahoo.com/}.
13638
13639 NOTE: Webmail largely depends on cookies.  A "one-line-cookie" patch is
13640 required for url "4.0pre.46".
13641
13642 WARNING: Mails may be lost.  NO WARRANTY.
13643
13644 Keywords:
13645
13646 @table @code
13647 @item :subtype
13648 The type of the webmail server.  The default is @code{hotmail}.  The
13649 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
13650
13651 @item :user
13652 The user name to give to the webmail server.  The default is the login
13653 name.
13654
13655 @item :password
13656 The password to give to the webmail server.  If not specified, the user is
13657 prompted.
13658
13659 @item :dontexpunge
13660 If non-@code{nil}, only fetch unread articles and don't move them to
13661 trash folder after finishing the fetch.
13662
13663 @end table
13664
13665 An example webmail source:
13666
13667 @lisp
13668 (webmail :subtype 'hotmail
13669          :user "user-name"
13670          :password "secret")
13671 @end lisp
13672 @end table
13673
13674 @table @dfn
13675 @item Common Keywords
13676 Common keywords can be used in any type of mail source.
13677
13678 Keywords:
13679
13680 @table @code
13681 @item :plugged
13682 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
13683 use directory source to get mail, you can specify it as in this
13684 example:
13685
13686 @lisp
13687 (setq mail-sources
13688       '((directory :path "/home/pavel/.Spool/"
13689                    :suffix ""
13690                    :plugged t)))
13691 @end lisp
13692
13693 Gnus will then fetch your mail even when you are unplugged.  This is
13694 useful when you use local mail and news.
13695
13696 @end table
13697 @end table
13698
13699 @subsubsection Function Interface
13700
13701 Some of the above keywords specify a Lisp function to be executed.
13702 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
13703 the value of the keyword while the function is executing.  For example,
13704 consider the following mail-source setting:
13705
13706 @lisp
13707 (setq mail-sources '((pop :user "jrl"
13708                           :server "pophost" :function fetchfunc)))
13709 @end lisp
13710
13711 While the function @code{fetchfunc} is executing, the symbol @code{user}
13712 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
13713 @code{"pophost"}.  The symbols @code{port}, @code{password},
13714 @code{program}, @code{prescript}, @code{postscript}, @code{function},
13715 and @code{authentication} are also bound (to their default values).
13716
13717 See above for a list of keywords for each type of mail source.
13718
13719
13720 @node Mail Source Customization
13721 @subsubsection Mail Source Customization
13722
13723 The following is a list of variables that influence how the mail is
13724 fetched.  You would normally not need to set or change any of these
13725 variables.
13726
13727 @table @code
13728 @item mail-source-crash-box
13729 @vindex mail-source-crash-box
13730 File where mail will be stored while processing it.  The default is@*
13731 @file{~/.emacs-mail-crash-box}.
13732
13733 @item mail-source-delete-incoming
13734 @vindex mail-source-delete-incoming
13735 If non-@code{nil}, delete incoming files after handling them.  If
13736 @code{t}, delete the files immediately, if @code{nil}, never delete any
13737 files.  If a positive number, delete files older than number of days
13738 (This will only happen, when receiving new mail).  You may also set
13739 @code{mail-source-delete-incoming} to @code{nil} and call
13740 @code{mail-source-delete-old-incoming} from a hook or interactively.
13741
13742 @item mail-source-delete-old-incoming-confirm
13743 @vindex mail-source-delete-old-incoming-confirm
13744 If non-@code{nil}, ask for for confirmation before deleting old incoming
13745 files.  This variable only applies when
13746 @code{mail-source-delete-incoming} is a positive number.
13747
13748 @item mail-source-ignore-errors
13749 @vindex mail-source-ignore-errors
13750 If non-@code{nil}, ignore errors when reading mail from a mail source.
13751
13752 @item mail-source-directory
13753 @vindex mail-source-directory
13754 Directory where files (if any) will be stored.  The default is
13755 @file{~/Mail/}.  At present, the only thing this is used for is to say
13756 where the incoming files will be stored if the previous variable is
13757 @code{nil}.
13758
13759 @item mail-source-incoming-file-prefix
13760 @vindex mail-source-incoming-file-prefix
13761 Prefix for file name for storing incoming mail.  The default is
13762 @file{Incoming}, in which case files will end up with names like
13763 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
13764 relevant if @code{mail-source-delete-incoming} is @code{nil}.
13765
13766 @item mail-source-default-file-modes
13767 @vindex mail-source-default-file-modes
13768 All new mail files will get this file mode.  The default is 384.
13769
13770 @item mail-source-movemail-program
13771 @vindex mail-source-movemail-program
13772 If non-@code{nil}, name of program for fetching new mail.  If
13773 @code{nil}, @code{movemail} in @var{exec-directory}.
13774
13775 @end table
13776
13777
13778 @node Fetching Mail
13779 @subsubsection Fetching Mail
13780
13781 @vindex mail-sources
13782 @vindex nnmail-spool-file
13783 The way to actually tell Gnus where to get new mail from is to set
13784 @code{mail-sources} to a list of mail source specifiers
13785 (@pxref{Mail Source Specifiers}).
13786
13787 If this variable (and the obsolescent @code{nnmail-spool-file}) is
13788 @code{nil}, the mail back ends will never attempt to fetch mail by
13789 themselves.
13790
13791 If you want to fetch mail both from your local spool as well as a
13792 @acronym{POP} mail server, you'd say something like:
13793
13794 @lisp
13795 (setq mail-sources
13796       '((file)
13797         (pop :server "pop3.mail.server"
13798              :password "secret")))
13799 @end lisp
13800
13801 Or, if you don't want to use any of the keyword defaults:
13802
13803 @lisp
13804 (setq mail-sources
13805       '((file :path "/var/spool/mail/user-name")
13806         (pop :server "pop3.mail.server"
13807              :user "user-name"
13808              :port "pop3"
13809              :password "secret")))
13810 @end lisp
13811
13812
13813 When you use a mail back end, Gnus will slurp all your mail from your
13814 inbox and plonk it down in your home directory.  Gnus doesn't move any
13815 mail if you're not using a mail back end---you have to do a lot of magic
13816 invocations first.  At the time when you have finished drawing the
13817 pentagram, lightened the candles, and sacrificed the goat, you really
13818 shouldn't be too surprised when Gnus moves your mail.
13819
13820
13821
13822 @node Mail Back End Variables
13823 @subsection Mail Back End Variables
13824
13825 These variables are (for the most part) pertinent to all the various
13826 mail back ends.
13827
13828 @table @code
13829 @vindex nnmail-read-incoming-hook
13830 @item nnmail-read-incoming-hook
13831 The mail back ends all call this hook after reading new mail.  You can
13832 use this hook to notify any mail watch programs, if you want to.
13833
13834 @vindex nnmail-split-hook
13835 @item nnmail-split-hook
13836 @findex gnus-article-decode-encoded-words
13837 @cindex RFC 1522 decoding
13838 @cindex RFC 2047 decoding
13839 Hook run in the buffer where the mail headers of each message is kept
13840 just before the splitting based on these headers is done.  The hook is
13841 free to modify the buffer contents in any way it sees fit---the buffer
13842 is discarded after the splitting has been done, and no changes performed
13843 in the buffer will show up in any files.
13844 @code{gnus-article-decode-encoded-words} is one likely function to add
13845 to this hook.
13846
13847 @vindex nnmail-pre-get-new-mail-hook
13848 @vindex nnmail-post-get-new-mail-hook
13849 @item nnmail-pre-get-new-mail-hook
13850 @itemx nnmail-post-get-new-mail-hook
13851 These are two useful hooks executed when treating new incoming
13852 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
13853 starting to handle the new mail) and
13854 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
13855 is done).  Here's and example of using these two hooks to change the
13856 default file modes the new mail files get:
13857
13858 @lisp
13859 (add-hook 'nnmail-pre-get-new-mail-hook
13860           (lambda () (set-default-file-modes 511)))
13861
13862 (add-hook 'nnmail-post-get-new-mail-hook
13863           (lambda () (set-default-file-modes 551)))
13864 @end lisp
13865
13866 @item nnmail-use-long-file-names
13867 @vindex nnmail-use-long-file-names
13868 If non-@code{nil}, the mail back ends will use long file and directory
13869 names.  Groups like @samp{mail.misc} will end up in directories
13870 (assuming use of @code{nnml} back end) or files (assuming use of
13871 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
13872 the same group will end up in @file{mail/misc}.
13873
13874 @item nnmail-delete-file-function
13875 @vindex nnmail-delete-file-function
13876 @findex delete-file
13877 Function called to delete files.  It is @code{delete-file} by default.
13878
13879 @item nnmail-cache-accepted-message-ids
13880 @vindex nnmail-cache-accepted-message-ids
13881 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
13882 the back end (via @code{Gcc}, for instance) into the mail duplication
13883 discovery cache.  The default is @code{nil}.
13884
13885 @item nnmail-cache-ignore-groups
13886 @vindex nnmail-cache-ignore-groups
13887 This can be a regular expression or a list of regular expressions.
13888 Group names that match any of the regular expressions will never be
13889 recorded in the @code{Message-ID} cache.
13890
13891 This can be useful, for example, when using Fancy Splitting
13892 (@pxref{Fancy Mail Splitting}) together with the function
13893 @code{nnmail-split-fancy-with-parent}.
13894
13895 @end table
13896
13897
13898 @node Fancy Mail Splitting
13899 @subsection Fancy Mail Splitting
13900 @cindex mail splitting
13901 @cindex fancy mail splitting
13902
13903 @vindex nnmail-split-fancy
13904 @findex nnmail-split-fancy
13905 If the rather simple, standard method for specifying how to split mail
13906 doesn't allow you to do what you want, you can set
13907 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
13908 play with the @code{nnmail-split-fancy} variable.
13909
13910 Let's look at an example value of this variable first:
13911
13912 @lisp
13913 ;; @r{Messages from the mailer daemon are not crossposted to any of}
13914 ;; @r{the ordinary groups.  Warnings are put in a separate group}
13915 ;; @r{from real errors.}
13916 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
13917                    "mail.misc"))
13918    ;; @r{Non-error messages are crossposted to all relevant}
13919    ;; @r{groups, but we don't crosspost between the group for the}
13920    ;; @r{(ding) list and the group for other (ding) related mail.}
13921    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
13922          ("subject" "ding" "ding.misc"))
13923       ;; @r{Other mailing lists@dots{}}
13924       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
13925       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
13926       ;; @r{Both lists below have the same suffix, so prevent}
13927       ;; @r{cross-posting to mkpkg.list of messages posted only to}
13928       ;; @r{the bugs- list, but allow cross-posting when the}
13929       ;; @r{message was really cross-posted.}
13930       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
13931       (any "mypackage@@somewhere\" - "bugs-mypackage" "mypkg.list")
13932       ;; @r{People@dots{}}
13933       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
13934    ;; @r{Unmatched mail goes to the catch all group.}
13935    "misc.misc")
13936 @end lisp
13937
13938 This variable has the format of a @dfn{split}.  A split is a
13939 (possibly) recursive structure where each split may contain other
13940 splits.  Here are the possible split syntaxes:
13941
13942 @table @code
13943
13944 @item group 
13945 If the split is a string, that will be taken as a group name.  Normal
13946 regexp match expansion will be done.  See below for examples.
13947
13948 @item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split})
13949 If the split is a list, the first element of which is a string, then
13950 store the message as specified by @var{split}, if header @var{field}
13951 (a regexp) contains @var{value} (also a regexp).  If @var{restrict}
13952 (yet another regexp) matches some string after @var{field} and before
13953 the end of the matched @var{value}, the @var{split} is ignored.  If
13954 none of the @var{restrict} clauses match, @var{split} is processed.
13955
13956 @item (| @var{split} @dots{})
13957 If the split is a list, and the first element is @code{|} (vertical
13958 bar), then process each @var{split} until one of them matches.  A
13959 @var{split} is said to match if it will cause the mail message to be
13960 stored in one or more groups.
13961
13962 @item (& @var{split} @dots{})
13963 If the split is a list, and the first element is @code{&}, then
13964 process all @var{split}s in the list.
13965
13966 @item junk
13967 If the split is the symbol @code{junk}, then don't save (i.e., delete)
13968 this message.  Use with extreme caution.
13969
13970 @item (: @var{function} @var{arg1} @var{arg2} @dots{})
13971 If the split is a list, and the first element is @samp{:}, then the
13972 second element will be called as a function with @var{args} given as
13973 arguments.  The function should return a @var{split}.
13974
13975 @cindex body split
13976 For instance, the following function could be used to split based on the
13977 body of the messages:
13978
13979 @lisp
13980 (defun split-on-body ()
13981   (save-excursion
13982     (save-restriction
13983       (widen)
13984       (goto-char (point-min))
13985       (when (re-search-forward "Some.*string" nil t)
13986         "string.group"))))
13987 @end lisp
13988
13989 The buffer is narrowed to the message in question when @var{function}
13990 is run.  That's why @code{(widen)} needs to be called after
13991 @code{save-excursion} and @code{save-restriction} in the example
13992 above.  Also note that with the nnimap backend, message bodies will
13993 not be downloaded by default.  You need to set
13994 @code{nnimap-split-download-body} to @code{t} to do that
13995 (@pxref{Splitting in IMAP}).
13996
13997 @item (! @var{func} @var{split})
13998 If the split is a list, and the first element is @code{!}, then
13999 @var{split} will be processed, and @var{func} will be called as a
14000 function with the result of @var{split} as argument.  @var{func}
14001 should return a split.
14002
14003 @item nil
14004 If the split is @code{nil}, it is ignored.
14005
14006 @end table
14007
14008 In these splits, @var{field} must match a complete field name.
14009 @var{value} must match a complete word according to the fundamental mode
14010 syntax table.  You can use @code{.*} in the regexps to match partial
14011 field names or words.  In other words, all @var{value}'s are wrapped in
14012 @samp{\<} and @samp{\>} pairs.
14013
14014 @vindex nnmail-split-abbrev-alist
14015 @var{field} and @var{value} can also be Lisp symbols, in that case
14016 they are expanded as specified by the variable
14017 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells,
14018 where the @sc{car} of a cell contains the key, and the @sc{cdr}
14019 contains the associated value.  Predefined entries in
14020 @code{nnmail-split-abbrev-alist} include:
14021
14022 @table @code
14023 @item from
14024 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
14025 @item to
14026 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
14027 @samp{Resent-To} and @samp{Resent-Cc} fields.
14028 @item any
14029 Is the union of the @code{from} and @code{to} entries.
14030 @end table
14031
14032 @vindex nnmail-split-fancy-syntax-table
14033 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
14034 when all this splitting is performed.
14035
14036 If you want to have Gnus create groups dynamically based on some
14037 information in the headers (i.e., do @code{replace-match}-like
14038 substitutions in the group names), you can say things like:
14039
14040 @example
14041 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
14042 @end example
14043
14044 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
14045 will be filed in @samp{mail.debian.foo}.
14046
14047 If the string contains the element @samp{\&}, then the previously
14048 matched string will be substituted.  Similarly, the elements @samp{\\1}
14049 up to @samp{\\9} will be substituted with the text matched by the
14050 groupings 1 through 9.
14051
14052 @vindex nnmail-split-fancy-match-partial-words
14053 @code{nnmail-split-fancy-match-partial-words} controls whether partial
14054 words are matched during fancy splitting.
14055
14056 Normally, regular expressions given in @code{nnmail-split-fancy} are
14057 implicitly surrounded by @code{\<...\>} markers, which are word
14058 delimiters.  If this variable is true, they are not implicitly
14059 surrounded by anything.
14060
14061 @example
14062 (any "joe" "joemail")
14063 @end example
14064
14065 In this example, messages sent from @samp{joedavis@@foo.org} will
14066 normally not be filed in @samp{joemail}.  With
14067 @code{nnmail-split-fancy-match-partial-words} set to t, however, the
14068 match will happen.  In effect, the requirement of a word boundary is
14069 removed and instead the match becomes more like a grep.
14070
14071 @findex nnmail-split-fancy-with-parent
14072 @code{nnmail-split-fancy-with-parent} is a function which allows you to
14073 split followups into the same groups their parents are in.  Sometimes
14074 you can't make splitting rules for all your mail.  For example, your
14075 boss might send you personal mail regarding different projects you are
14076 working on, and as you can't tell your boss to put a distinguishing
14077 string into the subject line, you have to resort to manually moving the
14078 messages into the right group.  With this function, you only have to do
14079 it once per thread.
14080
14081 To use this feature, you have to set @code{nnmail-treat-duplicates}
14082 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
14083 value.  And then you can include @code{nnmail-split-fancy-with-parent}
14084 using the colon feature, like so:
14085 @lisp
14086 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
14087       nnmail-cache-accepted-message-ids t
14088       nnmail-split-fancy
14089       '(| (: nnmail-split-fancy-with-parent)
14090           ;; @r{other splits go here}
14091         ))
14092 @end lisp
14093
14094 This feature works as follows: when @code{nnmail-treat-duplicates} is
14095 non-@code{nil}, Gnus records the message id of every message it sees
14096 in the file specified by the variable
14097 @code{nnmail-message-id-cache-file}, together with the group it is in
14098 (the group is omitted for non-mail messages).  When mail splitting is
14099 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
14100 at the References (and In-Reply-To) header of each message to split
14101 and searches the file specified by @code{nnmail-message-id-cache-file}
14102 for the message ids.  When it has found a parent, it returns the
14103 corresponding group name unless the group name matches the regexp
14104 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
14105 recommended that you set @code{nnmail-message-id-cache-length} to a
14106 somewhat higher number than the default so that the message ids are
14107 still in the cache.  (A value of 5000 appears to create a file some
14108 300 kBytes in size.)
14109 @vindex nnmail-cache-accepted-message-ids
14110 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
14111 also records the message ids of moved articles, so that the followup
14112 messages goes into the new group.
14113
14114 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
14115 want certain groups to be recorded in the cache.  For example, if all
14116 outgoing messages are written to an ``outgoing'' group, you could set
14117 @code{nnmail-cache-ignore-groups} to match that group name.
14118 Otherwise, answers to all your messages would end up in the
14119 ``outgoing'' group.
14120
14121
14122 @node Group Mail Splitting
14123 @subsection Group Mail Splitting
14124 @cindex mail splitting
14125 @cindex group mail splitting
14126
14127 @findex gnus-group-split
14128 If you subscribe to dozens of mailing lists but you don't want to
14129 maintain mail splitting rules manually, group mail splitting is for you.
14130 You just have to set @code{to-list} and/or @code{to-address} in group
14131 parameters or group customization and set @code{nnmail-split-methods} to
14132 @code{gnus-group-split}.  This splitting function will scan all groups
14133 for those parameters and split mail accordingly, i.e., messages posted
14134 from or to the addresses specified in the parameters @code{to-list} or
14135 @code{to-address} of a mail group will be stored in that group.
14136
14137 Sometimes, mailing lists have multiple addresses, and you may want mail
14138 splitting to recognize them all: just set the @code{extra-aliases} group
14139 parameter to the list of additional addresses and it's done.  If you'd
14140 rather use a regular expression, set @code{split-regexp}.
14141
14142 All these parameters in a group will be used to create an
14143 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
14144 the @var{value} is a single regular expression that matches
14145 @code{to-list}, @code{to-address}, all of @code{extra-aliases} and all
14146 matches of @code{split-regexp}, and the @var{split} is the name of the
14147 group.  @var{restrict}s are also supported: just set the
14148 @code{split-exclude} parameter to a list of regular expressions.
14149
14150 If you can't get the right split to be generated using all these
14151 parameters, or you just need something fancier, you can set the
14152 parameter @code{split-spec} to an @code{nnmail-split-fancy} split.  In
14153 this case, all other aforementioned parameters will be ignored by
14154 @code{gnus-group-split}.  In particular, @code{split-spec} may be set to
14155 @code{nil}, in which case the group will be ignored by
14156 @code{gnus-group-split}.
14157
14158 @vindex gnus-group-split-default-catch-all-group
14159 @code{gnus-group-split} will do cross-posting on all groups that match,
14160 by defining a single @code{&} fancy split containing one split for each
14161 group.  If a message doesn't match any split, it will be stored in the
14162 group named in @code{gnus-group-split-default-catch-all-group}, unless
14163 some group has @code{split-spec} set to @code{catch-all}, in which case
14164 that group is used as the catch-all group.  Even though this variable is
14165 often used just to name a group, it may also be set to an arbitrarily
14166 complex fancy split (after all, a group name is a fancy split), and this
14167 may be useful to split mail that doesn't go to any mailing list to
14168 personal mail folders.  Note that this fancy split is added as the last
14169 element of a @code{|} split list that also contains a @code{&} split
14170 with the rules extracted from group parameters.
14171
14172 It's time for an example.  Assume the following group parameters have
14173 been defined:
14174
14175 @example
14176 nnml:mail.bar:
14177 ((to-address . "bar@@femail.com")
14178  (split-regexp . ".*@@femail\\.com"))
14179 nnml:mail.foo:
14180 ((to-list . "foo@@nowhere.gov")
14181  (extra-aliases "foo@@localhost" "foo-redist@@home")
14182  (split-exclude "bugs-foo" "rambling-foo")
14183  (admin-address . "foo-request@@nowhere.gov"))
14184 nnml:mail.others:
14185 ((split-spec . catch-all))
14186 @end example
14187
14188 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
14189 behave as if @code{nnmail-split-fancy} had been selected and variable
14190 @code{nnmail-split-fancy} had been set as follows:
14191
14192 @lisp
14193 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
14194       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
14195            - "bugs-foo" - "rambling-foo" "mail.foo"))
14196    "mail.others")
14197 @end lisp
14198
14199 @findex gnus-group-split-fancy
14200 If you'd rather not use group splitting for all your mail groups, you
14201 may use it for only some of them, by using @code{nnmail-split-fancy}
14202 splits like this:
14203
14204 @lisp
14205 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
14206 @end lisp
14207
14208 @var{groups} may be a regular expression or a list of group names whose
14209 parameters will be scanned to generate the output split.
14210 @var{no-crosspost} can be used to disable cross-posting; in this case, a
14211 single @code{|} split will be output.  @var{catch-all} is the fall back
14212 fancy split, used like @code{gnus-group-split-default-catch-all-group}.
14213 If @var{catch-all} is @code{nil}, or if @code{split-regexp} matches the
14214 empty string in any selected group, no catch-all split will be issued.
14215 Otherwise, if some group has @code{split-spec} set to @code{catch-all},
14216 this group will override the value of the @var{catch-all} argument.
14217
14218 @findex gnus-group-split-setup
14219 Unfortunately, scanning all groups and their parameters can be quite
14220 slow, especially considering that it has to be done for every message.
14221 But don't despair!  The function @code{gnus-group-split-setup} can be
14222 used to enable @code{gnus-group-split} in a much more efficient way.  It
14223 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
14224 @code{nnmail-split-fancy} to the split produced by
14225 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
14226 scanned once, no matter how many messages are split.
14227
14228 @findex gnus-group-split-update
14229 However, if you change group parameters, you'd have to update
14230 @code{nnmail-split-fancy} manually.  You can do it by running
14231 @code{gnus-group-split-update}.  If you'd rather have it updated
14232 automatically, just tell @code{gnus-group-split-setup} to do it for
14233 you.  For example, add to your @file{~/.gnus.el}:
14234
14235 @lisp
14236 (gnus-group-split-setup @var{auto-update} @var{catch-all})
14237 @end lisp
14238
14239 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
14240 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
14241 have to worry about updating @code{nnmail-split-fancy} again.  If you
14242 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
14243 @code{gnus-group-split-default-catch-all-group} will be set to its
14244 value.
14245
14246 @vindex gnus-group-split-updated-hook
14247 Because you may want to change @code{nnmail-split-fancy} after it is set
14248 by @code{gnus-group-split-update}, this function will run
14249 @code{gnus-group-split-updated-hook} just before finishing.
14250
14251 @node Incorporating Old Mail
14252 @subsection Incorporating Old Mail
14253 @cindex incorporating old mail
14254 @cindex import old mail
14255
14256 Most people have lots of old mail stored in various file formats.  If
14257 you have set up Gnus to read mail using one of the spiffy Gnus mail
14258 back ends, you'll probably wish to have that old mail incorporated into
14259 your mail groups.
14260
14261 Doing so can be quite easy.
14262
14263 To take an example: You're reading mail using @code{nnml}
14264 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
14265 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
14266 file filled with important, but old, mail.  You want to move it into
14267 your @code{nnml} groups.
14268
14269 Here's how:
14270
14271 @enumerate
14272 @item
14273 Go to the group buffer.
14274
14275 @item
14276 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
14277 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
14278
14279 @item
14280 Type @kbd{SPACE} to enter the newly created group.
14281
14282 @item
14283 Type @kbd{M P b} to process-mark all articles in this group's buffer
14284 (@pxref{Setting Process Marks}).
14285
14286 @item
14287 Type @kbd{B r} to respool all the process-marked articles, and answer
14288 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
14289 @end enumerate
14290
14291 All the mail messages in the mbox file will now also be spread out over
14292 all your @code{nnml} groups.  Try entering them and check whether things
14293 have gone without a glitch.  If things look ok, you may consider
14294 deleting the mbox file, but I wouldn't do that unless I was absolutely
14295 sure that all the mail has ended up where it should be.
14296
14297 Respooling is also a handy thing to do if you're switching from one mail
14298 back end to another.  Just respool all the mail in the old mail groups
14299 using the new mail back end.
14300
14301
14302 @node Expiring Mail
14303 @subsection Expiring Mail
14304 @cindex article expiry
14305
14306 Traditional mail readers have a tendency to remove mail articles when
14307 you mark them as read, in some way.  Gnus takes a fundamentally
14308 different approach to mail reading.
14309
14310 Gnus basically considers mail just to be news that has been received in
14311 a rather peculiar manner.  It does not think that it has the power to
14312 actually change the mail, or delete any mail messages.  If you enter a
14313 mail group, and mark articles as ``read'', or kill them in some other
14314 fashion, the mail articles will still exist on the system.  I repeat:
14315 Gnus will not delete your old, read mail.  Unless you ask it to, of
14316 course.
14317
14318 To make Gnus get rid of your unwanted mail, you have to mark the
14319 articles as @dfn{expirable}.  (With the default key bindings, this means
14320 that you have to type @kbd{E}.)  This does not mean that the articles
14321 will disappear right away, however.  In general, a mail article will be
14322 deleted from your system if, 1) it is marked as expirable, AND 2) it is
14323 more than one week old.  If you do not mark an article as expirable, it
14324 will remain on your system until hell freezes over.  This bears
14325 repeating one more time, with some spurious capitalizations: IF you do
14326 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
14327
14328 You do not have to mark articles as expirable by hand.  Gnus provides
14329 two features, called ``auto-expire'' and ``total-expire'', that can help you
14330 with this.  In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
14331 for you when you select an article.  And ``total-expire'' means that Gnus
14332 considers all articles as expirable that are read.  So, in addition to
14333 the articles marked @samp{E}, also the articles marked @samp{r},
14334 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
14335 expirable.
14336
14337 When should either auto-expire or total-expire be used?  Most people
14338 who are subscribed to mailing lists split each list into its own group
14339 and then turn on auto-expire or total-expire for those groups.
14340 (@xref{Splitting Mail}, for more information on splitting each list
14341 into its own group.)
14342
14343 Which one is better, auto-expire or total-expire?  It's not easy to
14344 answer.  Generally speaking, auto-expire is probably faster.  Another
14345 advantage of auto-expire is that you get more marks to work with: for
14346 the articles that are supposed to stick around, you can still choose
14347 between tick and dormant and read marks.  But with total-expire, you
14348 only have dormant and ticked to choose from.  The advantage of
14349 total-expire is that it works well with adaptive scoring (@pxref{Adaptive
14350 Scoring}).  Auto-expire works with normal scoring but not with adaptive
14351 scoring.
14352
14353 @vindex gnus-auto-expirable-newsgroups
14354 Groups that match the regular expression
14355 @code{gnus-auto-expirable-newsgroups} will have all articles that you
14356 read marked as expirable automatically.  All articles marked as
14357 expirable have an @samp{E} in the first column in the summary buffer.
14358
14359 By default, if you have auto expiry switched on, Gnus will mark all the
14360 articles you read as expirable, no matter if they were read or unread
14361 before.  To avoid having articles marked as read marked as expirable
14362 automatically, you can put something like the following in your
14363 @file{~/.gnus.el} file:
14364
14365 @vindex gnus-mark-article-hook
14366 @lisp
14367 (remove-hook 'gnus-mark-article-hook
14368              'gnus-summary-mark-read-and-unread-as-read)
14369 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
14370 @end lisp
14371
14372 Note that making a group auto-expirable doesn't mean that all read
14373 articles are expired---only the articles marked as expirable
14374 will be expired.  Also note that using the @kbd{d} command won't make
14375 articles expirable---only semi-automatic marking of articles as read will
14376 mark the articles as expirable in auto-expirable groups.
14377
14378 Let's say you subscribe to a couple of mailing lists, and you want the
14379 articles you have read to disappear after a while:
14380
14381 @lisp
14382 (setq gnus-auto-expirable-newsgroups
14383       "mail.nonsense-list\\|mail.nice-list")
14384 @end lisp
14385
14386 Another way to have auto-expiry happen is to have the element
14387 @code{auto-expire} in the group parameters of the group.
14388
14389 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
14390 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
14391 don't really mix very well.
14392
14393 @vindex nnmail-expiry-wait
14394 The @code{nnmail-expiry-wait} variable supplies the default time an
14395 expirable article has to live.  Gnus starts counting days from when the
14396 message @emph{arrived}, not from when it was sent.  The default is seven
14397 days.
14398
14399 Gnus also supplies a function that lets you fine-tune how long articles
14400 are to live, based on what group they are in.  Let's say you want to
14401 have one month expiry period in the @samp{mail.private} group, a one day
14402 expiry period in the @samp{mail.junk} group, and a six day expiry period
14403 everywhere else:
14404
14405 @vindex nnmail-expiry-wait-function
14406 @lisp
14407 (setq nnmail-expiry-wait-function
14408       (lambda (group)
14409        (cond ((string= group "mail.private")
14410                31)
14411              ((string= group "mail.junk")
14412                1)
14413              ((string= group "important")
14414                'never)
14415              (t
14416                6))))
14417 @end lisp
14418
14419 The group names this function is fed are ``unadorned'' group
14420 names---no @samp{nnml:} prefixes and the like.
14421
14422 The @code{nnmail-expiry-wait} variable and
14423 @code{nnmail-expiry-wait-function} function can either be a number (not
14424 necessarily an integer) or one of the symbols @code{immediate} or
14425 @code{never}.
14426
14427 You can also use the @code{expiry-wait} group parameter to selectively
14428 change the expiry period (@pxref{Group Parameters}).
14429
14430 @vindex nnmail-expiry-target
14431 The normal action taken when expiring articles is to delete them.
14432 However, in some circumstances it might make more sense to move them
14433 to other groups instead of deleting them.  The variable
14434 @code{nnmail-expiry-target} (and the @code{expiry-target} group
14435 parameter) controls this.  The variable supplies a default value for
14436 all groups, which can be overridden for specific groups by the group
14437 parameter.  default value is @code{delete}, but this can also be a
14438 string (which should be the name of the group the message should be
14439 moved to), or a function (which will be called in a buffer narrowed to
14440 the message in question, and with the name of the group being moved
14441 from as its parameter) which should return a target---either a group
14442 name or @code{delete}.
14443
14444 Here's an example for specifying a group name:
14445 @lisp
14446 (setq nnmail-expiry-target "nnml:expired")
14447 @end lisp
14448
14449 @findex nnmail-fancy-expiry-target
14450 @vindex nnmail-fancy-expiry-targets
14451 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
14452 expire mail to groups according to the variable
14453 @code{nnmail-fancy-expiry-targets}.  Here's an example:
14454
14455 @lisp
14456  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
14457        nnmail-fancy-expiry-targets
14458        '((to-from "boss" "nnfolder:Work")
14459          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
14460          ("from" ".*" "nnfolder:Archive-%Y")))
14461 @end lisp
14462
14463 With this setup, any mail that has @code{IMPORTANT} in its Subject
14464 header and was sent in the year @code{YYYY} and month @code{MMM}, will
14465 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}.  If its
14466 From or To header contains the string @code{boss}, it will get expired
14467 to @code{nnfolder:Work}.  All other mail will get expired to
14468 @code{nnfolder:Archive-YYYY}.
14469
14470 @vindex nnmail-keep-last-article
14471 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
14472 expire the final article in a mail newsgroup.  This is to make life
14473 easier for procmail users.
14474
14475 @vindex gnus-total-expirable-newsgroups
14476 By the way: That line up there, about Gnus never expiring non-expirable
14477 articles, is a lie.  If you put @code{total-expire} in the group
14478 parameters, articles will not be marked as expirable, but all read
14479 articles will be put through the expiry process.  Use with extreme
14480 caution.  Even more dangerous is the
14481 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
14482 this regexp will have all read articles put through the expiry process,
14483 which means that @emph{all} old mail articles in the groups in question
14484 will be deleted after a while.  Use with extreme caution, and don't come
14485 crying to me when you discover that the regexp you used matched the
14486 wrong group and all your important mail has disappeared.  Be a
14487 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
14488 with!  So there!
14489
14490 Most people make most of their mail groups total-expirable, though.
14491
14492 @vindex gnus-inhibit-user-auto-expire
14493 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
14494 commands will not mark an article as expirable, even if the group has
14495 auto-expire turned on.
14496
14497
14498 @node Washing Mail
14499 @subsection Washing Mail
14500 @cindex mail washing
14501 @cindex list server brain damage
14502 @cindex incoming mail treatment
14503
14504 Mailers and list servers are notorious for doing all sorts of really,
14505 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
14506 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
14507 end of all lines passing through our server, so let's do that!!!!1!''
14508 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
14509 considered to be self-evident were not discussed.  So.  Here we are.
14510
14511 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
14512 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
14513 be shocked and dismayed by this, but I haven't got the energy.  It is to
14514 laugh.
14515
14516 Gnus provides a plethora of functions for washing articles while
14517 displaying them, but it might be nicer to do the filtering before
14518 storing the mail to disk.  For that purpose, we have three hooks and
14519 various functions that can be put in these hooks.
14520
14521 @table @code
14522 @item nnmail-prepare-incoming-hook
14523 @vindex nnmail-prepare-incoming-hook
14524 This hook is called before doing anything with the mail and is meant for
14525 grand, sweeping gestures.  It is called in a buffer that contains all
14526 the new, incoming mail.  Functions to be used include:
14527
14528 @table @code
14529 @item nnheader-ms-strip-cr
14530 @findex nnheader-ms-strip-cr
14531 Remove trailing carriage returns from each line.  This is default on
14532 Emacs running on MS machines.
14533
14534 @end table
14535
14536 @item nnmail-prepare-incoming-header-hook
14537 @vindex nnmail-prepare-incoming-header-hook
14538 This hook is called narrowed to each header.  It can be used when
14539 cleaning up the headers.  Functions that can be used include:
14540
14541 @table @code
14542 @item nnmail-remove-leading-whitespace
14543 @findex nnmail-remove-leading-whitespace
14544 Clear leading white space that ``helpful'' listservs have added to the
14545 headers to make them look nice.  Aaah.
14546
14547 (Note that this function works on both the header on the body of all
14548 messages, so it is a potentially dangerous function to use (if a body
14549 of a message contains something that looks like a header line).  So
14550 rather than fix the bug, it is of course the right solution to make it
14551 into a feature by documenting it.)
14552
14553 @item nnmail-remove-list-identifiers
14554 @findex nnmail-remove-list-identifiers
14555 Some list servers add an identifier---for example, @samp{(idm)}---to the
14556 beginning of all @code{Subject} headers.  I'm sure that's nice for
14557 people who use stone age mail readers.  This function will remove
14558 strings that match the @code{nnmail-list-identifiers} regexp, which can
14559 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
14560 @code{\\(..\\)}.
14561
14562 For instance, if you want to remove the @samp{(idm)} and the
14563 @samp{nagnagnag} identifiers:
14564
14565 @lisp
14566 (setq nnmail-list-identifiers
14567       '("(idm)" "nagnagnag"))
14568 @end lisp
14569
14570 This can also be done non-destructively with
14571 @code{gnus-list-identifiers}, @xref{Article Hiding}.
14572
14573 @item nnmail-remove-tabs
14574 @findex nnmail-remove-tabs
14575 Translate all @samp{TAB} characters into @samp{SPACE} characters.
14576
14577 @item nnmail-fix-eudora-headers
14578 @findex nnmail-fix-eudora-headers
14579 @cindex Eudora
14580 Eudora produces broken @code{References} headers, but OK
14581 @code{In-Reply-To} headers.  This function will get rid of the
14582 @code{References} headers.
14583
14584 @end table
14585
14586 @item nnmail-prepare-incoming-message-hook
14587 @vindex nnmail-prepare-incoming-message-hook
14588 This hook is called narrowed to each message.  Functions to be used
14589 include:
14590
14591 @table @code
14592 @item article-de-quoted-unreadable
14593 @findex article-de-quoted-unreadable
14594 Decode Quoted Readable encoding.
14595
14596 @end table
14597 @end table
14598
14599
14600 @node Duplicates
14601 @subsection Duplicates
14602
14603 @vindex nnmail-treat-duplicates
14604 @vindex nnmail-message-id-cache-length
14605 @vindex nnmail-message-id-cache-file
14606 @cindex duplicate mails
14607 If you are a member of a couple of mailing lists, you will sometimes
14608 receive two copies of the same mail.  This can be quite annoying, so
14609 @code{nnmail} checks for and treats any duplicates it might find.  To do
14610 this, it keeps a cache of old @code{Message-ID}s---
14611 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
14612 default.  The approximate maximum number of @code{Message-ID}s stored
14613 there is controlled by the @code{nnmail-message-id-cache-length}
14614 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
14615 stored.) If all this sounds scary to you, you can set
14616 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
14617 default), and @code{nnmail} won't delete duplicate mails.  Instead it
14618 will insert a warning into the head of the mail saying that it thinks
14619 that this is a duplicate of a different message.
14620
14621 This variable can also be a function.  If that's the case, the function
14622 will be called from a buffer narrowed to the message in question with
14623 the @code{Message-ID} as a parameter.  The function must return either
14624 @code{nil}, @code{warn}, or @code{delete}.
14625
14626 You can turn this feature off completely by setting the variable to
14627 @code{nil}.
14628
14629 If you want all the duplicate mails to be put into a special
14630 @dfn{duplicates} group, you could do that using the normal mail split
14631 methods:
14632
14633 @lisp
14634 (setq nnmail-split-fancy
14635       '(| ;; @r{Messages duplicates go to a separate group.}
14636         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
14637         ;; @r{Message from daemons, postmaster, and the like to another.}
14638         (any mail "mail.misc")
14639         ;; @r{Other rules.}
14640         [...] ))
14641 @end lisp
14642 @noindent
14643 Or something like:
14644 @lisp
14645 (setq nnmail-split-methods
14646       '(("duplicates" "^Gnus-Warning:.*duplicate")
14647         ;; @r{Other rules.}
14648         [...]))
14649 @end lisp
14650
14651 Here's a neat feature: If you know that the recipient reads her mail
14652 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
14653 @code{delete}, you can send her as many insults as you like, just by
14654 using a @code{Message-ID} of a mail that you know that she's already
14655 received.  Think of all the fun!  She'll never see any of it!  Whee!
14656
14657
14658 @node Not Reading Mail
14659 @subsection Not Reading Mail
14660
14661 If you start using any of the mail back ends, they have the annoying
14662 habit of assuming that you want to read mail with them.  This might not
14663 be unreasonable, but it might not be what you want.
14664
14665 If you set @code{mail-sources} and @code{nnmail-spool-file} to
14666 @code{nil}, none of the back ends will ever attempt to read incoming
14667 mail, which should help.
14668
14669 @vindex nnbabyl-get-new-mail
14670 @vindex nnmbox-get-new-mail
14671 @vindex nnml-get-new-mail
14672 @vindex nnmh-get-new-mail
14673 @vindex nnfolder-get-new-mail
14674 This might be too much, if, for instance, you are reading mail quite
14675 happily with @code{nnml} and just want to peek at some old Rmail
14676 file you have stashed away with @code{nnbabyl}.  All back ends have
14677 variables called back-end-@code{get-new-mail}.  If you want to disable
14678 the @code{nnbabyl} mail reading, you edit the virtual server for the
14679 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
14680
14681 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
14682 narrowed to the article to be saved before saving it when reading
14683 incoming mail.
14684
14685
14686 @node Choosing a Mail Back End
14687 @subsection Choosing a Mail Back End
14688
14689 Gnus will read the mail spool when you activate a mail group.  The mail
14690 file is first copied to your home directory.  What happens after that
14691 depends on what format you want to store your mail in.
14692
14693 There are six different mail back ends in the standard Gnus, and more
14694 back ends are available separately.  The mail back end most people use
14695 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
14696 Spool}).
14697
14698 @menu
14699 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
14700 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
14701 * Mail Spool::                  Store your mail in a private spool?
14702 * MH Spool::                    An mhspool-like back end.
14703 * Maildir::                     Another one-file-per-message format.
14704 * Mail Folders::                Having one file for each group.
14705 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
14706 @end menu
14707
14708
14709 @node Unix Mail Box
14710 @subsubsection Unix Mail Box
14711 @cindex nnmbox
14712 @cindex unix mail box
14713
14714 @vindex nnmbox-active-file
14715 @vindex nnmbox-mbox-file
14716 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
14717 mail.  @code{nnmbox} will add extra headers to each mail article to say
14718 which group it belongs in.
14719
14720 Virtual server settings:
14721
14722 @table @code
14723 @item nnmbox-mbox-file
14724 @vindex nnmbox-mbox-file
14725 The name of the mail box in the user's home directory.  Default is
14726 @file{~/mbox}.
14727
14728 @item nnmbox-active-file
14729 @vindex nnmbox-active-file
14730 The name of the active file for the mail box.  Default is
14731 @file{~/.mbox-active}.
14732
14733 @item nnmbox-get-new-mail
14734 @vindex nnmbox-get-new-mail
14735 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
14736 into groups.  Default is @code{t}.
14737 @end table
14738
14739
14740 @node Rmail Babyl
14741 @subsubsection Rmail Babyl
14742 @cindex nnbabyl
14743 @cindex Rmail mbox
14744
14745 @vindex nnbabyl-active-file
14746 @vindex nnbabyl-mbox-file
14747 The @dfn{nnbabyl} back end will use a Babyl mail box (aka. @dfn{Rmail
14748 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
14749 mail article to say which group it belongs in.
14750
14751 Virtual server settings:
14752
14753 @table @code
14754 @item nnbabyl-mbox-file
14755 @vindex nnbabyl-mbox-file
14756 The name of the Rmail mbox file.  The default is @file{~/RMAIL}
14757
14758 @item nnbabyl-active-file
14759 @vindex nnbabyl-active-file
14760 The name of the active file for the rmail box.  The default is
14761 @file{~/.rmail-active}
14762
14763 @item nnbabyl-get-new-mail
14764 @vindex nnbabyl-get-new-mail
14765 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
14766 @code{t}
14767 @end table
14768
14769
14770 @node Mail Spool
14771 @subsubsection Mail Spool
14772 @cindex nnml
14773 @cindex mail @acronym{NOV} spool
14774
14775 The @dfn{nnml} spool mail format isn't compatible with any other known
14776 format.  It should be used with some caution.
14777
14778 @vindex nnml-directory
14779 If you use this back end, Gnus will split all incoming mail into files,
14780 one file for each mail, and put the articles into the corresponding
14781 directories under the directory specified by the @code{nnml-directory}
14782 variable.  The default value is @file{~/Mail/}.
14783
14784 You do not have to create any directories beforehand; Gnus will take
14785 care of all that.
14786
14787 If you have a strict limit as to how many files you are allowed to store
14788 in your account, you should not use this back end.  As each mail gets its
14789 own file, you might very well occupy thousands of inodes within a few
14790 weeks.  If this is no problem for you, and it isn't a problem for you
14791 having your friendly systems administrator walking around, madly,
14792 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
14793 know that this is probably the fastest format to use.  You do not have
14794 to trudge through a big mbox file just to read your new mail.
14795
14796 @code{nnml} is probably the slowest back end when it comes to article
14797 splitting.  It has to create lots of files, and it also generates
14798 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
14799 fastest back end when it comes to reading mail.
14800
14801 @cindex self contained nnml servers
14802 @cindex marks
14803 When the marks file is used (which it is by default), @code{nnml}
14804 servers have the property that you may backup them using @code{tar} or
14805 similar, and later be able to restore them into Gnus (by adding the
14806 proper @code{nnml} server) and have all your marks be preserved.  Marks
14807 for a group is usually stored in the @code{.marks} file (but see
14808 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
14809 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
14810 to restore the group (after restoring the backup into the nnml
14811 directory).
14812
14813 If for some reason you believe your @file{.marks} files are screwed
14814 up, you can just delete them all.  Gnus will then correctly regenerate
14815 them next time it starts.
14816
14817 Virtual server settings:
14818
14819 @table @code
14820 @item nnml-directory
14821 @vindex nnml-directory
14822 All @code{nnml} directories will be placed under this directory.  The
14823 default is the value of @code{message-directory} (whose default value
14824 is @file{~/Mail}).
14825
14826 @item nnml-active-file
14827 @vindex nnml-active-file
14828 The active file for the @code{nnml} server.  The default is
14829 @file{~/Mail/active}.
14830
14831 @item nnml-newsgroups-file
14832 @vindex nnml-newsgroups-file
14833 The @code{nnml} group descriptions file.  @xref{Newsgroups File
14834 Format}.  The default is @file{~/Mail/newsgroups}.
14835
14836 @item nnml-get-new-mail
14837 @vindex nnml-get-new-mail
14838 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
14839 @code{t}.
14840
14841 @item nnml-nov-is-evil
14842 @vindex nnml-nov-is-evil
14843 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
14844 default is @code{nil}.
14845
14846 @item nnml-nov-file-name
14847 @vindex nnml-nov-file-name
14848 The name of the @acronym{NOV} files.  The default is @file{.overview}.
14849
14850 @item nnml-prepare-save-mail-hook
14851 @vindex nnml-prepare-save-mail-hook
14852 Hook run narrowed to an article before saving.
14853
14854 @item nnml-marks-is-evil
14855 @vindex nnml-marks-is-evil
14856 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
14857 default is @code{nil}.
14858
14859 @item nnml-marks-file-name
14860 @vindex nnml-marks-file-name
14861 The name of the @dfn{marks} files.  The default is @file{.marks}.
14862
14863 @item nnml-use-compressed-files
14864 @vindex nnml-use-compressed-files
14865 If non-@code{nil}, @code{nnml} will allow using compressed message
14866 files.
14867
14868 @end table
14869
14870 @findex nnml-generate-nov-databases
14871 If your @code{nnml} groups and @acronym{NOV} files get totally out of
14872 whack, you can do a complete update by typing @kbd{M-x
14873 nnml-generate-nov-databases}.  This command will trawl through the
14874 entire @code{nnml} hierarchy, looking at each and every article, so it
14875 might take a while to complete.  A better interface to this
14876 functionality can be found in the server buffer (@pxref{Server
14877 Commands}).
14878
14879
14880 @node MH Spool
14881 @subsubsection MH Spool
14882 @cindex nnmh
14883 @cindex mh-e mail spool
14884
14885 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
14886 @acronym{NOV} databases and it doesn't keep an active file or marks
14887 file.  This makes @code{nnmh} a @emph{much} slower back end than
14888 @code{nnml}, but it also makes it easier to write procmail scripts
14889 for.
14890
14891 Virtual server settings:
14892
14893 @table @code
14894 @item nnmh-directory
14895 @vindex nnmh-directory
14896 All @code{nnmh} directories will be located under this directory.  The
14897 default is the value of @code{message-directory} (whose default is
14898 @file{~/Mail})
14899
14900 @item nnmh-get-new-mail
14901 @vindex nnmh-get-new-mail
14902 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
14903 @code{t}.
14904
14905 @item nnmh-be-safe
14906 @vindex nnmh-be-safe
14907 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
14908 sure that the articles in the folder are actually what Gnus thinks
14909 they are.  It will check date stamps and stat everything in sight, so
14910 setting this to @code{t} will mean a serious slow-down.  If you never
14911 use anything but Gnus to read the @code{nnmh} articles, you do not
14912 have to set this variable to @code{t}.  The default is @code{nil}.
14913 @end table
14914
14915
14916 @node Maildir
14917 @subsubsection Maildir
14918 @cindex nnmaildir
14919 @cindex maildir
14920
14921 @code{nnmaildir} stores mail in the maildir format, with each maildir
14922 corresponding to a group in Gnus.  This format is documented here:
14923 @uref{http://cr.yp.to/proto/maildir.html} and here:
14924 @uref{http://www.qmail.org/man/man5/maildir.html}.  @code{nnmaildir}
14925 also stores extra information in the @file{.nnmaildir/} directory
14926 within a maildir.
14927
14928 Maildir format was designed to allow concurrent deliveries and
14929 reading, without needing locks.  With other back ends, you would have
14930 your mail delivered to a spool of some kind, and then you would
14931 configure Gnus to split mail from that spool into your groups.  You
14932 can still do that with @code{nnmaildir}, but the more common
14933 configuration is to have your mail delivered directly to the maildirs
14934 that appear as group in Gnus.
14935
14936 @code{nnmaildir} is designed to be perfectly reliable: @kbd{C-g} will
14937 never corrupt its data in memory, and @code{SIGKILL} will never
14938 corrupt its data in the filesystem.
14939
14940 @code{nnmaildir} stores article marks and @acronym{NOV} data in each
14941 maildir.  So you can copy a whole maildir from one Gnus setup to
14942 another, and you will keep your marks.
14943
14944 Virtual server settings:
14945
14946 @table @code
14947 @item directory
14948 For each of your @code{nnmaildir} servers (it's very unlikely that
14949 you'd need more than one), you need to create a directory and populate
14950 it with maildirs or symlinks to maildirs (and nothing else; do not
14951 choose a directory already used for other purposes).  Each maildir
14952 will be represented in Gnus as a newsgroup on that server; the
14953 filename of the symlink will be the name of the group.  Any filenames
14954 in the directory starting with @samp{.} are ignored.  The directory is
14955 scanned when you first start Gnus, and each time you type @kbd{g} in
14956 the group buffer; if any maildirs have been removed or added,
14957 @code{nnmaildir} notices at these times.
14958
14959 The value of the @code{directory} parameter should be a Lisp form
14960 which is processed by @code{eval} and @code{expand-file-name} to get
14961 the path of the directory for this server.  The form is @code{eval}ed
14962 only when the server is opened; the resulting string is used until the
14963 server is closed.  (If you don't know about forms and @code{eval},
14964 don't worry---a simple string will work.)  This parameter is not
14965 optional; you must specify it.  I don't recommend using
14966 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
14967 use that directory by default for various things, and may get confused
14968 if @code{nnmaildir} uses it too.  @code{"~/.nnmaildir"} is a typical
14969 value.
14970
14971 @item target-prefix
14972 This should be a Lisp form which is processed by @code{eval} and
14973 @code{expand-file-name}.  The form is @code{eval}ed only when the
14974 server is opened; the resulting string is used until the server is
14975 closed.
14976
14977 When you create a group on an @code{nnmaildir} server, the maildir is
14978 created with @code{target-prefix} prepended to its name, and a symlink
14979 pointing to that maildir is created, named with the plain group name.
14980 So if @code{directory} is @code{"~/.nnmaildir"} and
14981 @code{target-prefix} is @code{"../maildirs/"}, then when you create
14982 the group @code{foo}, @code{nnmaildir} will create
14983 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
14984 @file{~/.nnmaildir/foo} as a symlink pointing to
14985 @file{../maildirs/foo}.
14986
14987 You can set @code{target-prefix} to a string without any slashes to
14988 create both maildirs and symlinks in the same @code{directory}; in
14989 this case, any maildirs found in @code{directory} whose names start
14990 with @code{target-prefix} will not be listed as groups (but the
14991 symlinks pointing to them will be).
14992
14993 As a special case, if @code{target-prefix} is @code{""} (the default),
14994 then when you create a group, the maildir will be created in
14995 @code{directory} without a corresponding symlink.  Beware that you
14996 cannot use @code{gnus-group-delete-group} on such groups without the
14997 @code{force} argument.
14998
14999 @item directory-files
15000 This should be a function with the same interface as
15001 @code{directory-files} (such as @code{directory-files} itself).  It is
15002 used to scan the server's @code{directory} for maildirs.  This
15003 parameter is optional; the default is
15004 @code{nnheader-directory-files-safe} if
15005 @code{nnheader-directory-files-is-safe} is @code{nil}, and
15006 @code{directory-files} otherwise.
15007 (@code{nnheader-directory-files-is-safe} is checked only once when the
15008 server is opened; if you want to check it each time the directory is
15009 scanned, you'll have to provide your own function that does that.)
15010
15011 @item get-new-mail
15012 If non-@code{nil}, then after scanning for new mail in the group
15013 maildirs themselves as usual, this server will also incorporate mail
15014 the conventional Gnus way, from @code{mail-sources} according to
15015 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
15016 value is @code{nil}.
15017
15018 Do @emph{not} use the same maildir both in @code{mail-sources} and as
15019 an @code{nnmaildir} group.  The results might happen to be useful, but
15020 that would be by chance, not by design, and the results might be
15021 different in the future.  If your split rules create new groups,
15022 remember to supply a @code{create-directory} server parameter.
15023 @end table
15024
15025 @subsubsection Group parameters
15026
15027 @code{nnmaildir} uses several group parameters.  It's safe to ignore
15028 all this; the default behavior for @code{nnmaildir} is the same as the
15029 default behavior for other mail back ends: articles are deleted after
15030 one week, etc.  Except for the expiry parameters, all this
15031 functionality is unique to @code{nnmaildir}, so you can ignore it if
15032 you're just trying to duplicate the behavior you already have with
15033 another back end.
15034
15035 If the value of any of these parameters is a vector, the first element
15036 is evaluated as a Lisp form and the result is used, rather than the
15037 original value.  If the value is not a vector, the value itself is
15038 evaluated as a Lisp form.  (This is why these parameters use names
15039 different from those of other, similar parameters supported by other
15040 back ends: they have different, though similar, meanings.)  (For
15041 numbers, strings, @code{nil}, and @code{t}, you can ignore the
15042 @code{eval} business again; for other values, remember to use an extra
15043 quote and wrap the value in a vector when appropriate.)
15044
15045 @table @code
15046 @item expire-age
15047 An integer specifying the minimum age, in seconds, of an article
15048 before it will be expired, or the symbol @code{never} to specify that
15049 articles should never be expired.  If this parameter is not set,
15050 @code{nnmaildir} falls back to the usual
15051 @code{nnmail-expiry-wait}(@code{-function}) variables (overrideable by
15052 the @code{expiry-wait}(@code{-function}) group parameters.  If you
15053 wanted a value of 3 days, you could use something like @code{[(* 3 24
15054 60 60)]}; @code{nnmaildir} will evaluate the form and use the result.
15055 An article's age is measured starting from the article file's
15056 modification time.  Normally, this is the same as the article's
15057 delivery time, but editing an article makes it younger.  Moving an
15058 article (other than via expiry) may also make an article younger.
15059
15060 @item expire-group
15061 If this is set to a string such as a full Gnus group name, like
15062 @example
15063 "backend+server.address.string:group.name"
15064 @end example
15065 and if it is not the name of the same group that the parameter belongs
15066 to, then articles will be moved to the specified group during expiry
15067 before being deleted.  @emph{If this is set to an @code{nnmaildir}
15068 group, the article will be just as old in the destination group as it
15069 was in the source group.}  So be careful with @code{expire-age} in the
15070 destination group.  If this is set to the name of the same group that
15071 the parameter belongs to, then the article is not expired at all.  If
15072 you use the vector form, the first element is evaluated once for each
15073 article.  So that form can refer to
15074 @code{nnmaildir-article-file-name}, etc., to decide where to put the
15075 article.  @emph{If this parameter is not set, @code{nnmaildir} does
15076 not fall back to the @code{expiry-target} group parameter or the
15077 @code{nnmail-expiry-target} variable.}
15078
15079 @item read-only
15080 If this is set to @code{t}, @code{nnmaildir} will treat the articles
15081 in this maildir as read-only.  This means: articles are not renamed
15082 from @file{new/} into @file{cur/}; articles are only found in
15083 @file{new/}, not @file{cur/}; articles are never deleted; articles
15084 cannot be edited.  @file{new/} is expected to be a symlink to the
15085 @file{new/} directory of another maildir---e.g., a system-wide mailbox
15086 containing a mailing list of common interest.  Everything in the
15087 maildir outside @file{new/} is @emph{not} treated as read-only, so for
15088 a shared mailbox, you do still need to set up your own maildir (or
15089 have write permission to the shared mailbox); your maildir just won't
15090 contain extra copies of the articles.
15091
15092 @item directory-files
15093 A function with the same interface as @code{directory-files}.  It is
15094 used to scan the directories in the maildir corresponding to this
15095 group to find articles.  The default is the function specified by the
15096 server's @code{directory-files} parameter.
15097
15098 @item distrust-Lines:
15099 If non-@code{nil}, @code{nnmaildir} will always count the lines of an
15100 article, rather than use the @code{Lines:} header field.  If
15101 @code{nil}, the header field will be used if present.
15102
15103 @item always-marks
15104 A list of mark symbols, such as @code{['(read expire)]}.  Whenever
15105 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
15106 say that all articles have these marks, regardless of whether the
15107 marks stored in the filesystem say so.  This is a proof-of-concept
15108 feature that will probably be removed eventually; it ought to be done
15109 in Gnus proper, or abandoned if it's not worthwhile.
15110
15111 @item never-marks
15112 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
15113 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
15114 say that no articles have these marks, regardless of whether the marks
15115 stored in the filesystem say so.  @code{never-marks} overrides
15116 @code{always-marks}.  This is a proof-of-concept feature that will
15117 probably be removed eventually; it ought to be done in Gnus proper, or
15118 abandoned if it's not worthwhile.
15119
15120 @item nov-cache-size
15121 An integer specifying the size of the @acronym{NOV} memory cache.  To
15122 speed things up, @code{nnmaildir} keeps @acronym{NOV} data in memory
15123 for a limited number of articles in each group.  (This is probably not
15124 worthwhile, and will probably be removed in the future.)  This
15125 parameter's value is noticed only the first time a group is seen after
15126 the server is opened---i.e., when you first start Gnus, typically.
15127 The @acronym{NOV} cache is never resized until the server is closed
15128 and reopened.  The default is an estimate of the number of articles
15129 that would be displayed in the summary buffer: a count of articles
15130 that are either marked with @code{tick} or not marked with
15131 @code{read}, plus a little extra.
15132 @end table
15133
15134 @subsubsection Article identification
15135 Articles are stored in the @file{cur/} subdirectory of each maildir.
15136 Each article file is named like @code{uniq:info}, where @code{uniq}
15137 contains no colons.  @code{nnmaildir} ignores, but preserves, the
15138 @code{:info} part.  (Other maildir readers typically use this part of
15139 the filename to store marks.)  The @code{uniq} part uniquely
15140 identifies the article, and is used in various places in the
15141 @file{.nnmaildir/} subdirectory of the maildir to store information
15142 about the corresponding article.  The full pathname of an article is
15143 available in the variable @code{nnmaildir-article-file-name} after you
15144 request the article in the summary buffer.
15145
15146 @subsubsection NOV data
15147 An article identified by @code{uniq} has its @acronym{NOV} data (used
15148 to generate lines in the summary buffer) stored in
15149 @code{.nnmaildir/nov/uniq}.  There is no
15150 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
15151 need for it---an article's @acronym{NOV} data is updated automatically
15152 when the article or @code{nnmail-extra-headers} has changed.)  You can
15153 force @code{nnmaildir} to regenerate the @acronym{NOV} data for a
15154 single article simply by deleting the corresponding @acronym{NOV}
15155 file, but @emph{beware}: this will also cause @code{nnmaildir} to
15156 assign a new article number for this article, which may cause trouble
15157 with @code{seen} marks, the Agent, and the cache.
15158
15159 @subsubsection Article marks
15160 An article identified by @code{uniq} is considered to have the mark
15161 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
15162 When Gnus asks @code{nnmaildir} for a group's marks, @code{nnmaildir}
15163 looks for such files and reports the set of marks it finds.  When Gnus
15164 asks @code{nnmaildir} to store a new set of marks, @code{nnmaildir}
15165 creates and deletes the corresponding files as needed.  (Actually,
15166 rather than create a new file for each mark, it just creates hard
15167 links to @file{.nnmaildir/markfile}, to save inodes.)
15168
15169 You can invent new marks by creating a new directory in
15170 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
15171 your server, untar it later, and keep your marks.  You can add and
15172 remove marks yourself by creating and deleting mark files.  If you do
15173 this while Gnus is running and your @code{nnmaildir} server is open,
15174 it's best to exit all summary buffers for @code{nnmaildir} groups and
15175 type @kbd{s} in the group buffer first, and to type @kbd{g} or
15176 @kbd{M-g} in the group buffer afterwards.  Otherwise, Gnus might not
15177 pick up the changes, and might undo them.
15178
15179
15180 @node Mail Folders
15181 @subsubsection Mail Folders
15182 @cindex nnfolder
15183 @cindex mbox folders
15184 @cindex mail folders
15185
15186 @code{nnfolder} is a back end for storing each mail group in a
15187 separate file.  Each file is in the standard Un*x mbox format.
15188 @code{nnfolder} will add extra headers to keep track of article
15189 numbers and arrival dates.
15190
15191 @cindex self contained nnfolder servers
15192 @cindex marks
15193 When the marks file is used (which it is by default), @code{nnfolder}
15194 servers have the property that you may backup them using @code{tar} or
15195 similar, and later be able to restore them into Gnus (by adding the
15196 proper @code{nnfolder} server) and have all your marks be preserved.
15197 Marks for a group is usually stored in a file named as the mbox file
15198 with @code{.mrk} concatenated to it (but see
15199 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder}
15200 directory.  Individual @code{nnfolder} groups are also possible to
15201 backup, use @kbd{G m} to restore the group (after restoring the backup
15202 into the @code{nnfolder} directory).
15203
15204 Virtual server settings:
15205
15206 @table @code
15207 @item nnfolder-directory
15208 @vindex nnfolder-directory
15209 All the @code{nnfolder} mail boxes will be stored under this
15210 directory.  The default is the value of @code{message-directory}
15211 (whose default is @file{~/Mail})
15212
15213 @item nnfolder-active-file
15214 @vindex nnfolder-active-file
15215 The name of the active file.  The default is @file{~/Mail/active}.
15216
15217 @item nnfolder-newsgroups-file
15218 @vindex nnfolder-newsgroups-file
15219 The name of the group descriptions file.  @xref{Newsgroups File
15220 Format}.  The default is @file{~/Mail/newsgroups}
15221
15222 @item nnfolder-get-new-mail
15223 @vindex nnfolder-get-new-mail
15224 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The
15225 default is @code{t}
15226
15227 @item nnfolder-save-buffer-hook
15228 @vindex nnfolder-save-buffer-hook
15229 @cindex backup files
15230 Hook run before saving the folders.  Note that Emacs does the normal
15231 backup renaming of files even with the @code{nnfolder} buffers.  If
15232 you wish to switch this off, you could say something like the
15233 following in your @file{.emacs} file:
15234
15235 @lisp
15236 (defun turn-off-backup ()
15237   (set (make-local-variable 'backup-inhibited) t))
15238
15239 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
15240 @end lisp
15241
15242 @item nnfolder-delete-mail-hook
15243 @vindex nnfolder-delete-mail-hook
15244 Hook run in a buffer narrowed to the message that is to be deleted.
15245 This function can be used to copy the message to somewhere else, or to
15246 extract some information from it before removing it.
15247
15248 @item nnfolder-nov-is-evil
15249 @vindex nnfolder-nov-is-evil
15250 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
15251 default is @code{nil}.
15252
15253 @item nnfolder-nov-file-suffix
15254 @vindex nnfolder-nov-file-suffix
15255 The extension for @acronym{NOV} files.  The default is @file{.nov}.
15256
15257 @item nnfolder-nov-directory
15258 @vindex nnfolder-nov-directory
15259 The directory where the @acronym{NOV} files should be stored.  If
15260 @code{nil}, @code{nnfolder-directory} is used.
15261
15262 @item nnfolder-marks-is-evil
15263 @vindex nnfolder-marks-is-evil
15264 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
15265 default is @code{nil}.
15266
15267 @item nnfolder-marks-file-suffix
15268 @vindex nnfolder-marks-file-suffix
15269 The extension for @sc{marks} files.  The default is @file{.mrk}.
15270
15271 @item nnfolder-marks-directory
15272 @vindex nnfolder-marks-directory
15273 The directory where the @sc{marks} files should be stored.  If
15274 @code{nil}, @code{nnfolder-directory} is used.
15275
15276 @end table
15277
15278
15279 @findex nnfolder-generate-active-file
15280 @kindex M-x nnfolder-generate-active-file
15281 If you have lots of @code{nnfolder}-like files you'd like to read with
15282 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
15283 command to make @code{nnfolder} aware of all likely files in
15284 @code{nnfolder-directory}.  This only works if you use long file names,
15285 though.
15286
15287 @node Comparing Mail Back Ends
15288 @subsubsection Comparing Mail Back Ends
15289
15290 First, just for terminology, the @dfn{back end} is the common word for a
15291 low-level access method---a transport, if you will, by which something
15292 is acquired.  The sense is that one's mail has to come from somewhere,
15293 and so selection of a suitable back end is required in order to get that
15294 mail within spitting distance of Gnus.
15295
15296 The same concept exists for Usenet itself: Though access to articles is
15297 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
15298 in the world got at Usenet by running a reader on the machine where the
15299 articles lay (the machine which today we call an @acronym{NNTP} server), and
15300 access was by the reader stepping into the articles' directory spool
15301 area directly.  One can still select between either the @code{nntp} or
15302 @code{nnspool} back ends, to select between these methods, if one happens
15303 actually to live on the server (or can see its spool directly, anyway,
15304 via NFS).
15305
15306 The goal in selecting a mail back end is to pick one which
15307 simultaneously represents a suitable way of dealing with the original
15308 format plus leaving mail in a form that is convenient to use in the
15309 future.  Here are some high and low points on each:
15310
15311 @table @code
15312 @item nnmbox
15313
15314 UNIX systems have historically had a single, very common, and well-
15315 defined format.  All messages arrive in a single @dfn{spool file}, and
15316 they are delineated by a line whose regular expression matches
15317 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
15318 to make it clear in this instance that this is not the RFC-specified
15319 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
15320 historically from the Unix environment, it is simplest if one does not
15321 mess a great deal with the original mailbox format, so if one chooses
15322 this back end, Gnus' primary activity in getting mail from the real spool
15323 area to Gnus' preferred directory is simply to copy it, with no
15324 (appreciable) format change in the process.  It is the ``dumbest'' way
15325 to move mail into availability in the Gnus environment.  This makes it
15326 fast to move into place, but slow to parse, when Gnus has to look at
15327 what's where.
15328
15329 @item nnbabyl
15330
15331 Once upon a time, there was the DEC-10 and DEC-20, running operating
15332 systems called TOPS and related things, and the usual (only?) mail
15333 reading environment was a thing called Babyl.  I don't know what format
15334 was used for mail landing on the system, but Babyl had its own internal
15335 format to which mail was converted, primarily involving creating a
15336 spool-file-like entity with a scheme for inserting Babyl-specific
15337 headers and status bits above the top of each message in the file.
15338 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
15339 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
15340 to understand the mail files folks already had in existence.  Gnus (and
15341 VM, for that matter) continue to support this format because it's
15342 perceived as having some good qualities in those mailer-specific
15343 headers/status bits stuff.  Rmail itself still exists as well, of
15344 course, and is still maintained by Stallman.
15345
15346 Both of the above forms leave your mail in a single file on your
15347 file system, and they must parse that entire file each time you take a
15348 look at your mail.
15349
15350 @item nnml
15351
15352 @code{nnml} is the back end which smells the most as though you were
15353 actually operating with an @code{nnspool}-accessed Usenet system.  (In
15354 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
15355 lo these years ago.)  One's mail is taken from the original spool file,
15356 and is then cut up into individual message files, 1:1.  It maintains a
15357 Usenet-style active file (analogous to what one finds in an INN- or
15358 CNews-based news system in (for instance) @file{/var/lib/news/active},
15359 or what is returned via the @samp{NNTP LIST} verb) and also creates
15360 @dfn{overview} files for efficient group entry, as has been defined for
15361 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
15362 due to the creation of lots of files, updates to the @code{nnml} active
15363 file, and additions to overview files on a per-message basis, but it is
15364 extremely fast on access because of what amounts to the indexing support
15365 provided by the active file and overviews.
15366
15367 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
15368 resource which defines available places in the file system to put new
15369 files.  Sysadmins take a dim view of heavy inode occupation within
15370 tight, shared file systems.  But if you live on a personal machine where
15371 the file system is your own and space is not at a premium, @code{nnml}
15372 wins big.
15373
15374 It is also problematic using this back end if you are living in a
15375 FAT16-based Windows world, since much space will be wasted on all these
15376 tiny files.
15377
15378 @item nnmh
15379
15380 The Rand MH mail-reading system has been around UNIX systems for a very
15381 long time; it operates by splitting one's spool file of messages into
15382 individual files, but with little or no indexing support---@code{nnmh}
15383 is considered to be semantically equivalent to ``@code{nnml} without
15384 active file or overviews''.  This is arguably the worst choice, because
15385 one gets the slowness of individual file creation married to the
15386 slowness of access parsing when learning what's new in one's groups.
15387
15388 @item nnfolder
15389
15390 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
15391 method described above) on a per-group basis.  That is, @code{nnmbox}
15392 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
15393 little bit of optimization to this so that each of one's mail groups has
15394 a Unix mail box file.  It's faster than @code{nnmbox} because each group
15395 can be parsed separately, and still provides the simple Unix mail box
15396 format requiring minimal effort in moving the mail around.  In addition,
15397 it maintains an ``active'' file making it much faster for Gnus to figure
15398 out how many messages there are in each separate group.
15399
15400 If you have groups that are expected to have a massive amount of
15401 messages, @code{nnfolder} is not the best choice, but if you receive
15402 only a moderate amount of mail, @code{nnfolder} is probably the most
15403 friendly mail back end all over.
15404
15405 @item nnmaildir
15406
15407 For configuring expiry and other things, @code{nnmaildir} uses
15408 incompatible group parameters, slightly different from those of other
15409 mail back ends.
15410
15411 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
15412 differences.  Each message is stored in a separate file, but the
15413 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
15414 also stores the equivalent of @code{nnml}'s overview files in one file
15415 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
15416 @code{df -i} to see how plentiful your inode supply is.)  If this slows
15417 you down or takes up very much space, consider switching to
15418 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
15419 file system.
15420
15421 Since maildirs don't require locking for delivery, the maildirs you use
15422 as groups can also be the maildirs your mail is directly delivered to.
15423 This means you can skip Gnus' mail splitting if your mail is already
15424 organized into different mailboxes during delivery.  A @code{directory}
15425 entry in @code{mail-sources} would have a similar effect, but would
15426 require one set of mailboxes for spooling deliveries (in mbox format,
15427 thus damaging message bodies), and another set to be used as groups (in
15428 whatever format you like).  A maildir has a built-in spool, in the
15429 @code{new/} subdirectory.  Beware that currently, mail moved from
15430 @code{new/} to @code{cur/} instead of via mail splitting will not
15431 undergo treatment such as duplicate checking.
15432
15433 @code{nnmaildir} stores article marks for a given group in the
15434 corresponding maildir, in a way designed so that it's easy to manipulate
15435 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
15436 else, and still have your marks.  @code{nnml} also stores marks, but
15437 it's not as easy to work with them from outside Gnus as with
15438 @code{nnmaildir}.
15439
15440 @code{nnmaildir} uses a significant amount of memory to speed things up.
15441 (It keeps in memory some of the things that @code{nnml} stores in files
15442 and that @code{nnmh} repeatedly parses out of message files.)  If this
15443 is a problem for you, you can set the @code{nov-cache-size} group
15444 parameter to something small (0 would probably not work, but 1 probably
15445 would) to make it use less memory.  This caching will probably be
15446 removed in the future.
15447
15448 Startup is likely to be slower with @code{nnmaildir} than with other
15449 back ends.  Everything else is likely to be faster, depending in part
15450 on your file system.
15451
15452 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
15453 to write an @code{nnmaildir}-derived back end.
15454
15455 @end table
15456
15457
15458 @node Browsing the Web
15459 @section Browsing the Web
15460 @cindex web
15461 @cindex browsing the web
15462 @cindex www
15463 @cindex http
15464
15465 Web-based discussion forums are getting more and more popular.  On many
15466 subjects, the web-based forums have become the most important forums,
15467 eclipsing the importance of mailing lists and news groups.  The reason
15468 is easy to understand---they are friendly to new users; you just point
15469 and click, and there's the discussion.  With mailing lists, you have to
15470 go through a cumbersome subscription procedure, and most people don't
15471 even know what a news group is.
15472
15473 The problem with this scenario is that web browsers are not very good at
15474 being newsreaders.  They do not keep track of what articles you've read;
15475 they do not allow you to score on subjects you're interested in; they do
15476 not allow off-line browsing; they require you to click around and drive
15477 you mad in the end.
15478
15479 So---if web browsers suck at reading discussion forums, why not use Gnus
15480 to do it instead?
15481
15482 Gnus has been getting a bit of a collection of back ends for providing
15483 interfaces to these sources.
15484
15485 @menu
15486 * Archiving Mail::
15487 * Web Searches::                Creating groups from articles that match a string.
15488 * Slashdot::                    Reading the Slashdot comments.
15489 * Ultimate::                    The Ultimate Bulletin Board systems.
15490 * Web Archive::                 Reading mailing list archived on web.
15491 * RSS::                         Reading RDF site summary.
15492 * Customizing w3::              Doing stuff to Emacs/w3 from Gnus.
15493 @end menu
15494
15495 All the web sources require Emacs/w3 and the url library to work.
15496
15497 The main caveat with all these web sources is that they probably won't
15498 work for a very long time.  Gleaning information from the @acronym{HTML} data
15499 is guesswork at best, and when the layout is altered, the Gnus back end
15500 will fail.  If you have reasonably new versions of these back ends,
15501 though, you should be ok.
15502
15503 One thing all these Web methods have in common is that the Web sources
15504 are often down, unavailable or just plain too slow to be fun.  In those
15505 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
15506 Unplugged}) handle downloading articles, and then you can read them at
15507 leisure from your local disk.  No more World Wide Wait for you.
15508
15509 @node Archiving Mail
15510 @subsection Archiving Mail
15511 @cindex archiving mail
15512 @cindex backup of mail
15513
15514 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
15515 @code{nnmaildir}, now actually store the article marks with each group.
15516 For these servers, archiving and restoring a group while preserving
15517 marks is fairly simple.
15518
15519 (Preserving the group level and group parameters as well still
15520 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
15521 though.)
15522
15523 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
15524 server, take a recursive copy of the server directory.  There is no need
15525 to shut down Gnus, so archiving may be invoked by @code{cron} or
15526 similar.  You restore the data by restoring the directory tree, and
15527 adding a server definition pointing to that directory in Gnus.  The
15528 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
15529 might interfere with overwriting data, so you may want to shut down Gnus
15530 before you restore the data.
15531
15532 It is also possible to archive individual @code{nnml},
15533 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
15534 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
15535 directory.  For @code{nnfolder} you need to copy both the base folder
15536 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
15537 this example).  Restoring the group is done with @kbd{G m} from the Group
15538 buffer.  The last step makes Gnus notice the new directory.
15539 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
15540 is unnecessary in that case.
15541
15542 @node Web Searches
15543 @subsection Web Searches
15544 @cindex nnweb
15545 @cindex Google
15546 @cindex dejanews
15547 @cindex gmane
15548 @cindex Usenet searches
15549 @cindex searching the Usenet
15550
15551 It's, like, too neat to search the Usenet for articles that match a
15552 string, but it, like, totally @emph{sucks}, like, totally, to use one of
15553 those, like, Web browsers, and you, like, have to, rilly, like, look at
15554 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
15555 searches without having to use a browser.
15556
15557 The @code{nnweb} back end allows an easy interface to the mighty search
15558 engine.  You create an @code{nnweb} group, enter a search pattern, and
15559 then enter the group and read the articles like you would any normal
15560 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
15561 Groups}) will do this in an easy-to-use fashion.
15562
15563 @code{nnweb} groups don't really lend themselves to being solid
15564 groups---they have a very fleeting idea of article numbers.  In fact,
15565 each time you enter an @code{nnweb} group (not even changing the search
15566 pattern), you are likely to get the articles ordered in a different
15567 manner.  Not even using duplicate suppression (@pxref{Duplicate
15568 Suppression}) will help, since @code{nnweb} doesn't even know the
15569 @code{Message-ID} of the articles before reading them using some search
15570 engines (Google, for instance).  The only possible way to keep track
15571 of which articles you've read is by scoring on the @code{Date}
15572 header---mark all articles posted before the last date you read the
15573 group as read.
15574
15575 If the search engine changes its output substantially, @code{nnweb}
15576 won't be able to parse it and will fail.  One could hardly fault the Web
15577 providers if they were to do this---their @emph{raison d'être} is to
15578 make money off of advertisements, not to provide services to the
15579 community.  Since @code{nnweb} washes the ads off all the articles, one
15580 might think that the providers might be somewhat miffed.  We'll see.
15581
15582 You must have the @code{url} and @code{w3} package installed to be able
15583 to use @code{nnweb}.
15584
15585 Virtual server variables:
15586
15587 @table @code
15588 @item nnweb-type
15589 @vindex nnweb-type
15590 What search engine type is being used.  The currently supported types
15591 are @code{google}, @code{dejanews}, and @code{gmane}.  Note that
15592 @code{dejanews} is an alias to @code{google}.
15593
15594 @item nnweb-search
15595 @vindex nnweb-search
15596 The search string to feed to the search engine.
15597
15598 @item nnweb-max-hits
15599 @vindex nnweb-max-hits
15600 Advisory maximum number of hits per search to display.  The default is
15601 999.
15602
15603 @item nnweb-type-definition
15604 @vindex nnweb-type-definition
15605 Type-to-definition alist.  This alist says what @code{nnweb} should do
15606 with the various search engine types.  The following elements must be
15607 present:
15608
15609 @table @code
15610 @item article
15611 Function to decode the article and provide something that Gnus
15612 understands.
15613
15614 @item map
15615 Function to create an article number to message header and URL alist.
15616
15617 @item search
15618 Function to send the search string to the search engine.
15619
15620 @item address
15621 The address the aforementioned function should send the search string
15622 to.
15623
15624 @item id
15625 Format string URL to fetch an article by @code{Message-ID}.
15626 @end table
15627
15628 @end table
15629
15630
15631 @node Slashdot
15632 @subsection Slashdot
15633 @cindex Slashdot
15634 @cindex nnslashdot
15635
15636 @uref{http://slashdot.org/, Slashdot} is a popular news site, with
15637 lively discussion following the news articles.  @code{nnslashdot} will
15638 let you read this forum in a convenient manner.
15639
15640 The easiest way to read this source is to put something like the
15641 following in your @file{~/.gnus.el} file:
15642
15643 @lisp
15644 (setq gnus-secondary-select-methods
15645       '((nnslashdot "")))
15646 @end lisp
15647
15648 This will make Gnus query the @code{nnslashdot} back end for new comments
15649 and groups.  The @kbd{F} command will subscribe each new news article as
15650 a new Gnus group, and you can read the comments by entering these
15651 groups.  (Note that the default subscription method is to subscribe new
15652 groups as zombies.  Other methods are available (@pxref{Subscription
15653 Methods}).
15654
15655 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
15656 command is the most handy tool (@pxref{Foreign Groups}).
15657
15658 When following up to @code{nnslashdot} comments (or posting new
15659 comments), some light @acronym{HTML}izations will be performed.  In
15660 particular, text quoted with @samp{> } will be quoted with
15661 @samp{blockquote} instead, and signatures will have @samp{br} added to
15662 the end of each line.  Other than that, you can just write @acronym{HTML}
15663 directly into the message buffer.  Note that Slashdot filters out some
15664 @acronym{HTML} forms.
15665
15666 The following variables can be altered to change its behavior:
15667
15668 @table @code
15669 @item nnslashdot-threaded
15670 Whether @code{nnslashdot} should display threaded groups or not.  The
15671 default is @code{t}.  To be able to display threads, @code{nnslashdot}
15672 has to retrieve absolutely all comments in a group upon entry.  If a
15673 threaded display is not required, @code{nnslashdot} will only retrieve
15674 the comments that are actually wanted by the user.  Threading is nicer,
15675 but much, much slower than unthreaded.
15676
15677 @item nnslashdot-login-name
15678 @vindex nnslashdot-login-name
15679 The login name to use when posting.
15680
15681 @item nnslashdot-password
15682 @vindex nnslashdot-password
15683 The password to use when posting.
15684
15685 @item nnslashdot-directory
15686 @vindex nnslashdot-directory
15687 Where @code{nnslashdot} will store its files.  The default is
15688 @file{~/News/slashdot/}.
15689
15690 @item nnslashdot-active-url
15691 @vindex nnslashdot-active-url
15692 The @acronym{URL} format string that will be used to fetch the
15693 information on news articles and comments.  The default is@*
15694 @samp{http://slashdot.org/search.pl?section=&min=%d}.
15695
15696 @item nnslashdot-comments-url
15697 @vindex nnslashdot-comments-url
15698 The @acronym{URL} format string that will be used to fetch comments.
15699
15700 @item nnslashdot-article-url
15701 @vindex nnslashdot-article-url
15702 The @acronym{URL} format string that will be used to fetch the news
15703 article.  The default is
15704 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
15705
15706 @item nnslashdot-threshold
15707 @vindex nnslashdot-threshold
15708 The score threshold.  The default is -1.
15709
15710 @item nnslashdot-group-number
15711 @vindex nnslashdot-group-number
15712 The number of old groups, in addition to the ten latest, to keep
15713 updated.  The default is 0.
15714
15715 @end table
15716
15717
15718
15719 @node Ultimate
15720 @subsection Ultimate
15721 @cindex nnultimate
15722 @cindex Ultimate Bulletin Board
15723
15724 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
15725 probably the most popular Web bulletin board system used.  It has a
15726 quite regular and nice interface, and it's possible to get the
15727 information Gnus needs to keep groups updated.
15728
15729 The easiest way to get started with @code{nnultimate} is to say
15730 something like the following in the group buffer:  @kbd{B nnultimate RET
15731 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @acronym{URL}
15732 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
15733 you're interested in; there's quite a list of them on the Ultimate web
15734 site.)  Then subscribe to the groups you're interested in from the
15735 server buffer, and read them from the group buffer.
15736
15737 The following @code{nnultimate} variables can be altered:
15738
15739 @table @code
15740 @item nnultimate-directory
15741 @vindex nnultimate-directory
15742 The directory where @code{nnultimate} stores its files.  The default is@*
15743 @file{~/News/ultimate/}.
15744 @end table
15745
15746
15747 @node Web Archive
15748 @subsection Web Archive
15749 @cindex nnwarchive
15750 @cindex Web Archive
15751
15752 Some mailing lists only have archives on Web servers, such as
15753 @uref{http://www.egroups.com/} and
15754 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
15755 interface, and it's possible to get the information Gnus needs to keep
15756 groups updated.
15757
15758 @findex gnus-group-make-warchive-group
15759 The easiest way to get started with @code{nnwarchive} is to say
15760 something like the following in the group buffer: @kbd{M-x
15761 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
15762 www.egroups.com RET @var{your@@email.address} RET}.  (Substitute the
15763 @var{an_egroup} with the mailing list you subscribed, the
15764 @var{your@@email.address} with your email address.), or to browse the
15765 back end by @kbd{B nnwarchive RET mail-archive RET}.
15766
15767 The following @code{nnwarchive} variables can be altered:
15768
15769 @table @code
15770 @item nnwarchive-directory
15771 @vindex nnwarchive-directory
15772 The directory where @code{nnwarchive} stores its files.  The default is@*
15773 @file{~/News/warchive/}.
15774
15775 @item nnwarchive-login
15776 @vindex nnwarchive-login
15777 The account name on the web server.
15778
15779 @item nnwarchive-passwd
15780 @vindex nnwarchive-passwd
15781 The password for your account on the web server.
15782 @end table
15783
15784 @node RSS
15785 @subsection RSS
15786 @cindex nnrss
15787 @cindex RSS
15788
15789 Some web sites have an RDF Site Summary (@acronym{RSS}).
15790 @acronym{RSS} is a format for summarizing headlines from news related
15791 sites (such as BBC or CNN).  But basically anything list-like can be
15792 presented as an @acronym{RSS} feed: weblogs, changelogs or recent
15793 changes to a wiki (e.g. @url{http://cliki.net/recent-changes.rdf}).
15794
15795 @acronym{RSS} has a quite regular and nice interface, and it's
15796 possible to get the information Gnus needs to keep groups updated.
15797
15798 @kindex G R (Summary)
15799 Use @kbd{G R} from the summary buffer to subscribe to a feed---you
15800 will be prompted for the location of the feed.
15801
15802 An easy way to get started with @code{nnrss} is to say something like
15803 the following in the group buffer: @kbd{B nnrss RET y}, then
15804 subscribe to groups.
15805
15806 The following @code{nnrss} variables can be altered:
15807
15808 @table @code
15809 @item nnrss-directory
15810 @vindex nnrss-directory
15811 The directory where @code{nnrss} stores its files.  The default is
15812 @file{~/News/rss/}.
15813
15814 @item nnrss-use-local
15815 @vindex nnrss-use-local
15816 @findex nnrss-generate-download-script
15817 If you set @code{nnrss-use-local} to @code{t}, @code{nnrss} will read
15818 the feeds from local files in @code{nnrss-directory}.  You can use
15819 the command @code{nnrss-generate-download-script} to generate a
15820 download script using @command{wget}.
15821 @end table
15822
15823 The following code may be helpful, if you want to show the description in
15824 the summary buffer.
15825
15826 @lisp
15827 (add-to-list 'nnmail-extra-headers nnrss-description-field)
15828 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
15829
15830 (defun gnus-user-format-function-X (header)
15831   (let ((descr
15832          (assq nnrss-description-field (mail-header-extra header))))
15833     (if descr (concat "\n\t" (cdr descr)) "")))
15834 @end lisp
15835
15836 The following code may be useful to open an nnrss url directly from the
15837 summary buffer.
15838 @lisp
15839 (require 'browse-url)
15840
15841 (defun browse-nnrss-url( arg )
15842   (interactive "p")
15843   (let ((url (assq nnrss-url-field
15844                    (mail-header-extra
15845                     (gnus-data-header
15846                      (assq (gnus-summary-article-number)
15847                            gnus-newsgroup-data))))))
15848     (if url
15849         (progn
15850           (browse-url (cdr url))
15851           (gnus-summary-mark-as-read-forward 1))
15852       (gnus-summary-scroll-up arg))))
15853
15854 (eval-after-load "gnus"
15855   #'(define-key gnus-summary-mode-map
15856       (kbd "<RET>") 'browse-nnrss-url))
15857 (add-to-list 'nnmail-extra-headers nnrss-url-field)
15858 @end lisp
15859
15860 @node Customizing w3
15861 @subsection Customizing w3
15862 @cindex w3
15863 @cindex html
15864 @cindex url
15865 @cindex Netscape
15866
15867 Gnus uses the url library to fetch web pages and Emacs/w3 to display web
15868 pages.  Emacs/w3 is documented in its own manual, but there are some
15869 things that may be more relevant for Gnus users.
15870
15871 For instance, a common question is how to make Emacs/w3 follow links
15872 using the @code{browse-url} functions (which will call some external web
15873 browser like Netscape).  Here's one way:
15874
15875 @lisp
15876 (eval-after-load "w3"
15877   '(progn
15878     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
15879     (defun w3-fetch (&optional url target)
15880       (interactive (list (w3-read-url-with-default)))
15881       (if (eq major-mode 'gnus-article-mode)
15882           (browse-url url)
15883         (w3-fetch-orig url target)))))
15884 @end lisp
15885
15886 Put that in your @file{.emacs} file, and hitting links in w3-rendered
15887 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
15888 follow the link.
15889
15890
15891 @node IMAP
15892 @section IMAP
15893 @cindex nnimap
15894 @cindex @acronym{IMAP}
15895
15896 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
15897 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
15898 server is much similar to connecting to a news server, you just
15899 specify the network address of the server.
15900
15901 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
15902 everything that @acronym{POP} can, it can hence be viewed as a
15903 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
15904 similar to @acronym{NNTP} being a news storage protocol---however,
15905 @acronym{IMAP} offers more features than @acronym{NNTP} because news
15906 is more or less read-only whereas mail is read-write.
15907
15908 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
15909 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
15910 the @acronym{IMAP} server and store them on the local disk.  This is
15911 not the usage described in this section---@xref{Mail Sources}.
15912
15913 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
15914 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
15915 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
15916 usage explained in this section.
15917
15918 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP}
15919 servers might look something like the following.  (Note that for
15920 @acronym{TLS}/@acronym{SSL}, you need external programs and libraries,
15921 see below.)
15922
15923 @lisp
15924 (setq gnus-secondary-select-methods
15925       '((nnimap "simpleserver") ; @r{no special configuration}
15926         ; @r{perhaps a ssh port forwarded server:}
15927         (nnimap "dolk"
15928                 (nnimap-address "localhost")
15929                 (nnimap-server-port 1430))
15930         ; @r{a UW server running on localhost}
15931         (nnimap "barbar"
15932                 (nnimap-server-port 143)
15933                 (nnimap-address "localhost")
15934                 (nnimap-list-pattern ("INBOX" "mail/*")))
15935         ; @r{anonymous public cyrus server:}
15936         (nnimap "cyrus.andrew.cmu.edu"
15937                 (nnimap-authenticator anonymous)
15938                 (nnimap-list-pattern "archive.*")
15939                 (nnimap-stream network))
15940         ; @r{a ssl server on a non-standard port:}
15941         (nnimap "vic20"
15942                 (nnimap-address "vic20.somewhere.com")
15943                 (nnimap-server-port 9930)
15944                 (nnimap-stream ssl))))
15945 @end lisp
15946
15947 After defining the new server, you can subscribe to groups on the
15948 server using normal Gnus commands such as @kbd{U} in the Group Buffer
15949 (@pxref{Subscription Commands}) or via the Server Buffer
15950 (@pxref{Server Buffer}).
15951
15952 The following variables can be used to create a virtual @code{nnimap}
15953 server:
15954
15955 @table @code
15956
15957 @item nnimap-address
15958 @vindex nnimap-address
15959
15960 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
15961 server name if not specified.
15962
15963 @item nnimap-server-port
15964 @vindex nnimap-server-port
15965 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
15966
15967 Note that this should be an integer, example server specification:
15968
15969 @lisp
15970 (nnimap "mail.server.com"
15971         (nnimap-server-port 4711))
15972 @end lisp
15973
15974 @item nnimap-list-pattern
15975 @vindex nnimap-list-pattern
15976 String or list of strings of mailboxes to limit available groups to.
15977 This is used when the server has very many mailboxes and you're only
15978 interested in a few---some servers export your home directory via
15979 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
15980 @file{~/Mail/*} then.
15981
15982 The string can also be a cons of REFERENCE and the string as above, what
15983 REFERENCE is used for is server specific, but on the University of
15984 Washington server it's a directory that will be concatenated with the
15985 mailbox.
15986
15987 Example server specification:
15988
15989 @lisp
15990 (nnimap "mail.server.com"
15991         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
15992                                ("~friend/Mail/" . "list/*"))))
15993 @end lisp
15994
15995 @item nnimap-stream
15996 @vindex nnimap-stream
15997 The type of stream used to connect to your server.  By default, nnimap
15998 will detect and automatically use all of the below, with the exception
15999 of @acronym{TLS}/@acronym{SSL}.  (@acronym{IMAP} over
16000 @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can
16001 be automatically detected, but it's not widely deployed yet.)
16002
16003 Example server specification:
16004
16005 @lisp
16006 (nnimap "mail.server.com"
16007         (nnimap-stream ssl))
16008 @end lisp
16009
16010 Please note that the value of @code{nnimap-stream} is a symbol!
16011
16012 @itemize @bullet
16013 @item
16014 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5).  Requires the
16015 @samp{gsasl} or @samp{imtest} program.
16016 @item
16017 @dfn{kerberos4:} Connect with Kerberos 4.  Requires the @samp{imtest} program.
16018 @item
16019 @dfn{starttls:} Connect via the STARTTLS extension (similar to
16020 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
16021 @samp{starttls}.
16022 @item
16023 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
16024 @samp{gnutls-cli}).
16025 @item
16026 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
16027 @samp{openssl}) or SSLeay (@samp{s_client}).
16028 @item
16029 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
16030 @item
16031 @dfn{network:} Plain, TCP/IP network connection.
16032 @end itemize
16033
16034 @vindex imap-kerberos4-program
16035 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
16036 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
16037 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
16038 to make @code{imap.el} use a pty instead of a pipe when communicating
16039 with @samp{imtest}.  You will then suffer from a line length
16040 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
16041 indefinitely if you have many articles in a mailbox.  The variable
16042 @code{imap-kerberos4-program} contain parameters to pass to the imtest
16043 program.
16044
16045 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
16046 needed.  It is available from
16047 @uref{http://www.gnu.org/software/gnutls/}.
16048
16049 @vindex imap-gssapi-program
16050 This parameter specifies a list of command lines that invoke a GSSAPI
16051 authenticated @acronym{IMAP} stream in a subshell.  They are tried
16052 sequentially until a connection is made, or the list has been
16053 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
16054 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
16055 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
16056 tried.
16057
16058 @vindex imap-ssl-program
16059 For @acronym{SSL} connections, the OpenSSL program is available from
16060 @uref{http://www.openssl.org/}.  OpenSSL was formerly known as SSLeay,
16061 and nnimap support it too---although the most recent versions of
16062 SSLeay, 0.9.x, are known to have serious bugs making it
16063 useless.  Earlier versions, especially 0.8.x, of SSLeay are known to
16064 work.  The variable @code{imap-ssl-program} contain parameters to pass
16065 to OpenSSL/SSLeay.
16066
16067 @vindex imap-shell-program
16068 @vindex imap-shell-host
16069 For @acronym{IMAP} connections using the @code{shell} stream, the variable
16070 @code{imap-shell-program} specify what program to call.
16071
16072 @item nnimap-authenticator
16073 @vindex nnimap-authenticator
16074
16075 The authenticator used to connect to the server.  By default, nnimap
16076 will use the most secure authenticator your server is capable of.
16077
16078 Example server specification:
16079
16080 @lisp
16081 (nnimap "mail.server.com"
16082         (nnimap-authenticator anonymous))
16083 @end lisp
16084
16085 Please note that the value of @code{nnimap-authenticator} is a symbol!
16086
16087 @itemize @bullet
16088 @item
16089 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication.  Requires
16090 external program @code{gsasl} or @code{imtest}.
16091 @item
16092 @dfn{kerberos4:} Kerberos 4 authentication.  Requires external program
16093 @code{imtest}.
16094 @item
16095 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5.  Requires
16096 external library @code{digest-md5.el}.
16097 @item
16098 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
16099 @item
16100 @dfn{login:} Plain-text username/password via LOGIN.
16101 @item
16102 @dfn{anonymous:} Login as ``anonymous'', supplying your email address as password.
16103 @end itemize
16104
16105 @item nnimap-expunge-on-close
16106 @cindex expunging
16107 @vindex nnimap-expunge-on-close
16108 Unlike Parmenides the @acronym{IMAP} designers have decided things that
16109 don't exist actually do exist.  More specifically, @acronym{IMAP} has
16110 this concept of marking articles @code{Deleted} which doesn't actually
16111 delete them, and this (marking them @code{Deleted}, that is) is what
16112 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
16113 similar).
16114
16115 Since the articles aren't really removed when we mark them with the
16116 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
16117 running in circles yet?
16118
16119 Traditionally, nnimap has removed all articles marked as @code{Deleted}
16120 when closing a mailbox but this is now configurable by this server
16121 variable.
16122
16123 The possible options are:
16124
16125 @table @code
16126
16127 @item always
16128 The default behavior, delete all articles marked as ``Deleted'' when
16129 closing a mailbox.
16130 @item never
16131 Never actually delete articles.  Currently there is no way of showing
16132 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
16133 may allow you to do this.  If you ever want to run the EXPUNGE command
16134 manually, @xref{Expunging mailboxes}.
16135 @item ask
16136 When closing mailboxes, nnimap will ask if you wish to expunge deleted
16137 articles or not.
16138
16139 @end table
16140
16141 @item nnimap-importantize-dormant
16142 @vindex nnimap-importantize-dormant
16143
16144 If non-@code{nil} (the default), marks dormant articles as ticked (as
16145 well), for other @acronym{IMAP} clients.  Within Gnus, dormant articles will
16146 naturally still (only) be marked as dormant.  This is to make dormant
16147 articles stand out, just like ticked articles, in other @acronym{IMAP}
16148 clients.  (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
16149 has only one.)
16150
16151 Probably the only reason for frobing this would be if you're trying
16152 enable per-user persistent dormant flags, using something like:
16153
16154 @lisp
16155 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
16156         (format "gnus-dormant-%s" (user-login-name)))
16157 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
16158         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
16159 @end lisp
16160
16161 In this case, you would not want the per-user dormant flag showing up
16162 as ticked for other users.
16163
16164 @item nnimap-expunge-search-string
16165 @cindex expunging
16166 @vindex nnimap-expunge-search-string
16167
16168 This variable contain the @acronym{IMAP} search command sent to server when
16169 searching for articles eligible for expiring.  The default is
16170 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
16171 UID set and the second @code{%s} is replaced by a date.
16172
16173 Probably the only useful value to change this to is
16174 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
16175 messages instead of the internal article date.  See section 6.4.4 of
16176 RFC 2060 for more information on valid strings.
16177
16178 @item nnimap-authinfo-file
16179 @vindex nnimap-authinfo-file
16180
16181 A file containing credentials used to log in on servers.  The format is
16182 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
16183 variable @code{nntp-authinfo-file} for exact syntax; also see
16184 @ref{NNTP}.
16185
16186 @item nnimap-need-unselect-to-notice-new-mail
16187 @vindex nnimap-need-unselect-to-notice-new-mail
16188
16189 Unselect mailboxes before looking for new mail in them.  Some servers
16190 seem to need this under some circumstances; it was reported that
16191 Courier 1.7.1 did.
16192
16193 @end table
16194
16195 @menu
16196 * Splitting in IMAP::           Splitting mail with nnimap.
16197 * Expiring in IMAP::            Expiring mail with nnimap.
16198 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
16199 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
16200 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
16201 * Debugging IMAP::              What to do when things don't work.
16202 @end menu
16203
16204
16205
16206 @node Splitting in IMAP
16207 @subsection Splitting in IMAP
16208 @cindex splitting imap mail
16209
16210 Splitting is something Gnus users have loved and used for years, and now
16211 the rest of the world is catching up.  Yeah, dream on, not many
16212 @acronym{IMAP} servers have server side splitting and those that have
16213 splitting seem to use some non-standard protocol.  This means that
16214 @acronym{IMAP} support for Gnus has to do its own splitting.
16215
16216 And it does.
16217
16218 (Incidentally, people seem to have been dreaming on, and Sieve has
16219 gaining a market share and is supported by several IMAP servers.
16220 Fortunately, Gnus support it too, @xref{Sieve Commands}.)
16221
16222 Here are the variables of interest:
16223
16224 @table @code
16225
16226 @item nnimap-split-crosspost
16227 @cindex splitting, crosspost
16228 @cindex crosspost
16229 @vindex nnimap-split-crosspost
16230
16231 If non-@code{nil}, do crossposting if several split methods match the
16232 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
16233 found will be used.
16234
16235 Nnmail equivalent: @code{nnmail-crosspost}.
16236
16237 @item nnimap-split-inbox
16238 @cindex splitting, inbox
16239 @cindex inbox
16240 @vindex nnimap-split-inbox
16241
16242 A string or a list of strings that gives the name(s) of @acronym{IMAP}
16243 mailboxes to split from.  Defaults to @code{nil}, which means that
16244 splitting is disabled!
16245
16246 @lisp
16247 (setq nnimap-split-inbox
16248       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
16249 @end lisp
16250
16251 No nnmail equivalent.
16252
16253 @item nnimap-split-rule
16254 @cindex splitting, rules
16255 @vindex nnimap-split-rule
16256
16257 New mail found in @code{nnimap-split-inbox} will be split according to
16258 this variable.
16259
16260 This variable contains a list of lists, where the first element in the
16261 sublist gives the name of the @acronym{IMAP} mailbox to move articles
16262 matching the regexp in the second element in the sublist.  Got that?
16263 Neither did I, we need examples.
16264
16265 @lisp
16266 (setq nnimap-split-rule
16267       '(("INBOX.nnimap"
16268          "^Sender: owner-nnimap@@vic20.globalcom.se")
16269         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
16270         ("INBOX.private" "")))
16271 @end lisp
16272
16273 This will put all articles from the nnimap mailing list into mailbox
16274 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
16275 into INBOX.junk and everything else in INBOX.private.
16276
16277 The first string may contain @samp{\\1} forms, like the ones used by
16278 replace-match to insert sub-expressions from the matched text.  For
16279 instance:
16280
16281 @lisp
16282 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
16283 @end lisp
16284
16285 The first element can also be the symbol @code{junk} to indicate that
16286 matching messages should simply be deleted.  Use with care.
16287
16288 The second element can also be a function.  In that case, it will be
16289 called with the first element of the rule as the argument, in a buffer
16290 containing the headers of the article.  It should return a
16291 non-@code{nil} value if it thinks that the mail belongs in that group.
16292
16293 Nnmail users might recollect that the last regexp had to be empty to
16294 match all articles (like in the example above).  This is not required in
16295 nnimap.  Articles not matching any of the regexps will not be moved out
16296 of your inbox.  (This might affect performance if you keep lots of
16297 unread articles in your inbox, since the splitting code would go over
16298 them every time you fetch new mail.)
16299
16300 These rules are processed from the beginning of the alist toward the
16301 end.  The first rule to make a match will ``win'', unless you have
16302 crossposting enabled.  In that case, all matching rules will ``win''.
16303
16304 This variable can also have a function as its value, the function will
16305 be called with the headers narrowed and should return a group where it
16306 thinks the article should be split to.  See @code{nnimap-split-fancy}.
16307
16308 The splitting code tries to create mailboxes if it needs to.
16309
16310 To allow for different split rules on different virtual servers, and
16311 even different split rules in different inboxes on the same server,
16312 the syntax of this variable have been extended along the lines of:
16313
16314 @lisp
16315 (setq nnimap-split-rule
16316       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
16317                                ("junk"    "From:.*Simon"))))
16318         ("my2server"    ("INBOX" nnimap-split-fancy))
16319         ("my[34]server" (".*" (("private" "To:.*Simon")
16320                                ("junk"    my-junk-func))))))
16321 @end lisp
16322
16323 The virtual server name is in fact a regexp, so that the same rules
16324 may apply to several servers.  In the example, the servers
16325 @code{my3server} and @code{my4server} both use the same rules.
16326 Similarly, the inbox string is also a regexp.  The actual splitting
16327 rules are as before, either a function, or a list with group/regexp or
16328 group/function elements.
16329
16330 Nnmail equivalent: @code{nnmail-split-methods}.
16331
16332 @item nnimap-split-predicate
16333 @cindex splitting
16334 @vindex nnimap-split-predicate
16335
16336 Mail matching this predicate in @code{nnimap-split-inbox} will be
16337 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
16338
16339 This might be useful if you use another @acronym{IMAP} client to read mail in
16340 your inbox but would like Gnus to split all articles in the inbox
16341 regardless of readedness.  Then you might change this to
16342 @samp{UNDELETED}.
16343
16344 @item nnimap-split-fancy
16345 @cindex splitting, fancy
16346 @findex nnimap-split-fancy
16347 @vindex nnimap-split-fancy
16348
16349 It's possible to set @code{nnimap-split-rule} to
16350 @code{nnmail-split-fancy} if you want to use fancy
16351 splitting.  @xref{Fancy Mail Splitting}.
16352
16353 However, to be able to have different fancy split rules for nnmail and
16354 nnimap back ends you can set @code{nnimap-split-rule} to
16355 @code{nnimap-split-fancy} and define the nnimap specific fancy split
16356 rule in @code{nnimap-split-fancy}.
16357
16358 Example:
16359
16360 @lisp
16361 (setq nnimap-split-rule 'nnimap-split-fancy
16362       nnimap-split-fancy ...)
16363 @end lisp
16364
16365 Nnmail equivalent: @code{nnmail-split-fancy}.
16366
16367 @item nnimap-split-download-body
16368 @findex nnimap-split-download-body
16369 @vindex nnimap-split-download-body
16370
16371 Set to non-@code{nil} to download entire articles during splitting.
16372 This is generally not required, and will slow things down
16373 considerably.  You may need it if you want to use an advanced
16374 splitting function that analyses the body to split the article.
16375
16376 @end table
16377
16378 @node Expiring in IMAP
16379 @subsection Expiring in IMAP
16380 @cindex expiring imap mail
16381
16382 Even though @code{nnimap} is not a proper @code{nnmail} derived back
16383 end, it supports most features in regular expiring (@pxref{Expiring
16384 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
16385 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
16386 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
16387 follows below are the variables used by the @code{nnimap} expiry
16388 process.
16389
16390 A note on how the expire mark is stored on the @acronym{IMAP} server is
16391 appropriate here as well.  The expire mark is translated into a
16392 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
16393 message.  This means that likely only Gnus will understand and treat
16394 the @code{gnus-expire} mark properly, although other clients may allow
16395 you to view client specific flags on the message.  It also means that
16396 your server must support permanent storage of client specific flags on
16397 messages.  Most do, fortunately.
16398
16399 @table @code
16400
16401 @item nnmail-expiry-wait
16402 @item nnmail-expiry-wait-function
16403
16404 These variables are fully supported.  The expire value can be a
16405 number, the symbol @code{immediate} or @code{never}.
16406
16407 @item nnmail-expiry-target
16408
16409 This variable is supported, and internally implemented by calling the
16410 @code{nnmail} functions that handle this.  It contains an optimization
16411 that if the destination is a @acronym{IMAP} group on the same server, the
16412 article is copied instead of appended (that is, uploaded again).
16413
16414 @end table
16415
16416 @node Editing IMAP ACLs
16417 @subsection Editing IMAP ACLs
16418 @cindex editing imap acls
16419 @cindex Access Control Lists
16420 @cindex Editing @acronym{IMAP} ACLs
16421 @kindex G l (Group)
16422 @findex gnus-group-nnimap-edit-acl
16423
16424 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
16425 limiting (or enabling) other users access to your mail boxes.  Not all
16426 @acronym{IMAP} servers support this, this function will give an error if it
16427 doesn't.
16428
16429 To edit an ACL for a mailbox, type @kbd{G l}
16430 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
16431 editing window with detailed instructions.
16432
16433 Some possible uses:
16434
16435 @itemize @bullet
16436 @item
16437 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
16438 on your mailing list mailboxes enables other users on the same server to
16439 follow the list without subscribing to it.
16440 @item
16441 At least with the Cyrus server, you are required to give the user
16442 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
16443 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
16444 INBOX.mailbox).
16445 @end itemize
16446
16447 @node Expunging mailboxes
16448 @subsection Expunging mailboxes
16449 @cindex expunging
16450
16451 @cindex expunge
16452 @cindex manual expunging
16453 @kindex G x (Group)
16454 @findex gnus-group-nnimap-expunge
16455
16456 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
16457 you may want the option of expunging all deleted articles in a mailbox
16458 manually.  This is exactly what @kbd{G x} does.
16459
16460 Currently there is no way of showing deleted articles, you can just
16461 delete them.
16462
16463 @node A note on namespaces
16464 @subsection A note on namespaces
16465 @cindex IMAP namespace
16466 @cindex namespaces
16467
16468 The @acronym{IMAP} protocol has a concept called namespaces, described
16469 by the following text in the RFC:
16470
16471 @display
16472 5.1.2.  Mailbox Namespace Naming Convention
16473
16474    By convention, the first hierarchical element of any mailbox name
16475    which begins with "#" identifies the "namespace" of the remainder of
16476    the name.  This makes it possible to disambiguate between different
16477    types of mailbox stores, each of which have their own namespaces.
16478
16479       For example, implementations which offer access to USENET
16480       newsgroups MAY use the "#news" namespace to partition the USENET
16481       newsgroup namespace from that of other mailboxes.  Thus, the
16482       comp.mail.misc newsgroup would have an mailbox name of
16483       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
16484       to a different object (e.g. a user's private mailbox).
16485 @end display
16486
16487 While there is nothing in this text that warrants concern for the
16488 @acronym{IMAP} implementation in Gnus, some servers use namespace
16489 prefixes in a way that does not work with how Gnus uses mailbox names.
16490
16491 Specifically, University of Washington's @acronym{IMAP} server uses
16492 mailbox names like @code{#driver.mbx/read-mail} which are valid only
16493 in the @sc{create} and @sc{append} commands.  After the mailbox is
16494 created (or a messages is appended to a mailbox), it must be accessed
16495 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
16496 not make it possible for the user to guarantee that user entered
16497 mailbox names will only be used with the CREATE and APPEND commands,
16498 you should simply not use the namespace prefixed mailbox names in
16499 Gnus.
16500
16501 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
16502 for more information on how to use the prefixes.  They are a power
16503 tool and should be used only if you are sure what the effects are.
16504
16505 @node Debugging IMAP
16506 @subsection Debugging IMAP
16507 @cindex IMAP debugging
16508 @cindex protocol dump (IMAP)
16509
16510 @acronym{IMAP} is a complex protocol, more so than @acronym{NNTP} or
16511 @acronym{POP3}.  Implementation bugs are not unlikely, and we do our
16512 best to fix them right away.  If you encounter odd behaviour, chances
16513 are that either the server or Gnus is buggy.
16514
16515 If you are familiar with network protocols in general, you will
16516 probably be able to extract some clues from the protocol dump of the
16517 exchanges between Gnus and the server.  Even if you are not familiar
16518 with network protocols, when you include the protocol dump in
16519 @acronym{IMAP}-related bug reports you are helping us with data
16520 critical to solving the problem.  Therefore, we strongly encourage you
16521 to include the protocol dump when reporting IMAP bugs in Gnus.
16522
16523
16524 @vindex imap-log
16525 Because the protocol dump, when enabled, generates lots of data, it is
16526 disabled by default.  You can enable it by setting @code{imap-log} as
16527 follows: 
16528
16529 @lisp
16530 (setq imap-log t)
16531 @end lisp
16532
16533 This instructs the @code{imap.el} package to log any exchanges with
16534 the server.  The log is stored in the buffer @samp{*imap-log*}.  Look
16535 for error messages, which sometimes are tagged with the keyword
16536 @code{BAD}---but when submitting a bug, make sure to include all the
16537 data.
16538
16539 @node Other Sources
16540 @section Other Sources
16541
16542 Gnus can do more than just read news or mail.  The methods described
16543 below allow Gnus to view directories and files as if they were
16544 newsgroups.
16545
16546 @menu
16547 * Directory Groups::            You can read a directory as if it was a newsgroup.
16548 * Anything Groups::             Dired?  Who needs dired?
16549 * Document Groups::             Single files can be the basis of a group.
16550 * SOUP::                        Reading @sc{soup} packets ``offline''.
16551 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
16552 @end menu
16553
16554
16555 @node Directory Groups
16556 @subsection Directory Groups
16557 @cindex nndir
16558 @cindex directory groups
16559
16560 If you have a directory that has lots of articles in separate files in
16561 it, you might treat it as a newsgroup.  The files have to have numerical
16562 names, of course.
16563
16564 This might be an opportune moment to mention @code{ange-ftp} (and its
16565 successor @code{efs}), that most wonderful of all wonderful Emacs
16566 packages.  When I wrote @code{nndir}, I didn't think much about it---a
16567 back end to read directories.  Big deal.
16568
16569 @code{ange-ftp} changes that picture dramatically.  For instance, if you
16570 enter the @code{ange-ftp} file name
16571 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
16572 @code{ange-ftp} or @code{efs} will actually allow you to read this
16573 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
16574
16575 @code{nndir} will use @acronym{NOV} files if they are present.
16576
16577 @code{nndir} is a ``read-only'' back end---you can't delete or expire
16578 articles with this method.  You can use @code{nnmh} or @code{nnml} for
16579 whatever you use @code{nndir} for, so you could switch to any of those
16580 methods if you feel the need to have a non-read-only @code{nndir}.
16581
16582
16583 @node Anything Groups
16584 @subsection Anything Groups
16585 @cindex nneething
16586
16587 From the @code{nndir} back end (which reads a single spool-like
16588 directory), it's just a hop and a skip to @code{nneething}, which
16589 pretends that any arbitrary directory is a newsgroup.  Strange, but
16590 true.
16591
16592 When @code{nneething} is presented with a directory, it will scan this
16593 directory and assign article numbers to each file.  When you enter such
16594 a group, @code{nneething} must create ``headers'' that Gnus can use.
16595 After all, Gnus is a newsreader, in case you're forgetting.
16596 @code{nneething} does this in a two-step process.  First, it snoops each
16597 file in question.  If the file looks like an article (i.e., the first
16598 few lines look like headers), it will use this as the head.  If this is
16599 just some arbitrary file without a head (e.g. a C source file),
16600 @code{nneething} will cobble up a header out of thin air.  It will use
16601 file ownership, name and date and do whatever it can with these
16602 elements.
16603
16604 All this should happen automatically for you, and you will be presented
16605 with something that looks very much like a newsgroup.  Totally like a
16606 newsgroup, to be precise.  If you select an article, it will be displayed
16607 in the article buffer, just as usual.
16608
16609 If you select a line that represents a directory, Gnus will pop you into
16610 a new summary buffer for this @code{nneething} group.  And so on.  You can
16611 traverse the entire disk this way, if you feel like, but remember that
16612 Gnus is not dired, really, and does not intend to be, either.
16613
16614 There are two overall modes to this action---ephemeral or solid.  When
16615 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
16616 will not store information on what files you have read, and what files
16617 are new, and so on.  If you create a solid @code{nneething} group the
16618 normal way with @kbd{G m}, Gnus will store a mapping table between
16619 article numbers and file names, and you can treat this group like any
16620 other groups.  When you activate a solid @code{nneething} group, you will
16621 be told how many unread articles it contains, etc., etc.
16622
16623 Some variables:
16624
16625 @table @code
16626 @item nneething-map-file-directory
16627 @vindex nneething-map-file-directory
16628 All the mapping files for solid @code{nneething} groups will be stored
16629 in this directory, which defaults to @file{~/.nneething/}.
16630
16631 @item nneething-exclude-files
16632 @vindex nneething-exclude-files
16633 All files that match this regexp will be ignored.  Nice to use to exclude
16634 auto-save files and the like, which is what it does by default.
16635
16636 @item nneething-include-files
16637 @vindex nneething-include-files
16638 Regexp saying what files to include in the group.  If this variable is
16639 non-@code{nil}, only files matching this regexp will be included.
16640
16641 @item nneething-map-file
16642 @vindex nneething-map-file
16643 Name of the map files.
16644 @end table
16645
16646
16647 @node Document Groups
16648 @subsection Document Groups
16649 @cindex nndoc
16650 @cindex documentation group
16651 @cindex help group
16652
16653 @code{nndoc} is a cute little thing that will let you read a single file
16654 as a newsgroup.  Several files types are supported:
16655
16656 @table @code
16657 @cindex Babyl
16658 @cindex Rmail mbox
16659
16660 @item babyl
16661 The Babyl (Rmail) mail box.
16662 @cindex mbox
16663 @cindex Unix mbox
16664
16665 @item mbox
16666 The standard Unix mbox file.
16667
16668 @cindex MMDF mail box
16669 @item mmdf
16670 The MMDF mail box format.
16671
16672 @item news
16673 Several news articles appended into a file.
16674
16675 @item rnews
16676 @cindex rnews batch files
16677 The rnews batch transport format.
16678 @cindex forwarded messages
16679
16680 @item forward
16681 Forwarded articles.
16682
16683 @item nsmail
16684 Netscape mail boxes.
16685
16686 @item mime-parts
16687 @acronym{MIME} multipart messages.
16688
16689 @item standard-digest
16690 The standard (RFC 1153) digest format.
16691
16692 @item mime-digest
16693 A @acronym{MIME} digest of messages.
16694
16695 @item lanl-gov-announce
16696 Announcement messages from LANL Gov Announce.
16697
16698 @item rfc822-forward
16699 A message forwarded according to RFC822.
16700
16701 @item outlook
16702 The Outlook mail box.
16703
16704 @item oe-dbx
16705 The Outlook Express dbx mail box.
16706
16707 @item exim-bounce
16708 A bounce message from the Exim MTA.
16709
16710 @item forward
16711 A message forwarded according to informal rules.
16712
16713 @item rfc934
16714 An RFC934-forwarded message.
16715
16716 @item mailman
16717 A mailman digest.
16718
16719 @item clari-briefs
16720 A digest of Clarinet brief news items.
16721
16722 @item slack-digest
16723 Non-standard digest format---matches most things, but does it badly.
16724
16725 @item mail-in-mail
16726 The last resort.
16727 @end table
16728
16729 You can also use the special ``file type'' @code{guess}, which means
16730 that @code{nndoc} will try to guess what file type it is looking at.
16731 @code{digest} means that @code{nndoc} should guess what digest type the
16732 file is.
16733
16734 @code{nndoc} will not try to change the file or insert any extra headers into
16735 it---it will simply, like, let you use the file as the basis for a
16736 group.  And that's it.
16737
16738 If you have some old archived articles that you want to insert into your
16739 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
16740 that.  Say you have an old @file{RMAIL} file with mail that you now want
16741 to split into your new @code{nnml} groups.  You look at that file using
16742 @code{nndoc} (using the @kbd{G f} command in the group buffer
16743 (@pxref{Foreign Groups})), set the process mark on all the articles in
16744 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
16745 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
16746 file is now also stored in lots of @code{nnml} directories, and you can
16747 delete that pesky @file{RMAIL} file.  If you have the guts!
16748
16749 Virtual server variables:
16750
16751 @table @code
16752 @item nndoc-article-type
16753 @vindex nndoc-article-type
16754 This should be one of @code{mbox}, @code{babyl}, @code{digest},
16755 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
16756 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
16757 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
16758 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
16759
16760 @item nndoc-post-type
16761 @vindex nndoc-post-type
16762 This variable says whether Gnus is to consider the group a news group or
16763 a mail group.  There are two valid values:  @code{mail} (the default)
16764 and @code{news}.
16765 @end table
16766
16767 @menu
16768 * Document Server Internals::   How to add your own document types.
16769 @end menu
16770
16771
16772 @node Document Server Internals
16773 @subsubsection Document Server Internals
16774
16775 Adding new document types to be recognized by @code{nndoc} isn't
16776 difficult.  You just have to whip up a definition of what the document
16777 looks like, write a predicate function to recognize that document type,
16778 and then hook into @code{nndoc}.
16779
16780 First, here's an example document type definition:
16781
16782 @example
16783 (mmdf
16784  (article-begin .  "^\^A\^A\^A\^A\n")
16785  (body-end .  "^\^A\^A\^A\^A\n"))
16786 @end example
16787
16788 The definition is simply a unique @dfn{name} followed by a series of
16789 regexp pseudo-variable settings.  Below are the possible
16790 variables---don't be daunted by the number of variables; most document
16791 types can be defined with very few settings:
16792
16793 @table @code
16794 @item first-article
16795 If present, @code{nndoc} will skip past all text until it finds
16796 something that match this regexp.  All text before this will be
16797 totally ignored.
16798
16799 @item article-begin
16800 This setting has to be present in all document type definitions.  It
16801 says what the beginning of each article looks like.
16802
16803 @item head-begin-function
16804 If present, this should be a function that moves point to the head of
16805 the article.
16806
16807 @item nndoc-head-begin
16808 If present, this should be a regexp that matches the head of the
16809 article.
16810
16811 @item nndoc-head-end
16812 This should match the end of the head of the article.  It defaults to
16813 @samp{^$}---the empty line.
16814
16815 @item body-begin-function
16816 If present, this function should move point to the beginning of the body
16817 of the article.
16818
16819 @item body-begin
16820 This should match the beginning of the body of the article.  It defaults
16821 to @samp{^\n}.
16822
16823 @item body-end-function
16824 If present, this function should move point to the end of the body of
16825 the article.
16826
16827 @item body-end
16828 If present, this should match the end of the body of the article.
16829
16830 @item file-end
16831 If present, this should match the end of the file.  All text after this
16832 regexp will be totally ignored.
16833
16834 @end table
16835
16836 So, using these variables @code{nndoc} is able to dissect a document
16837 file into a series of articles, each with a head and a body.  However, a
16838 few more variables are needed since not all document types are all that
16839 news-like---variables needed to transform the head or the body into
16840 something that's palatable for Gnus:
16841
16842 @table @code
16843 @item prepare-body-function
16844 If present, this function will be called when requesting an article.  It
16845 will be called with point at the start of the body, and is useful if the
16846 document has encoded some parts of its contents.
16847
16848 @item article-transform-function
16849 If present, this function is called when requesting an article.  It's
16850 meant to be used for more wide-ranging transformation of both head and
16851 body of the article.
16852
16853 @item generate-head-function
16854 If present, this function is called to generate a head that Gnus can
16855 understand.  It is called with the article number as a parameter, and is
16856 expected to generate a nice head for the article in question.  It is
16857 called when requesting the headers of all articles.
16858
16859 @end table
16860
16861 Let's look at the most complicated example I can come up with---standard
16862 digests:
16863
16864 @example
16865 (standard-digest
16866  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
16867  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
16868  (prepare-body-function . nndoc-unquote-dashes)
16869  (body-end-function . nndoc-digest-body-end)
16870  (head-end . "^ ?$")
16871  (body-begin . "^ ?\n")
16872  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
16873  (subtype digest guess))
16874 @end example
16875
16876 We see that all text before a 70-width line of dashes is ignored; all
16877 text after a line that starts with that @samp{^End of} is also ignored;
16878 each article begins with a 30-width line of dashes; the line separating
16879 the head from the body may contain a single space; and that the body is
16880 run through @code{nndoc-unquote-dashes} before being delivered.
16881
16882 To hook your own document definition into @code{nndoc}, use the
16883 @code{nndoc-add-type} function.  It takes two parameters---the first
16884 is the definition itself and the second (optional) parameter says
16885 where in the document type definition alist to put this definition.
16886 The alist is traversed sequentially, and
16887 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
16888 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
16889 @code{mmdf} type, and so on.  These type predicates should return
16890 @code{nil} if the document is not of the correct type; @code{t} if it
16891 is of the correct type; and a number if the document might be of the
16892 correct type.  A high number means high probability; a low number
16893 means low probability with @samp{0} being the lowest valid number.
16894
16895
16896 @node SOUP
16897 @subsection SOUP
16898 @cindex SOUP
16899 @cindex offline
16900
16901 In the PC world people often talk about ``offline'' newsreaders.  These
16902 are thingies that are combined reader/news transport monstrosities.
16903 With built-in modem programs.  Yecchh!
16904
16905 Of course, us Unix Weenie types of human beans use things like
16906 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
16907 transport things like Ghod intended.  And then we just use normal
16908 newsreaders.
16909
16910 However, it can sometimes be convenient to do something that's a bit
16911 easier on the brain if you have a very slow modem, and you're not really
16912 that interested in doing things properly.
16913
16914 A file format called @sc{soup} has been developed for transporting news
16915 and mail from servers to home machines and back again.  It can be a bit
16916 fiddly.
16917
16918 First some terminology:
16919
16920 @table @dfn
16921
16922 @item server
16923 This is the machine that is connected to the outside world and where you
16924 get news and/or mail from.
16925
16926 @item home machine
16927 This is the machine that you want to do the actual reading and responding
16928 on.  It is typically not connected to the rest of the world in any way.
16929
16930 @item packet
16931 Something that contains messages and/or commands.  There are two kinds
16932 of packets:
16933
16934 @table @dfn
16935 @item message packets
16936 These are packets made at the server, and typically contain lots of
16937 messages for you to read.  These are called @file{SoupoutX.tgz} by
16938 default, where @var{x} is a number.
16939
16940 @item response packets
16941 These are packets made at the home machine, and typically contains
16942 replies that you've written.  These are called @file{SoupinX.tgz} by
16943 default, where @var{x} is a number.
16944
16945 @end table
16946
16947 @end table
16948
16949
16950 @enumerate
16951
16952 @item
16953 You log in on the server and create a @sc{soup} packet.  You can either
16954 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
16955 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
16956 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
16957
16958 @item
16959 You transfer the packet home.  Rail, boat, car or modem will do fine.
16960
16961 @item
16962 You put the packet in your home directory.
16963
16964 @item
16965 You fire up Gnus on your home machine using the @code{nnsoup} back end as
16966 the native or secondary server.
16967
16968 @item
16969 You read articles and mail and answer and followup to the things you
16970 want (@pxref{SOUP Replies}).
16971
16972 @item
16973 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
16974 packet.
16975
16976 @item
16977 You transfer this packet to the server.
16978
16979 @item
16980 You use Gnus to mail this packet out with the @kbd{G s s} command.
16981
16982 @item
16983 You then repeat until you die.
16984
16985 @end enumerate
16986
16987 So you basically have a bipartite system---you use @code{nnsoup} for
16988 reading and Gnus for packing/sending these @sc{soup} packets.
16989
16990 @menu
16991 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
16992 * SOUP Groups::                 A back end for reading @sc{soup} packets.
16993 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
16994 @end menu
16995
16996
16997 @node SOUP Commands
16998 @subsubsection SOUP Commands
16999
17000 These are commands for creating and manipulating @sc{soup} packets.
17001
17002 @table @kbd
17003 @item G s b
17004 @kindex G s b (Group)
17005 @findex gnus-group-brew-soup
17006 Pack all unread articles in the current group
17007 (@code{gnus-group-brew-soup}).  This command understands the
17008 process/prefix convention.
17009
17010 @item G s w
17011 @kindex G s w (Group)
17012 @findex gnus-soup-save-areas
17013 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
17014
17015 @item G s s
17016 @kindex G s s (Group)
17017 @findex gnus-soup-send-replies
17018 Send all replies from the replies packet
17019 (@code{gnus-soup-send-replies}).
17020
17021 @item G s p
17022 @kindex G s p (Group)
17023 @findex gnus-soup-pack-packet
17024 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
17025
17026 @item G s r
17027 @kindex G s r (Group)
17028 @findex nnsoup-pack-replies
17029 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
17030
17031 @item O s
17032 @kindex O s (Summary)
17033 @findex gnus-soup-add-article
17034 This summary-mode command adds the current article to a @sc{soup} packet
17035 (@code{gnus-soup-add-article}).  It understands the process/prefix
17036 convention (@pxref{Process/Prefix}).
17037
17038 @end table
17039
17040
17041 There are a few variables to customize where Gnus will put all these
17042 thingies:
17043
17044 @table @code
17045
17046 @item gnus-soup-directory
17047 @vindex gnus-soup-directory
17048 Directory where Gnus will save intermediate files while composing
17049 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
17050
17051 @item gnus-soup-replies-directory
17052 @vindex gnus-soup-replies-directory
17053 This is what Gnus will use as a temporary directory while sending our
17054 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
17055
17056 @item gnus-soup-prefix-file
17057 @vindex gnus-soup-prefix-file
17058 Name of the file where Gnus stores the last used prefix.  The default is
17059 @samp{gnus-prefix}.
17060
17061 @item gnus-soup-packer
17062 @vindex gnus-soup-packer
17063 A format string command for packing a @sc{soup} packet.  The default is
17064 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
17065
17066 @item gnus-soup-unpacker
17067 @vindex gnus-soup-unpacker
17068 Format string command for unpacking a @sc{soup} packet.  The default is
17069 @samp{gunzip -c %s | tar xvf -}.
17070
17071 @item gnus-soup-packet-directory
17072 @vindex gnus-soup-packet-directory
17073 Where Gnus will look for reply packets.  The default is @file{~/}.
17074
17075 @item gnus-soup-packet-regexp
17076 @vindex gnus-soup-packet-regexp
17077 Regular expression matching @sc{soup} reply packets in
17078 @code{gnus-soup-packet-directory}.
17079
17080 @end table
17081
17082
17083 @node SOUP Groups
17084 @subsubsection SOUP Groups
17085 @cindex nnsoup
17086
17087 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
17088 read incoming packets, unpack them, and put them in a directory where
17089 you can read them at leisure.
17090
17091 These are the variables you can use to customize its behavior:
17092
17093 @table @code
17094
17095 @item nnsoup-tmp-directory
17096 @vindex nnsoup-tmp-directory
17097 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
17098 directory.  (@file{/tmp/} by default.)
17099
17100 @item nnsoup-directory
17101 @vindex nnsoup-directory
17102 @code{nnsoup} then moves each message and index file to this directory.
17103 The default is @file{~/SOUP/}.
17104
17105 @item nnsoup-replies-directory
17106 @vindex nnsoup-replies-directory
17107 All replies will be stored in this directory before being packed into a
17108 reply packet.  The default is @file{~/SOUP/replies/}.
17109
17110 @item nnsoup-replies-format-type
17111 @vindex nnsoup-replies-format-type
17112 The @sc{soup} format of the replies packets.  The default is @samp{?n}
17113 (rnews), and I don't think you should touch that variable.  I probably
17114 shouldn't even have documented it.  Drats!  Too late!
17115
17116 @item nnsoup-replies-index-type
17117 @vindex nnsoup-replies-index-type
17118 The index type of the replies packet.  The default is @samp{?n}, which
17119 means ``none''.  Don't fiddle with this one either!
17120
17121 @item nnsoup-active-file
17122 @vindex nnsoup-active-file
17123 Where @code{nnsoup} stores lots of information.  This is not an ``active
17124 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
17125 this file or mess it up in any way, you're dead.  The default is
17126 @file{~/SOUP/active}.
17127
17128 @item nnsoup-packer
17129 @vindex nnsoup-packer
17130 Format string command for packing a reply @sc{soup} packet.  The default
17131 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
17132
17133 @item nnsoup-unpacker
17134 @vindex nnsoup-unpacker
17135 Format string command for unpacking incoming @sc{soup} packets.  The
17136 default is @samp{gunzip -c %s | tar xvf -}.
17137
17138 @item nnsoup-packet-directory
17139 @vindex nnsoup-packet-directory
17140 Where @code{nnsoup} will look for incoming packets.  The default is
17141 @file{~/}.
17142
17143 @item nnsoup-packet-regexp
17144 @vindex nnsoup-packet-regexp
17145 Regular expression matching incoming @sc{soup} packets.  The default is
17146 @samp{Soupout}.
17147
17148 @item nnsoup-always-save
17149 @vindex nnsoup-always-save
17150 If non-@code{nil}, save the replies buffer after each posted message.
17151
17152 @end table
17153
17154
17155 @node SOUP Replies
17156 @subsubsection SOUP Replies
17157
17158 Just using @code{nnsoup} won't mean that your postings and mailings end
17159 up in @sc{soup} reply packets automagically.  You have to work a bit
17160 more for that to happen.
17161
17162 @findex nnsoup-set-variables
17163 The @code{nnsoup-set-variables} command will set the appropriate
17164 variables to ensure that all your followups and replies end up in the
17165 @sc{soup} system.
17166
17167 In specific, this is what it does:
17168
17169 @lisp
17170 (setq message-send-news-function 'nnsoup-request-post)
17171 (setq message-send-mail-function 'nnsoup-request-mail)
17172 @end lisp
17173
17174 And that's it, really.  If you only want news to go into the @sc{soup}
17175 system you just use the first line.  If you only want mail to be
17176 @sc{soup}ed you use the second.
17177
17178
17179 @node Mail-To-News Gateways
17180 @subsection Mail-To-News Gateways
17181 @cindex mail-to-news gateways
17182 @cindex gateways
17183
17184 If your local @code{nntp} server doesn't allow posting, for some reason
17185 or other, you can post using one of the numerous mail-to-news gateways.
17186 The @code{nngateway} back end provides the interface.
17187
17188 Note that you can't read anything from this back end---it can only be
17189 used to post with.
17190
17191 Server variables:
17192
17193 @table @code
17194 @item nngateway-address
17195 @vindex nngateway-address
17196 This is the address of the mail-to-news gateway.
17197
17198 @item nngateway-header-transformation
17199 @vindex nngateway-header-transformation
17200 News headers often have to be transformed in some odd way or other
17201 for the mail-to-news gateway to accept it.  This variable says what
17202 transformation should be called, and defaults to
17203 @code{nngateway-simple-header-transformation}.  The function is called
17204 narrowed to the headers to be transformed and with one parameter---the
17205 gateway address.
17206
17207 This default function just inserts a new @code{To} header based on the
17208 @code{Newsgroups} header and the gateway address.
17209 For instance, an article with this @code{Newsgroups} header:
17210
17211 @example
17212 Newsgroups: alt.religion.emacs
17213 @end example
17214
17215 will get this @code{To} header inserted:
17216
17217 @example
17218 To: alt-religion-emacs@@GATEWAY
17219 @end example
17220
17221 The following pre-defined functions exist:
17222
17223 @findex nngateway-simple-header-transformation
17224 @table @code
17225
17226 @item nngateway-simple-header-transformation
17227 Creates a @code{To} header that looks like
17228 @var{newsgroup}@@@code{nngateway-address}.
17229
17230 @findex nngateway-mail2news-header-transformation
17231
17232 @item nngateway-mail2news-header-transformation
17233 Creates a @code{To} header that looks like
17234 @code{nngateway-address}.
17235 @end table
17236
17237 @end table
17238
17239 Here's an example:
17240
17241 @lisp
17242 (setq gnus-post-method
17243       '(nngateway
17244         "mail2news@@replay.com"
17245         (nngateway-header-transformation
17246          nngateway-mail2news-header-transformation)))
17247 @end lisp
17248
17249 So, to use this, simply say something like:
17250
17251 @lisp
17252 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
17253 @end lisp
17254
17255
17256
17257 @node Combined Groups
17258 @section Combined Groups
17259
17260 Gnus allows combining a mixture of all the other group types into bigger
17261 groups.
17262
17263 @menu
17264 * Virtual Groups::              Combining articles from many groups.
17265 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
17266 @end menu
17267
17268
17269 @node Virtual Groups
17270 @subsection Virtual Groups
17271 @cindex nnvirtual
17272 @cindex virtual groups
17273 @cindex merging groups
17274
17275 An @dfn{nnvirtual group} is really nothing more than a collection of
17276 other groups.
17277
17278 For instance, if you are tired of reading many small groups, you can
17279 put them all in one big group, and then grow tired of reading one
17280 big, unwieldy group.  The joys of computing!
17281
17282 You specify @code{nnvirtual} as the method.  The address should be a
17283 regexp to match component groups.
17284
17285 All marks in the virtual group will stick to the articles in the
17286 component groups.  So if you tick an article in a virtual group, the
17287 article will also be ticked in the component group from whence it
17288 came.  (And vice versa---marks from the component groups will also be
17289 shown in the virtual group.).  To create an empty virtual group, run
17290 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
17291 and edit the method regexp with @kbd{M-e}
17292 (@code{gnus-group-edit-group-method})
17293
17294 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
17295 newsgroups into one, big, happy newsgroup:
17296
17297 @lisp
17298 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
17299 @end lisp
17300
17301 The component groups can be native or foreign; everything should work
17302 smoothly, but if your computer explodes, it was probably my fault.
17303
17304 Collecting the same group from several servers might actually be a good
17305 idea if users have set the Distribution header to limit distribution.
17306 If you would like to read @samp{soc.motss} both from a server in Japan
17307 and a server in Norway, you could use the following as the group regexp:
17308
17309 @example
17310 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
17311 @end example
17312
17313 (Remember, though, that if you're creating the group with @kbd{G m}, you
17314 shouldn't double the backslashes, and you should leave off the quote
17315 characters at the beginning and the end of the string.)
17316
17317 This should work kinda smoothly---all articles from both groups should
17318 end up in this one, and there should be no duplicates.  Threading (and
17319 the rest) will still work as usual, but there might be problems with the
17320 sequence of articles.  Sorting on date might be an option here
17321 (@pxref{Selecting a Group}).
17322
17323 One limitation, however---all groups included in a virtual
17324 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
17325 zombie groups can't be component groups for @code{nnvirtual} groups.
17326
17327 @vindex nnvirtual-always-rescan
17328 If the @code{nnvirtual-always-rescan} is non-@code{nil},
17329 @code{nnvirtual} will always scan groups for unread articles when
17330 entering a virtual group.  If this variable is @code{nil} (which is the
17331 default) and you read articles in a component group after the virtual
17332 group has been activated, the read articles from the component group
17333 will show up when you enter the virtual group.  You'll also see this
17334 effect if you have two virtual groups that have a component group in
17335 common.  If that's the case, you should set this variable to @code{t}.
17336 Or you can just tap @code{M-g} on the virtual group every time before
17337 you enter it---it'll have much the same effect.
17338
17339 @code{nnvirtual} can have both mail and news groups as component groups.
17340 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
17341 has to ask the back end of the component group the article comes from
17342 whether it is a news or mail back end.  However, when you do a @kbd{^},
17343 there is typically no sure way for the component back end to know this,
17344 and in that case @code{nnvirtual} tells Gnus that the article came from a
17345 not-news back end.  (Just to be on the safe side.)
17346
17347 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
17348 line from the article you respond to in these cases.
17349
17350 @code{nnvirtual} groups do not inherit anything but articles and marks
17351 from component groups---group parameters, for instance, are not
17352 inherited.
17353
17354
17355 @node Kibozed Groups
17356 @subsection Kibozed Groups
17357 @cindex nnkiboze
17358 @cindex kibozing
17359
17360 @dfn{Kibozing} is defined by the @acronym{OED} as ``grepping through
17361 (parts of) the news feed''.  @code{nnkiboze} is a back end that will
17362 do this for you.  Oh joy!  Now you can grind any @acronym{NNTP} server
17363 down to a halt with useless requests!  Oh happiness!
17364
17365 @kindex G k (Group)
17366 To create a kibozed group, use the @kbd{G k} command in the group
17367 buffer.
17368
17369 The address field of the @code{nnkiboze} method is, as with
17370 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
17371 @code{nnkiboze} group.  That's where most similarities between
17372 @code{nnkiboze} and @code{nnvirtual} end.
17373
17374 In addition to this regexp detailing component groups, an
17375 @code{nnkiboze} group must have a score file to say what articles are
17376 to be included in the group (@pxref{Scoring}).
17377
17378 @kindex M-x nnkiboze-generate-groups
17379 @findex nnkiboze-generate-groups
17380 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
17381 @code{nnkiboze} groups you want to have.  This command will take time.
17382 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
17383 headers from all the articles in all the component groups and run them
17384 through the scoring process to determine if there are any articles in
17385 the groups that are to be part of the @code{nnkiboze} groups.
17386
17387 Please limit the number of component groups by using restrictive
17388 regexps.  Otherwise your sysadmin may become annoyed with you, and the
17389 @acronym{NNTP} site may throw you off and never let you back in again.
17390 Stranger things have happened.
17391
17392 @code{nnkiboze} component groups do not have to be alive---they can be dead,
17393 and they can be foreign.  No restrictions.
17394
17395 @vindex nnkiboze-directory
17396 The generation of an @code{nnkiboze} group means writing two files in
17397 @code{nnkiboze-directory}, which is @file{~/News/kiboze/} by default.
17398 One contains the @acronym{NOV} header lines for all the articles in
17399 the group, and the other is an additional @file{.newsrc} file to store
17400 information on what groups have been searched through to find
17401 component articles.
17402
17403 Articles marked as read in the @code{nnkiboze} group will have
17404 their @acronym{NOV} lines removed from the @acronym{NOV} file.
17405
17406
17407 @node Gnus Unplugged
17408 @section Gnus Unplugged
17409 @cindex offline
17410 @cindex unplugged
17411 @cindex agent
17412 @cindex Gnus agent
17413 @cindex Gnus unplugged
17414
17415 In olden times (ca. February '88), people used to run their newsreaders
17416 on big machines with permanent connections to the net.  News transport
17417 was dealt with by news servers, and all the newsreaders had to do was to
17418 read news.  Believe it or not.
17419
17420 Nowadays most people read news and mail at home, and use some sort of
17421 modem to connect to the net.  To avoid running up huge phone bills, it
17422 would be nice to have a way to slurp down all the news and mail, hang up
17423 the phone, read for several hours, and then upload any responses you
17424 have to make.  And then you repeat the procedure.
17425
17426 Of course, you can use news servers for doing this as well.  I've used
17427 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
17428 for some years, but doing that's a bore.  Moving the news server
17429 functionality up to the newsreader makes sense if you're the only person
17430 reading news on a machine.
17431
17432 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
17433 fact, you don't even have to configure anything.
17434
17435 Of course, to use it as such, you have to learn a few new commands.
17436
17437 @menu
17438 * Agent Basics::                How it all is supposed to work.
17439 * Agent Categories::            How to tell the Gnus Agent what to download.
17440 * Agent Commands::              New commands for all the buffers.
17441 * Agent Visuals::               Ways that the agent may effect your summary buffer.
17442 * Agent as Cache::              The Agent is a big cache too.
17443 * Agent Expiry::                How to make old articles go away.
17444 * Agent Regeneration::          How to recover from lost connections and other accidents.
17445 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
17446 * Outgoing Messages::           What happens when you post/mail something?
17447 * Agent Variables::             Customizing is fun.
17448 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
17449 * Batching Agents::             How to fetch news from a @code{cron} job.
17450 * Agent Caveats::               What you think it'll do and what it does.
17451 @end menu
17452
17453
17454 @node Agent Basics
17455 @subsection Agent Basics
17456
17457 First, let's get some terminology out of the way.
17458
17459 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
17460 connection to the net (and notified the Agent that this is the case).
17461 When the connection to the net is up again (and Gnus knows this), the
17462 Agent is @dfn{plugged}.
17463
17464 The @dfn{local} machine is the one you're running on, and which isn't
17465 connected to the net continuously.
17466
17467 @dfn{Downloading} means fetching things from the net to your local
17468 machine.  @dfn{Uploading} is doing the opposite.
17469
17470 You know that Gnus gives you all the opportunity you'd ever want for
17471 shooting yourself in the foot.  Some people call it flexibility.  Gnus
17472 is also customizable to a great extent, which means that the user has a
17473 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
17474 you in your foot, but with Gnus, you have a choice!
17475
17476 Gnus is never really in plugged or unplugged state.  Rather, it applies
17477 that state to each server individually.  This means that some servers
17478 can be plugged while others can be unplugged.  Additionally, some
17479 servers can be ignored by the Agent altogether (which means that
17480 they're kinda like plugged always).
17481
17482 So when you unplug the Agent and then wonder why is Gnus opening a
17483 connection to the Net, the next step to do is to look whether all
17484 servers are agentized.  If there is an unagentized server, you found
17485 the culprit.
17486
17487 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
17488 reachable.  When Gnus notices this, it asks you whether you want the
17489 server to be switched to offline state.  If you say yes, then the
17490 server will behave somewhat as if it was unplugged, except that Gnus
17491 will ask you whether you want to switch it back online again.
17492
17493 Let's take a typical Gnus session using the Agent.
17494
17495 @itemize @bullet
17496
17497 @item
17498 @findex gnus-unplugged
17499 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
17500 Agent in a disconnected state.  You can read all the news that you have
17501 already fetched while in this mode.
17502
17503 @item
17504 You then decide to see whether any new news has arrived.  You connect
17505 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
17506 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
17507 as usual.  To check for new mail in unplugged mode (@pxref{Mail
17508 Source Specifiers}).
17509
17510 @item
17511 You can then read the new news immediately, or you can download the
17512 news onto your local machine.  If you want to do the latter, you press
17513 @kbd{g} to check if there are any new news and then @kbd{J s} to fetch
17514 all the eligible articles in all the groups.  (To let Gnus know which
17515 articles you want to download, @pxref{Agent Categories}).
17516
17517 @item
17518 After fetching the articles, you press @kbd{J j} to make Gnus become
17519 unplugged again, and you shut down the PPP thing (or whatever).  And
17520 then you read the news offline.
17521
17522 @item
17523 And then you go to step 2.
17524 @end itemize
17525
17526 Here are some things you should do the first time (or so) that you use
17527 the Agent.
17528
17529 @itemize @bullet
17530
17531 @item
17532 Decide which servers should be covered by the Agent.  If you have a mail
17533 back end, it would probably be nonsensical to have it covered by the
17534 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
17535 @kbd{J a} on the server (or servers) that you wish to have covered by the
17536 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
17537 added servers you do not wish to have covered by the Agent.  By default,
17538 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
17539 @code{gnus-secondary-select-methods} are agentized.
17540
17541 @item
17542 Decide on download policy.  It's fairly simple once you decide whether
17543 you are going to use agent categories, topic parameters, and/or group
17544 parameters to implement your policy.  If you're new to gnus, it
17545 is probably best to start with a category, @xref{Agent Categories}.
17546
17547 Both topic parameters (@pxref{Topic Parameters}) and agent categories
17548 (@pxref{Agent Categories}) provide for setting a policy that applies
17549 to multiple groups.  Which you use is entirely up to you.  Topic
17550 parameters do override categories so, if you mix the two, you'll have
17551 to take that into account.  If you have a few groups that deviate from
17552 your policy, you can use group parameters (@pxref{Group Parameters}) to
17553 configure them.
17554
17555 @item
17556 Uhm@dots{} that's it.
17557 @end itemize
17558
17559
17560 @node Agent Categories
17561 @subsection Agent Categories
17562
17563 One of the main reasons to integrate the news transport layer into the
17564 newsreader is to allow greater control over what articles to download.
17565 There's not much point in downloading huge amounts of articles, just to
17566 find out that you're not interested in reading any of them.  It's better
17567 to be somewhat more conservative in choosing what to download, and then
17568 mark the articles for downloading manually if it should turn out that
17569 you're interested in the articles anyway.
17570
17571 One of the more effective methods for controlling what is to be
17572 downloaded is to create a @dfn{category} and then assign some (or all)
17573 groups to this category.  Groups that do not belong in any other
17574 category belong to the @code{default} category.  Gnus has its own
17575 buffer for creating and managing categories.
17576
17577 If you prefer, you can also use group parameters (@pxref{Group
17578 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
17579 alternative approach to controlling the agent.  The only real
17580 difference is that categories are specific to the agent (so there is
17581 less to learn) while group and topic parameters include the kitchen
17582 sink.
17583
17584 Since you can set agent parameters in several different places we have
17585 a rule to decide which source to believe.  This rule specifies that
17586 the parameter sources are checked in the following order: group
17587 parameters, topic parameters, agent category, and finally customizable
17588 variables.  So you can mix all of these sources to produce a wide range
17589 of behavior, just don't blame me if you don't remember where you put
17590 your settings.
17591
17592 @menu
17593 * Category Syntax::             What a category looks like.
17594 * Category Buffer::             A buffer for maintaining categories.
17595 * Category Variables::          Customize'r'Us.
17596 @end menu
17597
17598
17599 @node Category Syntax
17600 @subsubsection Category Syntax
17601
17602 A category consists of a name, the list of groups belonging to the
17603 category, and a number of optional parameters that override the
17604 customizable variables.  The complete list of agent parameters are
17605 listed below.
17606
17607 @cindex Agent Parameters
17608 @table @code
17609 @item agent-cat-name
17610 The name of the category.
17611
17612 @item agent-groups
17613 The list of groups that are in this category.
17614
17615 @item agent-predicate
17616 A predicate which (generally) gives a rough outline of which articles
17617 are eligible for downloading; and
17618
17619 @item agent-score-file
17620 a score rule which (generally) gives you a finer granularity when
17621 deciding what articles to download.  (Note that this @dfn{download
17622 score} is not necessarily related to normal scores.)
17623
17624 @item agent-enable-expiration
17625 a boolean indicating whether the agent should expire old articles in
17626 this group.  Most groups should be expired to conserve disk space.  In
17627 fact, its probably safe to say that the gnus.* hierarchy contains the
17628 only groups that should not be expired.
17629
17630 @item agent-days-until-old
17631 an integer indicating the number of days that the agent should wait
17632 before deciding that a read article is safe to expire.
17633
17634 @item agent-low-score
17635 an integer that overrides the value of @code{gnus-agent-low-score}.
17636
17637 @item agent-high-score
17638 an integer that overrides the value of @code{gnus-agent-high-score}.
17639
17640 @item agent-length-when-short
17641 an integer that overrides the value of
17642 @code{gnus-agent-short-article}.
17643
17644 @item agent-length-when-long
17645 an integer that overrides the value of @code{gnus-agent-long-article}.
17646
17647 @item agent-enable-undownloaded-faces
17648 a symbol indicating whether the summary buffer should display
17649 undownloaded articles using the gnus-summary-*-undownloaded-face
17650 faces. Any symbol other than nil will enable the use of undownloaded
17651 faces.
17652 @end table
17653
17654 The name of a category can not be changed once the category has been
17655 created.
17656
17657 Each category maintains a list of groups that are exclusive members of
17658 that category.  The exclusivity rule is automatically enforced, add a
17659 group to a new category and it is automatically removed from its old
17660 category.
17661
17662 A predicate in its simplest form can be a single predicate such as
17663 @code{true} or @code{false}.  These two will download every available
17664 article or nothing respectively.  In the case of these two special
17665 predicates an additional score rule is superfluous.
17666
17667 Predicates of @code{high} or @code{low} download articles in respect of
17668 their scores in relationship to @code{gnus-agent-high-score} and
17669 @code{gnus-agent-low-score} as described below.
17670
17671 To gain even finer control of what is to be regarded eligible for
17672 download a predicate can consist of a number of predicates with logical
17673 operators sprinkled in between.
17674
17675 Perhaps some examples are in order.
17676
17677 Here's a simple predicate.  (It's the default predicate, in fact, used
17678 for all groups that don't belong to any other category.)
17679
17680 @lisp
17681 short
17682 @end lisp
17683
17684 Quite simple, eh?  This predicate is true if and only if the article is
17685 short (for some value of ``short'').
17686
17687 Here's a more complex predicate:
17688
17689 @lisp
17690 (or high
17691     (and
17692      (not low)
17693      (not long)))
17694 @end lisp
17695
17696 This means that an article should be downloaded if it has a high score,
17697 or if the score is not low and the article is not long.  You get the
17698 drift.
17699
17700 The available logical operators are @code{or}, @code{and} and
17701 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
17702 @samp{|}, @code{&} and @code{!} instead.)
17703
17704 The following predicates are pre-defined, but if none of these fit what
17705 you want to do, you can write your own.
17706
17707 When evaluating each of these predicates, the named constant will be
17708 bound to the value determined by calling
17709 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
17710 example, gnus-agent-short-article will be bound to
17711 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
17712 means that you can specify a predicate in your category then tune that
17713 predicate to individual groups.
17714
17715 @table @code
17716 @item short
17717 True iff the article is shorter than @code{gnus-agent-short-article}
17718 lines; default 100.
17719
17720 @item long
17721 True iff the article is longer than @code{gnus-agent-long-article}
17722 lines; default 200.
17723
17724 @item low
17725 True iff the article has a download score less than
17726 @code{gnus-agent-low-score}; default 0.
17727
17728 @item high
17729 True iff the article has a download score greater than
17730 @code{gnus-agent-high-score}; default 0.
17731
17732 @item spam
17733 True iff the Gnus Agent guesses that the article is spam.  The
17734 heuristics may change over time, but at present it just computes a
17735 checksum and sees whether articles match.
17736
17737 @item true
17738 Always true.
17739
17740 @item false
17741 Always false.
17742 @end table
17743
17744 If you want to create your own predicate function, here's what you have
17745 to know:  The functions are called with no parameters, but the
17746 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
17747 useful values.
17748
17749 For example, you could decide that you don't want to download articles
17750 that were posted more than a certain number of days ago (e.g. posted
17751 more than @code{gnus-agent-expire-days} ago) you might write a function
17752 something along the lines of the following:
17753
17754 @lisp
17755 (defun my-article-old-p ()
17756   "Say whether an article is old."
17757   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
17758      (- (time-to-days (current-time)) gnus-agent-expire-days)))
17759 @end lisp
17760
17761 with the predicate then defined as:
17762
17763 @lisp
17764 (not my-article-old-p)
17765 @end lisp
17766
17767 or you could append your predicate to the predefined
17768 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
17769 wherever.
17770
17771 @lisp
17772 (require 'gnus-agent)
17773 (setq  gnus-category-predicate-alist
17774   (append gnus-category-predicate-alist
17775          '((old . my-article-old-p))))
17776 @end lisp
17777
17778 and simply specify your predicate as:
17779
17780 @lisp
17781 (not old)
17782 @end lisp
17783
17784 If/when using something like the above, be aware that there are many
17785 misconfigured systems/mailers out there and so an article's date is not
17786 always a reliable indication of when it was posted.  Hell, some people
17787 just don't give a damn.
17788
17789 The above predicates apply to @emph{all} the groups which belong to the
17790 category.  However, if you wish to have a specific predicate for an
17791 individual group within a category, or you're just too lazy to set up a
17792 new category, you can enter a group's individual predicate in its group
17793 parameters like so:
17794
17795 @lisp
17796 (agent-predicate . short)
17797 @end lisp
17798
17799 This is the group/topic parameter equivalent of the agent category default.
17800 Note that when specifying a single word predicate like this, the
17801 @code{agent-predicate} specification must be in dotted pair notation.
17802
17803 The equivalent of the longer example from above would be:
17804
17805 @lisp
17806 (agent-predicate or high (and (not low) (not long)))
17807 @end lisp
17808
17809 The outer parenthesis required in the category specification are not
17810 entered here as, not being in dotted pair notation, the value of the
17811 predicate is assumed to be a list.
17812
17813
17814 Now, the syntax of the download score is the same as the syntax of
17815 normal score files, except that all elements that require actually
17816 seeing the article itself are verboten.  This means that only the
17817 following headers can be scored on: @code{Subject}, @code{From},
17818 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
17819 @code{Lines}, and @code{Xref}.
17820
17821 As with predicates, the specification of the @code{download score rule}
17822 to use in respect of a group can be in either the category definition if
17823 it's to be applicable to all groups in therein, or a group's parameters
17824 if it's to be specific to that group.
17825
17826 In both of these places the @code{download score rule} can take one of
17827 three forms:
17828
17829 @enumerate
17830 @item
17831 Score rule
17832
17833 This has the same syntax as a normal Gnus score file except only a
17834 subset of scoring keywords are available as mentioned above.
17835
17836 example:
17837
17838 @itemize @bullet
17839 @item
17840 Category specification
17841
17842 @lisp
17843 (("from"
17844        ("Lars Ingebrigtsen" 1000000 nil s))
17845 ("lines"
17846        (500 -100 nil <)))
17847 @end lisp
17848
17849 @item
17850 Group/Topic Parameter specification
17851
17852 @lisp
17853 (agent-score ("from"
17854                    ("Lars Ingebrigtsen" 1000000 nil s))
17855              ("lines"
17856                    (500 -100 nil <)))
17857 @end lisp
17858
17859 Again, note the omission of the outermost parenthesis here.
17860 @end itemize
17861
17862 @item
17863 Agent score file
17864
17865 These score files must @emph{only} contain the permitted scoring
17866 keywords stated above.
17867
17868 example:
17869
17870 @itemize @bullet
17871 @item
17872 Category specification
17873
17874 @lisp
17875 ("~/News/agent.SCORE")
17876 @end lisp
17877
17878 or perhaps
17879
17880 @lisp
17881 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
17882 @end lisp
17883
17884 @item
17885 Group Parameter specification
17886
17887 @lisp
17888 (agent-score "~/News/agent.SCORE")
17889 @end lisp
17890
17891 Additional score files can be specified as above.  Need I say anything
17892 about parenthesis?
17893 @end itemize
17894
17895 @item
17896 Use @code{normal} score files
17897
17898 If you don't want to maintain two sets of scoring rules for a group, and
17899 your desired @code{downloading} criteria for a group are the same as your
17900 @code{reading} criteria then you can tell the agent to refer to your
17901 @code{normal} score files when deciding what to download.
17902
17903 These directives in either the category definition or a group's
17904 parameters will cause the agent to read in all the applicable score
17905 files for a group, @emph{filtering out} those sections that do not
17906 relate to one of the permitted subset of scoring keywords.
17907
17908 @itemize @bullet
17909 @item
17910 Category Specification
17911
17912 @lisp
17913 file
17914 @end lisp
17915
17916 @item
17917 Group Parameter specification
17918
17919 @lisp
17920 (agent-score . file)
17921 @end lisp
17922 @end itemize
17923 @end enumerate
17924
17925 @node Category Buffer
17926 @subsubsection Category Buffer
17927
17928 You'd normally do all category maintenance from the category buffer.
17929 When you enter it for the first time (with the @kbd{J c} command from
17930 the group buffer), you'll only see the @code{default} category.
17931
17932 The following commands are available in this buffer:
17933
17934 @table @kbd
17935 @item q
17936 @kindex q (Category)
17937 @findex gnus-category-exit
17938 Return to the group buffer (@code{gnus-category-exit}).
17939
17940 @item e
17941 @kindex e (Category)
17942 @findex gnus-category-customize-category
17943 Use a customization buffer to set all of the selected category's
17944 parameters at one time (@code{gnus-category-customize-category}).
17945
17946 @item k
17947 @kindex k (Category)
17948 @findex gnus-category-kill
17949 Kill the current category (@code{gnus-category-kill}).
17950
17951 @item c
17952 @kindex c (Category)
17953 @findex gnus-category-copy
17954 Copy the current category (@code{gnus-category-copy}).
17955
17956 @item a
17957 @kindex a (Category)
17958 @findex gnus-category-add
17959 Add a new category (@code{gnus-category-add}).
17960
17961 @item p
17962 @kindex p (Category)
17963 @findex gnus-category-edit-predicate
17964 Edit the predicate of the current category
17965 (@code{gnus-category-edit-predicate}).
17966
17967 @item g
17968 @kindex g (Category)
17969 @findex gnus-category-edit-groups
17970 Edit the list of groups belonging to the current category
17971 (@code{gnus-category-edit-groups}).
17972
17973 @item s
17974 @kindex s (Category)
17975 @findex gnus-category-edit-score
17976 Edit the download score rule of the current category
17977 (@code{gnus-category-edit-score}).
17978
17979 @item l
17980 @kindex l (Category)
17981 @findex gnus-category-list
17982 List all the categories (@code{gnus-category-list}).
17983 @end table
17984
17985
17986 @node Category Variables
17987 @subsubsection Category Variables
17988
17989 @table @code
17990 @item gnus-category-mode-hook
17991 @vindex gnus-category-mode-hook
17992 Hook run in category buffers.
17993
17994 @item gnus-category-line-format
17995 @vindex gnus-category-line-format
17996 Format of the lines in the category buffer (@pxref{Formatting
17997 Variables}).  Valid elements are:
17998
17999 @table @samp
18000 @item c
18001 The name of the category.
18002
18003 @item g
18004 The number of groups in the category.
18005 @end table
18006
18007 @item gnus-category-mode-line-format
18008 @vindex gnus-category-mode-line-format
18009 Format of the category mode line (@pxref{Mode Line Formatting}).
18010
18011 @item gnus-agent-short-article
18012 @vindex gnus-agent-short-article
18013 Articles that have fewer lines than this are short.  Default 100.
18014
18015 @item gnus-agent-long-article
18016 @vindex gnus-agent-long-article
18017 Articles that have more lines than this are long.  Default 200.
18018
18019 @item gnus-agent-low-score
18020 @vindex gnus-agent-low-score
18021 Articles that have a score lower than this have a low score.  Default
18022 0.
18023
18024 @item gnus-agent-high-score
18025 @vindex gnus-agent-high-score
18026 Articles that have a score higher than this have a high score.  Default
18027 0.
18028
18029 @item gnus-agent-expire-days
18030 @vindex gnus-agent-expire-days
18031 The number of days that a @samp{read} article must stay in the agent's
18032 local disk before becoming eligible for expiration (While the name is
18033 the same, this doesn't mean expiring the article on the server.  It
18034 just means deleting the local copy of the article).  What is also
18035 important to understand is that the counter starts with the time the
18036 article was written to the local disk and not the time the article was
18037 read.
18038 Default 7.
18039
18040 @item gnus-agent-enable-expiration
18041 @vindex gnus-agent-enable-expiration
18042 Determines whether articles in a group are, by default, expired or
18043 retained indefinitely.  The default is @code{ENABLE} which means that
18044 you'll have to disable expiration when desired.  On the other hand,
18045 you could set this to @code{DISABLE}.  In that case, you would then
18046 have to enable expiration in selected groups.
18047
18048 @end table
18049
18050
18051 @node Agent Commands
18052 @subsection Agent Commands
18053 @findex gnus-agent-toggle-plugged
18054 @kindex J j (Agent)
18055
18056 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
18057 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
18058 toggles the plugged/unplugged state of the Gnus Agent.
18059
18060
18061 @menu
18062 * Group Agent Commands::        Configure groups and fetch their contents.
18063 * Summary Agent Commands::      Manually select then fetch specific articles.
18064 * Server Agent Commands::       Select the servers that are supported by the agent.
18065 @end menu
18066
18067
18068
18069
18070 @node Group Agent Commands
18071 @subsubsection Group Agent Commands
18072
18073 @table @kbd
18074 @item J u
18075 @kindex J u (Agent Group)
18076 @findex gnus-agent-fetch-groups
18077 Fetch all eligible articles in the current group
18078 (@code{gnus-agent-fetch-groups}).
18079
18080 @item J c
18081 @kindex J c (Agent Group)
18082 @findex gnus-enter-category-buffer
18083 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
18084
18085 @item J s
18086 @kindex J s (Agent Group)
18087 @findex gnus-agent-fetch-session
18088 Fetch all eligible articles in all groups
18089 (@code{gnus-agent-fetch-session}).
18090
18091 @item J S
18092 @kindex J S (Agent Group)
18093 @findex gnus-group-send-queue
18094 Send all sendable messages in the queue group
18095 (@code{gnus-group-send-queue}).  @xref{Drafts}.
18096
18097 @item J a
18098 @kindex J a (Agent Group)
18099 @findex gnus-agent-add-group
18100 Add the current group to an Agent category
18101 (@code{gnus-agent-add-group}).  This command understands the
18102 process/prefix convention (@pxref{Process/Prefix}).
18103
18104 @item J r
18105 @kindex J r (Agent Group)
18106 @findex gnus-agent-remove-group
18107 Remove the current group from its category, if any
18108 (@code{gnus-agent-remove-group}).  This command understands the
18109 process/prefix convention (@pxref{Process/Prefix}).
18110
18111 @item J Y
18112 @kindex J Y (Agent Group)
18113 @findex gnus-agent-synchronize-flags
18114 Synchronize flags changed while unplugged with remote server, if any.
18115
18116
18117 @end table
18118
18119
18120 @node Summary Agent Commands
18121 @subsubsection Summary Agent Commands
18122
18123 @table @kbd
18124 @item J #
18125 @kindex J # (Agent Summary)
18126 @findex gnus-agent-mark-article
18127 Mark the article for downloading (@code{gnus-agent-mark-article}).
18128
18129 @item J M-#
18130 @kindex J M-# (Agent Summary)
18131 @findex gnus-agent-unmark-article
18132 Remove the downloading mark from the article
18133 (@code{gnus-agent-unmark-article}).
18134
18135 @cindex %
18136 @item @@
18137 @kindex @@ (Agent Summary)
18138 @findex gnus-agent-toggle-mark
18139 Toggle whether to download the article
18140 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
18141 default.
18142
18143 @item J c
18144 @kindex J c (Agent Summary)
18145 @findex gnus-agent-catchup
18146 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
18147
18148 @item J S
18149 @kindex J S (Agent Summary)
18150 @findex gnus-agent-fetch-group
18151 Download all eligible (@pxref{Agent Categories}) articles in this group.
18152 (@code{gnus-agent-fetch-group}).
18153
18154 @item J s
18155 @kindex J s (Agent Summary)
18156 @findex gnus-agent-fetch-series
18157 Download all processable articles in this group.
18158 (@code{gnus-agent-fetch-series}).
18159
18160 @item J u
18161 @kindex J u (Agent Summary)
18162 @findex gnus-agent-summary-fetch-group
18163 Download all downloadable articles in the current group
18164 (@code{gnus-agent-summary-fetch-group}).
18165
18166 @end table
18167
18168
18169 @node Server Agent Commands
18170 @subsubsection Server Agent Commands
18171
18172 @table @kbd
18173 @item J a
18174 @kindex J a (Agent Server)
18175 @findex gnus-agent-add-server
18176 Add the current server to the list of servers covered by the Gnus Agent
18177 (@code{gnus-agent-add-server}).
18178
18179 @item J r
18180 @kindex J r (Agent Server)
18181 @findex gnus-agent-remove-server
18182 Remove the current server from the list of servers covered by the Gnus
18183 Agent (@code{gnus-agent-remove-server}).
18184
18185 @end table
18186
18187
18188 @node Agent Visuals
18189 @subsection Agent Visuals
18190
18191 If you open a summary while unplugged and, Gnus knows from the group's
18192 active range that there are more articles than the headers currently
18193 stored in the Agent, you may see some articles whose subject looks
18194 something like @samp{[Undownloaded article #####]}.  These are
18195 placeholders for the missing headers.  Aside from setting a mark,
18196 there is not much that can be done with one of these placeholders.
18197 When Gnus finally gets a chance to fetch the group's headers, the
18198 placeholders will automatically be replaced by the actual headers.
18199 You can configure the summary buffer's maneuvering to skip over the
18200 placeholders if you care (See @code{gnus-auto-goto-ignores}).
18201
18202 While it may be obvious to all, the only headers and articles
18203 available while unplugged are those headers and articles that were
18204 fetched into the Agent while previously plugged.  To put it another
18205 way, "If you forget to fetch something while plugged, you might have a
18206 less than satisfying unplugged session".  For this reason, the Agent
18207 adds two visual effects to your summary buffer.  These effects display
18208 the download status of each article so that you always know which
18209 articles will be available when unplugged.
18210
18211 The first visual effect is the @samp{%O} spec.  If you customize
18212 @code{gnus-summary-line-format} to include this specifier, you will add
18213 a single character field that indicates an article's download status.
18214 Articles that have been fetched into either the Agent or the Cache,
18215 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
18216 other articles will display @code{gnus-undownloaded-mark} (defaults to
18217 @samp{-}).  If you open a group that has not been agentized, a space
18218 (@samp{ }) will be displayed.
18219
18220 The second visual effect are the undownloaded faces.  The faces, there
18221 are three indicating the article's score (low, normal, high), seem to
18222 result in a love/hate response from many Gnus users.  The problem is
18223 that the face selection is controlled by a list of condition tests and
18224 face names (See @code{gnus-summary-highlight}).  Each condition is
18225 tested in the order in which it appears in the list so early
18226 conditions have precedence over later conditions.  All of this means
18227 that, if you tick an undownloaded article, the article will continue
18228 to be displayed in the undownloaded face rather than the ticked face.
18229
18230 If you use the Agent as a cache (to avoid downloading the same article
18231 each time you visit it or to minimize your connection time), the
18232 undownloaded face will probably seem like a good idea.  The reason
18233 being that you do all of our work (marking, reading, deleting) with
18234 downloaded articles so the normal faces always appear.  For those
18235 users using the agent to improve online performance by caching the NOV
18236 database (most users since 5.10.2), the undownloaded faces may appear
18237 to be an absolutely horrible idea.  The issue being that, since none
18238 of their articles have been fetched into the Agent, all of the
18239 normal faces will be obscured by the undownloaded faces.
18240
18241 If you would like to use the undownloaded faces, you must enable the
18242 undownloaded faces by setting the @code{agent-enable-undownloaded-faces}
18243 group parameter to t.  This parameter, like all other agent
18244 parameters, may be set on an Agent Category (@pxref{Agent
18245 Categories}), a Group Topic (@pxref{Topic Parameters}), or an
18246 individual group (@pxref{Group Parameters}).
18247
18248 @node Agent as Cache
18249 @subsection Agent as Cache
18250
18251 When Gnus is plugged, it is not efficient to download headers or
18252 articles from the server again, if they are already stored in the
18253 Agent.  So, Gnus normally only downloads headers once, and stores them
18254 in the Agent.  These headers are later used when generating the summary
18255 buffer, regardless of whether you are plugged or unplugged.  Articles
18256 are not cached in the Agent by default though (that would potentially
18257 consume lots of disk space), but if you have already downloaded an
18258 article into the Agent, Gnus will not download the article from the
18259 server again but use the locally stored copy instead.
18260
18261 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
18262 @pxref{Agent Variables}) to always download headers and articles while
18263 plugged.  Gnus will almost certainly be slower, but it will be kept
18264 synchronized with the server.  That last point probably won't make any
18265 sense if you are using a nntp or nnimap back end.
18266
18267 @node Agent Expiry
18268 @subsection Agent Expiry
18269
18270 @vindex gnus-agent-expire-days
18271 @findex gnus-agent-expire
18272 @kindex M-x gnus-agent-expire
18273 @kindex M-x gnus-agent-expire-group
18274 @findex gnus-agent-expire-group
18275 @cindex agent expiry
18276 @cindex Gnus agent expiry
18277 @cindex expiry
18278
18279 The Agent back end, @code{nnagent}, doesn't handle expiry.  Well, at
18280 least it doesn't handle it like other back ends.  Instead, there are
18281 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
18282 commands that will expire all read articles that are older than
18283 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
18284 that you're running out of space.  Neither are particularly fast or
18285 efficient, and it's not a particularly good idea to interrupt them (with
18286 @kbd{C-g} or anything else) once you've started one of them.
18287
18288 Note that other functions, e.g. @code{gnus-request-expire-articles},
18289 might run @code{gnus-agent-expire} for you to keep the agent
18290 synchronized with the group.
18291
18292 The agent parameter @code{agent-enable-expiration} may be used to
18293 prevent expiration in selected groups.
18294
18295 @vindex gnus-agent-expire-all
18296 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
18297 expiration commands will expire all articles---unread, read, ticked
18298 and dormant.  If @code{nil} (which is the default), only read articles
18299 are eligible for expiry, and unread, ticked and dormant articles will
18300 be kept indefinitely.
18301
18302 If you find that some articles eligible for expiry are never expired,
18303 perhaps some Gnus Agent files are corrupted.  There's are special
18304 commands, @code{gnus-agent-regenerate} and
18305 @code{gnus-agent-regenerate-group}, to fix possible problems.
18306
18307 @node Agent Regeneration
18308 @subsection Agent Regeneration
18309
18310 @cindex agent regeneration
18311 @cindex Gnus agent regeneration
18312 @cindex regeneration
18313
18314 The local data structures used by @code{nnagent} may become corrupted
18315 due to certain exceptional conditions.  When this happens,
18316 @code{nnagent} functionality may degrade or even fail.  The solution
18317 to this problem is to repair the local data structures by removing all
18318 internal inconsistencies.
18319
18320 For example, if your connection to your server is lost while
18321 downloaded articles into the agent, the local data structures will not
18322 know about articles successfully downloaded prior to the connection
18323 failure.  Running @code{gnus-agent-regenerate} or
18324 @code{gnus-agent-regenerate-group} will update the data structures
18325 such that you don't need to download these articles a second time.
18326
18327 @findex gnus-agent-regenerate
18328 @kindex M-x gnus-agent-regenerate
18329 The command @code{gnus-agent-regenerate} will perform
18330 @code{gnus-agent-regenerate-group} on every agentized group.  While
18331 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
18332 recommended that you first close all summary buffers.
18333
18334 @findex gnus-agent-regenerate-group
18335 @kindex M-x gnus-agent-regenerate-group
18336 The command @code{gnus-agent-regenerate-group} uses the local copies
18337 of individual articles to repair the local @acronym{NOV}(header) database.  It
18338 then updates the internal data structures that document which articles
18339 are stored locally.  An optional argument will mark articles in the
18340 agent as unread.
18341
18342 @node Agent and IMAP
18343 @subsection Agent and IMAP
18344
18345 The Agent works with any Gnus back end, including nnimap.  However,
18346 since there are some conceptual differences between @acronym{NNTP} and
18347 @acronym{IMAP}, this section (should) provide you with some information to
18348 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
18349
18350 The first thing to keep in mind is that all flags (read, ticked, etc)
18351 are kept on the @acronym{IMAP} server, rather than in @file{.newsrc} as is the
18352 case for nntp.  Thus Gnus need to remember flag changes when
18353 disconnected, and synchronize these flags when you plug back in.
18354
18355 Gnus keeps track of flag changes when reading nnimap groups under the
18356 Agent.  When you plug back in, Gnus will check if you have any changed
18357 any flags and ask if you wish to synchronize these with the server.
18358 The behavior is customizable by @code{gnus-agent-synchronize-flags}.
18359
18360 @vindex gnus-agent-synchronize-flags
18361 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
18362 never automatically synchronize flags.  If it is @code{ask}, which is
18363 the default, the Agent will check if you made any changes and if so
18364 ask if you wish to synchronize these when you re-connect.  If it has
18365 any other value, all flags will be synchronized automatically.
18366
18367 If you do not wish to synchronize flags automatically when you
18368 re-connect, you can do it manually with the
18369 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
18370 in the group buffer.
18371
18372 Some things are currently not implemented in the Agent that you'd might
18373 expect from a disconnected @acronym{IMAP} client, including:
18374
18375 @itemize @bullet
18376
18377 @item
18378 Copying/moving articles into nnimap groups when unplugged.
18379
18380 @item
18381 Creating/deleting nnimap groups when unplugged.
18382
18383 @end itemize
18384
18385 Technical note: the synchronization algorithm does not work by ``pushing''
18386 all local flags to the server, but rather incrementally update the
18387 server view of flags by changing only those flags that were changed by
18388 the user.  Thus, if you set one flag on an article, quit the group and
18389 re-select the group and remove the flag; the flag will be set and
18390 removed from the server when you ``synchronize''.  The queued flag
18391 operations can be found in the per-server @code{flags} file in the Agent
18392 directory.  It's emptied when you synchronize flags.
18393
18394
18395 @node Outgoing Messages
18396 @subsection Outgoing Messages
18397
18398 By default, when Gnus is unplugged, all outgoing messages (both mail
18399 and news) are stored in the draft group ``queue'' (@pxref{Drafts}).
18400 You can view them there after posting, and edit them at will.
18401
18402 You can control the circumstances under which outgoing mail is queued
18403 (see @code{gnus-agent-queue-mail}, @pxref{Agent Variables}).  Outgoing
18404 news is always queued when Gnus is unplugged, and never otherwise.
18405
18406 You can send the messages either from the draft group with the special
18407 commands available there, or you can use the @kbd{J S} command in the
18408 group buffer to send all the sendable messages in the draft group.
18409 Posting news will only work when Gnus is plugged, but you can send
18410 mail at any time.
18411
18412 If sending mail while unplugged does not work for you and you worry
18413 about hitting @kbd{J S} by accident when unplugged, you can have Gnus
18414 ask you to confirm your action (see
18415 @code{gnus-agent-prompt-send-queue}, @pxref{Agent Variables}).
18416
18417 @node Agent Variables
18418 @subsection Agent Variables
18419
18420 @table @code
18421 @item gnus-agent-directory
18422 @vindex gnus-agent-directory
18423 Where the Gnus Agent will store its files.  The default is
18424 @file{~/News/agent/}.
18425
18426 @item gnus-agent-handle-level
18427 @vindex gnus-agent-handle-level
18428 Groups on levels (@pxref{Group Levels}) higher than this variable will
18429 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
18430 which means that only subscribed group will be considered by the Agent
18431 by default.
18432
18433 @item gnus-agent-plugged-hook
18434 @vindex gnus-agent-plugged-hook
18435 Hook run when connecting to the network.
18436
18437 @item gnus-agent-unplugged-hook
18438 @vindex gnus-agent-unplugged-hook
18439 Hook run when disconnecting from the network.
18440
18441 @item gnus-agent-fetched-hook
18442 @vindex gnus-agent-fetched-hook
18443 Hook run when finished fetching articles.
18444
18445 @item gnus-agent-cache
18446 @vindex gnus-agent-cache
18447 Variable to control whether use the locally stored @acronym{NOV} and
18448 articles when plugged, e.g. essentially using the Agent as a cache.
18449 The default is non-@code{nil}, which means to use the Agent as a cache.
18450
18451 @item gnus-agent-go-online
18452 @vindex gnus-agent-go-online
18453 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
18454 automatically switch offline servers into online status.  If it is
18455 @code{ask}, the default, the Agent will ask if you wish to switch
18456 offline servers into online status when you re-connect.  If it has any
18457 other value, all offline servers will be automatically switched into
18458 online status.
18459
18460 @item gnus-agent-mark-unread-after-downloaded
18461 @vindex gnus-agent-mark-unread-after-downloaded
18462 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
18463 mark articles as unread after downloading.  This is usually a safe
18464 thing to do as the newly downloaded article has obviously not been
18465 read.  The default is t.
18466
18467 @item gnus-agent-consider-all-articles
18468 @vindex gnus-agent-consider-all-articles
18469 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
18470 agent will let the agent predicate decide whether articles need to be
18471 downloaded or not, for all articles.  When @code{nil}, the default,
18472 the agent will only let the predicate decide whether unread articles
18473 are downloaded or not.  If you enable this, you may also want to look
18474 into the agent expiry settings (@pxref{Category Variables}), so that
18475 the agent doesn't download articles which the agent will later expire,
18476 over and over again.
18477
18478 @item gnus-agent-max-fetch-size
18479 @vindex gnus-agent-max-fetch-size
18480 The agent fetches articles into a temporary buffer prior to parsing
18481 them into individual files.  To avoid exceeding the max. buffer size,
18482 the agent alternates between fetching and parsing until all articles
18483 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
18484 limit to control how often the cycling occurs.  A large value improves
18485 performance.  A small value minimizes the time lost should the
18486 connection be lost while fetching (You may need to run
18487 @code{gnus-agent-regenerate-group} to update the group's state.
18488 However, all articles parsed prior to loosing the connection will be
18489 available while unplugged).  The default is 10M so it is unusual to
18490 see any cycling.
18491
18492 @item gnus-server-unopen-status
18493 @vindex gnus-server-unopen-status
18494 Perhaps not an Agent variable, but closely related to the Agent, this
18495 variable says what will happen if Gnus cannot open a server.  If the
18496 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
18497 whether to deny the server or whether to unplug the agent.  If the
18498 Agent is disabled, Gnus always simply deny the server.  Other choices
18499 for this variable include @code{denied} and @code{offline} the latter
18500 is only valid if the Agent is used.
18501
18502 @item gnus-auto-goto-ignores
18503 @vindex gnus-auto-goto-ignores
18504 Another variable that isn't an Agent variable, yet so closely related
18505 that most will look for it here, this variable tells the summary
18506 buffer how to maneuver around undownloaded (only headers stored in the
18507 agent) and unfetched (neither article nor headers stored) articles.
18508
18509 The legal values are @code{nil} (maneuver to any article),
18510 @code{undownloaded} (maneuvering while unplugged ignores articles that
18511 have not been fetched), @code{always-undownloaded} (maneuvering always
18512 ignores articles that have not been fetched), @code{unfetched}
18513 (maneuvering ignores articles whose headers have not been fetched).
18514
18515 @item gnus-agent-queue-mail
18516 @vindex gnus-agent-queue-mail
18517 When @code{gnus-agent-queue-mail} is @code{always}, Gnus will always
18518 queue mail rather than sending it straight away.  When @code{t}, Gnus
18519 will queue mail when unplugged only.  When @code{nil}, never queue
18520 mail.  The default is @code{t}.
18521
18522 @item gnus-agent-prompt-send-queue
18523 @vindex gnus-agent-prompt-send-queue
18524 When @code{gnus-agent-prompt-send-queue} is non-@code{nil} Gnus will
18525 prompt you to confirm that you really wish to proceed if you hit
18526 @kbd{J S} while unplugged.  The default is @code{nil}.
18527
18528 @item gnus-agent-auto-agentize-methods
18529 @vindex gnus-agent-auto-agentize-methods
18530 If you have never used the Agent before (or more technically, if
18531 @file{~/News/agent/lib/servers} does not exist), Gnus will
18532 automatically agentize a few servers for you.  This variable control
18533 which backends should be auto-agentized.  It is typically only useful
18534 to agentize remote backends.  The auto-agentizing has the same effect
18535 as running @kbd{J a} on the servers (@pxref{Server Agent Commands}).
18536 If the file exist, you must manage the servers manually by adding or
18537 removing them, this variable is only applicable the first time you
18538 start Gnus.  The default is @samp{(nntp nnimap)}.
18539
18540 @end table
18541
18542
18543 @node Example Setup
18544 @subsection Example Setup
18545
18546 If you don't want to read this manual, and you have a fairly standard
18547 setup, you may be able to use something like the following as your
18548 @file{~/.gnus.el} file to get started.
18549
18550 @lisp
18551 ;;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
18552 ;;; @r{from your ISP's server.}
18553 (setq gnus-select-method '(nntp "news.your-isp.com"))
18554
18555 ;;; @r{Define how Gnus is to read your mail.  We read mail from}
18556 ;;; @r{your ISP's @acronym{POP} server.}
18557 (setq mail-sources '((pop :server "pop.your-isp.com")))
18558
18559 ;;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
18560 (setq gnus-secondary-select-methods '((nnml "")))
18561
18562 ;;; @r{Make Gnus into an offline newsreader.}
18563 ;;; (gnus-agentize) ; @r{The obsolete setting.}
18564 ;;; (setq gnus-agent t) ; @r{Now the default.}
18565 @end lisp
18566
18567 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
18568 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
18569 gnus}.
18570
18571 If this is the first time you've run Gnus, you will be subscribed
18572 automatically to a few default newsgroups.  You'll probably want to
18573 subscribe to more groups, and to do that, you have to query the
18574 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
18575 command.  This usually takes quite a while, but you only have to do it
18576 once.
18577
18578 After reading and parsing a while, you'll be presented with a list of
18579 groups.  Subscribe to the ones you want to read with the @kbd{u}
18580 command.  @kbd{l} to make all the killed groups disappear after you've
18581 subscribe to all the groups you want to read.  (@kbd{A k} will bring
18582 back all the killed groups.)
18583
18584 You can now read the groups at once, or you can download the articles
18585 with the @kbd{J s} command.  And then read the rest of this manual to
18586 find out which of the other gazillion things you want to customize.
18587
18588
18589 @node Batching Agents
18590 @subsection Batching Agents
18591 @findex gnus-agent-batch
18592
18593 Having the Gnus Agent fetch articles (and post whatever messages you've
18594 written) is quite easy once you've gotten things set up properly.  The
18595 following shell script will do everything that is necessary:
18596
18597 You can run a complete batch command from the command line with the
18598 following incantation:
18599
18600 @example
18601 #!/bin/sh
18602 emacs -batch -l ~/.emacs -f -l ~/.gnus.el gnus-agent-batch >/dev/null 2>&1
18603 @end example
18604
18605
18606 @node Agent Caveats
18607 @subsection Agent Caveats
18608
18609 The Gnus Agent doesn't seem to work like most other offline
18610 newsreaders.  Here are some common questions that some imaginary people
18611 may ask:
18612
18613 @table @dfn
18614 @item If I read an article while plugged, do they get entered into the Agent?
18615
18616 @strong{No}.  If you want this behaviour, add
18617 @code{gnus-agent-fetch-selected-article} to
18618 @code{gnus-select-article-hook}.
18619
18620 @item If I read an article while plugged, and the article already exists in
18621 the Agent, will it get downloaded once more?
18622
18623 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
18624
18625 @end table
18626
18627 In short, when Gnus is unplugged, it only looks into the locally stored
18628 articles; when it's plugged, it talks to your ISP and may also use the
18629 locally stored articles.
18630
18631
18632 @node Scoring
18633 @chapter Scoring
18634 @cindex scoring
18635
18636 Other people use @dfn{kill files}, but we here at Gnus Towers like
18637 scoring better than killing, so we'd rather switch than fight.  They do
18638 something completely different as well, so sit up straight and pay
18639 attention!
18640
18641 @vindex gnus-summary-mark-below
18642 All articles have a default score (@code{gnus-summary-default-score}),
18643 which is 0 by default.  This score may be raised or lowered either
18644 interactively or by score files.  Articles that have a score lower than
18645 @code{gnus-summary-mark-below} are marked as read.
18646
18647 Gnus will read any @dfn{score files} that apply to the current group
18648 before generating the summary buffer.
18649
18650 There are several commands in the summary buffer that insert score
18651 entries based on the current article.  You can, for instance, ask Gnus to
18652 lower or increase the score of all articles with a certain subject.
18653
18654 There are two sorts of scoring entries: Permanent and temporary.
18655 Temporary score entries are self-expiring entries.  Any entries that are
18656 temporary and have not been used for, say, a week, will be removed
18657 silently to help keep the sizes of the score files down.
18658
18659 @menu
18660 * Summary Score Commands::      Adding score entries for the current group.
18661 * Group Score Commands::        General score commands.
18662 * Score Variables::             Customize your scoring.  (My, what terminology).
18663 * Score File Format::           What a score file may contain.
18664 * Score File Editing::          You can edit score files by hand as well.
18665 * Adaptive Scoring::            Big Sister Gnus knows what you read.
18666 * Home Score File::             How to say where new score entries are to go.
18667 * Followups To Yourself::       Having Gnus notice when people answer you.
18668 * Scoring On Other Headers::    Scoring on non-standard headers.
18669 * Scoring Tips::                How to score effectively.
18670 * Reverse Scoring::             That problem child of old is not problem.
18671 * Global Score Files::          Earth-spanning, ear-splitting score files.
18672 * Kill Files::                  They are still here, but they can be ignored.
18673 * Converting Kill Files::       Translating kill files to score files.
18674 * Advanced Scoring::            Using logical expressions to build score rules.
18675 * Score Decays::                It can be useful to let scores wither away.
18676 @end menu
18677
18678
18679 @node Summary Score Commands
18680 @section Summary Score Commands
18681 @cindex score commands
18682
18683 The score commands that alter score entries do not actually modify real
18684 score files.  That would be too inefficient.  Gnus maintains a cache of
18685 previously loaded score files, one of which is considered the
18686 @dfn{current score file alist}.  The score commands simply insert
18687 entries into this list, and upon group exit, this list is saved.
18688
18689 The current score file is by default the group's local score file, even
18690 if no such score file actually exists.  To insert score commands into
18691 some other score file (e.g. @file{all.SCORE}), you must first make this
18692 score file the current one.
18693
18694 General score commands that don't actually change the score file:
18695
18696 @table @kbd
18697
18698 @item V s
18699 @kindex V s (Summary)
18700 @findex gnus-summary-set-score
18701 Set the score of the current article (@code{gnus-summary-set-score}).
18702
18703 @item V S
18704 @kindex V S (Summary)
18705 @findex gnus-summary-current-score
18706 Display the score of the current article
18707 (@code{gnus-summary-current-score}).
18708
18709 @item V t
18710 @kindex V t (Summary)
18711 @findex gnus-score-find-trace
18712 Display all score rules that have been used on the current article
18713 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
18714 may type @kbd{e} to edit score file corresponding to the score rule on
18715 current line and @kbd{f} to format (@code{gnus-score-pretty-print}) the
18716 score file and edit it.
18717
18718 @item V w
18719 @kindex V w (Summary)
18720 @findex gnus-score-find-favourite-words
18721 List words used in scoring (@code{gnus-score-find-favourite-words}).
18722
18723 @item V R
18724 @kindex V R (Summary)
18725 @findex gnus-summary-rescore
18726 Run the current summary through the scoring process
18727 (@code{gnus-summary-rescore}).  This might be useful if you're playing
18728 around with your score files behind Gnus' back and want to see the
18729 effect you're having.
18730
18731 @item V c
18732 @kindex V c (Summary)
18733 @findex gnus-score-change-score-file
18734 Make a different score file the current
18735 (@code{gnus-score-change-score-file}).
18736
18737 @item V e
18738 @kindex V e (Summary)
18739 @findex gnus-score-edit-current-scores
18740 Edit the current score file (@code{gnus-score-edit-current-scores}).
18741 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
18742 File Editing}).
18743
18744 @item V f
18745 @kindex V f (Summary)
18746 @findex gnus-score-edit-file
18747 Edit a score file and make this score file the current one
18748 (@code{gnus-score-edit-file}).
18749
18750 @item V F
18751 @kindex V F (Summary)
18752 @findex gnus-score-flush-cache
18753 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
18754 after editing score files.
18755
18756 @item V C
18757 @kindex V C (Summary)
18758 @findex gnus-score-customize
18759 Customize a score file in a visually pleasing manner
18760 (@code{gnus-score-customize}).
18761
18762 @end table
18763
18764 The rest of these commands modify the local score file.
18765
18766 @table @kbd
18767
18768 @item V m
18769 @kindex V m (Summary)
18770 @findex gnus-score-set-mark-below
18771 Prompt for a score, and mark all articles with a score below this as
18772 read (@code{gnus-score-set-mark-below}).
18773
18774 @item V x
18775 @kindex V x (Summary)
18776 @findex gnus-score-set-expunge-below
18777 Prompt for a score, and add a score rule to the current score file to
18778 expunge all articles below this score
18779 (@code{gnus-score-set-expunge-below}).
18780 @end table
18781
18782 The keystrokes for actually making score entries follow a very regular
18783 pattern, so there's no need to list all the commands.  (Hundreds of
18784 them.)
18785
18786 @findex gnus-summary-increase-score
18787 @findex gnus-summary-lower-score
18788
18789 @enumerate
18790 @item
18791 The first key is either @kbd{I} (upper case i) for increasing the score
18792 or @kbd{L} for lowering the score.
18793 @item
18794 The second key says what header you want to score on.  The following
18795 keys are available:
18796 @table @kbd
18797
18798 @item a
18799 Score on the author name.
18800
18801 @item s
18802 Score on the subject line.
18803
18804 @item x
18805 Score on the @code{Xref} line---i.e., the cross-posting line.
18806
18807 @item r
18808 Score on the @code{References} line.
18809
18810 @item d
18811 Score on the date.
18812
18813 @item l
18814 Score on the number of lines.
18815
18816 @item i
18817 Score on the @code{Message-ID} header.
18818
18819 @item e
18820 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
18821 if your @acronym{NNTP} server tracks additional header data in overviews.
18822
18823 @item f
18824 Score on followups---this matches the author name, and adds scores to
18825 the followups to this author.  (Using this key leads to the creation of
18826 @file{ADAPT} files.)
18827
18828 @item b
18829 Score on the body.
18830
18831 @item h
18832 Score on the head.
18833
18834 @item t
18835 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
18836 files.)
18837
18838 @end table
18839
18840 @item
18841 The third key is the match type.  Which match types are valid depends on
18842 what headers you are scoring on.
18843
18844 @table @code
18845
18846 @item strings
18847
18848 @table @kbd
18849
18850 @item e
18851 Exact matching.
18852
18853 @item s
18854 Substring matching.
18855
18856 @item f
18857 Fuzzy matching (@pxref{Fuzzy Matching}).
18858
18859 @item r
18860 Regexp matching
18861 @end table
18862
18863 @item date
18864 @table @kbd
18865
18866 @item b
18867 Before date.
18868
18869 @item a
18870 After date.
18871
18872 @item n
18873 This date.
18874 @end table
18875
18876 @item number
18877 @table @kbd
18878
18879 @item <
18880 Less than number.
18881
18882 @item =
18883 Equal to number.
18884
18885 @item >
18886 Greater than number.
18887 @end table
18888 @end table
18889
18890 @item
18891 The fourth and usually final key says whether this is a temporary (i.e.,
18892 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
18893 or whether it is to be done immediately, without adding to the score
18894 file.
18895 @table @kbd
18896
18897 @item t
18898 Temporary score entry.
18899
18900 @item p
18901 Permanent score entry.
18902
18903 @item i
18904 Immediately scoring.
18905 @end table
18906
18907 @item
18908 If you are scoring on `e' (extra) headers, you will then be prompted for
18909 the header name on which you wish to score.  This must be a header named
18910 in gnus-extra-headers, and @samp{TAB} completion is available.
18911
18912 @end enumerate
18913
18914 So, let's say you want to increase the score on the current author with
18915 exact matching permanently: @kbd{I a e p}.  If you want to lower the
18916 score based on the subject line, using substring matching, and make a
18917 temporary score entry: @kbd{L s s t}.  Pretty easy.
18918
18919 To make things a bit more complicated, there are shortcuts.  If you use
18920 a capital letter on either the second or third keys, Gnus will use
18921 defaults for the remaining one or two keystrokes.  The defaults are
18922 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
18923 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
18924
18925 These functions take both the numerical prefix and the symbolic prefix
18926 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
18927 (or increase) the score of the article.  A symbolic prefix of @code{a}
18928 says to use the @file{all.SCORE} file for the command instead of the
18929 current score file.
18930
18931 @vindex gnus-score-mimic-keymap
18932 The @code{gnus-score-mimic-keymap} says whether these commands will
18933 pretend they are keymaps or not.
18934
18935
18936 @node Group Score Commands
18937 @section Group Score Commands
18938 @cindex group score commands
18939
18940 There aren't many of these as yet, I'm afraid.
18941
18942 @table @kbd
18943
18944 @item W e
18945 @kindex W e (Group)
18946 @findex gnus-score-edit-all-score
18947 Edit the apply-to-all-groups all.SCORE file.  You will be popped into
18948 a @code{gnus-score-mode} buffer (@pxref{Score File Editing}).
18949
18950 @item W f
18951 @kindex W f (Group)
18952 @findex gnus-score-flush-cache
18953 Gnus maintains a cache of score alists to avoid having to reload them
18954 all the time.  This command will flush the cache
18955 (@code{gnus-score-flush-cache}).
18956
18957 @end table
18958
18959 You can do scoring from the command line by saying something like:
18960
18961 @findex gnus-batch-score
18962 @cindex batch scoring
18963 @example
18964 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
18965 @end example
18966
18967
18968 @node Score Variables
18969 @section Score Variables
18970 @cindex score variables
18971
18972 @table @code
18973
18974 @item gnus-use-scoring
18975 @vindex gnus-use-scoring
18976 If @code{nil}, Gnus will not check for score files, and will not, in
18977 general, do any score-related work.  This is @code{t} by default.
18978
18979 @item gnus-kill-killed
18980 @vindex gnus-kill-killed
18981 If this variable is @code{nil}, Gnus will never apply score files to
18982 articles that have already been through the kill process.  While this
18983 may save you lots of time, it also means that if you apply a kill file
18984 to a group, and then change the kill file and want to run it over you
18985 group again to kill more articles, it won't work.  You have to set this
18986 variable to @code{t} to do that.  (It is @code{t} by default.)
18987
18988 @item gnus-kill-files-directory
18989 @vindex gnus-kill-files-directory
18990 All kill and score files will be stored in this directory, which is
18991 initialized from the @env{SAVEDIR} environment variable by default.
18992 This is @file{~/News/} by default.
18993
18994 @item gnus-score-file-suffix
18995 @vindex gnus-score-file-suffix
18996 Suffix to add to the group name to arrive at the score file name
18997 (@file{SCORE} by default.)
18998
18999 @item gnus-score-uncacheable-files
19000 @vindex gnus-score-uncacheable-files
19001 @cindex score cache
19002 All score files are normally cached to avoid excessive re-loading of
19003 score files.  However, if this might make your Emacs grow big and
19004 bloated, so this regexp can be used to weed out score files unlikely
19005 to be needed again.  It would be a bad idea to deny caching of
19006 @file{all.SCORE}, while it might be a good idea to not cache
19007 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
19008 variable is @samp{ADAPT$} by default, so no adaptive score files will
19009 be cached.
19010
19011 @item gnus-save-score
19012 @vindex gnus-save-score
19013 If you have really complicated score files, and do lots of batch
19014 scoring, then you might set this variable to @code{t}.  This will make
19015 Gnus save the scores into the @file{.newsrc.eld} file.
19016
19017 If you do not set this to @code{t}, then manual scores (like those set
19018 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
19019 across group visits.
19020
19021 @item gnus-score-interactive-default-score
19022 @vindex gnus-score-interactive-default-score
19023 Score used by all the interactive raise/lower commands to raise/lower
19024 score with.  Default is 1000, which may seem excessive, but this is to
19025 ensure that the adaptive scoring scheme gets enough room to play with.
19026 We don't want the small changes from the adaptive scoring to overwrite
19027 manually entered data.
19028
19029 @item gnus-summary-default-score
19030 @vindex gnus-summary-default-score
19031 Default score of an article, which is 0 by default.
19032
19033 @item gnus-summary-expunge-below
19034 @vindex gnus-summary-expunge-below
19035 Don't display the summary lines of articles that have scores lower than
19036 this variable.  This is @code{nil} by default, which means that no
19037 articles will be hidden.  This variable is local to the summary buffers,
19038 and has to be set from @code{gnus-summary-mode-hook}.
19039
19040 @item gnus-score-over-mark
19041 @vindex gnus-score-over-mark
19042 Mark (in the third column) used for articles with a score over the
19043 default.  Default is @samp{+}.
19044
19045 @item gnus-score-below-mark
19046 @vindex gnus-score-below-mark
19047 Mark (in the third column) used for articles with a score below the
19048 default.  Default is @samp{-}.
19049
19050 @item gnus-score-find-score-files-function
19051 @vindex gnus-score-find-score-files-function
19052 Function used to find score files for the current group.  This function
19053 is called with the name of the group as the argument.
19054
19055 Predefined functions available are:
19056 @table @code
19057
19058 @item gnus-score-find-single
19059 @findex gnus-score-find-single
19060 Only apply the group's own score file.
19061
19062 @item gnus-score-find-bnews
19063 @findex gnus-score-find-bnews
19064 Apply all score files that match, using bnews syntax.  This is the
19065 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
19066 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
19067 @file{gnu.all.SCORE} would all apply.  In short, the instances of
19068 @samp{all} in the score file names are translated into @samp{.*}, and
19069 then a regexp match is done.
19070
19071 This means that if you have some score entries that you want to apply to
19072 all groups, then you put those entries in the @file{all.SCORE} file.
19073
19074 The score files are applied in a semi-random order, although Gnus will
19075 try to apply the more general score files before the more specific score
19076 files.  It does this by looking at the number of elements in the score
19077 file names---discarding the @samp{all} elements.
19078
19079 @item gnus-score-find-hierarchical
19080 @findex gnus-score-find-hierarchical
19081 Apply all score files from all the parent groups.  This means that you
19082 can't have score files like @file{all.SCORE}, but you can have
19083 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
19084 server.
19085
19086 @end table
19087 This variable can also be a list of functions.  In that case, all
19088 these functions will be called with the group name as argument, and
19089 all the returned lists of score files will be applied.  These
19090 functions can also return lists of lists of score alists directly.  In
19091 that case, the functions that return these non-file score alists
19092 should probably be placed before the ``real'' score file functions, to
19093 ensure that the last score file returned is the local score file.
19094 Phu.
19095
19096 For example, to do hierarchical scoring but use a non-server-specific
19097 overall score file, you could use the value
19098 @example
19099 (list (lambda (group) ("all.SCORE"))
19100       'gnus-score-find-hierarchical)
19101 @end example
19102
19103 @item gnus-score-expiry-days
19104 @vindex gnus-score-expiry-days
19105 This variable says how many days should pass before an unused score file
19106 entry is expired.  If this variable is @code{nil}, no score file entries
19107 are expired.  It's 7 by default.
19108
19109 @item gnus-update-score-entry-dates
19110 @vindex gnus-update-score-entry-dates
19111 If this variable is non-@code{nil}, temporary score entries that have
19112 been triggered (matched) will have their dates updated.  (This is how Gnus
19113 controls expiry---all non-matched-entries will become too old while
19114 matched entries will stay fresh and young.)  However, if you set this
19115 variable to @code{nil}, even matched entries will grow old and will
19116 have to face that oh-so grim reaper.
19117
19118 @item gnus-score-after-write-file-function
19119 @vindex gnus-score-after-write-file-function
19120 Function called with the name of the score file just written.
19121
19122 @item gnus-score-thread-simplify
19123 @vindex gnus-score-thread-simplify
19124 If this variable is non-@code{nil}, article subjects will be
19125 simplified for subject scoring purposes in the same manner as with
19126 threading---according to the current value of
19127 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
19128 @code{substring} or @code{exact} matching, the match will also be
19129 simplified in this manner.
19130
19131 @end table
19132
19133
19134 @node Score File Format
19135 @section Score File Format
19136 @cindex score file format
19137
19138 A score file is an @code{emacs-lisp} file that normally contains just a
19139 single form.  Casual users are not expected to edit these files;
19140 everything can be changed from the summary buffer.
19141
19142 Anyway, if you'd like to dig into it yourself, here's an example:
19143
19144 @lisp
19145 (("from"
19146   ("Lars Ingebrigtsen" -10000)
19147   ("Per Abrahamsen")
19148   ("larsi\\|lmi" -50000 nil R))
19149  ("subject"
19150   ("Ding is Badd" nil 728373))
19151  ("xref"
19152   ("alt.politics" -1000 728372 s))
19153  ("lines"
19154   (2 -100 nil <))
19155  (mark 0)
19156  (expunge -1000)
19157  (mark-and-expunge -10)
19158  (read-only nil)
19159  (orphan -10)
19160  (adapt t)
19161  (files "/hom/larsi/News/gnu.SCORE")
19162  (exclude-files "all.SCORE")
19163  (local (gnus-newsgroup-auto-expire t)
19164         (gnus-summary-make-false-root empty))
19165  (eval (ding)))
19166 @end lisp
19167
19168 This example demonstrates most score file elements.  @xref{Advanced
19169 Scoring}, for a different approach.
19170
19171 Even though this looks much like Lisp code, nothing here is actually
19172 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
19173 has to be valid syntactically, if not semantically.
19174
19175 Six keys are supported by this alist:
19176
19177 @table @code
19178
19179 @item STRING
19180 If the key is a string, it is the name of the header to perform the
19181 match on.  Scoring can only be performed on these eight headers:
19182 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
19183 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
19184 these headers, there are three strings to tell Gnus to fetch the entire
19185 article and do the match on larger parts of the article: @code{Body}
19186 will perform the match on the body of the article, @code{Head} will
19187 perform the match on the head of the article, and @code{All} will
19188 perform the match on the entire article.  Note that using any of these
19189 last three keys will slow down group entry @emph{considerably}.  The
19190 final ``header'' you can score on is @code{Followup}.  These score
19191 entries will result in new score entries being added for all follow-ups
19192 to articles that matches these score entries.
19193
19194 Following this key is an arbitrary number of score entries, where each
19195 score entry has one to four elements.
19196 @enumerate
19197
19198 @item
19199 The first element is the @dfn{match element}.  On most headers this will
19200 be a string, but on the Lines and Chars headers, this must be an
19201 integer.
19202
19203 @item
19204 If the second element is present, it should be a number---the @dfn{score
19205 element}.  This number should be an integer in the neginf to posinf
19206 interval.  This number is added to the score of the article if the match
19207 is successful.  If this element is not present, the
19208 @code{gnus-score-interactive-default-score} number will be used
19209 instead.  This is 1000 by default.
19210
19211 @item
19212 If the third element is present, it should be a number---the @dfn{date
19213 element}.  This date says when the last time this score entry matched,
19214 which provides a mechanism for expiring the score entries.  It this
19215 element is not present, the score entry is permanent.  The date is
19216 represented by the number of days since December 31, 1 BCE.
19217
19218 @item
19219 If the fourth element is present, it should be a symbol---the @dfn{type
19220 element}.  This element specifies what function should be used to see
19221 whether this score entry matches the article.  What match types that can
19222 be used depends on what header you wish to perform the match on.
19223 @table @dfn
19224
19225 @item From, Subject, References, Xref, Message-ID
19226 For most header types, there are the @code{r} and @code{R} (regexp), as
19227 well as @code{s} and @code{S} (substring) types, and @code{e} and
19228 @code{E} (exact match), and @code{w} (word match) types.  If this
19229 element is not present, Gnus will assume that substring matching should
19230 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
19231 that the matches will be done in a case-sensitive manner.  All these
19232 one-letter types are really just abbreviations for the @code{regexp},
19233 @code{string}, @code{exact}, and @code{word} types, which you can use
19234 instead, if you feel like.
19235
19236 @item Extra
19237 Just as for the standard string overview headers, if you are using
19238 gnus-extra-headers, you can score on these headers' values.  In this
19239 case, there is a 5th element in the score entry, being the name of the
19240 header to be scored.  The following entry is useful in your
19241 @file{all.SCORE} file in case of spam attacks from a single origin
19242 host, if your @acronym{NNTP} server tracks @samp{NNTP-Posting-Host} in
19243 overviews:
19244
19245 @lisp
19246 ("111.222.333.444" -1000 nil s
19247  "NNTP-Posting-Host")
19248 @end lisp
19249
19250 @item Lines, Chars
19251 These two headers use different match types: @code{<}, @code{>},
19252 @code{=}, @code{>=} and @code{<=}.
19253
19254 These predicates are true if
19255
19256 @example
19257 (PREDICATE HEADER MATCH)
19258 @end example
19259
19260 evaluates to non-@code{nil}.  For instance, the advanced match
19261 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
19262 following form:
19263
19264 @lisp
19265 (< header-value 4)
19266 @end lisp
19267
19268 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
19269 the match, we get the score added if the article has less than 4 lines.
19270 (It's easy to get confused and think it's the other way around.  But
19271 it's not.  I think.)
19272
19273 When matching on @code{Lines}, be careful because some back ends (like
19274 @code{nndir}) do not generate @code{Lines} header, so every article ends
19275 up being marked as having 0 lines.  This can lead to strange results if
19276 you happen to lower score of the articles with few lines.
19277
19278 @item Date
19279 For the Date header we have three kinda silly match types:
19280 @code{before}, @code{at} and @code{after}.  I can't really imagine this
19281 ever being useful, but, like, it would feel kinda silly not to provide
19282 this function.  Just in case.  You never know.  Better safe than sorry.
19283 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
19284 sex on a first date.  (I have been told that at least one person, and I
19285 quote, ``found this function indispensable'', however.)
19286
19287 @cindex ISO8601
19288 @cindex date
19289 A more useful match type is @code{regexp}.  With it, you can match the
19290 date string using a regular expression.  The date is normalized to
19291 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
19292 you want to match all articles that have been posted on April 1st in
19293 every year, you could use @samp{....0401.........} as a match string,
19294 for instance.  (Note that the date is kept in its original time zone, so
19295 this will match articles that were posted when it was April 1st where
19296 the article was posted from.  Time zones are such wholesome fun for the
19297 whole family, eh?)
19298
19299 @item Head, Body, All
19300 These three match keys use the same match types as the @code{From} (etc)
19301 header uses.
19302
19303 @item Followup
19304 This match key is somewhat special, in that it will match the
19305 @code{From} header, and affect the score of not only the matching
19306 articles, but also all followups to the matching articles.  This allows
19307 you e.g. increase the score of followups to your own articles, or
19308 decrease the score of followups to the articles of some known
19309 trouble-maker.  Uses the same match types as the @code{From} header
19310 uses.  (Using this match key will lead to creation of @file{ADAPT}
19311 files.)
19312
19313 @item Thread
19314 This match key works along the same lines as the @code{Followup} match
19315 key.  If you say that you want to score on a (sub-)thread started by an
19316 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
19317 match.  This will add a new @samp{thread} match for each article that
19318 has @var{x} in its @code{References} header.  (These new @samp{thread}
19319 matches will use the @code{Message-ID}s of these matching articles.)
19320 This will ensure that you can raise/lower the score of an entire thread,
19321 even though some articles in the thread may not have complete
19322 @code{References} headers.  Note that using this may lead to
19323 undeterministic scores of the articles in the thread.  (Using this match
19324 key will lead to creation of @file{ADAPT} files.)
19325 @end table
19326 @end enumerate
19327
19328 @cindex score file atoms
19329 @item mark
19330 The value of this entry should be a number.  Any articles with a score
19331 lower than this number will be marked as read.
19332
19333 @item expunge
19334 The value of this entry should be a number.  Any articles with a score
19335 lower than this number will be removed from the summary buffer.
19336
19337 @item mark-and-expunge
19338 The value of this entry should be a number.  Any articles with a score
19339 lower than this number will be marked as read and removed from the
19340 summary buffer.
19341
19342 @item thread-mark-and-expunge
19343 The value of this entry should be a number.  All articles that belong to
19344 a thread that has a total score below this number will be marked as read
19345 and removed from the summary buffer.  @code{gnus-thread-score-function}
19346 says how to compute the total score for a thread.
19347
19348 @item files
19349 The value of this entry should be any number of file names.  These files
19350 are assumed to be score files as well, and will be loaded the same way
19351 this one was.
19352
19353 @item exclude-files
19354 The clue of this entry should be any number of files.  These files will
19355 not be loaded, even though they would normally be so, for some reason or
19356 other.
19357
19358 @item eval
19359 The value of this entry will be @code{eval}el.  This element will be
19360 ignored when handling global score files.
19361
19362 @item read-only
19363 Read-only score files will not be updated or saved.  Global score files
19364 should feature this atom (@pxref{Global Score Files}).  (Note:
19365 @dfn{Global} here really means @dfn{global}; not your personal
19366 apply-to-all-groups score files.)
19367
19368 @item orphan
19369 The value of this entry should be a number.  Articles that do not have
19370 parents will get this number added to their scores.  Imagine you follow
19371 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
19372 will only follow a few of the threads, also want to see any new threads.
19373
19374 You can do this with the following two score file entries:
19375
19376 @example
19377         (orphan -500)
19378         (mark-and-expunge -100)
19379 @end example
19380
19381 When you enter the group the first time, you will only see the new
19382 threads.  You then raise the score of the threads that you find
19383 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
19384 rest.  Next time you enter the group, you will see new articles in the
19385 interesting threads, plus any new threads.
19386
19387 I.e.---the orphan score atom is for high-volume groups where a few
19388 interesting threads which can't be found automatically by ordinary
19389 scoring rules exist.
19390
19391 @item adapt
19392 This entry controls the adaptive scoring.  If it is @code{t}, the
19393 default adaptive scoring rules will be used.  If it is @code{ignore}, no
19394 adaptive scoring will be performed on this group.  If it is a list, this
19395 list will be used as the adaptive scoring rules.  If it isn't present,
19396 or is something other than @code{t} or @code{ignore}, the default
19397 adaptive scoring rules will be used.  If you want to use adaptive
19398 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
19399 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
19400 not want adaptive scoring.  If you only want adaptive scoring in a few
19401 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
19402 insert @code{(adapt t)} in the score files of the groups where you want
19403 it.
19404
19405 @item adapt-file
19406 All adaptive score entries will go to the file named by this entry.  It
19407 will also be applied when entering the group.  This atom might be handy
19408 if you want to adapt on several groups at once, using the same adaptive
19409 file for a number of groups.
19410
19411 @item local
19412 @cindex local variables
19413 The value of this entry should be a list of @code{(@var{var}
19414 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
19415 current summary buffer, and set to the value specified.  This is a
19416 convenient, if somewhat strange, way of setting variables in some
19417 groups if you don't like hooks much.  Note that the @var{value} won't
19418 be evaluated.
19419 @end table
19420
19421
19422 @node Score File Editing
19423 @section Score File Editing
19424
19425 You normally enter all scoring commands from the summary buffer, but you
19426 might feel the urge to edit them by hand as well, so we've supplied you
19427 with a mode for that.
19428
19429 It's simply a slightly customized @code{emacs-lisp} mode, with these
19430 additional commands:
19431
19432 @table @kbd
19433
19434 @item C-c C-c
19435 @kindex C-c C-c (Score)
19436 @findex gnus-score-edit-done
19437 Save the changes you have made and return to the summary buffer
19438 (@code{gnus-score-edit-done}).
19439
19440 @item C-c C-d
19441 @kindex C-c C-d (Score)
19442 @findex gnus-score-edit-insert-date
19443 Insert the current date in numerical format
19444 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
19445 you were wondering.
19446
19447 @item C-c C-p
19448 @kindex C-c C-p (Score)
19449 @findex gnus-score-pretty-print
19450 The adaptive score files are saved in an unformatted fashion.  If you
19451 intend to read one of these files, you want to @dfn{pretty print} it
19452 first.  This command (@code{gnus-score-pretty-print}) does that for
19453 you.
19454
19455 @end table
19456
19457 Type @kbd{M-x gnus-score-mode} to use this mode.
19458
19459 @vindex gnus-score-mode-hook
19460 @code{gnus-score-menu-hook} is run in score mode buffers.
19461
19462 In the summary buffer you can use commands like @kbd{V f}, @kbd{V e} and
19463 @kbd{V t} to begin editing score files.
19464
19465
19466 @node Adaptive Scoring
19467 @section Adaptive Scoring
19468 @cindex adaptive scoring
19469
19470 If all this scoring is getting you down, Gnus has a way of making it all
19471 happen automatically---as if by magic.  Or rather, as if by artificial
19472 stupidity, to be precise.
19473
19474 @vindex gnus-use-adaptive-scoring
19475 When you read an article, or mark an article as read, or kill an
19476 article, you leave marks behind.  On exit from the group, Gnus can sniff
19477 these marks and add score elements depending on what marks it finds.
19478 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
19479 @code{t} or @code{(line)}.  If you want score adaptively on separate
19480 words appearing in the subjects, you should set this variable to
19481 @code{(word)}.  If you want to use both adaptive methods, set this
19482 variable to @code{(word line)}.
19483
19484 @vindex gnus-default-adaptive-score-alist
19485 To give you complete control over the scoring process, you can customize
19486 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
19487 might look something like this:
19488
19489 @lisp
19490 (setq gnus-default-adaptive-score-alist
19491   '((gnus-unread-mark)
19492     (gnus-ticked-mark (from 4))
19493     (gnus-dormant-mark (from 5))
19494     (gnus-del-mark (from -4) (subject -1))
19495     (gnus-read-mark (from 4) (subject 2))
19496     (gnus-expirable-mark (from -1) (subject -1))
19497     (gnus-killed-mark (from -1) (subject -3))
19498     (gnus-kill-file-mark)
19499     (gnus-ancient-mark)
19500     (gnus-low-score-mark)
19501     (gnus-catchup-mark (from -1) (subject -1))))
19502 @end lisp
19503
19504 As you see, each element in this alist has a mark as a key (either a
19505 variable name or a ``real'' mark---a character).  Following this key is
19506 a arbitrary number of header/score pairs.  If there are no header/score
19507 pairs following the key, no adaptive scoring will be done on articles
19508 that have that key as the article mark.  For instance, articles with
19509 @code{gnus-unread-mark} in the example above will not get adaptive score
19510 entries.
19511
19512 Each article can have only one mark, so just a single of these rules
19513 will be applied to each article.
19514
19515 To take @code{gnus-del-mark} as an example---this alist says that all
19516 articles that have that mark (i.e., are marked with @samp{e}) will have a
19517 score entry added to lower based on the @code{From} header by -4, and
19518 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
19519
19520 If you have marked 10 articles with the same subject with
19521 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
19522 That means that that subject will get a score of ten times -1, which
19523 should be, unless I'm much mistaken, -10.
19524
19525 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
19526 the read articles will be marked with the @samp{E} mark.  This'll
19527 probably make adaptive scoring slightly impossible, so auto-expiring and
19528 adaptive scoring doesn't really mix very well.
19529
19530 The headers you can score on are @code{from}, @code{subject},
19531 @code{message-id}, @code{references}, @code{xref}, @code{lines},
19532 @code{chars} and @code{date}.  In addition, you can score on
19533 @code{followup}, which will create an adaptive score entry that matches
19534 on the @code{References} header using the @code{Message-ID} of the
19535 current article, thereby matching the following thread.
19536
19537 If you use this scheme, you should set the score file atom @code{mark}
19538 to something small---like -300, perhaps, to avoid having small random
19539 changes result in articles getting marked as read.
19540
19541 After using adaptive scoring for a week or so, Gnus should start to
19542 become properly trained and enhance the authors you like best, and kill
19543 the authors you like least, without you having to say so explicitly.
19544
19545 You can control what groups the adaptive scoring is to be performed on
19546 by using the score files (@pxref{Score File Format}).  This will also
19547 let you use different rules in different groups.
19548
19549 @vindex gnus-adaptive-file-suffix
19550 The adaptive score entries will be put into a file where the name is the
19551 group name with @code{gnus-adaptive-file-suffix} appended.  The default
19552 is @file{ADAPT}.
19553
19554 @vindex gnus-score-exact-adapt-limit
19555 When doing adaptive scoring, substring or fuzzy matching would probably
19556 give you the best results in most cases.  However, if the header one
19557 matches is short, the possibility for false positives is great, so if
19558 the length of the match is less than
19559 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
19560 this variable is @code{nil}, exact matching will always be used to avoid
19561 this problem.
19562
19563 @vindex gnus-default-adaptive-word-score-alist
19564 As mentioned above, you can adapt either on individual words or entire
19565 headers.  If you adapt on words, the
19566 @code{gnus-default-adaptive-word-score-alist} variable says what score
19567 each instance of a word should add given a mark.
19568
19569 @lisp
19570 (setq gnus-default-adaptive-word-score-alist
19571       `((,gnus-read-mark . 30)
19572         (,gnus-catchup-mark . -10)
19573         (,gnus-killed-mark . -20)
19574         (,gnus-del-mark . -15)))
19575 @end lisp
19576
19577 This is the default value.  If you have adaption on words enabled, every
19578 word that appears in subjects of articles marked with
19579 @code{gnus-read-mark} will result in a score rule that increase the
19580 score with 30 points.
19581
19582 @vindex gnus-default-ignored-adaptive-words
19583 @vindex gnus-ignored-adaptive-words
19584 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
19585 will be ignored.  If you wish to add more words to be ignored, use the
19586 @code{gnus-ignored-adaptive-words} list instead.
19587
19588 @vindex gnus-adaptive-word-length-limit
19589 Some may feel that short words shouldn't count when doing adaptive
19590 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
19591 an integer.  Words shorter than this number will be ignored.  This
19592 variable defaults to @code{nil}.
19593
19594 @vindex gnus-adaptive-word-syntax-table
19595 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
19596 syntax table in effect.  It is similar to the standard syntax table, but
19597 it considers numbers to be non-word-constituent characters.
19598
19599 @vindex gnus-adaptive-word-minimum
19600 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
19601 word scoring process will never bring down the score of an article to
19602 below this number.  The default is @code{nil}.
19603
19604 @vindex gnus-adaptive-word-no-group-words
19605 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
19606 won't adaptively word score any of the words in the group name.  Useful
19607 for groups like @samp{comp.editors.emacs}, where most of the subject
19608 lines contain the word @samp{emacs}.
19609
19610 After using this scheme for a while, it might be nice to write a
19611 @code{gnus-psychoanalyze-user} command to go through the rules and see
19612 what words you like and what words you don't like.  Or perhaps not.
19613
19614 Note that the adaptive word scoring thing is highly experimental and is
19615 likely to change in the future.  Initial impressions seem to indicate
19616 that it's totally useless as it stands.  Some more work (involving more
19617 rigorous statistical methods) will have to be done to make this useful.
19618
19619
19620 @node Home Score File
19621 @section Home Score File
19622
19623 The score file where new score file entries will go is called the
19624 @dfn{home score file}.  This is normally (and by default) the score file
19625 for the group itself.  For instance, the home score file for
19626 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
19627
19628 However, this may not be what you want.  It is often convenient to share
19629 a common home score file among many groups---all @samp{emacs} groups
19630 could perhaps use the same home score file.
19631
19632 @vindex gnus-home-score-file
19633 The variable that controls this is @code{gnus-home-score-file}.  It can
19634 be:
19635
19636 @enumerate
19637 @item
19638 A string.  Then this file will be used as the home score file for all
19639 groups.
19640
19641 @item
19642 A function.  The result of this function will be used as the home score
19643 file.  The function will be called with the name of the group as the
19644 parameter.
19645
19646 @item
19647 A list.  The elements in this list can be:
19648
19649 @enumerate
19650 @item
19651 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
19652 group name, the @var{file-name} will be used as the home score file.
19653
19654 @item
19655 A function.  If the function returns non-@code{nil}, the result will
19656 be used as the home score file.
19657
19658 @item
19659 A string.  Use the string as the home score file.
19660 @end enumerate
19661
19662 The list will be traversed from the beginning towards the end looking
19663 for matches.
19664
19665 @end enumerate
19666
19667 So, if you want to use just a single score file, you could say:
19668
19669 @lisp
19670 (setq gnus-home-score-file
19671       "my-total-score-file.SCORE")
19672 @end lisp
19673
19674 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
19675 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
19676
19677 @findex gnus-hierarchial-home-score-file
19678 @lisp
19679 (setq gnus-home-score-file
19680       'gnus-hierarchial-home-score-file)
19681 @end lisp
19682
19683 This is a ready-made function provided for your convenience.
19684 Other functions include
19685
19686 @table @code
19687 @item gnus-current-home-score-file
19688 @findex gnus-current-home-score-file
19689 Return the ``current'' regular score file.  This will make scoring
19690 commands add entry to the ``innermost'' matching score file.
19691
19692 @end table
19693
19694 If you want to have one score file for the @samp{emacs} groups and
19695 another for the @samp{comp} groups, while letting all other groups use
19696 their own home score files:
19697
19698 @lisp
19699 (setq gnus-home-score-file
19700       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
19701       '(("\\.emacs" "emacs.SCORE")
19702         ;; @r{All the comp groups in one score file}
19703         ("^comp" "comp.SCORE")))
19704 @end lisp
19705
19706 @vindex gnus-home-adapt-file
19707 @code{gnus-home-adapt-file} works exactly the same way as
19708 @code{gnus-home-score-file}, but says what the home adaptive score file
19709 is instead.  All new adaptive file entries will go into the file
19710 specified by this variable, and the same syntax is allowed.
19711
19712 In addition to using @code{gnus-home-score-file} and
19713 @code{gnus-home-adapt-file}, you can also use group parameters
19714 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
19715 Parameters}) to achieve much the same.  Group and topic parameters take
19716 precedence over this variable.
19717
19718
19719 @node Followups To Yourself
19720 @section Followups To Yourself
19721
19722 Gnus offers two commands for picking out the @code{Message-ID} header in
19723 the current buffer.  Gnus will then add a score rule that scores using
19724 this @code{Message-ID} on the @code{References} header of other
19725 articles.  This will, in effect, increase the score of all articles that
19726 respond to the article in the current buffer.  Quite useful if you want
19727 to easily note when people answer what you've said.
19728
19729 @table @code
19730
19731 @item gnus-score-followup-article
19732 @findex gnus-score-followup-article
19733 This will add a score to articles that directly follow up your own
19734 article.
19735
19736 @item gnus-score-followup-thread
19737 @findex gnus-score-followup-thread
19738 This will add a score to all articles that appear in a thread ``below''
19739 your own article.
19740 @end table
19741
19742 @vindex message-sent-hook
19743 These two functions are both primarily meant to be used in hooks like
19744 @code{message-sent-hook}, like this:
19745 @lisp
19746 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
19747 @end lisp
19748
19749
19750 If you look closely at your own @code{Message-ID}, you'll notice that
19751 the first two or three characters are always the same.  Here's two of
19752 mine:
19753
19754 @example
19755 <x6u3u47icf.fsf@@eyesore.no>
19756 <x6sp9o7ibw.fsf@@eyesore.no>
19757 @end example
19758
19759 So ``my'' ident on this machine is @samp{x6}.  This can be
19760 exploited---the following rule will raise the score on all followups to
19761 myself:
19762
19763 @lisp
19764 ("references"
19765  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
19766   1000 nil r))
19767 @end lisp
19768
19769 Whether it's the first two or first three characters that are ``yours''
19770 is system-dependent.
19771
19772
19773 @node Scoring On Other Headers
19774 @section Scoring On Other Headers
19775 @cindex scoring on other headers
19776
19777 Gnus is quite fast when scoring the ``traditional''
19778 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
19779 other headers requires writing a @code{head} scoring rule, which means
19780 that Gnus has to request every single article from the back end to find
19781 matches.  This takes a long time in big groups.
19782
19783 Now, there's not much you can do about this for news groups, but for
19784 mail groups, you have greater control.  In @ref{To From Newsgroups},
19785 it's explained in greater detail what this mechanism does, but here's
19786 a cookbook example for @code{nnml} on how to allow scoring on the
19787 @samp{To} and @samp{Cc} headers.
19788
19789 Put the following in your @file{~/.gnus.el} file.
19790
19791 @lisp
19792 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
19793       nnmail-extra-headers gnus-extra-headers)
19794 @end lisp
19795
19796 Restart Gnus and rebuild your @code{nnml} overview files with the
19797 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
19798 time if you have much mail.
19799
19800 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
19801 so: @kbd{I e s p To RET <your name> RET}.
19802
19803 See?  Simple.
19804
19805
19806 @node Scoring Tips
19807 @section Scoring Tips
19808 @cindex scoring tips
19809
19810 @table @dfn
19811
19812 @item Crossposts
19813 @cindex crossposts
19814 @cindex scoring crossposts
19815 If you want to lower the score of crossposts, the line to match on is
19816 the @code{Xref} header.
19817 @lisp
19818 ("xref" (" talk.politics.misc:" -1000))
19819 @end lisp
19820
19821 @item Multiple crossposts
19822 If you want to lower the score of articles that have been crossposted to
19823 more than, say, 3 groups:
19824 @lisp
19825 ("xref"
19826   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
19827    -1000 nil r))
19828 @end lisp
19829
19830 @item Matching on the body
19831 This is generally not a very good idea---it takes a very long time.
19832 Gnus actually has to fetch each individual article from the server.  But
19833 you might want to anyway, I guess.  Even though there are three match
19834 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
19835 and stick with it in each score file.  If you use any two, each article
19836 will be fetched @emph{twice}.  If you want to match a bit on the
19837 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
19838 the matches.
19839
19840 @item Marking as read
19841 You will probably want to mark articles that have scores below a certain
19842 number as read.  This is most easily achieved by putting the following
19843 in your @file{all.SCORE} file:
19844 @lisp
19845 ((mark -100))
19846 @end lisp
19847 You may also consider doing something similar with @code{expunge}.
19848
19849 @item Negated character classes
19850 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
19851 That will match newlines, which might lead to, well, The Unknown.  Say
19852 @code{[^abcd\n]*} instead.
19853 @end table
19854
19855
19856 @node Reverse Scoring
19857 @section Reverse Scoring
19858 @cindex reverse scoring
19859
19860 If you want to keep just articles that have @samp{Sex with Emacs} in the
19861 subject header, and expunge all other articles, you could put something
19862 like this in your score file:
19863
19864 @lisp
19865 (("subject"
19866   ("Sex with Emacs" 2))
19867  (mark 1)
19868  (expunge 1))
19869 @end lisp
19870
19871 So, you raise all articles that match @samp{Sex with Emacs} and mark the
19872 rest as read, and expunge them to boot.
19873
19874
19875 @node Global Score Files
19876 @section Global Score Files
19877 @cindex global score files
19878
19879 Sure, other newsreaders have ``global kill files''.  These are usually
19880 nothing more than a single kill file that applies to all groups, stored
19881 in the user's home directory.  Bah!  Puny, weak newsreaders!
19882
19883 What I'm talking about here are Global Score Files.  Score files from
19884 all over the world, from users everywhere, uniting all nations in one
19885 big, happy score file union!  Ange-score!  New and untested!
19886
19887 @vindex gnus-global-score-files
19888 All you have to do to use other people's score files is to set the
19889 @code{gnus-global-score-files} variable.  One entry for each score file,
19890 or each score file directory.  Gnus will decide by itself what score
19891 files are applicable to which group.
19892
19893 To use the score file
19894 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
19895 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
19896 say this:
19897
19898 @lisp
19899 (setq gnus-global-score-files
19900       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
19901         "/ftp@@ftp.some-where:/pub/score/"))
19902 @end lisp
19903
19904 @findex gnus-score-search-global-directories
19905 @noindent
19906 Simple, eh?  Directory names must end with a @samp{/}.  These
19907 directories are typically scanned only once during each Gnus session.
19908 If you feel the need to manually re-scan the remote directories, you can
19909 use the @code{gnus-score-search-global-directories} command.
19910
19911 Note that, at present, using this option will slow down group entry
19912 somewhat.  (That is---a lot.)
19913
19914 If you want to start maintaining score files for other people to use,
19915 just put your score file up for anonymous ftp and announce it to the
19916 world.  Become a retro-moderator!  Participate in the retro-moderator
19917 wars sure to ensue, where retro-moderators battle it out for the
19918 sympathy of the people, luring them to use their score files on false
19919 premises!  Yay!  The net is saved!
19920
19921 Here are some tips for the would-be retro-moderator, off the top of my
19922 head:
19923
19924 @itemize @bullet
19925
19926 @item
19927 Articles heavily crossposted are probably junk.
19928 @item
19929 To lower a single inappropriate article, lower by @code{Message-ID}.
19930 @item
19931 Particularly brilliant authors can be raised on a permanent basis.
19932 @item
19933 Authors that repeatedly post off-charter for the group can safely be
19934 lowered out of existence.
19935 @item
19936 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
19937 articles completely.
19938
19939 @item
19940 Use expiring score entries to keep the size of the file down.  You
19941 should probably have a long expiry period, though, as some sites keep
19942 old articles for a long time.
19943 @end itemize
19944
19945 @dots{} I wonder whether other newsreaders will support global score files
19946 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
19947 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
19948 holding our breath yet?
19949
19950
19951 @node Kill Files
19952 @section Kill Files
19953 @cindex kill files
19954
19955 Gnus still supports those pesky old kill files.  In fact, the kill file
19956 entries can now be expiring, which is something I wrote before Daniel
19957 Quinlan thought of doing score files, so I've left the code in there.
19958
19959 In short, kill processing is a lot slower (and I do mean @emph{a lot})
19960 than score processing, so it might be a good idea to rewrite your kill
19961 files into score files.
19962
19963 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
19964 forms into this file, which means that you can use kill files as some
19965 sort of primitive hook function to be run on group entry, even though
19966 that isn't a very good idea.
19967
19968 Normal kill files look like this:
19969
19970 @lisp
19971 (gnus-kill "From" "Lars Ingebrigtsen")
19972 (gnus-kill "Subject" "ding")
19973 (gnus-expunge "X")
19974 @end lisp
19975
19976 This will mark every article written by me as read, and remove the
19977 marked articles from the summary buffer.  Very useful, you'll agree.
19978
19979 Other programs use a totally different kill file syntax.  If Gnus
19980 encounters what looks like a @code{rn} kill file, it will take a stab at
19981 interpreting it.
19982
19983 Two summary functions for editing a @sc{gnus} kill file:
19984
19985 @table @kbd
19986
19987 @item M-k
19988 @kindex M-k (Summary)
19989 @findex gnus-summary-edit-local-kill
19990 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
19991
19992 @item M-K
19993 @kindex M-K (Summary)
19994 @findex gnus-summary-edit-global-kill
19995 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
19996 @end table
19997
19998 Two group mode functions for editing the kill files:
19999
20000 @table @kbd
20001
20002 @item M-k
20003 @kindex M-k (Group)
20004 @findex gnus-group-edit-local-kill
20005 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
20006
20007 @item M-K
20008 @kindex M-K (Group)
20009 @findex gnus-group-edit-global-kill
20010 Edit the general kill file (@code{gnus-group-edit-global-kill}).
20011 @end table
20012
20013 Kill file variables:
20014
20015 @table @code
20016 @item gnus-kill-file-name
20017 @vindex gnus-kill-file-name
20018 A kill file for the group @samp{soc.motss} is normally called
20019 @file{soc.motss.KILL}.  The suffix appended to the group name to get
20020 this file name is detailed by the @code{gnus-kill-file-name} variable.
20021 The ``global'' kill file (not in the score file sense of ``global'', of
20022 course) is just called @file{KILL}.
20023
20024 @vindex gnus-kill-save-kill-file
20025 @item gnus-kill-save-kill-file
20026 If this variable is non-@code{nil}, Gnus will save the
20027 kill file after processing, which is necessary if you use expiring
20028 kills.
20029
20030 @item gnus-apply-kill-hook
20031 @vindex gnus-apply-kill-hook
20032 @findex gnus-apply-kill-file-unless-scored
20033 @findex gnus-apply-kill-file
20034 A hook called to apply kill files to a group.  It is
20035 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
20036 kill file if you have a score file for the same group, you can set this
20037 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
20038 kill files to be processed, you should set this variable to @code{nil}.
20039
20040 @item gnus-kill-file-mode-hook
20041 @vindex gnus-kill-file-mode-hook
20042 A hook called in kill-file mode buffers.
20043
20044 @end table
20045
20046
20047 @node Converting Kill Files
20048 @section Converting Kill Files
20049 @cindex kill files
20050 @cindex converting kill files
20051
20052 If you have loads of old kill files, you may want to convert them into
20053 score files.  If they are ``regular'', you can use
20054 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
20055 by hand.
20056
20057 The kill to score conversion package isn't included in Gnus by default.
20058 You can fetch it from
20059 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
20060
20061 If your old kill files are very complex---if they contain more
20062 non-@code{gnus-kill} forms than not, you'll have to convert them by
20063 hand.  Or just let them be as they are.  Gnus will still use them as
20064 before.
20065
20066
20067 @node Advanced Scoring
20068 @section Advanced Scoring
20069
20070 Scoring on Subjects and From headers is nice enough, but what if you're
20071 really interested in what a person has to say only when she's talking
20072 about a particular subject?  Or what if you really don't want to
20073 read what person A has to say when she's following up to person B, but
20074 want to read what she says when she's following up to person C?
20075
20076 By using advanced scoring rules you may create arbitrarily complex
20077 scoring patterns.
20078
20079 @menu
20080 * Advanced Scoring Syntax::     A definition.
20081 * Advanced Scoring Examples::   What they look like.
20082 * Advanced Scoring Tips::       Getting the most out of it.
20083 @end menu
20084
20085
20086 @node Advanced Scoring Syntax
20087 @subsection Advanced Scoring Syntax
20088
20089 Ordinary scoring rules have a string as the first element in the rule.
20090 Advanced scoring rules have a list as the first element.  The second
20091 element is the score to be applied if the first element evaluated to a
20092 non-@code{nil} value.
20093
20094 These lists may consist of three logical operators, one redirection
20095 operator, and various match operators.
20096
20097 Logical operators:
20098
20099 @table @code
20100 @item &
20101 @itemx and
20102 This logical operator will evaluate each of its arguments until it finds
20103 one that evaluates to @code{false}, and then it'll stop.  If all arguments
20104 evaluate to @code{true} values, then this operator will return
20105 @code{true}.
20106
20107 @item |
20108 @itemx or
20109 This logical operator will evaluate each of its arguments until it finds
20110 one that evaluates to @code{true}.  If no arguments are @code{true},
20111 then this operator will return @code{false}.
20112
20113 @item !
20114 @itemx not
20115 @itemx Â¬
20116 This logical operator only takes a single argument.  It returns the
20117 logical negation of the value of its argument.
20118
20119 @end table
20120
20121 There is an @dfn{indirection operator} that will make its arguments
20122 apply to the ancestors of the current article being scored.  For
20123 instance, @code{1-} will make score rules apply to the parent of the
20124 current article.  @code{2-} will make score rules apply to the
20125 grandparent of the current article.  Alternatively, you can write
20126 @code{^^}, where the number of @code{^}s (carets) says how far back into
20127 the ancestry you want to go.
20128
20129 Finally, we have the match operators.  These are the ones that do the
20130 real work.  Match operators are header name strings followed by a match
20131 and a match type.  A typical match operator looks like @samp{("from"
20132 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
20133 simple scoring, and the match types are also the same.
20134
20135
20136 @node Advanced Scoring Examples
20137 @subsection Advanced Scoring Examples
20138
20139 Please note that the following examples are score file rules.  To
20140 make a complete score file from them, surround them with another pair
20141 of parentheses.
20142
20143 Let's say you want to increase the score of articles written by Lars
20144 when he's talking about Gnus:
20145
20146 @example
20147 @group
20148 ((&
20149   ("from" "Lars Ingebrigtsen")
20150   ("subject" "Gnus"))
20151  1000)
20152 @end group
20153 @end example
20154
20155 Quite simple, huh?
20156
20157 When he writes long articles, he sometimes has something nice to say:
20158
20159 @example
20160 ((&
20161   ("from" "Lars Ingebrigtsen")
20162   (|
20163    ("subject" "Gnus")
20164    ("lines" 100 >)))
20165  1000)
20166 @end example
20167
20168 However, when he responds to things written by Reig Eigil Logge, you
20169 really don't want to read what he's written:
20170
20171 @example
20172 ((&
20173   ("from" "Lars Ingebrigtsen")
20174   (1- ("from" "Reig Eigir Logge")))
20175  -100000)
20176 @end example
20177
20178 Everybody that follows up Redmondo when he writes about disappearing
20179 socks should have their scores raised, but only when they talk about
20180 white socks.  However, when Lars talks about socks, it's usually not
20181 very interesting:
20182
20183 @example
20184 ((&
20185   (1-
20186    (&
20187     ("from" "redmondo@@.*no" r)
20188     ("body" "disappearing.*socks" t)))
20189   (! ("from" "Lars Ingebrigtsen"))
20190   ("body" "white.*socks"))
20191  1000)
20192 @end example
20193
20194 The possibilities are endless.
20195
20196
20197 @node Advanced Scoring Tips
20198 @subsection Advanced Scoring Tips
20199
20200 The @code{&} and @code{|} logical operators do short-circuit logic.
20201 That is, they stop processing their arguments when it's clear what the
20202 result of the operation will be.  For instance, if one of the arguments
20203 of an @code{&} evaluates to @code{false}, there's no point in evaluating
20204 the rest of the arguments.  This means that you should put slow matches
20205 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
20206 @samp{subject}) first.
20207
20208 The indirection arguments (@code{1-} and so on) will make their
20209 arguments work on previous generations of the thread.  If you say
20210 something like:
20211
20212 @example
20213 ...
20214 (1-
20215  (1-
20216   ("from" "lars")))
20217 ...
20218 @end example
20219
20220 Then that means "score on the from header of the grandparent of the
20221 current article".  An indirection is quite fast, but it's better to say:
20222
20223 @example
20224 (1-
20225  (&
20226   ("from" "Lars")
20227   ("subject" "Gnus")))
20228 @end example
20229
20230 than it is to say:
20231
20232 @example
20233 (&
20234  (1- ("from" "Lars"))
20235  (1- ("subject" "Gnus")))
20236 @end example
20237
20238
20239 @node Score Decays
20240 @section Score Decays
20241 @cindex score decays
20242 @cindex decays
20243
20244 You may find that your scores have a tendency to grow without
20245 bounds, especially if you're using adaptive scoring.  If scores get too
20246 big, they lose all meaning---they simply max out and it's difficult to
20247 use them in any sensible way.
20248
20249 @vindex gnus-decay-scores
20250 @findex gnus-decay-score
20251 @vindex gnus-decay-score-function
20252 Gnus provides a mechanism for decaying scores to help with this problem.
20253 When score files are loaded and @code{gnus-decay-scores} is
20254 non-@code{nil}, Gnus will run the score files through the decaying
20255 mechanism thereby lowering the scores of all non-permanent score rules.
20256 The decay itself if performed by the @code{gnus-decay-score-function}
20257 function, which is @code{gnus-decay-score} by default.  Here's the
20258 definition of that function:
20259
20260 @lisp
20261 (defun gnus-decay-score (score)
20262   "Decay SCORE according to `gnus-score-decay-constant'
20263 and `gnus-score-decay-scale'."
20264   (let ((n (- score
20265               (* (if (< score 0) -1 1)
20266                  (min (abs score)
20267                       (max gnus-score-decay-constant
20268                            (* (abs score)
20269                               gnus-score-decay-scale)))))))
20270     (if (and (featurep 'xemacs)
20271              ;; XEmacs' floor can handle only the floating point
20272              ;; number below the half of the maximum integer.
20273              (> (abs n) (lsh -1 -2)))
20274         (string-to-number
20275          (car (split-string (number-to-string n) "\\.")))
20276       (floor n))))
20277 @end lisp
20278
20279 @vindex gnus-score-decay-scale
20280 @vindex gnus-score-decay-constant
20281 @code{gnus-score-decay-constant} is 3 by default and
20282 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
20283
20284 @enumerate
20285 @item
20286 Scores between -3 and 3 will be set to 0 when this function is called.
20287
20288 @item
20289 Scores with magnitudes between 3 and 60 will be shrunk by 3.
20290
20291 @item
20292 Scores with magnitudes greater than 60 will be shrunk by 5% of the
20293 score.
20294 @end enumerate
20295
20296 If you don't like this decay function, write your own.  It is called
20297 with the score to be decayed as its only parameter, and it should return
20298 the new score, which should be an integer.
20299
20300 Gnus will try to decay scores once a day.  If you haven't run Gnus for
20301 four days, Gnus will decay the scores four times, for instance.
20302
20303 @iftex
20304 @iflatex
20305 @chapter Message
20306 @include message.texi
20307 @chapter Emacs MIME
20308 @include emacs-mime.texi
20309 @chapter Sieve
20310 @include sieve.texi
20311 @chapter PGG
20312 @include pgg.texi
20313 @chapter SASL
20314 @include sasl.texi
20315 @end iflatex
20316 @end iftex
20317
20318 @node Various
20319 @chapter Various
20320
20321 @menu
20322 * Process/Prefix::              A convention used by many treatment commands.
20323 * Interactive::                 Making Gnus ask you many questions.
20324 * Symbolic Prefixes::           How to supply some Gnus functions with options.
20325 * Formatting Variables::        You can specify what buffers should look like.
20326 * Window Layout::               Configuring the Gnus buffer windows.
20327 * Faces and Fonts::             How to change how faces look.
20328 * Compilation::                 How to speed Gnus up.
20329 * Mode Lines::                  Displaying information in the mode lines.
20330 * Highlighting and Menus::      Making buffers look all nice and cozy.
20331 * Buttons::                     Get tendinitis in ten easy steps!
20332 * Daemons::                     Gnus can do things behind your back.
20333 * NoCeM::                       How to avoid spam and other fatty foods.
20334 * Undo::                        Some actions can be undone.
20335 * Predicate Specifiers::        Specifying predicates.
20336 * Moderation::                  What to do if you're a moderator.
20337 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
20338 * Fuzzy Matching::              What's the big fuzz?
20339 * Thwarting Email Spam::        A how-to on avoiding unsolicited commercial email.
20340 * Other modes::                 Interaction with other modes.
20341 * Various Various::             Things that are really various.
20342 @end menu
20343
20344
20345 @node Process/Prefix
20346 @section Process/Prefix
20347 @cindex process/prefix convention
20348
20349 Many functions, among them functions for moving, decoding and saving
20350 articles, use what is known as the @dfn{Process/Prefix convention}.
20351
20352 This is a method for figuring out what articles the user wants the
20353 command to be performed on.
20354
20355 It goes like this:
20356
20357 If the numeric prefix is N, perform the operation on the next N
20358 articles, starting with the current one.  If the numeric prefix is
20359 negative, perform the operation on the previous N articles, starting
20360 with the current one.
20361
20362 @vindex transient-mark-mode
20363 If @code{transient-mark-mode} in non-@code{nil} and the region is
20364 active, all articles in the region will be worked upon.
20365
20366 If there is no numeric prefix, but some articles are marked with the
20367 process mark, perform the operation on the articles marked with
20368 the process mark.
20369
20370 If there is neither a numeric prefix nor any articles marked with the
20371 process mark, just perform the operation on the current article.
20372
20373 Quite simple, really, but it needs to be made clear so that surprises
20374 are avoided.
20375
20376 Commands that react to the process mark will push the current list of
20377 process marked articles onto a stack and will then clear all process
20378 marked articles.  You can restore the previous configuration with the
20379 @kbd{M P y} command (@pxref{Setting Process Marks}).
20380
20381 @vindex gnus-summary-goto-unread
20382 One thing that seems to shock & horrify lots of people is that, for
20383 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
20384 Since each @kbd{d} (which marks the current article as read) by default
20385 goes to the next unread article after marking, this means that @kbd{3 d}
20386 will mark the next three unread articles as read, no matter what the
20387 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
20388 @code{nil} for a more straightforward action.
20389
20390 Many commands do not use the process/prefix convention.  All commands
20391 that do explicitly say so in this manual.  To apply the process/prefix
20392 convention to commands that do not use it, you can use the @kbd{M-&}
20393 command.  For instance, to mark all the articles in the group as
20394 expirable, you could say @kbd{M P b M-& E}.
20395
20396
20397 @node Interactive
20398 @section Interactive
20399 @cindex interaction
20400
20401 @table @code
20402
20403 @item gnus-novice-user
20404 @vindex gnus-novice-user
20405 If this variable is non-@code{nil}, you are either a newcomer to the
20406 World of Usenet, or you are very cautious, which is a nice thing to be,
20407 really.  You will be given questions of the type ``Are you sure you want
20408 to do this?'' before doing anything dangerous.  This is @code{t} by
20409 default.
20410
20411 @item gnus-expert-user
20412 @vindex gnus-expert-user
20413 If this variable is non-@code{nil}, you will seldom be asked any
20414 questions by Gnus.  It will simply assume you know what you're doing, no
20415 matter how strange.
20416
20417 @item gnus-interactive-catchup
20418 @vindex gnus-interactive-catchup
20419 Require confirmation before catching up a group if non-@code{nil}.  It
20420 is @code{t} by default.
20421
20422 @item gnus-interactive-exit
20423 @vindex gnus-interactive-exit
20424 Require confirmation before exiting Gnus.  This variable is @code{t} by
20425 default.
20426 @end table
20427
20428
20429 @node Symbolic Prefixes
20430 @section Symbolic Prefixes
20431 @cindex symbolic prefixes
20432
20433 Quite a lot of Emacs commands react to the (numeric) prefix.  For
20434 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
20435 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
20436 rule of 900 to the current article.
20437
20438 This is all nice and well, but what if you want to give a command some
20439 additional information?  Well, what most commands do is interpret the
20440 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
20441 doesn't want a backup file to be created when saving the current buffer,
20442 for instance.  But what if you want to save without making a backup
20443 file, and you want Emacs to flash lights and play a nice tune at the
20444 same time?  You can't, and you're probably perfectly happy that way.
20445
20446 @kindex M-i (Summary)
20447 @findex gnus-symbolic-argument
20448 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
20449 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
20450 character typed in is the value.  You can stack as many @kbd{M-i}
20451 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
20452 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
20453 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
20454 @code{b}''.  You get the drift.
20455
20456 Typing in symbolic prefixes to commands that don't accept them doesn't
20457 hurt, but it doesn't do any good either.  Currently not many Gnus
20458 functions make use of the symbolic prefix.
20459
20460 If you're interested in how Gnus implements this, @pxref{Extended
20461 Interactive}.
20462
20463
20464 @node Formatting Variables
20465 @section Formatting Variables
20466 @cindex formatting variables
20467
20468 Throughout this manual you've probably noticed lots of variables called
20469 things like @code{gnus-group-line-format} and
20470 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
20471 output lines in the various buffers.  There's quite a lot of them.
20472 Fortunately, they all use the same syntax, so there's not that much to
20473 be annoyed by.
20474
20475 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
20476 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
20477 lots of percentages everywhere.
20478
20479 @menu
20480 * Formatting Basics::           A formatting variable is basically a format string.
20481 * Mode Line Formatting::        Some rules about mode line formatting variables.
20482 * Advanced Formatting::         Modifying output in various ways.
20483 * User-Defined Specs::          Having Gnus call your own functions.
20484 * Formatting Fonts::            Making the formatting look colorful and nice.
20485 * Positioning Point::           Moving point to a position after an operation.
20486 * Tabulation::                  Tabulating your output.
20487 * Wide Characters::             Dealing with wide characters.
20488 @end menu
20489
20490 Currently Gnus uses the following formatting variables:
20491 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
20492 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
20493 @code{gnus-group-mode-line-format},
20494 @code{gnus-summary-mode-line-format},
20495 @code{gnus-article-mode-line-format},
20496 @code{gnus-server-mode-line-format}, and
20497 @code{gnus-summary-pick-line-format}.
20498
20499 All these format variables can also be arbitrary elisp forms.  In that
20500 case, they will be @code{eval}ed to insert the required lines.
20501
20502 @kindex M-x gnus-update-format
20503 @findex gnus-update-format
20504 Gnus includes a command to help you while creating your own format
20505 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
20506 update the spec in question and pop you to a buffer where you can
20507 examine the resulting Lisp code to be run to generate the line.
20508
20509
20510
20511 @node Formatting Basics
20512 @subsection Formatting Basics
20513
20514 Each @samp{%} element will be replaced by some string or other when the
20515 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
20516 spec, and pad with spaces to get a 5-character field''.
20517
20518 As with normal C and Emacs Lisp formatting strings, the numerical
20519 modifier between the @samp{%} and the formatting type character will
20520 @dfn{pad} the output so that it is always at least that long.
20521 @samp{%5y} will make the field always (at least) five characters wide by
20522 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
20523 the right instead.
20524
20525 You may also wish to limit the length of the field to protect against
20526 particularly wide values.  For that you can say @samp{%4,6y}, which
20527 means that the field will never be more than 6 characters wide and never
20528 less than 4 characters wide.
20529
20530 Also Gnus supports some extended format specifications, such as
20531 @samp{%&user-date;}.
20532
20533
20534 @node Mode Line Formatting
20535 @subsection Mode Line Formatting
20536
20537 Mode line formatting variables (e.g.,
20538 @code{gnus-summary-mode-line-format}) follow the same rules as other,
20539 buffer line oriented formatting variables (@pxref{Formatting Basics})
20540 with the following two differences:
20541
20542 @enumerate
20543
20544 @item
20545 There must be no newline (@samp{\n}) at the end.
20546
20547 @item
20548 The special @samp{%%b} spec can be used to display the buffer name.
20549 Well, it's no spec at all, really---@samp{%%} is just a way to quote
20550 @samp{%} to allow it to pass through the formatting machinery unmangled,
20551 so that Emacs receives @samp{%b}, which is something the Emacs mode line
20552 display interprets to mean ``show the buffer name''.  For a full list of
20553 mode line specs Emacs understands, see the documentation of the
20554 @code{mode-line-format} variable.
20555
20556 @end enumerate
20557
20558
20559 @node Advanced Formatting
20560 @subsection Advanced Formatting
20561
20562 It is frequently useful to post-process the fields in some way.
20563 Padding, limiting, cutting off parts and suppressing certain values can
20564 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
20565 look like @samp{%~(cut 3)~(ignore "0")y}.
20566
20567 These are the valid modifiers:
20568
20569 @table @code
20570 @item pad
20571 @itemx pad-left
20572 Pad the field to the left with spaces until it reaches the required
20573 length.
20574
20575 @item pad-right
20576 Pad the field to the right with spaces until it reaches the required
20577 length.
20578
20579 @item max
20580 @itemx max-left
20581 Cut off characters from the left until it reaches the specified length.
20582
20583 @item max-right
20584 Cut off characters from the right until it reaches the specified
20585 length.
20586
20587 @item cut
20588 @itemx cut-left
20589 Cut off the specified number of characters from the left.
20590
20591 @item cut-right
20592 Cut off the specified number of characters from the right.
20593
20594 @item ignore
20595 Return an empty string if the field is equal to the specified value.
20596
20597 @item form
20598 Use the specified form as the field value when the @samp{@@} spec is
20599 used.
20600
20601 Here's an example:
20602
20603 @lisp
20604 "~(form (current-time-string))@@"
20605 @end lisp
20606
20607 @end table
20608
20609 Let's take an example.  The @samp{%o} spec in the summary mode lines
20610 will return a date in compact ISO8601 format---@samp{19960809T230410}.
20611 This is quite a mouthful, so we want to shave off the century number and
20612 the time, leaving us with a six-character date.  That would be
20613 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
20614 maxing, and we need the padding to ensure that the date is never less
20615 than 6 characters to make it look nice in columns.)
20616
20617 Ignoring is done first; then cutting; then maxing; and then as the very
20618 last operation, padding.
20619
20620 If you use lots of these advanced thingies, you'll find that Gnus gets
20621 quite slow.  This can be helped enormously by running @kbd{M-x
20622 gnus-compile} when you are satisfied with the look of your lines.
20623 @xref{Compilation}.
20624
20625
20626 @node User-Defined Specs
20627 @subsection User-Defined Specs
20628
20629 All the specs allow for inserting user defined specifiers---@samp{u}.
20630 The next character in the format string should be a letter.  Gnus
20631 will call the function @code{gnus-user-format-function-}@samp{X}, where
20632 @samp{X} is the letter following @samp{%u}.  The function will be passed
20633 a single parameter---what the parameter means depends on what buffer
20634 it's being called from.  The function should return a string, which will
20635 be inserted into the buffer just like information from any other
20636 specifier.  This function may also be called with dummy values, so it
20637 should protect against that.
20638
20639 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
20640 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
20641
20642 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
20643 much the same without defining new functions.  Here's an example:
20644 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
20645 given here will be evaluated to yield the current line number, and then
20646 inserted.
20647
20648
20649 @node Formatting Fonts
20650 @subsection Formatting Fonts
20651
20652 There are specs for highlighting, and these are shared by all the format
20653 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
20654 the special @code{mouse-face} property set, which means that it will be
20655 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
20656 over it.
20657
20658 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
20659 normal faces set using @code{gnus-face-0}, which is @code{bold} by
20660 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
20661 and so on.  Create as many faces as you wish.  The same goes for the
20662 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
20663 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
20664
20665 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
20666 special @code{balloon-help} property set to
20667 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
20668 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
20669 variables should be either strings or symbols naming functions that
20670 return a string.  When the mouse passes over text with this property
20671 set, a balloon window will appear and display the string.  Please
20672 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
20673 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
20674 XEmacs) for more information on this.  (For technical reasons, the
20675 guillemets have been approximated as @samp{<<} and @samp{>>} in this
20676 paragraph.)
20677
20678 Here's an alternative recipe for the group buffer:
20679
20680 @lisp
20681 ;; @r{Create three face types.}
20682 (setq gnus-face-1 'bold)
20683 (setq gnus-face-3 'italic)
20684
20685 ;; @r{We want the article count to be in}
20686 ;; @r{a bold and green face.  So we create}
20687 ;; @r{a new face called @code{my-green-bold}.}
20688 (copy-face 'bold 'my-green-bold)
20689 ;; @r{Set the color.}
20690 (set-face-foreground 'my-green-bold "ForestGreen")
20691 (setq gnus-face-2 'my-green-bold)
20692
20693 ;; @r{Set the new & fancy format.}
20694 (setq gnus-group-line-format
20695       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
20696 @end lisp
20697
20698 I'm sure you'll be able to use this scheme to create totally unreadable
20699 and extremely vulgar displays.  Have fun!
20700
20701 Note that the @samp{%(} specs (and friends) do not make any sense on the
20702 mode-line variables.
20703
20704 @node Positioning Point
20705 @subsection Positioning Point
20706
20707 Gnus usually moves point to a pre-defined place on each line in most
20708 buffers.  By default, point move to the first colon character on the
20709 line.  You can customize this behaviour in three different ways.
20710
20711 You can move the colon character to somewhere else on the line.
20712
20713 @findex gnus-goto-colon
20714 You can redefine the function that moves the point to the colon.  The
20715 function is called @code{gnus-goto-colon}.
20716
20717 But perhaps the most convenient way to deal with this, if you don't want
20718 to have a colon in your line, is to use the @samp{%*} specifier.  If you
20719 put a @samp{%*} somewhere in your format line definition, Gnus will
20720 place point there.
20721
20722
20723 @node Tabulation
20724 @subsection Tabulation
20725
20726 You can usually line up your displays by padding and cutting your
20727 strings.  However, when combining various strings of different size, it
20728 can often be more convenient to just output the strings, and then worry
20729 about lining up the following text afterwards.
20730
20731 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
20732 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
20733
20734 @samp{%50=} will insert space characters to pad the line up to column
20735 50.  If the text is already past column 50, nothing will be inserted.
20736 This is the soft tabulator.
20737
20738 @samp{%-50=} will insert space characters to pad the line up to column
20739 50.  If the text is already past column 50, the excess text past column
20740 50 will be removed.  This is the hard tabulator.
20741
20742
20743 @node Wide Characters
20744 @subsection Wide Characters
20745
20746 Fixed width fonts in most countries have characters of the same width.
20747 Some countries, however, use Latin characters mixed with wider
20748 characters---most notable East Asian countries.
20749
20750 The problem is that when formatting, Gnus assumes that if a string is 10
20751 characters wide, it'll be 10 Latin characters wide on the screen.  In
20752 these countries, that's not true.
20753
20754 @vindex gnus-use-correct-string-widths
20755 To help fix this, you can set @code{gnus-use-correct-string-widths} to
20756 @code{t}.  This makes buffer generation slower, but the results will be
20757 prettier.  The default value under XEmacs is @code{t} but @code{nil}
20758 for Emacs.
20759
20760
20761 @node Window Layout
20762 @section Window Layout
20763 @cindex window layout
20764
20765 No, there's nothing here about X, so be quiet.
20766
20767 @vindex gnus-use-full-window
20768 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
20769 other windows and occupy the entire Emacs screen by itself.  It is
20770 @code{t} by default.
20771
20772 Setting this variable to @code{nil} kinda works, but there are
20773 glitches.  Use at your own peril.
20774
20775 @vindex gnus-buffer-configuration
20776 @code{gnus-buffer-configuration} describes how much space each Gnus
20777 buffer should be given.  Here's an excerpt of this variable:
20778
20779 @lisp
20780 ((group (vertical 1.0 (group 1.0 point)
20781                       (if gnus-carpal (group-carpal 4))))
20782  (article (vertical 1.0 (summary 0.25 point)
20783                         (article 1.0))))
20784 @end lisp
20785
20786 This is an alist.  The @dfn{key} is a symbol that names some action or
20787 other.  For instance, when displaying the group buffer, the window
20788 configuration function will use @code{group} as the key.  A full list of
20789 possible names is listed below.
20790
20791 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
20792 should occupy.  To take the @code{article} split as an example -
20793
20794 @lisp
20795 (article (vertical 1.0 (summary 0.25 point)
20796                        (article 1.0)))
20797 @end lisp
20798
20799 This @dfn{split} says that the summary buffer should occupy 25% of upper
20800 half of the screen, and that it is placed over the article buffer.  As
20801 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
20802 reaching for that calculator there).  However, the special number
20803 @code{1.0} is used to signal that this buffer should soak up all the
20804 rest of the space available after the rest of the buffers have taken
20805 whatever they need.  There should be only one buffer with the @code{1.0}
20806 size spec per split.
20807
20808 Point will be put in the buffer that has the optional third element
20809 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
20810 split where the tag @code{frame-focus} is a member (i.e. is the third or
20811 fourth element in the list, depending on whether the @code{point} tag is
20812 present) gets focus.
20813
20814 Here's a more complicated example:
20815
20816 @lisp
20817 (article (vertical 1.0 (group 4)
20818                        (summary 0.25 point)
20819                        (if gnus-carpal (summary-carpal 4))
20820                        (article 1.0)))
20821 @end lisp
20822
20823 If the size spec is an integer instead of a floating point number,
20824 then that number will be used to say how many lines a buffer should
20825 occupy, not a percentage.
20826
20827 If the @dfn{split} looks like something that can be @code{eval}ed (to be
20828 precise---if the @code{car} of the split is a function or a subr), this
20829 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
20830 be used as a split.  This means that there will be three buffers if
20831 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
20832 is non-@code{nil}.
20833
20834 Not complicated enough for you?  Well, try this on for size:
20835
20836 @lisp
20837 (article (horizontal 1.0
20838              (vertical 0.5
20839                  (group 1.0)
20840                  (gnus-carpal 4))
20841              (vertical 1.0
20842                  (summary 0.25 point)
20843                  (summary-carpal 4)
20844                  (article 1.0))))
20845 @end lisp
20846
20847 Whoops.  Two buffers with the mystery 100% tag.  And what's that
20848 @code{horizontal} thingie?
20849
20850 If the first element in one of the split is @code{horizontal}, Gnus will
20851 split the window horizontally, giving you two windows side-by-side.
20852 Inside each of these strips you may carry on all you like in the normal
20853 fashion.  The number following @code{horizontal} says what percentage of
20854 the screen is to be given to this strip.
20855
20856 For each split, there @emph{must} be one element that has the 100% tag.
20857 The splitting is never accurate, and this buffer will eat any leftover
20858 lines from the splits.
20859
20860 To be slightly more formal, here's a definition of what a valid split
20861 may look like:
20862
20863 @example
20864 @group
20865 split      = frame | horizontal | vertical | buffer | form
20866 frame      = "(frame " size *split ")"
20867 horizontal = "(horizontal " size *split ")"
20868 vertical   = "(vertical " size *split ")"
20869 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
20870 size       = number | frame-params
20871 buf-name   = group | article | summary ...
20872 @end group
20873 @end example
20874
20875 The limitations are that the @code{frame} split can only appear as the
20876 top-level split.  @var{form} should be an Emacs Lisp form that should
20877 return a valid split.  We see that each split is fully recursive, and
20878 may contain any number of @code{vertical} and @code{horizontal} splits.
20879
20880 @vindex gnus-window-min-width
20881 @vindex gnus-window-min-height
20882 @cindex window height
20883 @cindex window width
20884 Finding the right sizes can be a bit complicated.  No window may be less
20885 than @code{gnus-window-min-height} (default 1) characters high, and all
20886 windows must be at least @code{gnus-window-min-width} (default 1)
20887 characters wide.  Gnus will try to enforce this before applying the
20888 splits.  If you want to use the normal Emacs window width/height limit,
20889 you can just set these two variables to @code{nil}.
20890
20891 If you're not familiar with Emacs terminology, @code{horizontal} and
20892 @code{vertical} splits may work the opposite way of what you'd expect.
20893 Windows inside a @code{horizontal} split are shown side-by-side, and
20894 windows within a @code{vertical} split are shown above each other.
20895
20896 @findex gnus-configure-frame
20897 If you want to experiment with window placement, a good tip is to call
20898 @code{gnus-configure-frame} directly with a split.  This is the function
20899 that does all the real work when splitting buffers.  Below is a pretty
20900 nonsensical configuration with 5 windows; two for the group buffer and
20901 three for the article buffer.  (I said it was nonsensical.)  If you
20902 @code{eval} the statement below, you can get an idea of how that would
20903 look straight away, without going through the normal Gnus channels.
20904 Play with it until you're satisfied, and then use
20905 @code{gnus-add-configuration} to add your new creation to the buffer
20906 configuration list.
20907
20908 @lisp
20909 (gnus-configure-frame
20910  '(horizontal 1.0
20911     (vertical 10
20912       (group 1.0)
20913       (article 0.3 point))
20914     (vertical 1.0
20915       (article 1.0)
20916       (horizontal 4
20917         (group 1.0)
20918         (article 10)))))
20919 @end lisp
20920
20921 You might want to have several frames as well.  No prob---just use the
20922 @code{frame} split:
20923
20924 @lisp
20925 (gnus-configure-frame
20926  '(frame 1.0
20927          (vertical 1.0
20928                    (summary 0.25 point frame-focus)
20929                    (article 1.0))
20930          (vertical ((height . 5) (width . 15)
20931                     (user-position . t)
20932                     (left . -1) (top . 1))
20933                    (picon 1.0))))
20934
20935 @end lisp
20936
20937 This split will result in the familiar summary/article window
20938 configuration in the first (or ``main'') frame, while a small additional
20939 frame will be created where picons will be shown.  As you can see,
20940 instead of the normal @code{1.0} top-level spec, each additional split
20941 should have a frame parameter alist as the size spec.
20942 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
20943 Reference Manual}.  Under XEmacs, a frame property list will be
20944 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
20945 is such a plist.
20946 The list of all possible keys for @code{gnus-buffer-configuration} can
20947 be found in its default value.
20948
20949 Note that the @code{message} key is used for both
20950 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
20951 it is desirable to distinguish between the two, something like this
20952 might be used:
20953
20954 @lisp
20955 (message (horizontal 1.0
20956                      (vertical 1.0 (message 1.0 point))
20957                      (vertical 0.24
20958                                (if (buffer-live-p gnus-summary-buffer)
20959                                    '(summary 0.5))
20960                                (group 1.0))))
20961 @end lisp
20962
20963 One common desire for a multiple frame split is to have a separate frame
20964 for composing mail and news while leaving the original frame intact.  To
20965 accomplish that, something like the following can be done:
20966
20967 @lisp
20968 (message
20969   (frame 1.0
20970          (if (not (buffer-live-p gnus-summary-buffer))
20971              (car (cdr (assoc 'group gnus-buffer-configuration)))
20972            (car (cdr (assoc 'summary gnus-buffer-configuration))))
20973          (vertical ((user-position . t) (top . 1) (left . 1)
20974                     (name . "Message"))
20975                    (message 1.0 point))))
20976 @end lisp
20977
20978 @findex gnus-add-configuration
20979 Since the @code{gnus-buffer-configuration} variable is so long and
20980 complicated, there's a function you can use to ease changing the config
20981 of a single setting: @code{gnus-add-configuration}.  If, for instance,
20982 you want to change the @code{article} setting, you could say:
20983
20984 @lisp
20985 (gnus-add-configuration
20986  '(article (vertical 1.0
20987                (group 4)
20988                (summary .25 point)
20989                (article 1.0))))
20990 @end lisp
20991
20992 You'd typically stick these @code{gnus-add-configuration} calls in your
20993 @file{~/.gnus.el} file or in some startup hook---they should be run after
20994 Gnus has been loaded.
20995
20996 @vindex gnus-always-force-window-configuration
20997 If all windows mentioned in the configuration are already visible, Gnus
20998 won't change the window configuration.  If you always want to force the
20999 ``right'' window configuration, you can set
21000 @code{gnus-always-force-window-configuration} to non-@code{nil}.
21001
21002 If you're using tree displays (@pxref{Tree Display}), and the tree
21003 window is displayed vertically next to another window, you may also want
21004 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
21005 windows resized.
21006
21007 @subsection Example Window Configurations
21008
21009 @itemize @bullet
21010 @item
21011 Narrow left hand side occupied by group buffer.  Right hand side split
21012 between summary buffer (top one-sixth) and article buffer (bottom).
21013
21014 @ifinfo
21015 @example
21016 +---+---------+
21017 | G | Summary |
21018 | r +---------+
21019 | o |         |
21020 | u | Article |
21021 | p |         |
21022 +---+---------+
21023 @end example
21024 @end ifinfo
21025
21026 @lisp
21027 (gnus-add-configuration
21028  '(article
21029    (horizontal 1.0
21030                (vertical 25 (group 1.0))
21031                (vertical 1.0
21032                          (summary 0.16 point)
21033                          (article 1.0)))))
21034
21035 (gnus-add-configuration
21036  '(summary
21037    (horizontal 1.0
21038                (vertical 25 (group 1.0))
21039                (vertical 1.0 (summary 1.0 point)))))
21040 @end lisp
21041
21042 @end itemize
21043
21044
21045 @node Faces and Fonts
21046 @section Faces and Fonts
21047 @cindex faces
21048 @cindex fonts
21049 @cindex colors
21050
21051 Fiddling with fonts and faces used to be very difficult, but these days
21052 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
21053 the face you want to alter, and alter it via the standard Customize
21054 interface.
21055
21056
21057 @node Compilation
21058 @section Compilation
21059 @cindex compilation
21060 @cindex byte-compilation
21061
21062 @findex gnus-compile
21063
21064 Remember all those line format specification variables?
21065 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
21066 on.  Now, Gnus will of course heed whatever these variables are, but,
21067 unfortunately, changing them will mean a quite significant slow-down.
21068 (The default values of these variables have byte-compiled functions
21069 associated with them, while the user-generated versions do not, of
21070 course.)
21071
21072 To help with this, you can run @kbd{M-x gnus-compile} after you've
21073 fiddled around with the variables and feel that you're (kind of)
21074 satisfied.  This will result in the new specs being byte-compiled, and
21075 you'll get top speed again.  Gnus will save these compiled specs in the
21076 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
21077 this function, though---you should compile them yourself by sticking
21078 them into the @file{~/.gnus.el} file and byte-compiling that file.)
21079
21080
21081 @node Mode Lines
21082 @section Mode Lines
21083 @cindex mode lines
21084
21085 @vindex gnus-updated-mode-lines
21086 @code{gnus-updated-mode-lines} says what buffers should keep their mode
21087 lines updated.  It is a list of symbols.  Supported symbols include
21088 @code{group}, @code{article}, @code{summary}, @code{server},
21089 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
21090 Gnus will keep that mode line updated with information that may be
21091 pertinent.  If this variable is @code{nil}, screen refresh may be
21092 quicker.
21093
21094 @cindex display-time
21095
21096 @vindex gnus-mode-non-string-length
21097 By default, Gnus displays information on the current article in the mode
21098 lines of the summary and article buffers.  The information Gnus wishes
21099 to display (e.g. the subject of the article) is often longer than the
21100 mode lines, and therefore have to be cut off at some point.  The
21101 @code{gnus-mode-non-string-length} variable says how long the other
21102 elements on the line is (i.e., the non-info part).  If you put
21103 additional elements on the mode line (e.g. a clock), you should modify
21104 this variable:
21105
21106 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
21107 @lisp
21108 (add-hook 'display-time-hook
21109           (lambda () (setq gnus-mode-non-string-length
21110                            (+ 21
21111                               (if line-number-mode 5 0)
21112                               (if column-number-mode 4 0)
21113                               (length display-time-string)))))
21114 @end lisp
21115
21116 If this variable is @code{nil} (which is the default), the mode line
21117 strings won't be chopped off, and they won't be padded either.  Note
21118 that the default is unlikely to be desirable, as even the percentage
21119 complete in the buffer may be crowded off the mode line; the user should
21120 configure this variable appropriately for her configuration.
21121
21122
21123 @node Highlighting and Menus
21124 @section Highlighting and Menus
21125 @cindex visual
21126 @cindex highlighting
21127 @cindex menus
21128
21129 @vindex gnus-visual
21130 The @code{gnus-visual} variable controls most of the Gnus-prettifying
21131 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
21132 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
21133 file.
21134
21135 This variable can be a list of visual properties that are enabled.  The
21136 following elements are valid, and are all included by default:
21137
21138 @table @code
21139 @item group-highlight
21140 Do highlights in the group buffer.
21141 @item summary-highlight
21142 Do highlights in the summary buffer.
21143 @item article-highlight
21144 Do highlights in the article buffer.
21145 @item highlight
21146 Turn on highlighting in all buffers.
21147 @item group-menu
21148 Create menus in the group buffer.
21149 @item summary-menu
21150 Create menus in the summary buffers.
21151 @item article-menu
21152 Create menus in the article buffer.
21153 @item browse-menu
21154 Create menus in the browse buffer.
21155 @item server-menu
21156 Create menus in the server buffer.
21157 @item score-menu
21158 Create menus in the score buffers.
21159 @item menu
21160 Create menus in all buffers.
21161 @end table
21162
21163 So if you only want highlighting in the article buffer and menus in all
21164 buffers, you could say something like:
21165
21166 @lisp
21167 (setq gnus-visual '(article-highlight menu))
21168 @end lisp
21169
21170 If you want highlighting only and no menus whatsoever, you'd say:
21171
21172 @lisp
21173 (setq gnus-visual '(highlight))
21174 @end lisp
21175
21176 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
21177 in all Gnus buffers.
21178
21179 Other general variables that influence the look of all buffers include:
21180
21181 @table @code
21182 @item gnus-mouse-face
21183 @vindex gnus-mouse-face
21184 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
21185 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
21186
21187 @end table
21188
21189 There are hooks associated with the creation of all the different menus:
21190
21191 @table @code
21192
21193 @item gnus-article-menu-hook
21194 @vindex gnus-article-menu-hook
21195 Hook called after creating the article mode menu.
21196
21197 @item gnus-group-menu-hook
21198 @vindex gnus-group-menu-hook
21199 Hook called after creating the group mode menu.
21200
21201 @item gnus-summary-menu-hook
21202 @vindex gnus-summary-menu-hook
21203 Hook called after creating the summary mode menu.
21204
21205 @item gnus-server-menu-hook
21206 @vindex gnus-server-menu-hook
21207 Hook called after creating the server mode menu.
21208
21209 @item gnus-browse-menu-hook
21210 @vindex gnus-browse-menu-hook
21211 Hook called after creating the browse mode menu.
21212
21213 @item gnus-score-menu-hook
21214 @vindex gnus-score-menu-hook
21215 Hook called after creating the score mode menu.
21216
21217 @end table
21218
21219
21220 @node Buttons
21221 @section Buttons
21222 @cindex buttons
21223 @cindex mouse
21224 @cindex click
21225
21226 Those new-fangled @dfn{mouse} contraptions is very popular with the
21227 young, hep kids who don't want to learn the proper way to do things
21228 these days.  Why, I remember way back in the summer of '89, when I was
21229 using Emacs on a Tops 20 system.  Three hundred users on one single
21230 machine, and every user was running Simula compilers.  Bah!
21231
21232 Right.
21233
21234 @vindex gnus-carpal
21235 Well, you can make Gnus display bufferfuls of buttons you can click to
21236 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
21237 really.  Tell the chiropractor I sent you.
21238
21239
21240 @table @code
21241
21242 @item gnus-carpal-mode-hook
21243 @vindex gnus-carpal-mode-hook
21244 Hook run in all carpal mode buffers.
21245
21246 @item gnus-carpal-button-face
21247 @vindex gnus-carpal-button-face
21248 Face used on buttons.
21249
21250 @item gnus-carpal-header-face
21251 @vindex gnus-carpal-header-face
21252 Face used on carpal buffer headers.
21253
21254 @item gnus-carpal-group-buffer-buttons
21255 @vindex gnus-carpal-group-buffer-buttons
21256 Buttons in the group buffer.
21257
21258 @item gnus-carpal-summary-buffer-buttons
21259 @vindex gnus-carpal-summary-buffer-buttons
21260 Buttons in the summary buffer.
21261
21262 @item gnus-carpal-server-buffer-buttons
21263 @vindex gnus-carpal-server-buffer-buttons
21264 Buttons in the server buffer.
21265
21266 @item gnus-carpal-browse-buffer-buttons
21267 @vindex gnus-carpal-browse-buffer-buttons
21268 Buttons in the browse buffer.
21269 @end table
21270
21271 All the @code{buttons} variables are lists.  The elements in these list
21272 are either cons cells where the @code{car} contains a text to be displayed and
21273 the @code{cdr} contains a function symbol, or a simple string.
21274
21275
21276 @node Daemons
21277 @section Daemons
21278 @cindex demons
21279 @cindex daemons
21280
21281 Gnus, being larger than any program ever written (allegedly), does lots
21282 of strange stuff that you may wish to have done while you're not
21283 present.  For instance, you may want it to check for new mail once in a
21284 while.  Or you may want it to close down all connections to all servers
21285 when you leave Emacs idle.  And stuff like that.
21286
21287 Gnus will let you do stuff like that by defining various
21288 @dfn{handlers}.  Each handler consists of three elements:  A
21289 @var{function}, a @var{time}, and an @var{idle} parameter.
21290
21291 Here's an example of a handler that closes connections when Emacs has
21292 been idle for thirty minutes:
21293
21294 @lisp
21295 (gnus-demon-close-connections nil 30)
21296 @end lisp
21297
21298 Here's a handler that scans for @acronym{PGP} headers every hour when
21299 Emacs is idle:
21300
21301 @lisp
21302 (gnus-demon-scan-pgp 60 t)
21303 @end lisp
21304
21305 This @var{time} parameter and that @var{idle} parameter work together
21306 in a strange, but wonderful fashion.  Basically, if @var{idle} is
21307 @code{nil}, then the function will be called every @var{time} minutes.
21308
21309 If @var{idle} is @code{t}, then the function will be called after
21310 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
21311 the function will never be called.  But once Emacs goes idle, the
21312 function will be called every @var{time} minutes.
21313
21314 If @var{idle} is a number and @var{time} is a number, the function will
21315 be called every @var{time} minutes only when Emacs has been idle for
21316 @var{idle} minutes.
21317
21318 If @var{idle} is a number and @var{time} is @code{nil}, the function
21319 will be called once every time Emacs has been idle for @var{idle}
21320 minutes.
21321
21322 And if @var{time} is a string, it should look like @samp{07:31}, and
21323 the function will then be called once every day somewhere near that
21324 time.  Modified by the @var{idle} parameter, of course.
21325
21326 @vindex gnus-demon-timestep
21327 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
21328 seconds.  This is 60 by default.  If you change that variable,
21329 all the timings in the handlers will be affected.)
21330
21331 So, if you want to add a handler, you could put something like this in
21332 your @file{~/.gnus.el} file:
21333
21334 @findex gnus-demon-add-handler
21335 @lisp
21336 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
21337 @end lisp
21338
21339 @findex gnus-demon-add-nocem
21340 @findex gnus-demon-add-scanmail
21341 @findex gnus-demon-add-rescan
21342 @findex gnus-demon-add-scan-timestamps
21343 @findex gnus-demon-add-disconnection
21344 Some ready-made functions to do this have been created:
21345 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
21346 @code{gnus-demon-add-nntp-close-connection},
21347 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
21348 @code{gnus-demon-add-scanmail}.  Just put those functions in your
21349 @file{~/.gnus.el} if you want those abilities.
21350
21351 @findex gnus-demon-init
21352 @findex gnus-demon-cancel
21353 @vindex gnus-demon-handlers
21354 If you add handlers to @code{gnus-demon-handlers} directly, you should
21355 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
21356 daemons, you can use the @code{gnus-demon-cancel} function.
21357
21358 Note that adding daemons can be pretty naughty if you over do it.  Adding
21359 functions that scan all news and mail from all servers every two seconds
21360 is a sure-fire way of getting booted off any respectable system.  So
21361 behave.
21362
21363
21364 @node NoCeM
21365 @section NoCeM
21366 @cindex nocem
21367 @cindex spam
21368
21369 @dfn{Spamming} is posting the same article lots and lots of times.
21370 Spamming is bad.  Spamming is evil.
21371
21372 Spamming is usually canceled within a day or so by various anti-spamming
21373 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
21374 NoCeM is pronounced ``no see-'em'', and means what the name
21375 implies---these are messages that make the offending articles, like, go
21376 away.
21377
21378 What use are these NoCeM messages if the articles are canceled anyway?
21379 Some sites do not honor cancel messages and some sites just honor cancels
21380 from a select few people.  Then you may wish to make use of the NoCeM
21381 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
21382
21383 Gnus can read and parse the messages in this group automatically, and
21384 this will make spam disappear.
21385
21386 There are some variables to customize, of course:
21387
21388 @table @code
21389 @item gnus-use-nocem
21390 @vindex gnus-use-nocem
21391 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
21392 by default.
21393
21394 @item gnus-nocem-groups
21395 @vindex gnus-nocem-groups
21396 Gnus will look for NoCeM messages in the groups in this list.  The
21397 default is
21398 @lisp
21399 ("news.lists.filters" "news.admin.net-abuse.bulletins"
21400  "alt.nocem.misc" "news.admin.net-abuse.announce")
21401 @end lisp
21402
21403 @item gnus-nocem-issuers
21404 @vindex gnus-nocem-issuers
21405 There are many people issuing NoCeM messages.  This list says what
21406 people you want to listen to.  The default is
21407 @lisp
21408 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
21409  "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
21410 @end lisp
21411 fine, upstanding citizens all of them.
21412
21413 Known despammers that you can put in this list are listed at@*
21414 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
21415
21416 You do not have to heed NoCeM messages from all these people---just the
21417 ones you want to listen to.  You also don't have to accept all NoCeM
21418 messages from the people you like.  Each NoCeM message has a @dfn{type}
21419 header that gives the message a (more or less, usually less) rigorous
21420 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
21421 @samp{binary}, and @samp{troll}.  To specify this, you have to use
21422 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
21423 Each condition is either a string (which is a regexp that matches types
21424 you want to use) or a list on the form @code{(not @var{string})}, where
21425 @var{string} is a regexp that matches types you don't want to use.
21426
21427 For instance, if you want all NoCeM messages from Chris Lewis except his
21428 @samp{troll} messages, you'd say:
21429
21430 @lisp
21431 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
21432 @end lisp
21433
21434 On the other hand, if you just want nothing but his @samp{spam} and
21435 @samp{spew} messages, you'd say:
21436
21437 @lisp
21438 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
21439 @end lisp
21440
21441 The specs are applied left-to-right.
21442
21443
21444 @item gnus-nocem-verifyer
21445 @vindex gnus-nocem-verifyer
21446 @findex mc-verify
21447 This should be a function for verifying that the NoCeM issuer is who she
21448 says she is.  The default is @code{mc-verify}, which is a Mailcrypt
21449 function.  If this is too slow and you don't care for verification
21450 (which may be dangerous), you can set this variable to @code{nil}.
21451
21452 If you want signed NoCeM messages to be verified and unsigned messages
21453 not to be verified (but used anyway), you could do something like:
21454
21455 @lisp
21456 (setq gnus-nocem-verifyer 'my-gnus-mc-verify)
21457
21458 (defun my-gnus-mc-verify ()
21459   (not (eq 'forged
21460            (ignore-errors
21461              (if (mc-verify)
21462                  t
21463                'forged)))))
21464 @end lisp
21465
21466 This might be dangerous, though.
21467
21468 @item gnus-nocem-directory
21469 @vindex gnus-nocem-directory
21470 This is where Gnus will store its NoCeM cache files.  The default is@*
21471 @file{~/News/NoCeM/}.
21472
21473 @item gnus-nocem-expiry-wait
21474 @vindex gnus-nocem-expiry-wait
21475 The number of days before removing old NoCeM entries from the cache.
21476 The default is 15.  If you make it shorter Gnus will be faster, but you
21477 might then see old spam.
21478
21479 @item gnus-nocem-check-from
21480 @vindex gnus-nocem-check-from
21481 Non-@code{nil} means check for valid issuers in message bodies.
21482 Otherwise don't bother fetching articles unless their author matches a
21483 valid issuer; that is much faster if you are selective about the
21484 issuers.
21485
21486 @item gnus-nocem-check-article-limit
21487 @vindex gnus-nocem-check-article-limit
21488 If non-@code{nil}, the maximum number of articles to check in any NoCeM
21489 group.  NoCeM groups can be huge and very slow to process.
21490
21491 @end table
21492
21493 Using NoCeM could potentially be a memory hog.  If you have many living
21494 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
21495 big.  If this is a problem, you should kill off all (or most) of your
21496 unsubscribed groups (@pxref{Subscription Commands}).
21497
21498
21499 @node Undo
21500 @section Undo
21501 @cindex undo
21502
21503 It is very useful to be able to undo actions one has done.  In normal
21504 Emacs buffers, it's easy enough---you just push the @code{undo} button.
21505 In Gnus buffers, however, it isn't that simple.
21506
21507 The things Gnus displays in its buffer is of no value whatsoever to
21508 Gnus---it's all just data designed to look nice to the user.
21509 Killing a group in the group buffer with @kbd{C-k} makes the line
21510 disappear, but that's just a side-effect of the real action---the
21511 removal of the group in question from the internal Gnus structures.
21512 Undoing something like that can't be done by the normal Emacs
21513 @code{undo} function.
21514
21515 Gnus tries to remedy this somewhat by keeping track of what the user
21516 does and coming up with actions that would reverse the actions the user
21517 takes.  When the user then presses the @code{undo} key, Gnus will run
21518 the code to reverse the previous action, or the previous actions.
21519 However, not all actions are easily reversible, so Gnus currently offers
21520 a few key functions to be undoable.  These include killing groups,
21521 yanking groups, and changing the list of read articles of groups.
21522 That's it, really.  More functions may be added in the future, but each
21523 added function means an increase in data to be stored, so Gnus will
21524 never be totally undoable.
21525
21526 @findex gnus-undo-mode
21527 @vindex gnus-use-undo
21528 @findex gnus-undo
21529 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
21530 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
21531 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
21532 command, which should feel kinda like the normal Emacs @code{undo}
21533 command.
21534
21535
21536 @node Predicate Specifiers
21537 @section Predicate Specifiers
21538 @cindex predicate specifiers
21539
21540 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
21541 form that allows flexible specification of predicates without having
21542 to type all that much.
21543
21544 These specifiers are lists consisting of functions, symbols and lists.
21545
21546 Here's an example:
21547
21548 @lisp
21549 (or gnus-article-unseen-p
21550     gnus-article-unread-p)
21551 @end lisp
21552
21553 The available symbols are @code{or}, @code{and} and @code{not}.  The
21554 functions all take one parameter.
21555
21556 @findex gnus-make-predicate
21557 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
21558 to create a function that can be called.  This input parameter to this
21559 function will be passed along to all the functions in the predicate
21560 specifier.
21561
21562
21563 @node Moderation
21564 @section Moderation
21565 @cindex moderation
21566
21567 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
21568 It is not included in the standard Gnus package.  Write a mail to
21569 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
21570 get a copy.
21571
21572 The moderation package is implemented as a minor mode for summary
21573 buffers.  Put
21574
21575 @lisp
21576 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
21577 @end lisp
21578
21579 in your @file{~/.gnus.el} file.
21580
21581 If you are the moderator of @samp{rec.zoofle}, this is how it's
21582 supposed to work:
21583
21584 @enumerate
21585 @item
21586 You split your incoming mail by matching on
21587 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
21588 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
21589
21590 @item
21591 You enter that group once in a while and post articles using the @kbd{e}
21592 (edit-and-post) or @kbd{s} (just send unedited) commands.
21593
21594 @item
21595 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
21596 articles that weren't approved by you, you can cancel them with the
21597 @kbd{c} command.
21598 @end enumerate
21599
21600 To use moderation mode in these two groups, say:
21601
21602 @lisp
21603 (setq gnus-moderated-list
21604       "^nnml:rec.zoofle$\\|^rec.zoofle$")
21605 @end lisp
21606
21607
21608 @node Image Enhancements
21609 @section Image Enhancements
21610
21611 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
21612 support images yet.}, is able to display pictures and stuff, so Gnus has
21613 taken advantage of that.
21614
21615 @menu
21616 * X-Face::                      Display a funky, teensy black-and-white image.
21617 * Face::                        Display a funkier, teensier colored image.
21618 * Smileys::                     Show all those happy faces the way they were meant to be shown.
21619 * Picons::                      How to display pictures of what you're reading.
21620 * XVarious::                    Other XEmacsy Gnusey variables.
21621 @end menu
21622
21623
21624 @node X-Face
21625 @subsection X-Face
21626 @cindex x-face
21627
21628 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
21629 depth) image that's supposed to represent the author of the message.
21630 It seems to be supported by an ever-growing number of mail and news
21631 readers.
21632
21633 @cindex x-face
21634 @findex gnus-article-display-x-face
21635 @vindex gnus-article-x-face-command
21636 @vindex gnus-article-x-face-too-ugly
21637 @iftex
21638 @iflatex
21639 \include{xface}
21640 @end iflatex
21641 @end iftex
21642 @c @anchor{X-Face}
21643
21644 Decoding an @code{X-Face} header either requires an Emacs that has
21645 @samp{compface} support (which most XEmacs versions has), or that you
21646 have @samp{compface} installed on your system.  If either is true,
21647 Gnus will default to displaying @code{X-Face} headers.
21648
21649 The variable that controls this is the
21650 @code{gnus-article-x-face-command} variable.  If this variable is a
21651 string, this string will be executed in a sub-shell.  If it is a
21652 function, this function will be called with the face as the argument.
21653 If the @code{gnus-article-x-face-too-ugly} (which is a regexp) matches
21654 the @code{From} header, the face will not be shown.
21655
21656 The default action under Emacs 20 is to fork off the @code{display}
21657 program@footnote{@code{display} is from the ImageMagick package.  For
21658 the @code{uncompface} and @code{icontopbm} programs look for a package
21659 like @code{compface} or @code{faces-xface} on a GNU/Linux system.}  to
21660 view the face.
21661
21662 Under XEmacs or Emacs 21+ with suitable image support, the default
21663 action is to display the face before the @code{From} header.  (It's
21664 nicer if XEmacs has been compiled with @code{X-Face} support---that
21665 will make display somewhat faster.  If there's no native @code{X-Face}
21666 support, Gnus will try to convert the @code{X-Face} header using
21667 external programs from the @code{pbmplus} package and
21668 friends.@footnote{On a GNU/Linux system look for packages with names
21669 like @code{netpbm}, @code{libgr-progs} and @code{compface}.})
21670
21671 (Note: @code{x-face} is used in the variable/function names, not
21672 @code{xface}).
21673
21674 Gnus provides a few convenience functions and variables to allow
21675 easier insertion of X-Face headers in outgoing messages.
21676
21677 @findex gnus-random-x-face
21678 @vindex gnus-convert-pbm-to-x-face-command
21679 @vindex gnus-x-face-directory
21680 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
21681 @code{gnus-x-face-directory} and picks one at random, and then
21682 converts it to the X-Face format by using the
21683 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
21684 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
21685 header data as a string.
21686
21687 @findex gnus-insert-random-x-face-header
21688 @code{gnus-insert-random-x-face-header} calls
21689 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
21690 randomly generated data.
21691
21692 @findex gnus-x-face-from-file
21693 @vindex gnus-convert-image-to-x-face-command
21694 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
21695 converts the file to X-Face format by using the
21696 @code{gnus-convert-image-to-x-face-command} shell command.
21697
21698 Here's how you would typically use the first function.  Put something
21699 like the following in your @file{~/.gnus.el} file:
21700
21701 @lisp
21702 (setq message-required-news-headers
21703       (nconc message-required-news-headers
21704              (list '(X-Face . gnus-random-x-face))))
21705 @end lisp
21706
21707 Using the last function would be something like this:
21708
21709 @lisp
21710 (setq message-required-news-headers
21711       (nconc message-required-news-headers
21712              (list '(X-Face . (lambda ()
21713                                 (gnus-x-face-from-file
21714                                  "~/My-face.gif"))))))
21715 @end lisp
21716
21717
21718 @node Face
21719 @subsection Face
21720 @cindex face
21721
21722 @c #### FIXME: faces and x-faces'implementations should really be harmonized.
21723
21724 @code{Face} headers are essentially a funkier version of @code{X-Face}
21725 ones. They describe a 48x48 pixel colored image that's supposed to
21726 represent the author of the message.
21727
21728 @cindex face
21729 @findex gnus-article-display-face
21730 The contents of a @code{Face} header must be a base64 encoded PNG image.
21731 See @uref{http://quimby.gnus.org/circus/face/} for the precise
21732 specifications.
21733
21734 Gnus provides a few convenience functions and variables to allow
21735 easier insertion of Face headers in outgoing messages.
21736
21737 @findex gnus-convert-png-to-face
21738 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
21739 726 bytes long, and converts it to a face.
21740
21741 @findex gnus-face-from-file
21742 @vindex gnus-convert-image-to-face-command
21743 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
21744 converts the file to Face format by using the
21745 @code{gnus-convert-image-to-face-command} shell command.
21746
21747 Here's how you would typically use this function. Put something like the
21748 following in your @file{~/.gnus.el} file:
21749
21750 @lisp
21751 (setq message-required-news-headers
21752       (nconc message-required-news-headers
21753              (list '(Face . (lambda ()
21754                               (gnus-face-from-file "~/face.jpg"))))))
21755 @end lisp
21756
21757
21758 @node Smileys
21759 @subsection Smileys
21760 @cindex smileys
21761
21762 @iftex
21763 @iflatex
21764 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
21765 \input{smiley}
21766 @end iflatex
21767 @end iftex
21768
21769 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
21770 currently the only package that uses Smiley, it is documented here.
21771
21772 In short---to use Smiley in Gnus, put the following in your
21773 @file{~/.gnus.el} file:
21774
21775 @lisp
21776 (setq gnus-treat-display-smileys t)
21777 @end lisp
21778
21779 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
21780 the like---to pictures and displays those instead of the text smiley
21781 faces.  The conversion is controlled by a list of regexps that matches
21782 text and maps that to file names.
21783
21784 @vindex smiley-regexp-alist
21785 The alist used is specified by the @code{smiley-regexp-alist}
21786 variable.  The first item in each element is the regexp to be matched;
21787 the second element is the regexp match group that is to be replaced by
21788 the picture; and the third element is the name of the file to be
21789 displayed.
21790
21791 The following variables customize where Smiley will look for these
21792 files:
21793
21794 @table @code
21795
21796 @item smiley-data-directory
21797 @vindex smiley-data-directory
21798 Where Smiley will look for smiley faces files.
21799
21800 @item gnus-smiley-file-types
21801 @vindex gnus-smiley-file-types
21802 List of suffixes on smiley file names to try.
21803
21804 @end table
21805
21806
21807 @node Picons
21808 @subsection Picons
21809
21810 @iftex
21811 @iflatex
21812 \include{picons}
21813 @end iflatex
21814 @end iftex
21815
21816 So@dots{}  You want to slow down your news reader even more!  This is a
21817 good way to do so.  It's also a great way to impress people staring
21818 over your shoulder as you read news.
21819
21820 What are Picons?  To quote directly from the Picons Web site:
21821
21822 @iftex
21823 @iflatex
21824 \margindex{}
21825 @end iflatex
21826 @end iftex
21827
21828 @quotation
21829 @dfn{Picons} is short for ``personal icons''.  They're small,
21830 constrained images used to represent users and domains on the net,
21831 organized into databases so that the appropriate image for a given
21832 e-mail address can be found.  Besides users and domains, there are picon
21833 databases for Usenet newsgroups and weather forecasts.  The picons are
21834 in either monochrome @code{XBM} format or color @code{XPM} and
21835 @code{GIF} formats.
21836 @end quotation
21837
21838 @vindex gnus-picon-databases
21839 For instructions on obtaining and installing the picons databases,
21840 point your Web browser at
21841 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
21842
21843 If you are using Debian GNU/Linux, saying @samp{apt-get install
21844 picons.*} will install the picons where Gnus can find them.
21845
21846 To enable displaying picons, simply make sure that
21847 @code{gnus-picon-databases} points to the directory containing the
21848 Picons databases.
21849
21850 The following variables offer control over where things are located.
21851
21852 @table @code
21853
21854 @item gnus-picon-databases
21855 @vindex gnus-picon-databases
21856 The location of the picons database.  This is a list of directories
21857 containing the @file{news}, @file{domains}, @file{users} (and so on)
21858 subdirectories.  Defaults to @code{("/usr/lib/picon"
21859 "/usr/local/faces")}.
21860
21861 @item gnus-picon-news-directories
21862 @vindex gnus-picon-news-directories
21863 List of subdirectories to search in @code{gnus-picon-databases} for
21864 newsgroups faces.  @code{("news")} is the default.
21865
21866 @item gnus-picon-user-directories
21867 @vindex gnus-picon-user-directories
21868 List of subdirectories to search in @code{gnus-picon-databases} for user
21869 faces.  @code{("users" "usenix" "local" "misc")} is the default.
21870
21871 @item gnus-picon-domain-directories
21872 @vindex gnus-picon-domain-directories
21873 List of subdirectories to search in @code{gnus-picon-databases} for
21874 domain name faces.  Defaults to @code{("domains")}.  Some people may
21875 want to add @samp{"unknown"} to this list.
21876
21877 @item gnus-picon-file-types
21878 @vindex gnus-picon-file-types
21879 Ordered list of suffixes on picon file names to try.  Defaults to
21880 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
21881
21882 @end table
21883
21884
21885 @node XVarious
21886 @subsection Various XEmacs Variables
21887
21888 @table @code
21889 @item gnus-xmas-glyph-directory
21890 @vindex gnus-xmas-glyph-directory
21891 This is where Gnus will look for pictures.  Gnus will normally
21892 auto-detect this directory, but you may set it manually if you have an
21893 unusual directory structure.
21894
21895 @item gnus-xmas-logo-color-alist
21896 @vindex gnus-xmas-logo-color-alist
21897 This is an alist where the key is a type symbol and the values are the
21898 foreground and background color of the splash page glyph.
21899
21900 @item gnus-xmas-logo-color-style
21901 @vindex gnus-xmas-logo-color-style
21902 This is the key used to look up the color in the alist described above.
21903 Valid values include @code{flame}, @code{pine}, @code{moss},
21904 @code{irish}, @code{sky}, @code{tin}, @code{velvet}, @code{grape},
21905 @code{labia}, @code{berry}, @code{neutral}, and @code{september}.
21906
21907 @item gnus-xmas-modeline-glyph
21908 @vindex gnus-xmas-modeline-glyph
21909 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
21910 default.
21911
21912 @end table
21913
21914 @subsubsection Toolbar
21915
21916 @table @code
21917
21918 @item gnus-use-toolbar
21919 @vindex gnus-use-toolbar
21920 If @code{nil}, don't display toolbars.  If non-@code{nil}, it should be
21921 one of @code{default-toolbar}, @code{top-toolbar}, @code{bottom-toolbar},
21922 @code{right-toolbar}, or @code{left-toolbar}.
21923
21924 @item gnus-group-toolbar
21925 @vindex gnus-group-toolbar
21926 The toolbar in the group buffer.
21927
21928 @item gnus-summary-toolbar
21929 @vindex gnus-summary-toolbar
21930 The toolbar in the summary buffer.
21931
21932 @item gnus-summary-mail-toolbar
21933 @vindex gnus-summary-mail-toolbar
21934 The toolbar in the summary buffer of mail groups.
21935
21936 @end table
21937
21938 @iftex
21939 @iflatex
21940 \margindex{}
21941 @end iflatex
21942 @end iftex
21943
21944
21945 @node Fuzzy Matching
21946 @section Fuzzy Matching
21947 @cindex fuzzy matching
21948
21949 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
21950 things like scoring, thread gathering and thread comparison.
21951
21952 As opposed to regular expression matching, fuzzy matching is very fuzzy.
21953 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
21954 means, and the implementation has changed over time.
21955
21956 Basically, it tries to remove all noise from lines before comparing.
21957 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
21958 out of the strings before comparing the results.  This often leads to
21959 adequate results---even when faced with strings generated by text
21960 manglers masquerading as newsreaders.
21961
21962
21963 @node Thwarting Email Spam
21964 @section Thwarting Email Spam
21965 @cindex email spam
21966 @cindex spam
21967 @cindex UCE
21968 @cindex unsolicited commercial email
21969
21970 In these last days of the Usenet, commercial vultures are hanging about
21971 and grepping through news like crazy to find email addresses they can
21972 foist off their scams and products to.  As a reaction to this, many
21973 people have started putting nonsense addresses into their @code{From}
21974 lines.  I think this is counterproductive---it makes it difficult for
21975 people to send you legitimate mail in response to things you write, as
21976 well as making it difficult to see who wrote what.  This rewriting may
21977 perhaps be a bigger menace than the unsolicited commercial email itself
21978 in the end.
21979
21980 The biggest problem I have with email spam is that it comes in under
21981 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
21982 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
21983 mail group, only to find two pyramid schemes, seven advertisements
21984 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
21985 and one mail asking me to repent and find some god.
21986
21987 This is annoying.  Here's what you can do about it.
21988
21989 @menu
21990 * The problem of spam::         Some background, and some solutions
21991 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
21992 * SpamAssassin::                How to use external anti-spam tools.
21993 * Hashcash::                    Reduce spam by burning CPU time.
21994 * Filtering Spam Using The Spam ELisp Package::
21995 * Filtering Spam Using Statistics with spam-stat::
21996 @end menu
21997
21998 @node The problem of spam
21999 @subsection The problem of spam
22000 @cindex email spam
22001 @cindex spam filtering approaches
22002 @cindex filtering approaches, spam
22003 @cindex UCE
22004 @cindex unsolicited commercial email
22005
22006 First, some background on spam.
22007
22008 If you have access to e-mail, you are familiar with spam (technically
22009 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it
22010 exists because e-mail delivery is very cheap compared to paper mail,
22011 so only a very small percentage of people need to respond to an UCE to
22012 make it worthwhile to the advertiser.  Ironically, one of the most
22013 common spams is the one offering a database of e-mail addresses for
22014 further spamming.  Senders of spam are usually called @emph{spammers},
22015 but terms like @emph{vermin}, @emph{scum}, @emph{sociopaths}, and
22016 @emph{morons} are in common use as well.
22017
22018 Spam comes from a wide variety of sources.  It is simply impossible to
22019 dispose of all spam without discarding useful messages.  A good
22020 example is the TMDA system, which requires senders
22021 unknown to you to confirm themselves as legitimate senders before
22022 their e-mail can reach you.  Without getting into the technical side
22023 of TMDA, a downside is clearly that e-mail from legitimate sources may
22024 be discarded if those sources can't or won't confirm themselves
22025 through the TMDA system.  Another problem with TMDA is that it
22026 requires its users to have a basic understanding of e-mail delivery
22027 and processing.
22028
22029 The simplest approach to filtering spam is filtering, at the mail
22030 server or when you sort through incoming mail.  If you get 200 spam
22031 messages per day from @samp{random-address@@vmadmin.com}, you block
22032 @samp{vmadmin.com}.  If you get 200 messages about @samp{VIAGRA}, you
22033 discard all messages with @samp{VIAGRA} in the message.  If you get
22034 lots of spam from Bulgaria, for example, you try to filter all mail
22035 from Bulgarian IPs.  
22036
22037 This, unfortunately, is a great way to discard legitimate e-mail.  The
22038 risks of blocking a whole country (Bulgaria, Norway, Nigeria, China,
22039 etc.) or even a continent (Asia, Africa, Europe, etc.) from contacting
22040 you should be obvious, so don't do it if you have the choice.
22041
22042 In another instance, the very informative and useful RISKS digest has
22043 been blocked by overzealous mail filters because it @strong{contained}
22044 words that were common in spam messages.  Nevertheless, in isolated
22045 cases, with great care, direct filtering of mail can be useful.
22046
22047 Another approach to filtering e-mail is the distributed spam
22048 processing, for instance DCC implements such a system.  In essence,
22049 @var{N} systems around the world agree that a machine @var{X} in
22050 Ghana, Estonia, or California is sending out spam e-mail, and these
22051 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into a
22052 database.  The criteria for spam detection vary---it may be the number
22053 of messages sent, the content of the messages, and so on.  When a user
22054 of the distributed processing system wants to find out if a message is
22055 spam, he consults one of those @var{N} systems.
22056
22057 Distributed spam processing works very well against spammers that send
22058 a large number of messages at once, but it requires the user to set up
22059 fairly complicated checks.  There are commercial and free distributed
22060 spam processing systems.  Distributed spam processing has its risks as
22061 well.  For instance legitimate e-mail senders have been accused of
22062 sending spam, and their web sites and mailing lists have been shut
22063 down for some time because of the incident.
22064
22065 The statistical approach to spam filtering is also popular.  It is
22066 based on a statistical analysis of previous spam messages.  Usually
22067 the analysis is a simple word frequency count, with perhaps pairs of
22068 words or 3-word combinations thrown into the mix.  Statistical
22069 analysis of spam works very well in most of the cases, but it can
22070 classify legitimate e-mail as spam in some cases.  It takes time to
22071 run the analysis, the full message must be analyzed, and the user has
22072 to store the database of spam analyses.  Statistical analysis on the
22073 server is gaining popularity.  This has the advantage of letting the
22074 user Just Read Mail, but has the disadvantage that it's harder to tell
22075 the server that it has misclassified mail.
22076
22077 Fighting spam is not easy, no matter what anyone says.  There is no
22078 magic switch that will distinguish Viagra ads from Mom's e-mails.
22079 Even people are having a hard time telling spam apart from non-spam,
22080 because spammers are actively looking to fool us into thinking they
22081 are Mom, essentially.  Spamming is irritating, irresponsible, and
22082 idiotic behavior from a bunch of people who think the world owes them
22083 a favor.  We hope the following sections will help you in fighting the
22084 spam plague.
22085
22086 @node Anti-Spam Basics
22087 @subsection Anti-Spam Basics
22088 @cindex email spam
22089 @cindex spam
22090 @cindex UCE
22091 @cindex unsolicited commercial email
22092
22093 One way of dealing with spam is having Gnus split out all spam into a
22094 @samp{spam} mail group (@pxref{Splitting Mail}).
22095
22096 First, pick one (1) valid mail address that you can be reached at, and
22097 put it in your @code{From} header of all your news articles.  (I've
22098 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
22099 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
22100 sysadmin whether your sendmail installation accepts keywords in the local
22101 part of the mail address.)
22102
22103 @lisp
22104 (setq message-default-news-headers
22105       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
22106 @end lisp
22107
22108 Then put the following split rule in @code{nnmail-split-fancy}
22109 (@pxref{Fancy Mail Splitting}):
22110
22111 @lisp
22112 (...
22113  (to "larsi@@trym.ifi.uio.no"
22114      (| ("subject" "re:.*" "misc")
22115         ("references" ".*@@.*" "misc")
22116         "spam"))
22117  ...)
22118 @end lisp
22119
22120 This says that all mail to this address is suspect, but if it has a
22121 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
22122 header, it's probably ok.  All the rest goes to the @samp{spam} group.
22123 (This idea probably comes from Tim Pierce.)
22124
22125 In addition, many mail spammers talk directly to your @acronym{SMTP} server
22126 and do not include your email address explicitly in the @code{To}
22127 header.  Why they do this is unknown---perhaps it's to thwart this
22128 thwarting scheme?  In any case, this is trivial to deal with---you just
22129 put anything not addressed to you in the @samp{spam} group by ending
22130 your fancy split rule in this way:
22131
22132 @lisp
22133 (
22134  ...
22135  (to "larsi" "misc")
22136  "spam")
22137 @end lisp
22138
22139 In my experience, this will sort virtually everything into the right
22140 group.  You still have to check the @samp{spam} group from time to time to
22141 check for legitimate mail, though.  If you feel like being a good net
22142 citizen, you can even send off complaints to the proper authorities on
22143 each unsolicited commercial email---at your leisure.
22144
22145 This works for me.  It allows people an easy way to contact me (they can
22146 just press @kbd{r} in the usual way), and I'm not bothered at all with
22147 spam.  It's a win-win situation.  Forging @code{From} headers to point
22148 to non-existent domains is yucky, in my opinion.
22149
22150 Be careful with this approach.  Spammers are wise to it.
22151
22152
22153 @node SpamAssassin
22154 @subsection SpamAssassin, Vipul's Razor, DCC, etc
22155 @cindex SpamAssassin
22156 @cindex Vipul's Razor
22157 @cindex DCC
22158
22159 The days where the hints in the previous section were sufficient in
22160 avoiding spam are coming to an end.  There are many tools out there
22161 that claim to reduce the amount of spam you get.  This section could
22162 easily become outdated fast, as new products replace old, but
22163 fortunately most of these tools seem to have similar interfaces.  Even
22164 though this section will use SpamAssassin as an example, it should be
22165 easy to adapt it to most other tools.
22166
22167 Note that this section does not involve the @code{spam.el} package,
22168 which is discussed in the next section.  If you don't care for all
22169 the features of @code{spam.el}, you can make do with these simple
22170 recipes.
22171
22172 If the tool you are using is not installed on the mail server, you
22173 need to invoke it yourself.  Ideas on how to use the
22174 @code{:postscript} mail source parameter (@pxref{Mail Source
22175 Specifiers}) follow.
22176
22177 @lisp
22178 (setq mail-sources
22179       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
22180         (pop :user "jrl"
22181              :server "pophost"
22182              :postscript
22183              "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
22184 @end lisp
22185
22186 Once you manage to process your incoming spool somehow, thus making
22187 the mail contain e.g.@: a header indicating it is spam, you are ready to
22188 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
22189
22190 @lisp
22191 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
22192                              ...))
22193 @end lisp
22194
22195 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
22196
22197 @lisp
22198 (setq nnmail-split-methods 'nnmail-split-fancy
22199       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
22200                              ...))
22201 @end lisp
22202
22203 Some people might not like the idea of piping the mail through various
22204 programs using a @code{:prescript} (if some program is buggy, you
22205 might lose all mail).  If you are one of them, another solution is to
22206 call the external tools during splitting.  Example fancy split method:
22207
22208 @lisp
22209 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
22210                              ...))
22211 (defun kevin-spamassassin ()
22212   (save-excursion
22213     (save-restriction
22214       (widen)
22215       (if (eq 1 (call-process-region (point-min) (point-max)
22216                                      "spamc" nil nil nil "-c"))
22217           "spam"))))
22218 @end lisp
22219
22220 Note that with the nnimap backend, message bodies will not be
22221 downloaded by default.  You need to set
22222 @code{nnimap-split-download-body} to @code{t} to do that
22223 (@pxref{Splitting in IMAP}).
22224
22225 That is about it.  As some spam is likely to get through anyway, you
22226 might want to have a nifty function to call when you happen to read
22227 spam.  And here is the nifty function:
22228
22229 @lisp
22230  (defun my-gnus-raze-spam ()
22231   "Submit SPAM to Vipul's Razor, then mark it as expirable."
22232   (interactive)
22233   (gnus-summary-show-raw-article)
22234   (gnus-summary-save-in-pipe "razor-report -f -d")
22235   (gnus-summary-mark-as-expirable 1))
22236 @end lisp
22237
22238 @node Hashcash
22239 @subsection Hashcash
22240 @cindex hashcash
22241
22242 A novel technique to fight spam is to require senders to do something
22243 costly for each message they send.  This has the obvious drawback that
22244 you cannot rely on everyone in the world using this technique,
22245 since it is not part of the Internet standards, but it may be useful
22246 in smaller communities.
22247
22248 While the tools in the previous section work well in practice, they
22249 work only because the tools are constantly maintained and updated as
22250 new form of spam appears.  This means that a small percentage of spam
22251 will always get through.  It also means that somewhere, someone needs
22252 to read lots of spam to update these tools.  Hashcash avoids that, but
22253 instead prefers that everyone you contact through e-mail supports the
22254 scheme.  You can view the two approaches as pragmatic vs dogmatic.
22255 The approaches have their own advantages and disadvantages, but as
22256 often in the real world, a combination of them is stronger than either
22257 one of them separately.
22258
22259 @cindex X-Hashcash
22260 The ``something costly'' is to burn CPU time, more specifically to
22261 compute a hash collision up to a certain number of bits.  The
22262 resulting hashcash cookie is inserted in a @samp{X-Hashcash:}
22263 header.  For more details, and for the external application
22264 @code{hashcash} you need to install to use this feature, see
22265 @uref{http://www.cypherspace.org/~adam/hashcash/}.  Even more
22266 information can be found at @uref{http://www.camram.org/}.
22267
22268 If you wish to call hashcash for each message you send, say something
22269 like:
22270
22271 @lisp
22272 (require 'hashcash)
22273 (add-hook 'message-send-hook 'mail-add-payment)
22274 @end lisp
22275
22276 The @file{hashcash.el} library can be found in the Gnus development
22277 contrib directory or at
22278 @uref{http://users.actrix.gen.nz/mycroft/hashcash.el}.
22279
22280 You will need to set up some additional variables as well:
22281
22282 @table @code
22283
22284 @item hashcash-default-payment
22285 @vindex hashcash-default-payment
22286 This variable indicates the default number of bits the hash collision
22287 should consist of.  By default this is 0, meaning nothing will be
22288 done.  Suggested useful values include 17 to 29.
22289
22290 @item hashcash-payment-alist
22291 @vindex hashcash-payment-alist
22292 Some receivers may require you to spend burn more CPU time than the
22293 default.  This variable contains a list of @samp{(@var{addr}
22294 @var{amount})} cells, where @var{addr} is the receiver (email address
22295 or newsgroup) and @var{amount} is the number of bits in the collision
22296 that is needed.  It can also contain @samp{(@var{addr} @var{string}
22297 @var{amount})} cells, where the @var{string} is the string to use
22298 (normally the email address or newsgroup name is used).
22299
22300 @item hashcash
22301 @vindex hashcash
22302 Where the @code{hashcash} binary is installed.
22303
22304 @end table
22305
22306 Currently there is no built in functionality in Gnus to verify
22307 hashcash cookies, it is expected that this is performed by your hand
22308 customized mail filtering scripts.  Improvements in this area would be
22309 a useful contribution, however.
22310
22311 @node Filtering Spam Using The Spam ELisp Package
22312 @subsection Filtering Spam Using The Spam ELisp Package
22313 @cindex spam filtering
22314 @cindex spam
22315
22316 The idea behind @file{spam.el} is to have a control center for spam detection
22317 and filtering in Gnus.  To that end, @file{spam.el} does two things: it
22318 filters new mail, and it analyzes mail known to be spam or ham.
22319 @dfn{Ham} is the name used throughout @file{spam.el} to indicate
22320 non-spam messages.
22321
22322 First of all, you @strong{must} run the function
22323 @code{spam-initialize} to autoload @code{spam.el} and to install the
22324 @code{spam.el} hooks.  There is one exception: if you use the
22325 @code{spam-use-stat} (@pxref{spam-stat spam filtering}) setting, you
22326 should turn it on before @code{spam-initialize}:
22327
22328 @example
22329 (setq spam-use-stat t) ;; if needed
22330 (spam-initialize)
22331 @end example
22332
22333 So, what happens when you load @file{spam.el}?
22334
22335 First, some hooks will get installed by @code{spam-initialize}.  There
22336 are some hooks for @code{spam-stat} so it can save its databases, and
22337 there are hooks so interesting things will happen when you enter and
22338 leave a group.  More on the sequence of events later (@pxref{Spam
22339 ELisp Package Sequence of Events}).
22340
22341 You get the following keyboard commands:
22342
22343 @table @kbd
22344
22345 @item M-d
22346 @itemx M s x
22347 @itemx S x
22348 @kindex M-d
22349 @kindex S x
22350 @kindex M s x
22351 @findex gnus-summary-mark-as-spam
22352 @code{gnus-summary-mark-as-spam}.
22353
22354 Mark current article as spam, showing it with the @samp{$} mark.
22355 Whenever you see a spam article, make sure to mark its summary line
22356 with @kbd{M-d} before leaving the group.  This is done automatically
22357 for unread articles in @emph{spam} groups.
22358
22359 @item M s t
22360 @itemx S t
22361 @kindex M s t
22362 @kindex S t
22363 @findex spam-bogofilter-score
22364 @code{spam-bogofilter-score}.
22365
22366 You must have Bogofilter installed for that command to work properly.
22367
22368 @xref{Bogofilter}.
22369
22370 @end table
22371
22372 Also, when you load @file{spam.el}, you will be able to customize its
22373 variables.  Try @code{customize-group} on the @samp{spam} variable
22374 group.
22375
22376 @menu
22377 * Spam ELisp Package Sequence of Events::  
22378 * Spam ELisp Package Filtering of Incoming Mail::  
22379 * Spam ELisp Package Global Variables::  
22380 * Spam ELisp Package Configuration Examples::  
22381 * Blacklists and Whitelists::   
22382 * BBDB Whitelists::             
22383 * Gmane Spam Reporting::        
22384 * Anti-spam Hashcash Payments::  
22385 * Blackholes::                  
22386 * Regular Expressions Header Matching::  
22387 * Bogofilter::                  
22388 * ifile spam filtering::        
22389 * spam-stat spam filtering::    
22390 * SpamOracle::                  
22391 * Extending the Spam ELisp package::  
22392 @end menu 
22393
22394 @node Spam ELisp Package Sequence of Events
22395 @subsubsection Spam ELisp Package Sequence of Events
22396 @cindex spam filtering
22397 @cindex spam filtering sequence of events
22398 @cindex spam
22399
22400 You must read this section to understand how @code{spam.el} works.
22401 Do not skip, speed-read, or glance through this section.
22402
22403 There are two @emph{contact points}, if you will, between
22404 @code{spam.el} and the rest of Gnus: checking new mail for spam, and
22405 leaving a group.
22406
22407 Getting new mail is done in one of two ways.  You can either split
22408 your incoming mail or you can classify new articles as ham or spam
22409 when you enter the group.
22410
22411 Splitting incoming mail is better suited to mail backends such as
22412 @code{nnml} or @code{nnimap} where new mail appears in a single file
22413 called a @dfn{Spool File}.  See @xref{Spam ELisp Package Filtering of
22414 Incoming Mail}.
22415
22416 For backends such as @code{nntp} there is no incoming mail spool, so
22417 an alternate mechanism must be used.  This may also happen for
22418 backends where the server is in charge of splitting incoming mail, and
22419 Gnus does not do further splitting.  The @code{spam-autodetect} and
22420 @code{spam-autodetect-methods} group parameters (accessible with
22421 @kbd{G c} and @kbd{G p} as usual), and the corresponding variables
22422 @code{gnus-spam-autodetect} and
22423 @code{gnus-spam-autodetect-methods} (accessible with @kbd{M-x
22424 customize-variable} as usual).
22425
22426 When @code{spam-autodetect} is used, it hooks into the process of
22427 entering a group.  Thus, entering a group with unseen or unread
22428 articles becomes the substitute for checking incoming mail.  Whether
22429 only unseen articles or all unread articles will be processed is
22430 determined by the @code{spam-autodetect-recheck-messages}.  When set
22431 to @code{t}, unread messages will be rechecked.
22432
22433 @code{spam-autodetect} grants the user at once more and less control
22434 of spam filtering.  The user will have more control over each group's
22435 spam methods, so for instance the @samp{ding} group may have
22436 @code{spam-use-BBDB} as the autodetection method, while the
22437 @samp{suspect} group may have the @code{spam-use-blacklist} and
22438 @code{spam-use-bogofilter} methods enabled.  Every article detected to
22439 be spam will be marked with the spam mark @samp{$} and processed on
22440 exit from the group as normal spam.  The user has less control over
22441 the @emph{sequence} of checks, as he might with @code{spam-split}.
22442
22443 When the newly split mail goes into groups, or messages are
22444 autodetected to be ham or spam, those groups must be exited (after
22445 entering, if needed) for further spam processing to happen.  It
22446 matters whether the group is considered a ham group, a spam group, or
22447 is unclassified, based on its @code{spam-content} parameter
22448 (@pxref{Spam ELisp Package Global Variables}).  Spam groups have the
22449 additional characteristic that, when entered, any unseen or unread
22450 articles (depending on the @code{spam-mark-only-unseen-as-spam}
22451 variable) will be marked as spam.  Thus, mail split into a spam group
22452 gets automatically marked as spam when you enter the group.
22453
22454 So, when you exit a group, the @code{spam-processors} are applied, if
22455 any are set, and the processed mail is moved to the
22456 @code{ham-process-destination} or the @code{spam-process-destination}
22457 depending on the article's classification.  If the
22458 @code{ham-process-destination} or the @code{spam-process-destination},
22459 whichever is appropriate, are @code{nil}, the article is left in the
22460 current group.
22461
22462 If a spam is found in any group (this can be changed to only non-spam
22463 groups with @code{spam-move-spam-nonspam-groups-only}), it is
22464 processed by the active @code{spam-processors} (@pxref{Spam ELisp
22465 Package Global Variables}) when the group is exited.  Furthermore, the
22466 spam is moved to the @code{spam-process-destination} (@pxref{Spam
22467 ELisp Package Global Variables}) for further training or deletion.
22468 You have to load the @code{gnus-registry.el} package and enable the
22469 @code{spam-log-to-registry} variable if you want spam to be processed
22470 no more than once.  Thus, spam is detected and processed everywhere,
22471 which is what most people want.  If the
22472 @code{spam-process-destination} is @code{nil}, the spam is marked as
22473 expired, which is usually the right thing to do.
22474
22475 If spam can not be moved---because of a read-only backend such as
22476 @acronym{NNTP}, for example, it will be copied.
22477
22478 If a ham mail is found in a ham group, as determined by the
22479 @code{ham-marks} parameter, it is processed as ham by the active ham
22480 @code{spam-processor} when the group is exited.  With the variables
22481 @code{spam-process-ham-in-spam-groups} and
22482 @code{spam-process-ham-in-nonham-groups} the behavior can be further
22483 altered so ham found anywhere can be processed.  You have to load the
22484 @code{gnus-registry.el} package and enable the
22485 @code{spam-log-to-registry} variable if you want ham to be processed
22486 no more than once.  Thus, ham is detected and processed only when
22487 necessary, which is what most people want.  More on this in
22488 @xref{Spam ELisp Package Configuration Examples}.
22489
22490 If ham can not be moved---because of a read-only backend such as
22491 @acronym{NNTP}, for example, it will be copied.
22492
22493 If all this seems confusing, don't worry.  Soon it will be as natural
22494 as typing Lisp one-liners on a neural interface@dots{} err, sorry, that's
22495 50 years in the future yet.  Just trust us, it's not so bad.
22496
22497 @node Spam ELisp Package Filtering of Incoming Mail
22498 @subsubsection Spam ELisp Package Filtering of Incoming Mail
22499 @cindex spam filtering
22500 @cindex spam filtering incoming mail
22501 @cindex spam
22502
22503 To use the @file{spam.el} facilities for incoming mail filtering, you
22504 must add the following to your fancy split list
22505 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}:
22506
22507 @example
22508 (: spam-split)
22509 @end example
22510
22511 Note that the fancy split may be called @code{nnmail-split-fancy} or
22512 @code{nnimap-split-fancy}, depending on whether you use the nnmail or
22513 nnimap back ends to retrieve your mail.
22514
22515 Also, @code{spam-split} will not modify incoming mail in any way.
22516
22517 The @code{spam-split} function will process incoming mail and send the
22518 mail considered to be spam into the group name given by the variable
22519 @code{spam-split-group}.  By default that group name is @samp{spam},
22520 but you can customize @code{spam-split-group}.  Make sure the contents
22521 of @code{spam-split-group} are an @emph{unqualified} group name, for
22522 instance in an @code{nnimap} server @samp{your-server} the value
22523 @samp{spam} will turn out to be @samp{nnimap+your-server:spam}.  The
22524 value @samp{nnimap+server:spam}, therefore, is wrong and will
22525 actually give you the group
22526 @samp{nnimap+your-server:nnimap+server:spam} which may or may not
22527 work depending on your server's tolerance for strange group names.
22528
22529 You can also give @code{spam-split} a parameter,
22530 e.g. @code{spam-use-regex-headers} or @code{"maybe-spam"}.  Why is
22531 this useful?
22532
22533 Take these split rules (with @code{spam-use-regex-headers} and
22534 @code{spam-use-blackholes} set):
22535
22536 @example
22537  nnimap-split-fancy '(|
22538                       (any "ding" "ding")
22539                       (: spam-split)
22540                       ;; @r{default mailbox}
22541                       "mail")
22542 @end example
22543
22544 Now, the problem is that you want all ding messages to make it to the
22545 ding folder.  But that will let obvious spam (for example, spam
22546 detected by SpamAssassin, and @code{spam-use-regex-headers}) through,
22547 when it's sent to the ding list.  On the other hand, some messages to
22548 the ding list are from a mail server in the blackhole list, so the
22549 invocation of @code{spam-split} can't be before the ding rule.
22550
22551 You can let SpamAssassin headers supersede ding rules, but all other
22552 @code{spam-split} rules (including a second invocation of the
22553 regex-headers check) will be after the ding rule:
22554
22555 @example
22556 nnimap-split-fancy
22557       '(|
22558         ;; @r{all spam detected by @code{spam-use-regex-headers} goes to @samp{regex-spam}}
22559         (: spam-split "regex-spam" 'spam-use-regex-headers)
22560         (any "ding" "ding")
22561         ;; @r{all other spam detected by spam-split goes to @code{spam-split-group}}
22562         (: spam-split)
22563         ;; @r{default mailbox}
22564         "mail")
22565 @end example
22566
22567 This lets you invoke specific @code{spam-split} checks depending on
22568 your particular needs, and to target the results of those checks to a
22569 particular spam group.  You don't have to throw all mail into all the
22570 spam tests.  Another reason why this is nice is that messages to
22571 mailing lists you have rules for don't have to have resource-intensive
22572 blackhole checks performed on them.  You could also specify different
22573 spam checks for your nnmail split vs. your nnimap split.  Go crazy.
22574
22575 You should still have specific checks such as
22576 @code{spam-use-regex-headers} set to @code{t}, even if you
22577 specifically invoke @code{spam-split} with the check.  The reason is
22578 that when loading @file{spam.el}, some conditional loading is done
22579 depending on what @code{spam-use-xyz} variables you have set.  This
22580 is usually not critical, though.
22581
22582 @emph{Note for IMAP users}
22583
22584 The boolean variable @code{nnimap-split-download-body} needs to be
22585 set, if you want to split based on the whole message instead of just
22586 the headers.  By default, the nnimap back end will only retrieve the
22587 message headers.  If you use @code{spam-check-bogofilter},
22588 @code{spam-check-ifile}, or @code{spam-check-stat} (the splitters that
22589 can benefit from the full message body), you should set this variable.
22590 It is not set by default because it will slow @acronym{IMAP} down, and
22591 that is not an appropriate decision to make on behalf of the user.
22592
22593 @xref{Splitting in IMAP}.
22594
22595 @emph{TODO: spam.el needs to provide a uniform way of training all the
22596 statistical databases.  Some have that functionality built-in, others
22597 don't.}
22598
22599 @node Spam ELisp Package Global Variables
22600 @subsubsection Spam ELisp Package Global Variables
22601 @cindex spam filtering
22602 @cindex spam filtering variables
22603 @cindex spam variables
22604 @cindex spam
22605
22606 @vindex gnus-spam-process-newsgroups
22607 The concepts of ham processors and spam processors are very important.
22608 Ham processors and spam processors for a group can be set with the
22609 @code{spam-process} group parameter, or the
22610 @code{gnus-spam-process-newsgroups} variable.  Ham processors take
22611 mail known to be non-spam (@emph{ham}) and process it in some way so
22612 that later similar mail will also be considered non-spam.  Spam
22613 processors take mail known to be spam and process it so similar spam
22614 will be detected later.
22615
22616 The format of the spam or ham processor entry used to be a symbol,
22617 but now it is a @sc{cons} cell.  See the individual spam processor entries
22618 for more information.
22619
22620 @vindex gnus-spam-newsgroup-contents
22621 Gnus learns from the spam you get.  You have to collect your spam in
22622 one or more spam groups, and set or customize the variable
22623 @code{spam-junk-mailgroups} as appropriate.  You can also declare
22624 groups to contain spam by setting their group parameter
22625 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
22626 by customizing the corresponding variable
22627 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
22628 parameter and the @code{gnus-spam-newsgroup-contents} variable can
22629 also be used to declare groups as @emph{ham} groups if you set their
22630 classification to @code{gnus-group-spam-classification-ham}.  If
22631 groups are not classified by means of @code{spam-junk-mailgroups},
22632 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
22633 considered @emph{unclassified}.  All groups are unclassified by
22634 default.
22635
22636 @vindex gnus-spam-mark
22637 @cindex $
22638 In spam groups, all messages are considered to be spam by default:
22639 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
22640 group.  If you have seen a message, had it marked as spam, then
22641 unmarked it, it won't be marked as spam when you enter the group
22642 thereafter.  You can disable that behavior, so all unread messages
22643 will get the @samp{$} mark, if you set the
22644 @code{spam-mark-only-unseen-as-spam} parameter to @code{nil}.  You
22645 should remove the @samp{$} mark when you are in the group summary
22646 buffer for every message that is not spam after all.  To remove the
22647 @samp{$} mark, you can use @kbd{M-u} to ``unread'' the article, or
22648 @kbd{d} for declaring it read the non-spam way.  When you leave a
22649 group, all spam-marked (@samp{$}) articles are sent to a spam
22650 processor which will study them as spam samples.
22651
22652 Messages may also be deleted in various other ways, and unless
22653 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
22654 and @samp{r} for default read or explicit delete, marks @samp{X} and
22655 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
22656 low scores, are all considered to be associated with articles which
22657 are not spam.  This assumption might be false, in particular if you
22658 use kill files or score files as means for detecting genuine spam, you
22659 should then adjust the @code{ham-marks} group parameter.
22660
22661 @defvar ham-marks
22662 You can customize this group or topic parameter to be the list of
22663 marks you want to consider ham.  By default, the list contains the
22664 deleted, read, killed, kill-filed, and low-score marks (the idea is
22665 that these articles have been read, but are not spam).  It can be
22666 useful to also include the tick mark in the ham marks.  It is not
22667 recommended to make the unread mark a ham mark, because it normally
22668 indicates a lack of classification.  But you can do it, and we'll be
22669 happy for you.
22670 @end defvar
22671
22672 @defvar spam-marks
22673 You can customize this group or topic parameter to be the list of
22674 marks you want to consider spam.  By default, the list contains only
22675 the spam mark.  It is not recommended to change that, but you can if
22676 you really want to.
22677 @end defvar
22678
22679 When you leave @emph{any} group, regardless of its
22680 @code{spam-contents} classification, all spam-marked articles are sent
22681 to a spam processor, which will study these as spam samples.  If you
22682 explicit kill a lot, you might sometimes end up with articles marked
22683 @samp{K} which you never saw, and which might accidentally contain
22684 spam.  Best is to make sure that real spam is marked with @samp{$},
22685 and nothing else.
22686
22687 @vindex gnus-ham-process-destinations
22688 When you leave a @emph{spam} group, all spam-marked articles are
22689 marked as expired after processing with the spam processor.  This is
22690 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
22691 @strong{ham} articles in a spam group will be moved to a location
22692 determined by either the @code{ham-process-destination} group
22693 parameter or a match in the @code{gnus-ham-process-destinations}
22694 variable, which is a list of regular expressions matched with group
22695 names (it's easiest to customize this variable with @kbd{M-x
22696 customize-variable @key{RET} gnus-ham-process-destinations}).  Each
22697 newsgroup specification has the format @code{(@var{regexp}
22698 @var{processor})} in a standard Lisp list, if you prefer to customize
22699 the variable manually.  The ultimate location is a group name or
22700 names.  If the @code{ham-process-destination} parameter is not set,
22701 ham articles are left in place.  If the
22702 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
22703 set, the ham articles are marked as unread before being moved.
22704
22705 If ham can not be moved---because of a read-only backend such as
22706 @acronym{NNTP}, for example, it will be copied.
22707
22708 Note that you can use multiples destinations per group or regular
22709 expression!  This enables you to send your ham to a regular mail
22710 group and to a @emph{ham training} group.
22711
22712 When you leave a @emph{ham} group, all ham-marked articles are sent to
22713 a ham processor, which will study these as non-spam samples.
22714
22715 @vindex spam-process-ham-in-spam-groups
22716 By default the variable @code{spam-process-ham-in-spam-groups} is
22717 @code{nil}.  Set it to @code{t} if you want ham found in spam groups
22718 to be processed.  Normally this is not done, you are expected instead
22719 to send your ham to a ham group and process it there.
22720
22721 @vindex spam-process-ham-in-nonham-groups
22722 By default the variable @code{spam-process-ham-in-nonham-groups} is
22723 @code{nil}.  Set it to @code{t} if you want ham found in non-ham (spam
22724 or unclassified) groups to be processed.  Normally this is not done,
22725 you are expected instead to send your ham to a ham group and process
22726 it there.
22727
22728 @vindex gnus-spam-process-destinations
22729 When you leave a @emph{ham} or @emph{unclassified} group, all
22730 @strong{spam} articles are moved to a location determined by either
22731 the @code{spam-process-destination} group parameter or a match in the
22732 @code{gnus-spam-process-destinations} variable, which is a list of
22733 regular expressions matched with group names (it's easiest to
22734 customize this variable with @kbd{M-x customize-variable @key{RET}
22735 gnus-spam-process-destinations}).  Each newsgroup specification has
22736 the repeated format @code{(@var{regexp} @var{group})} and they are all
22737 in a standard Lisp list, if you prefer to customize the variable
22738 manually.  The ultimate location is a group name or names.  If the
22739 @code{spam-process-destination} parameter is not set, the spam
22740 articles are only expired.  The group name is fully qualified, meaning
22741 that if you see @samp{nntp:servername} before the group name in the
22742 group buffer then you need it here as well.
22743
22744 If spam can not be moved---because of a read-only backend such as
22745 @acronym{NNTP}, for example, it will be copied.
22746
22747 Note that you can use multiples destinations per group or regular
22748 expression!  This enables you to send your spam to multiple @emph{spam
22749 training} groups.
22750
22751 @vindex spam-log-to-registry
22752 The problem with processing ham and spam is that Gnus doesn't track
22753 this processing by default.  Enable the @code{spam-log-to-registry}
22754 variable so @code{spam.el} will use @code{gnus-registry.el} to track
22755 what articles have been processed, and avoid processing articles
22756 multiple times.  Keep in mind that if you limit the number of registry
22757 entries, this won't work as well as it does without a limit.
22758
22759 @vindex spam-mark-only-unseen-as-spam
22760 Set this variable if you want only unseen articles in spam groups to
22761 be marked as spam.  By default, it is set.  If you set it to
22762 @code{nil}, unread articles will also be marked as spam.
22763
22764 @vindex spam-mark-ham-unread-before-move-from-spam-group
22765 Set this variable if you want ham to be unmarked before it is moved
22766 out of the spam group.  This is very useful when you use something
22767 like the tick mark @samp{!} to mark ham---the article will be placed
22768 in your @code{ham-process-destination}, unmarked as if it came fresh
22769 from the mail server.
22770
22771 @vindex spam-autodetect-recheck-messages
22772 When autodetecting spam, this variable tells @code{spam.el} whether
22773 only unseen articles or all unread articles should be checked for
22774 spam.  It is recommended that you leave it off.
22775
22776 @node Spam ELisp Package Configuration Examples
22777 @subsubsection Spam ELisp Package Configuration Examples
22778 @cindex spam filtering
22779 @cindex spam filtering configuration examples
22780 @cindex spam configuration examples
22781 @cindex spam
22782
22783 @subsubheading Ted's setup
22784
22785 From Ted Zlatanov <tzz@@lifelogs.com>.
22786 @example
22787 ;; @r{for @code{gnus-registry-split-fancy-with-parent} and spam autodetection}
22788 ;; @r{see @file{gnus-registry.el} for more information}
22789 (gnus-registry-initialize)
22790 (spam-initialize)
22791
22792 ;; @r{I like @kbd{C-s} for marking spam}
22793 (define-key gnus-summary-mode-map "\C-s" 'gnus-summary-mark-as-spam)
22794
22795 (setq
22796  spam-log-to-registry t     ; @r{for spam autodetection}
22797  spam-use-BBDB t
22798  spam-use-regex-headers t   ; @r{catch X-Spam-Flag (SpamAssassin)}
22799  ;; @r{all groups with @samp{spam} in the name contain spam}
22800  gnus-spam-newsgroup-contents
22801   '(("spam" gnus-group-spam-classification-spam))
22802  ;; @r{see documentation for these}
22803  spam-move-spam-nonspam-groups-only nil
22804  spam-mark-only-unseen-as-spam t
22805  spam-mark-ham-unread-before-move-from-spam-group t
22806  nnimap-split-rule 'nnimap-split-fancy
22807  ;; @r{understand what this does before you copy it to your own setup!}
22808  nnimap-split-fancy '(|
22809                       ;; @r{trace references to parents and put in their group}
22810                       (: gnus-registry-split-fancy-with-parent)
22811                       ;; @r{this will catch server-side SpamAssassin tags}
22812                       (: spam-split 'spam-use-regex-headers)
22813                       (any "ding" "ding")
22814                       ;; @r{note that spam by default will go to @samp{spam}}
22815                       (: spam-split)
22816                       ;; @r{default mailbox}
22817                       "mail"))
22818
22819 ;; @r{my parameters, set with @kbd{G p}}
22820
22821 ;; @r{all nnml groups, and all nnimap groups except}
22822 ;; @r{@samp{nnimap+mail.lifelogs.com:train} and}
22823 ;; @r{@samp{nnimap+mail.lifelogs.com:spam}: any spam goes to nnimap training,}
22824 ;; @r{because it must have been detected manually}
22825
22826 ((spam-process-destination . "nnimap+mail.lifelogs.com:train"))
22827
22828 ;; @r{all @acronym{NNTP} groups}
22829 ;; @r{autodetect spam with the blacklist and ham with the BBDB}
22830 ((spam-autodetect-methods spam-use-blacklist spam-use-BBDB)
22831 ;; @r{send all spam to the training group}
22832  (spam-process-destination . "nnimap+mail.lifelogs.com:train"))
22833
22834 ;; @r{only some @acronym{NNTP} groups, where I want to autodetect spam}
22835 ((spam-autodetect . t))
22836
22837 ;; @r{my nnimap @samp{nnimap+mail.lifelogs.com:spam} group}
22838
22839 ;; @r{this is a spam group}
22840 ((spam-contents gnus-group-spam-classification-spam)
22841
22842  ;; @r{any spam (which happens when I enter for all unseen messages,}
22843  ;; @r{because of the @code{gnus-spam-newsgroup-contents} setting above), goes to}
22844  ;; @r{@samp{nnimap+mail.lifelogs.com:train} unless I mark it as ham}
22845
22846  (spam-process-destination "nnimap+mail.lifelogs.com:train")
22847
22848  ;; @r{any ham goes to my @samp{nnimap+mail.lifelogs.com:mail} folder, but}
22849  ;; @r{also to my @samp{nnimap+mail.lifelogs.com:trainham} folder for training}
22850
22851  (ham-process-destination "nnimap+mail.lifelogs.com:mail" 
22852                           "nnimap+mail.lifelogs.com:trainham")
22853  ;; @r{in this group, only @samp{!} marks are ham}
22854  (ham-marks
22855   (gnus-ticked-mark))
22856  ;; @r{remembers senders in the blacklist on the way out---this is}
22857  ;; @r{definitely not needed, it just makes me feel better}
22858  (spam-process (gnus-group-spam-exit-processor-blacklist)))
22859
22860 ;; @r{Later, on the @acronym{IMAP} server I use the @samp{train} group for training}
22861 ;; @r{SpamAssassin to recognize spam, and the @samp{trainham} group fora}
22862 ;; @r{recognizing ham---but Gnus has nothing to do with it.}
22863
22864 @end example
22865
22866 @subsubheading Using @file{spam.el} on an IMAP server with a statistical filter on the server
22867 From Reiner Steib <reiner.steib@@gmx.de>.
22868
22869 My provider has set up bogofilter (in combination with @acronym{DCC}) on
22870 the mail server (@acronym{IMAP}).  Recognized spam goes to
22871 @samp{spam.detected}, the rest goes through the normal filter rules,
22872 i.e. to @samp{some.folder} or to @samp{INBOX}.  Training on false
22873 positives or negatives is done by copying or moving the article to
22874 @samp{training.ham} or @samp{training.spam} respectively.  A cron job on
22875 the server feeds those to bogofilter with the suitable ham or spam
22876 options and deletes them from the @samp{training.ham} and
22877 @samp{training.spam} folders.
22878
22879 With the following entries in @code{gnus-parameters}, @code{spam.el}
22880 does most of the job for me:
22881
22882 @lisp
22883    ("nnimap:spam\\.detected"
22884     (gnus-article-sort-functions '(gnus-article-sort-by-chars))
22885     (ham-process-destination "nnimap:INBOX" "nnimap:training.ham")
22886     (spam-contents gnus-group-spam-classification-spam))
22887    ("nnimap:\\(INBOX\\|other-folders\\)"
22888     (spam-process-destination . "nnimap:training.spam")
22889     (spam-contents gnus-group-spam-classification-ham))
22890 @end lisp
22891
22892 @itemize 
22893
22894 @item @b{The Spam folder:}
22895
22896 In the folder @samp{spam.detected}, I have to check for false positives
22897 (i.e. legitimate mails, that were wrongly judged as spam by
22898 bogofilter or DCC).
22899
22900 Because of the @code{gnus-group-spam-classification-spam} entry, all
22901 messages are marked as spam (with @code{$}).  When I find a false
22902 positive, I mark the message with some other ham mark (@code{ham-marks},
22903 @ref{Spam ELisp Package Global Variables}).  On group exit, those
22904 messages are copied to both groups, @samp{INBOX} (where I want to have
22905 the article) and @samp{training.ham} (for training bogofilter) and
22906 deleted from the @samp{spam.detected} folder.
22907
22908 The @code{gnus-article-sort-by-chars} entry simplifies detection of
22909 false positives for me.  I receive lots of worms (sweN, @dots{}), that all
22910 have a similar size.  Grouping them by size (i.e. chars) makes finding
22911 other false positives easier.  (Of course worms aren't @i{spam}
22912 (@acronym{UCE}, @acronym{UBE}) strictly speaking.  Anyhow, bogofilter is
22913 an excellent tool for filtering those unwanted mails for me.)
22914
22915 @item @b{Ham folders:}
22916
22917 In my ham folders, I just hit @kbd{S x}
22918 (@code{gnus-summary-mark-as-spam}) whenever I see an unrecognized spam
22919 mail (false negative).  On group exit, those messages are moved to
22920 @samp{training.ham}.
22921 @end itemize
22922
22923 @subsubheading Reporting spam articles in Gmane groups with @code{spam-report.el}
22924
22925 From Reiner Steib <reiner.steib@@gmx.de>.
22926
22927 With following entry in @code{gnus-parameters}, @kbd{S x}
22928 (@code{gnus-summary-mark-as-spam}) marks articles in @code{gmane.*}
22929 groups as spam and reports the to Gmane at group exit:
22930
22931 @lisp
22932    ("^gmane\\."
22933     (spam-process (gnus-group-spam-exit-processor-report-gmane)))
22934 @end lisp
22935
22936 Additionally, I use @code{(setq spam-report-gmane-use-article-number nil)}
22937 because I don't read the groups directly from news.gmane.org, but
22938 through my local news server (leafnode).  I.e. the article numbers are
22939 not the same as on news.gmane.org, thus @code{spam-report.el} has to check
22940 the @code{X-Report-Spam} header to find the correct number.
22941
22942 @node Blacklists and Whitelists
22943 @subsubsection Blacklists and Whitelists
22944 @cindex spam filtering
22945 @cindex whitelists, spam filtering
22946 @cindex blacklists, spam filtering
22947 @cindex spam
22948
22949 @defvar spam-use-blacklist
22950
22951 Set this variable to @code{t} if you want to use blacklists when
22952 splitting incoming mail.  Messages whose senders are in the blacklist
22953 will be sent to the @code{spam-split-group}.  This is an explicit
22954 filter, meaning that it acts only on mail senders @emph{declared} to
22955 be spammers.
22956
22957 @end defvar
22958
22959 @defvar spam-use-whitelist
22960
22961 Set this variable to @code{t} if you want to use whitelists when
22962 splitting incoming mail.  Messages whose senders are not in the
22963 whitelist will be sent to the next spam-split rule.  This is an
22964 explicit filter, meaning that unless someone is in the whitelist, their
22965 messages are not assumed to be spam or ham.
22966
22967 @end defvar
22968
22969 @defvar spam-use-whitelist-exclusive
22970
22971 Set this variable to @code{t} if you want to use whitelists as an
22972 implicit filter, meaning that every message will be considered spam
22973 unless the sender is in the whitelist.  Use with care.
22974
22975 @end defvar
22976
22977 @defvar gnus-group-spam-exit-processor-blacklist
22978
22979 Add this symbol to a group's @code{spam-process} parameter by
22980 customizing the group parameters or the
22981 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22982 added to a group's @code{spam-process} parameter, the senders of
22983 spam-marked articles will be added to the blacklist.
22984
22985 @emph{WARNING} 
22986
22987 Instead of the obsolete
22988 @code{gnus-group-spam-exit-processor-blacklist}, it is recommended
22989 that you use @code{'(spam spam-use-blacklist)}.  Everything will work
22990 the same way, we promise.
22991
22992 @end defvar
22993
22994 @defvar gnus-group-ham-exit-processor-whitelist
22995
22996 Add this symbol to a group's @code{spam-process} parameter by
22997 customizing the group parameters or the
22998 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
22999 added to a group's @code{spam-process} parameter, the senders of
23000 ham-marked articles in @emph{ham} groups will be added to the
23001 whitelist.  Note that this ham processor has no effect in @emph{spam}
23002 or @emph{unclassified} groups.
23003
23004 @emph{WARNING} 
23005
23006 Instead of the obsolete
23007 @code{gnus-group-ham-exit-processor-whitelist}, it is recommended
23008 that you use @code{'(ham spam-use-whitelist)}.  Everything will work
23009 the same way, we promise.
23010
23011 @end defvar
23012
23013 Blacklists are lists of regular expressions matching addresses you
23014 consider to be spam senders.  For instance, to block mail from any
23015 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
23016 blacklist.  You start out with an empty blacklist.  Blacklist entries
23017 use the Emacs regular expression syntax.
23018
23019 Conversely, whitelists tell Gnus what addresses are considered
23020 legitimate.  All messages from whitelisted addresses are considered
23021 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
23022 Emacs regular expression syntax.
23023
23024 The blacklist and whitelist file locations can be customized with the
23025 @code{spam-directory} variable (@file{~/News/spam} by default), or
23026 the @code{spam-whitelist} and @code{spam-blacklist} variables
23027 directly.  The whitelist and blacklist files will by default be in the
23028 @code{spam-directory} directory, named @file{whitelist} and
23029 @file{blacklist} respectively.
23030
23031 @node BBDB Whitelists
23032 @subsubsection BBDB Whitelists
23033 @cindex spam filtering
23034 @cindex BBDB whitelists, spam filtering
23035 @cindex BBDB, spam filtering
23036 @cindex spam
23037
23038 @defvar spam-use-BBDB
23039
23040 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
23041 Whitelists}), but uses the BBDB as the source of whitelisted
23042 addresses, without regular expressions.  You must have the BBDB loaded
23043 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
23044 not in the BBDB will be sent to the next spam-split rule.  This is an
23045 explicit filter, meaning that unless someone is in the BBDB, their
23046 messages are not assumed to be spam or ham.
23047
23048 @end defvar
23049
23050 @defvar spam-use-BBDB-exclusive
23051
23052 Set this variable to @code{t} if you want to use the BBDB as an
23053 implicit filter, meaning that every message will be considered spam
23054 unless the sender is in the BBDB.  Use with care.  Only sender
23055 addresses in the BBDB will be allowed through; all others will be
23056 classified as spammers.
23057
23058 @end defvar
23059
23060 @defvar gnus-group-ham-exit-processor-BBDB
23061
23062 Add this symbol to a group's @code{spam-process} parameter by
23063 customizing the group parameters or the
23064 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23065 added to a group's @code{spam-process} parameter, the senders of
23066 ham-marked articles in @emph{ham} groups will be added to the
23067 BBDB.  Note that this ham processor has no effect in @emph{spam}
23068 or @emph{unclassified} groups.
23069
23070 @emph{WARNING} 
23071
23072 Instead of the obsolete
23073 @code{gnus-group-ham-exit-processor-BBDB}, it is recommended
23074 that you use @code{'(ham spam-use-BBDB)}.  Everything will work
23075 the same way, we promise.
23076
23077 @end defvar
23078
23079 @node Gmane Spam Reporting
23080 @subsubsection Gmane Spam Reporting
23081 @cindex spam reporting
23082 @cindex Gmane, spam reporting
23083 @cindex Gmane, spam reporting
23084 @cindex spam
23085
23086 @defvar gnus-group-spam-exit-processor-report-gmane
23087
23088 Add this symbol to a group's @code{spam-process} parameter by
23089 customizing the group parameters or the
23090 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23091 added to a group's @code{spam-process} parameter, the spam-marked
23092 articles groups will be reported to the Gmane administrators via a
23093 HTTP request.
23094
23095 Gmane can be found at @uref{http://gmane.org}.
23096
23097 @emph{WARNING} 
23098
23099 Instead of the obsolete
23100 @code{gnus-group-spam-exit-processor-report-gmane}, it is recommended
23101 that you use @code{'(spam spam-use-gmane)}.  Everything will work the
23102 same way, we promise.
23103
23104 @end defvar
23105
23106 @defvar spam-report-gmane-use-article-number
23107
23108 This variable is @code{t} by default.  Set it to @code{nil} if you are
23109 running your own news server, for instance, and the local article
23110 numbers don't correspond to the Gmane article numbers.  When
23111 @code{spam-report-gmane-use-article-number} is @code{nil},
23112 @code{spam-report.el} will use the @code{X-Report-Spam} header that
23113 Gmane provides.
23114
23115 @end defvar
23116
23117 @node Anti-spam Hashcash Payments
23118 @subsubsection Anti-spam Hashcash Payments
23119 @cindex spam filtering
23120 @cindex hashcash, spam filtering
23121 @cindex spam
23122
23123 @defvar spam-use-hashcash
23124
23125 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
23126 Whitelists}), but uses hashcash tokens for whitelisting messages
23127 instead of the sender address.  You must have the @code{hashcash.el}
23128 package loaded for @code{spam-use-hashcash} to work properly.
23129 Messages without a hashcash payment token will be sent to the next
23130 spam-split rule.  This is an explicit filter, meaning that unless a
23131 hashcash token is found, the messages are not assumed to be spam or
23132 ham.
23133
23134 @end defvar
23135
23136 @node Blackholes
23137 @subsubsection Blackholes
23138 @cindex spam filtering
23139 @cindex blackholes, spam filtering
23140 @cindex spam
23141
23142 @defvar spam-use-blackholes
23143
23144 This option is disabled by default.  You can let Gnus consult the
23145 blackhole-type distributed spam processing systems (DCC, for instance)
23146 when you set this option.  The variable @code{spam-blackhole-servers}
23147 holds the list of blackhole servers Gnus will consult.  The current
23148 list is fairly comprehensive, but make sure to let us know if it
23149 contains outdated servers.
23150
23151 The blackhole check uses the @code{dig.el} package, but you can tell
23152 @file{spam.el} to use @code{dns.el} instead for better performance if
23153 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
23154 this time to set @code{spam-use-dig} to @code{nil} despite the
23155 possible performance improvements, because some users may be unable to
23156 use it, but you can try it and see if it works for you.
23157
23158 @end defvar
23159
23160 @defvar spam-blackhole-servers
23161
23162 The list of servers to consult for blackhole checks.
23163
23164 @end defvar
23165
23166 @defvar spam-blackhole-good-server-regex
23167
23168 A regular expression for IPs that should not be checked against the
23169 blackhole server list.  When set to @code{nil}, it has no effect.
23170
23171 @end defvar
23172
23173 @defvar spam-use-dig
23174
23175 Use the @code{dig.el} package instead of the @code{dns.el} package.
23176 The default setting of @code{t} is recommended.
23177
23178 @end defvar
23179
23180 Blackhole checks are done only on incoming mail.  There is no spam or
23181 ham processor for blackholes.
23182
23183 @node Regular Expressions Header Matching
23184 @subsubsection Regular Expressions Header Matching
23185 @cindex spam filtering
23186 @cindex regular expressions header matching, spam filtering
23187 @cindex spam
23188
23189 @defvar spam-use-regex-headers
23190
23191 This option is disabled by default.  You can let Gnus check the
23192 message headers against lists of regular expressions when you set this
23193 option.  The variables @code{spam-regex-headers-spam} and
23194 @code{spam-regex-headers-ham} hold the list of regular expressions.
23195 Gnus will check against the message headers to determine if the
23196 message is spam or ham, respectively.
23197
23198 @end defvar
23199
23200 @defvar spam-regex-headers-spam
23201
23202 The list of regular expressions that, when matched in the headers of
23203 the message, positively identify it as spam.
23204
23205 @end defvar
23206
23207 @defvar spam-regex-headers-ham
23208
23209 The list of regular expressions that, when matched in the headers of
23210 the message, positively identify it as ham.
23211
23212 @end defvar
23213
23214 Regular expression header checks are done only on incoming mail.
23215 There is no specific spam or ham processor for regular expressions.
23216
23217 @node Bogofilter
23218 @subsubsection Bogofilter
23219 @cindex spam filtering
23220 @cindex bogofilter, spam filtering
23221 @cindex spam
23222
23223 @defvar spam-use-bogofilter
23224
23225 Set this variable if you want @code{spam-split} to use Eric Raymond's
23226 speedy Bogofilter.
23227
23228 With a minimum of care for associating the @samp{$} mark for spam
23229 articles only, Bogofilter training all gets fairly automatic.  You
23230 should do this until you get a few hundreds of articles in each
23231 category, spam or not.  The command @kbd{S t} in summary mode, either
23232 for debugging or for curiosity, shows the @emph{spamicity} score of
23233 the current article (between 0.0 and 1.0).
23234
23235 Bogofilter determines if a message is spam based on a specific
23236 threshold.  That threshold can be customized, consult the Bogofilter
23237 documentation.
23238
23239 If the @code{bogofilter} executable is not in your path, Bogofilter
23240 processing will be turned off.
23241
23242 You should not enable this if you use @code{spam-use-bogofilter-headers}.
23243
23244 @end defvar
23245
23246 @defvar spam-use-bogofilter-headers
23247
23248 Set this variable if you want @code{spam-split} to use Eric Raymond's
23249 speedy Bogofilter, looking only at the message headers.  It works
23250 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
23251 must be in the message already.  Normally you would do this with a
23252 procmail recipe or something similar; consult the Bogofilter
23253 installation documents for details.
23254
23255 You should not enable this if you use @code{spam-use-bogofilter}.
23256
23257 @end defvar
23258
23259 @defvar gnus-group-spam-exit-processor-bogofilter
23260 Add this symbol to a group's @code{spam-process} parameter by
23261 customizing the group parameters or the
23262 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23263 added to a group's @code{spam-process} parameter, spam-marked articles
23264 will be added to the Bogofilter spam database.
23265
23266 @emph{WARNING} 
23267
23268 Instead of the obsolete
23269 @code{gnus-group-spam-exit-processor-bogofilter}, it is recommended
23270 that you use @code{'(spam spam-use-bogofilter)}.  Everything will work
23271 the same way, we promise.
23272 @end defvar
23273
23274 @defvar gnus-group-ham-exit-processor-bogofilter
23275 Add this symbol to a group's @code{spam-process} parameter by
23276 customizing the group parameters or the
23277 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23278 added to a group's @code{spam-process} parameter, the ham-marked
23279 articles in @emph{ham} groups will be added to the Bogofilter database
23280 of non-spam messages.  Note that this ham processor has no effect in
23281 @emph{spam} or @emph{unclassified} groups.
23282
23283 @emph{WARNING} 
23284
23285 Instead of the obsolete
23286 @code{gnus-group-ham-exit-processor-bogofilter}, it is recommended
23287 that you use @code{'(ham spam-use-bogofilter)}.  Everything will work
23288 the same way, we promise.
23289 @end defvar
23290
23291 @defvar spam-bogofilter-database-directory
23292
23293 This is the directory where Bogofilter will store its databases.  It
23294 is not specified by default, so Bogofilter will use its own default
23295 database directory.
23296
23297 @end defvar
23298
23299 The Bogofilter mail classifier is similar to @command{ifile} in intent and
23300 purpose.  A ham and a spam processor are provided, plus the
23301 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
23302 variables to indicate to spam-split that Bogofilter should either be
23303 used, or has already been used on the article.  The 0.9.2.1 version of
23304 Bogofilter was used to test this functionality.
23305
23306 @node ifile spam filtering
23307 @subsubsection ifile spam filtering
23308 @cindex spam filtering
23309 @cindex ifile, spam filtering
23310 @cindex spam
23311
23312 @defvar spam-use-ifile
23313
23314 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
23315 statistical analyzer similar to Bogofilter.
23316
23317 @end defvar
23318
23319 @defvar spam-ifile-all-categories
23320
23321 Enable this variable if you want @code{spam-use-ifile} to give you all
23322 the ifile categories, not just spam/non-spam.  If you use this, make
23323 sure you train ifile as described in its documentation.
23324
23325 @end defvar
23326
23327 @defvar spam-ifile-spam-category
23328
23329 This is the category of spam messages as far as ifile is concerned.
23330 The actual string used is irrelevant, but you probably want to leave
23331 the default value of @samp{spam}.
23332 @end defvar
23333
23334 @defvar spam-ifile-database-path
23335
23336 This is the filename for the ifile database.  It is not specified by
23337 default, so ifile will use its own default database name.
23338
23339 @end defvar
23340
23341 The ifile mail classifier is similar to Bogofilter in intent and
23342 purpose.  A ham and a spam processor are provided, plus the
23343 @code{spam-use-ifile} variable to indicate to spam-split that ifile
23344 should be used.  The 1.2.1 version of ifile was used to test this
23345 functionality.
23346
23347 @node spam-stat spam filtering
23348 @subsubsection spam-stat spam filtering
23349 @cindex spam filtering
23350 @cindex spam-stat, spam filtering
23351 @cindex spam-stat
23352 @cindex spam
23353
23354 @xref{Filtering Spam Using Statistics with spam-stat}.
23355
23356 @defvar spam-use-stat
23357
23358 Enable this variable if you want @code{spam-split} to use
23359 spam-stat.el, an Emacs Lisp statistical analyzer.
23360
23361 @end defvar
23362
23363 @defvar gnus-group-spam-exit-processor-stat
23364 Add this symbol to a group's @code{spam-process} parameter by
23365 customizing the group parameters or the
23366 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23367 added to a group's @code{spam-process} parameter, the spam-marked
23368 articles will be added to the spam-stat database of spam messages.
23369
23370 @emph{WARNING} 
23371
23372 Instead of the obsolete
23373 @code{gnus-group-spam-exit-processor-stat}, it is recommended
23374 that you use @code{'(spam spam-use-stat)}.  Everything will work
23375 the same way, we promise.
23376 @end defvar
23377
23378 @defvar gnus-group-ham-exit-processor-stat
23379 Add this symbol to a group's @code{spam-process} parameter by
23380 customizing the group parameters or the
23381 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
23382 added to a group's @code{spam-process} parameter, the ham-marked
23383 articles in @emph{ham} groups will be added to the spam-stat database
23384 of non-spam messages.  Note that this ham processor has no effect in
23385 @emph{spam} or @emph{unclassified} groups.
23386
23387 @emph{WARNING} 
23388
23389 Instead of the obsolete
23390 @code{gnus-group-ham-exit-processor-stat}, it is recommended
23391 that you use @code{'(ham spam-use-stat)}.  Everything will work
23392 the same way, we promise.
23393 @end defvar
23394
23395 This enables @file{spam.el} to cooperate with @file{spam-stat.el}.
23396 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
23397 which unlike ifile or Bogofilter does not require external programs.
23398 A spam and a ham processor, and the @code{spam-use-stat} variable for
23399 @code{spam-split} are provided.
23400
23401 @node SpamOracle
23402 @subsubsection Using SpamOracle with Gnus
23403 @cindex spam filtering
23404 @cindex SpamOracle
23405 @cindex spam
23406
23407 An easy way to filter out spam is to use SpamOracle.  SpamOracle is an
23408 statistical mail filtering tool written by Xavier Leroy and needs to be
23409 installed separately.
23410
23411 There are several ways to use SpamOracle with Gnus.  In all cases, your
23412 mail is piped through SpamOracle in its @emph{mark} mode.  SpamOracle will
23413 then enter an @samp{X-Spam} header indicating whether it regards the
23414 mail as a spam mail or not.
23415
23416 One possibility is to run SpamOracle as a @code{:prescript} from the
23417 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
23418 the advantage that the user can see the @emph{X-Spam} headers.
23419
23420 The easiest method is to make @file{spam.el} (@pxref{Filtering Spam
23421 Using The Spam ELisp Package}) call SpamOracle.
23422
23423 @vindex spam-use-spamoracle
23424 To enable SpamOracle usage by @file{spam.el}, set the variable
23425 @code{spam-use-spamoracle} to @code{t} and configure the
23426 @code{nnmail-split-fancy} or @code{nnimap-split-fancy} as described in
23427 the section @xref{Filtering Spam Using The Spam ELisp Package}.  In
23428 this example the @samp{INBOX} of an nnimap server is filtered using
23429 SpamOracle.  Mails recognized as spam mails will be moved to
23430 @code{spam-split-group}, @samp{Junk} in this case.  Ham messages stay
23431 in @samp{INBOX}:
23432
23433 @example
23434 (setq spam-use-spamoracle t
23435       spam-split-group "Junk"
23436       nnimap-split-inbox '("INBOX")
23437       nnimap-split-rule 'nnimap-split-fancy
23438       nnimap-split-fancy '(| (: spam-split) "INBOX"))
23439 @end example
23440
23441 @defvar spam-use-spamoracle
23442 Set to @code{t} if you want Gnus to enable spam filtering using
23443 SpamOracle.
23444 @end defvar
23445
23446 @defvar spam-spamoracle-binary
23447 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
23448 user's PATH.  Using the variable @code{spam-spamoracle-binary}, this
23449 can be customized.
23450 @end defvar
23451
23452 @defvar spam-spamoracle-database
23453 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
23454 store its analyses.  This is controlled by the variable
23455 @code{spam-spamoracle-database} which defaults to @code{nil}.  That means
23456 the default SpamOracle database will be used.  In case you want your
23457 database to live somewhere special, set
23458 @code{spam-spamoracle-database} to this path.
23459 @end defvar
23460
23461 SpamOracle employs a statistical algorithm to determine whether a
23462 message is spam or ham.  In order to get good results, meaning few
23463 false hits or misses, SpamOracle needs training.  SpamOracle learns the
23464 characteristics of your spam mails.  Using the @emph{add} mode
23465 (training mode) one has to feed good (ham) and spam mails to
23466 SpamOracle.  This can be done by pressing @kbd{|} in the Summary buffer
23467 and pipe the mail to a SpamOracle process or using @file{spam.el}'s
23468 spam- and ham-processors, which is much more convenient.  For a
23469 detailed description of spam- and ham-processors, @xref{Filtering Spam
23470 Using The Spam ELisp Package}.
23471
23472 @defvar gnus-group-spam-exit-processor-spamoracle
23473 Add this symbol to a group's @code{spam-process} parameter by
23474 customizing the group parameter or the
23475 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
23476 to a group's @code{spam-process} parameter, spam-marked articles will be
23477 sent to SpamOracle as spam samples.
23478
23479 @emph{WARNING} 
23480
23481 Instead of the obsolete
23482 @code{gnus-group-spam-exit-processor-spamoracle}, it is recommended
23483 that you use @code{'(spam spam-use-spamoracle)}.  Everything will work
23484 the same way, we promise.
23485 @end defvar
23486
23487 @defvar gnus-group-ham-exit-processor-spamoracle
23488 Add this symbol to a group's @code{spam-process} parameter by
23489 customizing the group parameter or the
23490 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
23491 to a group's @code{spam-process} parameter, the ham-marked articles in
23492 @emph{ham} groups will be sent to the SpamOracle as samples of ham
23493 messages.  Note that this ham processor has no effect in @emph{spam} or
23494 @emph{unclassified} groups.
23495
23496 @emph{WARNING} 
23497
23498 Instead of the obsolete
23499 @code{gnus-group-ham-exit-processor-spamoracle}, it is recommended
23500 that you use @code{'(ham spam-use-spamoracle)}.  Everything will work
23501 the same way, we promise.
23502 @end defvar
23503
23504 @emph{Example:} These are the Group Parameters of a group that has been
23505 classified as a ham group, meaning that it should only contain ham
23506 messages.
23507 @example
23508  ((spam-contents gnus-group-spam-classification-ham)
23509   (spam-process ((ham spam-use-spamoracle)
23510                  (spam spam-use-spamoracle))))
23511 @end example
23512 For this group the @code{spam-use-spamoracle} is installed for both
23513 ham and spam processing.  If the group contains spam message
23514 (e.g. because SpamOracle has not had enough sample messages yet) and
23515 the user marks some messages as spam messages, these messages will be
23516 processed by SpamOracle.  The processor sends the messages to
23517 SpamOracle as new samples for spam.
23518
23519 @node Extending the Spam ELisp package
23520 @subsubsection Extending the Spam ELisp package
23521 @cindex spam filtering
23522 @cindex spam elisp package, extending
23523 @cindex extending the spam elisp package
23524
23525 Say you want to add a new back end called blackbox.  For filtering
23526 incoming mail, provide the following:
23527
23528 @enumerate
23529
23530 @item
23531 Code
23532
23533 @lisp
23534 (defvar spam-use-blackbox nil
23535   "True if blackbox should be used.")
23536 @end lisp
23537
23538 Add
23539 @lisp
23540 (spam-use-blackbox   . spam-check-blackbox)
23541 @end lisp
23542 to @code{spam-list-of-checks}.
23543
23544 Add
23545 @lisp
23546 (gnus-group-ham-exit-processor-blackbox  ham spam-use-blackbox)
23547 (gnus-group-spam-exit-processor-blackbox spam spam-use-blackbox)
23548 @end lisp
23549
23550 to @code{spam-list-of-processors}.
23551
23552 Add
23553 @lisp
23554 (spam-use-blackbox spam-blackbox-register-routine
23555                    nil
23556                    spam-blackbox-unregister-routine
23557                    nil)
23558 @end lisp
23559
23560 to @code{spam-registration-functions}.  Write the register/unregister
23561 routines using the bogofilter register/unregister routines as a
23562 start, or other restister/unregister routines more appropriate to
23563 Blackbox.
23564
23565 @item
23566 Functionality
23567
23568 Write the @code{spam-check-blackbox} function.  It should return
23569 @samp{nil} or @code{spam-split-group}, observing the other
23570 conventions.  See the existing @code{spam-check-*} functions for
23571 examples of what you can do, and stick to the template unless you
23572 fully understand the reasons why you aren't.
23573
23574 Make sure to add @code{spam-use-blackbox} to
23575 @code{spam-list-of-statistical-checks} if Blackbox is a statistical
23576 mail analyzer that needs the full message body to operate.
23577
23578 @end enumerate
23579
23580 For processing spam and ham messages, provide the following:
23581
23582 @enumerate
23583
23584 @item
23585 Code
23586
23587 Note you don't have to provide a spam or a ham processor.  Only
23588 provide them if Blackbox supports spam or ham processing.
23589
23590 Also, ham and spam processors are being phased out as single
23591 variables.  Instead the form @code{'(spam spam-use-blackbox)} or 
23592 @code{'(ham spam-use-blackbox)} is favored.  For now, spam/ham
23593 processor variables are still around but they won't be for long.
23594
23595 @lisp
23596 (defvar gnus-group-spam-exit-processor-blackbox "blackbox-spam"
23597   "The Blackbox summary exit spam processor.
23598 Only applicable to spam groups.")
23599
23600 (defvar gnus-group-ham-exit-processor-blackbox "blackbox-ham"
23601   "The whitelist summary exit ham processor.
23602 Only applicable to non-spam (unclassified and ham) groups.")
23603
23604 @end lisp
23605
23606 @item
23607 Gnus parameters
23608
23609 Add
23610 @lisp
23611 (const :tag "Spam: Blackbox" (spam spam-use-blackbox))
23612 (const :tag "Ham: Blackbox"  (ham spam-use-blackbox))
23613 @end lisp
23614 to the @code{spam-process} group parameter in @code{gnus.el}.  Make
23615 sure you do it twice, once for the parameter and once for the
23616 variable customization.
23617
23618 Add
23619 @lisp
23620 (variable-item spam-use-blackbox)
23621 @end lisp
23622 to the @code{spam-autodetect-methods} group parameter in
23623 @code{gnus.el}.
23624
23625 @end enumerate
23626
23627
23628 @node Filtering Spam Using Statistics with spam-stat
23629 @subsection Filtering Spam Using Statistics with spam-stat
23630 @cindex Paul Graham
23631 @cindex Graham, Paul
23632 @cindex naive Bayesian spam filtering
23633 @cindex Bayesian spam filtering, naive
23634 @cindex spam filtering, naive Bayesian
23635
23636 Paul Graham has written an excellent essay about spam filtering using
23637 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
23638 Spam}.  In it he describes the inherent deficiency of rule-based
23639 filtering as used by SpamAssassin, for example: Somebody has to write
23640 the rules, and everybody else has to install these rules.  You are
23641 always late.  It would be much better, he argues, to filter mail based
23642 on whether it somehow resembles spam or non-spam.  One way to measure
23643 this is word distribution.  He then goes on to describe a solution
23644 that checks whether a new mail resembles any of your other spam mails
23645 or not.
23646
23647 The basic idea is this:  Create a two collections of your mail, one
23648 with spam, one with non-spam.  Count how often each word appears in
23649 either collection, weight this by the total number of mails in the
23650 collections, and store this information in a dictionary.  For every
23651 word in a new mail, determine its probability to belong to a spam or a
23652 non-spam mail.  Use the 15 most conspicuous words, compute the total
23653 probability of the mail being spam.  If this probability is higher
23654 than a certain threshold, the mail is considered to be spam.
23655
23656 Gnus supports this kind of filtering.  But it needs some setting up.
23657 First, you need two collections of your mail, one with spam, one with
23658 non-spam.  Then you need to create a dictionary using these two
23659 collections, and save it.  And last but not least, you need to use
23660 this dictionary in your fancy mail splitting rules.
23661
23662 @menu
23663 * Creating a spam-stat dictionary::
23664 * Splitting mail using spam-stat::
23665 * Low-level interface to the spam-stat dictionary::
23666 @end menu
23667
23668 @node Creating a spam-stat dictionary
23669 @subsubsection Creating a spam-stat dictionary
23670
23671 Before you can begin to filter spam based on statistics, you must
23672 create these statistics based on two mail collections, one with spam,
23673 one with non-spam.  These statistics are then stored in a dictionary
23674 for later use.  In order for these statistics to be meaningful, you
23675 need several hundred emails in both collections.
23676
23677 Gnus currently supports only the nnml back end for automated dictionary
23678 creation.  The nnml back end stores all mails in a directory, one file
23679 per mail.  Use the following:
23680
23681 @defun spam-stat-process-spam-directory
23682 Create spam statistics for every file in this directory.  Every file
23683 is treated as one spam mail.
23684 @end defun
23685
23686 @defun spam-stat-process-non-spam-directory
23687 Create non-spam statistics for every file in this directory.  Every
23688 file is treated as one non-spam mail.
23689 @end defun
23690
23691 Usually you would call @code{spam-stat-process-spam-directory} on a
23692 directory such as @file{~/Mail/mail/spam} (this usually corresponds
23693 the the group @samp{nnml:mail.spam}), and you would call
23694 @code{spam-stat-process-non-spam-directory} on a directory such as
23695 @file{~/Mail/mail/misc} (this usually corresponds the the group
23696 @samp{nnml:mail.misc}).
23697
23698 When you are using @acronym{IMAP}, you won't have the mails available
23699 locally, so that will not work.  One solution is to use the Gnus Agent
23700 to cache the articles.  Then you can use directories such as
23701 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
23702 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
23703
23704 @defvar spam-stat
23705 This variable holds the hash-table with all the statistics---the
23706 dictionary we have been talking about.  For every word in either
23707 collection, this hash-table stores a vector describing how often the
23708 word appeared in spam and often it appeared in non-spam mails.
23709 @end defvar
23710
23711 If you want to regenerate the statistics from scratch, you need to
23712 reset the dictionary.
23713
23714 @defun spam-stat-reset
23715 Reset the @code{spam-stat} hash-table, deleting all the statistics.
23716 @end defun
23717
23718 When you are done, you must save the dictionary.  The dictionary may
23719 be rather large.  If you will not update the dictionary incrementally
23720 (instead, you will recreate it once a month, for example), then you
23721 can reduce the size of the dictionary by deleting all words that did
23722 not appear often enough or that do not clearly belong to only spam or
23723 only non-spam mails.
23724
23725 @defun spam-stat-reduce-size
23726 Reduce the size of the dictionary.  Use this only if you do not want
23727 to update the dictionary incrementally.
23728 @end defun
23729
23730 @defun spam-stat-save
23731 Save the dictionary.
23732 @end defun
23733
23734 @defvar spam-stat-file
23735 The filename used to store the dictionary.  This defaults to
23736 @file{~/.spam-stat.el}.
23737 @end defvar
23738
23739 @node Splitting mail using spam-stat
23740 @subsubsection Splitting mail using spam-stat
23741
23742 In order to use @code{spam-stat} to split your mail, you need to add the
23743 following to your @file{~/.gnus.el} file:
23744
23745 @lisp
23746 (require 'spam-stat)
23747 (spam-stat-load)
23748 @end lisp
23749
23750 This will load the necessary Gnus code, and the dictionary you
23751 created.
23752
23753 Next, you need to adapt your fancy splitting rules:  You need to
23754 determine how to use @code{spam-stat}.  The following examples are for
23755 the nnml back end.  Using the nnimap back end works just as well.  Just
23756 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
23757
23758 In the simplest case, you only have two groups, @samp{mail.misc} and
23759 @samp{mail.spam}.  The following expression says that mail is either
23760 spam or it should go into @samp{mail.misc}.  If it is spam, then
23761 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
23762
23763 @lisp
23764 (setq nnmail-split-fancy
23765       `(| (: spam-stat-split-fancy)
23766           "mail.misc"))
23767 @end lisp
23768
23769 @defvar spam-stat-split-fancy-spam-group
23770 The group to use for spam.  Default is @samp{mail.spam}.
23771 @end defvar
23772
23773 If you also filter mail with specific subjects into other groups, use
23774 the following expression.  Only mails not matching the regular
23775 expression are considered potential spam.
23776
23777 @lisp
23778 (setq nnmail-split-fancy
23779       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
23780           (: spam-stat-split-fancy)
23781           "mail.misc"))
23782 @end lisp
23783
23784 If you want to filter for spam first, then you must be careful when
23785 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
23786 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
23787 non-spam, therefore both should be in your collection of non-spam
23788 mails, when creating the dictionary!
23789
23790 @lisp
23791 (setq nnmail-split-fancy
23792       `(| (: spam-stat-split-fancy)
23793           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23794           "mail.misc"))
23795 @end lisp
23796
23797 You can combine this with traditional filtering.  Here, we move all
23798 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
23799 @code{spam-stat-split-fancy} will never see them, the mails in
23800 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
23801 nor in your collection of non-spam mails, when creating the
23802 dictionary!
23803
23804 @lisp
23805 (setq nnmail-split-fancy
23806       `(| ("Content-Type" "text/html" "mail.spam.filtered")
23807           (: spam-stat-split-fancy)
23808           ("Subject" "\\bspam-stat\\b" "mail.emacs")
23809           "mail.misc"))
23810 @end lisp
23811
23812
23813 @node Low-level interface to the spam-stat dictionary
23814 @subsubsection Low-level interface to the spam-stat dictionary
23815
23816 The main interface to using @code{spam-stat}, are the following functions:
23817
23818 @defun spam-stat-buffer-is-spam
23819 Called in a buffer, that buffer is considered to be a new spam mail.
23820 Use this for new mail that has not been processed before.
23821 @end defun
23822
23823 @defun spam-stat-buffer-is-no-spam
23824 Called in a buffer, that buffer is considered to be a new non-spam
23825 mail.  Use this for new mail that has not been processed before.
23826 @end defun
23827
23828 @defun spam-stat-buffer-change-to-spam
23829 Called in a buffer, that buffer is no longer considered to be normal
23830 mail but spam.  Use this to change the status of a mail that has
23831 already been processed as non-spam.
23832 @end defun
23833
23834 @defun spam-stat-buffer-change-to-non-spam
23835 Called in a buffer, that buffer is no longer considered to be spam but
23836 normal mail.  Use this to change the status of a mail that has already
23837 been processed as spam.
23838 @end defun
23839
23840 @defun spam-stat-save
23841 Save the hash table to the file.  The filename used is stored in the
23842 variable @code{spam-stat-file}.
23843 @end defun
23844
23845 @defun spam-stat-load
23846 Load the hash table from a file.  The filename used is stored in the
23847 variable @code{spam-stat-file}.
23848 @end defun
23849
23850 @defun spam-stat-score-word
23851 Return the spam score for a word.
23852 @end defun
23853
23854 @defun spam-stat-score-buffer
23855 Return the spam score for a buffer.
23856 @end defun
23857
23858 @defun spam-stat-split-fancy
23859 Use this function for fancy mail splitting.  Add the rule @samp{(:
23860 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
23861 @end defun
23862
23863 Make sure you load the dictionary before using it.  This requires the
23864 following in your @file{~/.gnus.el} file:
23865
23866 @lisp
23867 (require 'spam-stat)
23868 (spam-stat-load)
23869 @end lisp
23870
23871 Typical test will involve calls to the following functions:
23872
23873 @smallexample
23874 Reset: (setq spam-stat (make-hash-table :test 'equal))
23875 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23876 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23877 Save table: (spam-stat-save)
23878 File size: (nth 7 (file-attributes spam-stat-file))
23879 Number of words: (hash-table-count spam-stat)
23880 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23881 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23882 Reduce table size: (spam-stat-reduce-size)
23883 Save table: (spam-stat-save)
23884 File size: (nth 7 (file-attributes spam-stat-file))
23885 Number of words: (hash-table-count spam-stat)
23886 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
23887 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
23888 @end smallexample
23889
23890 Here is how you would create your dictionary:
23891
23892 @smallexample
23893 Reset: (setq spam-stat (make-hash-table :test 'equal))
23894 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
23895 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
23896 Repeat for any other non-spam group you need...
23897 Reduce table size: (spam-stat-reduce-size)
23898 Save table: (spam-stat-save)
23899 @end smallexample
23900
23901 @node Other modes
23902 @section Interaction with other modes
23903
23904 @subsection Dired
23905 @cindex dired
23906
23907 @code{gnus-dired-minor-mode} provided some useful functions for dired
23908 buffers.  It is enabled with
23909 @lisp
23910 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
23911 @end lisp
23912
23913 @table @kbd
23914 @item C-c C-m C-a
23915 @findex gnus-dired-attach
23916 Send dired's marked files as an attachment (@code{gnus-dired-attach}).
23917 You will be prompted for a message buffer.
23918
23919 @item C-c C-m C-l
23920 @findex gnus-dired-find-file-mailcap
23921 Visit a file according to the appropriate mailcap entry
23922 (@code{gnus-dired-find-file-mailcap}).  With prefix, open file in a new
23923 buffer.
23924
23925 @item C-c C-m C-p
23926 @findex gnus-dired-print
23927 Print file according to the mailcap entry (@code{gnus-dired-print}).  If
23928 there is no print command, print in a PostScript image.
23929 @end table
23930
23931 @node Various Various
23932 @section Various Various
23933 @cindex mode lines
23934 @cindex highlights
23935
23936 @table @code
23937
23938 @item gnus-home-directory
23939 @vindex gnus-home-directory
23940 All Gnus file and directory variables will be initialized from this
23941 variable, which defaults to @file{~/}.
23942
23943 @item gnus-directory
23944 @vindex gnus-directory
23945 Most Gnus storage file and directory variables will be initialized from
23946 this variable, which defaults to the @env{SAVEDIR} environment
23947 variable, or @file{~/News/} if that variable isn't set.
23948
23949 Note that Gnus is mostly loaded when the @file{~/.gnus.el} file is read.
23950 This means that other directory variables that are initialized from this
23951 variable won't be set properly if you set this variable in
23952 @file{~/.gnus.el}.  Set this variable in @file{.emacs} instead.
23953
23954 @item gnus-default-directory
23955 @vindex gnus-default-directory
23956 Not related to the above variable at all---this variable says what the
23957 default directory of all Gnus buffers should be.  If you issue commands
23958 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
23959 default directory.  If this variable is @code{nil} (which is the
23960 default), the default directory will be the default directory of the
23961 buffer you were in when you started Gnus.
23962
23963 @item gnus-verbose
23964 @vindex gnus-verbose
23965 This variable is an integer between zero and ten.  The higher the value,
23966 the more messages will be displayed.  If this variable is zero, Gnus
23967 will never flash any messages, if it is seven (which is the default),
23968 most important messages will be shown, and if it is ten, Gnus won't ever
23969 shut up, but will flash so many messages it will make your head swim.
23970
23971 @item gnus-verbose-backends
23972 @vindex gnus-verbose-backends
23973 This variable works the same way as @code{gnus-verbose}, but it applies
23974 to the Gnus back ends instead of Gnus proper.
23975
23976 @item nnheader-max-head-length
23977 @vindex nnheader-max-head-length
23978 When the back ends read straight heads of articles, they all try to read
23979 as little as possible.  This variable (default 4096) specifies
23980 the absolute max length the back ends will try to read before giving up
23981 on finding a separator line between the head and the body.  If this
23982 variable is @code{nil}, there is no upper read bound.  If it is
23983 @code{t}, the back ends won't try to read the articles piece by piece,
23984 but read the entire articles.  This makes sense with some versions of
23985 @code{ange-ftp} or @code{efs}.
23986
23987 @item nnheader-head-chop-length
23988 @vindex nnheader-head-chop-length
23989 This variable (default 2048) says how big a piece of each article to
23990 read when doing the operation described above.
23991
23992 @item nnheader-file-name-translation-alist
23993 @vindex nnheader-file-name-translation-alist
23994 @cindex file names
23995 @cindex invalid characters in file names
23996 @cindex characters in file names
23997 This is an alist that says how to translate characters in file names.
23998 For instance, if @samp{:} is invalid as a file character in file names
23999 on your system (you OS/2 user you), you could say something like:
24000
24001 @lisp
24002 @group
24003 (setq nnheader-file-name-translation-alist
24004       '((?: . ?_)))
24005 @end group
24006 @end lisp
24007
24008 In fact, this is the default value for this variable on OS/2 and MS
24009 Windows (phooey) systems.
24010
24011 @item gnus-hidden-properties
24012 @vindex gnus-hidden-properties
24013 This is a list of properties to use to hide ``invisible'' text.  It is
24014 @code{(invisible t intangible t)} by default on most systems, which
24015 makes invisible text invisible and intangible.
24016
24017 @item gnus-parse-headers-hook
24018 @vindex gnus-parse-headers-hook
24019 A hook called before parsing headers.  It can be used, for instance, to
24020 gather statistics on the headers fetched, or perhaps you'd like to prune
24021 some headers.  I don't see why you'd want that, though.
24022
24023 @item gnus-shell-command-separator
24024 @vindex gnus-shell-command-separator
24025 String used to separate two shell commands.  The default is @samp{;}.
24026
24027 @item gnus-invalid-group-regexp
24028 @vindex gnus-invalid-group-regexp
24029
24030 Regexp to match ``invalid'' group names when querying user for a group
24031 name.  The default value catches some @strong{really} invalid group
24032 names who could possibly mess up Gnus internally (like allowing
24033 @samp{:} in a group name, which is normally used to delimit method and
24034 group).
24035
24036 @acronym{IMAP} users might want to allow @samp{/} in group names though.
24037
24038
24039 @end table
24040
24041 @node The End
24042 @chapter The End
24043
24044 Well, that's the manual---you can get on with your life now.  Keep in
24045 touch.  Say hello to your cats from me.
24046
24047 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
24048
24049 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
24050
24051 @quotation
24052 @strong{Te Deum}
24053
24054 @sp 1
24055 Not because of victories @*
24056 I sing,@*
24057 having none,@*
24058 but for the common sunshine,@*
24059 the breeze,@*
24060 the largess of the spring.
24061
24062 @sp 1
24063 Not for victory@*
24064 but for the day's work done@*
24065 as well as I was able;@*
24066 not for a seat upon the dais@*
24067 but at the common table.@*
24068 @end quotation
24069
24070
24071 @node Appendices
24072 @chapter Appendices
24073
24074 @menu
24075 * XEmacs::                      Requirements for installing under XEmacs.
24076 * History::                     How Gnus got where it is today.
24077 * On Writing Manuals::          Why this is not a beginner's guide.
24078 * Terminology::                 We use really difficult, like, words here.
24079 * Customization::               Tailoring Gnus to your needs.
24080 * Troubleshooting::             What you might try if things do not work.
24081 * Gnus Reference Guide::        Rilly, rilly technical stuff.
24082 * Emacs for Heathens::          A short introduction to Emacsian terms.
24083 * Frequently Asked Questions::  The Gnus FAQ
24084 @end menu
24085
24086
24087 @node XEmacs
24088 @section XEmacs
24089 @cindex XEmacs
24090 @cindex installing under XEmacs
24091
24092 XEmacs is distributed as a collection of packages.  You should install
24093 whatever packages the Gnus XEmacs package requires.  The current
24094 requirements are @samp{gnus}, @samp{mail-lib}, @samp{xemacs-base},
24095 @samp{eterm}, @samp{sh-script}, @samp{net-utils}, @samp{os-utils},
24096 @samp{dired}, @samp{mh-e}, @samp{sieve}, @samp{ps-print}, @samp{w3},
24097 @samp{pgg}, @samp{mailcrypt}, @samp{ecrypto}, and @samp{sasl}.
24098
24099
24100 @node History
24101 @section History
24102
24103 @cindex history
24104 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
24105 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
24106
24107 If you want to investigate the person responsible for this outrage,
24108 you can point your (feh!) web browser to
24109 @uref{http://quimby.gnus.org/}.  This is also the primary
24110 distribution point for the new and spiffy versions of Gnus, and is
24111 known as The Site That Destroys Newsrcs And Drives People Mad.
24112
24113 During the first extended alpha period of development, the new Gnus was
24114 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
24115 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
24116 (Besides, the ``Gnus'' in this abbreviation should probably be
24117 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
24118 appropriate name, don't you think?)
24119
24120 In any case, after spending all that energy on coming up with a new and
24121 spunky name, we decided that the name was @emph{too} spunky, so we
24122 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
24123 ``@sc{gnus}''.  New vs. old.
24124
24125 @menu
24126 * Gnus Versions::               What Gnus versions have been released.
24127 * Other Gnus Versions::         Other Gnus versions that also have been released.
24128 * Why?::                        What's the point of Gnus?
24129 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
24130 * Conformity::                  Gnus tries to conform to all standards.
24131 * Emacsen::                     Gnus can be run on a few modern Emacsen.
24132 * Gnus Development::            How Gnus is developed.
24133 * Contributors::                Oodles of people.
24134 * New Features::                Pointers to some of the new stuff in Gnus.
24135 @end menu
24136
24137
24138 @node Gnus Versions
24139 @subsection Gnus Versions
24140 @cindex ding Gnus
24141 @cindex September Gnus
24142 @cindex Red Gnus
24143 @cindex Quassia Gnus
24144 @cindex Pterodactyl Gnus
24145 @cindex Oort Gnus
24146 @cindex No Gnus
24147 @cindex Gnus versions
24148
24149 The first ``proper'' release of Gnus 5 was done in November 1995 when it
24150 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
24151 plus 15 Gnus 5.0 releases).
24152
24153 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
24154 releases)) was released under the name ``Gnus 5.2'' (40 releases).
24155
24156 On July 28th 1996 work on Red Gnus was begun, and it was released on
24157 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
24158
24159 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
24160 If was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
24161
24162 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
24163 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
24164 1999.
24165
24166 On the 26th of October 2000, Oort Gnus was begun.
24167
24168 If you happen upon a version of Gnus that has a prefixed name --
24169 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
24170 ``Pterodactyl Gnus'', ``Oort Gnus'' -- don't panic.  Don't let it know
24171 that you're frightened.  Back away.  Slowly.  Whatever you do, don't
24172 run.  Walk away, calmly, until you're out of its reach.  Find a proper
24173 released version of Gnus and snuggle up to that instead.
24174
24175
24176 @node Other Gnus Versions
24177 @subsection Other Gnus Versions
24178 @cindex Semi-gnus
24179
24180 In addition to the versions of Gnus which have had their releases
24181 coordinated by Lars, one major development has been Semi-gnus from
24182 Japan.  It's based on a library called @acronym{SEMI}, which provides
24183 @acronym{MIME} capabilities.
24184
24185 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
24186 Collectively, they are called ``Semi-gnus'', and different strains are
24187 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
24188 @acronym{MIME} and multilingualization things, especially important for
24189 Japanese users.
24190
24191
24192 @node Why?
24193 @subsection Why?
24194
24195 What's the point of Gnus?
24196
24197 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
24198 newsreader, that lets you do anything you can think of.  That was my
24199 original motivation, but while working on Gnus, it has become clear to
24200 me that this generation of newsreaders really belong in the stone age.
24201 Newsreaders haven't developed much since the infancy of the net.  If the
24202 volume continues to rise with the current rate of increase, all current
24203 newsreaders will be pretty much useless.  How do you deal with
24204 newsgroups that have thousands of new articles each day?  How do you
24205 keep track of millions of people who post?
24206
24207 Gnus offers no real solutions to these questions, but I would very much
24208 like to see Gnus being used as a testing ground for new methods of
24209 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
24210 to separate the newsreader from the back ends, Gnus now offers a simple
24211 interface for anybody who wants to write new back ends for fetching mail
24212 and news from different sources.  I have added hooks for customizations
24213 everywhere I could imagine it being useful.  By doing so, I'm inviting
24214 every one of you to explore and invent.
24215
24216 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
24217 @kbd{C-u 100 M-x all-hail-xemacs}.
24218
24219
24220 @node Compatibility
24221 @subsection Compatibility
24222
24223 @cindex compatibility
24224 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
24225 bindings have been kept.  More key bindings have been added, of course,
24226 but only in one or two obscure cases have old bindings been changed.
24227
24228 Our motto is:
24229 @quotation
24230 @cartouche
24231 @center In a cloud bones of steel.
24232 @end cartouche
24233 @end quotation
24234
24235 All commands have kept their names.  Some internal functions have changed
24236 their names.
24237
24238 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
24239 Articles}.
24240
24241 One major compatibility question is the presence of several summary
24242 buffers.  All variables relevant while reading a group are
24243 buffer-local to the summary buffer they belong in.  Although many
24244 important variables have their values copied into their global
24245 counterparts whenever a command is executed in the summary buffer, this
24246 change might lead to incorrect values being used unless you are careful.
24247
24248 All code that relies on knowledge of @sc{gnus} internals will probably
24249 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
24250 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
24251 maintains a hash table that points to the entries in this alist (which
24252 speeds up many functions), and changing the alist directly will lead to
24253 peculiar results.
24254
24255 @cindex hilit19
24256 @cindex highlighting
24257 Old hilit19 code does not work at all.  In fact, you should probably
24258 remove all hilit code from all Gnus hooks
24259 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
24260 Gnus provides various integrated functions for highlighting.  These are
24261 faster and more accurate.  To make life easier for everybody, Gnus will
24262 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
24263 Away!
24264
24265 Packages like @code{expire-kill} will no longer work.  As a matter of
24266 fact, you should probably remove all old @sc{gnus} packages (and other
24267 code) when you start using Gnus.  More likely than not, Gnus already
24268 does what you have written code to make @sc{gnus} do.  (Snicker.)
24269
24270 Even though old methods of doing things are still supported, only the
24271 new methods are documented in this manual.  If you detect a new method of
24272 doing something while reading this manual, that does not mean you have
24273 to stop doing it the old way.
24274
24275 Gnus understands all @sc{gnus} startup files.
24276
24277 @kindex M-x gnus-bug
24278 @findex gnus-bug
24279 @cindex reporting bugs
24280 @cindex bugs
24281 Overall, a casual user who hasn't written much code that depends on
24282 @sc{gnus} internals should suffer no problems.  If problems occur,
24283 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
24284
24285 @vindex gnus-bug-create-help-buffer
24286 If you are in the habit of sending bug reports @emph{very} often, you
24287 may find the helpful help buffer annoying after a while.  If so, set
24288 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
24289 up at you.
24290
24291
24292 @node Conformity
24293 @subsection Conformity
24294
24295 No rebels without a clue here, ma'am.  We conform to all standards known
24296 to (wo)man.  Except for those standards and/or conventions we disagree
24297 with, of course.
24298
24299 @table @strong
24300
24301 @item RFC (2)822
24302 @cindex RFC 822
24303 @cindex RFC 2822
24304 There are no known breaches of this standard.
24305
24306 @item RFC 1036
24307 @cindex RFC 1036
24308 There are no known breaches of this standard, either.
24309
24310 @item Son-of-RFC 1036
24311 @cindex Son-of-RFC 1036
24312 We do have some breaches to this one.
24313
24314 @table @emph
24315
24316 @item X-Newsreader
24317 @itemx User-Agent
24318 These are considered to be ``vanity headers'', while I consider them
24319 to be consumer information.  After seeing so many badly formatted
24320 articles coming from @code{tin} and @code{Netscape} I know not to use
24321 either of those for posting articles.  I would not have known that if
24322 it wasn't for the @code{X-Newsreader} header.
24323 @end table
24324
24325 @item USEFOR
24326 @cindex USEFOR
24327 USEFOR is an IETF working group writing a successor to RFC 1036, based
24328 on Son-of-RFC 1036.  They have produced a number of drafts proposing
24329 various changes to the format of news articles.  The Gnus towers will
24330 look into implementing the changes when the draft is accepted as an RFC.
24331
24332 @item MIME - RFC 2045-2049 etc
24333 @cindex @acronym{MIME}
24334 All the various @acronym{MIME} RFCs are supported.
24335
24336 @item Disposition Notifications - RFC 2298
24337 Message Mode is able to request notifications from the receiver.
24338
24339 @item PGP - RFC 1991 and RFC 2440
24340 @cindex RFC 1991
24341 @cindex RFC 2440
24342 RFC 1991 is the original @acronym{PGP} message specification,
24343 published as an informational RFC.  RFC 2440 was the follow-up, now
24344 called Open PGP, and put on the Standards Track.  Both document a
24345 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
24346 encoding (signing and encryption) and decoding (verification and
24347 decryption).
24348
24349 @item PGP/MIME - RFC 2015/3156
24350 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
24351 1991) describes the @acronym{MIME}-wrapping around the RF 1991/2440 format.
24352 Gnus supports both encoding and decoding.
24353
24354 @item S/MIME - RFC 2633
24355 RFC 2633 describes the @acronym{S/MIME} format.
24356
24357 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
24358 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
24359 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
24360 authentication for @acronym{IMAP}.  RFC 2086 describes access control
24361 lists (ACLs) for @acronym{IMAP}.  RFC 2359 describes a @acronym{IMAP}
24362 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
24363 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
24364 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
24365
24366 @end table
24367
24368 If you ever notice Gnus acting non-compliant with regards to the texts
24369 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
24370 know.
24371
24372
24373 @node Emacsen
24374 @subsection Emacsen
24375 @cindex Emacsen
24376 @cindex XEmacs
24377 @cindex Mule
24378 @cindex Emacs
24379
24380 Gnus should work on:
24381
24382 @itemize @bullet
24383
24384 @item
24385 Emacs 21.1 and up.
24386
24387 @item
24388 XEmacs 21.4 and up.
24389
24390 @end itemize
24391
24392 This Gnus version will absolutely not work on any Emacsen older than
24393 that.  Not reliably, at least.  Older versions of Gnus may work on older
24394 Emacs versions.
24395
24396 There are some vague differences between Gnus on the various
24397 platforms---XEmacs features more graphics (a logo and a toolbar)---but
24398 other than that, things should look pretty much the same under all
24399 Emacsen.
24400
24401
24402 @node Gnus Development
24403 @subsection Gnus Development
24404
24405 Gnus is developed in a two-phased cycle.  The first phase involves much
24406 discussion on the @samp{ding@@gnus.org} mailing list, where people
24407 propose changes and new features, post patches and new back ends.  This
24408 phase is called the @dfn{alpha} phase, since the Gnusae released in this
24409 phase are @dfn{alpha releases}, or (perhaps more commonly in other
24410 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
24411 unstable and should not be used by casual users.  Gnus alpha releases
24412 have names like ``Red Gnus'' and ``Quassia Gnus''.
24413
24414 After futzing around for 50-100 alpha releases, Gnus is declared
24415 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
24416 and is called things like ``Gnus 5.6.32'' instead.  Normal people are
24417 supposed to be able to use these, and these are mostly discussed on the
24418 @samp{gnu.emacs.gnus} newsgroup.
24419
24420 @cindex Incoming*
24421 @vindex mail-source-delete-incoming
24422 Some variable defaults differ between alpha Gnusae and released Gnusae.
24423 In particular, @code{mail-source-delete-incoming} defaults to @code{nil} in
24424 alpha Gnusae and @code{t} in released Gnusae.  This is to prevent
24425 lossage of mail if an alpha release hiccups while handling the mail.
24426
24427 The division of discussion between the ding mailing list and the Gnus
24428 newsgroup is not purely based on publicity concerns.  It's true that
24429 having people write about the horrible things that an alpha Gnus release
24430 can do (sometimes) in a public forum may scare people off, but more
24431 importantly, talking about new experimental features that have been
24432 introduced may confuse casual users.  New features are frequently
24433 introduced, fiddled with, and judged to be found wanting, and then
24434 either discarded or totally rewritten.  People reading the mailing list
24435 usually keep up with these rapid changes, while people on the newsgroup
24436 can't be assumed to do so.
24437
24438
24439
24440 @node Contributors
24441 @subsection Contributors
24442 @cindex contributors
24443
24444 The new Gnus version couldn't have been done without the help of all the
24445 people on the (ding) mailing list.  Every day for over a year I have
24446 gotten billions of nice bug reports from them, filling me with joy,
24447 every single one of them.  Smooches.  The people on the list have been
24448 tried beyond endurance, what with my ``oh, that's a neat idea <type
24449 type>, yup, I'll release it right away <ship off> no wait, that doesn't
24450 work at all <type type>, yup, I'll ship that one off right away <ship
24451 off> no, wait, that absolutely does not work'' policy for releases.
24452 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
24453 ``worser''? ``much worser''?  ``worsest''?)
24454
24455 I would like to take this opportunity to thank the Academy for@dots{}  oops,
24456 wrong show.
24457
24458 @itemize @bullet
24459
24460 @item
24461 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
24462
24463 @item
24464 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
24465 nnwarchive and many, many other things connected with @acronym{MIME} and
24466 other types of en/decoding, as well as general bug fixing, new
24467 functionality and stuff.
24468
24469 @item
24470 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
24471 well as numerous other things).
24472
24473 @item
24474 Luis Fernandes---design and graphics.
24475
24476 @item
24477 Joe Reiss---creator of the smiley faces.
24478
24479 @item
24480 Justin Sheehy---the @acronym{FAQ} maintainer.
24481
24482 @item
24483 Erik Naggum---help, ideas, support, code and stuff.
24484
24485 @item
24486 Wes Hardaker---@file{gnus-picon.el} and the manual section on
24487 @dfn{picons} (@pxref{Picons}).
24488
24489 @item
24490 Kim-Minh Kaplan---further work on the picon code.
24491
24492 @item
24493 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section.
24494
24495 @item
24496 Sudish Joseph---innumerable bug fixes.
24497
24498 @item
24499 Ilja Weis---@file{gnus-topic.el}.
24500
24501 @item
24502 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
24503
24504 @item
24505 Vladimir Alexiev---the refcard and reference booklets.
24506
24507 @item
24508 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
24509 distribution by Felix Lee and JWZ.
24510
24511 @item
24512 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
24513
24514 @item
24515 Peter Mutsaers---orphan article scoring code.
24516
24517 @item
24518 Ken Raeburn---POP mail support.
24519
24520 @item
24521 Hallvard B Furuseth---various bits and pieces, especially dealing with
24522 .newsrc files.
24523
24524 @item
24525 Brian Edmonds---@file{gnus-bbdb.el}.
24526
24527 @item
24528 David Moore---rewrite of @file{nnvirtual.el} and many other things.
24529
24530 @item
24531 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
24532
24533 @item
24534 François Pinard---many, many interesting and thorough bug reports, as
24535 well as autoconf support.
24536
24537 @end itemize
24538
24539 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
24540 Borges, and Jost Krieger proof-reading parts of the manual.
24541
24542 The following people have contributed many patches and suggestions:
24543
24544 Christopher Davis,
24545 Andrew Eskilsson,
24546 Kai Grossjohann,
24547 Kevin Greiner,
24548 Jesper Harder,
24549 Paul Jarc,
24550 Simon Josefsson,
24551 David KÃ¥gedal,
24552 Richard Pieri,
24553 Fabrice Popineau,
24554 Daniel Quinlan,
24555 Michael Shields,
24556 Reiner Steib,
24557 Jason L. Tibbitts, III,
24558 Jack Vinson,
24559 Katsumi Yamaoka, @c Yamaoka
24560 and
24561 Teodor Zlatanov.
24562
24563 Also thanks to the following for patches and stuff:
24564
24565 Jari Aalto,
24566 Adrian Aichner,
24567 Vladimir Alexiev,
24568 Russ Allbery,
24569 Peter Arius,
24570 Matt Armstrong,
24571 Marc Auslander,
24572 Miles Bader,
24573 Alexei V. Barantsev,
24574 Frank Bennett,
24575 Robert Bihlmeyer,
24576 Chris Bone,
24577 Mark Borges,
24578 Mark Boyns,
24579 Lance A. Brown,
24580 Rob Browning,
24581 Kees de Bruin,
24582 Martin Buchholz,
24583 Joe Buehler,
24584 Kevin Buhr,
24585 Alastair Burt,
24586 Joao Cachopo,
24587 Zlatko Calusic,
24588 Massimo Campostrini,
24589 Castor,
24590 David Charlap,
24591 Dan Christensen,
24592 Kevin Christian,
24593 Jae-you Chung, @c ?
24594 James H. Cloos, Jr.,
24595 Laura Conrad,
24596 Michael R. Cook,
24597 Glenn Coombs,
24598 Andrew J. Cosgriff,
24599 Neil Crellin,
24600 Frank D. Cringle,
24601 Geoffrey T. Dairiki,
24602 Andre Deparade,
24603 Ulrik Dickow,
24604 Dave Disser,
24605 Rui-Tao Dong, @c ?
24606 Joev Dubach,
24607 Michael Welsh Duggan,
24608 Dave Edmondson,
24609 Paul Eggert,
24610 Mark W. Eichin,
24611 Karl Eichwalder,
24612 Enami Tsugutomo, @c Enami
24613 Michael Ernst,
24614 Luc Van Eycken,
24615 Sam Falkner,
24616 Nelson Jose dos Santos Ferreira,
24617 Sigbjorn Finne,
24618 Sven Fischer,
24619 Paul Fisher,
24620 Decklin Foster,
24621 Gary D. Foster,
24622 Paul Franklin,
24623 Guy Geens,
24624 Arne Georg Gleditsch,
24625 David S. Goldberg,
24626 Michelangelo Grigni,
24627 Dale Hagglund,
24628 D. Hall,
24629 Magnus Hammerin,
24630 Kenichi Handa, @c Handa
24631 Raja R. Harinath,
24632 Yoshiki Hayashi, @c Hayashi
24633 P. E. Jareth Hein,
24634 Hisashige Kenji, @c Hisashige
24635 Scott Hofmann,
24636 Marc Horowitz,
24637 Gunnar Horrigmo,
24638 Richard Hoskins,
24639 Brad Howes,
24640 Miguel de Icaza,
24641 François Felix Ingrand,
24642 Tatsuya Ichikawa, @c Ichikawa
24643 Ishikawa Ichiro, @c Ishikawa
24644 Lee Iverson,
24645 Iwamuro Motonori, @c Iwamuro
24646 Rajappa Iyer,
24647 Andreas Jaeger,
24648 Adam P. Jenkins,
24649 Randell Jesup,
24650 Fred Johansen,
24651 Gareth Jones,
24652 Greg Klanderman,
24653 Karl Kleinpaste,
24654 Michael Klingbeil,
24655 Peter Skov Knudsen,
24656 Shuhei Kobayashi, @c Kobayashi
24657 Petr Konecny,
24658 Koseki Yoshinori, @c Koseki
24659 Thor Kristoffersen,
24660 Jens Lautenbacher,
24661 Martin Larose,
24662 Seokchan Lee, @c Lee
24663 Joerg Lenneis,
24664 Carsten Leonhardt,
24665 James LewisMoss,
24666 Christian Limpach,
24667 Markus Linnala,
24668 Dave Love,
24669 Mike McEwan,
24670 Tonny Madsen,
24671 Shlomo Mahlab,
24672 Nat Makarevitch,
24673 Istvan Marko,
24674 David Martin,
24675 Jason R. Mastaler,
24676 Gordon Matzigkeit,
24677 Timo Metzemakers,
24678 Richard Mlynarik,
24679 Lantz Moore,
24680 Morioka Tomohiko, @c Morioka
24681 Erik Toubro Nielsen,
24682 Hrvoje Niksic,
24683 Andy Norman,
24684 Fred Oberhauser,
24685 C. R. Oldham,
24686 Alexandre Oliva,
24687 Ken Olstad,
24688 Masaharu Onishi, @c Onishi
24689 Hideki Ono, @c Ono
24690 Ettore Perazzoli,
24691 William Perry,
24692 Stephen Peters,
24693 Jens-Ulrik Holger Petersen,
24694 Ulrich Pfeifer,
24695 Matt Pharr,
24696 Andy Piper,
24697 John McClary Prevost,
24698 Bill Pringlemeir,
24699 Mike Pullen,
24700 Jim Radford,
24701 Colin Rafferty,
24702 Lasse Rasinen,
24703 Lars Balker Rasmussen,
24704 Joe Reiss,
24705 Renaud Rioboo,
24706 Roland B. Roberts,
24707 Bart Robinson,
24708 Christian von Roques,
24709 Markus Rost,
24710 Jason Rumney,
24711 Wolfgang Rupprecht,
24712 Jay Sachs,
24713 Dewey M. Sasser,
24714 Conrad Sauerwald,
24715 Loren Schall,
24716 Dan Schmidt,
24717 Ralph Schleicher,
24718 Philippe Schnoebelen,
24719 Andreas Schwab,
24720 Randal L. Schwartz,
24721 Danny Siu,
24722 Matt Simmons,
24723 Paul D. Smith,
24724 Jeff Sparkes,
24725 Toby Speight,
24726 Michael Sperber,
24727 Darren Stalder,
24728 Richard Stallman,
24729 Greg Stark,
24730 Sam Steingold,
24731 Paul Stevenson,
24732 Jonas Steverud,
24733 Paul Stodghill,
24734 Kiyokazu Suto, @c Suto
24735 Kurt Swanson,
24736 Samuel Tardieu,
24737 Teddy,
24738 Chuck Thompson,
24739 Tozawa Akihiko, @c Tozawa
24740 Philippe Troin,
24741 James Troup,
24742 Trung Tran-Duc,
24743 Jack Twilley,
24744 Aaron M. Ucko,
24745 Aki Vehtari,
24746 Didier Verna,
24747 Vladimir Volovich,
24748 Jan Vroonhof,
24749 Stefan Waldherr,
24750 Pete Ware,
24751 Barry A. Warsaw,
24752 Christoph Wedler,
24753 Joe Wells,
24754 Lee Willis,
24755 and
24756 Lloyd Zusman.
24757
24758
24759 For a full overview of what each person has done, the ChangeLogs
24760 included in the Gnus alpha distributions should give ample reading
24761 (550kB and counting).
24762
24763 Apologies to everybody that I've forgotten, of which there are many, I'm
24764 sure.
24765
24766 Gee, that's quite a list of people.  I guess that must mean that there
24767 actually are people who are using Gnus.  Who'd'a thunk it!
24768
24769
24770 @node New Features
24771 @subsection New Features
24772 @cindex new features
24773
24774 @menu
24775 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
24776 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
24777 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
24778 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
24779 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
24780 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10.
24781 * No Gnus::                     Lars, FIXME!
24782 @end menu
24783
24784 These lists are, of course, just @emph{short} overviews of the
24785 @emph{most} important new features.  No, really.  There are tons more.
24786 Yes, we have feeping creaturism in full effect.
24787
24788 @node ding Gnus
24789 @subsubsection (ding) Gnus
24790
24791 New features in Gnus 5.0/5.1:
24792
24793 @itemize @bullet
24794
24795 @item
24796 The look of all buffers can be changed by setting format-like variables
24797 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
24798
24799 @item
24800 Local spool and several @acronym{NNTP} servers can be used at once
24801 (@pxref{Select Methods}).
24802
24803 @item
24804 You can combine groups into virtual groups (@pxref{Virtual Groups}).
24805
24806 @item
24807 You can read a number of different mail formats (@pxref{Getting Mail}).
24808 All the mail back ends implement a convenient mail expiry scheme
24809 (@pxref{Expiring Mail}).
24810
24811 @item
24812 Gnus can use various strategies for gathering threads that have lost
24813 their roots (thereby gathering loose sub-threads into one thread) or it
24814 can go back and retrieve enough headers to build a complete thread
24815 (@pxref{Customizing Threading}).
24816
24817 @item
24818 Killed groups can be displayed in the group buffer, and you can read
24819 them as well (@pxref{Listing Groups}).
24820
24821 @item
24822 Gnus can do partial group updates---you do not have to retrieve the
24823 entire active file just to check for new articles in a few groups
24824 (@pxref{The Active File}).
24825
24826 @item
24827 Gnus implements a sliding scale of subscribedness to groups
24828 (@pxref{Group Levels}).
24829
24830 @item
24831 You can score articles according to any number of criteria
24832 (@pxref{Scoring}).  You can even get Gnus to find out how to score
24833 articles for you (@pxref{Adaptive Scoring}).
24834
24835 @item
24836 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
24837 manner, so it should be difficult to lose much data on what you have
24838 read if your machine should go down (@pxref{Auto Save}).
24839
24840 @item
24841 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
24842 cluttering up the @file{.emacs} file.
24843
24844 @item
24845 You can set the process mark on both groups and articles and perform
24846 operations on all the marked items (@pxref{Process/Prefix}).
24847
24848 @item
24849 You can grep through a subset of groups and create a group from the
24850 results (@pxref{Kibozed Groups}).
24851
24852 @item
24853 You can list subsets of groups according to, well, anything
24854 (@pxref{Listing Groups}).
24855
24856 @item
24857 You can browse foreign servers and subscribe to groups from those
24858 servers (@pxref{Browse Foreign Server}).
24859
24860 @item
24861 Gnus can fetch articles, asynchronously, on a second connection to the
24862 server (@pxref{Asynchronous Fetching}).
24863
24864 @item
24865 You can cache articles locally (@pxref{Article Caching}).
24866
24867 @item
24868 The uudecode functions have been expanded and generalized
24869 (@pxref{Decoding Articles}).
24870
24871 @item
24872 You can still post uuencoded articles, which was a little-known feature
24873 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
24874
24875 @item
24876 Fetching parents (and other articles) now actually works without
24877 glitches (@pxref{Finding the Parent}).
24878
24879 @item
24880 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
24881
24882 @item
24883 Digests (and other files) can be used as the basis for groups
24884 (@pxref{Document Groups}).
24885
24886 @item
24887 Articles can be highlighted and customized (@pxref{Customizing
24888 Articles}).
24889
24890 @item
24891 URLs and other external references can be buttonized (@pxref{Article
24892 Buttons}).
24893
24894 @item
24895 You can do lots of strange stuff with the Gnus window & frame
24896 configuration (@pxref{Window Layout}).
24897
24898 @item
24899 You can click on buttons instead of using the keyboard
24900 (@pxref{Buttons}).
24901
24902 @end itemize
24903
24904
24905 @node September Gnus
24906 @subsubsection September Gnus
24907
24908 @iftex
24909 @iflatex
24910 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
24911 @end iflatex
24912 @end iftex
24913
24914 New features in Gnus 5.2/5.3:
24915
24916 @itemize @bullet
24917
24918 @item
24919 A new message composition mode is used.  All old customization variables
24920 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
24921 now obsolete.
24922
24923 @item
24924 Gnus is now able to generate @dfn{sparse} threads---threads where
24925 missing articles are represented by empty nodes (@pxref{Customizing
24926 Threading}).
24927
24928 @lisp
24929 (setq gnus-build-sparse-threads 'some)
24930 @end lisp
24931
24932 @item
24933 Outgoing articles are stored on a special archive server
24934 (@pxref{Archived Messages}).
24935
24936 @item
24937 Partial thread regeneration now happens when articles are
24938 referred.
24939
24940 @item
24941 Gnus can make use of GroupLens predictions.
24942
24943 @item
24944 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
24945
24946 @item
24947 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
24948
24949 @lisp
24950 (setq gnus-use-trees t)
24951 @end lisp
24952
24953 @item
24954 An @code{nn}-like pick-and-read minor mode is available for the summary
24955 buffers (@pxref{Pick and Read}).
24956
24957 @lisp
24958 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
24959 @end lisp
24960
24961 @item
24962 In binary groups you can use a special binary minor mode (@pxref{Binary
24963 Groups}).
24964
24965 @item
24966 Groups can be grouped in a folding topic hierarchy (@pxref{Group
24967 Topics}).
24968
24969 @lisp
24970 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
24971 @end lisp
24972
24973 @item
24974 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
24975
24976 @item
24977 Groups can now have a score, and bubbling based on entry frequency
24978 is possible (@pxref{Group Score}).
24979
24980 @lisp
24981 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
24982 @end lisp
24983
24984 @item
24985 Groups can be process-marked, and commands can be performed on
24986 groups of groups (@pxref{Marking Groups}).
24987
24988 @item
24989 Caching is possible in virtual groups.
24990
24991 @item
24992 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
24993 news batches, ClariNet briefs collections, and just about everything
24994 else (@pxref{Document Groups}).
24995
24996 @item
24997 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
24998 (@pxref{SOUP}).
24999
25000 @item
25001 The Gnus cache is much faster.
25002
25003 @item
25004 Groups can be sorted according to many criteria (@pxref{Sorting
25005 Groups}).
25006
25007 @item
25008 New group parameters have been introduced to set list-addresses and
25009 expiry times (@pxref{Group Parameters}).
25010
25011 @item
25012 All formatting specs allow specifying faces to be used
25013 (@pxref{Formatting Fonts}).
25014
25015 @item
25016 There are several more commands for setting/removing/acting on process
25017 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
25018
25019 @item
25020 The summary buffer can be limited to show parts of the available
25021 articles based on a wide range of criteria.  These commands have been
25022 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
25023
25024 @item
25025 Articles can be made persistent with the @kbd{*} command
25026 (@pxref{Persistent Articles}).
25027
25028 @item
25029 All functions for hiding article elements are now toggles.
25030
25031 @item
25032 Article headers can be buttonized (@pxref{Article Washing}).
25033
25034 @item
25035 All mail back ends support fetching articles by @code{Message-ID}.
25036
25037 @item
25038 Duplicate mail can now be treated properly (@pxref{Duplicates}).
25039
25040 @item
25041 All summary mode commands are available directly from the article
25042 buffer (@pxref{Article Keymap}).
25043
25044 @item
25045 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
25046 Layout}).
25047
25048 @item
25049 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
25050 @iftex
25051 @iflatex
25052 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
25053 @end iflatex
25054 @end iftex
25055
25056 @item
25057 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
25058
25059 @lisp
25060 (setq gnus-use-nocem t)
25061 @end lisp
25062
25063 @item
25064 Groups can be made permanently visible (@pxref{Listing Groups}).
25065
25066 @lisp
25067 (setq gnus-permanently-visible-groups "^nnml:")
25068 @end lisp
25069
25070 @item
25071 Many new hooks have been introduced to make customizing easier.
25072
25073 @item
25074 Gnus respects the @code{Mail-Copies-To} header.
25075
25076 @item
25077 Threads can be gathered by looking at the @code{References} header
25078 (@pxref{Customizing Threading}).
25079
25080 @lisp
25081 (setq gnus-summary-thread-gathering-function
25082       'gnus-gather-threads-by-references)
25083 @end lisp
25084
25085 @item
25086 Read articles can be stored in a special backlog buffer to avoid
25087 refetching (@pxref{Article Backlog}).
25088
25089 @lisp
25090 (setq gnus-keep-backlog 50)
25091 @end lisp
25092
25093 @item
25094 A clean copy of the current article is always stored in a separate
25095 buffer to allow easier treatment.
25096
25097 @item
25098 Gnus can suggest where to save articles (@pxref{Saving Articles}).
25099
25100 @item
25101 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
25102 Articles}).
25103
25104 @lisp
25105 (setq gnus-prompt-before-saving t)
25106 @end lisp
25107
25108 @item
25109 @code{gnus-uu} can view decoded files asynchronously while fetching
25110 articles (@pxref{Other Decode Variables}).
25111
25112 @lisp
25113 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
25114 @end lisp
25115
25116 @item
25117 Filling in the article buffer now works properly on cited text
25118 (@pxref{Article Washing}).
25119
25120 @item
25121 Hiding cited text adds buttons to toggle hiding, and how much
25122 cited text to hide is now customizable (@pxref{Article Hiding}).
25123
25124 @lisp
25125 (setq gnus-cited-lines-visible 2)
25126 @end lisp
25127
25128 @item
25129 Boring headers can be hidden (@pxref{Article Hiding}).
25130
25131 @item
25132 Default scoring values can now be set from the menu bar.
25133
25134 @item
25135 Further syntax checking of outgoing articles have been added.
25136
25137 @end itemize
25138
25139
25140 @node Red Gnus
25141 @subsubsection Red Gnus
25142
25143 New features in Gnus 5.4/5.5:
25144
25145 @iftex
25146 @iflatex
25147 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
25148 @end iflatex
25149 @end iftex
25150
25151 @itemize @bullet
25152
25153 @item
25154 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
25155
25156 @item
25157 Article prefetching functionality has been moved up into
25158 Gnus (@pxref{Asynchronous Fetching}).
25159
25160 @item
25161 Scoring can now be performed with logical operators like @code{and},
25162 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
25163 Scoring}).
25164
25165 @item
25166 Article washing status can be displayed in the
25167 article mode line (@pxref{Misc Article}).
25168
25169 @item
25170 @file{gnus.el} has been split into many smaller files.
25171
25172 @item
25173 Suppression of duplicate articles based on Message-ID can be done
25174 (@pxref{Duplicate Suppression}).
25175
25176 @lisp
25177 (setq gnus-suppress-duplicates t)
25178 @end lisp
25179
25180 @item
25181 New variables for specifying what score and adapt files are to be
25182 considered home score and adapt files (@pxref{Home Score File}) have
25183 been added.
25184
25185 @item
25186 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
25187 Server Internals}).
25188
25189 @item
25190 Groups can inherit group parameters from parent topics (@pxref{Topic
25191 Parameters}).
25192
25193 @item
25194 Article editing has been revamped and is now actually usable.
25195
25196 @item
25197 Signatures can be recognized in more intelligent fashions
25198 (@pxref{Article Signature}).
25199
25200 @item
25201 Summary pick mode has been made to look more @code{nn}-like.  Line
25202 numbers are displayed and the @kbd{.} command can be used to pick
25203 articles (@code{Pick and Read}).
25204
25205 @item
25206 Commands for moving the @file{.newsrc.eld} from one server to
25207 another have been added (@pxref{Changing Servers}).
25208
25209 @item
25210 There's a way now to specify that ``uninteresting'' fields be suppressed
25211 when generating lines in buffers (@pxref{Advanced Formatting}).
25212
25213 @item
25214 Several commands in the group buffer can be undone with @kbd{C-M-_}
25215 (@pxref{Undo}).
25216
25217 @item
25218 Scoring can be done on words using the new score type @code{w}
25219 (@pxref{Score File Format}).
25220
25221 @item
25222 Adaptive scoring can be done on a Subject word-by-word basis
25223 (@pxref{Adaptive Scoring}).
25224
25225 @lisp
25226 (setq gnus-use-adaptive-scoring '(word))
25227 @end lisp
25228
25229 @item
25230 Scores can be decayed (@pxref{Score Decays}).
25231
25232 @lisp
25233 (setq gnus-decay-scores t)
25234 @end lisp
25235
25236 @item
25237 Scoring can be performed using a regexp on the Date header.  The Date is
25238 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
25239
25240 @item
25241 A new command has been added to remove all data on articles from
25242 the native server (@pxref{Changing Servers}).
25243
25244 @item
25245 A new command for reading collections of documents
25246 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
25247 (@pxref{Really Various Summary Commands}).
25248
25249 @item
25250 Process mark sets can be pushed and popped (@pxref{Setting Process
25251 Marks}).
25252
25253 @item
25254 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
25255 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
25256
25257 @item
25258 A new back end for reading searches from Web search engines
25259 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
25260 (@pxref{Web Searches}).
25261
25262 @item
25263 Groups inside topics can now be sorted using the standard sorting
25264 functions, and each topic can be sorted independently (@pxref{Topic
25265 Sorting}).
25266
25267 @item
25268 Subsets of the groups can be sorted independently (@code{Sorting
25269 Groups}).
25270
25271 @item
25272 Cached articles can be pulled into the groups (@pxref{Summary Generation
25273 Commands}).
25274 @iftex
25275 @iflatex
25276 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
25277 @end iflatex
25278 @end iftex
25279
25280 @item
25281 Score files are now applied in a more reliable order (@pxref{Score
25282 Variables}).
25283
25284 @item
25285 Reports on where mail messages end up can be generated (@pxref{Splitting
25286 Mail}).
25287
25288 @item
25289 More hooks and functions have been added to remove junk from incoming
25290 mail before saving the mail (@pxref{Washing Mail}).
25291
25292 @item
25293 Emphasized text can be properly fontisized:
25294
25295 @end itemize
25296
25297
25298 @node Quassia Gnus
25299 @subsubsection Quassia Gnus
25300
25301 New features in Gnus 5.6:
25302
25303 @itemize @bullet
25304
25305 @item
25306 New functionality for using Gnus as an offline newsreader has been
25307 added.  A plethora of new commands and modes have been added.
25308 @xref{Gnus Unplugged}, for the full story.
25309
25310 @item
25311 The @code{nndraft} back end has returned, but works differently than
25312 before.  All Message buffers are now also articles in the @code{nndraft}
25313 group, which is created automatically.
25314
25315 @item
25316 @code{gnus-alter-header-function} can now be used to alter header
25317 values.
25318
25319 @item
25320 @code{gnus-summary-goto-article} now accept Message-ID's.
25321
25322 @item
25323 A new Message command for deleting text in the body of a message
25324 outside the region: @kbd{C-c C-v}.
25325
25326 @item
25327 You can now post to component group in @code{nnvirtual} groups with
25328 @kbd{C-u C-c C-c}.
25329
25330 @item
25331  @code{nntp-rlogin-program}---new variable to ease customization.
25332
25333 @item
25334 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
25335 re-highlighting of the article buffer.
25336
25337 @item
25338 New element in @code{gnus-boring-article-headers}---@code{long-to}.
25339
25340 @item
25341 @kbd{M-i} symbolic prefix command.  @xref{Symbolic Prefixes}, for
25342 details.
25343
25344 @item
25345 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
25346 @kbd{a} to add the score rule to the @file{all.SCORE} file.
25347
25348 @item
25349 @code{gnus-simplify-subject-functions} variable to allow greater
25350 control over simplification.
25351
25352 @item
25353 @kbd{A T}---new command for fetching the current thread.
25354
25355 @item
25356 @kbd{/ T}---new command for including the current thread in the
25357 limit.
25358
25359 @item
25360 @kbd{M-RET} is a new Message command for breaking cited text.
25361
25362 @item
25363 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
25364
25365 @item
25366 The @code{custom-face-lookup} function has been removed.
25367 If you used this function in your initialization files, you must
25368 rewrite them to use @code{face-spec-set} instead.
25369
25370 @item
25371 Canceling now uses the current select method.  Symbolic prefix
25372 @kbd{a} forces normal posting method.
25373
25374 @item
25375 New command to translate M******** sm*rtq**t*s into proper
25376 text---@kbd{W d}.
25377
25378 @item
25379 For easier debugging of @code{nntp}, you can set
25380 @code{nntp-record-commands} to a non-@code{nil} value.
25381
25382 @item
25383 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
25384 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
25385
25386 @item
25387 A command for editing group parameters from the summary buffer
25388 has been added.
25389
25390 @item
25391 A history of where mails have been split is available.
25392
25393 @item
25394 A new article date command has been added---@code{article-date-iso8601}.
25395
25396 @item
25397 Subjects can be simplified when threading by setting
25398 @code{gnus-score-thread-simplify}.
25399
25400 @item
25401 A new function for citing in Message has been
25402 added---@code{message-cite-original-without-signature}.
25403
25404 @item
25405 @code{article-strip-all-blank-lines}---new article command.
25406
25407 @item
25408 A new Message command to kill to the end of the article has
25409 been added.
25410
25411 @item
25412 A minimum adaptive score can be specified by using the
25413 @code{gnus-adaptive-word-minimum} variable.
25414
25415 @item
25416 The ``lapsed date'' article header can be kept continually
25417 updated by the @code{gnus-start-date-timer} command.
25418
25419 @item
25420 Web listserv archives can be read with the @code{nnlistserv} back end.
25421
25422 @item
25423 Old dejanews archives can now be read by @code{nnweb}.
25424
25425 @end itemize
25426
25427 @node Pterodactyl Gnus
25428 @subsubsection Pterodactyl Gnus
25429
25430 New features in Gnus 5.8:
25431
25432 @itemize @bullet
25433
25434 @item
25435 The mail-fetching functions have changed.  See the manual for the
25436 many details.  In particular, all procmail fetching variables are gone.
25437
25438 If you used procmail like in
25439
25440 @lisp
25441 (setq nnmail-use-procmail t)
25442 (setq nnmail-spool-file 'procmail)
25443 (setq nnmail-procmail-directory "~/mail/incoming/")
25444 (setq nnmail-procmail-suffix "\\.in")
25445 @end lisp
25446
25447 this now has changed to
25448
25449 @lisp
25450 (setq mail-sources
25451       '((directory :path "~/mail/incoming/"
25452                    :suffix ".in")))
25453 @end lisp
25454
25455 @xref{Mail Source Specifiers}.
25456
25457 @item
25458 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
25459 Gnus, and adds a slew of new commands.  See the manual for details.
25460
25461 @item
25462 Gnus has also been multilingualized.  This also affects too
25463 many parts of Gnus to summarize here, and adds many new variables.
25464
25465 @item
25466 @code{gnus-auto-select-first} can now be a function to be
25467 called to position point.
25468
25469 @item
25470 The user can now decide which extra headers should be included in
25471 summary buffers and @acronym{NOV} files.
25472
25473 @item
25474 @code{gnus-article-display-hook} has been removed.  Instead, a number
25475 of variables starting with @code{gnus-treat-} have been added.
25476
25477 @item
25478 The Gnus posting styles have been redone again and now works in a
25479 subtly different manner.
25480
25481 @item
25482 New web-based back ends have been added: @code{nnslashdot},
25483 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
25484 again, to keep up with ever-changing layouts.
25485
25486 @item
25487 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
25488
25489 @end itemize
25490
25491 @node Oort Gnus
25492 @subsubsection Oort Gnus
25493 @cindex Oort Gnus
25494
25495 New features in Gnus 5.10:
25496
25497 @itemize @bullet
25498
25499 @item
25500 @code{gnus-group-read-ephemeral-group} can be called interactively,
25501 using @kbd{G M}.
25502
25503 @item
25504 In draft groups, @kbd{e} is now bound to @code{gnus-draft-edit-message}.
25505 Use @kbd{B w} for @code{gnus-summary-edit-article} instead.
25506
25507 @item
25508 The revised Gnus @acronym{FAQ} is included in the manual,
25509 @xref{Frequently Asked Questions}.
25510
25511 @item
25512 Upgrading from previous (stable) version if you have used Oort.
25513
25514 If you have tried Oort (the unstable Gnus branch leading to this
25515 release) but went back to a stable version, be careful when upgrading to
25516 this version.  In particular, you will probably want to remove all
25517 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
25518 read from your @file{.newsrc.eld} instead of from the
25519 @file{.marks}/@file{.mrk} file where this release store flags.  See a
25520 later entry for more information about marks.  Note that downgrading
25521 isn't save in general.
25522
25523 @item
25524 Article Buttons
25525
25526 More buttons for URLs, mail addresses, Message-IDs, Info links, man
25527 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
25528 variables @code{gnus-button-@var{*}-level} can be used to control the
25529 appearance of all article buttons.  @xref{Article Button Levels}.
25530
25531 @item
25532 Dired integration
25533
25534 @code{gnus-dired-minor-mode} (see @ref{Other modes}) installs key
25535 bindings in dired buffers to send a file as an attachment, open a file
25536 using the appropriate mailcap entry, and print a file using the mailcap
25537 entry.
25538
25539 @item
25540 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
25541
25542 @item
25543 Single-part yenc encoded attachments can be decoded.
25544
25545 @item
25546 Picons
25547
25548 The picons code has been reimplemented to work in GNU Emacs---some of
25549 the previous options have been removed or renamed.
25550
25551 Picons are small ``personal icons'' representing users, domain and
25552 newsgroups, which can be displayed in the Article buffer.
25553 @xref{Picons}.
25554
25555 @item
25556 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
25557 boundary line is drawn at the end of the headers.
25558
25559 @item
25560 Retrieval of charters and control messages
25561
25562 There are new commands for fetching newsgroup charters (@kbd{H c}) and
25563 control messages (@kbd{H C}).
25564
25565 @item
25566 Delayed articles
25567
25568 You can delay the sending of a message with @kbd{C-c C-j} in the Message
25569 buffer.  The messages are delivered at specified time.  This is useful
25570 for sending yourself reminders.  @xref{Delayed Articles}.
25571
25572 @item
25573 If @code{auto-compression-mode} is enabled, attachments are automatically
25574 decompressed when activated.
25575
25576 @item
25577 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
25578 the nnml back end allows compressed message files.
25579
25580 @item
25581 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
25582
25583 @item
25584 The Summary Buffer uses an arrow in the fringe to indicate the current
25585 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
25586
25587 @item
25588 Warn about email replies to news
25589
25590 Do you often find yourself replying to news by email by mistake?  Then
25591 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
25592 you.
25593
25594 @item
25595 If the new option @code{gnus-summary-display-while-building} is
25596 non-@code{nil}, the summary buffer is shown and updated as it's being
25597 built.
25598
25599 @item
25600 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
25601 opposed to old but unread messages).
25602
25603 @item
25604 The new option @code{gnus-gcc-mark-as-read} automatically marks
25605 Gcc articles as read.
25606
25607 @item
25608 The nndoc back end now supports mailman digests and exim bounces.
25609
25610 @item
25611 Gnus supports RFC 2369 mailing list headers, and adds a number of
25612 related commands in mailing list groups.  @xref{Mailing List}.
25613
25614 @item
25615 The Date header can be displayed in a format that can be read aloud
25616 in English.  @xref{Article Date}.
25617
25618 @item
25619 The envelope sender address can be customized when using Sendmail.
25620 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
25621
25622 @item
25623 diffs are automatically highlighted in groups matching
25624 @code{mm-uu-diff-groups-regexp}
25625
25626 @item
25627 @acronym{TLS} wrapper shipped with Gnus
25628
25629 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
25630 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
25631 @acronym{TLS}/@acronym{SSL} support via (external third party)
25632 @file{ssl.el} and OpenSSL still works.
25633
25634 @item
25635 New @file{make.bat} for compiling and installing Gnus under MS Windows
25636
25637 Use @file{make.bat} if you want to install Gnus under MS Windows, the
25638 first argument to the batch-program should be the directory where
25639 @file{xemacs.exe} respectively @file{emacs.exe} is located, iff you want
25640 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
25641 the second parameter.
25642
25643 @file{make.bat} has been rewritten from scratch, it now features
25644 automatic recognition of XEmacs and GNU Emacs, generates
25645 @file{gnus-load.el}, checks if errors occur while compilation and
25646 generation of info files and reports them at the end of the build
25647 process.  It now uses @code{makeinfo} if it is available and falls
25648 back to @file{infohack.el} otherwise.  @file{make.bat} should now
25649 install all files which are necessary to run Gnus and be generally a
25650 complete replacement for the @code{configure; make; make install}
25651 cycle used under Unix systems.
25652
25653 The new @file{make.bat} makes @file{make-x.bat} superfluous, so it has
25654 been removed.
25655
25656 @item
25657 Support for non-@acronym{ASCII} domain names
25658
25659 Message supports non-@acronym{ASCII} domain names in From:, To: and
25660 Cc: and will query you whether to perform encoding when you try to
25661 send a message.  The variable @code{message-use-idna} controls this.
25662 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
25663 and Cc: when you view a message.  The variable @code{gnus-use-idna}
25664 controls this.
25665
25666 @item
25667 Better handling of Microsoft citation styles
25668
25669 Gnus now tries to recognize the mangled header block that some Microsoft
25670 mailers use to indicate that the rest of the message is a citation, even
25671 though it is not quoted in any way.  The variable
25672 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
25673 citations.
25674
25675 @item
25676 @code{gnus-article-skip-boring}
25677
25678 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
25679 not scroll down to show you a page that contains only boring text,
25680 which by default means cited text and signature.  You can customize
25681 what is skippable using @code{gnus-article-boring-faces}.
25682
25683 This feature is especially useful if you read many articles that
25684 consist of a little new content at the top with a long, untrimmed
25685 message cited below.
25686
25687 @item
25688 The format spec @code{%C} for positioning point has changed to @code{%*}.
25689
25690 @item
25691 The new variable @code{gnus-parameters} can be used to set group parameters.
25692
25693 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
25694 the parameters in @file{~/.newsrc.eld}, but via this variable you can
25695 enjoy the powers of customize, and simplified backups since you set the
25696 variable in @file{~/.emacs} instead of @file{~/.newsrc.eld}.  The
25697 variable maps regular expressions matching group names to group
25698 parameters, a'la:
25699 @lisp
25700 (setq gnus-parameters
25701       '(("mail\\..*"
25702          (gnus-show-threads nil)
25703          (gnus-use-scoring nil))
25704         ("^nnimap:\\(foo.bar\\)$"
25705          (to-group . "\\1"))))
25706 @end lisp
25707
25708 @item
25709 Smileys (@samp{:-)}, @samp{;-)} etc) are now iconized for Emacs too.
25710
25711 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.emacs} to
25712 disable it.
25713
25714 @item
25715 Gnus no longer generate the Sender: header automatically.
25716
25717 Earlier it was generated iff the user configurable email address was
25718 different from the Gnus guessed default user address.  As the guessing
25719 algorithm is rarely correct these days, and (more controversially) the
25720 only use of the Sender: header was to check if you are entitled to
25721 cancel/supersede news (which is now solved by Cancel Locks instead,
25722 see another entry), generation of the header has been disabled by
25723 default.  See the variables @code{message-required-headers},
25724 @code{message-required-news-headers}, and
25725 @code{message-required-mail-headers}.
25726
25727 @item
25728 Features from third party @file{message-utils.el} added to @file{message.el}.
25729
25730 Message now asks if you wish to remove @samp{(was: <old subject>)} from
25731 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
25732 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
25733 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
25734 appropriate headers and a note in the body for cross-postings and
25735 followups (see the variables @code{message-cross-post-@var{*}}).
25736
25737 @item
25738 References and X-Draft-Headers are no longer generated when you start
25739 composing messages and @code{message-generate-headers-first} is
25740 @code{nil}.
25741
25742 @item
25743 Improved anti-spam features.
25744
25745 Gnus is now able to take out spam from your mail and news streams
25746 using a wide variety of programs and filter rules.  Among the supported
25747 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
25748 for easy use of external packages such as SpamAssassin and Hashcash
25749 are also new.  @xref{Thwarting Email Spam}.
25750
25751 @item
25752 Easy inclusion of X-Faces headers.
25753
25754 @item
25755 Face headers handling.
25756
25757 @item
25758 In the summary buffer, the new command @kbd{/ N} inserts new messages
25759 and @kbd{/ o} inserts old messages.
25760
25761 @item
25762 Gnus decodes morse encoded messages if you press @kbd{W m}.
25763
25764 @item
25765 Unread count correct in nnimap groups.
25766
25767 The estimated number of unread articles in the group buffer should now
25768 be correct for nnimap groups.  This is achieved by calling
25769 @code{nnimap-fixup-unread-after-getting-new-news} from the
25770 @code{gnus-setup-news-hook} (called on startup) and
25771 @code{gnus-after-getting-new-news-hook}. (called after getting new
25772 mail).  If you have modified those variables from the default, you may
25773 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
25774 you were happy with the estimate and want to save some (minimal) time
25775 when getting new mail, remove the function.
25776
25777 @item
25778 Group Carbon Copy (GCC) quoting
25779
25780 To support groups that contains SPC and other weird characters, groups
25781 are quoted before they are placed in the Gcc: header.  This means
25782 variables such as @code{gnus-message-archive-group} should no longer
25783 contain quote characters to make groups containing SPC work.  Also, if
25784 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
25785 into two groups) you must change it to return the list
25786 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
25787 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
25788 was incorrect earlier, it just didn't generate any problems since it
25789 was inserted directly.
25790
25791 @item
25792 @file{~/News/overview/} not used.
25793
25794 As a result of the following change, the @file{~/News/overview/}
25795 directory is not used any more.  You can safely delete the entire
25796 hierarchy.
25797
25798 @item
25799 @code{gnus-agent}
25800
25801 The Gnus Agent has seen a major updated and is now enabled by default,
25802 and all nntp and nnimap servers from @code{gnus-select-method} and
25803 @code{gnus-secondary-select-method} are agentized by default.  Earlier
25804 only the server in @code{gnus-select-method} was agentized by the
25805 default, and the agent was disabled by default.  When the agent is
25806 enabled, headers are now also retrieved from the Agent cache instead
25807 of the back ends when possible.  Earlier this only happened in the
25808 unplugged state.  You can enroll or remove servers with @kbd{J a} and
25809 @kbd{J r} in the server buffer.  Gnus will not download articles into
25810 the Agent cache, unless you instruct it to do so, though, by using
25811 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
25812 behaviour of having the Agent disabled with @code{(setq gnus-agent
25813 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
25814 is not needed any more.
25815
25816 @item
25817 @code{gnus-summary-line-format}
25818
25819 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
25820 %s\n}.  Moreover @code{gnus-extra-headers},
25821 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
25822 changed their default so that the users name will be replaced by the
25823 recipient's name or the group name posting to for @acronym{NNTP}
25824 groups.
25825
25826 @item
25827 @file{deuglify.el} (@code{gnus-article-outlook-deuglify-article})
25828
25829 A new file from Raymond Scholz @email{rscholz@@zonix.de} for deuglifying
25830 broken Outlook (Express) articles.
25831
25832 @item
25833 @code{(require 'gnus-load)}
25834
25835 If you use a stand-alone Gnus distribution, you'd better add
25836 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
25837 lisp directory into load-path.
25838
25839 File @file{gnus-load.el} contains autoload commands, functions and variables,
25840 some of which may not be included in distributions of Emacsen.
25841
25842 @item
25843 @code{gnus-slave-unplugged}
25844
25845 A new command which starts Gnus offline in slave mode.
25846
25847 @item
25848 @code{message-insinuate-rmail}
25849
25850 Adding @code{(message-insinuate-rmail)} and @code{(setq
25851 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
25852 compose, reply and forward messages in message-mode, where you can
25853 enjoy the power of @acronym{MML}.
25854
25855 @item
25856 @code{message-minibuffer-local-map}
25857
25858 The line below enables BBDB in resending a message:
25859 @lisp
25860 (define-key message-minibuffer-local-map [(tab)]
25861   'bbdb-complete-name)
25862 @end lisp
25863
25864 @item
25865 Externalizing and deleting of attachments.
25866
25867 If @code{gnus-gcc-externalize-attachments} or
25868 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
25869 local files as external parts.
25870
25871 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
25872 on @acronym{MIME} buttons) saves a part and replaces the part with an
25873 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
25874 @acronym{MIME} buttons) removes a part.  It works only on back ends
25875 that support editing.
25876
25877 @item
25878 @code{gnus-default-charset}
25879
25880 The default value is determined from the
25881 @code{current-language-environment} variable, instead of
25882 @code{iso-8859-1}.  Also the @samp{.*} item in
25883 @code{gnus-group-charset-alist} is removed.
25884
25885 @item
25886 @code{gnus-posting-styles}
25887
25888 Add a new format of match like
25889 @lisp
25890 ((header "to" "larsi.*org")
25891  (Organization "Somewhere, Inc."))
25892 @end lisp
25893 The old format like the lines below is obsolete, but still accepted.
25894 @lisp
25895 (header "to" "larsi.*org"
25896         (Organization "Somewhere, Inc."))
25897 @end lisp
25898
25899 @item
25900 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
25901
25902 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
25903 added into these two variables.  If you customized those, perhaps you
25904 need add those two headers too.
25905
25906 @item
25907 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
25908
25909 If one reads an article while plugged, and the article already exists
25910 in the Agent, it won't get downloaded once more.  @code{(setq
25911 gnus-agent-cache nil)} reverts to the old behavior.
25912
25913 @item
25914 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
25915 composing messages, it is enabled by @code{use-hard-newlines}.
25916 Decoding format=flowed was present but not documented in earlier
25917 versions.
25918
25919 @item
25920 Gnus supports the generation of RFC 2298 Disposition Notification requests.
25921
25922 This is invoked with the @kbd{C-c M-n} key binding from message mode.
25923
25924 @item
25925 Gnus supports Maildir groups.
25926
25927 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
25928
25929 @item
25930 Printing capabilities are enhanced.
25931
25932 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
25933 Article buffers.  Also, each individual @acronym{MIME} part can be
25934 printed using @kbd{p} on the @acronym{MIME} button.
25935
25936 @item
25937 Message supports the Importance: (RFC 2156) header.
25938
25939 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
25940 the valid values.
25941
25942 @item
25943 Gnus supports Cancel Locks in News.
25944
25945 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
25946 used to determine if you wrote an article or not (for canceling and
25947 superseding).  Gnus generates a random password string the first time
25948 you post a message, and saves it in your @file{~/.emacs} using the Custom
25949 system.  While the variable is called @code{canlock-password}, it is not
25950 security sensitive data.  Publishing your canlock string on the web
25951 will not allow anyone to be able to anything she could not already do.
25952 The behaviour can be changed by customizing @code{message-insert-canlock}.
25953
25954 @item
25955 Gnus supports server-side mail filtering using Sieve.
25956
25957 Sieve rules can be added as Group Parameters for groups, and the
25958 complete Sieve script is generated using @kbd{D g} from the Group
25959 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
25960 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
25961 manual @ref{Top, , Top, sieve, Emacs Sieve}.
25962
25963 @item
25964 Extended format specs.
25965
25966 Format spec @samp{%&user-date;} is added into
25967 @code{gnus-summary-line-format-alist}.  Also, user defined extended
25968 format specs are supported.  The extended format specs look like
25969 @samp{%u&foo;}, which invokes function
25970 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
25971 escape character, old user defined format @samp{%u&} is no longer supported.
25972
25973 @item
25974 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
25975
25976 It was aliased to @kbd{Y c}
25977 (@code{gnus-summary-insert-cached-articles}).  The new function filters
25978 out other articles.
25979
25980 @item Some limiting commands accept a @kbd{C-u} prefix to negate the match.
25981
25982 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
25983 s}, @kbd{/ a}, and @kbd{/ x}
25984 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
25985 result will be to display all articles that do not match the expression.
25986
25987 @item
25988 Group names are treated as UTF-8 by default.
25989
25990 This is supposedly what USEFOR wanted to migrate to.  See
25991 @code{gnus-group-name-charset-group-alist} and
25992 @code{gnus-group-name-charset-method-alist} for customization.
25993
25994 @item
25995 The nnml and nnfolder back ends store marks for each groups.
25996
25997 This makes it possible to take backup of nnml/nnfolder servers/groups
25998 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
25999 makes it possible to share articles and marks between users (without
26000 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
26001 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
26002 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
26003 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
26004 another machine, Gnus will automatically use the @file{.marks} or
26005 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
26006 The new server variables @code{nnml-marks-is-evil} and
26007 @code{nnfolder-marks-is-evil} can be used to disable this feature.
26008
26009 @item
26010 The menu bar item (in Group and Summary buffer) named ``Misc'' has
26011 been renamed to ``Gnus''.
26012
26013 @item
26014 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
26015 renamed to ``Attachments''.  Note that this menu also contains security
26016 related stuff, like signing and encryption (@pxref{Security, Security,,
26017 message, Message Manual}).
26018
26019 @item
26020 @code{gnus-group-charset-alist} and
26021 @code{gnus-group-ignored-charsets-alist}.
26022
26023 The regexps in these variables are compared with full group names
26024 instead of real group names in 5.8.  Users who customize these
26025 variables should change those regexps accordingly.  For example:
26026 @lisp
26027 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
26028 @end lisp
26029
26030 @item
26031 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
26032 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
26033
26034 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
26035 additional Lisp libraries.  This add several menu items to the
26036 Attachments menu, and @kbd{C-c RET} key bindings, when composing
26037 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
26038
26039 @item
26040 Gnus inlines external parts (message/external).
26041
26042 @item
26043 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
26044 C-m}.
26045
26046 This change was made to avoid conflict with the standard binding of
26047 @code{back-to-indentation}, which is also useful in message mode.
26048
26049 @item
26050 The default for @code{message-forward-show-mml} changed to symbol @code{best}.
26051
26052 The behaviour for the @code{best} value is to show @acronym{MML} (i.e.,
26053 convert to @acronym{MIME}) when appropriate.  @acronym{MML} will not be
26054 used when forwarding signed or encrypted messages, as the conversion
26055 invalidate the digital signature.
26056 @end itemize
26057
26058 @node No Gnus
26059 @subsubsection No Gnus
26060 @cindex No Gnus
26061
26062 New features in No Gnus:
26063 @c FIXME: Gnus 5.12?
26064
26065 @include gnus-news.texi
26066
26067 @iftex
26068
26069 @page
26070 @node The Manual
26071 @section The Manual
26072 @cindex colophon
26073 @cindex manual
26074
26075 This manual was generated from a TeXinfo file and then run through
26076 either @code{texi2dvi}
26077 @iflatex
26078 or my own home-brewed TeXinfo to \LaTeX\ transformer,
26079 and then run through @code{latex} and @code{dvips}
26080 @end iflatex
26081 to get what you hold in your hands now.
26082
26083 The following conventions have been used:
26084
26085 @enumerate
26086
26087 @item
26088 This is a @samp{string}
26089
26090 @item
26091 This is a @kbd{keystroke}
26092
26093 @item
26094 This is a @file{file}
26095
26096 @item
26097 This is a @code{symbol}
26098
26099 @end enumerate
26100
26101 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
26102 mean:
26103
26104 @lisp
26105 (setq flargnoze "yes")
26106 @end lisp
26107
26108 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
26109
26110 @lisp
26111 (setq flumphel 'yes)
26112 @end lisp
26113
26114 @samp{yes} and @code{yes} are two @emph{very} different things---don't
26115 ever get them confused.
26116
26117 @iflatex
26118 @c @head
26119 Of course, everything in this manual is of vital interest, so you should
26120 read it all.  Several times.  However, if you feel like skimming the
26121 manual, look for that gnu head you should see in the margin over
26122 there---it means that what's being discussed is of more importance than
26123 the rest of the stuff.  (On the other hand, if everything is infinitely
26124 important, how can anything be more important than that?  Just one more
26125 of the mysteries of this world, I guess.)
26126 @end iflatex
26127
26128 @end iftex
26129
26130
26131 @node On Writing Manuals
26132 @section On Writing Manuals
26133
26134 I guess most manuals are written after-the-fact; documenting a program
26135 that's already there.  This is not how this manual is written.  When
26136 implementing something, I write the manual entry for that something
26137 straight away.  I then see that it's difficult to explain the
26138 functionality, so I write how it's supposed to be, and then I change the
26139 implementation.  Writing the documentation and writing the code goes
26140 hand in hand.
26141
26142 This, of course, means that this manual has no, or little, flow.  It
26143 documents absolutely everything in Gnus, but often not where you're
26144 looking for it.  It is a reference manual, and not a guide to how to get
26145 started with Gnus.
26146
26147 That would be a totally different book, that should be written using the
26148 reference manual as source material.  It would look quite differently.
26149
26150
26151 @page
26152 @node Terminology
26153 @section Terminology
26154
26155 @cindex terminology
26156 @table @dfn
26157
26158 @item news
26159 @cindex news
26160 This is what you are supposed to use this thing for---reading news.
26161 News is generally fetched from a nearby @acronym{NNTP} server, and is
26162 generally publicly available to everybody.  If you post news, the entire
26163 world is likely to read just what you have written, and they'll all
26164 snigger mischievously.  Behind your back.
26165
26166 @item mail
26167 @cindex mail
26168 Everything that's delivered to you personally is mail.  Some news/mail
26169 readers (like Gnus) blur the distinction between mail and news, but
26170 there is a difference.  Mail is private.  News is public.  Mailing is
26171 not posting, and replying is not following up.
26172
26173 @item reply
26174 @cindex reply
26175 Send a mail to the person who has written what you are reading.
26176
26177 @item follow up
26178 @cindex follow up
26179 Post an article to the current newsgroup responding to the article you
26180 are reading.
26181
26182 @item back end
26183 @cindex back end
26184 Gnus considers mail and news to be mostly the same, really.  The only
26185 difference is how to access the actual articles.  News articles are
26186 commonly fetched via the protocol @acronym{NNTP}, whereas mail
26187 messages could be read from a file on the local disk.  The internal
26188 architecture of Gnus thus comprises a ``front end'' and a number of
26189 ``back ends''.  Internally, when you enter a group (by hitting
26190 @key{RET}, say), you thereby invoke a function in the front end in
26191 Gnus.  The front end then ``talks'' to a back end and says things like
26192 ``Give me the list of articles in the foo group'' or ``Show me article
26193 number 4711''.
26194
26195 So a back end mainly defines either a protocol (the @code{nntp} back
26196 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
26197 accesses mail via @acronym{IMAP}) or a file format and directory
26198 layout (the @code{nnspool} back end accesses news via the common
26199 ``spool directory'' format, the @code{nnml} back end access mail via a
26200 file format and directory layout that's quite similar).
26201
26202 Gnus does not handle the underlying media, so to speak---this is all
26203 done by the back ends.  A back end is a collection of functions to
26204 access the articles.
26205
26206 However, sometimes the term ``back end'' is also used where ``server''
26207 would have been more appropriate.  And then there is the term ``select
26208 method'' which can mean either.  The Gnus terminology can be quite
26209 confusing.
26210
26211 @item native
26212 @cindex native
26213 Gnus will always use one method (and back end) as the @dfn{native}, or
26214 default, way of getting news.
26215
26216 @item foreign
26217 @cindex foreign
26218 You can also have any number of foreign groups active at the same time.
26219 These are groups that use non-native non-secondary back ends for getting
26220 news.
26221
26222 @item secondary
26223 @cindex secondary
26224 Secondary back ends are somewhere half-way between being native and being
26225 foreign, but they mostly act like they are native.
26226
26227 @item article
26228 @cindex article
26229 A message that has been posted as news.
26230
26231 @item mail message
26232 @cindex mail message
26233 A message that has been mailed.
26234
26235 @item message
26236 @cindex message
26237 A mail message or news article
26238
26239 @item head
26240 @cindex head
26241 The top part of a message, where administrative information (etc.) is
26242 put.
26243
26244 @item body
26245 @cindex body
26246 The rest of an article.  Everything not in the head is in the
26247 body.
26248
26249 @item header
26250 @cindex header
26251 A line from the head of an article.
26252
26253 @item headers
26254 @cindex headers
26255 A collection of such lines, or a collection of heads.  Or even a
26256 collection of @acronym{NOV} lines.
26257
26258 @item @acronym{NOV}
26259 @cindex @acronym{NOV}
26260 When Gnus enters a group, it asks the back end for the headers of all
26261 unread articles in the group.  Most servers support the News OverView
26262 format, which is more compact and much faster to read and parse than the
26263 normal @sc{head} format.
26264
26265 @item level
26266 @cindex levels
26267 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
26268 that have a lower level are ``more'' subscribed than the groups with a
26269 higher level.  In fact, groups on levels 1-5 are considered
26270 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
26271 are @dfn{killed}.  Commands for listing groups and scanning for new
26272 articles will all use the numeric prefix as @dfn{working level}.
26273
26274 @item killed groups
26275 @cindex killed groups
26276 No information on killed groups is stored or updated, which makes killed
26277 groups much easier to handle than subscribed groups.
26278
26279 @item zombie groups
26280 @cindex zombie groups
26281 Just like killed groups, only slightly less dead.
26282
26283 @item active file
26284 @cindex active file
26285 The news server has to keep track of what articles it carries, and what
26286 groups exist.  All this information in stored in the active file, which
26287 is rather large, as you might surmise.
26288
26289 @item bogus groups
26290 @cindex bogus groups
26291 A group that exists in the @file{.newsrc} file, but isn't known to the
26292 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
26293 This means that the group probably doesn't exist (any more).
26294
26295 @item activating
26296 @cindex activating groups
26297 The act of asking the server for info on a group and computing the
26298 number of unread articles is called @dfn{activating the group}.
26299 Un-activated groups are listed with @samp{*} in the group buffer.
26300
26301 @item server
26302 @cindex server
26303 A machine one can connect to and get news (or mail) from.
26304
26305 @item select method
26306 @cindex select method
26307 A structure that specifies the back end, the server and the virtual
26308 server settings.
26309
26310 @item virtual server
26311 @cindex virtual server
26312 A named select method.  Since a select method defines all there is to
26313 know about connecting to a (physical) server, taking the thing as a
26314 whole is a virtual server.
26315
26316 @item washing
26317 @cindex washing
26318 Taking a buffer and running it through a filter of some sort.  The
26319 result will (more often than not) be cleaner and more pleasing than the
26320 original.
26321
26322 @item ephemeral groups
26323 @cindex ephemeral groups
26324 @cindex temporary groups
26325 Most groups store data on what articles you have read.  @dfn{Ephemeral}
26326 groups are groups that will have no data stored---when you exit the
26327 group, it'll disappear into the aether.
26328
26329 @item solid groups
26330 @cindex solid groups
26331 This is the opposite of ephemeral groups.  All groups listed in the
26332 group buffer are solid groups.
26333
26334 @item sparse articles
26335 @cindex sparse articles
26336 These are article placeholders shown in the summary buffer when
26337 @code{gnus-build-sparse-threads} has been switched on.
26338
26339 @item threading
26340 @cindex threading
26341 To put responses to articles directly after the articles they respond
26342 to---in a hierarchical fashion.
26343
26344 @item root
26345 @cindex root
26346 @cindex thread root
26347 The first article in a thread is the root.  It is the ancestor of all
26348 articles in the thread.
26349
26350 @item parent
26351 @cindex parent
26352 An article that has responses.
26353
26354 @item child
26355 @cindex child
26356 An article that responds to a different article---its parent.
26357
26358 @item digest
26359 @cindex digest
26360 A collection of messages in one file.  The most common digest format is
26361 specified by RFC 1153.
26362
26363 @item splitting
26364 @cindex splitting, terminolgy
26365 @cindex mail sorting
26366 @cindex mail filtering (splitting)
26367 The action of sorting your emails according to certain rules. Sometimes
26368 incorrectly called mail filtering.
26369
26370 @end table
26371
26372
26373 @page
26374 @node Customization
26375 @section Customization
26376 @cindex general customization
26377
26378 All variables are properly documented elsewhere in this manual.  This
26379 section is designed to give general pointers on how to customize Gnus
26380 for some quite common situations.
26381
26382 @menu
26383 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
26384 * Slow Terminal Connection::    You run a remote Emacs.
26385 * Little Disk Space::           You feel that having large setup files is icky.
26386 * Slow Machine::                You feel like buying a faster machine.
26387 @end menu
26388
26389
26390 @node Slow/Expensive Connection
26391 @subsection Slow/Expensive NNTP Connection
26392
26393 If you run Emacs on a machine locally, and get your news from a machine
26394 over some very thin strings, you want to cut down on the amount of data
26395 Gnus has to get from the @acronym{NNTP} server.
26396
26397 @table @code
26398
26399 @item gnus-read-active-file
26400 Set this to @code{nil}, which will inhibit Gnus from requesting the
26401 entire active file from the server.  This file is often v.  large.  You
26402 also have to set @code{gnus-check-new-newsgroups} and
26403 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
26404 doesn't suddenly decide to fetch the active file anyway.
26405
26406 @item gnus-nov-is-evil
26407 This one has to be @code{nil}.  If not, grabbing article headers from
26408 the @acronym{NNTP} server will not be very fast.  Not all @acronym{NNTP} servers
26409 support @sc{xover}; Gnus will detect this by itself.
26410 @end table
26411
26412
26413 @node Slow Terminal Connection
26414 @subsection Slow Terminal Connection
26415
26416 Let's say you use your home computer for dialing up the system that runs
26417 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
26418 possible) the amount of data sent over the wires.
26419
26420 @table @code
26421
26422 @item gnus-auto-center-summary
26423 Set this to @code{nil} to inhibit Gnus from re-centering the summary
26424 buffer all the time.  If it is @code{vertical}, do only vertical
26425 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
26426 horizontal and vertical recentering.
26427
26428 @item gnus-visible-headers
26429 Cut down on the headers included in the articles to the
26430 minimum.  You can, in fact, make do without them altogether---most of the
26431 useful data is in the summary buffer, anyway.  Set this variable to
26432 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
26433
26434 Set this hook to all the available hiding commands:
26435 @lisp
26436 (setq gnus-treat-hide-headers 'head
26437       gnus-treat-hide-signature t
26438       gnus-treat-hide-citation t)
26439 @end lisp
26440
26441 @item gnus-use-full-window
26442 By setting this to @code{nil}, you can make all the windows smaller.
26443 While this doesn't really cut down much generally, it means that you
26444 have to see smaller portions of articles before deciding that you didn't
26445 want to read them anyway.
26446
26447 @item gnus-thread-hide-subtree
26448 If this is non-@code{nil}, all threads in the summary buffer will be
26449 hidden initially.
26450
26451
26452 @item gnus-updated-mode-lines
26453 If this is @code{nil}, Gnus will not put information in the buffer mode
26454 lines, which might save some time.
26455 @end table
26456
26457
26458 @node Little Disk Space
26459 @subsection Little Disk Space
26460 @cindex disk space
26461
26462 The startup files can get rather large, so you may want to cut their
26463 sizes a bit if you are running out of space.
26464
26465 @table @code
26466
26467 @item gnus-save-newsrc-file
26468 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
26469 only save @file{.newsrc.eld}.  This means that you will not be able to
26470 use any other newsreaders than Gnus.  This variable is @code{t} by
26471 default.
26472
26473 @item gnus-read-newsrc-file
26474 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
26475 only read @file{.newsrc.eld}.  This means that you will not be able to
26476 use any other newsreaders than Gnus.  This variable is @code{t} by
26477 default.
26478
26479 @item gnus-save-killed-list
26480 If this is @code{nil}, Gnus will not save the list of dead groups.  You
26481 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
26482 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
26483 variable to @code{nil}.  This variable is @code{t} by default.
26484
26485 @end table
26486
26487
26488 @node Slow Machine
26489 @subsection Slow Machine
26490 @cindex slow machine
26491
26492 If you have a slow machine, or are just really impatient, there are a
26493 few things you can do to make Gnus run faster.
26494
26495 Set @code{gnus-check-new-newsgroups} and
26496 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
26497
26498 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
26499 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
26500 summary buffer faster.
26501
26502
26503 @page
26504 @node Troubleshooting
26505 @section Troubleshooting
26506 @cindex troubleshooting
26507
26508 Gnus works @emph{so} well straight out of the box---I can't imagine any
26509 problems, really.
26510
26511 Ahem.
26512
26513 @enumerate
26514
26515 @item
26516 Make sure your computer is switched on.
26517
26518 @item
26519 Make sure that you really load the current Gnus version.  If you have
26520 been running @sc{gnus}, you need to exit Emacs and start it up again before
26521 Gnus will work.
26522
26523 @item
26524 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
26525 like @samp{Gnus v5.10.6} you have the right files loaded.  Otherwise
26526 you have some old @file{.el} files lying around.  Delete these.
26527
26528 @item
26529 Read the help group (@kbd{G h} in the group buffer) for a
26530 @acronym{FAQ} and a how-to.
26531
26532 @item
26533 @vindex max-lisp-eval-depth
26534 Gnus works on many recursive structures, and in some extreme (and very
26535 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
26536 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
26537 something like that.
26538 @end enumerate
26539
26540 If all else fails, report the problem as a bug.
26541
26542 @cindex bugs
26543 @cindex reporting bugs
26544
26545 @kindex M-x gnus-bug
26546 @findex gnus-bug
26547 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
26548 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
26549 me the backtrace.  I will fix bugs, but I can only fix them if you send
26550 me a precise description as to how to reproduce the bug.
26551
26552 You really can never be too detailed in a bug report.  Always use the
26553 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
26554 a 10Kb mail each time you use it, and even if you have sent me your
26555 environment 500 times before.  I don't care.  I want the full info each
26556 time.
26557
26558 It is also important to remember that I have no memory whatsoever.  If
26559 you send a bug report, and I send you a reply, and then you just send
26560 back ``No, it's not! Moron!'', I will have no idea what you are
26561 insulting me about.  Always over-explain everything.  It's much easier
26562 for all of us---if I don't have all the information I need, I will just
26563 mail you and ask for more info, and everything takes more time.
26564
26565 If the problem you're seeing is very visual, and you can't quite explain
26566 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
26567 it somewhere it can be reached, and include the URL of the picture in
26568 the bug report.
26569
26570 @cindex patches
26571 If you would like to contribute a patch to fix bugs or make
26572 improvements, please produce the patch using @samp{diff -u}.
26573
26574 @cindex edebug
26575 If you want to debug your problem further before reporting, possibly
26576 in order to solve the problem yourself and send a patch, you can use
26577 edebug.  Debugging Lisp code is documented in the Elisp manual
26578 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
26579 Lisp Reference Manual}).  To get you started with edebug, consider if
26580 you discover some weird behaviour when pressing @kbd{c}, the first
26581 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
26582 the documentation buffer that leads you to the function definition,
26583 then press @kbd{M-x edebug-defun RET} with point inside that function,
26584 return to Gnus and press @kbd{c} to invoke the code.  You will be
26585 placed in the lisp buffer and can single step using @kbd{SPC} and
26586 evaluate expressions using @kbd{M-:} or inspect variables using
26587 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
26588 @kbd{c} or @kbd{g}.
26589
26590 @cindex elp
26591 @cindex profile
26592 @cindex slow
26593 Sometimes, a problem do not directly generate an elisp error but
26594 manifests itself by causing Gnus to be very slow.  In these cases, you
26595 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
26596 slow, and then try to analyze the backtrace (repeating the procedure
26597 helps isolating the real problem areas).
26598
26599 A fancier approach is to use the elisp profiler, ELP.  The profiler is
26600 (or should be) fully documented elsewhere, but to get you started
26601 there are a few steps that need to be followed.  First, instrument the
26602 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
26603 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
26604 RET message}.  Then perform the operation that is slow and press
26605 @kbd{M-x elp-results}.  You will then see which operations that takes
26606 time, and can debug them further.  If the entire operation takes much
26607 longer than the time spent in the slowest function in the profiler
26608 output, you probably profiled the wrong part of Gnus.  To reset
26609 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
26610 elp-restore-all} is supposed to remove profiling, but given the
26611 complexities and dynamic code generation in Gnus, it might not always
26612 work perfectly.
26613
26614 @cindex gnu.emacs.gnus
26615 @cindex ding mailing list
26616 If you just need help, you are better off asking on
26617 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
26618 @email{ding@@gnus.org, the ding mailing list}.  Write to
26619 @email{ding-request@@gnus.org} to subscribe.
26620
26621
26622 @page
26623 @node Gnus Reference Guide
26624 @section Gnus Reference Guide
26625
26626 It is my hope that other people will figure out smart stuff that Gnus
26627 can do, and that other people will write those smart things as well.  To
26628 facilitate that I thought it would be a good idea to describe the inner
26629 workings of Gnus.  And some of the not-so-inner workings, while I'm at
26630 it.
26631
26632 You can never expect the internals of a program not to change, but I
26633 will be defining (in some details) the interface between Gnus and its
26634 back ends (this is written in stone), the format of the score files
26635 (ditto), data structures (some are less likely to change than others)
26636 and general methods of operation.
26637
26638 @menu
26639 * Gnus Utility Functions::      Common functions and variable to use.
26640 * Back End Interface::          How Gnus communicates with the servers.
26641 * Score File Syntax::           A BNF definition of the score file standard.
26642 * Headers::                     How Gnus stores headers internally.
26643 * Ranges::                      A handy format for storing mucho numbers.
26644 * Group Info::                  The group info format.
26645 * Extended Interactive::        Symbolic prefixes and stuff.
26646 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
26647 * Various File Formats::        Formats of files that Gnus use.
26648 @end menu
26649
26650
26651 @node Gnus Utility Functions
26652 @subsection Gnus Utility Functions
26653 @cindex Gnus utility functions
26654 @cindex utility functions
26655 @cindex functions
26656 @cindex internal variables
26657
26658 When writing small functions to be run from hooks (and stuff), it's
26659 vital to have access to the Gnus internal functions and variables.
26660 Below is a list of the most common ones.
26661
26662 @table @code
26663
26664 @item gnus-newsgroup-name
26665 @vindex gnus-newsgroup-name
26666 This variable holds the name of the current newsgroup.
26667
26668 @item gnus-find-method-for-group
26669 @findex gnus-find-method-for-group
26670 A function that returns the select method for @var{group}.
26671
26672 @item gnus-group-real-name
26673 @findex gnus-group-real-name
26674 Takes a full (prefixed) Gnus group name, and returns the unprefixed
26675 name.
26676
26677 @item gnus-group-prefixed-name
26678 @findex gnus-group-prefixed-name
26679 Takes an unprefixed group name and a select method, and returns the full
26680 (prefixed) Gnus group name.
26681
26682 @item gnus-get-info
26683 @findex gnus-get-info
26684 Returns the group info list for @var{group}.
26685
26686 @item gnus-group-unread
26687 @findex gnus-group-unread
26688 The number of unread articles in @var{group}, or @code{t} if that is
26689 unknown.
26690
26691 @item gnus-active
26692 @findex gnus-active
26693 The active entry for @var{group}.
26694
26695 @item gnus-set-active
26696 @findex gnus-set-active
26697 Set the active entry for @var{group}.
26698
26699 @item gnus-add-current-to-buffer-list
26700 @findex gnus-add-current-to-buffer-list
26701 Adds the current buffer to the list of buffers to be killed on Gnus
26702 exit.
26703
26704 @item gnus-continuum-version
26705 @findex gnus-continuum-version
26706 Takes a Gnus version string as a parameter and returns a floating point
26707 number.  Earlier versions will always get a lower number than later
26708 versions.
26709
26710 @item gnus-group-read-only-p
26711 @findex gnus-group-read-only-p
26712 Says whether @var{group} is read-only or not.
26713
26714 @item gnus-news-group-p
26715 @findex gnus-news-group-p
26716 Says whether @var{group} came from a news back end.
26717
26718 @item gnus-ephemeral-group-p
26719 @findex gnus-ephemeral-group-p
26720 Says whether @var{group} is ephemeral or not.
26721
26722 @item gnus-server-to-method
26723 @findex gnus-server-to-method
26724 Returns the select method corresponding to @var{server}.
26725
26726 @item gnus-server-equal
26727 @findex gnus-server-equal
26728 Says whether two virtual servers are equal.
26729
26730 @item gnus-group-native-p
26731 @findex gnus-group-native-p
26732 Says whether @var{group} is native or not.
26733
26734 @item gnus-group-secondary-p
26735 @findex gnus-group-secondary-p
26736 Says whether @var{group} is secondary or not.
26737
26738 @item gnus-group-foreign-p
26739 @findex gnus-group-foreign-p
26740 Says whether @var{group} is foreign or not.
26741
26742 @item gnus-group-find-parameter
26743 @findex gnus-group-find-parameter
26744 Returns the parameter list of @var{group}.  If given a second parameter,
26745 returns the value of that parameter for @var{group}.
26746
26747 @item gnus-group-set-parameter
26748 @findex gnus-group-set-parameter
26749 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
26750
26751 @item gnus-narrow-to-body
26752 @findex gnus-narrow-to-body
26753 Narrows the current buffer to the body of the article.
26754
26755 @item gnus-check-backend-function
26756 @findex gnus-check-backend-function
26757 Takes two parameters, @var{function} and @var{group}.  If the back end
26758 @var{group} comes from supports @var{function}, return non-@code{nil}.
26759
26760 @lisp
26761 (gnus-check-backend-function "request-scan" "nnml:misc")
26762 @result{} t
26763 @end lisp
26764
26765 @item gnus-read-method
26766 @findex gnus-read-method
26767 Prompts the user for a select method.
26768
26769 @end table
26770
26771
26772 @node Back End Interface
26773 @subsection Back End Interface
26774
26775 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
26776 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
26777 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
26778 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
26779 examples of the latter we have @code{nntp-port-number} and
26780 @code{nnmbox-directory}.
26781
26782 When Gnus asks for information from a back end---say @code{nntp}---on
26783 something, it will normally include a virtual server name in the
26784 function parameters.  (If not, the back end should use the ``current''
26785 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
26786 server as its only (optional) parameter.  If this virtual server hasn't
26787 been opened, the function should fail.
26788
26789 Note that a virtual server name has no relation to some physical server
26790 name.  Take this example:
26791
26792 @lisp
26793 (nntp "odd-one"
26794       (nntp-address "ifi.uio.no")
26795       (nntp-port-number 4324))
26796 @end lisp
26797
26798 Here the virtual server name is @samp{odd-one} while the name of
26799 the physical server is @samp{ifi.uio.no}.
26800
26801 The back ends should be able to switch between several virtual servers.
26802 The standard back ends implement this by keeping an alist of virtual
26803 server environments that they pull down/push up when needed.
26804
26805 There are two groups of interface functions: @dfn{required functions},
26806 which must be present, and @dfn{optional functions}, which Gnus will
26807 always check for presence before attempting to call 'em.
26808
26809 All these functions are expected to return data in the buffer
26810 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
26811 unfortunately named, but we'll have to live with it.  When I talk about
26812 @dfn{resulting data}, I always refer to the data in that buffer.  When I
26813 talk about @dfn{return value}, I talk about the function value returned by
26814 the function call.  Functions that fail should return @code{nil} as the
26815 return value.
26816
26817 Some back ends could be said to be @dfn{server-forming} back ends, and
26818 some might be said not to be.  The latter are back ends that generally
26819 only operate on one group at a time, and have no concept of ``server''
26820 ---they have a group, and they deliver info on that group and nothing
26821 more.
26822
26823 Gnus identifies each message by way of group name and article number.  A
26824 few remarks about these article numbers might be useful.  First of all,
26825 the numbers are positive integers.  Secondly, it is normally not
26826 possible for later articles to ``re-use'' older article numbers without
26827 confusing Gnus.  That is, if a group has ever contained a message
26828 numbered 42, then no other message may get that number, or Gnus will get
26829 mightily confused.@footnote{See the function
26830 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
26831 Third, article numbers must be assigned in order of arrival in the
26832 group; this is not necessarily the same as the date of the message.
26833
26834 The previous paragraph already mentions all the ``hard'' restrictions that
26835 article numbers must fulfill.  But it seems that it might be useful to
26836 assign @emph{consecutive} article numbers, for Gnus gets quite confused
26837 if there are holes in the article numbering sequence.  However, due to
26838 the ``no-reuse'' restriction, holes cannot be avoided altogether.  It's
26839 also useful for the article numbers to start at 1 to avoid running out
26840 of numbers as long as possible.
26841
26842 Note that by convention, back ends are named @code{nnsomething}, but
26843 Gnus also comes with some @code{nnnotbackends}, such as
26844 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
26845
26846 In the examples and definitions I will refer to the imaginary back end
26847 @code{nnchoke}.
26848
26849 @cindex @code{nnchoke}
26850
26851 @menu
26852 * Required Back End Functions::  Functions that must be implemented.
26853 * Optional Back End Functions::  Functions that need not be implemented.
26854 * Error Messaging::             How to get messages and report errors.
26855 * Writing New Back Ends::       Extending old back ends.
26856 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
26857 * Mail-like Back Ends::         Some tips on mail back ends.
26858 @end menu
26859
26860
26861 @node Required Back End Functions
26862 @subsubsection Required Back End Functions
26863
26864 @table @code
26865
26866 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
26867
26868 @var{articles} is either a range of article numbers or a list of
26869 @code{Message-ID}s.  Current back ends do not fully support either---only
26870 sequences (lists) of article numbers, and most back ends do not support
26871 retrieval of @code{Message-ID}s.  But they should try for both.
26872
26873 The result data should either be HEADs or @acronym{NOV} lines, and the result
26874 value should either be @code{headers} or @code{nov} to reflect this.
26875 This might later be expanded to @code{various}, which will be a mixture
26876 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
26877
26878 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
26879 headers'', in some meaning of the word.  This is generally done by
26880 fetching (at most) @var{fetch-old} extra headers less than the smallest
26881 article number in @code{articles}, and filling the gaps as well.  The
26882 presence of this parameter can be ignored if the back end finds it
26883 cumbersome to follow the request.  If this is non-@code{nil} and not a
26884 number, do maximum fetches.
26885
26886 Here's an example HEAD:
26887
26888 @example
26889 221 1056 Article retrieved.
26890 Path: ifi.uio.no!sturles
26891 From: sturles@@ifi.uio.no (Sturle Sunde)
26892 Newsgroups: ifi.discussion
26893 Subject: Re: Something very droll
26894 Date: 27 Oct 1994 14:02:57 +0100
26895 Organization: Dept. of Informatics, University of Oslo, Norway
26896 Lines: 26
26897 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
26898 References: <38jdmq$4qu@@visbur.ifi.uio.no>
26899 NNTP-Posting-Host: holmenkollen.ifi.uio.no
26900 .
26901 @end example
26902
26903 So a @code{headers} return value would imply that there's a number of
26904 these in the data buffer.
26905
26906 Here's a BNF definition of such a buffer:
26907
26908 @example
26909 headers        = *head
26910 head           = error / valid-head
26911 error-message  = [ "4" / "5" ] 2number " " <error message> eol
26912 valid-head     = valid-message *header "." eol
26913 valid-message  = "221 " <number> " Article retrieved." eol
26914 header         = <text> eol
26915 @end example
26916
26917 @cindex BNF
26918 (The version of BNF used here is the one used in RFC822.)
26919
26920 If the return value is @code{nov}, the data buffer should contain
26921 @dfn{network overview database} lines.  These are basically fields
26922 separated by tabs.
26923
26924 @example
26925 nov-buffer = *nov-line
26926 nov-line   = field 7*8[ <TAB> field ] eol
26927 field      = <text except TAB>
26928 @end example
26929
26930 For a closer look at what should be in those fields,
26931 @pxref{Headers}.
26932
26933
26934 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
26935
26936 @var{server} is here the virtual server name.  @var{definitions} is a
26937 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
26938
26939 If the server can't be opened, no error should be signaled.  The back end
26940 may then choose to refuse further attempts at connecting to this
26941 server.  In fact, it should do so.
26942
26943 If the server is opened already, this function should return a
26944 non-@code{nil} value.  There should be no data returned.
26945
26946
26947 @item (nnchoke-close-server &optional SERVER)
26948
26949 Close connection to @var{server} and free all resources connected
26950 to it.  Return @code{nil} if the server couldn't be closed for some
26951 reason.
26952
26953 There should be no data returned.
26954
26955
26956 @item (nnchoke-request-close)
26957
26958 Close connection to all servers and free all resources that the back end
26959 have reserved.  All buffers that have been created by that back end
26960 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
26961 function is generally only called when Gnus is shutting down.
26962
26963 There should be no data returned.
26964
26965
26966 @item (nnchoke-server-opened &optional SERVER)
26967
26968 If @var{server} is the current virtual server, and the connection to the
26969 physical server is alive, then this function should return a
26970 non-@code{nil} value.  This function should under no circumstances
26971 attempt to reconnect to a server we have lost connection to.
26972
26973 There should be no data returned.
26974
26975
26976 @item (nnchoke-status-message &optional SERVER)
26977
26978 This function should return the last error message from @var{server}.
26979
26980 There should be no data returned.
26981
26982
26983 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
26984
26985 The result data from this function should be the article specified by
26986 @var{article}.  This might either be a @code{Message-ID} or a number.
26987 It is optional whether to implement retrieval by @code{Message-ID}, but
26988 it would be nice if that were possible.
26989
26990 If @var{to-buffer} is non-@code{nil}, the result data should be returned
26991 in this buffer instead of the normal data buffer.  This is to make it
26992 possible to avoid copying large amounts of data from one buffer to
26993 another, while Gnus mainly requests articles to be inserted directly
26994 into its article buffer.
26995
26996 If it is at all possible, this function should return a cons cell where
26997 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
26998 the article number.  This will enable Gnus to find out what the real
26999 group and article numbers are when fetching articles by
27000 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
27001 on successful article retrieval.
27002
27003
27004 @item (nnchoke-request-group GROUP &optional SERVER FAST)
27005
27006 Get data on @var{group}.  This function also has the side effect of
27007 making @var{group} the current group.
27008
27009 If @var{fast}, don't bother to return useful data, just make @var{group}
27010 the current group.
27011
27012 Here's an example of some result data and a definition of the same:
27013
27014 @example
27015 211 56 1000 1059 ifi.discussion
27016 @end example
27017
27018 The first number is the status, which should be 211.  Next is the
27019 total number of articles in the group, the lowest article number, the
27020 highest article number, and finally the group name.  Note that the total
27021 number of articles may be less than one might think while just
27022 considering the highest and lowest article numbers, but some articles
27023 may have been canceled.  Gnus just discards the total-number, so
27024 whether one should take the bother to generate it properly (if that is a
27025 problem) is left as an exercise to the reader.  If the group contains no
27026 articles, the lowest article number should be reported as 1 and the
27027 highest as 0.
27028
27029 @example
27030 group-status = [ error / info ] eol
27031 error        = [ "4" / "5" ] 2<number> " " <Error message>
27032 info         = "211 " 3* [ <number> " " ] <string>
27033 @end example
27034
27035
27036 @item (nnchoke-close-group GROUP &optional SERVER)
27037
27038 Close @var{group} and free any resources connected to it.  This will be
27039 a no-op on most back ends.
27040
27041 There should be no data returned.
27042
27043
27044 @item (nnchoke-request-list &optional SERVER)
27045
27046 Return a list of all groups available on @var{server}.  And that means
27047 @emph{all}.
27048
27049 Here's an example from a server that only carries two groups:
27050
27051 @example
27052 ifi.test 0000002200 0000002000 y
27053 ifi.discussion 3324 3300 n
27054 @end example
27055
27056 On each line we have a group name, then the highest article number in
27057 that group, the lowest article number, and finally a flag.  If the group
27058 contains no articles, the lowest article number should be reported as 1
27059 and the highest as 0.
27060
27061 @example
27062 active-file = *active-line
27063 active-line = name " " <number> " " <number> " " flags eol
27064 name        = <string>
27065 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
27066 @end example
27067
27068 The flag says whether the group is read-only (@samp{n}), is moderated
27069 (@samp{m}), is dead (@samp{x}), is aliased to some other group
27070 (@samp{=other-group}) or none of the above (@samp{y}).
27071
27072
27073 @item (nnchoke-request-post &optional SERVER)
27074
27075 This function should post the current buffer.  It might return whether
27076 the posting was successful or not, but that's not required.  If, for
27077 instance, the posting is done asynchronously, it has generally not been
27078 completed by the time this function concludes.  In that case, this
27079 function should set up some kind of sentinel to beep the user loud and
27080 clear if the posting could not be completed.
27081
27082 There should be no result data from this function.
27083
27084 @end table
27085
27086
27087 @node Optional Back End Functions
27088 @subsubsection Optional Back End Functions
27089
27090 @table @code
27091
27092 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
27093
27094 @var{groups} is a list of groups, and this function should request data
27095 on all those groups.  How it does it is of no concern to Gnus, but it
27096 should attempt to do this in a speedy fashion.
27097
27098 The return value of this function can be either @code{active} or
27099 @code{group}, which says what the format of the result data is.  The
27100 former is in the same format as the data from
27101 @code{nnchoke-request-list}, while the latter is a buffer full of lines
27102 in the same format as @code{nnchoke-request-group} gives.
27103
27104 @example
27105 group-buffer = *active-line / *group-status
27106 @end example
27107
27108
27109 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
27110
27111 A Gnus group info (@pxref{Group Info}) is handed to the back end for
27112 alterations.  This comes in handy if the back end really carries all
27113 the information (as is the case with virtual and imap groups).  This
27114 function should destructively alter the info to suit its needs, and
27115 should return a non-@code{nil} value.
27116
27117 There should be no result data from this function.
27118
27119
27120 @item (nnchoke-request-type GROUP &optional ARTICLE)
27121
27122 When the user issues commands for ``sending news'' (@kbd{F} in the
27123 summary buffer, for instance), Gnus has to know whether the article the
27124 user is following up on is news or mail.  This function should return
27125 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
27126 is mail and @code{unknown} if the type can't be decided.  (The
27127 @var{article} parameter is necessary in @code{nnvirtual} groups which
27128 might very well combine mail groups and news groups.)  Both @var{group}
27129 and @var{article} may be @code{nil}.
27130
27131 There should be no result data from this function.
27132
27133
27134 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
27135
27136 Set/remove/add marks on articles.  Normally Gnus handles the article
27137 marks (such as read, ticked, expired etc) internally, and store them in
27138 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
27139 all information about the articles on the server, so Gnus need to
27140 propagate the mark information to the server.
27141
27142 @var{action} is a list of mark setting requests, having this format:
27143
27144 @example
27145 (RANGE ACTION MARK)
27146 @end example
27147
27148 @var{range} is a range of articles you wish to update marks on.
27149 @var{action} is @code{add} or @code{del}, used to add marks or remove
27150 marks (preserving all marks not mentioned).  @var{mark} is a list of
27151 marks; where each mark is a symbol.  Currently used marks are
27152 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
27153 @code{dormant}, @code{save}, @code{download}, @code{unsend},
27154 @code{forward} and @code{recent}, but your back end should, if
27155 possible, not limit itself to these.
27156
27157 Given contradictory actions, the last action in the list should be the
27158 effective one.  That is, if your action contains a request to add the
27159 @code{tick} mark on article 1 and, later in the list, a request to
27160 remove the mark on the same article, the mark should in fact be removed.
27161
27162 An example action list:
27163
27164 @example
27165 (((5 12 30) 'del '(tick))
27166  ((10 . 90) 'add '(read expire))
27167  ((92 94) 'del '(read)))
27168 @end example
27169
27170 The function should return a range of articles it wasn't able to set the
27171 mark on (currently not used for anything).
27172
27173 There should be no result data from this function.
27174
27175 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
27176
27177 If the user tries to set a mark that the back end doesn't like, this
27178 function may change the mark.  Gnus will use whatever this function
27179 returns as the mark for @var{article} instead of the original
27180 @var{mark}.  If the back end doesn't care, it must return the original
27181 @var{mark}, and not @code{nil} or any other type of garbage.
27182
27183 The only use for this I can see is what @code{nnvirtual} does with
27184 it---if a component group is auto-expirable, marking an article as read
27185 in the virtual group should result in the article being marked as
27186 expirable.
27187
27188 There should be no result data from this function.
27189
27190
27191 @item (nnchoke-request-scan &optional GROUP SERVER)
27192
27193 This function may be called at any time (by Gnus or anything else) to
27194 request that the back end check for incoming articles, in one way or
27195 another.  A mail back end will typically read the spool file or query
27196 the @acronym{POP} server when this function is invoked.  The
27197 @var{group} doesn't have to be heeded---if the back end decides that
27198 it is too much work just scanning for a single group, it may do a
27199 total scan of all groups.  It would be nice, however, to keep things
27200 local if that's practical.
27201
27202 There should be no result data from this function.
27203
27204
27205 @item (nnchoke-request-group-description GROUP &optional SERVER)
27206
27207 The result data from this function should be a description of
27208 @var{group}.
27209
27210 @example
27211 description-line = name <TAB> description eol
27212 name             = <string>
27213 description      = <text>
27214 @end example
27215
27216 @item (nnchoke-request-list-newsgroups &optional SERVER)
27217
27218 The result data from this function should be the description of all
27219 groups available on the server.
27220
27221 @example
27222 description-buffer = *description-line
27223 @end example
27224
27225
27226 @item (nnchoke-request-newgroups DATE &optional SERVER)
27227
27228 The result data from this function should be all groups that were
27229 created after @samp{date}, which is in normal human-readable date format
27230 (i.e., the date format used in mail and news headers, and returned by
27231 the function @code{message-make-date} by default).  The data should be
27232 in the active buffer format.
27233
27234 It is okay for this function to return ``too many'' groups; some back ends
27235 might find it cheaper to return the full list of groups, rather than
27236 just the new groups.  But don't do this for back ends with many groups.
27237 Normally, if the user creates the groups herself, there won't be too
27238 many groups, so @code{nnml} and the like are probably safe.  But for
27239 back ends like @code{nntp}, where the groups have been created by the
27240 server, it is quite likely that there can be many groups.
27241
27242
27243 @item (nnchoke-request-create-group GROUP &optional SERVER)
27244
27245 This function should create an empty group with name @var{group}.
27246
27247 There should be no return data.
27248
27249
27250 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
27251
27252 This function should run the expiry process on all articles in the
27253 @var{articles} range (which is currently a simple list of article
27254 numbers.)  It is left up to the back end to decide how old articles
27255 should be before they are removed by this function.  If @var{force} is
27256 non-@code{nil}, all @var{articles} should be deleted, no matter how new
27257 they are.
27258
27259 This function should return a list of articles that it did not/was not
27260 able to delete.
27261
27262 There should be no result data returned.
27263
27264
27265 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
27266
27267 This function should move @var{article} (which is a number) from
27268 @var{group} by calling @var{accept-form}.
27269
27270 This function should ready the article in question for moving by
27271 removing any header lines it has added to the article, and generally
27272 should ``tidy up'' the article.  Then it should @code{eval}
27273 @var{accept-form} in the buffer where the ``tidy'' article is.  This
27274 will do the actual copying.  If this @code{eval} returns a
27275 non-@code{nil} value, the article should be removed.
27276
27277 If @var{last} is @code{nil}, that means that there is a high likelihood
27278 that there will be more requests issued shortly, so that allows some
27279 optimizations.
27280
27281 The function should return a cons where the @code{car} is the group name and
27282 the @code{cdr} is the article number that the article was entered as.
27283
27284 There should be no data returned.
27285
27286
27287 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
27288
27289 This function takes the current buffer and inserts it into @var{group}.
27290 If @var{last} in @code{nil}, that means that there will be more calls to
27291 this function in short order.
27292
27293 The function should return a cons where the @code{car} is the group name and
27294 the @code{cdr} is the article number that the article was entered as.
27295
27296 The group should exist before the back end is asked to accept the
27297 article for that group.
27298
27299 There should be no data returned.
27300
27301
27302 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
27303
27304 This function should remove @var{article} (which is a number) from
27305 @var{group} and insert @var{buffer} there instead.
27306
27307 There should be no data returned.
27308
27309
27310 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
27311
27312 This function should delete @var{group}.  If @var{force}, it should
27313 really delete all the articles in the group, and then delete the group
27314 itself.  (If there is such a thing as ``the group itself''.)
27315
27316 There should be no data returned.
27317
27318
27319 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
27320
27321 This function should rename @var{group} into @var{new-name}.  All
27322 articles in @var{group} should move to @var{new-name}.
27323
27324 There should be no data returned.
27325
27326 @end table
27327
27328
27329 @node Error Messaging
27330 @subsubsection Error Messaging
27331
27332 @findex nnheader-report
27333 @findex nnheader-get-report
27334 The back ends should use the function @code{nnheader-report} to report
27335 error conditions---they should not raise errors when they aren't able to
27336 perform a request.  The first argument to this function is the back end
27337 symbol, and the rest are interpreted as arguments to @code{format} if
27338 there are multiple of them, or just a string if there is one of them.
27339 This function must always returns @code{nil}.
27340
27341 @lisp
27342 (nnheader-report 'nnchoke "You did something totally bogus")
27343
27344 (nnheader-report 'nnchoke "Could not request group %s" group)
27345 @end lisp
27346
27347 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
27348 @code{nil} back from a server, and this function returns the most
27349 recently reported message for the back end in question.  This function
27350 takes one argument---the server symbol.
27351
27352 Internally, these functions access @var{back-end}@code{-status-string},
27353 so the @code{nnchoke} back end will have its error message stored in
27354 @code{nnchoke-status-string}.
27355
27356
27357 @node Writing New Back Ends
27358 @subsubsection Writing New Back Ends
27359
27360 Many back ends are quite similar.  @code{nnml} is just like
27361 @code{nnspool}, but it allows you to edit the articles on the server.
27362 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
27363 and it doesn't maintain overview databases.  @code{nndir} is just like
27364 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
27365 editing articles.
27366
27367 It would make sense if it were possible to ``inherit'' functions from
27368 back ends when writing new back ends.  And, indeed, you can do that if you
27369 want to.  (You don't have to if you don't want to, of course.)
27370
27371 All the back ends declare their public variables and functions by using a
27372 package called @code{nnoo}.
27373
27374 To inherit functions from other back ends (and allow other back ends to
27375 inherit functions from the current back end), you should use the
27376 following macros:
27377
27378 @table @code
27379
27380 @item nnoo-declare
27381 This macro declares the first parameter to be a child of the subsequent
27382 parameters.  For instance:
27383
27384 @lisp
27385 (nnoo-declare nndir
27386   nnml nnmh)
27387 @end lisp
27388
27389 @code{nndir} has declared here that it intends to inherit functions from
27390 both @code{nnml} and @code{nnmh}.
27391
27392 @item defvoo
27393 This macro is equivalent to @code{defvar}, but registers the variable as
27394 a public server variable.  Most state-oriented variables should be
27395 declared with @code{defvoo} instead of @code{defvar}.
27396
27397 In addition to the normal @code{defvar} parameters, it takes a list of
27398 variables in the parent back ends to map the variable to when executing
27399 a function in those back ends.
27400
27401 @lisp
27402 (defvoo nndir-directory nil
27403   "Where nndir will look for groups."
27404   nnml-current-directory nnmh-current-directory)
27405 @end lisp
27406
27407 This means that @code{nnml-current-directory} will be set to
27408 @code{nndir-directory} when an @code{nnml} function is called on behalf
27409 of @code{nndir}.  (The same with @code{nnmh}.)
27410
27411 @item nnoo-define-basics
27412 This macro defines some common functions that almost all back ends should
27413 have.
27414
27415 @lisp
27416 (nnoo-define-basics nndir)
27417 @end lisp
27418
27419 @item deffoo
27420 This macro is just like @code{defun} and takes the same parameters.  In
27421 addition to doing the normal @code{defun} things, it registers the
27422 function as being public so that other back ends can inherit it.
27423
27424 @item nnoo-map-functions
27425 This macro allows mapping of functions from the current back end to
27426 functions from the parent back ends.
27427
27428 @lisp
27429 (nnoo-map-functions nndir
27430   (nnml-retrieve-headers 0 nndir-current-group 0 0)
27431   (nnmh-request-article 0 nndir-current-group 0 0))
27432 @end lisp
27433
27434 This means that when @code{nndir-retrieve-headers} is called, the first,
27435 third, and fourth parameters will be passed on to
27436 @code{nnml-retrieve-headers}, while the second parameter is set to the
27437 value of @code{nndir-current-group}.
27438
27439 @item nnoo-import
27440 This macro allows importing functions from back ends.  It should be the
27441 last thing in the source file, since it will only define functions that
27442 haven't already been defined.
27443
27444 @lisp
27445 (nnoo-import nndir
27446   (nnmh
27447    nnmh-request-list
27448    nnmh-request-newgroups)
27449   (nnml))
27450 @end lisp
27451
27452 This means that calls to @code{nndir-request-list} should just be passed
27453 on to @code{nnmh-request-list}, while all public functions from
27454 @code{nnml} that haven't been defined in @code{nndir} yet should be
27455 defined now.
27456
27457 @end table
27458
27459 Below is a slightly shortened version of the @code{nndir} back end.
27460
27461 @lisp
27462 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
27463 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
27464
27465 ;;; @r{Code:}
27466
27467 (require 'nnheader)
27468 (require 'nnmh)
27469 (require 'nnml)
27470 (require 'nnoo)
27471 (eval-when-compile (require 'cl))
27472
27473 (nnoo-declare nndir
27474   nnml nnmh)
27475
27476 (defvoo nndir-directory nil
27477   "Where nndir will look for groups."
27478   nnml-current-directory nnmh-current-directory)
27479
27480 (defvoo nndir-nov-is-evil nil
27481   "*Non-nil means that nndir will never retrieve NOV headers."
27482   nnml-nov-is-evil)
27483
27484 (defvoo nndir-current-group ""
27485   nil
27486   nnml-current-group nnmh-current-group)
27487 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
27488 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
27489
27490 (defvoo nndir-status-string "" nil nnmh-status-string)
27491 (defconst nndir-version "nndir 1.0")
27492
27493 ;;; @r{Interface functions.}
27494
27495 (nnoo-define-basics nndir)
27496
27497 (deffoo nndir-open-server (server &optional defs)
27498   (setq nndir-directory
27499         (or (cadr (assq 'nndir-directory defs))
27500             server))
27501   (unless (assq 'nndir-directory defs)
27502     (push `(nndir-directory ,server) defs))
27503   (push `(nndir-current-group
27504           ,(file-name-nondirectory
27505             (directory-file-name nndir-directory)))
27506         defs)
27507   (push `(nndir-top-directory
27508           ,(file-name-directory (directory-file-name nndir-directory)))
27509         defs)
27510   (nnoo-change-server 'nndir server defs))
27511
27512 (nnoo-map-functions nndir
27513   (nnml-retrieve-headers 0 nndir-current-group 0 0)
27514   (nnmh-request-article 0 nndir-current-group 0 0)
27515   (nnmh-request-group nndir-current-group 0 0)
27516   (nnmh-close-group nndir-current-group 0))
27517
27518 (nnoo-import nndir
27519   (nnmh
27520    nnmh-status-message
27521    nnmh-request-list
27522    nnmh-request-newgroups))
27523
27524 (provide 'nndir)
27525 @end lisp
27526
27527
27528 @node Hooking New Back Ends Into Gnus
27529 @subsubsection Hooking New Back Ends Into Gnus
27530
27531 @vindex gnus-valid-select-methods
27532 @findex gnus-declare-backend
27533 Having Gnus start using your new back end is rather easy---you just
27534 declare it with the @code{gnus-declare-backend} functions.  This will
27535 enter the back end into the @code{gnus-valid-select-methods} variable.
27536
27537 @code{gnus-declare-backend} takes two parameters---the back end name and
27538 an arbitrary number of @dfn{abilities}.
27539
27540 Here's an example:
27541
27542 @lisp
27543 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
27544 @end lisp
27545
27546 The above line would then go in the @file{nnchoke.el} file.
27547
27548 The abilities can be:
27549
27550 @table @code
27551 @item mail
27552 This is a mailish back end---followups should (probably) go via mail.
27553 @item post
27554 This is a newsish back end---followups should (probably) go via news.
27555 @item post-mail
27556 This back end supports both mail and news.
27557 @item none
27558 This is neither a post nor mail back end---it's something completely
27559 different.
27560 @item respool
27561 It supports respooling---or rather, it is able to modify its source
27562 articles and groups.
27563 @item address
27564 The name of the server should be in the virtual server name.  This is
27565 true for almost all back ends.
27566 @item prompt-address
27567 The user should be prompted for an address when doing commands like
27568 @kbd{B} in the group buffer.  This is true for back ends like
27569 @code{nntp}, but not @code{nnmbox}, for instance.
27570 @end table
27571
27572
27573 @node Mail-like Back Ends
27574 @subsubsection Mail-like Back Ends
27575
27576 One of the things that separate the mail back ends from the rest of the
27577 back ends is the heavy dependence by most of the mail back ends on
27578 common functions in @file{nnmail.el}.  For instance, here's the
27579 definition of @code{nnml-request-scan}:
27580
27581 @lisp
27582 (deffoo nnml-request-scan (&optional group server)
27583   (setq nnml-article-file-alist nil)
27584   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
27585 @end lisp
27586
27587 It simply calls @code{nnmail-get-new-mail} with a few parameters,
27588 and @code{nnmail} takes care of all the moving and splitting of the
27589 mail.
27590
27591 This function takes four parameters.
27592
27593 @table @var
27594 @item method
27595 This should be a symbol to designate which back end is responsible for
27596 the call.
27597
27598 @item exit-function
27599 This function should be called after the splitting has been performed.
27600
27601 @item temp-directory
27602 Where the temporary files should be stored.
27603
27604 @item group
27605 This optional argument should be a group name if the splitting is to be
27606 performed for one group only.
27607 @end table
27608
27609 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
27610 save each article.  @var{back-end}@code{-active-number} will be called to
27611 find the article number assigned to this article.
27612
27613 The function also uses the following variables:
27614 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
27615 this back end); and @var{back-end}@code{-group-alist} and
27616 @var{back-end}@code{-active-file} to generate the new active file.
27617 @var{back-end}@code{-group-alist} should be a group-active alist, like
27618 this:
27619
27620 @example
27621 (("a-group" (1 . 10))
27622  ("some-group" (34 . 39)))
27623 @end example
27624
27625
27626 @node Score File Syntax
27627 @subsection Score File Syntax
27628
27629 Score files are meant to be easily parseable, but yet extremely
27630 mallable.  It was decided that something that had the same read syntax
27631 as an Emacs Lisp list would fit that spec.
27632
27633 Here's a typical score file:
27634
27635 @lisp
27636 (("summary"
27637   ("win95" -10000 nil s)
27638   ("Gnus"))
27639  ("from"
27640   ("Lars" -1000))
27641  (mark -100))
27642 @end lisp
27643
27644 BNF definition of a score file:
27645
27646 @example
27647 score-file      = "" / "(" *element ")"
27648 element         = rule / atom
27649 rule            = string-rule / number-rule / date-rule
27650 string-rule     = "(" quote string-header quote space *string-match ")"
27651 number-rule     = "(" quote number-header quote space *number-match ")"
27652 date-rule       = "(" quote date-header quote space *date-match ")"
27653 quote           = <ascii 34>
27654 string-header   = "subject" / "from" / "references" / "message-id" /
27655                   "xref" / "body" / "head" / "all" / "followup"
27656 number-header   = "lines" / "chars"
27657 date-header     = "date"
27658 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
27659                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
27660 score           = "nil" / <integer>
27661 date            = "nil" / <natural number>
27662 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
27663                   "r" / "regex" / "R" / "Regex" /
27664                   "e" / "exact" / "E" / "Exact" /
27665                   "f" / "fuzzy" / "F" / "Fuzzy"
27666 number-match    = "(" <integer> [ "" / [ space score [ "" /
27667                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
27668 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
27669 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
27670                   space date [ "" / [ space date-match-t ] ] ] ] ")"
27671 date-match-t    = "nil" / "at" / "before" / "after"
27672 atom            = "(" [ required-atom / optional-atom ] ")"
27673 required-atom   = mark / expunge / mark-and-expunge / files /
27674                   exclude-files / read-only / touched
27675 optional-atom   = adapt / local / eval
27676 mark            = "mark" space nil-or-number
27677 nil-or-number   = "nil" / <integer>
27678 expunge         = "expunge" space nil-or-number
27679 mark-and-expunge = "mark-and-expunge" space nil-or-number
27680 files           = "files" *[ space <string> ]
27681 exclude-files   = "exclude-files" *[ space <string> ]
27682 read-only       = "read-only" [ space "nil" / space "t" ]
27683 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
27684 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
27685 local           = "local" *[ space "(" <string> space <form> ")" ]
27686 eval            = "eval" space <form>
27687 space           = *[ " " / <TAB> / <NEWLINE> ]
27688 @end example
27689
27690 Any unrecognized elements in a score file should be ignored, but not
27691 discarded.
27692
27693 As you can see, white space is needed, but the type and amount of white
27694 space is irrelevant.  This means that formatting of the score file is
27695 left up to the programmer---if it's simpler to just spew it all out on
27696 one looong line, then that's ok.
27697
27698 The meaning of the various atoms are explained elsewhere in this
27699 manual (@pxref{Score File Format}).
27700
27701
27702 @node Headers
27703 @subsection Headers
27704
27705 Internally Gnus uses a format for storing article headers that
27706 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
27707 almost suspect that the author looked at the @acronym{NOV} specification and
27708 just shamelessly @emph{stole} the entire thing, and one would be right.
27709
27710 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
27711 RFC 1036 to talk about lines in the head of an article (e.g.,
27712 @code{From}).  It is used by many people as a synonym for
27713 ``head''---``the header and the body''.  (That should be avoided, in my
27714 opinion.)  And Gnus uses a format internally that it calls ``header'',
27715 which is what I'm talking about here.  This is a 9-element vector,
27716 basically, with each header (ouch) having one slot.
27717
27718 These slots are, in order: @code{number}, @code{subject}, @code{from},
27719 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
27720 @code{xref}, and @code{extra}.  There are macros for accessing and
27721 setting these slots---they all have predictable names beginning with
27722 @code{mail-header-} and @code{mail-header-set-}, respectively.
27723
27724 All these slots contain strings, except the @code{extra} slot, which
27725 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
27726
27727
27728 @node Ranges
27729 @subsection Ranges
27730
27731 @sc{gnus} introduced a concept that I found so useful that I've started
27732 using it a lot and have elaborated on it greatly.
27733
27734 The question is simple: If you have a large amount of objects that are
27735 identified by numbers (say, articles, to take a @emph{wild} example)
27736 that you want to qualify as being ``included'', a normal sequence isn't
27737 very useful.  (A 200,000 length sequence is a bit long-winded.)
27738
27739 The solution is as simple as the question: You just collapse the
27740 sequence.
27741
27742 @example
27743 (1 2 3 4 5 6 10 11 12)
27744 @end example
27745
27746 is transformed into
27747
27748 @example
27749 ((1 . 6) (10 . 12))
27750 @end example
27751
27752 To avoid having those nasty @samp{(13 . 13)} elements to denote a
27753 lonesome object, a @samp{13} is a valid element:
27754
27755 @example
27756 ((1 . 6) 7 (10 . 12))
27757 @end example
27758
27759 This means that comparing two ranges to find out whether they are equal
27760 is slightly tricky:
27761
27762 @example
27763 ((1 . 5) 7 8 (10 . 12))
27764 @end example
27765
27766 and
27767
27768 @example
27769 ((1 . 5) (7 . 8) (10 . 12))
27770 @end example
27771
27772 are equal.  In fact, any non-descending list is a range:
27773
27774 @example
27775 (1 2 3 4 5)
27776 @end example
27777
27778 is a perfectly valid range, although a pretty long-winded one.  This is
27779 also valid:
27780
27781 @example
27782 (1 . 5)
27783 @end example
27784
27785 and is equal to the previous range.
27786
27787 Here's a BNF definition of ranges.  Of course, one must remember the
27788 semantic requirement that the numbers are non-descending.  (Any number
27789 of repetition of the same number is allowed, but apt to disappear in
27790 range handling.)
27791
27792 @example
27793 range           = simple-range / normal-range
27794 simple-range    = "(" number " . " number ")"
27795 normal-range    = "(" start-contents ")"
27796 contents        = "" / simple-range *[ " " contents ] /
27797                   number *[ " " contents ]
27798 @end example
27799
27800 Gnus currently uses ranges to keep track of read articles and article
27801 marks.  I plan on implementing a number of range operators in C if The
27802 Powers That Be are willing to let me.  (I haven't asked yet, because I
27803 need to do some more thinking on what operators I need to make life
27804 totally range-based without ever having to convert back to normal
27805 sequences.)
27806
27807
27808 @node Group Info
27809 @subsection Group Info
27810
27811 Gnus stores all permanent info on groups in a @dfn{group info} list.
27812 This list is from three to six elements (or more) long and exhaustively
27813 describes the group.
27814
27815 Here are two example group infos; one is a very simple group while the
27816 second is a more complex one:
27817
27818 @example
27819 ("no.group" 5 ((1 . 54324)))
27820
27821 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
27822                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
27823                 (nnml "")
27824                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
27825 @end example
27826
27827 The first element is the @dfn{group name}---as Gnus knows the group,
27828 anyway.  The second element is the @dfn{subscription level}, which
27829 normally is a small integer.  (It can also be the @dfn{rank}, which is a
27830 cons cell where the @code{car} is the level and the @code{cdr} is the
27831 score.)  The third element is a list of ranges of read articles.  The
27832 fourth element is a list of lists of article marks of various kinds.
27833 The fifth element is the select method (or virtual server, if you like).
27834 The sixth element is a list of @dfn{group parameters}, which is what
27835 this section is about.
27836
27837 Any of the last three elements may be missing if they are not required.
27838 In fact, the vast majority of groups will normally only have the first
27839 three elements, which saves quite a lot of cons cells.
27840
27841 Here's a BNF definition of the group info format:
27842
27843 @example
27844 info          = "(" group space ralevel space read
27845                 [ "" / [ space marks-list [ "" / [ space method [ "" /
27846                 space parameters ] ] ] ] ] ")"
27847 group         = quote <string> quote
27848 ralevel       = rank / level
27849 level         = <integer in the range of 1 to inf>
27850 rank          = "(" level "." score ")"
27851 score         = <integer in the range of 1 to inf>
27852 read          = range
27853 marks-lists   = nil / "(" *marks ")"
27854 marks         = "(" <string> range ")"
27855 method        = "(" <string> *elisp-forms ")"
27856 parameters    = "(" *elisp-forms ")"
27857 @end example
27858
27859 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
27860 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
27861 in pseudo-BNF.
27862
27863 If you have a Gnus info and want to access the elements, Gnus offers a
27864 series of macros for getting/setting these elements.
27865
27866 @table @code
27867 @item gnus-info-group
27868 @itemx gnus-info-set-group
27869 @findex gnus-info-group
27870 @findex gnus-info-set-group
27871 Get/set the group name.
27872
27873 @item gnus-info-rank
27874 @itemx gnus-info-set-rank
27875 @findex gnus-info-rank
27876 @findex gnus-info-set-rank
27877 Get/set the group rank (@pxref{Group Score}).
27878
27879 @item gnus-info-level
27880 @itemx gnus-info-set-level
27881 @findex gnus-info-level
27882 @findex gnus-info-set-level
27883 Get/set the group level.
27884
27885 @item gnus-info-score
27886 @itemx gnus-info-set-score
27887 @findex gnus-info-score
27888 @findex gnus-info-set-score
27889 Get/set the group score (@pxref{Group Score}).
27890
27891 @item gnus-info-read
27892 @itemx gnus-info-set-read
27893 @findex gnus-info-read
27894 @findex gnus-info-set-read
27895 Get/set the ranges of read articles.
27896
27897 @item gnus-info-marks
27898 @itemx gnus-info-set-marks
27899 @findex gnus-info-marks
27900 @findex gnus-info-set-marks
27901 Get/set the lists of ranges of marked articles.
27902
27903 @item gnus-info-method
27904 @itemx gnus-info-set-method
27905 @findex gnus-info-method
27906 @findex gnus-info-set-method
27907 Get/set the group select method.
27908
27909 @item gnus-info-params
27910 @itemx gnus-info-set-params
27911 @findex gnus-info-params
27912 @findex gnus-info-set-params
27913 Get/set the group parameters.
27914 @end table
27915
27916 All the getter functions take one parameter---the info list.  The setter
27917 functions take two parameters---the info list and the new value.
27918
27919 The last three elements in the group info aren't mandatory, so it may be
27920 necessary to extend the group info before setting the element.  If this
27921 is necessary, you can just pass on a non-@code{nil} third parameter to
27922 the three final setter functions to have this happen automatically.
27923
27924
27925 @node Extended Interactive
27926 @subsection Extended Interactive
27927 @cindex interactive
27928 @findex gnus-interactive
27929
27930 Gnus extends the standard Emacs @code{interactive} specification
27931 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
27932 Prefixes}).  Here's an example of how this is used:
27933
27934 @lisp
27935 (defun gnus-summary-increase-score (&optional score symp)
27936   (interactive (gnus-interactive "P\ny"))
27937   ...
27938   )
27939 @end lisp
27940
27941 The best thing to do would have been to implement
27942 @code{gnus-interactive} as a macro which would have returned an
27943 @code{interactive} form, but this isn't possible since Emacs checks
27944 whether a function is interactive or not by simply doing an @code{assq}
27945 on the lambda form.  So, instead we have @code{gnus-interactive}
27946 function that takes a string and returns values that are usable to
27947 @code{interactive}.
27948
27949 This function accepts (almost) all normal @code{interactive} specs, but
27950 adds a few more.
27951
27952 @table @samp
27953 @item y
27954 @vindex gnus-current-prefix-symbol
27955 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
27956 variable.
27957
27958 @item Y
27959 @vindex gnus-current-prefix-symbols
27960 A list of the current symbolic prefixes---the
27961 @code{gnus-current-prefix-symbol} variable.
27962
27963 @item A
27964 The current article number---the @code{gnus-summary-article-number}
27965 function.
27966
27967 @item H
27968 The current article header---the @code{gnus-summary-article-header}
27969 function.
27970
27971 @item g
27972 The current group name---the @code{gnus-group-group-name}
27973 function.
27974
27975 @end table
27976
27977
27978 @node Emacs/XEmacs Code
27979 @subsection Emacs/XEmacs Code
27980 @cindex XEmacs
27981 @cindex Emacsen
27982
27983 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
27984 platforms must be the primary one.  I chose Emacs.  Not because I don't
27985 like XEmacs or Mule, but because it comes first alphabetically.
27986
27987 This means that Gnus will byte-compile under Emacs with nary a warning,
27988 while XEmacs will pump out gigabytes of warnings while byte-compiling.
27989 As I use byte-compilation warnings to help me root out trivial errors in
27990 Gnus, that's very useful.
27991
27992 I've also consistently used Emacs function interfaces, but have used
27993 Gnusey aliases for the functions.  To take an example:  Emacs defines a
27994 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
27995 function.  I then define a function called @code{gnus-run-at-time} that
27996 takes the same parameters as the Emacs @code{run-at-time}.  When running
27997 Gnus under Emacs, the former function is just an alias for the latter.
27998 However, when running under XEmacs, the former is an alias for the
27999 following function:
28000
28001 @lisp
28002 (defun gnus-xmas-run-at-time (time repeat function &rest args)
28003   (start-itimer
28004    "gnus-run-at-time"
28005    `(lambda ()
28006       (,function ,@@args))
28007    time repeat))
28008 @end lisp
28009
28010 This sort of thing has been done for bunches of functions.  Gnus does
28011 not redefine any native Emacs functions while running under XEmacs---it
28012 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
28013 all over.
28014
28015 In the cases where the XEmacs function interface was obviously cleaner,
28016 I used it instead.  For example @code{gnus-region-active-p} is an alias
28017 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
28018
28019 Of course, I could have chosen XEmacs as my native platform and done
28020 mapping functions the other way around.  But I didn't.  The performance
28021 hit these indirections impose on Gnus under XEmacs should be slight.
28022
28023
28024 @node Various File Formats
28025 @subsection Various File Formats
28026
28027 @menu
28028 * Active File Format::          Information on articles and groups available.
28029 * Newsgroups File Format::      Group descriptions.
28030 @end menu
28031
28032
28033 @node Active File Format
28034 @subsubsection Active File Format
28035
28036 The active file lists all groups available on the server in
28037 question.  It also lists the highest and lowest current article numbers
28038 in each group.
28039
28040 Here's an excerpt from a typical active file:
28041
28042 @example
28043 soc.motss 296030 293865 y
28044 alt.binaries.pictures.fractals 3922 3913 n
28045 comp.sources.unix 1605 1593 m
28046 comp.binaries.ibm.pc 5097 5089 y
28047 no.general 1000 900 y
28048 @end example
28049
28050 Here's a pseudo-BNF definition of this file:
28051
28052 @example
28053 active      = *group-line
28054 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
28055 group       = <non-white-space string>
28056 spc         = " "
28057 high-number = <non-negative integer>
28058 low-number  = <positive integer>
28059 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
28060 @end example
28061
28062 For a full description of this file, see the manual pages for
28063 @samp{innd}, in particular @samp{active(5)}.
28064
28065
28066 @node Newsgroups File Format
28067 @subsubsection Newsgroups File Format
28068
28069 The newsgroups file lists groups along with their descriptions.  Not all
28070 groups on the server have to be listed,  and not all groups in the file
28071 have to exist on the server.  The file is meant purely as information to
28072 the user.
28073
28074 The format is quite simple; a group name, a tab, and the description.
28075 Here's the definition:
28076
28077 @example
28078 newsgroups    = *line
28079 line          = group tab description <NEWLINE>
28080 group         = <non-white-space string>
28081 tab           = <TAB>
28082 description   = <string>
28083 @end example
28084
28085
28086 @page
28087 @node Emacs for Heathens
28088 @section Emacs for Heathens
28089
28090 Believe it or not, but some people who use Gnus haven't really used
28091 Emacs much before they embarked on their journey on the Gnus Love Boat.
28092 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
28093 region'', and ``set @code{gnus-flargblossen} to an alist where the key
28094 is a regexp that is used for matching on the group name'' are magical
28095 phrases with little or no meaning, then this appendix is for you.  If
28096 you are already familiar with Emacs, just ignore this and go fondle your
28097 cat instead.
28098
28099 @menu
28100 * Keystrokes::                  Entering text and executing commands.
28101 * Emacs Lisp::                  The built-in Emacs programming language.
28102 @end menu
28103
28104
28105 @node Keystrokes
28106 @subsection Keystrokes
28107
28108 @itemize @bullet
28109 @item
28110 Q: What is an experienced Emacs user?
28111
28112 @item
28113 A: A person who wishes that the terminal had pedals.
28114 @end itemize
28115
28116 Yes, when you use Emacs, you are apt to use the control key, the shift
28117 key and the meta key a lot.  This is very annoying to some people
28118 (notably @code{vi}le users), and the rest of us just love the hell out
28119 of it.  Just give up and submit.  Emacs really does stand for
28120 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
28121 may have heard from other disreputable sources (like the Emacs author).
28122
28123 The shift keys are normally located near your pinky fingers, and are
28124 normally used to get capital letters and stuff.  You probably use it all
28125 the time.  The control key is normally marked ``CTRL'' or something like
28126 that.  The meta key is, funnily enough, never marked as such on any
28127 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
28128 which is the meta key on this keyboard.  It's usually located somewhere
28129 to the left hand side of the keyboard, usually on the bottom row.
28130
28131 Now, us Emacs people don't say ``press the meta-control-m key'',
28132 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
28133 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
28134 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
28135 down the control key, and hold it down while you press @kbd{k}''.
28136 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
28137 the control key and then press @kbd{k}''.  Simple, ay?
28138
28139 This is somewhat complicated by the fact that not all keyboards have a
28140 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
28141 means ``press escape, release escape, press @kbd{k}''.  That's much more
28142 work than if you have a meta key, so if that's the case, I respectfully
28143 suggest you get a real keyboard with a meta key.  You can't live without
28144 it.
28145
28146
28147
28148 @node Emacs Lisp
28149 @subsection Emacs Lisp
28150
28151 Emacs is the King of Editors because it's really a Lisp interpreter.
28152 Each and every key you tap runs some Emacs Lisp code snippet, and since
28153 Emacs Lisp is an interpreted language, that means that you can configure
28154 any key to run any arbitrary code.  You just, like, do it.
28155
28156 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
28157 functions.  (These are byte-compiled for speed, but it's still
28158 interpreted.)  If you decide that you don't like the way Gnus does
28159 certain things, it's trivial to have it do something a different way.
28160 (Well, at least if you know how to write Lisp code.)  However, that's
28161 beyond the scope of this manual, so we are simply going to talk about
28162 some common constructs that you normally use in your @file{.emacs} file
28163 to customize Gnus.
28164
28165 If you want to set the variable @code{gnus-florgbnize} to four (4), you
28166 write the following:
28167
28168 @lisp
28169 (setq gnus-florgbnize 4)
28170 @end lisp
28171
28172 This function (really ``special form'') @code{setq} is the one that can
28173 set a variable to some value.  This is really all you need to know.  Now
28174 you can go and fill your @file{.emacs} file with lots of these to change
28175 how Gnus works.
28176
28177 If you have put that thing in your @file{.emacs} file, it will be read
28178 and @code{eval}ed (which is lisp-ese for ``run'') the next time you
28179 start Emacs.  If you want to change the variable right away, simply say
28180 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
28181 previous ``form'', which is a simple @code{setq} statement here.
28182
28183 Go ahead---just try it, if you're located at your Emacs.  After you
28184 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
28185 is the return value of the form you @code{eval}ed.
28186
28187 Some pitfalls:
28188
28189 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
28190 that means:
28191
28192 @lisp
28193 (setq gnus-read-active-file 'some)
28194 @end lisp
28195
28196 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
28197 @samp{nntp.ifi.uio.no}'', that means:
28198
28199 @lisp
28200 (setq gnus-nntp-server "nntp.ifi.uio.no")
28201 @end lisp
28202
28203 So be careful not to mix up strings (the latter) with symbols (the
28204 former).  The manual is unambiguous, but it can be confusing.
28205
28206 @page
28207 @include gnus-faq.texi
28208
28209 @node Index
28210 @chapter Index
28211 @printindex cp
28212
28213 @node Key Index
28214 @chapter Key Index
28215 @printindex ky
28216
28217 @summarycontents
28218 @contents
28219 @bye
28220
28221 @iftex
28222 @iflatex
28223 \end{document}
28224 @end iflatex
28225 @end iftex
28226
28227 @c Local Variables:
28228 @c mode: texinfo
28229 @c coding: iso-8859-1
28230 @c End: