Merge from emacs--devo--0, emacs--rel--22
[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
9 @documentencoding ISO-8859-1
10
11 @copying
12 Copyright @copyright{} 1995, 1996, 1997, 1998, 1999, 2000, 2001,
13 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
14
15 @quotation
16 Permission is granted to copy, distribute and/or modify this document
17 under the terms of the GNU Free Documentation License, Version 1.2 or
18 any later version published by the Free Software Foundation; with no
19 Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
20 and with the Back-Cover Texts as in (a) below.  A copy of the license
21 is included in the section entitled ``GNU Free Documentation License''.
22
23 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
24 modify this GNU manual.  Buying copies from the FSF supports it in
25 developing GNU and promoting software freedom.''
26 @end quotation
27 @end copying
28
29 @iftex
30 @iflatex
31 \documentclass[twoside,a4paper,openright,11pt]{book}
32 \usepackage[latin1]{inputenc}
33 \usepackage{pagestyle}
34 \usepackage{epsfig}
35 \usepackage{pixidx}
36 \input{gnusconfig.tex}
37
38 \ifx\pdfoutput\undefined
39 \else
40 \usepackage[pdftex,bookmarks,colorlinks=true]{hyperref}
41 \usepackage{thumbpdf}
42 \pdfcompresslevel=9
43 \fi
44
45 \makeindex
46 \begin{document}
47
48 % Adjust ../Makefile.in if you change the following line:
49 \newcommand{\gnusversionname}{No Gnus v0.11}
50 \newcommand{\gnuschaptername}{}
51 \newcommand{\gnussectionname}{}
52
53 \newcommand{\gnusbackslash}{/}
54
55 \newcommand{\gnusref}[1]{``#1'' on page \pageref{#1}}
56 \ifx\pdfoutput\undefined
57 \newcommand{\gnusuref}[1]{\gnustt{#1}}
58 \else
59 \newcommand{\gnusuref}[1]{\href{#1}{\gnustt{#1}}}
60 \fi
61 \newcommand{\gnusxref}[1]{See ``#1'' on page \pageref{#1}}
62 \newcommand{\gnuspxref}[1]{see ``#1'' on page \pageref{#1}}
63
64 \newcommand{\gnuskindex}[1]{\index{#1}}
65 \newcommand{\gnusindex}[1]{\index{#1}}
66
67 \newcommand{\gnustt}[1]{{\gnusselectttfont{}#1}}
68 \newcommand{\gnuscode}[1]{\gnustt{#1}}
69 \newcommand{\gnusasis}[1]{\gnustt{#1}}
70 \newcommand{\gnusurl}[1]{\gnustt{#1}}
71 \newcommand{\gnuscommand}[1]{\gnustt{#1}}
72 \newcommand{\gnusenv}[1]{\gnustt{#1}}
73 \newcommand{\gnussamp}[1]{``{\fontencoding{OT1}\gnusselectttfont{}#1}''}
74 \newcommand{\gnuslisp}[1]{\gnustt{#1}}
75 \newcommand{\gnuskbd}[1]{`\gnustt{#1}'}
76 \newcommand{\gnuskey}[1]{`\gnustt{#1}'}
77 \newcommand{\gnusfile}[1]{`\gnustt{#1}'}
78 \newcommand{\gnusdfn}[1]{\textit{#1}}
79 \newcommand{\gnusi}[1]{\textit{#1}}
80 \newcommand{\gnusr}[1]{\textrm{#1}}
81 \newcommand{\gnusstrong}[1]{\textbf{#1}}
82 \newcommand{\gnusemph}[1]{\textit{#1}}
83 \newcommand{\gnusvar}[1]{{\fontsize{10pt}{10}\selectfont\textsl{\textsf{#1}}}}
84 \newcommand{\gnussc}[1]{\textsc{#1}}
85 \newcommand{\gnustitle}[1]{{\huge\textbf{#1}}}
86 \newcommand{\gnusversion}[1]{{\small\textit{#1}}}
87 \newcommand{\gnusauthor}[1]{{\large\textbf{#1}}}
88 \newcommand{\gnusresult}[1]{\gnustt{=> #1}}
89 \newcommand{\gnusacronym}[1]{\textsc{#1}}
90 \newcommand{\gnusemail}[1]{\textit{#1}}
91
92 \newcommand{\gnusbullet}{{${\bullet}$}}
93 \newcommand{\gnusdollar}{\$}
94 \newcommand{\gnusampersand}{\&}
95 \newcommand{\gnuspercent}{\%}
96 \newcommand{\gnushash}{\#}
97 \newcommand{\gnushat}{\symbol{"5E}}
98 \newcommand{\gnusunderline}{\symbol{"5F}}
99 \newcommand{\gnusnot}{$\neg$}
100 \newcommand{\gnustilde}{\symbol{"7E}}
101 \newcommand{\gnusless}{{$<$}}
102 \newcommand{\gnusgreater}{{$>$}}
103 \newcommand{\gnusbraceleft}{{$>$}}
104 \newcommand{\gnusbraceright}{{$>$}}
105
106 \newcommand{\gnushead}{\raisebox{-1cm}{\epsfig{figure=ps/gnus-head,height=1cm}}}
107 \newcommand{\gnusinteresting}{
108 \marginpar[\mbox{}\hfill\gnushead]{\gnushead}
109 }
110
111 \newcommand{\gnuscleardoublepage}{\ifodd\count0\mbox{}\clearpage\thispagestyle{empty}\mbox{}\clearpage\else\clearpage\fi}
112
113 \newcommand{\gnuspagechapter}[1]{
114 {\mbox{}}
115 }
116
117 \newdimen{\gnusdimen}
118 \gnusdimen 0pt
119
120 \newcommand{\gnuschapter}[2]{
121 \gnuscleardoublepage
122 \ifdim \gnusdimen = 0pt\setcounter{page}{1}\pagestyle{gnus}\pagenumbering{arabic} \gnusdimen 1pt\fi
123 \chapter{#2}
124 \renewcommand{\gnussectionname}{}
125 \renewcommand{\gnuschaptername}{#2}
126 \thispagestyle{empty}
127 \hspace*{-2cm}
128 \begin{picture}(500,500)(0,0)
129 \put(480,350){\makebox(0,0)[tr]{#1}}
130 \put(40,300){\makebox(500,50)[bl]{{\Huge\bf{#2}}}}
131 \end{picture}
132 \clearpage
133 }
134
135 \newcommand{\gnusfigure}[3]{
136 \begin{figure}
137 \mbox{}\ifodd\count0\hspace*{-0.8cm}\else\hspace*{-3cm}\fi\begin{picture}(440,#2)
138 #3
139 \end{picture}
140 \caption{#1}
141 \end{figure}
142 }
143
144 \newcommand{\gnusicon}[1]{
145 \marginpar[\mbox{}\hfill\raisebox{-1.5cm}{\epsfig{figure=ps/#1-up,height=1.5cm}}]{\raisebox{-1cm}{\epsfig{figure=ps/#1-up,height=1cm}}}
146 }
147
148 \newcommand{\gnuspicon}[1]{
149 \margindex{\epsfig{figure=#1,width=2cm}}
150 }
151
152 \newcommand{\gnusxface}[2]{
153 \margindex{\epsfig{figure=#1,width=1cm}\epsfig{figure=#2,width=1cm}}
154 }
155
156 \newcommand{\gnussmiley}[2]{
157 \margindex{\makebox[2cm]{\hfill\epsfig{figure=#1,width=0.5cm}\hfill\epsfig{figure=#2,width=0.5cm}\hfill}}
158 }
159
160 \newcommand{\gnusitemx}[1]{\mbox{}\vspace*{-\itemsep}\vspace*{-\parsep}\item#1}
161
162 \newcommand{\gnussection}[1]{
163 \renewcommand{\gnussectionname}{#1}
164 \section{#1}
165 }
166
167 \newenvironment{codelist}%
168 {\begin{list}{}{
169 }
170 }{\end{list}}
171
172 \newenvironment{asislist}%
173 {\begin{list}{}{
174 }
175 }{\end{list}}
176
177 \newenvironment{kbdlist}%
178 {\begin{list}{}{
179 \labelwidth=0cm
180 }
181 }{\end{list}}
182
183 \newenvironment{dfnlist}%
184 {\begin{list}{}{
185 }
186 }{\end{list}}
187
188 \newenvironment{stronglist}%
189 {\begin{list}{}{
190 }
191 }{\end{list}}
192
193 \newenvironment{samplist}%
194 {\begin{list}{}{
195 }
196 }{\end{list}}
197
198 \newenvironment{varlist}%
199 {\begin{list}{}{
200 }
201 }{\end{list}}
202
203 \newenvironment{emphlist}%
204 {\begin{list}{}{
205 }
206 }{\end{list}}
207
208 \newlength\gnusheadtextwidth
209 \setlength{\gnusheadtextwidth}{\headtextwidth}
210 \addtolength{\gnusheadtextwidth}{1cm}
211
212 \newpagestyle{gnuspreamble}%
213 {
214 {
215 \ifodd\count0
216 {
217 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\mbox{}}\textbf{\hfill\roman{page}}}
218 }
219 \else
220 {
221 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\roman{page}\hfill\mbox{}}}
222 }
223 }
224 \fi
225 }
226 }
227 {
228 \ifodd\count0
229 \mbox{} \hfill
230 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
231 \else
232 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
233 \hfill \mbox{}
234 \fi
235 }
236
237 \newpagestyle{gnusindex}%
238 {
239 {
240 \ifodd\count0
241 {
242 \hspace*{-0.23cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\gnuschaptername\hfill\arabic{page}}}}
243 }
244 \else
245 {
246 \hspace*{-3.25cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}
247 }
248 \fi
249 }
250 }
251 {
252 \ifodd\count0
253 \mbox{} \hfill
254 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
255 \else
256 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
257 \hfill \mbox{}
258 \fi
259 }
260
261 \newpagestyle{gnus}%
262 {
263 {
264 \ifodd\count0
265 {
266 \makebox[12cm]{\hspace*{3.1cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{chapter}.\arabic{section}} \textbf{\gnussectionname\hfill\arabic{page}}}}}
267 }
268 \else
269 {
270 \makebox[12cm]{\hspace*{-2.95cm}\underline{\makebox[\gnusheadtextwidth]{\textbf{\arabic{page}\hfill\gnuschaptername}}}}
271 }
272 \fi
273 }
274 }
275 {
276 \ifodd\count0
277 \mbox{} \hfill
278 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
279 \else
280 \raisebox{-0.5cm}{\epsfig{figure=ps/gnus-big-logo,height=1cm}}
281 \hfill \mbox{}
282 \fi
283 }
284
285 \pagenumbering{roman}
286 \pagestyle{gnuspreamble}
287
288 @end iflatex
289 @end iftex
290
291 @iftex
292 @iflatex
293
294 \begin{titlepage}
295 {
296
297 %\addtolength{\oddsidemargin}{-5cm}
298 %\addtolength{\evensidemargin}{-5cm}
299 \parindent=0cm
300 \addtolength{\textheight}{2cm}
301
302 \gnustitle{\gnustitlename}\hfill\gnusversion{\gnusversionname}\\
303 \rule{15cm}{1mm}\\
304 \vfill
305 \hspace*{0cm}\epsfig{figure=ps/gnus-big-logo,height=15cm}
306 \vfill
307 \rule{15cm}{1mm}\\
308 \gnusauthor{by Lars Magne Ingebrigtsen}
309 \newpage
310 }
311
312 \mbox{}
313 \vfill
314
315 \thispagestyle{empty}
316
317 @c @insertcopying
318 \newpage
319 \end{titlepage}
320 @end iflatex
321 @end iftex
322
323 @ifnottex
324 @insertcopying
325 @end ifnottex
326
327 @dircategory Emacs
328 @direntry
329 * Gnus: (gnus).         The newsreader Gnus.
330 @end direntry
331 @iftex
332 @finalout
333 @end iftex
334 @setchapternewpage odd
335
336
337
338 @titlepage
339 @title Gnus Manual
340
341 @author by Lars Magne Ingebrigtsen
342 @page
343 @vskip 0pt plus 1filll
344 @insertcopying
345 @end titlepage
346
347
348 @node Top
349 @top The Gnus Newsreader
350
351 @ifinfo
352
353 You can read news (and mail) from within Emacs by using Gnus.  The news
354 can be gotten by any nefarious means you can think of---@acronym{NNTP}, local
355 spool or your mbox file.  All at the same time, if you want to push your
356 luck.
357
358 @c Adjust ../Makefile.in if you change the following line:
359 This manual corresponds to No Gnus v0.11.
360
361 @end ifinfo
362
363 @iftex
364
365 @iflatex
366 \tableofcontents
367 \gnuscleardoublepage
368 @end iflatex
369
370 Gnus is the advanced, self-documenting, customizable, extensible
371 unreal-time newsreader for GNU Emacs.
372
373 Oops.  That sounds oddly familiar, so let's start over again to avoid
374 being accused of plagiarism:
375
376 Gnus is a message-reading laboratory.  It will let you look at just
377 about anything as if it were a newsgroup.  You can read mail with it,
378 you can browse directories with it, you can @code{ftp} with it---you
379 can even read news with it!
380
381 Gnus tries to empower people who read news the same way Emacs empowers
382 people who edit text.  Gnus sets no limits to what the user should be
383 allowed to do.  Users are encouraged to extend Gnus to make it behave
384 like they want it to behave.  A program should not control people;
385 people should be empowered to do what they want by using (or abusing)
386 the program.
387
388 @c Adjust ../Makefile.in if you change the following line:
389 This manual corresponds to No Gnus v0.11.
390
391 @heading Other related manuals
392 @itemize
393 @item Message manual: Composing messages
394 @item Emacs-MIME:     Composing messages; @acronym{MIME}-specific parts.
395 @item Sieve:          Managing Sieve scripts in Emacs.
396 @item PGG:            @acronym{PGP/MIME} with Gnus.
397 @item SASL:           @acronym{SASL} authentication in Emacs.
398 @end itemize
399
400 @end iftex
401
402 @menu
403 * Starting Up::              Finding news can be a pain.
404 * Group Buffer::             Selecting, subscribing and killing groups.
405 * Summary Buffer::           Reading, saving and posting articles.
406 * Article Buffer::           Displaying and handling articles.
407 * Composing Messages::       Information on sending mail and news.
408 * Select Methods::           Gnus reads all messages from various select methods.
409 * Scoring::                  Assigning values to articles.
410 * Various::                  General purpose settings.
411 * The End::                  Farewell and goodbye.
412 * Appendices::               Terminology, Emacs intro, @acronym{FAQ}, History, Internals.
413 * GNU Free Documentation License:: The license for this documentation.
414 * Index::                    Variable, function and concept index.
415 * Key Index::                Key Index.
416
417 Other related manuals
418
419 * Message:(message).         Composing messages.
420 * Emacs-MIME:(emacs-mime).   Composing messages; @acronym{MIME}-specific parts.
421 * Sieve:(sieve).             Managing Sieve scripts in Emacs.
422 * PGG:(pgg).                 @acronym{PGP/MIME} with Gnus.
423 * SASL:(sasl).               @acronym{SASL} authentication in Emacs.
424
425 @detailmenu
426  --- The Detailed Node Listing ---
427
428 Starting Gnus
429
430 * Finding the News::            Choosing a method for getting news.
431 * The First Time::              What does Gnus do the first time you start it?
432 * The Server is Down::          How can I read my mail then?
433 * Slave Gnusae::                You can have more than one Gnus active at a time.
434 * Fetching a Group::            Starting Gnus just to read a group.
435 * New Groups::                  What is Gnus supposed to do with new groups?
436 * Changing Servers::            You may want to move from one server to another.
437 * Startup Files::               Those pesky startup files---@file{.newsrc}.
438 * Auto Save::                   Recovering from a crash.
439 * The Active File::             Reading the active file over a slow line Takes Time.
440 * Startup Variables::           Other variables you might change.
441
442 New Groups
443
444 * Checking New Groups::         Determining what groups are new.
445 * Subscription Methods::        What Gnus should do with new groups.
446 * Filtering New Groups::        Making Gnus ignore certain new groups.
447
448 Group Buffer
449
450 * Group Buffer Format::         Information listed and how you can change it.
451 * Group Maneuvering::           Commands for moving in the group buffer.
452 * Selecting a Group::           Actually reading news.
453 * Subscription Commands::       Unsubscribing, killing, subscribing.
454 * Group Data::                  Changing the info for a group.
455 * Group Levels::                Levels? What are those, then?
456 * Group Score::                 A mechanism for finding out what groups you like.
457 * Marking Groups::              You can mark groups for later processing.
458 * Foreign Groups::              Creating and editing groups.
459 * Group Parameters::            Each group may have different parameters set.
460 * Listing Groups::              Gnus can list various subsets of the groups.
461 * Sorting Groups::              Re-arrange the group order.
462 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
463 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
464 * Exiting Gnus::                Stop reading news and get some work done.
465 * Group Topics::                A folding group mode divided into topics.
466 * Non-ASCII Group Names::       Accessing groups of non-English names.
467 * Misc Group Stuff::            Other stuff that you can to do.
468
469 Group Buffer Format
470
471 * Group Line Specification::    Deciding how the group buffer is to look.
472 * Group Mode Line Specification::  The group buffer mode line.
473 * Group Highlighting::          Having nice colors in the group buffer.
474
475 Group Topics
476
477 * Topic Commands::              Interactive E-Z commands.
478 * Topic Variables::             How to customize the topics the Lisp Way.
479 * Topic Sorting::               Sorting each topic individually.
480 * Topic Topology::              A map of the world.
481 * Topic Parameters::            Parameters that apply to all groups in a topic.
482
483 Misc Group Stuff
484
485 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
486 * Group Information::           Information and help on groups and Gnus.
487 * Group Timestamp::             Making Gnus keep track of when you last read a group.
488 * File Commands::               Reading and writing the Gnus files.
489 * Sieve Commands::              Managing Sieve scripts.
490
491 Summary Buffer
492
493 * Summary Buffer Format::       Deciding how the summary buffer is to look.
494 * Summary Maneuvering::         Moving around the summary buffer.
495 * Choosing Articles::           Reading articles.
496 * Paging the Article::          Scrolling the current article.
497 * Reply Followup and Post::     Posting articles.
498 * Delayed Articles::            Send articles at a later time.
499 * Marking Articles::            Marking articles as read, expirable, etc.
500 * Limiting::                    You can limit the summary buffer.
501 * Threading::                   How threads are made.
502 * Sorting the Summary Buffer::  How articles and threads are sorted.
503 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
504 * Article Caching::             You may store articles in a cache.
505 * Persistent Articles::         Making articles expiry-resistant.
506 * Sticky Articles::             Article buffers that are not reused.
507 * Article Backlog::             Having already read articles hang around.
508 * Saving Articles::             Ways of customizing article saving.
509 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
510 * Article Treatment::           The article buffer can be mangled at will.
511 * MIME Commands::               Doing MIMEy things with the articles.
512 * Charsets::                    Character set issues.
513 * Article Commands::            Doing various things with the article buffer.
514 * Summary Sorting::             Sorting the summary buffer in various ways.
515 * Finding the Parent::          No child support? Get the parent.
516 * Alternative Approaches::      Reading using non-default summaries.
517 * Tree Display::                A more visual display of threads.
518 * Mail Group Commands::         Some commands can only be used in mail groups.
519 * Various Summary Stuff::       What didn't fit anywhere else.
520 * Exiting the Summary Buffer::  Returning to the Group buffer,
521                                 or reselecting the current group.
522 * Crosspost Handling::          How crossposted articles are dealt with.
523 * Duplicate Suppression::       An alternative when crosspost handling fails.
524 * Security::                    Decrypt and Verify.
525 * Mailing List::                Mailing list minor mode.
526
527 Summary Buffer Format
528
529 * Summary Buffer Lines::        You can specify how summary lines should look.
530 * To From Newsgroups::          How to not display your own name.
531 * Summary Buffer Mode Line::    You can say how the mode line should look.
532 * Summary Highlighting::        Making the summary buffer all pretty and nice.
533
534 Choosing Articles
535
536 * Choosing Commands::           Commands for choosing articles.
537 * Choosing Variables::          Variables that influence these commands.
538
539 Reply, Followup and Post
540
541 * Summary Mail Commands::       Sending mail.
542 * Summary Post Commands::       Sending news.
543 * Summary Message Commands::    Other Message-related commands.
544 * Canceling and Superseding::
545
546 Marking Articles
547
548 * Unread Articles::             Marks for unread articles.
549 * Read Articles::               Marks for read articles.
550 * Other Marks::                 Marks that do not affect readedness.
551 * Setting Marks::               How to set and remove marks.
552 * Generic Marking Commands::    How to customize the marking.
553 * Setting Process Marks::       How to mark articles for later processing.
554
555 Threading
556
557 * Customizing Threading::       Variables you can change to affect the threading.
558 * Thread Commands::             Thread based commands in the summary buffer.
559
560 Customizing Threading
561
562 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
563 * Filling In Threads::          Making the threads displayed look fuller.
564 * More Threading::              Even more variables for fiddling with threads.
565 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
566
567 Decoding Articles
568
569 * Uuencoded Articles::          Uudecode articles.
570 * Shell Archives::              Unshar articles.
571 * PostScript Files::            Split PostScript.
572 * Other Files::                 Plain save and binhex.
573 * Decoding Variables::          Variables for a happy decoding.
574 * Viewing Files::               You want to look at the result of the decoding?
575
576 Decoding Variables
577
578 * Rule Variables::              Variables that say how a file is to be viewed.
579 * Other Decode Variables::      Other decode variables.
580 * Uuencoding and Posting::      Variables for customizing uuencoding.
581
582 Article Treatment
583
584 * Article Highlighting::        You want to make the article look like fruit salad.
585 * Article Fontisizing::         Making emphasized text look nice.
586 * Article Hiding::              You also want to make certain info go away.
587 * Article Washing::             Lots of way-neat functions to make life better.
588 * Article Header::              Doing various header transformations.
589 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
590 * Article Button Levels::       Controlling appearance of buttons.
591 * Article Date::                Grumble, UT!
592 * Article Display::             Display various stuff---X-Face, Picons, Smileys
593 * Article Signature::           What is a signature?
594 * Article Miscellanea::         Various other stuff.
595
596 Alternative Approaches
597
598 * Pick and Read::               First mark articles and then read them.
599 * Binary Groups::               Auto-decode all articles.
600
601 Various Summary Stuff
602
603 * Summary Group Information::   Information oriented commands.
604 * Searching for Articles::      Multiple article commands.
605 * Summary Generation Commands::
606 * Really Various Summary Commands::  Those pesky non-conformant commands.
607
608 Article Buffer
609
610 * Hiding Headers::              Deciding what headers should be displayed.
611 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
612 * Customizing Articles::        Tailoring the look of the articles.
613 * Article Keymap::              Keystrokes available in the article buffer.
614 * Misc Article::                Other stuff.
615
616 Composing Messages
617
618 * Mail::                        Mailing and replying.
619 * Posting Server::              What server should you post and mail via?
620 * POP before SMTP::             You cannot send a mail unless you read a mail.
621 * Mail and Post::               Mailing and posting at the same time.
622 * Archived Messages::           Where Gnus stores the messages you've sent.
623 * Posting Styles::              An easier way to specify who you are.
624 * Drafts::                      Postponing messages and rejected messages.
625 * Rejected Articles::           What happens if the server doesn't like your article?
626 * Signing and encrypting::      How to compose secure messages.
627
628 Select Methods
629
630 * Server Buffer::               Making and editing virtual servers.
631 * Getting News::                Reading USENET news with Gnus.
632 * Getting Mail::                Reading your personal mail with Gnus.
633 * Browsing the Web::            Getting messages from a plethora of Web sources.
634 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
635 * Other Sources::               Reading directories, files, SOUP packets.
636 * Combined Groups::             Combining groups into one group.
637 * Email Based Diary::           Using mails to manage diary events in Gnus.
638 * Gnus Unplugged::              Reading news and mail offline.
639
640 Server Buffer
641
642 * Server Buffer Format::        You can customize the look of this buffer.
643 * Server Commands::             Commands to manipulate servers.
644 * Example Methods::             Examples server specifications.
645 * Creating a Virtual Server::   An example session.
646 * Server Variables::            Which variables to set.
647 * Servers and Methods::         You can use server names as select methods.
648 * Unavailable Servers::         Some servers you try to contact may be down.
649
650 Getting News
651
652 * NNTP::                        Reading news from an @acronym{NNTP} server.
653 * News Spool::                  Reading news from the local spool.
654
655 @acronym{NNTP}
656
657 * Direct Functions::            Connecting directly to the server.
658 * Indirect Functions::          Connecting indirectly to the server.
659 * Common Variables::            Understood by several connection functions.
660 * NNTP marks::                  Storing marks for @acronym{NNTP} servers.
661
662 Getting Mail
663
664 * Mail in a Newsreader::        Important introductory notes.
665 * Getting Started Reading Mail::  A simple cookbook example.
666 * Splitting Mail::              How to create mail groups.
667 * Mail Sources::                How to tell Gnus where to get mail from.
668 * Mail Back End Variables::     Variables for customizing mail handling.
669 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
670 * Group Mail Splitting::        Use group customize to drive mail splitting.
671 * Incorporating Old Mail::      What about the old mail you have?
672 * Expiring Mail::               Getting rid of unwanted mail.
673 * Washing Mail::                Removing cruft from the mail you get.
674 * Duplicates::                  Dealing with duplicated mail.
675 * Not Reading Mail::            Using mail back ends for reading other files.
676 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
677
678 Mail Sources
679
680 * Mail Source Specifiers::      How to specify what a mail source is.
681 * Mail Source Customization::   Some variables that influence things.
682 * Fetching Mail::               Using the mail source specifiers.
683
684 Choosing a Mail Back End
685
686 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
687 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
688 * Mail Spool::                  Store your mail in a private spool?
689 * MH Spool::                    An mhspool-like back end.
690 * Maildir::                     Another one-file-per-message format.
691 * Mail Folders::                Having one file for each group.
692 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
693
694 Browsing the Web
695
696 * Archiving Mail::
697 * Web Searches::                Creating groups from articles that match a string.
698 * Slashdot::                    Reading the Slashdot comments.
699 * Ultimate::                    The Ultimate Bulletin Board systems.
700 * Web Archive::                 Reading mailing list archived on web.
701 * RSS::                         Reading RDF site summary.
702 * Customizing W3::              Doing stuff to Emacs/W3 from Gnus.
703
704 @acronym{IMAP}
705
706 * Splitting in IMAP::           Splitting mail with nnimap.
707 * Expiring in IMAP::            Expiring mail with nnimap.
708 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
709 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
710 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
711 * Debugging IMAP::              What to do when things don't work.
712
713 Other Sources
714
715 * Directory Groups::            You can read a directory as if it was a newsgroup.
716 * Anything Groups::             Dired?  Who needs dired?
717 * Document Groups::             Single files can be the basis of a group.
718 * SOUP::                        Reading @sc{soup} packets ``offline''.
719 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
720
721 Document Groups
722
723 * Document Server Internals::   How to add your own document types.
724
725 SOUP
726
727 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
728 * SOUP Groups::                 A back end for reading @sc{soup} packets.
729 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
730
731 Combined Groups
732
733 * Virtual Groups::              Combining articles from many groups.
734 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
735
736 Email Based Diary
737
738 * The NNDiary Back End::        Basic setup and usage.
739 * The Gnus Diary Library::      Utility toolkit on top of nndiary.
740 * Sending or Not Sending::      A final note on sending diary messages.
741
742 The NNDiary Back End
743
744 * Diary Messages::              What makes a message valid for nndiary.
745 * Running NNDiary::             NNDiary has two modes of operation.
746 * Customizing NNDiary::         Bells and whistles.
747
748 The Gnus Diary Library
749
750 * Diary Summary Line Format::           A nicer summary buffer line format.
751 * Diary Articles Sorting::              A nicer way to sort messages.
752 * Diary Headers Generation::            Not doing it manually.
753 * Diary Group Parameters::              Not handling them manually.
754
755 Gnus Unplugged
756
757 * Agent Basics::                How it all is supposed to work.
758 * Agent Categories::            How to tell the Gnus Agent what to download.
759 * Agent Commands::              New commands for all the buffers.
760 * Agent Visuals::               Ways that the agent may effect your summary buffer.
761 * Agent as Cache::              The Agent is a big cache too.
762 * Agent Expiry::                How to make old articles go away.
763 * Agent Regeneration::          How to recover from lost connections and other accidents.
764 * Agent and flags::             How the Agent maintains flags.
765 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
766 * Outgoing Messages::           What happens when you post/mail something?
767 * Agent Variables::             Customizing is fun.
768 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
769 * Batching Agents::             How to fetch news from a @code{cron} job.
770 * Agent Caveats::               What you think it'll do and what it does.
771
772 Agent Categories
773
774 * Category Syntax::             What a category looks like.
775 * Category Buffer::             A buffer for maintaining categories.
776 * Category Variables::          Customize'r'Us.
777
778 Agent Commands
779
780 * Group Agent Commands::        Configure groups and fetch their contents.
781 * Summary Agent Commands::      Manually select then fetch specific articles.
782 * Server Agent Commands::       Select the servers that are supported by the agent.
783
784 Scoring
785
786 * Summary Score Commands::      Adding score entries for the current group.
787 * Group Score Commands::        General score commands.
788 * Score Variables::             Customize your scoring.  (My, what terminology).
789 * Score File Format::           What a score file may contain.
790 * Score File Editing::          You can edit score files by hand as well.
791 * Adaptive Scoring::            Big Sister Gnus knows what you read.
792 * Home Score File::             How to say where new score entries are to go.
793 * Followups To Yourself::       Having Gnus notice when people answer you.
794 * Scoring On Other Headers::    Scoring on non-standard headers.
795 * Scoring Tips::                How to score effectively.
796 * Reverse Scoring::             That problem child of old is not problem.
797 * Global Score Files::          Earth-spanning, ear-splitting score files.
798 * Kill Files::                  They are still here, but they can be ignored.
799 * Converting Kill Files::       Translating kill files to score files.
800 * Advanced Scoring::            Using logical expressions to build score rules.
801 * Score Decays::                It can be useful to let scores wither away.
802
803 Advanced Scoring
804
805 * Advanced Scoring Syntax::     A definition.
806 * Advanced Scoring Examples::   What they look like.
807 * Advanced Scoring Tips::       Getting the most out of it.
808
809 Various
810
811 * Process/Prefix::              A convention used by many treatment commands.
812 * Interactive::                 Making Gnus ask you many questions.
813 * Symbolic Prefixes::           How to supply some Gnus functions with options.
814 * Formatting Variables::        You can specify what buffers should look like.
815 * Window Layout::               Configuring the Gnus buffer windows.
816 * Faces and Fonts::             How to change how faces look.
817 * Compilation::                 How to speed Gnus up.
818 * Mode Lines::                  Displaying information in the mode lines.
819 * Highlighting and Menus::      Making buffers look all nice and cozy.
820 * Buttons::                     Get tendinitis in ten easy steps!
821 * Daemons::                     Gnus can do things behind your back.
822 * NoCeM::                       How to avoid spam and other fatty foods.
823 * Undo::                        Some actions can be undone.
824 * Predicate Specifiers::        Specifying predicates.
825 * Moderation::                  What to do if you're a moderator.
826 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
827 * Fuzzy Matching::              What's the big fuzz?
828 * Thwarting Email Spam::        Simple ways to avoid unsolicited commercial email.
829 * Spam Package::                A package for filtering and processing spam.
830 * Other modes::                 Interaction with other modes.
831 * Various Various::             Things that are really various.
832
833 Formatting Variables
834
835 * Formatting Basics::           A formatting variable is basically a format string.
836 * Mode Line Formatting::        Some rules about mode line formatting variables.
837 * Advanced Formatting::         Modifying output in various ways.
838 * User-Defined Specs::          Having Gnus call your own functions.
839 * Formatting Fonts::            Making the formatting look colorful and nice.
840 * Positioning Point::           Moving point to a position after an operation.
841 * Tabulation::                  Tabulating your output.
842 * Wide Characters::             Dealing with wide characters.
843
844 Image Enhancements
845
846 * X-Face::                      Display a funky, teensy black-and-white image.
847 * Face::                        Display a funkier, teensier colored image.
848 * Smileys::                     Show all those happy faces the way they were
849                                   meant to be shown.
850 * Picons::                      How to display pictures of what you're reading.
851 * XVarious::                    Other XEmacsy Gnusey variables.
852
853 Thwarting Email Spam
854
855 * The problem of spam::         Some background, and some solutions
856 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
857 * SpamAssassin::                How to use external anti-spam tools.
858 * Hashcash::                    Reduce spam by burning CPU time.
859
860 Spam Package
861
862 * Spam Package Introduction::
863 * Filtering Incoming Mail::
864 * Detecting Spam in Groups::
865 * Spam and Ham Processors::
866 * Spam Package Configuration Examples::
867 * Spam Back Ends::
868 * Extending the Spam package::
869 * Spam Statistics Package::
870
871 Spam Statistics Package
872
873 * Creating a spam-stat dictionary::
874 * Splitting mail using spam-stat::
875 * Low-level interface to the spam-stat dictionary::
876
877 Appendices
878
879 * XEmacs::                      Requirements for installing under XEmacs.
880 * History::                     How Gnus got where it is today.
881 * On Writing Manuals::          Why this is not a beginner's guide.
882 * Terminology::                 We use really difficult, like, words here.
883 * Customization::               Tailoring Gnus to your needs.
884 * Troubleshooting::             What you might try if things do not work.
885 * Gnus Reference Guide::        Rilly, rilly technical stuff.
886 * Emacs for Heathens::          A short introduction to Emacsian terms.
887 * Frequently Asked Questions::  The Gnus FAQ
888
889 History
890
891 * Gnus Versions::               What Gnus versions have been released.
892 * Other Gnus Versions::         Other Gnus versions that also have been released.
893 * Why?::                        What's the point of Gnus?
894 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
895 * Conformity::                  Gnus tries to conform to all standards.
896 * Emacsen::                     Gnus can be run on a few modern Emacsen.
897 * Gnus Development::            How Gnus is developed.
898 * Contributors::                Oodles of people.
899 * New Features::                Pointers to some of the new stuff in Gnus.
900
901 New Features
902
903 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
904 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
905 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
906 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
907 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
908 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10/5.11.
909 * No Gnus::                     Very punny.
910
911 Customization
912
913 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
914 * Slow Terminal Connection::    You run a remote Emacs.
915 * Little Disk Space::           You feel that having large setup files is icky.
916 * Slow Machine::                You feel like buying a faster machine.
917
918 Gnus Reference Guide
919
920 * Gnus Utility Functions::      Common functions and variable to use.
921 * Back End Interface::          How Gnus communicates with the servers.
922 * Score File Syntax::           A BNF definition of the score file standard.
923 * Headers::                     How Gnus stores headers internally.
924 * Ranges::                      A handy format for storing mucho numbers.
925 * Group Info::                  The group info format.
926 * Extended Interactive::        Symbolic prefixes and stuff.
927 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
928 * Various File Formats::        Formats of files that Gnus use.
929
930 Back End Interface
931
932 * Required Back End Functions::  Functions that must be implemented.
933 * Optional Back End Functions::  Functions that need not be implemented.
934 * Error Messaging::             How to get messages and report errors.
935 * Writing New Back Ends::       Extending old back ends.
936 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
937 * Mail-like Back Ends::         Some tips on mail back ends.
938
939 Various File Formats
940
941 * Active File Format::          Information on articles and groups available.
942 * Newsgroups File Format::      Group descriptions.
943
944 Emacs for Heathens
945
946 * Keystrokes::                  Entering text and executing commands.
947 * Emacs Lisp::                  The built-in Emacs programming language.
948
949 @end detailmenu
950 @end menu
951
952 @node Starting Up
953 @chapter Starting Gnus
954 @cindex starting up
955
956 If you haven't used Emacs much before using Gnus, read @ref{Emacs for
957 Heathens} first.
958
959 @kindex M-x gnus
960 @findex gnus
961 If your system administrator has set things up properly, starting Gnus
962 and reading news is extremely easy---you just type @kbd{M-x gnus} in
963 your Emacs.  If not, you should customize the variable
964 @code{gnus-select-method} as described in @ref{Finding the News}.  For a
965 minimal setup for posting should also customize the variables
966 @code{user-full-name} and @code{user-mail-address}.
967
968 @findex gnus-other-frame
969 @kindex M-x gnus-other-frame
970 If you want to start Gnus in a different frame, you can use the command
971 @kbd{M-x gnus-other-frame} instead.
972
973 If things do not go smoothly at startup, you have to twiddle some
974 variables in your @file{~/.gnus.el} file.  This file is similar to
975 @file{~/.emacs}, but is read when Gnus starts.
976
977 If you puzzle at any terms used in this manual, please refer to the
978 terminology section (@pxref{Terminology}).
979
980 @menu
981 * Finding the News::      Choosing a method for getting news.
982 * The First Time::        What does Gnus do the first time you start it?
983 * The Server is Down::    How can I read my mail then?
984 * Slave Gnusae::          You can have more than one Gnus active at a time.
985 * New Groups::            What is Gnus supposed to do with new groups?
986 * Changing Servers::      You may want to move from one server to another.
987 * Startup Files::         Those pesky startup files---@file{.newsrc}.
988 * Auto Save::             Recovering from a crash.
989 * The Active File::       Reading the active file over a slow line Takes Time.
990 * Startup Variables::     Other variables you might change.
991 @end menu
992
993
994 @node Finding the News
995 @section Finding the News
996 @cindex finding news
997
998 @vindex gnus-select-method
999 @c @head
1000 The @code{gnus-select-method} variable says where Gnus should look for
1001 news.  This variable should be a list where the first element says
1002 @dfn{how} and the second element says @dfn{where}.  This method is your
1003 native method.  All groups not fetched with this method are
1004 foreign groups.
1005
1006 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
1007 you want to get your daily dosage of news from, you'd say:
1008
1009 @lisp
1010 (setq gnus-select-method '(nntp "news.somewhere.edu"))
1011 @end lisp
1012
1013 If you want to read directly from the local spool, say:
1014
1015 @lisp
1016 (setq gnus-select-method '(nnspool ""))
1017 @end lisp
1018
1019 If you can use a local spool, you probably should, as it will almost
1020 certainly be much faster.  But do not use the local spool if your
1021 server is running Leafnode (which is a simple, standalone private news
1022 server); in this case, use @code{(nntp "localhost")}.
1023
1024 @vindex gnus-nntpserver-file
1025 @cindex NNTPSERVER
1026 @cindex @acronym{NNTP} server
1027 If this variable is not set, Gnus will take a look at the
1028 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1029 Gnus will see whether @code{gnus-nntpserver-file}
1030 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1031 If that fails as well, Gnus will try to use the machine running Emacs
1032 as an @acronym{NNTP} server.  That's a long shot, though.
1033
1034 @vindex gnus-nntp-server
1035 If @code{gnus-nntp-server} is set, this variable will override
1036 @code{gnus-select-method}.  You should therefore set
1037 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1038
1039 @vindex gnus-secondary-servers
1040 @vindex gnus-nntp-server
1041 You can also make Gnus prompt you interactively for the name of an
1042 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1043 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
1044 in the @code{gnus-secondary-servers} list (if any).  You can also just
1045 type in the name of any server you feel like visiting.  (Note that this
1046 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1047 gnus} later in the same Emacs session, Gnus will contact the same
1048 server.)
1049
1050 @findex gnus-group-browse-foreign-server
1051 @kindex B (Group)
1052 However, if you use one @acronym{NNTP} server regularly and are just
1053 interested in a couple of groups from a different server, you would be
1054 better served by using the @kbd{B} command in the group buffer.  It will
1055 let you have a look at what groups are available, and you can subscribe
1056 to any of the groups you want to.  This also makes @file{.newsrc}
1057 maintenance much tidier.  @xref{Foreign Groups}.
1058
1059 @vindex gnus-secondary-select-methods
1060 @c @head
1061 A slightly different approach to foreign groups is to set the
1062 @code{gnus-secondary-select-methods} variable.  The select methods
1063 listed in this variable are in many ways just as native as the
1064 @code{gnus-select-method} server.  They will also be queried for active
1065 files during startup (if that's required), and new newsgroups that
1066 appear on these servers will be subscribed (or not) just as native
1067 groups are.
1068
1069 For instance, if you use the @code{nnmbox} back end to read your mail,
1070 you would typically set this variable to
1071
1072 @lisp
1073 (setq gnus-secondary-select-methods '((nnmbox "")))
1074 @end lisp
1075
1076 Note: the @acronym{NNTP} back end stores marks in marks files
1077 (@pxref{NNTP marks}).  This feature makes it easy to share marks between
1078 several Gnus installations, but may slow down things a bit when fetching
1079 new articles.  @xref{NNTP marks}, for more information.
1080
1081
1082 @node The First Time
1083 @section The First Time
1084 @cindex first time usage
1085
1086 If no startup files exist (@pxref{Startup Files}), Gnus will try to
1087 determine what groups should be subscribed by default.
1088
1089 @vindex gnus-default-subscribed-newsgroups
1090 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
1091 will subscribe you to just those groups in that list, leaving the rest
1092 killed.  Your system administrator should have set this variable to
1093 something useful.
1094
1095 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
1096 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1097 here as @dfn{whatever Lars thinks you should read}.)
1098
1099 You'll also be subscribed to the Gnus documentation group, which should
1100 help you with most common problems.
1101
1102 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
1103 use the normal functions for handling new groups, and not do anything
1104 special.
1105
1106
1107 @node The Server is Down
1108 @section The Server is Down
1109 @cindex server errors
1110
1111 If the default server is down, Gnus will understandably have some
1112 problems starting.  However, if you have some mail groups in addition to
1113 the news groups, you may want to start Gnus anyway.
1114
1115 Gnus, being the trusting sort of program, will ask whether to proceed
1116 without a native select method if that server can't be contacted.  This
1117 will happen whether the server doesn't actually exist (i.e., you have
1118 given the wrong address) or the server has just momentarily taken ill
1119 for some reason or other.  If you decide to continue and have no foreign
1120 groups, you'll find it difficult to actually do anything in the group
1121 buffer.  But, hey, that's your problem.  Blllrph!
1122
1123 @findex gnus-no-server
1124 @kindex M-x gnus-no-server
1125 @c @head
1126 If you know that the server is definitely down, or you just want to read
1127 your mail without bothering with the server at all, you can use the
1128 @code{gnus-no-server} command to start Gnus.  That might come in handy
1129 if you're in a hurry as well.  This command will not attempt to contact
1130 your primary server---instead, it will just activate all groups on level
1131 1 and 2.  (You should preferably keep no native groups on those two
1132 levels.) Also @pxref{Group Levels}.
1133
1134
1135 @node Slave Gnusae
1136 @section Slave Gnusae
1137 @cindex slave
1138
1139 You might want to run more than one Emacs with more than one Gnus at the
1140 same time.  If you are using different @file{.newsrc} files (e.g., if you
1141 are using the two different Gnusae to read from two different servers),
1142 that is no problem whatsoever.  You just do it.
1143
1144 The problem appears when you want to run two Gnusae that use the same
1145 @file{.newsrc} file.
1146
1147 To work around that problem some, we here at the Think-Tank at the Gnus
1148 Towers have come up with a new concept: @dfn{Masters} and
1149 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1150 taken out a copyright on those words.  If you wish to use those words in
1151 conjunction with each other, you have to send $1 per usage instance to
1152 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1153 Applications}) will be much more expensive, of course.)
1154
1155 @findex gnus-slave
1156 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1157 however you do it).  Each subsequent slave Gnusae should be started with
1158 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1159 files, but instead save @dfn{slave files} that contain information only
1160 on what groups have been read in the slave session.  When a master Gnus
1161 starts, it will read (and delete) these slave files, incorporating all
1162 information from them.  (The slave files will be read in the sequence
1163 they were created, so the latest changes will have precedence.)
1164
1165 Information from the slave files has, of course, precedence over the
1166 information in the normal (i.e., master) @file{.newsrc} file.
1167
1168 If the @file{.newsrc*} files have not been saved in the master when the
1169 slave starts, you may be prompted as to whether to read an auto-save
1170 file.  If you answer ``yes'', the unsaved changes to the master will be
1171 incorporated into the slave.  If you answer ``no'', the slave may see some
1172 messages as unread that have been read in the master.
1173
1174
1175
1176 @node New Groups
1177 @section New Groups
1178 @cindex new groups
1179 @cindex subscription
1180
1181 @vindex gnus-check-new-newsgroups
1182 If you are satisfied that you really never want to see any new groups,
1183 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1184 also save you some time at startup.  Even if this variable is
1185 @code{nil}, you can always subscribe to the new groups just by pressing
1186 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1187 is @code{ask-server} by default.  If you set this variable to
1188 @code{always}, then Gnus will query the back ends for new groups even
1189 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1190
1191 @menu
1192 * Checking New Groups::         Determining what groups are new.
1193 * Subscription Methods::        What Gnus should do with new groups.
1194 * Filtering New Groups::        Making Gnus ignore certain new groups.
1195 @end menu
1196
1197
1198 @node Checking New Groups
1199 @subsection Checking New Groups
1200
1201 Gnus normally determines whether a group is new or not by comparing the
1202 list of groups from the active file(s) with the lists of subscribed and
1203 dead groups.  This isn't a particularly fast method.  If
1204 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
1205 server for new groups since the last time.  This is both faster and
1206 cheaper.  This also means that you can get rid of the list of killed
1207 groups altogether, so you may set @code{gnus-save-killed-list} to
1208 @code{nil}, which will save time both at startup, at exit, and all over.
1209 Saves disk space, too.  Why isn't this the default, then?
1210 Unfortunately, not all servers support this command.
1211
1212 I bet I know what you're thinking now: How do I find out whether my
1213 server supports @code{ask-server}?  No?  Good, because I don't have a
1214 fail-safe answer.  I would suggest just setting this variable to
1215 @code{ask-server} and see whether any new groups appear within the next
1216 few days.  If any do, then it works.  If none do, then it doesn't
1217 work.  I could write a function to make Gnus guess whether the server
1218 supports @code{ask-server}, but it would just be a guess.  So I won't.
1219 You could @code{telnet} to the server and say @code{HELP} and see
1220 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1221 it does, then it might work.  (But there are servers that lists
1222 @samp{NEWGROUPS} without supporting the function properly.)
1223
1224 This variable can also be a list of select methods.  If so, Gnus will
1225 issue an @code{ask-server} command to each of the select methods, and
1226 subscribe them (or not) using the normal methods.  This might be handy
1227 if you are monitoring a few servers for new groups.  A side effect is
1228 that startup will take much longer, so you can meditate while waiting.
1229 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1230
1231
1232 @node Subscription Methods
1233 @subsection Subscription Methods
1234
1235 @vindex gnus-subscribe-newsgroup-method
1236 What Gnus does when it encounters a new group is determined by the
1237 @code{gnus-subscribe-newsgroup-method} variable.
1238
1239 This variable should contain a function.  This function will be called
1240 with the name of the new group as the only parameter.
1241
1242 Some handy pre-fab functions are:
1243
1244 @table @code
1245
1246 @item gnus-subscribe-zombies
1247 @vindex gnus-subscribe-zombies
1248 Make all new groups zombies.  This is the default.  You can browse the
1249 zombies later (with @kbd{A z}) and either kill them all off properly
1250 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1251
1252 @item gnus-subscribe-randomly
1253 @vindex gnus-subscribe-randomly
1254 Subscribe all new groups in arbitrary order.  This really means that all
1255 new groups will be added at ``the top'' of the group buffer.
1256
1257 @item gnus-subscribe-alphabetically
1258 @vindex gnus-subscribe-alphabetically
1259 Subscribe all new groups in alphabetical order.
1260
1261 @item gnus-subscribe-hierarchically
1262 @vindex gnus-subscribe-hierarchically
1263 Subscribe all new groups hierarchically.  The difference between this
1264 function and @code{gnus-subscribe-alphabetically} is slight.
1265 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1266 alphabetical fashion, while this function will enter groups into its
1267 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1268 @samp{comp} hierarchy, this function will not mess that configuration
1269 up.  Or something like that.
1270
1271 @item gnus-subscribe-interactively
1272 @vindex gnus-subscribe-interactively
1273 Subscribe new groups interactively.  This means that Gnus will ask
1274 you about @strong{all} new groups.  The groups you choose to subscribe
1275 to will be subscribed hierarchically.
1276
1277 @item gnus-subscribe-killed
1278 @vindex gnus-subscribe-killed
1279 Kill all new groups.
1280
1281 @item gnus-subscribe-topics
1282 @vindex gnus-subscribe-topics
1283 Put the groups into the topic that has a matching @code{subscribe} topic
1284 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1285 topic parameter that looks like
1286
1287 @example
1288 "nnslashdot"
1289 @end example
1290
1291 will mean that all groups that match that regex will be subscribed under
1292 that topic.
1293
1294 If no topics match the groups, the groups will be subscribed in the
1295 top-level topic.
1296
1297 @end table
1298
1299 @vindex gnus-subscribe-hierarchical-interactive
1300 A closely related variable is
1301 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1302 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
1303 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1304 will ask you for each sub-hierarchy whether you want to descend the
1305 hierarchy or not.
1306
1307 One common mistake is to set the variable a few paragraphs above
1308 (@code{gnus-subscribe-newsgroup-method}) to
1309 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1310 will not work.  This is ga-ga.  So don't do it.
1311
1312
1313 @node Filtering New Groups
1314 @subsection Filtering New Groups
1315
1316 A nice and portable way to control which new newsgroups should be
1317 subscribed (or ignored) is to put an @dfn{options} line at the start of
1318 the @file{.newsrc} file.  Here's an example:
1319
1320 @example
1321 options -n !alt.all !rec.all sci.all
1322 @end example
1323
1324 @vindex gnus-subscribe-options-newsgroup-method
1325 This line obviously belongs to a serious-minded intellectual scientific
1326 person (or she may just be plain old boring), because it says that all
1327 groups that have names beginning with @samp{alt} and @samp{rec} should
1328 be ignored, and all groups with names beginning with @samp{sci} should
1329 be subscribed.  Gnus will not use the normal subscription method for
1330 subscribing these groups.
1331 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1332 variable defaults to @code{gnus-subscribe-alphabetically}.
1333
1334 @vindex gnus-options-not-subscribe
1335 @vindex gnus-options-subscribe
1336 If you don't want to mess with your @file{.newsrc} file, you can just
1337 set the two variables @code{gnus-options-subscribe} and
1338 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1339 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1340 and if the new group matches the former, it will be unconditionally
1341 subscribed, and if it matches the latter, it will be ignored.
1342
1343 @vindex gnus-auto-subscribed-groups
1344 Yet another variable that meddles here is
1345 @code{gnus-auto-subscribed-groups}.  It works exactly like
1346 @code{gnus-options-subscribe}, and is therefore really superfluous,
1347 but I thought it would be nice to have two of these.  This variable is
1348 more meant for setting some ground rules, while the other variable is
1349 used more for user fiddling.  By default this variable makes all new
1350 groups that come from mail back ends (@code{nnml}, @code{nnbabyl},
1351 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1352 subscribed.  If you don't like that, just set this variable to
1353 @code{nil}.
1354
1355 New groups that match this regexp are subscribed using
1356 @code{gnus-subscribe-options-newsgroup-method}.
1357
1358
1359 @node Changing Servers
1360 @section Changing Servers
1361 @cindex changing servers
1362
1363 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1364 This happens very rarely, but perhaps you change jobs, or one server is
1365 very flaky and you want to use another.
1366
1367 Changing the server is pretty easy, right?  You just change
1368 @code{gnus-select-method} to point to the new server?
1369
1370 @emph{Wrong!}
1371
1372 Article numbers are not (in any way) kept synchronized between different
1373 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1374 you have read is by keeping track of article numbers.  So when you
1375 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1376 worthless.
1377
1378 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1379 file from one server to another.  They all have one thing in
1380 common---they take a looong time to run.  You don't want to use these
1381 functions more than absolutely necessary.
1382
1383 @kindex M-x gnus-change-server
1384 @findex gnus-change-server
1385 If you have access to both servers, Gnus can request the headers for all
1386 the articles you have read and compare @code{Message-ID}s and map the
1387 article numbers of the read articles and article marks.  The @kbd{M-x
1388 gnus-change-server} command will do this for all your native groups.  It
1389 will prompt for the method you want to move to.
1390
1391 @kindex M-x gnus-group-move-group-to-server
1392 @findex gnus-group-move-group-to-server
1393 You can also move individual groups with the @kbd{M-x
1394 gnus-group-move-group-to-server} command.  This is useful if you want to
1395 move a (foreign) group from one server to another.
1396
1397 @kindex M-x gnus-group-clear-data-on-native-groups
1398 @findex gnus-group-clear-data-on-native-groups
1399 If you don't have access to both the old and new server, all your marks
1400 and read ranges have become worthless.  You can use the @kbd{M-x
1401 gnus-group-clear-data-on-native-groups} command to clear out all data
1402 that you have on your native groups.  Use with caution.
1403
1404 @kindex M-x gnus-group-clear-data
1405 @findex gnus-group-clear-data
1406 Clear the data from the current group only---nix out marks and the
1407 list of read articles (@code{gnus-group-clear-data}).
1408
1409 After changing servers, you @strong{must} move the cache hierarchy away,
1410 since the cached articles will have wrong article numbers, which will
1411 affect which articles Gnus thinks are read.
1412 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1413 to have it done automatically; for @code{gnus-group-clear-data}, you
1414 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1415 cache for all groups).
1416
1417
1418 @node Startup Files
1419 @section Startup Files
1420 @cindex startup files
1421 @cindex .newsrc
1422 @cindex .newsrc.el
1423 @cindex .newsrc.eld
1424
1425 Most common Unix news readers use a shared startup file called
1426 @file{.newsrc}.  This file contains all the information about what
1427 groups are subscribed, and which articles in these groups have been
1428 read.
1429
1430 Things got a bit more complicated with @sc{gnus}.  In addition to
1431 keeping the @file{.newsrc} file updated, it also used a file called
1432 @file{.newsrc.el} for storing all the information that didn't fit into
1433 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1434 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1435 files was the most recently saved, which enabled people to swap between
1436 @sc{gnus} and other newsreaders.
1437
1438 That was kinda silly, so Gnus went one better: In addition to the
1439 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1440 @file{.newsrc.eld}.  It will read whichever of these files that are most
1441 recent, but it will never write a @file{.newsrc.el} file.  You should
1442 never delete the @file{.newsrc.eld} file---it contains much information
1443 not stored in the @file{.newsrc} file.
1444
1445 @vindex gnus-save-newsrc-file
1446 @vindex gnus-read-newsrc-file
1447 You can turn off writing the @file{.newsrc} file by setting
1448 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1449 the file and save some space, as well as exiting from Gnus faster.
1450 However, this will make it impossible to use other newsreaders than
1451 Gnus.  But hey, who would want to, right?  Similarly, setting
1452 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1453 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which can be
1454 convenient if you use a different news reader occasionally, and you
1455 want to read a different subset of the available groups with that
1456 news reader.
1457
1458 @vindex gnus-save-killed-list
1459 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1460 will not save the list of killed groups to the startup file.  This will
1461 save both time (when starting and quitting) and space (on disk).  It
1462 will also mean that Gnus has no record of what groups are new or old,
1463 so the automatic new groups subscription methods become meaningless.
1464 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1465 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1466 Groups}).  This variable can also be a regular expression.  If that's
1467 the case, remove all groups that do not match this regexp before
1468 saving.  This can be useful in certain obscure situations that involve
1469 several servers where not all servers support @code{ask-server}.
1470
1471 @vindex gnus-startup-file
1472 @vindex gnus-backup-startup-file
1473 @vindex version-control
1474 The @code{gnus-startup-file} variable says where the startup files are.
1475 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1476 file being whatever that one is, with a @samp{.eld} appended.
1477 If you want version control for this file, set
1478 @code{gnus-backup-startup-file}.  It respects the same values as the
1479 @code{version-control} variable.
1480
1481 @vindex gnus-save-newsrc-hook
1482 @vindex gnus-save-quick-newsrc-hook
1483 @vindex gnus-save-standard-newsrc-hook
1484 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1485 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1486 saving the @file{.newsrc.eld} file, and
1487 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1488 @file{.newsrc} file.  The latter two are commonly used to turn version
1489 control on or off.  Version control is on by default when saving the
1490 startup files.  If you want to turn backup creation off, say something like:
1491
1492 @lisp
1493 (defun turn-off-backup ()
1494   (set (make-local-variable 'backup-inhibited) t))
1495
1496 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1497 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1498 @end lisp
1499
1500 @vindex gnus-init-file
1501 @vindex gnus-site-init-file
1502 When Gnus starts, it will read the @code{gnus-site-init-file}
1503 (@file{.../site-lisp/gnus-init} by default) and @code{gnus-init-file}
1504 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1505 and can be used to avoid cluttering your @file{~/.emacs} and
1506 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1507 with the same names as these, but with @file{.elc} and @file{.el}
1508 suffixes.  In other words, if you have set @code{gnus-init-file} to
1509 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1510 and finally @file{~/.gnus} (in this order).  If Emacs was invoked with
1511 the @option{-q} or @option{--no-init-file} options (@pxref{Initial
1512 Options, ,Initial Options, emacs, The Emacs Manual}), Gnus doesn't read
1513 @code{gnus-init-file}.
1514
1515
1516 @node Auto Save
1517 @section Auto Save
1518 @cindex dribble file
1519 @cindex auto-save
1520
1521 Whenever you do something that changes the Gnus data (reading articles,
1522 catching up, killing/subscribing groups), the change is added to a
1523 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1524 Emacs way.  If your Emacs should crash before you have saved the
1525 @file{.newsrc} files, all changes you have made can be recovered from
1526 this file.
1527
1528 If Gnus detects this file at startup, it will ask the user whether to
1529 read it.  The auto save file is deleted whenever the real startup file is
1530 saved.
1531
1532 @vindex gnus-use-dribble-file
1533 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1534 maintain a dribble buffer.  The default is @code{t}.
1535
1536 @vindex gnus-dribble-directory
1537 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1538 this variable is @code{nil}, which it is by default, Gnus will dribble
1539 into the directory where the @file{.newsrc} file is located.  (This is
1540 normally the user's home directory.)  The dribble file will get the same
1541 file permissions as the @file{.newsrc} file.
1542
1543 @vindex gnus-always-read-dribble-file
1544 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1545 read the dribble file on startup without querying the user.
1546
1547
1548 @node The Active File
1549 @section The Active File
1550 @cindex active file
1551 @cindex ignored groups
1552
1553 When Gnus starts, or indeed whenever it tries to determine whether new
1554 articles have arrived, it reads the active file.  This is a very large
1555 file that lists all the active groups and articles on the server.
1556
1557 @vindex gnus-ignored-newsgroups
1558 Before examining the active file, Gnus deletes all lines that match the
1559 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1560 any groups with bogus names, but you can use this variable to make Gnus
1561 ignore hierarchies you aren't ever interested in.  However, this is not
1562 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1563 Groups} for an overview of other variables that can be used instead.
1564
1565 @c This variable is
1566 @c @code{nil} by default, and will slow down active file handling somewhat
1567 @c if you set it to anything else.
1568
1569 @vindex gnus-read-active-file
1570 @c @head
1571 The active file can be rather Huge, so if you have a slow network, you
1572 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1573 reading the active file.  This variable is @code{some} by default.
1574
1575 Gnus will try to make do by getting information just on the groups that
1576 you actually subscribe to.
1577
1578 Note that if you subscribe to lots and lots of groups, setting this
1579 variable to @code{nil} will probably make Gnus slower, not faster.  At
1580 present, having this variable @code{nil} will slow Gnus down
1581 considerably, unless you read news over a 2400 baud modem.
1582
1583 This variable can also have the value @code{some}.  Gnus will then
1584 attempt to read active info only on the subscribed groups.  On some
1585 servers this is quite fast (on sparkling, brand new INN servers that
1586 support the @code{LIST ACTIVE group} command), on others this isn't fast
1587 at all.  In any case, @code{some} should be faster than @code{nil}, and
1588 is certainly faster than @code{t} over slow lines.
1589
1590 Some news servers (old versions of Leafnode and old versions of INN, for
1591 instance) do not support the @code{LIST ACTIVE group}.  For these
1592 servers, @code{nil} is probably the most efficient value for this
1593 variable.
1594
1595 If this variable is @code{nil}, Gnus will ask for group info in total
1596 lock-step, which isn't very fast.  If it is @code{some} and you use an
1597 @acronym{NNTP} server, Gnus will pump out commands as fast as it can, and
1598 read all the replies in one swoop.  This will normally result in better
1599 performance, but if the server does not support the aforementioned
1600 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1601
1602 If you think that starting up Gnus takes too long, try all the three
1603 different values for this variable and see what works best for you.
1604
1605 In any case, if you use @code{some} or @code{nil}, you should definitely
1606 kill all groups that you aren't interested in to speed things up.
1607
1608 Note that this variable also affects active file retrieval from
1609 secondary select methods.
1610
1611
1612 @node Startup Variables
1613 @section Startup Variables
1614
1615 @table @code
1616
1617 @item gnus-load-hook
1618 @vindex gnus-load-hook
1619 A hook run while Gnus is being loaded.  Note that this hook will
1620 normally be run just once in each Emacs session, no matter how many
1621 times you start Gnus.
1622
1623 @item gnus-before-startup-hook
1624 @vindex gnus-before-startup-hook
1625 A hook run after starting up Gnus successfully.
1626
1627 @item gnus-startup-hook
1628 @vindex gnus-startup-hook
1629 A hook run as the very last thing after starting up Gnus
1630
1631 @item gnus-started-hook
1632 @vindex gnus-started-hook
1633 A hook that is run as the very last thing after starting up Gnus
1634 successfully.
1635
1636 @item gnus-setup-news-hook
1637 @vindex gnus-setup-news-hook
1638 A hook that is run after reading the @file{.newsrc} file(s), but before
1639 generating the group buffer.
1640
1641 @item gnus-check-bogus-newsgroups
1642 @vindex gnus-check-bogus-newsgroups
1643 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1644 startup.  A @dfn{bogus group} is a group that you have in your
1645 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1646 bogus groups can take quite a while, so to save time and resources it's
1647 best to leave this option off, and do the checking for bogus groups once
1648 in a while from the group buffer instead (@pxref{Group Maintenance}).
1649
1650 @item gnus-inhibit-startup-message
1651 @vindex gnus-inhibit-startup-message
1652 If non-@code{nil}, the startup message won't be displayed.  That way,
1653 your boss might not notice as easily that you are reading news instead
1654 of doing your job.  Note that this variable is used before
1655 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1656
1657 @item gnus-no-groups-message
1658 @vindex gnus-no-groups-message
1659 Message displayed by Gnus when no groups are available.
1660
1661 @item gnus-play-startup-jingle
1662 @vindex gnus-play-startup-jingle
1663 If non-@code{nil}, play the Gnus jingle at startup.
1664
1665 @item gnus-startup-jingle
1666 @vindex gnus-startup-jingle
1667 Jingle to be played if the above variable is non-@code{nil}.  The
1668 default is @samp{Tuxedomoon.Jingle4.au}.
1669
1670 @end table
1671
1672
1673 @node Group Buffer
1674 @chapter Group Buffer
1675 @cindex group buffer
1676
1677 @c Alex Schroeder suggests to rearrange this as follows:
1678 @c
1679 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1680 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1681 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1682 @c   7. Group Score, 8. Group Buffer Format
1683 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1684 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1685 @c <kensanata> First, "Gnus considers groups... (default 9)."
1686 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1687 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1688 @c <kensanata> Then expand the next paragraph or add some more to it.
1689 @c    This short one sentence explains levels 1 and 2, therefore I understand
1690 @c    that I should keep important news at 3 and boring news at 4.
1691 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1692 @c    Maybe keep those that you don't want to read temporarily at 6,
1693 @c    those that you never want to read at 8, those that offend your
1694 @c    human rights at 9...
1695
1696
1697 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1698 is the first buffer shown when Gnus starts, and will never be killed as
1699 long as Gnus is active.
1700
1701 @iftex
1702 @iflatex
1703 \gnusfigure{The Group Buffer}{320}{
1704 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1705 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1706 \put(120,38){\vector(1,2){10}}
1707 \put(40,60){\makebox(0,0)[r]{Mode line}}
1708 \put(40,58){\vector(1,0){30}}
1709 \put(200,28){\makebox(0,0)[t]{Native select method}}
1710 \put(200,26){\vector(-1,2){15}}
1711 }
1712 @end iflatex
1713 @end iftex
1714
1715 @menu
1716 * Group Buffer Format::         Information listed and how you can change it.
1717 * Group Maneuvering::           Commands for moving in the group buffer.
1718 * Selecting a Group::           Actually reading news.
1719 * Subscription Commands::       Unsubscribing, killing, subscribing.
1720 * Group Data::                  Changing the info for a group.
1721 * Group Levels::                Levels? What are those, then?
1722 * Group Score::                 A mechanism for finding out what groups you like.
1723 * Marking Groups::              You can mark groups for later processing.
1724 * Foreign Groups::              Creating and editing groups.
1725 * Group Parameters::            Each group may have different parameters set.
1726 * Listing Groups::              Gnus can list various subsets of the groups.
1727 * Sorting Groups::              Re-arrange the group order.
1728 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1729 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1730 * Exiting Gnus::                Stop reading news and get some work done.
1731 * Group Topics::                A folding group mode divided into topics.
1732 * Non-ASCII Group Names::       Accessing groups of non-English names.
1733 * Searching::                   Mail search engines.
1734 * Misc Group Stuff::            Other stuff that you can to do.
1735 @end menu
1736
1737
1738 @node Group Buffer Format
1739 @section Group Buffer Format
1740
1741 @menu
1742 * Group Line Specification::    Deciding how the group buffer is to look.
1743 * Group Mode Line Specification::  The group buffer mode line.
1744 * Group Highlighting::          Having nice colors in the group buffer.
1745 @end menu
1746
1747 You can customize the Group Mode tool bar, see @kbd{M-x
1748 customize-apropos RET gnus-group-tool-bar}.  This feature is only
1749 available in Emacs.
1750
1751 The tool bar icons are now (de)activated correctly depending on the
1752 cursor position.  Therefore, moving around in the Group Buffer is
1753 slower.  You can disable this via the variable
1754 @code{gnus-group-update-tool-bar}.  Its default value depends on your
1755 Emacs version.
1756
1757 @node Group Line Specification
1758 @subsection Group Line Specification
1759 @cindex group buffer format
1760
1761 The default format of the group buffer is nice and dull, but you can
1762 make it as exciting and ugly as you feel like.
1763
1764 Here's a couple of example group lines:
1765
1766 @example
1767      25: news.announce.newusers
1768  *    0: alt.fan.andrea-dworkin
1769 @end example
1770
1771 Quite simple, huh?
1772
1773 You can see that there are 25 unread articles in
1774 @samp{news.announce.newusers}.  There are no unread articles, but some
1775 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1776 asterisk at the beginning of the line?).
1777
1778 @vindex gnus-group-line-format
1779 You can change that format to whatever you want by fiddling with the
1780 @code{gnus-group-line-format} variable.  This variable works along the
1781 lines of a @code{format} specification, which is pretty much the same as
1782 a @code{printf} specifications, for those of you who use (feh!) C.
1783 @xref{Formatting Variables}.
1784
1785 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1786
1787 There should always be a colon on the line; the cursor always moves to
1788 the colon after performing an operation.  @xref{Positioning
1789 Point}.  Nothing else is required---not even the group name.  All
1790 displayed text is just window dressing, and is never examined by Gnus.
1791 Gnus stores all real information it needs using text properties.
1792
1793 (Note that if you make a really strange, wonderful, spreadsheet-like
1794 layout, everybody will believe you are hard at work with the accounting
1795 instead of wasting time reading news.)
1796
1797 Here's a list of all available format characters:
1798
1799 @table @samp
1800
1801 @item M
1802 An asterisk if the group only has marked articles.
1803
1804 @item S
1805 Whether the group is subscribed.
1806
1807 @item L
1808 Level of subscribedness.
1809
1810 @item N
1811 Number of unread articles.
1812
1813 @item I
1814 Number of dormant articles.
1815
1816 @item T
1817 Number of ticked articles.
1818
1819 @item R
1820 Number of read articles.
1821
1822 @item U
1823 Number of unseen articles.
1824
1825 @item t
1826 Estimated total number of articles.  (This is really @var{max-number}
1827 minus @var{min-number} plus 1.)
1828
1829 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1830 efficient access to @var{max-number} and @var{min-number} but getting
1831 the true unread message count is not possible efficiently.  For
1832 hysterical raisins, even the mail back ends, where the true number of
1833 unread messages might be available efficiently, use the same limited
1834 interface.  To remove this restriction from Gnus means that the back
1835 end interface has to be changed, which is not an easy job.
1836
1837 The nnml backend (@pxref{Mail Spool}) has a feature called ``group
1838 compaction'' which circumvents this deficiency: the idea is to
1839 renumber all articles from 1, removing all gaps between numbers, hence
1840 getting a correct total count.  Other backends may support this in the
1841 future.  In order to keep your total article count relatively up to
1842 date, you might want to compact your groups (or even directly your
1843 server) from time to time. @xref{Misc Group Stuff}, @xref{Server Commands}.
1844
1845 @item y
1846 Number of unread, unticked, non-dormant articles.
1847
1848 @item i
1849 Number of ticked and dormant articles.
1850
1851 @item g
1852 Full group name.
1853
1854 @item G
1855 Group name.
1856
1857 @item C
1858 Group comment (@pxref{Group Parameters}) or group name if there is no
1859 comment element in the group parameters.
1860
1861 @item D
1862 Newsgroup description.  You need to read the group descriptions
1863 before these will appear, and to do that, you either have to set
1864 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1865 command.
1866
1867 @item o
1868 @samp{m} if moderated.
1869
1870 @item O
1871 @samp{(m)} if moderated.
1872
1873 @item s
1874 Select method.
1875
1876 @item B
1877 If the summary buffer for the group is open or not.
1878
1879 @item n
1880 Select from where.
1881
1882 @item z
1883 A string that looks like @samp{<%s:%n>} if a foreign select method is
1884 used.
1885
1886 @item P
1887 Indentation based on the level of the topic (@pxref{Group Topics}).
1888
1889 @item c
1890 @vindex gnus-group-uncollapsed-levels
1891 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1892 variable says how many levels to leave at the end of the group name.
1893 The default is 1---this will mean that group names like
1894 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1895
1896 @item m
1897 @vindex gnus-new-mail-mark
1898 @cindex %
1899 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1900 the group lately.
1901
1902 @item p
1903 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1904
1905 @item d
1906 A string that says when you last read the group (@pxref{Group
1907 Timestamp}).
1908
1909 @item F
1910 The disk space used by the articles fetched by both the cache and
1911 agent.  The value is automatically scaled to bytes(B), kilobytes(K),
1912 megabytes(M), or gigabytes(G) to minimize the column width.  A format
1913 of %7F is sufficient for a fixed-width column.
1914
1915 @item u
1916 User defined specifier.  The next character in the format string should
1917 be a letter.  Gnus will call the function
1918 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1919 following @samp{%u}.  The function will be passed a single dummy
1920 parameter as argument.  The function should return a string, which will
1921 be inserted into the buffer just like information from any other
1922 specifier.
1923 @end table
1924
1925 @cindex *
1926 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1927 if no info is available---for instance, if it is a non-activated foreign
1928 group, or a bogus native group.
1929
1930
1931 @node Group Mode Line Specification
1932 @subsection Group Mode Line Specification
1933 @cindex group mode line
1934
1935 @vindex gnus-group-mode-line-format
1936 The mode line can be changed by setting
1937 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1938 doesn't understand that many format specifiers:
1939
1940 @table @samp
1941 @item S
1942 The native news server.
1943 @item M
1944 The native select method.
1945 @end table
1946
1947
1948 @node Group Highlighting
1949 @subsection Group Highlighting
1950 @cindex highlighting
1951 @cindex group highlighting
1952
1953 @vindex gnus-group-highlight
1954 Highlighting in the group buffer is controlled by the
1955 @code{gnus-group-highlight} variable.  This is an alist with elements
1956 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1957 something non-@code{nil}, the @var{face} will be used on the line.
1958
1959 Here's an example value for this variable that might look nice if the
1960 background is dark:
1961
1962 @lisp
1963 (cond (window-system
1964        (setq custom-background-mode 'light)
1965        (defface my-group-face-1
1966          '((t (:foreground "Red" :bold t))) "First group face")
1967        (defface my-group-face-2
1968          '((t (:foreground "DarkSeaGreen4" :bold t)))
1969          "Second group face")
1970        (defface my-group-face-3
1971          '((t (:foreground "Green4" :bold t))) "Third group face")
1972        (defface my-group-face-4
1973          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1974        (defface my-group-face-5
1975          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1976
1977 (setq gnus-group-highlight
1978       '(((> unread 200) . my-group-face-1)
1979         ((and (< level 3) (zerop unread)) . my-group-face-2)
1980         ((< level 3) . my-group-face-3)
1981         ((zerop unread) . my-group-face-4)
1982         (t . my-group-face-5)))
1983 @end lisp
1984
1985 Also @pxref{Faces and Fonts}.
1986
1987 Variables that are dynamically bound when the forms are evaluated
1988 include:
1989
1990 @table @code
1991 @item group
1992 The group name.
1993 @item unread
1994 The number of unread articles in the group.
1995 @item method
1996 The select method.
1997 @item mailp
1998 Whether the group is a mail group.
1999 @item level
2000 The level of the group.
2001 @item score
2002 The score of the group.
2003 @item ticked
2004 The number of ticked articles in the group.
2005 @item total
2006 The total number of articles in the group.  Or rather,
2007 @var{max-number} minus @var{min-number} plus one.
2008 @item topic
2009 When using the topic minor mode, this variable is bound to the current
2010 topic being inserted.
2011 @end table
2012
2013 When the forms are @code{eval}ed, point is at the beginning of the line
2014 of the group in question, so you can use many of the normal Gnus
2015 functions for snarfing info on the group.
2016
2017 @vindex gnus-group-update-hook
2018 @findex gnus-group-highlight-line
2019 @code{gnus-group-update-hook} is called when a group line is changed.
2020 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
2021 calls @code{gnus-group-highlight-line} by default.
2022
2023
2024 @node Group Maneuvering
2025 @section Group Maneuvering
2026 @cindex group movement
2027
2028 All movement commands understand the numeric prefix and will behave as
2029 expected, hopefully.
2030
2031 @table @kbd
2032
2033 @item n
2034 @kindex n (Group)
2035 @findex gnus-group-next-unread-group
2036 Go to the next group that has unread articles
2037 (@code{gnus-group-next-unread-group}).
2038
2039 @item p
2040 @itemx DEL
2041 @kindex DEL (Group)
2042 @kindex p (Group)
2043 @findex gnus-group-prev-unread-group
2044 Go to the previous group that has unread articles
2045 (@code{gnus-group-prev-unread-group}).
2046
2047 @item N
2048 @kindex N (Group)
2049 @findex gnus-group-next-group
2050 Go to the next group (@code{gnus-group-next-group}).
2051
2052 @item P
2053 @kindex P (Group)
2054 @findex gnus-group-prev-group
2055 Go to the previous group (@code{gnus-group-prev-group}).
2056
2057 @item M-n
2058 @kindex M-n (Group)
2059 @findex gnus-group-next-unread-group-same-level
2060 Go to the next unread group on the same (or lower) level
2061 (@code{gnus-group-next-unread-group-same-level}).
2062
2063 @item M-p
2064 @kindex M-p (Group)
2065 @findex gnus-group-prev-unread-group-same-level
2066 Go to the previous unread group on the same (or lower) level
2067 (@code{gnus-group-prev-unread-group-same-level}).
2068 @end table
2069
2070 Three commands for jumping to groups:
2071
2072 @table @kbd
2073
2074 @item j
2075 @kindex j (Group)
2076 @findex gnus-group-jump-to-group
2077 Jump to a group (and make it visible if it isn't already)
2078 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2079 like living groups.
2080
2081 @item ,
2082 @kindex , (Group)
2083 @findex gnus-group-best-unread-group
2084 Jump to the unread group with the lowest level
2085 (@code{gnus-group-best-unread-group}).
2086
2087 @item .
2088 @kindex . (Group)
2089 @findex gnus-group-first-unread-group
2090 Jump to the first group with unread articles
2091 (@code{gnus-group-first-unread-group}).
2092 @end table
2093
2094 @vindex gnus-group-goto-unread
2095 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2096 commands will move to the next group, not the next unread group.  Even
2097 the commands that say they move to the next unread group.  The default
2098 is @code{t}.
2099
2100 @vindex gnus-summary-next-group-on-exit
2101 If @code{gnus-summary-next-group-on-exit} is @code{t}, when a summary is
2102 exited, the point in the group buffer is moved to the next unread group.
2103 Otherwise, the point is set to the group just exited.  The default is
2104 @code{t}.
2105
2106 @node Selecting a Group
2107 @section Selecting a Group
2108 @cindex group selection
2109
2110 @table @kbd
2111
2112 @item SPACE
2113 @kindex SPACE (Group)
2114 @findex gnus-group-read-group
2115 Select the current group, switch to the summary buffer and display the
2116 first unread article (@code{gnus-group-read-group}).  If there are no
2117 unread articles in the group, or if you give a non-numerical prefix to
2118 this command, Gnus will offer to fetch all the old articles in this
2119 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2120 determines the number of articles Gnus will fetch.  If @var{n} is
2121 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2122 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2123
2124 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2125 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2126 - 4 2 SPC} fetches the 42 oldest ones.
2127
2128 When you are in the group (in the Summary buffer), you can type
2129 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2130 ones.
2131
2132 @item RET
2133 @kindex RET (Group)
2134 @findex gnus-group-select-group
2135 Select the current group and switch to the summary buffer
2136 (@code{gnus-group-select-group}).  Takes the same arguments as
2137 @code{gnus-group-read-group}---the only difference is that this command
2138 does not display the first unread article automatically upon group
2139 entry.
2140
2141 @item M-RET
2142 @kindex M-RET (Group)
2143 @findex gnus-group-quick-select-group
2144 This does the same as the command above, but tries to do it with the
2145 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2146 scoring/killing will be performed, there will be no highlights and no
2147 expunging.  This might be useful if you're in a real hurry and have to
2148 enter some humongous group.  If you give a 0 prefix to this command
2149 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2150 which is useful if you want to toggle threading before generating the
2151 summary buffer (@pxref{Summary Generation Commands}).
2152
2153 @item M-SPACE
2154 @kindex M-SPACE (Group)
2155 @findex gnus-group-visible-select-group
2156 This is yet one more command that does the same as the @kbd{RET}
2157 command, but this one does it without expunging and hiding dormants
2158 (@code{gnus-group-visible-select-group}).
2159
2160 @item C-M-RET
2161 @kindex C-M-RET (Group)
2162 @findex gnus-group-select-group-ephemerally
2163 Finally, this command selects the current group ephemerally without
2164 doing any processing of its contents
2165 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2166 turned off.  Everything you do in the group after selecting it in this
2167 manner will have no permanent effects.
2168
2169 @end table
2170
2171 @vindex gnus-large-newsgroup
2172 The @code{gnus-large-newsgroup} variable says what Gnus should
2173 consider to be a big group.  If it is @code{nil}, no groups are
2174 considered big.  The default value is 200.  If the group has more
2175 (unread and/or ticked) articles than this, Gnus will query the user
2176 before entering the group.  The user can then specify how many
2177 articles should be fetched from the server.  If the user specifies a
2178 negative number (@var{-n}), the @var{n} oldest articles will be
2179 fetched.  If it is positive, the @var{n} articles that have arrived
2180 most recently will be fetched.
2181
2182 @vindex gnus-large-ephemeral-newsgroup
2183 @code{gnus-large-ephemeral-newsgroup} is the same as
2184 @code{gnus-large-newsgroup}, but is only used for ephemeral
2185 newsgroups.
2186
2187 @vindex gnus-newsgroup-maximum-articles
2188 In groups in some news servers, there might be a big gap between a few
2189 very old articles that will never be expired and the recent ones.  In
2190 such a case, the server will return the data like @code{(1 . 30000000)}
2191 for the @code{LIST ACTIVE group} command, for example.  Even if there
2192 are actually only the articles 1-10 and 29999900-30000000, Gnus doesn't
2193 know it at first and prepares for getting 30000000 articles.  However,
2194 it will consume hundreds megabytes of memories and might make Emacs get
2195 stuck as the case may be.  If you use such news servers, set the
2196 variable @code{gnus-newsgroup-maximum-articles} to a positive number.
2197 The value means that Gnus ignores articles other than this number of the
2198 latest ones in every group.  For instance, the value 10000 makes Gnus
2199 get only the articles 29990001-30000000 (if the latest article number is
2200 30000000 in a group).  Note that setting this variable to a number might
2201 prevent you from reading very old articles.  The default value of the
2202 variable @code{gnus-newsgroup-maximum-articles} is @code{nil}, which
2203 means Gnus never ignores old articles.
2204
2205 @vindex gnus-select-group-hook
2206 @vindex gnus-auto-select-first
2207 @vindex gnus-auto-select-subject
2208 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2209 automatically when entering a group with the @kbd{SPACE} command.
2210 Which article this is is controlled by the
2211 @code{gnus-auto-select-subject} variable.  Valid values for this
2212 variable are:
2213
2214 @table @code
2215
2216 @item unread
2217 Place point on the subject line of the first unread article.
2218
2219 @item first
2220 Place point on the subject line of the first article.
2221
2222 @item unseen
2223 Place point on the subject line of the first unseen article.
2224
2225 @item unseen-or-unread
2226 Place point on the subject line of the first unseen article, and if
2227 there is no such article, place point on the subject line of the first
2228 unread article.
2229
2230 @item best
2231 Place point on the subject line of the highest-scored unread article.
2232
2233 @end table
2234
2235 This variable can also be a function.  In that case, that function
2236 will be called to place point on a subject line.
2237
2238 If you want to prevent automatic selection in some group (say, in a
2239 binary group with Huge articles) you can set the
2240 @code{gnus-auto-select-first} variable to @code{nil} in
2241 @code{gnus-select-group-hook}, which is called when a group is
2242 selected.
2243
2244
2245 @node Subscription Commands
2246 @section Subscription Commands
2247 @cindex subscription
2248
2249 @table @kbd
2250
2251 @item S t
2252 @itemx u
2253 @kindex S t (Group)
2254 @kindex u (Group)
2255 @findex gnus-group-unsubscribe-current-group
2256 @c @icon{gnus-group-unsubscribe}
2257 Toggle subscription to the current group
2258 (@code{gnus-group-unsubscribe-current-group}).
2259
2260 @item S s
2261 @itemx U
2262 @kindex S s (Group)
2263 @kindex U (Group)
2264 @findex gnus-group-unsubscribe-group
2265 Prompt for a group to subscribe, and then subscribe it.  If it was
2266 subscribed already, unsubscribe it instead
2267 (@code{gnus-group-unsubscribe-group}).
2268
2269 @item S k
2270 @itemx C-k
2271 @kindex S k (Group)
2272 @kindex C-k (Group)
2273 @findex gnus-group-kill-group
2274 @c @icon{gnus-group-kill-group}
2275 Kill the current group (@code{gnus-group-kill-group}).
2276
2277 @item S y
2278 @itemx C-y
2279 @kindex S y (Group)
2280 @kindex C-y (Group)
2281 @findex gnus-group-yank-group
2282 Yank the last killed group (@code{gnus-group-yank-group}).
2283
2284 @item C-x C-t
2285 @kindex C-x C-t (Group)
2286 @findex gnus-group-transpose-groups
2287 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2288 really a subscription command, but you can use it instead of a
2289 kill-and-yank sequence sometimes.
2290
2291 @item S w
2292 @itemx C-w
2293 @kindex S w (Group)
2294 @kindex C-w (Group)
2295 @findex gnus-group-kill-region
2296 Kill all groups in the region (@code{gnus-group-kill-region}).
2297
2298 @item S z
2299 @kindex S z (Group)
2300 @findex gnus-group-kill-all-zombies
2301 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2302
2303 @item S C-k
2304 @kindex S C-k (Group)
2305 @findex gnus-group-kill-level
2306 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2307 These groups can't be yanked back after killing, so this command should
2308 be used with some caution.  The only time where this command comes in
2309 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2310 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2311 kill off all unsubscribed groups that do not have message numbers in the
2312 @file{.newsrc} file.
2313
2314 @end table
2315
2316 Also @pxref{Group Levels}.
2317
2318
2319 @node Group Data
2320 @section Group Data
2321
2322 @table @kbd
2323
2324 @item c
2325 @kindex c (Group)
2326 @findex gnus-group-catchup-current
2327 @vindex gnus-group-catchup-group-hook
2328 @c @icon{gnus-group-catchup-current}
2329 Mark all unticked articles in this group as read
2330 (@code{gnus-group-catchup-current}).
2331 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2332 the group buffer.
2333
2334 @item C
2335 @kindex C (Group)
2336 @findex gnus-group-catchup-current-all
2337 Mark all articles in this group, even the ticked ones, as read
2338 (@code{gnus-group-catchup-current-all}).
2339
2340 @item M-c
2341 @kindex M-c (Group)
2342 @findex gnus-group-clear-data
2343 Clear the data from the current group---nix out marks and the list of
2344 read articles (@code{gnus-group-clear-data}).
2345
2346 @item M-x gnus-group-clear-data-on-native-groups
2347 @kindex M-x gnus-group-clear-data-on-native-groups
2348 @findex gnus-group-clear-data-on-native-groups
2349 If you have switched from one @acronym{NNTP} server to another, all your marks
2350 and read ranges have become worthless.  You can use this command to
2351 clear out all data that you have on your native groups.  Use with
2352 caution.
2353
2354 @end table
2355
2356
2357 @node Group Levels
2358 @section Group Levels
2359 @cindex group level
2360 @cindex level
2361
2362 All groups have a level of @dfn{subscribedness}.  For instance, if a
2363 group is on level 2, it is more subscribed than a group on level 5.  You
2364 can ask Gnus to just list groups on a given level or lower
2365 (@pxref{Listing Groups}), or to just check for new articles in groups on
2366 a given level or lower (@pxref{Scanning New Messages}).
2367
2368 Remember:  The higher the level of the group, the less important it is.
2369
2370 @table @kbd
2371
2372 @item S l
2373 @kindex S l (Group)
2374 @findex gnus-group-set-current-level
2375 Set the level of the current group.  If a numeric prefix is given, the
2376 next @var{n} groups will have their levels set.  The user will be
2377 prompted for a level.
2378 @end table
2379
2380 @vindex gnus-level-killed
2381 @vindex gnus-level-zombie
2382 @vindex gnus-level-unsubscribed
2383 @vindex gnus-level-subscribed
2384 Gnus considers groups from levels 1 to
2385 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2386 @code{gnus-level-subscribed} (exclusive) and
2387 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2388 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2389 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2390 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2391 same, but zombie and killed groups have no information on what articles
2392 you have read, etc, stored.  This distinction between dead and living
2393 groups isn't done because it is nice or clever, it is done purely for
2394 reasons of efficiency.
2395
2396 It is recommended that you keep all your mail groups (if any) on quite
2397 low levels (e.g. 1 or 2).
2398
2399 Maybe the following description of the default behavior of Gnus helps to
2400 understand what these levels are all about.  By default, Gnus shows you
2401 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2402 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2403 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2404 groups are hidden, in a way.
2405
2406 Zombie and killed groups are similar to unsubscribed groups in that they
2407 are hidden by default.  But they are different from subscribed and
2408 unsubscribed groups in that Gnus doesn't ask the news server for
2409 information (number of messages, number of unread messages) on zombie
2410 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2411 aren't interested in.  If most groups are killed, Gnus is faster.
2412
2413 Why does Gnus distinguish between zombie and killed groups?  Well, when
2414 a new group arrives on the server, Gnus by default makes it a zombie
2415 group.  This means that you are normally not bothered with new groups,
2416 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2417 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2418 list of killed groups.)
2419
2420 If you want to play with the level variables, you should show some care.
2421 Set them once, and don't touch them ever again.  Better yet, don't touch
2422 them at all unless you know exactly what you're doing.
2423
2424 @vindex gnus-level-default-unsubscribed
2425 @vindex gnus-level-default-subscribed
2426 Two closely related variables are @code{gnus-level-default-subscribed}
2427 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2428 which are the levels that new groups will be put on if they are
2429 (un)subscribed.  These two variables should, of course, be inside the
2430 relevant valid ranges.
2431
2432 @vindex gnus-keep-same-level
2433 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2434 will only move to groups of the same level (or lower).  In
2435 particular, going from the last article in one group to the next group
2436 will go to the next group of the same level (or lower).  This might be
2437 handy if you want to read the most important groups before you read the
2438 rest.
2439
2440 If this variable is @code{best}, Gnus will make the next newsgroup the
2441 one with the best level.
2442
2443 @vindex gnus-group-default-list-level
2444 All groups with a level less than or equal to
2445 @code{gnus-group-default-list-level} will be listed in the group buffer
2446 by default.
2447
2448 @vindex gnus-group-list-inactive-groups
2449 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2450 groups will be listed along with the unread groups.  This variable is
2451 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2452 listed.
2453
2454 @vindex gnus-group-use-permanent-levels
2455 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2456 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2457 use this level as the ``work'' level.
2458
2459 @vindex gnus-activate-level
2460 Gnus will normally just activate (i. e., query the server about) groups
2461 on level @code{gnus-activate-level} or less.  If you don't want to
2462 activate unsubscribed groups, for instance, you might set this variable
2463 to 5.  The default is 6.
2464
2465
2466 @node Group Score
2467 @section Group Score
2468 @cindex group score
2469 @cindex group rank
2470 @cindex rank
2471
2472 You would normally keep important groups on high levels, but that scheme
2473 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2474 group buffer according to how often you read groups, perhaps?  Within
2475 reason?
2476
2477 This is what @dfn{group score} is for.  You can have Gnus assign a score
2478 to each group through the mechanism described below.  You can then sort
2479 the group buffer based on this score.  Alternatively, you can sort on
2480 score and then level.  (Taken together, the level and the score is
2481 called the @dfn{rank} of the group.  A group that is on level 4 and has
2482 a score of 1 has a higher rank than a group on level 5 that has a score
2483 of 300.  (The level is the most significant part and the score is the
2484 least significant part.))
2485
2486 @findex gnus-summary-bubble-group
2487 If you want groups you read often to get higher scores than groups you
2488 read seldom you can add the @code{gnus-summary-bubble-group} function to
2489 the @code{gnus-summary-exit-hook} hook.  This will result (after
2490 sorting) in a bubbling sort of action.  If you want to see that in
2491 action after each summary exit, you can add
2492 @code{gnus-group-sort-groups-by-rank} or
2493 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2494 slow things down somewhat.
2495
2496
2497 @node Marking Groups
2498 @section Marking Groups
2499 @cindex marking groups
2500
2501 If you want to perform some command on several groups, and they appear
2502 subsequently in the group buffer, you would normally just give a
2503 numerical prefix to the command.  Most group commands will then do your
2504 bidding on those groups.
2505
2506 However, if the groups are not in sequential order, you can still
2507 perform a command on several groups.  You simply mark the groups first
2508 with the process mark and then execute the command.
2509
2510 @table @kbd
2511
2512 @item #
2513 @kindex # (Group)
2514 @itemx M m
2515 @kindex M m (Group)
2516 @findex gnus-group-mark-group
2517 Set the mark on the current group (@code{gnus-group-mark-group}).
2518
2519 @item M-#
2520 @kindex M-# (Group)
2521 @itemx M u
2522 @kindex M u (Group)
2523 @findex gnus-group-unmark-group
2524 Remove the mark from the current group
2525 (@code{gnus-group-unmark-group}).
2526
2527 @item M U
2528 @kindex M U (Group)
2529 @findex gnus-group-unmark-all-groups
2530 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2531
2532 @item M w
2533 @kindex M w (Group)
2534 @findex gnus-group-mark-region
2535 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2536
2537 @item M b
2538 @kindex M b (Group)
2539 @findex gnus-group-mark-buffer
2540 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2541
2542 @item M r
2543 @kindex M r (Group)
2544 @findex gnus-group-mark-regexp
2545 Mark all groups that match some regular expression
2546 (@code{gnus-group-mark-regexp}).
2547 @end table
2548
2549 Also @pxref{Process/Prefix}.
2550
2551 @findex gnus-group-universal-argument
2552 If you want to execute some command on all groups that have been marked
2553 with the process mark, you can use the @kbd{M-&}
2554 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2555 the command to be executed.
2556
2557
2558 @node Foreign Groups
2559 @section Foreign Groups
2560 @cindex foreign groups
2561
2562 Below are some group mode commands for making and editing general foreign
2563 groups, as well as commands to ease the creation of a few
2564 special-purpose groups.  All these commands insert the newly created
2565 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2566 consulted.
2567
2568 Changes from the group editing commands are stored in
2569 @file{~/.newsrc.eld} (@code{gnus-startup-file}).  An alternative is the
2570 variable @code{gnus-parameters}, @xref{Group Parameters}.
2571
2572 @table @kbd
2573
2574 @item G m
2575 @kindex G m (Group)
2576 @findex gnus-group-make-group
2577 @cindex making groups
2578 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2579 for a name, a method and possibly an @dfn{address}.  For an easier way
2580 to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}).
2581
2582 @item G M
2583 @kindex G M (Group)
2584 @findex gnus-group-read-ephemeral-group
2585 Make an ephemeral group (@code{gnus-group-read-ephemeral-group}).  Gnus
2586 will prompt you for a name, a method and an @dfn{address}.
2587
2588 @item G r
2589 @kindex G r (Group)
2590 @findex gnus-group-rename-group
2591 @cindex renaming groups
2592 Rename the current group to something else
2593 (@code{gnus-group-rename-group}).  This is valid only on some
2594 groups---mail groups mostly.  This command might very well be quite slow
2595 on some back ends.
2596
2597 @item G c
2598 @kindex G c (Group)
2599 @cindex customizing
2600 @findex gnus-group-customize
2601 Customize the group parameters (@code{gnus-group-customize}).
2602
2603 @item G e
2604 @kindex G e (Group)
2605 @findex gnus-group-edit-group-method
2606 @cindex renaming groups
2607 Enter a buffer where you can edit the select method of the current
2608 group (@code{gnus-group-edit-group-method}).
2609
2610 @item G p
2611 @kindex G p (Group)
2612 @findex gnus-group-edit-group-parameters
2613 Enter a buffer where you can edit the group parameters
2614 (@code{gnus-group-edit-group-parameters}).
2615
2616 @item G E
2617 @kindex G E (Group)
2618 @findex gnus-group-edit-group
2619 Enter a buffer where you can edit the group info
2620 (@code{gnus-group-edit-group}).
2621
2622 @item G d
2623 @kindex G d (Group)
2624 @findex gnus-group-make-directory-group
2625 @cindex nndir
2626 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2627 for a directory name (@code{gnus-group-make-directory-group}).
2628
2629 @item G h
2630 @kindex G h (Group)
2631 @cindex help group
2632 @findex gnus-group-make-help-group
2633 Make the Gnus help group (@code{gnus-group-make-help-group}).
2634
2635 @item G a
2636 @kindex G a (Group)
2637 @cindex (ding) archive
2638 @cindex archive group
2639 @findex gnus-group-make-archive-group
2640 @vindex gnus-group-archive-directory
2641 @vindex gnus-group-recent-archive-directory
2642 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
2643 default a group pointing to the most recent articles will be created
2644 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2645 group will be created from @code{gnus-group-archive-directory}.
2646
2647 @item G k
2648 @kindex G k (Group)
2649 @findex gnus-group-make-kiboze-group
2650 @cindex nnkiboze
2651 Make a kiboze group.  You will be prompted for a name, for a regexp to
2652 match groups to be ``included'' in the kiboze group, and a series of
2653 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2654 @xref{Kibozed Groups}.
2655
2656 @item G D
2657 @kindex G D (Group)
2658 @findex gnus-group-enter-directory
2659 @cindex nneething
2660 Read an arbitrary directory as if it were a newsgroup with the
2661 @code{nneething} back end (@code{gnus-group-enter-directory}).
2662 @xref{Anything Groups}.
2663
2664 @item G f
2665 @kindex G f (Group)
2666 @findex gnus-group-make-doc-group
2667 @cindex ClariNet Briefs
2668 @cindex nndoc
2669 Make a group based on some file or other
2670 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2671 command, you will be prompted for a file name and a file type.
2672 Currently supported types are @code{mbox}, @code{babyl},
2673 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2674 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2675 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2676 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2677 you run this command without a prefix, Gnus will guess at the file
2678 type.  @xref{Document Groups}.
2679
2680 @item G u
2681 @kindex G u (Group)
2682 @vindex gnus-useful-groups
2683 @findex gnus-group-make-useful-group
2684 Create one of the groups mentioned in @code{gnus-useful-groups}
2685 (@code{gnus-group-make-useful-group}).
2686
2687 @item G w
2688 @kindex G w (Group)
2689 @findex gnus-group-make-web-group
2690 @cindex Google
2691 @cindex nnweb
2692 @cindex gmane
2693 Make an ephemeral group based on a web search
2694 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2695 command, make a solid group instead.  You will be prompted for the
2696 search engine type and the search string.  Valid search engine types
2697 include @code{google}, @code{dejanews}, and @code{gmane}.
2698 @xref{Web Searches}.
2699
2700 If you use the @code{google} search engine, you can limit the search
2701 to a particular group by using a match string like
2702 @samp{shaving group:alt.sysadmin.recovery}.
2703
2704 @item G R
2705 @kindex G R (Group)
2706 @findex gnus-group-make-rss-group
2707 Make a group based on an @acronym{RSS} feed
2708 (@code{gnus-group-make-rss-group}).  You will be prompted for an URL.
2709 @xref{RSS}.
2710
2711 @item G DEL
2712 @kindex G DEL (Group)
2713 @findex gnus-group-delete-group
2714 This function will delete the current group
2715 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2716 actually delete all the articles in the group, and forcibly remove the
2717 group itself from the face of the Earth.  Use a prefix only if you are
2718 absolutely sure of what you are doing.  This command can't be used on
2719 read-only groups (like @code{nntp} groups), though.
2720
2721 @item G V
2722 @kindex G V (Group)
2723 @findex gnus-group-make-empty-virtual
2724 Make a new, fresh, empty @code{nnvirtual} group
2725 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2726
2727 @item G v
2728 @kindex G v (Group)
2729 @findex gnus-group-add-to-virtual
2730 Add the current group to an @code{nnvirtual} group
2731 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2732 @end table
2733
2734 @xref{Select Methods}, for more information on the various select
2735 methods.
2736
2737 @vindex gnus-activate-foreign-newsgroups
2738 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2739 Gnus will check all foreign groups with this level or lower at startup.
2740 This might take quite a while, especially if you subscribe to lots of
2741 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2742 @code{gnus-activate-level} also affects activation of foreign
2743 newsgroups.
2744
2745
2746 The following commands create ephemeral groups.  They can be called not
2747 only from the Group buffer, but in any Gnus buffer.
2748
2749 @table @code
2750 @item gnus-read-ephemeral-gmane-group
2751 @findex gnus-read-ephemeral-gmane-group
2752 @vindex gnus-gmane-group-download-format
2753 Read an ephemeral group on Gmane.org.  The articles are downloaded via
2754 HTTP using the URL specified by @code{gnus-gmane-group-download-format}.
2755 Gnus will prompt you for a group name, the start article number and an
2756 the article range.
2757
2758 @item gnus-read-ephemeral-gmane-group-url
2759 @findex gnus-read-ephemeral-gmane-group-url
2760 This command is similar to @code{gnus-read-ephemeral-gmane-group}, but
2761 the group name and the article number and range are constructed from a
2762 given @acronym{URL}.  Supported @acronym{URL} formats include e.g.
2763 @url{http://thread.gmane.org/gmane.foo.bar/12300/focus=12399},
2764 @url{http://thread.gmane.org/gmane.foo.bar/12345/},
2765 @url{http://article.gmane.org/gmane.foo.bar/12345/},
2766 @url{http://permalink.gmane.org/gmane.foo.bar/12345/}, and
2767 @url{http://news.gmane.org/group/gmane.foo.bar/thread=12345}.
2768
2769 @item gnus-read-ephemeral-emacs-bug-group
2770 @findex gnus-read-ephemeral-emacs-bug-group
2771 Read an Emacs bug report in an ephemeral group.  Gnus will prompt for a
2772 bug number.  The default is the number at point.  The @acronym{URL} is
2773 specified in @code{gnus-bug-group-download-format-alist}.
2774
2775 @item gnus-read-ephemeral-debian-bug-group
2776 @findex gnus-read-ephemeral-debian-bug-group
2777 Read a Debian bug report in an ephemeral group.  Analog to
2778 @code{gnus-read-ephemeral-emacs-bug-group}.
2779 @end table
2780
2781 Some of these command are also useful for article buttons, @xref{Article
2782 Buttons}.
2783
2784 Here is an example:
2785 @lisp
2786 (require 'gnus-art)
2787 (add-to-list
2788  'gnus-button-alist
2789  '("#\\([0-9]+\\)\\>" 1
2790    (string-match "\\<emacs\\>" (or gnus-newsgroup-name ""))
2791    gnus-read-ephemeral-emacs-bug-group 1))
2792 @end lisp
2793
2794
2795 @node Group Parameters
2796 @section Group Parameters
2797 @cindex group parameters
2798
2799 The group parameters store information local to a particular group.
2800
2801 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2802 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2803 presents you with a Customize-like interface.  The latter helps avoid
2804 silly Lisp errors.)  You might also be interested in reading about topic
2805 parameters (@pxref{Topic Parameters}).
2806 Additionally, you can set group parameters via the
2807 @code{gnus-parameters} variable, see below.
2808
2809 Here's an example group parameter list:
2810
2811 @example
2812 ((to-address . "ding@@gnus.org")
2813  (auto-expire . t))
2814 @end example
2815
2816 We see that each element consists of a ``dotted pair''---the thing before
2817 the dot is the key, while the thing after the dot is the value.  All the
2818 parameters have this form @emph{except} local variable specs, which are
2819 not dotted pairs, but proper lists.
2820
2821 Some parameters have correspondent customizable variables, each of which
2822 is an alist of regexps and values.
2823
2824 The following group parameters can be used:
2825
2826 @table @code
2827 @item to-address
2828 @cindex to-address
2829 Address used by when doing followups and new posts.
2830
2831 @example
2832 (to-address . "some@@where.com")
2833 @end example
2834
2835 This is primarily useful in mail groups that represent closed mailing
2836 lists---mailing lists where it's expected that everybody that writes to
2837 the mailing list is subscribed to it.  Since using this parameter
2838 ensures that the mail only goes to the mailing list itself, it means
2839 that members won't receive two copies of your followups.
2840
2841 Using @code{to-address} will actually work whether the group is foreign
2842 or not.  Let's say there's a group on the server that is called
2843 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2844 the articles from a mail-to-news gateway.  Posting directly to this
2845 group is therefore impossible---you have to send mail to the mailing
2846 list address instead.
2847
2848 See also @code{gnus-parameter-to-address-alist}.
2849
2850 @item to-list
2851 @cindex to-list
2852 Address used when doing @kbd{a} in that group.
2853
2854 @example
2855 (to-list . "some@@where.com")
2856 @end example
2857
2858 It is totally ignored
2859 when doing a followup---except that if it is present in a news group,
2860 you'll get mail group semantics when doing @kbd{f}.
2861
2862 If you do an @kbd{a} command in a mail group and you have neither a
2863 @code{to-list} group parameter nor a @code{to-address} group parameter,
2864 then a @code{to-list} group parameter will be added automatically upon
2865 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2866 @vindex gnus-add-to-list
2867
2868 @findex gnus-mailing-list-mode
2869 @cindex mail list groups
2870 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2871 entering summary buffer.
2872
2873 See also @code{gnus-parameter-to-list-alist}.
2874
2875 @anchor{subscribed}
2876 @item subscribed
2877 @cindex subscribed
2878 @cindex Mail-Followup-To
2879 @findex gnus-find-subscribed-addresses
2880 If this parameter is set to @code{t}, Gnus will consider the
2881 to-address and to-list parameters for this group as addresses of
2882 mailing lists you are subscribed to.  Giving Gnus this information is
2883 (only) a first step in getting it to generate correct Mail-Followup-To
2884 headers for your posts to these lists.  The second step is to put the
2885 following in your @file{.gnus.el}
2886
2887 @lisp
2888 (setq message-subscribed-address-functions
2889       '(gnus-find-subscribed-addresses))
2890 @end lisp
2891
2892 @xref{Mailing Lists, ,Mailing Lists, message, The Message Manual}, for
2893 a complete treatment of available MFT support.
2894
2895 @item visible
2896 @cindex visible
2897 If the group parameter list has the element @code{(visible . t)},
2898 that group will always be visible in the Group buffer, regardless
2899 of whether it has any unread articles.
2900
2901 This parameter cannot be set via @code{gnus-parameters}. See
2902 @code{gnus-permanently-visible-groups} as an alternative.
2903
2904 @item broken-reply-to
2905 @cindex broken-reply-to
2906 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2907 headers in this group are to be ignored, and for the header to be hidden
2908 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2909 can be useful if you're reading a mailing list group where the listserv
2910 has inserted @code{Reply-To} headers that point back to the listserv
2911 itself.  That is broken behavior.  So there!
2912
2913 @item to-group
2914 @cindex to-group
2915 Elements like @code{(to-group . "some.group.name")} means that all
2916 posts in that group will be sent to @code{some.group.name}.
2917
2918 @item newsgroup
2919 @cindex newsgroup
2920 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2921 will treat all responses as if they were responses to news articles.
2922 This can be useful if you have a mail group that's really a mirror of a
2923 news group.
2924
2925 @item gcc-self
2926 @cindex gcc-self
2927 If @code{(gcc-self . t)} is present in the group parameter list, newly
2928 composed messages will be @code{Gcc}'d to the current group.  If
2929 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2930 generated, if @code{(gcc-self . "string")} is present, this string will
2931 be inserted literally as a @code{gcc} header.  This parameter takes
2932 precedence over any default @code{Gcc} rules as described later
2933 (@pxref{Archived Messages}).
2934
2935 @strong{Caveat}: Adding @code{(gcc-self . t)} to the parameter list of
2936 @code{nntp} groups (or the like) isn't valid.  An @code{nntp} server
2937 doesn't accept articles.
2938
2939 @item auto-expire
2940 @cindex auto-expire
2941 @cindex expiring mail
2942 If the group parameter has an element that looks like @code{(auto-expire
2943 . t)}, all articles read will be marked as expirable.  For an
2944 alternative approach, @pxref{Expiring Mail}.
2945
2946 See also @code{gnus-auto-expirable-newsgroups}.
2947
2948 @item total-expire
2949 @cindex total-expire
2950 @cindex expiring mail
2951 If the group parameter has an element that looks like
2952 @code{(total-expire . t)}, all read articles will be put through the
2953 expiry process, even if they are not marked as expirable.  Use with
2954 caution.  Unread, ticked and dormant articles are not eligible for
2955 expiry.
2956
2957 See also @code{gnus-total-expirable-newsgroups}.
2958
2959 @item expiry-wait
2960 @cindex expiry-wait
2961 @vindex nnmail-expiry-wait-function
2962 If the group parameter has an element that looks like
2963 @code{(expiry-wait . 10)}, this value will override any
2964 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2965 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2966 can either be a number of days (not necessarily an integer) or the
2967 symbols @code{never} or @code{immediate}.
2968
2969 @item expiry-target
2970 @cindex expiry-target
2971 Where expired messages end up.  This parameter overrides
2972 @code{nnmail-expiry-target}.
2973
2974 @item score-file
2975 @cindex score file group parameter
2976 Elements that look like @code{(score-file . "file")} will make
2977 @file{file} into the current score file for the group in question.  All
2978 interactive score entries will be put into this file.
2979
2980 @item adapt-file
2981 @cindex adapt file group parameter
2982 Elements that look like @code{(adapt-file . "file")} will make
2983 @file{file} into the current adaptive file for the group in question.
2984 All adaptive score entries will be put into this file.
2985
2986 @item admin-address
2987 @cindex admin-address
2988 When unsubscribing from a mailing list you should never send the
2989 unsubscription notice to the mailing list itself.  Instead, you'd send
2990 messages to the administrative address.  This parameter allows you to
2991 put the admin address somewhere convenient.
2992
2993 @item display
2994 @cindex display
2995 Elements that look like @code{(display . MODE)} say which articles to
2996 display on entering the group.  Valid values are:
2997
2998 @table @code
2999 @item all
3000 Display all articles, both read and unread.
3001
3002 @item an integer
3003 Display the last @var{integer} articles in the group.  This is the same as
3004 entering the group with @kbd{C-u @var{integer}}.
3005
3006 @item default
3007 Display the default visible articles, which normally includes unread and
3008 ticked articles.
3009
3010 @item an array
3011 Display articles that satisfy a predicate.
3012
3013 Here are some examples:
3014
3015 @table @code
3016 @item [unread]
3017 Display only unread articles.
3018
3019 @item [not expire]
3020 Display everything except expirable articles.
3021
3022 @item [and (not reply) (not expire)]
3023 Display everything except expirable and articles you've already
3024 responded to.
3025 @end table
3026
3027 The available operators are @code{not}, @code{and} and @code{or}.
3028 Predicates include @code{tick}, @code{unsend}, @code{undownload},
3029 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
3030 @code{killed}, @code{bookmark}, @code{score}, @code{save},
3031 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
3032
3033 @end table
3034
3035 The @code{display} parameter works by limiting the summary buffer to
3036 the subset specified.  You can pop the limit by using the @kbd{/ w}
3037 command (@pxref{Limiting}).
3038
3039 @item comment
3040 @cindex comment
3041 Elements that look like @code{(comment . "This is a comment")} are
3042 arbitrary comments on the group.  You can display comments in the
3043 group line (@pxref{Group Line Specification}).
3044
3045 @item charset
3046 @cindex charset
3047 Elements that look like @code{(charset . iso-8859-1)} will make
3048 @code{iso-8859-1} the default charset; that is, the charset that will be
3049 used for all articles that do not specify a charset.
3050
3051 See also @code{gnus-group-charset-alist}.
3052
3053 @item ignored-charsets
3054 @cindex ignored-charset
3055 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
3056 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
3057 default charset will be used for decoding articles.
3058
3059 See also @code{gnus-group-ignored-charsets-alist}.
3060
3061 @item posting-style
3062 @cindex posting-style
3063 You can store additional posting style information for this group
3064 here (@pxref{Posting Styles}).  The format is that of an entry in the
3065 @code{gnus-posting-styles} alist, except that there's no regexp matching
3066 the group name (of course).  Style elements in this group parameter will
3067 take precedence over the ones found in @code{gnus-posting-styles}.
3068
3069 For instance, if you want a funky name and signature in this group only,
3070 instead of hacking @code{gnus-posting-styles}, you could put something
3071 like this in the group parameters:
3072
3073 @example
3074 (posting-style
3075   (name "Funky Name")
3076   ("X-My-Header" "Funky Value")
3077   (signature "Funky Signature"))
3078 @end example
3079
3080 If you're using topics to organize your group buffer
3081 (@pxref{Group Topics}), note that posting styles can also be set in
3082 the topics parameters. Posting styles in topic parameters apply to all
3083 groups in this topic. More precisely, the posting-style settings for a
3084 group result from the hierarchical merging of all posting-style
3085 entries in the parameters of this group and all the topics it belongs
3086 to.
3087
3088
3089 @item post-method
3090 @cindex post-method
3091 If it is set, the value is used as the method for posting message
3092 instead of @code{gnus-post-method}.
3093
3094 @item mail-source
3095 @cindex mail-source
3096 If it is set, and the setting of @code{mail-sources} includes a
3097 @code{group} mail source (@pxref{Mail Sources}), the value is a
3098 mail source for this group.
3099
3100 @item banner
3101 @cindex banner
3102 An item like @code{(banner . @var{regexp})} causes any part of an article
3103 that matches the regular expression @var{regexp} to be stripped.  Instead of
3104 @var{regexp}, you can also use the symbol @code{signature} which strips the
3105 last signature or any of the elements of the alist
3106 @code{gnus-article-banner-alist}.
3107
3108 @item sieve
3109 @cindex sieve
3110 This parameter contains a Sieve test that should match incoming mail
3111 that should be placed in this group.  From this group parameter, a
3112 Sieve @samp{IF} control structure is generated, having the test as the
3113 condition and @samp{fileinto "group.name";} as the body.
3114
3115 For example, if the @samp{INBOX.list.sieve} group has the @code{(sieve
3116 address "sender" "sieve-admin@@extundo.com")} group parameter, when
3117 translating the group parameter into a Sieve script (@pxref{Sieve
3118 Commands}) the following Sieve code is generated:
3119
3120 @example
3121 if address "sender" "sieve-admin@@extundo.com" @{
3122         fileinto "INBOX.list.sieve";
3123 @}
3124 @end example
3125
3126 To generate tests for multiple email-addresses use a group parameter
3127 like @code{(sieve address "sender" ("name@@one.org" else@@two.org"))}.
3128 When generating a sieve script (@pxref{Sieve Commands}) Sieve code
3129 like the following is generated:
3130
3131 @example
3132 if address "sender" ["name@@one.org", "else@@two.org"] @{
3133         fileinto "INBOX.list.sieve";
3134 @}
3135 @end example
3136
3137 See @pxref{Sieve Commands} for commands and variables that might be of
3138 interest in relation to the sieve parameter.
3139
3140 The Sieve language is described in RFC 3028.  @xref{Top, Emacs Sieve,
3141 Top, sieve, Emacs Sieve}.
3142
3143 @item (agent parameters)
3144 If the agent has been enabled, you can set any of the its parameters
3145 to control the behavior of the agent in individual groups. See Agent
3146 Parameters in @ref{Category Syntax}.  Most users will choose to set
3147 agent parameters in either an agent category or group topic to
3148 minimize the configuration effort.
3149
3150 @item (@var{variable} @var{form})
3151 You can use the group parameters to set variables local to the group you
3152 are entering.  If you want to turn threading off in @samp{news.answers},
3153 you could put @code{(gnus-show-threads nil)} in the group parameters of
3154 that group.  @code{gnus-show-threads} will be made into a local variable
3155 in the summary buffer you enter, and the form @code{nil} will be
3156 @code{eval}ed there.
3157
3158 Note that this feature sets the variable locally to the summary buffer.
3159 But some variables are evaluated in the article buffer, or in the
3160 message buffer (of a reply or followup or otherwise newly created
3161 message).  As a workaround, it might help to add the variable in
3162 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
3163 Stuff}.  So if you want to set @code{message-from-style} via the group
3164 parameters, then you may need the following statement elsewhere in your
3165 @file{~/.gnus.el} file:
3166
3167 @lisp
3168 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
3169 @end lisp
3170
3171 @vindex gnus-list-identifiers
3172 A use for this feature is to remove a mailing list identifier tag in
3173 the subject fields of articles.  E.g. if the news group
3174
3175 @example
3176 nntp+news.gnus.org:gmane.text.docbook.apps
3177 @end example
3178
3179 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
3180 tag can be removed from the article subjects in the summary buffer for
3181 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
3182 into the group parameters for the group.
3183
3184 This can also be used as a group-specific hook function.  If you want to
3185 hear a beep when you enter a group, you could put something like
3186 @code{(dummy-variable (ding))} in the parameters of that group.
3187 @code{dummy-variable} will be set to the (meaningless) result of the
3188 @code{(ding)} form.
3189
3190 Alternatively, since the VARIABLE becomes local to the group, this
3191 pattern can be used to temporarily change a hook.  For example, if the
3192 following is added to a group parameter
3193
3194 @lisp
3195 (gnus-summary-prepared-hook
3196   '(lambda nil (local-set-key "d" (local-key-binding "n"))))
3197 @end lisp
3198
3199 when the group is entered, the 'd' key will not mark the article as
3200 expired.
3201
3202 @end table
3203
3204 @vindex gnus-parameters
3205 Group parameters can be set via the @code{gnus-parameters} variable too.
3206 But some variables, such as @code{visible}, have no effect (For this
3207 case see @code{gnus-permanently-visible-groups} as an alternative.).
3208 For example:
3209
3210 @lisp
3211 (setq gnus-parameters
3212       '(("mail\\..*"
3213          (gnus-show-threads nil)
3214          (gnus-use-scoring nil)
3215          (gnus-summary-line-format
3216           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3217          (gcc-self . t)
3218          (display . all))
3219
3220         ("^nnimap:\\(foo.bar\\)$"
3221          (to-group . "\\1"))
3222
3223         ("mail\\.me"
3224          (gnus-use-scoring  t))
3225
3226         ("list\\..*"
3227          (total-expire . t)
3228          (broken-reply-to . t))))
3229 @end lisp
3230
3231 String value of parameters will be subjected to regexp substitution, as
3232 the @code{to-group} example shows.
3233
3234 @vindex gnus-parameters-case-fold-search
3235 By default, whether comparing the group name and one of those regexps
3236 specified in @code{gnus-parameters} is done in a case-sensitive manner
3237 or a case-insensitive manner depends on the value of
3238 @code{case-fold-search} at the time when the comparison is done.  The
3239 value of @code{case-fold-search} is typically @code{t}; it means, for
3240 example, the element @code{("INBOX\\.FOO" (total-expire . t))} might be
3241 applied to both the @samp{INBOX.FOO} group and the @samp{INBOX.foo}
3242 group.  If you want to make those regexps always case-sensitive, set the
3243 value of the @code{gnus-parameters-case-fold-search} variable to
3244 @code{nil}.  Otherwise, set it to @code{t} if you want to compare them
3245 always in a case-insensitive manner.
3246
3247 You can define different sorting to different groups via
3248 @code{gnus-parameters}.  Here is an example to sort an @acronym{NNTP}
3249 group by reverse date to see the latest news at the top and an
3250 @acronym{RSS} group by subject.  In this example, the first group is the
3251 Debian daily news group @code{gmane.linux.debian.user.news} from
3252 news.gmane.org.  The @acronym{RSS} group corresponds to the Debian
3253 weekly news RSS feed
3254 @url{http://packages.debian.org/unstable/newpkg_main.en.rdf},
3255 @xref{RSS}.
3256
3257 @lisp
3258 (setq
3259  gnus-parameters
3260  '(("nntp.*gmane\\.debian\\.user\\.news"
3261     (gnus-show-threads nil)
3262     (gnus-article-sort-functions '((not gnus-article-sort-by-date)))
3263     (gnus-use-adaptive-scoring nil)
3264     (gnus-use-scoring nil))
3265    ("nnrss.*debian"
3266     (gnus-show-threads nil)
3267     (gnus-article-sort-functions 'gnus-article-sort-by-subject)
3268     (gnus-use-adaptive-scoring nil)
3269     (gnus-use-scoring t)
3270     (gnus-score-find-score-files-function 'gnus-score-find-single)
3271     (gnus-summary-line-format "%U%R%z%d %I%(%[ %s %]%)\n"))))
3272 @end lisp
3273
3274
3275 @node Listing Groups
3276 @section Listing Groups
3277 @cindex group listing
3278
3279 These commands all list various slices of the groups available.
3280
3281 @table @kbd
3282
3283 @item l
3284 @itemx A s
3285 @kindex A s (Group)
3286 @kindex l (Group)
3287 @findex gnus-group-list-groups
3288 List all groups that have unread articles
3289 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3290 command will list only groups of level ARG and lower.  By default, it
3291 only lists groups of level five (i.e.,
3292 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3293 groups).
3294
3295 @item L
3296 @itemx A u
3297 @kindex A u (Group)
3298 @kindex L (Group)
3299 @findex gnus-group-list-all-groups
3300 List all groups, whether they have unread articles or not
3301 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3302 this command will list only groups of level ARG and lower.  By default,
3303 it lists groups of level seven or lower (i.e., just subscribed and
3304 unsubscribed groups).
3305
3306 @item A l
3307 @kindex A l (Group)
3308 @findex gnus-group-list-level
3309 List all unread groups on a specific level
3310 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3311 with no unread articles.
3312
3313 @item A k
3314 @kindex A k (Group)
3315 @findex gnus-group-list-killed
3316 List all killed groups (@code{gnus-group-list-killed}).  If given a
3317 prefix argument, really list all groups that are available, but aren't
3318 currently (un)subscribed.  This could entail reading the active file
3319 from the server.
3320
3321 @item A z
3322 @kindex A z (Group)
3323 @findex gnus-group-list-zombies
3324 List all zombie groups (@code{gnus-group-list-zombies}).
3325
3326 @item A m
3327 @kindex A m (Group)
3328 @findex gnus-group-list-matching
3329 List all unread, subscribed groups with names that match a regexp
3330 (@code{gnus-group-list-matching}).
3331
3332 @item A M
3333 @kindex A M (Group)
3334 @findex gnus-group-list-all-matching
3335 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3336
3337 @item A A
3338 @kindex A A (Group)
3339 @findex gnus-group-list-active
3340 List absolutely all groups in the active file(s) of the
3341 server(s) you are connected to (@code{gnus-group-list-active}).  This
3342 might very well take quite a while.  It might actually be a better idea
3343 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3344 thing to match on.  Also note that this command may list groups that
3345 don't exist (yet)---these will be listed as if they were killed groups.
3346 Take the output with some grains of salt.
3347
3348 @item A a
3349 @kindex A a (Group)
3350 @findex gnus-group-apropos
3351 List all groups that have names that match a regexp
3352 (@code{gnus-group-apropos}).
3353
3354 @item A d
3355 @kindex A d (Group)
3356 @findex gnus-group-description-apropos
3357 List all groups that have names or descriptions that match a regexp
3358 (@code{gnus-group-description-apropos}).
3359
3360 @item A c
3361 @kindex A c (Group)
3362 @findex gnus-group-list-cached
3363 List all groups with cached articles (@code{gnus-group-list-cached}).
3364
3365 @item A ?
3366 @kindex A ? (Group)
3367 @findex gnus-group-list-dormant
3368 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3369
3370 @item A /
3371 @kindex A / (Group)
3372 @findex gnus-group-list-limit
3373 List groups limited within the current selection
3374 (@code{gnus-group-list-limit}).
3375
3376 @item A f
3377 @kindex A f (Group)
3378 @findex gnus-group-list-flush
3379 Flush groups from the current selection (@code{gnus-group-list-flush}).
3380
3381 @item A p
3382 @kindex A p (Group)
3383 @findex gnus-group-list-plus
3384 List groups plus the current selection (@code{gnus-group-list-plus}).
3385
3386 @end table
3387
3388 @vindex gnus-permanently-visible-groups
3389 @cindex visible group parameter
3390 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3391 always be shown, whether they have unread articles or not.  You can also
3392 add the @code{visible} element to the group parameters in question to
3393 get the same effect.
3394
3395 @vindex gnus-list-groups-with-ticked-articles
3396 Groups that have just ticked articles in it are normally listed in the
3397 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3398 @code{nil}, these groups will be treated just like totally empty
3399 groups.  It is @code{t} by default.
3400
3401
3402 @node Sorting Groups
3403 @section Sorting Groups
3404 @cindex sorting groups
3405
3406 @kindex C-c C-s (Group)
3407 @findex gnus-group-sort-groups
3408 @vindex gnus-group-sort-function
3409 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3410 group buffer according to the function(s) given by the
3411 @code{gnus-group-sort-function} variable.  Available sorting functions
3412 include:
3413
3414 @table @code
3415
3416 @item gnus-group-sort-by-alphabet
3417 @findex gnus-group-sort-by-alphabet
3418 Sort the group names alphabetically.  This is the default.
3419
3420 @item gnus-group-sort-by-real-name
3421 @findex gnus-group-sort-by-real-name
3422 Sort the group alphabetically on the real (unprefixed) group names.
3423
3424 @item gnus-group-sort-by-level
3425 @findex gnus-group-sort-by-level
3426 Sort by group level.
3427
3428 @item gnus-group-sort-by-score
3429 @findex gnus-group-sort-by-score
3430 Sort by group score.  @xref{Group Score}.
3431
3432 @item gnus-group-sort-by-rank
3433 @findex gnus-group-sort-by-rank
3434 Sort by group score and then the group level.  The level and the score
3435 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3436
3437 @item gnus-group-sort-by-unread
3438 @findex gnus-group-sort-by-unread
3439 Sort by number of unread articles.
3440
3441 @item gnus-group-sort-by-method
3442 @findex gnus-group-sort-by-method
3443 Sort alphabetically on the select method.
3444
3445 @item gnus-group-sort-by-server
3446 @findex gnus-group-sort-by-server
3447 Sort alphabetically on the Gnus server name.
3448
3449
3450 @end table
3451
3452 @code{gnus-group-sort-function} can also be a list of sorting
3453 functions.  In that case, the most significant sort key function must be
3454 the last one.
3455
3456
3457 There are also a number of commands for sorting directly according to
3458 some sorting criteria:
3459
3460 @table @kbd
3461 @item G S a
3462 @kindex G S a (Group)
3463 @findex gnus-group-sort-groups-by-alphabet
3464 Sort the group buffer alphabetically by group name
3465 (@code{gnus-group-sort-groups-by-alphabet}).
3466
3467 @item G S u
3468 @kindex G S u (Group)
3469 @findex gnus-group-sort-groups-by-unread
3470 Sort the group buffer by the number of unread articles
3471 (@code{gnus-group-sort-groups-by-unread}).
3472
3473 @item G S l
3474 @kindex G S l (Group)
3475 @findex gnus-group-sort-groups-by-level
3476 Sort the group buffer by group level
3477 (@code{gnus-group-sort-groups-by-level}).
3478
3479 @item G S v
3480 @kindex G S v (Group)
3481 @findex gnus-group-sort-groups-by-score
3482 Sort the group buffer by group score
3483 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3484
3485 @item G S r
3486 @kindex G S r (Group)
3487 @findex gnus-group-sort-groups-by-rank
3488 Sort the group buffer by group rank
3489 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3490
3491 @item G S m
3492 @kindex G S m (Group)
3493 @findex gnus-group-sort-groups-by-method
3494 Sort the group buffer alphabetically by back end name@*
3495 (@code{gnus-group-sort-groups-by-method}).
3496
3497 @item G S n
3498 @kindex G S n (Group)
3499 @findex gnus-group-sort-groups-by-real-name
3500 Sort the group buffer alphabetically by real (unprefixed) group name
3501 (@code{gnus-group-sort-groups-by-real-name}).
3502
3503 @end table
3504
3505 All the commands below obey the process/prefix convention
3506 (@pxref{Process/Prefix}).
3507
3508 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3509 commands will sort in reverse order.
3510
3511 You can also sort a subset of the groups:
3512
3513 @table @kbd
3514 @item G P a
3515 @kindex G P a (Group)
3516 @findex gnus-group-sort-selected-groups-by-alphabet
3517 Sort the groups alphabetically by group name
3518 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3519
3520 @item G P u
3521 @kindex G P u (Group)
3522 @findex gnus-group-sort-selected-groups-by-unread
3523 Sort the groups by the number of unread articles
3524 (@code{gnus-group-sort-selected-groups-by-unread}).
3525
3526 @item G P l
3527 @kindex G P l (Group)
3528 @findex gnus-group-sort-selected-groups-by-level
3529 Sort the groups by group level
3530 (@code{gnus-group-sort-selected-groups-by-level}).
3531
3532 @item G P v
3533 @kindex G P v (Group)
3534 @findex gnus-group-sort-selected-groups-by-score
3535 Sort the groups by group score
3536 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3537
3538 @item G P r
3539 @kindex G P r (Group)
3540 @findex gnus-group-sort-selected-groups-by-rank
3541 Sort the groups by group rank
3542 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3543
3544 @item G P m
3545 @kindex G P m (Group)
3546 @findex gnus-group-sort-selected-groups-by-method
3547 Sort the groups alphabetically by back end name@*
3548 (@code{gnus-group-sort-selected-groups-by-method}).
3549
3550 @item G P n
3551 @kindex G P n (Group)
3552 @findex gnus-group-sort-selected-groups-by-real-name
3553 Sort the groups alphabetically by real (unprefixed) group name
3554 (@code{gnus-group-sort-selected-groups-by-real-name}).
3555
3556 @item G P s
3557 @kindex G P s (Group)
3558 @findex gnus-group-sort-selected-groups
3559 Sort the groups according to @code{gnus-group-sort-function}.
3560
3561 @end table
3562
3563 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3564 move groups around.
3565
3566
3567 @node Group Maintenance
3568 @section Group Maintenance
3569 @cindex bogus groups
3570
3571 @table @kbd
3572 @item b
3573 @kindex b (Group)
3574 @findex gnus-group-check-bogus-groups
3575 Find bogus groups and delete them
3576 (@code{gnus-group-check-bogus-groups}).
3577
3578 @item F
3579 @kindex F (Group)
3580 @findex gnus-group-find-new-groups
3581 Find new groups and process them (@code{gnus-group-find-new-groups}).
3582 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3583 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3584 to query the server for new groups, and subscribe the new groups as
3585 zombies.
3586
3587 @item C-c C-x
3588 @kindex C-c C-x (Group)
3589 @findex gnus-group-expire-articles
3590 @cindex expiring mail
3591 Run all expirable articles in the current group through the expiry
3592 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3593 all expirable articles in the group that have been around for a while.
3594 (@pxref{Expiring Mail}).
3595
3596 @item C-c C-M-x
3597 @kindex C-c C-M-x (Group)
3598 @findex gnus-group-expire-all-groups
3599 @cindex expiring mail
3600 Run all expirable articles in all groups through the expiry process
3601 (@code{gnus-group-expire-all-groups}).
3602
3603 @end table
3604
3605
3606 @node Browse Foreign Server
3607 @section Browse Foreign Server
3608 @cindex foreign servers
3609 @cindex browsing servers
3610
3611 @table @kbd
3612 @item B
3613 @kindex B (Group)
3614 @findex gnus-group-browse-foreign-server
3615 You will be queried for a select method and a server name.  Gnus will
3616 then attempt to contact this server and let you browse the groups there
3617 (@code{gnus-group-browse-foreign-server}).
3618 @end table
3619
3620 @findex gnus-browse-mode
3621 A new buffer with a list of available groups will appear.  This buffer
3622 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3623 a lot) like a normal group buffer.
3624
3625 Here's a list of keystrokes available in the browse mode:
3626
3627 @table @kbd
3628 @item n
3629 @kindex n (Browse)
3630 @findex gnus-group-next-group
3631 Go to the next group (@code{gnus-group-next-group}).
3632
3633 @item p
3634 @kindex p (Browse)
3635 @findex gnus-group-prev-group
3636 Go to the previous group (@code{gnus-group-prev-group}).
3637
3638 @item SPACE
3639 @kindex SPACE (Browse)
3640 @findex gnus-browse-read-group
3641 Enter the current group and display the first article
3642 (@code{gnus-browse-read-group}).
3643
3644 @item RET
3645 @kindex RET (Browse)
3646 @findex gnus-browse-select-group
3647 Enter the current group (@code{gnus-browse-select-group}).
3648
3649 @item u
3650 @kindex u (Browse)
3651 @findex gnus-browse-unsubscribe-current-group
3652 Unsubscribe to the current group, or, as will be the case here,
3653 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3654
3655 @item l
3656 @itemx q
3657 @kindex q (Browse)
3658 @kindex l (Browse)
3659 @findex gnus-browse-exit
3660 Exit browse mode (@code{gnus-browse-exit}).
3661
3662 @item d
3663 @kindex d (Browse)
3664 @findex gnus-browse-describe-group
3665 Describe the current group (@code{gnus-browse-describe-group}).
3666
3667 @item ?
3668 @kindex ? (Browse)
3669 @findex gnus-browse-describe-briefly
3670 Describe browse mode briefly (well, there's not much to describe, is
3671 there) (@code{gnus-browse-describe-briefly}).
3672 @end table
3673
3674
3675 @node Exiting Gnus
3676 @section Exiting Gnus
3677 @cindex exiting Gnus
3678
3679 Yes, Gnus is ex(c)iting.
3680
3681 @table @kbd
3682 @item z
3683 @kindex z (Group)
3684 @findex gnus-group-suspend
3685 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3686 but it kills all buffers except the Group buffer.  I'm not sure why this
3687 is a gain, but then who am I to judge?
3688
3689 @item q
3690 @kindex q (Group)
3691 @findex gnus-group-exit
3692 @c @icon{gnus-group-exit}
3693 Quit Gnus (@code{gnus-group-exit}).
3694
3695 @item Q
3696 @kindex Q (Group)
3697 @findex gnus-group-quit
3698 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3699 The dribble file will be saved, though (@pxref{Auto Save}).
3700 @end table
3701
3702 @vindex gnus-exit-gnus-hook
3703 @vindex gnus-suspend-gnus-hook
3704 @vindex gnus-after-exiting-gnus-hook
3705 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3706 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3707 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3708 exiting Gnus.
3709
3710 Note:
3711
3712 @quotation
3713 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3714 numbly heavy and herself fall into a hazy trance as the boy sitting
3715 behind her drew repeated lines with his pencil across the back of her
3716 plastic chair.
3717 @end quotation
3718
3719
3720 @node Group Topics
3721 @section Group Topics
3722 @cindex topics
3723
3724 If you read lots and lots of groups, it might be convenient to group
3725 them hierarchically according to topics.  You put your Emacs groups over
3726 here, your sex groups over there, and the rest (what, two groups or so?)
3727 you put in some misc section that you never bother with anyway.  You can
3728 even group the Emacs sex groups as a sub-topic to either the Emacs
3729 groups or the sex groups---or both!  Go wild!
3730
3731 @iftex
3732 @iflatex
3733 \gnusfigure{Group Topics}{400}{
3734 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3735 }
3736 @end iflatex
3737 @end iftex
3738
3739 Here's an example:
3740
3741 @example
3742 Gnus
3743   Emacs -- I wuw it!
3744      3: comp.emacs
3745      2: alt.religion.emacs
3746     Naughty Emacs
3747      452: alt.sex.emacs
3748        0: comp.talk.emacs.recovery
3749   Misc
3750      8: comp.binaries.fractals
3751     13: comp.sources.unix
3752 @end example
3753
3754 @findex gnus-topic-mode
3755 @kindex t (Group)
3756 To get this @emph{fab} functionality you simply turn on (ooh!) the
3757 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3758 is a toggling command.)
3759
3760 Go ahead, just try it.  I'll still be here when you get back.  La de
3761 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3762 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3763 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3764 Hot and bothered?
3765
3766 If you want this permanently enabled, you should add that minor mode to
3767 the hook for the group mode.  Put the following line in your
3768 @file{~/.gnus.el} file:
3769
3770 @lisp
3771 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3772 @end lisp
3773
3774 @menu
3775 * Topic Commands::              Interactive E-Z commands.
3776 * Topic Variables::             How to customize the topics the Lisp Way.
3777 * Topic Sorting::               Sorting each topic individually.
3778 * Topic Topology::              A map of the world.
3779 * Topic Parameters::            Parameters that apply to all groups in a topic.
3780 @end menu
3781
3782
3783 @node Topic Commands
3784 @subsection Topic Commands
3785 @cindex topic commands
3786
3787 When the topic minor mode is turned on, a new @kbd{T} submap will be
3788 available.  In addition, a few of the standard keys change their
3789 definitions slightly.
3790
3791 In general, the following kinds of operations are possible on topics.
3792 First of all, you want to create topics.  Secondly, you want to put
3793 groups in topics and to move them around until you have an order you
3794 like.  The third kind of operation is to show/hide parts of the whole
3795 shebang.  You might want to hide a topic including its subtopics and
3796 groups, to get a better overview of the other groups.
3797
3798 Here is a list of the basic keys that you might need to set up topics
3799 the way you like.
3800
3801 @table @kbd
3802
3803 @item T n
3804 @kindex T n (Topic)
3805 @findex gnus-topic-create-topic
3806 Prompt for a new topic name and create it
3807 (@code{gnus-topic-create-topic}).
3808
3809 @item T TAB
3810 @itemx TAB
3811 @kindex T TAB (Topic)
3812 @kindex TAB (Topic)
3813 @findex gnus-topic-indent
3814 ``Indent'' the current topic so that it becomes a sub-topic of the
3815 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3816 ``un-indent'' the topic instead.
3817
3818 @item M-TAB
3819 @kindex M-TAB (Topic)
3820 @findex gnus-topic-unindent
3821 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3822 parent of its current parent (@code{gnus-topic-unindent}).
3823
3824 @end table
3825
3826 The following two keys can be used to move groups and topics around.
3827 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3828 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3829 kill and yank rather than cut and paste.
3830
3831 @table @kbd
3832
3833 @item C-k
3834 @kindex C-k (Topic)
3835 @findex gnus-topic-kill-group
3836 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3837 topic will be removed along with the topic.
3838
3839 @item C-y
3840 @kindex C-y (Topic)
3841 @findex gnus-topic-yank-group
3842 Yank the previously killed group or topic
3843 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3844 before all groups.
3845
3846 So, to move a topic to the beginning of the list of topics, just hit
3847 @kbd{C-k} on it.  This is like the ``cut'' part of cut and paste.  Then,
3848 move the cursor to the beginning of the buffer (just below the ``Gnus''
3849 topic) and hit @kbd{C-y}.  This is like the ``paste'' part of cut and
3850 paste.  Like I said -- E-Z.
3851
3852 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3853 you can move topics around as well as groups.
3854
3855 @end table
3856
3857 After setting up the topics the way you like them, you might wish to
3858 hide a topic, or to show it again.  That's why we have the following
3859 key.
3860
3861 @table @kbd
3862
3863 @item RET
3864 @kindex RET (Topic)
3865 @findex gnus-topic-select-group
3866 @itemx SPACE
3867 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3868 When you perform this command on a group, you'll enter the group, as
3869 usual.  When done on a topic line, the topic will be folded (if it was
3870 visible) or unfolded (if it was folded already).  So it's basically a
3871 toggling command on topics.  In addition, if you give a numerical
3872 prefix, group on that level (and lower) will be displayed.
3873
3874 @end table
3875
3876 Now for a list of other commands, in no particular order.
3877
3878 @table @kbd
3879
3880 @item T m
3881 @kindex T m (Topic)
3882 @findex gnus-topic-move-group
3883 Move the current group to some other topic
3884 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3885 convention (@pxref{Process/Prefix}).
3886
3887 @item T j
3888 @kindex T j (Topic)
3889 @findex gnus-topic-jump-to-topic
3890 Go to a topic (@code{gnus-topic-jump-to-topic}).
3891
3892 @item T c
3893 @kindex T c (Topic)
3894 @findex gnus-topic-copy-group
3895 Copy the current group to some other topic
3896 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3897 convention (@pxref{Process/Prefix}).
3898
3899 @item T h
3900 @kindex T h (Topic)
3901 @findex gnus-topic-hide-topic
3902 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3903 a prefix, hide the topic permanently.
3904
3905 @item T s
3906 @kindex T s (Topic)
3907 @findex gnus-topic-show-topic
3908 Show the current topic (@code{gnus-topic-show-topic}).  If given
3909 a prefix, show the topic permanently.
3910
3911 @item T D
3912 @kindex T D (Topic)
3913 @findex gnus-topic-remove-group
3914 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3915 This command is mainly useful if you have the same group in several
3916 topics and wish to remove it from one of the topics.  You may also
3917 remove a group from all topics, but in that case, Gnus will add it to
3918 the root topic the next time you start Gnus.  In fact, all new groups
3919 (which, naturally, don't belong to any topic) will show up in the root
3920 topic.
3921
3922 This command uses the process/prefix convention
3923 (@pxref{Process/Prefix}).
3924
3925 @item T M
3926 @kindex T M (Topic)
3927 @findex gnus-topic-move-matching
3928 Move all groups that match some regular expression to a topic
3929 (@code{gnus-topic-move-matching}).
3930
3931 @item T C
3932 @kindex T C (Topic)
3933 @findex gnus-topic-copy-matching
3934 Copy all groups that match some regular expression to a topic
3935 (@code{gnus-topic-copy-matching}).
3936
3937 @item T H
3938 @kindex T H (Topic)
3939 @findex gnus-topic-toggle-display-empty-topics
3940 Toggle hiding empty topics
3941 (@code{gnus-topic-toggle-display-empty-topics}).
3942
3943 @item T #
3944 @kindex T # (Topic)
3945 @findex gnus-topic-mark-topic
3946 Mark all groups in the current topic with the process mark
3947 (@code{gnus-topic-mark-topic}).  This command works recursively on
3948 sub-topics unless given a prefix.
3949
3950 @item T M-#
3951 @kindex T M-# (Topic)
3952 @findex gnus-topic-unmark-topic
3953 Remove the process mark from all groups in the current topic
3954 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3955 sub-topics unless given a prefix.
3956
3957 @item C-c C-x
3958 @kindex C-c C-x (Topic)
3959 @findex gnus-topic-expire-articles
3960 @cindex expiring mail
3961 Run all expirable articles in the current group or topic through the
3962 expiry process (if any)
3963 (@code{gnus-topic-expire-articles}).  (@pxref{Expiring Mail}).
3964
3965 @item T r
3966 @kindex T r (Topic)
3967 @findex gnus-topic-rename
3968 Rename a topic (@code{gnus-topic-rename}).
3969
3970 @item T DEL
3971 @kindex T DEL (Topic)
3972 @findex gnus-topic-delete
3973 Delete an empty topic (@code{gnus-topic-delete}).
3974
3975 @item A T
3976 @kindex A T (Topic)
3977 @findex gnus-topic-list-active
3978 List all groups that Gnus knows about in a topics-ified way
3979 (@code{gnus-topic-list-active}).
3980
3981 @item T M-n
3982 @kindex T M-n (Topic)
3983 @findex gnus-topic-goto-next-topic
3984 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3985
3986 @item T M-p
3987 @kindex T M-p (Topic)
3988 @findex gnus-topic-goto-previous-topic
3989 Go to the previous topic (@code{gnus-topic-goto-previous-topic}).
3990
3991 @item G p
3992 @kindex G p (Topic)
3993 @findex gnus-topic-edit-parameters
3994 @cindex group parameters
3995 @cindex topic parameters
3996 @cindex parameters
3997 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
3998 @xref{Topic Parameters}.
3999
4000 @end table
4001
4002
4003 @node Topic Variables
4004 @subsection Topic Variables
4005 @cindex topic variables
4006
4007 The previous section told you how to tell Gnus which topics to display.
4008 This section explains how to tell Gnus what to display about each topic.
4009
4010 @vindex gnus-topic-line-format
4011 The topic lines themselves are created according to the
4012 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
4013 Valid elements are:
4014
4015 @table @samp
4016 @item i
4017 Indentation.
4018 @item n
4019 Topic name.
4020 @item v
4021 Visibility.
4022 @item l
4023 Level.
4024 @item g
4025 Number of groups in the topic.
4026 @item a
4027 Number of unread articles in the topic.
4028 @item A
4029 Number of unread articles in the topic and all its subtopics.
4030 @end table
4031
4032 @vindex gnus-topic-indent-level
4033 Each sub-topic (and the groups in the sub-topics) will be indented with
4034 @code{gnus-topic-indent-level} times the topic level number of spaces.
4035 The default is 2.
4036
4037 @vindex gnus-topic-mode-hook
4038 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
4039
4040 @vindex gnus-topic-display-empty-topics
4041 The @code{gnus-topic-display-empty-topics} says whether to display even
4042 topics that have no unread articles in them.  The default is @code{t}.
4043
4044
4045 @node Topic Sorting
4046 @subsection Topic Sorting
4047 @cindex topic sorting
4048
4049 You can sort the groups in each topic individually with the following
4050 commands:
4051
4052
4053 @table @kbd
4054 @item T S a
4055 @kindex T S a (Topic)
4056 @findex gnus-topic-sort-groups-by-alphabet
4057 Sort the current topic alphabetically by group name
4058 (@code{gnus-topic-sort-groups-by-alphabet}).
4059
4060 @item T S u
4061 @kindex T S u (Topic)
4062 @findex gnus-topic-sort-groups-by-unread
4063 Sort the current topic by the number of unread articles
4064 (@code{gnus-topic-sort-groups-by-unread}).
4065
4066 @item T S l
4067 @kindex T S l (Topic)
4068 @findex gnus-topic-sort-groups-by-level
4069 Sort the current topic by group level
4070 (@code{gnus-topic-sort-groups-by-level}).
4071
4072 @item T S v
4073 @kindex T S v (Topic)
4074 @findex gnus-topic-sort-groups-by-score
4075 Sort the current topic by group score
4076 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
4077
4078 @item T S r
4079 @kindex T S r (Topic)
4080 @findex gnus-topic-sort-groups-by-rank
4081 Sort the current topic by group rank
4082 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
4083
4084 @item T S m
4085 @kindex T S m (Topic)
4086 @findex gnus-topic-sort-groups-by-method
4087 Sort the current topic alphabetically by back end name
4088 (@code{gnus-topic-sort-groups-by-method}).
4089
4090 @item T S e
4091 @kindex T S e (Topic)
4092 @findex gnus-topic-sort-groups-by-server
4093 Sort the current topic alphabetically by server name
4094 (@code{gnus-topic-sort-groups-by-server}).
4095
4096 @item T S s
4097 @kindex T S s (Topic)
4098 @findex gnus-topic-sort-groups
4099 Sort the current topic according to the function(s) given by the
4100 @code{gnus-group-sort-function} variable
4101 (@code{gnus-topic-sort-groups}).
4102
4103 @end table
4104
4105 When given a prefix argument, all these commands will sort in reverse
4106 order.  @xref{Sorting Groups}, for more information about group
4107 sorting.
4108
4109
4110 @node Topic Topology
4111 @subsection Topic Topology
4112 @cindex topic topology
4113 @cindex topology
4114
4115 So, let's have a look at an example group buffer:
4116
4117 @example
4118 @group
4119 Gnus
4120   Emacs -- I wuw it!
4121      3: comp.emacs
4122      2: alt.religion.emacs
4123     Naughty Emacs
4124      452: alt.sex.emacs
4125        0: comp.talk.emacs.recovery
4126   Misc
4127      8: comp.binaries.fractals
4128     13: comp.sources.unix
4129 @end group
4130 @end example
4131
4132 So, here we have one top-level topic (@samp{Gnus}), two topics under
4133 that, and one sub-topic under one of the sub-topics.  (There is always
4134 just one (1) top-level topic).  This topology can be expressed as
4135 follows:
4136
4137 @lisp
4138 (("Gnus" visible)
4139  (("Emacs -- I wuw it!" visible)
4140   (("Naughty Emacs" visible)))
4141  (("Misc" visible)))
4142 @end lisp
4143
4144 @vindex gnus-topic-topology
4145 This is in fact how the variable @code{gnus-topic-topology} would look
4146 for the display above.  That variable is saved in the @file{.newsrc.eld}
4147 file, and shouldn't be messed with manually---unless you really want
4148 to.  Since this variable is read from the @file{.newsrc.eld} file,
4149 setting it in any other startup files will have no effect.
4150
4151 This topology shows what topics are sub-topics of what topics (right),
4152 and which topics are visible.  Two settings are currently
4153 allowed---@code{visible} and @code{invisible}.
4154
4155
4156 @node Topic Parameters
4157 @subsection Topic Parameters
4158 @cindex topic parameters
4159
4160 All groups in a topic will inherit group parameters from the parent
4161 (and ancestor) topic parameters.  All valid group parameters are valid
4162 topic parameters (@pxref{Group Parameters}).  When the agent is
4163 enabled, all agent parameters (See Agent Parameters in @ref{Category
4164 Syntax}) are also valid topic parameters.
4165
4166 In addition, the following parameters are only valid as topic
4167 parameters:
4168
4169 @table @code
4170 @item subscribe
4171 When subscribing new groups by topic (@pxref{Subscription Methods}), the
4172 @code{subscribe} topic parameter says what groups go in what topic.  Its
4173 value should be a regexp to match the groups that should go in that
4174 topic.
4175
4176 @item subscribe-level
4177 When subscribing new groups by topic (see the @code{subscribe} parameter),
4178 the group will be subscribed with the level specified in the
4179 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
4180
4181 @end table
4182
4183 Group parameters (of course) override topic parameters, and topic
4184 parameters in sub-topics override topic parameters in super-topics.  You
4185 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
4186 verb, although you may feel free to disagree with me here.)
4187
4188 @example
4189 @group
4190 Gnus
4191   Emacs
4192      3: comp.emacs
4193      2: alt.religion.emacs
4194    452: alt.sex.emacs
4195     Relief
4196      452: alt.sex.emacs
4197        0: comp.talk.emacs.recovery
4198   Misc
4199      8: comp.binaries.fractals
4200     13: comp.sources.unix
4201    452: alt.sex.emacs
4202 @end group
4203 @end example
4204
4205 The @samp{Emacs} topic has the topic parameter @code{(score-file
4206 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
4207 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
4208 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
4209 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
4210 . "religion.SCORE")}.
4211
4212 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
4213 will get the @file{relief.SCORE} home score file.  If you enter the same
4214 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
4215 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
4216 get the @file{religion.SCORE} home score file.
4217
4218 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
4219 there are some problems, especially with the @code{total-expiry}
4220 parameter.  Say you have a mail group in two topics; one with
4221 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
4222 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
4223 of these topics you mean to expire articles from, so anything may
4224 happen.  In fact, I hereby declare that it is @dfn{undefined} what
4225 happens.  You just have to be careful if you do stuff like that.
4226
4227
4228 @node Non-ASCII Group Names
4229 @section Accessing groups of non-English names
4230 @cindex non-ascii group names
4231
4232 There are some news servers that provide groups of which the names are
4233 expressed with their native languages in the world.  For instance, in a
4234 certain news server there are some newsgroups of which the names are
4235 spelled in Chinese, where people are talking in Chinese.  You can, of
4236 course, subscribe to such news groups using Gnus.  Currently Gnus
4237 supports non-@acronym{ASCII} group names not only with the @code{nntp}
4238 back end but also with the @code{nnml} back end and the @code{nnrss}
4239 back end.
4240
4241 Every such group name is encoded by a certain charset in the server
4242 side (in an @acronym{NNTP} server its administrator determines the
4243 charset, but for groups in the other back ends it is determined by you).
4244 Gnus has to display the decoded ones for you in the group buffer and the
4245 article buffer, and needs to use the encoded ones when communicating
4246 with servers.  However, Gnus doesn't know what charset is used for each
4247 non-@acronym{ASCII} group name.  The following two variables are just
4248 the ones for telling Gnus what charset should be used for each group:
4249
4250 @table @code
4251 @item gnus-group-name-charset-method-alist
4252 @vindex gnus-group-name-charset-method-alist
4253 An alist of select methods and charsets.  The default value is
4254 @code{nil}.  The names of groups in the server specified by that select
4255 method are all supposed to use the corresponding charset.  For example:
4256
4257 @lisp
4258 (setq gnus-group-name-charset-method-alist
4259       '(((nntp "news.com.cn") . cn-gb-2312)))
4260 @end lisp
4261
4262 Charsets specified for groups with this variable are preferred to the
4263 ones specified for the same groups with the
4264 @code{gnus-group-name-charset-group-alist} variable (see below).
4265
4266 A select method can be very long, like:
4267
4268 @lisp
4269 (nntp "gmane"
4270       (nntp-address "news.gmane.org")
4271       (nntp-end-of-line "\n")
4272       (nntp-open-connection-function
4273        nntp-open-via-rlogin-and-telnet)
4274       (nntp-via-rlogin-command "ssh")
4275       (nntp-via-rlogin-command-switches
4276        ("-C" "-t" "-e" "none"))
4277       (nntp-via-address @dots{}))
4278 @end lisp
4279
4280 In that case, you can truncate it into @code{(nntp "gmane")} in this
4281 variable.  That is, it is enough to contain only the back end name and
4282 the server name.
4283
4284 @item gnus-group-name-charset-group-alist
4285 @cindex UTF-8 group names
4286 @vindex gnus-group-name-charset-group-alist
4287 An alist of regexp of group name and the charset for group names.
4288 @code{((".*" . utf-8))} is the default value if UTF-8 is supported,
4289 otherwise the default is @code{nil}.  For example:
4290
4291 @lisp
4292 (setq gnus-group-name-charset-group-alist
4293       '(("\\.com\\.cn:" . cn-gb-2312)
4294         (".*" . utf-8)))
4295 @end lisp
4296
4297 Note that this variable is ignored if the match is made with
4298 @code{gnus-group-name-charset-method-alist}.
4299 @end table
4300
4301 Those two variables are used also to determine the charset for encoding
4302 and decoding non-@acronym{ASCII} group names that are in the back ends
4303 other than @code{nntp}.  It means that it is you who determine it.  If
4304 you do nothing, the charset used for group names in those back ends will
4305 all be @code{utf-8} because of the last element of
4306 @code{gnus-group-name-charset-group-alist}.
4307
4308 There is one more important variable for non-@acronym{ASCII} group
4309 names.  @emph{XEmacs users must set this}.  Emacs users necessarily need
4310 not do:
4311
4312 @table @code
4313 @item nnmail-pathname-coding-system
4314 The value of this variable should be a coding system or @code{nil}
4315 (which is the default).  The @code{nnml} back end, the @code{nnrss} back
4316 end, the @acronym{NNTP} marks feature (@pxref{NNTP marks}), the agent,
4317 and the cache use non-@acronym{ASCII} group names in those files and
4318 directories.  This variable overrides the value of
4319 @code{file-name-coding-system} which specifies the coding system used
4320 when encoding and decoding those file names and directory names.
4321
4322 In XEmacs (with the @code{mule} feature), @code{file-name-coding-system}
4323 is the only means to specify the coding system used to encode and decode
4324 file names.  Therefore, @emph{you, XEmacs users, have to set it} to the
4325 coding system that is suitable to encode and decode non-@acronym{ASCII}
4326 group names.  On the other hand, Emacs uses the value of
4327 @code{default-file-name-coding-system} if @code{file-name-coding-system}
4328 is @code{nil}.  Normally the value of
4329 @code{default-file-name-coding-system} is initialized according to the
4330 locale, so you will need to do nothing if the value is suitable to
4331 encode and decode non-@acronym{ASCII} group names.
4332
4333 The value of this variable (or @code{default-file-name-coding-system})
4334 does not necessarily need to be the same value that is determined by
4335 @code{gnus-group-name-charset-method-alist} and
4336 @code{gnus-group-name-charset-group-alist}.
4337
4338 If you want to subscribe to the groups spelled in Chinese but
4339 @code{default-file-name-coding-system} is initialized by default to
4340 @code{iso-latin-1} for example, that is the most typical case where you
4341 have to set @code{nnmail-pathname-coding-system} even if you are an
4342 Emacs user.  The @code{utf-8} coding system is a good candidate for it.
4343 Otherwise, you may change the locale in your system so that
4344 @code{default-file-name-coding-system} may be initialized to an
4345 appropriate value, instead of specifying this variable.
4346 @end table
4347
4348 Note that when you copy or move articles from a non-@acronym{ASCII}
4349 group to another group, the charset used to encode and decode group
4350 names should be the same in both groups.  Otherwise the Newsgroups
4351 header will be displayed incorrectly in the article buffer.
4352
4353
4354 @node Searching
4355 @section Searching
4356
4357 @menu
4358 * nnir::                     Searching on IMAP, with swish, namazu, etc.
4359 * nnmairix::                 Searching maildir, MH or mbox with Mairix.
4360 @end menu
4361
4362 @cindex Searching
4363
4364 FIXME: This node is a stub.
4365
4366 FIXME: Add a brief overview of Gnus search capabilities.  A brief
4367 comparison of nnir, nnmairix, contrib/gnus-namazu would be nice
4368 as well.
4369
4370 FIXME: Explain difference to @ref{Searching for Articles}, add reference
4371 and back-reference.
4372
4373 @node nnir
4374 @subsection nnir
4375
4376 FIXME: As a first step, convert the commentary of @file{nnir} to texi.
4377 @cindex nnir
4378
4379 @node nnmairix
4380 @subsection nnmairix
4381
4382 @cindex mairix 
4383 @cindex nnmairix
4384 This paragraph describes how to set up mairix and the back end
4385 @code{nnmairix} for indexing and searching your mail from within
4386 Gnus.  Additionally, you can create permanent ``smart'' groups which are
4387 bound to mairix searches and are automatically updated.
4388
4389 @menu
4390 * About mairix::                About the mairix mail search engine
4391 * nnmairix requirements::       What you will need for using nnmairix
4392 * What nnmairix does::          What does nnmairix actually do?
4393 * Setting up mairix::           Set up your mairix installation
4394 * Configuring nnmairix::        Set up the nnmairix back end
4395 * nnmairix keyboard shortcuts:: List of available keyboard shortcuts
4396 * Propagating marks::           How to propagate marks from nnmairix groups
4397 * nnmairix tips and tricks::    Some tips, tricks and examples
4398 * nnmairix caveats::            Some more stuff you might want to know
4399 @end menu
4400
4401 @c FIXME: The markup in this section might need improvement.
4402 @c E.g. adding @samp, @var, @file, @command, etc.
4403 @c Cf. (info "(texinfo)Indicating")
4404
4405 @node About mairix
4406 @subsubsection About mairix
4407
4408 Mairix is a tool for indexing and searching words in locally stored
4409 mail.  It was written by Richard Curnow and is licensed under the
4410 GPL.  Mairix comes with most popular GNU/Linux distributions, but it also
4411 runs under Windows (with cygwin), Mac OS X and Solaris.  The homepage can
4412 be found at
4413 @uref{http://www.rpcurnow.force9.co.uk/mairix/index.html}
4414
4415 Though mairix might not be as flexible as other search tools like
4416 swish++ or namazu, which you can use via the @code{nnir} back end, it
4417 has the prime advantage of being incredibly fast.  On current systems, it
4418 can easily search through headers and message bodies of thousands and
4419 thousands of mails in well under a second.  Building the database
4420 necessary for searching might take a minute or two, but only has to be
4421 done once fully.  Afterwards, the updates are done incrementally and
4422 therefore are really fast, too.  Additionally, mairix is very easy to set
4423 up.
4424
4425 For maximum speed though, mairix should be used with mails stored in
4426 @code{Maildir} or @code{MH} format (this includes the @code{nnml} back
4427 end), although it also works with mbox.  Mairix presents the search
4428 results by populating a @emph{virtual} maildir/MH folder with symlinks
4429 which point to the ``real'' message files (if mbox is used, copies are
4430 made).  Since mairix already presents search results in such a virtual
4431 mail folder, it is very well suited for using it as an external program
4432 for creating @emph{smart} mail folders, which represent certain mail
4433 searches.  This is similar to a Kiboze group (@pxref{Kibozed Groups}),
4434 but much faster.
4435
4436 @node nnmairix requirements
4437 @subsubsection nnmairix requirements
4438
4439 Mairix searches local mail---that means, mairix absolutely must have
4440 direct access to your mail folders.  If your mail resides on another
4441 server (e.g. an @acronym{IMAP} server) and you happen to have shell
4442 access, @code{nnmairix} supports running mairix remotely, e.g. via ssh.
4443
4444 Additionally, @code{nnmairix} only supports the following Gnus back
4445 ends: @code{nnml}, @code{nnmaildir}, and @code{nnimap}.  You must use
4446 one of these back ends for using @code{nnmairix}.  Other back ends, like
4447 @code{nnmbox}, @code{nnfolder} or @code{nnmh}, won't work.
4448
4449 If you absolutely must use mbox and still want to use @code{nnmairix},
4450 you can set up a local @acronym{IMAP} server, which you then access via
4451 @code{nnimap}.  This is a rather massive setup for accessing some mbox
4452 files, so just change to MH or Maildir already...
4453
4454 @node What nnmairix does
4455 @subsubsection What nnmairix does
4456
4457 The back end @code{nnmairix} enables you to call mairix from within Gnus,
4458 either to query mairix with a search term or to update the
4459 database.  While visiting a message in the summary buffer, you can use
4460 several pre-defined shortcuts for calling mairix, e.g. to quickly
4461 search for all mails from the sender of the current message or to
4462 display the whole thread associated with the message, even if the
4463 mails are in different folders.
4464
4465 Additionally, you can create permanent @code{nnmairix} groups which are bound
4466 to certain mairix searches.  This way, you can easily create a group
4467 containing mails from a certain sender, with a certain subject line or
4468 even for one specific thread based on the Message-ID.  If you check for
4469 new mail in these folders (e.g. by pressing @kbd{g} or @kbd{M-g}), they
4470 automatically update themselves by calling mairix. 
4471
4472 You might ask why you need @code{nnmairix} at all, since mairix already
4473 creates the group, populates it with links to the mails so that you can
4474 then access it with Gnus, right? Well, this @emph{might} work, but often
4475 does not---at least not without problems.  Most probably you will get
4476 strange article counts, and sometimes you might see mails which Gnus
4477 claims have already been canceled and are inaccessible.  This is due to
4478 the fact that Gnus isn't really amused when things are happening behind
4479 its back.  Another problem can be the mail back end itself, e.g. if you
4480 use mairix with an @acronym{IMAP} server (I had Dovecot complaining
4481 about corrupt index files when mairix changed the contents of the search
4482 group).  Using @code{nnmairix} should circumvent these problems.
4483
4484 @code{nnmairix} is not really a mail back end---it's actually more like a
4485 wrapper, sitting between a ``real'' mail back end where mairix stores the
4486 searches and the Gnus front end.  You can choose between three different
4487 mail back ends for the mairix folders: @code{nnml}, @code{nnmaildir} or
4488 @code{nnimap}.  @code{nnmairix} will call the mairix binary so that the
4489 search results are stored in folders named
4490 @code{zz_mairix-<NAME>-<NUMBER>} on this mail back end, but it will
4491 present these folders in the Gnus front end only with @code{<NAME>}.  You
4492 can use an existing mail back end where you already store your mail, but
4493 if you're uncomfortable with @code{nnmairix} creating new mail groups
4494 alongside your other mail, you can also create e.g. a new
4495 @code{nnmaildir} server exclusively for mairix.  However, a special case
4496 exists if you want to use mairix remotely on an IMAP server with
4497 @code{nnimap}---here the mairix folders and your other mail must be on
4498 the same @code{nnimap} back end.
4499
4500 @node Setting up mairix
4501 @subsubsection Setting up mairix
4502
4503 First: create a backup of your mail folders (@pxref{nnmairix caveats}).
4504
4505 Setting up mairix is easy: simply create a @file{.mairixrc} file with
4506 (at least) the following entries:
4507
4508 @example
4509 # Your Maildir/MH base folder
4510 base=~/Maildir
4511 @end example
4512
4513 This is the base folder for your mails.  All the following directories
4514 are relative to this base folder.  If you want to use @code{nnmairix}
4515 with @code{nnimap}, this base directory has to point to the mail
4516 directory where the @acronym{IMAP} server stores the mail folders!
4517
4518 @example
4519 maildir= ... your maildir folders which should be indexed ...
4520 mh= ... your nnml/mh folders which should be indexed ...
4521 mbox = ... your mbox files which should be indexed ...
4522 @end example
4523
4524 Specify all your maildir/nnml folders and mbox files (relative to the
4525 base directory!) you want to index with mairix.  See the man-page for
4526 mairixrc for details.
4527
4528 @example
4529 omit=zz_mairix-*
4530 @end example
4531
4532 @vindex nnmairix-group-prefix
4533 This should make sure that you don't accidentally index the mairix
4534 search results.  You can change the prefix of these folders with the
4535 variable @code{nnmairix-group-prefix}.
4536
4537 @example
4538 mformat= ... 'maildir' or 'mh' ...
4539 database= ... location of database file ...
4540 @end example
4541
4542 The @code{format} setting specifies the output format for the mairix
4543 search folder.  Set this to @code{mh} if you want to access search results
4544 with @code{nnml}.  Otherwise choose @code{maildir}.
4545
4546 To summarize, here is my shortened @file{.mairixrc} file as an example:
4547
4548 @example
4549 base=~/Maildir
4550 maildir=.personal:.work:.logcheck:.sent
4551 mh=../Mail/nnml/*...
4552 mbox=../mboxmail/mailarchive_year*
4553 mformat=maildir
4554 omit=zz_mairix-*
4555 database=~/.mairixdatabase
4556 @end example
4557
4558 In this case, the base directory is @file{~/Maildir}, where all my Maildir
4559 folders are stored.  As you can see, the folders are separated by
4560 colons.  If you wonder why every folder begins with a dot: this is
4561 because I use Dovecot as @acronym{IMAP} server, which again uses
4562 @code{Maildir++} folders.  For testing nnmairix, I also have some
4563 @code{nnml} mail, which is saved in @file{~/Mail/nnml}.  Since this has
4564 to be specified relative to the @code{base} directory, the @code{../Mail}
4565 notation is needed.  Note that the line ends in @code{*...}, which means
4566 to recursively scan all files under this directory.  Without the three
4567 dots, the wildcard @code{*} will not work recursively.  I also have some
4568 old mbox files with archived mail lying around in @file{~/mboxmail}.
4569 The other lines should be obvious.
4570
4571 See the man page for @code{mairixrc} for details and further options,
4572 especially regarding wildcard usage, which may be a little different
4573 than you are used to.
4574
4575 Now simply call @code{mairix} to create the index for the first time.
4576 Note that this may take a few minutes, but every following index will do
4577 the updates incrementally and hence is very fast.
4578
4579 @node Configuring nnmairix
4580 @subsubsection Configuring nnmairix
4581
4582 In group mode, type @kbd{G b c}
4583 (@code{nnmairix-create-server-and-default-group}).  This will ask you for all
4584 necessary information and create a @code{nnmairix} server as a foreign
4585 server.  You will have to specify the following:
4586
4587 @itemize @bullet
4588
4589 @item
4590 The @strong{name} of the @code{nnmairix} server---choose whatever you
4591 want.
4592
4593 @item
4594 The @strong{mail back end} where mairix should stores its
4595 searches.  Currently @code{nnmaildir}, @code{nnimap} and @code{nnml} are
4596 supported.  As explained above, for locally stored mails, this can be an
4597 existing mail back end where you store your mails.  However, you can also
4598 create e.g. a new @code{nnmaildir} server exclusively for
4599 @code{nnmairix} in your secondary select methods (@pxref{Finding the
4600 News}).  If you want to use mairix remotely on an @acronym{IMAP} server,
4601 you have to choose the corresponding @code{nnimap} back end here.
4602
4603 @item
4604 @vindex nnmairix-mairix-search-options
4605 The @strong{command} to call the mairix binary.  This will usually just
4606 be @code{mairix}, but you can also choose something like @code{ssh
4607 SERVER mairix} if you want to call mairix remotely, e.g. on your
4608 @acronym{IMAP} server.  If you want to add some default options to
4609 mairix, you could do this here, but better use the variable
4610 @code{nnmairix-mairix-search-options} instead.
4611
4612 @item
4613 The name of the @strong{default search group}.  This will be the group
4614 where all temporary mairix searches are stored, i.e. all searches which
4615 are not bound to permanent @code{nnmairix} groups.  Choose whatever you
4616 like.
4617
4618 @item
4619 If the mail back end is @code{nnimap} or @code{nnmaildir}, you will be
4620 asked if you work with @strong{Maildir++}, i.e. with hidden maildir
4621 folders (=beginning with a dot).  For example, you have to answer
4622 @samp{yes} here if you work with the Dovecot @acronym{IMAP}
4623 server.  Otherwise, you should answer @samp{no} here.
4624
4625 @end itemize
4626
4627 @node nnmairix keyboard shortcuts
4628 @subsubsection nnmairix keyboard shortcuts
4629
4630 In group mode:
4631
4632 @table @kbd
4633
4634 @item G b c
4635 @kindex G b c (Group)
4636 @findex nnmairix-create-server-and-default-group
4637 Creates @code{nnmairix} server and default search group for this server
4638 (@code{nnmairix-create-server-and-default-group}).  You should have done
4639 this by now (@pxref{Configuring nnmairix}).
4640
4641 @item G b s
4642 @kindex G b s (Group)
4643 @findex nnmairix-search
4644 Prompts for query which is then sent to the mairix binary.  Search
4645 results are put into the default search group which is automatically
4646 displayed (@code{nnmairix-search}).
4647
4648 @item G b m
4649 @kindex G b m (Group)
4650 @findex nnmairix-widget-search
4651 Allows you to create a mairix search or a permanent group more
4652 comfortably using graphical widgets, similar to a customization
4653 group.  Just try it to see how it works (@code{nnmairix-widget-search}).
4654
4655 @item G b i
4656 @kindex G b i (Group)
4657 @findex nnmairix-search-interactive
4658 Another command for creating a mairix query more comfortably, but uses
4659 only the minibuffer (@code{nnmairix-search-interactive}).
4660
4661 @item G b g
4662 @kindex G b g (Group)
4663 @findex nnmairix-create-search-group
4664 Creates a permanent group which is associated with a search query
4665 (@code{nnmairix-create-search-group}).  The @code{nnmairix} back end
4666 automatically calls mairix when you update this group with @kbd{g} or
4667 @kbd{M-g}.
4668
4669 @item G b q
4670 @kindex G b q (Group)
4671 @findex nnmairix-group-change-query-this-group
4672 Changes the search query for the @code{nnmairix} group under cursor
4673 (@code{nnmairix-group-change-query-this-group}).
4674
4675 @item G b t
4676 @kindex G b t (Group)
4677 @findex nnmairix-group-toggle-threads-this-group
4678 Toggles the 'threads' parameter for the @code{nnmairix} group under cursor,
4679 i.e.  if you want see the whole threads of the found messages
4680 (@code{nnmairix-group-toggle-threads-this-group}).
4681
4682 @item G b u
4683 @kindex G b u (Group)
4684 @findex nnmairix-update-database
4685 @vindex nnmairix-mairix-update-options
4686 Calls mairix binary for updating the database
4687 (@code{nnmairix-update-database}).  The default parameters are @code{-F}
4688 and @code{-Q} for making this as fast as possible (see variable
4689 @code{nnmairix-mairix-update-options} for defining these default
4690 options).
4691
4692 @item G b r
4693 @kindex G b r (Group)
4694 @findex nnmairix-group-toggle-readmarks-this-group
4695 Keep articles in this @code{nnmairix} group always read or unread, or leave the
4696 marks unchanged (@code{nnmairix-group-toggle-readmarks-this-group}).
4697
4698 @item G b d
4699 @kindex G b d (Group)
4700 @findex nnmairix-group-delete-recreate-this-group
4701 Recreate @code{nnmairix} group on the ``real'' mail back end
4702 (@code{nnmairix-group-delete-recreate-this-group}).  You can do this if
4703 you always get wrong article counts with a @code{nnmairix} group.
4704
4705 @item G b a
4706 @kindex G b a (Group)
4707 @findex nnmairix-group-toggle-allowfast-this-group
4708 Toggles the @code{allow-fast} parameters for group under cursor
4709 (@code{nnmairix-group-toggle-allowfast-this-group}).  The default
4710 behavior of @code{nnmairix} is to do a mairix search every time you
4711 update or enter the group.  With the @code{allow-fast} parameter set,
4712 mairix will only be called when you explicitly update the group, but not
4713 upon entering.  This makes entering the group faster, but it may also
4714 lead to dangling symlinks if something changed between updating and
4715 entering the group which is not yet in the mairix database.
4716
4717 @item G b p
4718 @kindex G b p (Group)
4719 @findex nnmairix-group-toggle-propmarks-this-group
4720 Toggle marks propagation for this group
4721 (@code{nnmairix-group-toggle-propmarks-this-group}).  (@pxref{Propagating
4722 marks}).
4723
4724 @item G b o
4725 @kindex G b o (Group)
4726 @findex nnmairix-propagate-marks
4727 Manually propagate marks (@code{nnmairix-propagate-marks}); needed only when
4728 @code{nnmairix-propagate-marks-upon-close} is set to @code{nil}.
4729
4730 @end table
4731
4732 In summary mode:
4733
4734 @table @kbd
4735
4736 @item $ m
4737 @kindex $ m (Summary)
4738 @findex nnmairix-widget-search-from-this-article
4739 Allows you to create a mairix query or group based on the current
4740 message using graphical widgets (same as @code{nnmairix-widget-search})
4741 (@code{nnmairix-widget-search-from-this-article}).
4742
4743 @item $ g
4744 @kindex $ g (Summary)
4745 @findex nnmairix-create-search-group-from-message
4746 Interactively creates a new search group with query based on the current
4747 message, but uses the minibuffer instead of graphical widgets
4748 (@code{nnmairix-create-search-group-from-message}).
4749
4750 @item $ t
4751 @kindex $ t (Summary)
4752 @findex nnmairix-search-thread-this-article
4753 Searches thread for the current article
4754 (@code{nnmairix-search-thread-this-article}).  This is effectively a
4755 shortcut for calling @code{nnmairix-search} with @samp{m:msgid} of the
4756 current article and enabled threads.
4757
4758 @item $ f
4759 @kindex $ f (Summary)
4760 @findex nnmairix-search-from-this-article
4761 Searches all messages from sender of the current article
4762 (@code{nnmairix-search-from-this-article}).  This is a shortcut for
4763 calling @code{nnmairix-search} with @samp{f:From}.
4764
4765 @item $ o
4766 @kindex $ o (Summary)
4767 @findex nnmairix-goto-original-article
4768 (Only in @code{nnmairix} groups!) Tries determine the group this article
4769 originally came from and displays the article in this group, so that
4770 e.g. replying to this article the correct posting styles/group
4771 parameters are applied (@code{nnmairix-goto-original-article}).  This
4772 function will use the registry if available, but can also parse the
4773 article file name as a fallback method.
4774
4775 @item $ u
4776 @kindex $ u (Summary)
4777 @findex nnmairix-remove-tick-mark-original-article
4778 Remove possibly existing tick mark from original article
4779 (@code{nnmairix-remove-tick-mark-original-article}).  (@pxref{nnmairix
4780 tips and tricks}).
4781
4782 @end table
4783
4784 @node Propagating marks
4785 @subsubsection Propagating marks
4786
4787 First of: you really need a patched mairix binary for using the marks
4788 propagation feature efficiently. Otherwise, you would have to update
4789 the mairix database all the time. You can get the patch at
4790
4791 @uref{http://m61s02.vlinux.de/mairix-maildir-patch.tar}
4792
4793 You need the mairix v0.21 source code for this patch; everything else
4794 is explained in the accompanied readme file. If you don't want to use
4795 marks propagation, you don't have to apply these patches, but they also
4796 fix some annoyances regarding changing maildir flags, so it might still
4797 be useful to you.
4798
4799 With the patched mairix binary, you can use @code{nnmairix} as an
4800 alternative to mail splitting (@pxref{Fancy Mail Splitting}). For
4801 example, instead of splitting all mails from @samp{david@@foobar.com}
4802 into a group, you can simply create a search group with the query
4803 @samp{f:david@@foobar.com}. This is actually what ``smart folders'' are
4804 all about: simply put everything in one mail folder and dynamically
4805 create searches instead of splitting. This is more flexible, since you
4806 can dynamically change your folders any time you want to. This also
4807 implies that you will usually read your mails in the @code{nnmairix}
4808 groups instead of your ``real'' mail groups.
4809
4810 There is one problem, though: say you got a new mail from
4811 @samp{david@@foobar.com}; it will now show up in two groups, the
4812 ``real'' group (your INBOX, for example) and in the @code{nnmairix}
4813 search group (provided you have updated the mairix database). Now you
4814 enter the @code{nnmairix} group and read the mail. The mail will be
4815 marked as read, but only in the @code{nnmairix} group---in the ``real''
4816 mail group it will be still shown as unread.
4817
4818 You could now catch up the mail group (@pxref{Group Data}), but this is
4819 tedious and error prone, since you may overlook mails you don't have
4820 created @code{nnmairix} groups for. Of course, you could first use
4821 @code{nnmairix-goto-original-article} (@pxref{nnmairix keyboard
4822 shortcuts}) and then read the mail in the original group, but that's
4823 even more cumbersome.
4824
4825 Clearly, the easiest way would be if marks could somehow be
4826 automatically set for the original article. This is exactly what
4827 @emph{marks propagation} is about.
4828
4829 Marks propagation is deactivated by default. You can activate it for a
4830 certain @code{nnmairix} group with
4831 @code{nnmairix-group-toggle-propmarks-this-group} (bound to @kbd{G b
4832 p}). This function will warn you if you try to use it with your default
4833 search group; the reason is that the default search group is used for
4834 temporary searches, and it's easy to accidentally propagate marks from
4835 this group. However, you can ignore this warning if you really want to.
4836
4837 With marks propagation enabled, all the marks you set in a @code{nnmairix}
4838 group should now be propagated to the original article. For example,
4839 you can now tick an article (by default with @kbd{!}) and this mark should
4840 magically be set for the original article, too.
4841
4842 A few more remarks which you may or may not want to know:
4843
4844 @vindex nnmairix-propagate-marks-upon-close
4845 Marks will not be set immediately, but only upon closing a group. This
4846 not only makes marks propagation faster, it also avoids problems with
4847 dangling symlinks when dealing with maildir files (since changing flags
4848 will change the file name). You can also control when to propagate marks
4849 via @code{nnmairix-propagate-marks-upon-close} (see the doc-string for
4850 details).
4851
4852 Obviously, @code{nnmairix} will have to look up the original group for every
4853 article you want to set marks for. If available, @code{nnmairix} will first use
4854 the registry for determining the original group. The registry is very
4855 fast, hence you should really, really enable the registry when using
4856 marks propagation. If you don't have to worry about RAM and disc space,
4857 set @code{gnus-registry-max-entries} to a large enough value; to be on
4858 the safe side, choose roughly the amount of mails you index with mairix.
4859
4860 @vindex nnmairix-only-use-registry
4861 If you don't want to use the registry or the registry hasn't seen the
4862 original article yet, @code{nnmairix} will use an additional mairix
4863 search for determining the file name of the article. This, of course, is
4864 way slower than the registry---if you set hundreds or even thousands of
4865 marks this way, it might take some time. You can avoid this situation by
4866 setting @code{nnmairix-only-use-registry} to t.
4867
4868 Maybe you also want to propagate marks the other way round, i.e. if you
4869 tick an article in a "real" mail group, you'd like to have the same
4870 article in a @code{nnmairix} group ticked, too. For several good
4871 reasons, this can only be done efficiently if you use maildir. To
4872 immediately contradict myself, let me mention that it WON'T work with
4873 @code{nnmaildir}, since @code{nnmaildir} stores the marks externally and
4874 not in the file name. Therefore, propagating marks to @code{nnmairix}
4875 groups will usually only work if you use an IMAP server which uses
4876 maildir as its file format.
4877
4878 @vindex nnmairix-propagate-marks-to-nnmairix-groups
4879 If you work with this setup, just set
4880 @code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t} and see what
4881 happens. If you don't like what you see, just set it to @code{nil} again. One
4882 problem might be that you get a wrong number of unread articles; this
4883 usually happens when you delete or expire articles in the original
4884 groups. When this happens, you can recreate the @code{nnmairix} group on the
4885 back end using @kbd{G b d}.
4886
4887 @node nnmairix tips and tricks
4888 @subsubsection nnmairix tips and tricks
4889
4890 @itemize
4891 @item
4892 Checking Mail
4893
4894 @findex nnmairix-update-groups
4895 I put all my important mail groups at group level 1. The mairix groups
4896 have group level 5, so they do not get checked at start up (@pxref{Group
4897 Levels}).
4898
4899 I use the following to check for mails:
4900
4901 @lisp
4902 (defun my-check-mail-mairix-update (level)
4903   (interactive "P")
4904   ;; if no prefix given, set level=1
4905   (gnus-group-get-new-news (or level 1))
4906   (nnmairix-update-groups "mairixsearch" t t)
4907   (gnus-group-list-groups))
4908
4909 (define-key gnus-group-mode-map "g" 'my-check-mail-mairix-update)
4910 @end lisp
4911
4912 Instead of @samp{"mairixsearch"} use the name of your @code{nnmairix}
4913 server. See the doc string for @code{nnmairix-update-groups} for
4914 details.
4915
4916 @item
4917 Example: search group for ticked articles
4918
4919 For example, you can create a group for all ticked articles, where the
4920 articles always stay unread:
4921
4922 Hit @kbd{G b g}, enter group name (e.g. @samp{important}), use
4923 @samp{F:f} as query and do not include threads.
4924
4925 Now activate marks propagation for this group by using @kbd{G b p}. Then
4926 activate the always-unread feature by using @kbd{G b r} twice.
4927
4928 So far so good---but how do you remove the tick marks in the @code{nnmairix}
4929 group?  There are two options: You may simply use
4930 @code{nnmairix-remove-tick-mark-original-article} (bound to @kbd{$ u}) to remove
4931 tick marks from the original article. The other possibility is to set
4932 @code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t}, but see the above
4933 comments about this option.  If it works for you, the tick marks should
4934 also exist in the @code{nnmairix} group and you can remove them as usual,
4935 e.g. by marking an article as read.
4936
4937 When you have removed a tick mark from the original article, this
4938 article should vanish from the @code{nnmairix} group after you have updated the
4939 mairix database and updated the group.  Fortunately, there is a function
4940 for doing exactly that: @code{nnmairix-update-groups}. See the previous code
4941 snippet and the doc string for details.
4942
4943 @item
4944 Dealing with auto-subscription of mail groups
4945
4946 As described before, all @code{nnmairix} groups are in fact stored on
4947 the mail back end in the form @samp{zz_mairix-<NAME>-<NUMBER>}. You can
4948 see them when you enter the back end server in the server buffer. You
4949 should not subscribe these groups! Unfortunately, these groups will
4950 usually get @emph{auto-subscribed} when you use @code{nnmaildir} or
4951 @code{nnml}, i.e. you will suddenly see groups of the form
4952 @samp{zz_mairix*} pop up in your group buffer. If this happens to you,
4953 simply kill these groups with C-k.  For avoiding this, turn off
4954 auto-subscription completely by setting the variable
4955 @code{gnus-auto-subscribed-groups} to @code{nil} (@pxref{Filtering New
4956 Groups}), or if you like to keep this feature use the following kludge
4957 for turning it off for all groups beginning with @samp{zz_}:
4958
4959 @lisp
4960 (setq gnus-auto-subscribed-groups
4961       "^\\(nnml\\|nnfolder\\|nnmbox\\|nnmh\\|nnbabyl\\|nnmaildir\\).*:\\([^z]\\|z$\\|\\z[^z]\\|zz$\\|zz[^_]\\|zz_$\\).*")
4962 @end lisp
4963
4964 @end itemize
4965
4966 @node nnmairix caveats
4967 @subsubsection nnmairix caveats
4968
4969 @itemize
4970 @item
4971 If you use the Gnus agent (@pxref{Gnus Unplugged}): don't agentize
4972 @code{nnmairix} groups (though I have no idea what happens if you do).
4973
4974 @item
4975 If you use the Gnus registry: don't use the registry with
4976 @code{nnmairix} groups (put them in
4977 @code{gnus-registry-unfollowed-groups}).  Be @emph{extra careful} if
4978 you use @code{gnus-registry-split-fancy-with-parent}; mails which are
4979 split into @code{nnmairix} groups are usually gone for good as soon as
4980 you check the group for new mail (yes, it has happened to me...).
4981
4982 @item
4983 Therefore: @emph{Never ever} put ``real'' mails into @code{nnmairix}
4984 groups (you shouldn't be able to, anyway).
4985
4986 @item
4987 mairix does only support us-ascii characters.
4988
4989 @item
4990 @code{nnmairix} uses a rather brute force method to force Gnus to
4991 completely reread the group on the mail back end after mairix was
4992 called---it simply deletes and re-creates the group on the mail
4993 back end. So far, this has worked for me without any problems, and I
4994 don't see how @code{nnmairix} could delete other mail groups than its
4995 own, but anyway: you really should have a backup of your mail
4996 folders.
4997
4998 @item
4999 All necessary information is stored in the group parameters
5000 (@pxref{Group Parameters}). This has the advantage that no active file
5001 is needed, but also implies that when you kill a @code{nnmairix} group,
5002 it is gone for good.
5003
5004 @item
5005 @findex nnmairix-purge-old-groups
5006 If you create and kill a lot of @code{nnmairix} groups, the
5007 ``zz_mairix-*'' groups will accumulate on the mail back end server. To
5008 delete old groups which are no longer needed, call
5009 @code{nnmairix-purge-old-groups}. Note that this assumes that you don't
5010 save any ``real'' mail in folders of the form
5011 @code{zz_mairix-<NAME>-<NUMBER>}. You can change the prefix of
5012 @code{nnmairix} groups by changing the variable
5013 @code{nnmairix-group-prefix}.
5014
5015 @item
5016 The following only applies if you @emph{don't} use the mentioned patch
5017 for mairix (@pxref{Propagating marks}):
5018
5019 A problem can occur when using @code{nnmairix} with maildir folders and
5020 comes with the fact that maildir stores mail flags like @samp{Seen} or
5021 @samp{Replied} by appending chars @samp{S} and @samp{R} to the message
5022 file name, respectively. This implies that currently you would have to
5023 update the mairix database not only when new mail arrives, but also when
5024 mail flags are changing. The same applies to new mails which are indexed
5025 while they are still in the @samp{new} folder but then get moved to
5026 @samp{cur} when Gnus has seen the mail. If you don't update the database
5027 after this has happened, a mairix query can lead to symlinks pointing to
5028 non-existing files. In Gnus, these messages will usually appear with
5029 ``(none)'' entries in the header and can't be accessed. If this happens
5030 to you, using @kbd{G b u} and updating the group will usually fix this.
5031
5032 @end itemize
5033
5034 @node Misc Group Stuff
5035 @section Misc Group Stuff
5036
5037 @menu
5038 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
5039 * Group Information::           Information and help on groups and Gnus.
5040 * Group Timestamp::             Making Gnus keep track of when you last read a group.
5041 * File Commands::               Reading and writing the Gnus files.
5042 * Sieve Commands::              Managing Sieve scripts.
5043 @end menu
5044
5045 @table @kbd
5046
5047 @item v
5048 @kindex v (Group)
5049 @cindex keys, reserved for users (Group)
5050 The key @kbd{v} is reserved for users.  You can bind it to some
5051 command or better use it as a prefix key.  For example:
5052
5053 @lisp
5054 (define-key gnus-group-mode-map (kbd "v j d")
5055   (lambda ()
5056     (interactive)
5057     (gnus-group-jump-to-group "nndraft:drafts")))
5058 @end lisp
5059
5060 On keys reserved for users in Emacs and on keybindings in general
5061 @xref{Keymaps, Keymaps, , emacs, The Emacs Editor}.
5062
5063 @item ^
5064 @kindex ^ (Group)
5065 @findex gnus-group-enter-server-mode
5066 Enter the server buffer (@code{gnus-group-enter-server-mode}).
5067 @xref{Server Buffer}.
5068
5069 @item a
5070 @kindex a (Group)
5071 @findex gnus-group-post-news
5072 Start composing a message (a news by default)
5073 (@code{gnus-group-post-news}).  If given a prefix, post to the group
5074 under the point.  If the prefix is 1, prompt for a group to post to.
5075 Contrary to what the name of this function suggests, the prepared
5076 article might be a mail instead of a news, if a mail group is specified
5077 with the prefix argument.  @xref{Composing Messages}.
5078
5079 @item m
5080 @kindex m (Group)
5081 @findex gnus-group-mail
5082 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
5083 use the posting style of the group under the point.  If the prefix is 1,
5084 prompt for a group name to find the posting style.
5085 @xref{Composing Messages}.
5086
5087 @item i
5088 @kindex i (Group)
5089 @findex gnus-group-news
5090 Start composing a news (@code{gnus-group-news}).  If given a prefix,
5091 post to the group under the point.  If the prefix is 1, prompt
5092 for group to post to.  @xref{Composing Messages}.
5093
5094 This function actually prepares a news even when using mail groups.
5095 This is useful for ``posting'' messages to mail groups without actually
5096 sending them over the network: they're just saved directly to the group
5097 in question.  The corresponding back end must have a request-post method
5098 for this to work though.
5099
5100 @item G z
5101 @kindex G z (Group)
5102 @findex gnus-group-compact-group
5103
5104 Compact the group under point (@code{gnus-group-compact-group}).
5105 Currently implemented only in nnml (@pxref{Mail Spool}).  This removes
5106 gaps between article numbers, hence getting a correct total article
5107 count.
5108
5109 @end table
5110
5111 Variables for the group buffer:
5112
5113 @table @code
5114
5115 @item gnus-group-mode-hook
5116 @vindex gnus-group-mode-hook
5117 is called after the group buffer has been
5118 created.
5119
5120 @item gnus-group-prepare-hook
5121 @vindex gnus-group-prepare-hook
5122 is called after the group buffer is
5123 generated.  It may be used to modify the buffer in some strange,
5124 unnatural way.
5125
5126 @item gnus-group-prepared-hook
5127 @vindex gnus-group-prepare-hook
5128 is called as the very last thing after the group buffer has been
5129 generated.  It may be used to move point around, for instance.
5130
5131 @item gnus-permanently-visible-groups
5132 @vindex gnus-permanently-visible-groups
5133 Groups matching this regexp will always be listed in the group buffer,
5134 whether they are empty or not.
5135
5136 @end table
5137
5138 @node Scanning New Messages
5139 @subsection Scanning New Messages
5140 @cindex new messages
5141 @cindex scanning new news
5142
5143 @table @kbd
5144
5145 @item g
5146 @kindex g (Group)
5147 @findex gnus-group-get-new-news
5148 @c @icon{gnus-group-get-new-news}
5149 Check the server(s) for new articles.  If the numerical prefix is used,
5150 this command will check only groups of level @var{arg} and lower
5151 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
5152 command will force a total re-reading of the active file(s) from the
5153 back end(s).
5154
5155 @item M-g
5156 @kindex M-g (Group)
5157 @findex gnus-group-get-new-news-this-group
5158 @vindex gnus-goto-next-group-when-activating
5159 @c @icon{gnus-group-get-new-news-this-group}
5160 Check whether new articles have arrived in the current group
5161 (@code{gnus-group-get-new-news-this-group}).
5162 @code{gnus-goto-next-group-when-activating} says whether this command is
5163 to move point to the next group or not.  It is @code{t} by default.
5164
5165 @findex gnus-activate-all-groups
5166 @cindex activating groups
5167 @item C-c M-g
5168 @kindex C-c M-g (Group)
5169 Activate absolutely all groups (@code{gnus-activate-all-groups}).
5170
5171 @item R
5172 @kindex R (Group)
5173 @cindex restarting
5174 @findex gnus-group-restart
5175 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
5176 file(s), closes the connection to all servers, clears up all run-time
5177 Gnus variables, and then starts Gnus all over again.
5178
5179 @end table
5180
5181 @vindex gnus-get-new-news-hook
5182 @code{gnus-get-new-news-hook} is run just before checking for new news.
5183
5184 @vindex gnus-after-getting-new-news-hook
5185 @code{gnus-after-getting-new-news-hook} is run after checking for new
5186 news.
5187
5188
5189 @node Group Information
5190 @subsection Group Information
5191 @cindex group information
5192 @cindex information on groups
5193
5194 @table @kbd
5195
5196
5197 @item H f
5198 @kindex H f (Group)
5199 @findex gnus-group-fetch-faq
5200 @vindex gnus-group-faq-directory
5201 @cindex FAQ
5202 @cindex ange-ftp
5203 Try to fetch the @acronym{FAQ} for the current group
5204 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
5205 from @code{gnus-group-faq-directory}, which is usually a directory on
5206 a remote machine.  This variable can also be a list of directories.
5207 In that case, giving a prefix to this command will allow you to choose
5208 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
5209 used for fetching the file.
5210
5211 If fetching from the first site is unsuccessful, Gnus will attempt to go
5212 through @code{gnus-group-faq-directory} and try to open them one by one.
5213
5214 @item H c
5215 @kindex H c (Group)
5216 @findex gnus-group-fetch-charter
5217 @vindex gnus-group-charter-alist
5218 @cindex charter
5219 Try to open the charter for the current group in a web browser
5220 (@code{gnus-group-fetch-charter}).  Query for a group if given a
5221 prefix argument.
5222
5223 Gnus will use @code{gnus-group-charter-alist} to find the location of
5224 the charter.  If no location is known, Gnus will fetch the control
5225 messages for the group, which in some cases includes the charter.
5226
5227 @item H C
5228 @kindex H C (Group)
5229 @findex gnus-group-fetch-control
5230 @vindex gnus-group-fetch-control-use-browse-url
5231 @cindex control message
5232 Fetch the control messages for the group from the archive at
5233 @code{ftp.isc.org} (@code{gnus-group-fetch-control}).  Query for a
5234 group if given a prefix argument.
5235
5236 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
5237 Gnus will open the control messages in a browser using
5238 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
5239 and displayed in an ephemeral group.
5240
5241 Note that the control messages are compressed.  To use this command
5242 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
5243 Files, ,Compressed Files, emacs, The Emacs Manual}).
5244
5245 @item H d
5246 @itemx C-c C-d
5247 @c @icon{gnus-group-describe-group}
5248 @kindex H d (Group)
5249 @kindex C-c C-d (Group)
5250 @cindex describing groups
5251 @cindex group description
5252 @findex gnus-group-describe-group
5253 Describe the current group (@code{gnus-group-describe-group}).  If given
5254 a prefix, force Gnus to re-read the description from the server.
5255
5256 @item M-d
5257 @kindex M-d (Group)
5258 @findex gnus-group-describe-all-groups
5259 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
5260 prefix, force Gnus to re-read the description file from the server.
5261
5262 @item H v
5263 @itemx V
5264 @kindex V (Group)
5265 @kindex H v (Group)
5266 @cindex version
5267 @findex gnus-version
5268 Display current Gnus version numbers (@code{gnus-version}).
5269
5270 @item ?
5271 @kindex ? (Group)
5272 @findex gnus-group-describe-briefly
5273 Give a very short help message (@code{gnus-group-describe-briefly}).
5274
5275 @item C-c C-i
5276 @kindex C-c C-i (Group)
5277 @cindex info
5278 @cindex manual
5279 @findex gnus-info-find-node
5280 Go to the Gnus info node (@code{gnus-info-find-node}).
5281 @end table
5282
5283
5284 @node Group Timestamp
5285 @subsection Group Timestamp
5286 @cindex timestamps
5287 @cindex group timestamps
5288
5289 It can be convenient to let Gnus keep track of when you last read a
5290 group.  To set the ball rolling, you should add
5291 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
5292
5293 @lisp
5294 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
5295 @end lisp
5296
5297 After doing this, each time you enter a group, it'll be recorded.
5298
5299 This information can be displayed in various ways---the easiest is to
5300 use the @samp{%d} spec in the group line format:
5301
5302 @lisp
5303 (setq gnus-group-line-format
5304       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
5305 @end lisp
5306
5307 This will result in lines looking like:
5308
5309 @example
5310 *        0: mail.ding                                19961002T012943
5311          0: custom                                   19961002T012713
5312 @end example
5313
5314 As you can see, the date is displayed in compact ISO 8601 format.  This
5315 may be a bit too much, so to just display the date, you could say
5316 something like:
5317
5318 @lisp
5319 (setq gnus-group-line-format
5320       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
5321 @end lisp
5322
5323 If you would like greater control of the time format, you can use a
5324 user-defined format spec.  Something like the following should do the
5325 trick:
5326
5327 @lisp
5328 (setq gnus-group-line-format
5329       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
5330 (defun gnus-user-format-function-d (headers)
5331   (let ((time (gnus-group-timestamp gnus-tmp-group)))
5332     (if time
5333         (format-time-string "%b %d  %H:%M" time)
5334       "")))
5335 @end lisp
5336
5337
5338 @node File Commands
5339 @subsection File Commands
5340 @cindex file commands
5341
5342 @table @kbd
5343
5344 @item r
5345 @kindex r (Group)
5346 @findex gnus-group-read-init-file
5347 @vindex gnus-init-file
5348 @cindex reading init file
5349 Re-read the init file (@code{gnus-init-file}, which defaults to
5350 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
5351
5352 @item s
5353 @kindex s (Group)
5354 @findex gnus-group-save-newsrc
5355 @cindex saving .newsrc
5356 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
5357 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
5358 file(s) whether Gnus thinks it is necessary or not.
5359
5360 @c @item Z
5361 @c @kindex Z (Group)
5362 @c @findex gnus-group-clear-dribble
5363 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
5364
5365 @end table
5366
5367
5368 @node Sieve Commands
5369 @subsection Sieve Commands
5370 @cindex group sieve commands
5371
5372 Sieve is a server-side mail filtering language.  In Gnus you can use
5373 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
5374 sieve rules that should apply to each group.  Gnus provides two
5375 commands to translate all these group parameters into a proper Sieve
5376 script that can be transfered to the server somehow.
5377
5378 @vindex gnus-sieve-file
5379 @vindex gnus-sieve-region-start
5380 @vindex gnus-sieve-region-end
5381 The generated Sieve script is placed in @code{gnus-sieve-file} (by
5382 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
5383 between two delimiters, @code{gnus-sieve-region-start} and
5384 @code{gnus-sieve-region-end}, so you may write additional Sieve code
5385 outside these delimiters that will not be removed the next time you
5386 regenerate the Sieve script.
5387
5388 @vindex gnus-sieve-crosspost
5389 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
5390 is generated.  If it is non-@code{nil} (the default) articles is
5391 placed in all groups that have matching rules, otherwise the article
5392 is only placed in the group with the first matching rule.  For
5393 example, the group parameter @samp{(sieve address "sender"
5394 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
5395 code if @code{gnus-sieve-crosspost} is @code{nil}.  (When
5396 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
5397 except that the line containing the call to @code{stop} is removed.)
5398
5399 @example
5400 if address "sender" "owner-ding@@hpc.uh.edu" @{
5401         fileinto "INBOX.ding";
5402         stop;
5403 @}
5404 @end example
5405
5406 @xref{Top, Emacs Sieve, Top, sieve, Emacs Sieve}.
5407
5408 @table @kbd
5409
5410 @item D g
5411 @kindex D g (Group)
5412 @findex gnus-sieve-generate
5413 @vindex gnus-sieve-file
5414 @cindex generating sieve script
5415 Regenerate a Sieve script from the @code{sieve} group parameters and
5416 put you into the @code{gnus-sieve-file} without saving it.
5417
5418 @item D u
5419 @kindex D u (Group)
5420 @findex gnus-sieve-update
5421 @vindex gnus-sieve-file
5422 @cindex updating sieve script
5423 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
5424 @code{sieve} group parameters, save the file and upload it to the
5425 server using the @code{sieveshell} program.
5426
5427 @end table
5428
5429
5430 @node Summary Buffer
5431 @chapter Summary Buffer
5432 @cindex summary buffer
5433
5434 A line for each article is displayed in the summary buffer.  You can
5435 move around, read articles, post articles and reply to articles.
5436
5437 The most common way to a summary buffer is to select a group from the
5438 group buffer (@pxref{Selecting a Group}).
5439
5440 You can have as many summary buffers open as you wish.
5441
5442 You can customize the Summary Mode tool bar, see @kbd{M-x
5443 customize-apropos RET gnus-summary-tool-bar}.  This feature is only
5444 available in Emacs.
5445
5446 @kindex v (Summary)
5447 @cindex keys, reserved for users (Summary)
5448 The key @kbd{v} is reserved for users.  You can bind it to some
5449 command or better use it as a prefix key.  For example:
5450 @lisp
5451 (define-key gnus-summary-mode-map (kbd "v -") "LrS") ;; lower subthread
5452 @end lisp
5453
5454 @menu
5455 * Summary Buffer Format::       Deciding how the summary buffer is to look.
5456 * Summary Maneuvering::         Moving around the summary buffer.
5457 * Choosing Articles::           Reading articles.
5458 * Paging the Article::          Scrolling the current article.
5459 * Reply Followup and Post::     Posting articles.
5460 * Delayed Articles::            Send articles at a later time.
5461 * Marking Articles::            Marking articles as read, expirable, etc.
5462 * Limiting::                    You can limit the summary buffer.
5463 * Threading::                   How threads are made.
5464 * Sorting the Summary Buffer::  How articles and threads are sorted.
5465 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
5466 * Article Caching::             You may store articles in a cache.
5467 * Persistent Articles::         Making articles expiry-resistant.
5468 * Sticky Articles::             Article buffers that are not reused.
5469 * Article Backlog::             Having already read articles hang around.
5470 * Saving Articles::             Ways of customizing article saving.
5471 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
5472 * Article Treatment::           The article buffer can be mangled at will.
5473 * MIME Commands::               Doing MIMEy things with the articles.
5474 * Charsets::                    Character set issues.
5475 * Article Commands::            Doing various things with the article buffer.
5476 * Summary Sorting::             Sorting the summary buffer in various ways.
5477 * Finding the Parent::          No child support? Get the parent.
5478 * Alternative Approaches::      Reading using non-default summaries.
5479 * Tree Display::                A more visual display of threads.
5480 * Mail Group Commands::         Some commands can only be used in mail groups.
5481 * Various Summary Stuff::       What didn't fit anywhere else.
5482 * Exiting the Summary Buffer::  Returning to the Group buffer,
5483                                 or reselecting the current group.
5484 * Crosspost Handling::          How crossposted articles are dealt with.
5485 * Duplicate Suppression::       An alternative when crosspost handling fails.
5486 * Security::                    Decrypt and Verify.
5487 * Mailing List::                Mailing list minor mode.
5488 @end menu
5489
5490
5491 @node Summary Buffer Format
5492 @section Summary Buffer Format
5493 @cindex summary buffer format
5494
5495 @iftex
5496 @iflatex
5497 \gnusfigure{The Summary Buffer}{180}{
5498 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
5499 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
5500 }
5501 @end iflatex
5502 @end iftex
5503
5504 @menu
5505 * Summary Buffer Lines::        You can specify how summary lines should look.
5506 * To From Newsgroups::          How to not display your own name.
5507 * Summary Buffer Mode Line::    You can say how the mode line should look.
5508 * Summary Highlighting::        Making the summary buffer all pretty and nice.
5509 @end menu
5510
5511 @findex mail-extract-address-components
5512 @findex gnus-extract-address-components
5513 @vindex gnus-extract-address-components
5514 Gnus will use the value of the @code{gnus-extract-address-components}
5515 variable as a function for getting the name and address parts of a
5516 @code{From} header.  Two pre-defined functions exist:
5517 @code{gnus-extract-address-components}, which is the default, quite
5518 fast, and too simplistic solution; and
5519 @code{mail-extract-address-components}, which works very nicely, but is
5520 slower.  The default function will return the wrong answer in 5% of the
5521 cases.  If this is unacceptable to you, use the other function instead:
5522
5523 @lisp
5524 (setq gnus-extract-address-components
5525       'mail-extract-address-components)
5526 @end lisp
5527
5528 @vindex gnus-summary-same-subject
5529 @code{gnus-summary-same-subject} is a string indicating that the current
5530 article has the same subject as the previous.  This string will be used
5531 with those specs that require it.  The default is @code{""}.
5532
5533
5534 @node Summary Buffer Lines
5535 @subsection Summary Buffer Lines
5536
5537 @vindex gnus-summary-line-format
5538 You can change the format of the lines in the summary buffer by changing
5539 the @code{gnus-summary-line-format} variable.  It works along the same
5540 lines as a normal @code{format} string, with some extensions
5541 (@pxref{Formatting Variables}).
5542
5543 There should always be a colon or a point position marker on the line;
5544 the cursor always moves to the point position marker or the colon after
5545 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
5546 possible to change this.  Just write a new function
5547 @code{gnus-goto-colon} which does whatever you like with the cursor.)
5548 @xref{Positioning Point}.
5549
5550 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
5551
5552 The following format specification characters and extended format
5553 specification(s) are understood:
5554
5555 @table @samp
5556 @item N
5557 Article number.
5558 @item S
5559 Subject string.  List identifiers stripped,
5560 @code{gnus-list-identifiers}.  @xref{Article Hiding}.
5561 @item s
5562 Subject if the article is the root of the thread or the previous article
5563 had a different subject, @code{gnus-summary-same-subject} otherwise.
5564 (@code{gnus-summary-same-subject} defaults to @code{""}.)
5565 @item F
5566 Full @code{From} header.
5567 @item n
5568 The name (from the @code{From} header).
5569 @item f
5570 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
5571 From Newsgroups}).
5572 @item a
5573 The name (from the @code{From} header).  This differs from the @code{n}
5574 spec in that it uses the function designated by the
5575 @code{gnus-extract-address-components} variable, which is slower, but
5576 may be more thorough.
5577 @item A
5578 The address (from the @code{From} header).  This works the same way as
5579 the @code{a} spec.
5580 @item L
5581 Number of lines in the article.
5582 @item c
5583 Number of characters in the article.  This specifier is not supported
5584 in some methods (like nnfolder).
5585 @item k
5586 Pretty-printed version of the number of characters in the article;
5587 for example, @samp{1.2k} or @samp{0.4M}.
5588 @item I
5589 Indentation based on thread level (@pxref{Customizing Threading}).
5590 @item B
5591 A complex trn-style thread tree, showing response-connecting trace
5592 lines.  A thread could be drawn like this:
5593
5594 @example
5595 >
5596 +->
5597 | +->
5598 | | \->
5599 | |   \->
5600 | \->
5601 +->
5602 \->
5603 @end example
5604
5605 You can customize the appearance with the following options.  Note
5606 that it is possible to make the thread display look really neat by
5607 replacing the default @acronym{ASCII} characters with graphic
5608 line-drawing glyphs.
5609 @table @code
5610 @item gnus-sum-thread-tree-root
5611 @vindex gnus-sum-thread-tree-root
5612 Used for the root of a thread.  If @code{nil}, use subject
5613 instead.  The default is @samp{> }.
5614
5615 @item gnus-sum-thread-tree-false-root
5616 @vindex gnus-sum-thread-tree-false-root
5617 Used for the false root of a thread (@pxref{Loose Threads}).  If
5618 @code{nil}, use subject instead.  The default is @samp{> }.
5619
5620 @item gnus-sum-thread-tree-single-indent
5621 @vindex gnus-sum-thread-tree-single-indent
5622 Used for a thread with just one message.  If @code{nil}, use subject
5623 instead.  The default is @samp{}.
5624
5625 @item gnus-sum-thread-tree-vertical
5626 @vindex gnus-sum-thread-tree-vertical
5627 Used for drawing a vertical line.  The default is @samp{| }.
5628
5629 @item gnus-sum-thread-tree-indent
5630 @vindex gnus-sum-thread-tree-indent
5631 Used for indenting.  The default is @samp{  }.
5632
5633 @item gnus-sum-thread-tree-leaf-with-other
5634 @vindex gnus-sum-thread-tree-leaf-with-other
5635 Used for a leaf with brothers.  The default is @samp{+-> }.
5636
5637 @item gnus-sum-thread-tree-single-leaf
5638 @vindex gnus-sum-thread-tree-single-leaf
5639 Used for a leaf without brothers.  The default is @samp{\-> }
5640
5641 @end table
5642
5643 @item T
5644 Nothing if the article is a root and lots of spaces if it isn't (it
5645 pushes everything after it off the screen).
5646 @item [
5647 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
5648 for adopted articles (@pxref{Customizing Threading}).
5649 @item ]
5650 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
5651 for adopted articles.
5652 @item >
5653 One space for each thread level.
5654 @item <
5655 Twenty minus thread level spaces.
5656 @item U
5657 Unread.  @xref{Read Articles}.
5658
5659 @item R
5660 This misleadingly named specifier is the @dfn{secondary mark}.  This
5661 mark will say whether the article has been replied to, has been cached,
5662 or has been saved.  @xref{Other Marks}.
5663
5664 @item i
5665 Score as a number (@pxref{Scoring}).
5666 @item z
5667 @vindex gnus-summary-zcore-fuzz
5668 Zcore, @samp{+} if above the default level and @samp{-} if below the
5669 default level.  If the difference between
5670 @code{gnus-summary-default-score} and the score is less than
5671 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
5672 @item V
5673 Total thread score.
5674 @item x
5675 @code{Xref}.
5676 @item D
5677 @code{Date}.
5678 @item d
5679 The @code{Date} in @code{DD-MMM} format.
5680 @item o
5681 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
5682 @item M
5683 @code{Message-ID}.
5684 @item r
5685 @code{References}.
5686 @item t
5687 Number of articles in the current sub-thread.  Using this spec will slow
5688 down summary buffer generation somewhat.
5689 @item e
5690 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
5691 article has any children.
5692 @item P
5693 The line number.
5694 @item O
5695 Download mark.
5696 @item *
5697 Desired cursor position (instead of after first colon).
5698 @item &user-date;
5699 Age sensitive date format.  Various date format is defined in
5700 @code{gnus-user-date-format-alist}.
5701 @item u
5702 User defined specifier.  The next character in the format string should
5703 be a letter.  Gnus will call the function
5704 @code{gnus-user-format-function-@var{x}}, where @var{x} is the letter
5705 following @samp{%u}.  The function will be passed the current header as
5706 argument.  The function should return a string, which will be inserted
5707 into the summary just like information from any other summary specifier.
5708 @end table
5709
5710 Text between @samp{%(} and @samp{%)} will be highlighted with
5711 @code{gnus-mouse-face} when the mouse point is placed inside the area.
5712 There can only be one such area.
5713
5714 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
5715 have to be handled with care.  For reasons of efficiency, Gnus will
5716 compute what column these characters will end up in, and ``hard-code''
5717 that.  This means that it is invalid to have these specs after a
5718 variable-length spec.  Well, you might not be arrested, but your summary
5719 buffer will look strange, which is bad enough.
5720
5721 The smart choice is to have these specs as far to the left as possible.
5722 (Isn't that the case with everything, though?  But I digress.)
5723
5724 This restriction may disappear in later versions of Gnus.
5725
5726
5727 @node To From Newsgroups
5728 @subsection To From Newsgroups
5729 @cindex To
5730 @cindex Newsgroups
5731
5732 In some groups (particularly in archive groups), the @code{From} header
5733 isn't very interesting, since all the articles there are written by
5734 you.  To display the information in the @code{To} or @code{Newsgroups}
5735 headers instead, you need to decide three things: What information to
5736 gather; where to display it; and when to display it.
5737
5738 @enumerate
5739 @item
5740 @vindex gnus-extra-headers
5741 The reading of extra header information is controlled by the
5742 @code{gnus-extra-headers}.  This is a list of header symbols.  For
5743 instance:
5744
5745 @lisp
5746 (setq gnus-extra-headers
5747       '(To Newsgroups X-Newsreader))
5748 @end lisp
5749
5750 This will result in Gnus trying to obtain these three headers, and
5751 storing it in header structures for later easy retrieval.
5752
5753 @item
5754 @findex gnus-extra-header
5755 The value of these extra headers can be accessed via the
5756 @code{gnus-extra-header} function.  Here's a format line spec that will
5757 access the @code{X-Newsreader} header:
5758
5759 @example
5760 "%~(form (gnus-extra-header 'X-Newsreader))@@"
5761 @end example
5762
5763 @item
5764 @vindex gnus-ignored-from-addresses
5765 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
5766 summary line spec returns the @code{To}, @code{Newsreader} or
5767 @code{From} header.  If this regexp matches the contents of the
5768 @code{From} header, the value of the @code{To} or @code{Newsreader}
5769 headers are used instead.
5770
5771 To distinguish regular articles from those where the @code{From} field
5772 has been swapped, a string is prefixed to the @code{To} or
5773 @code{Newsgroups} header in the summary line.  By default the string is
5774 @samp{-> } for @code{To} and @samp{=> } for @code{Newsgroups}, you can
5775 customize these strings with @code{gnus-summary-to-prefix} and
5776 @code{gnus-summary-newsgroup-prefix}.
5777
5778 @end enumerate
5779
5780 @vindex nnmail-extra-headers
5781 A related variable is @code{nnmail-extra-headers}, which controls when
5782 to include extra headers when generating overview (@acronym{NOV}) files.
5783 If you have old overview files, you should regenerate them after
5784 changing this variable, by entering the server buffer using @kbd{^},
5785 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
5786 regeneration.
5787
5788 @vindex gnus-summary-line-format
5789 You also have to instruct Gnus to display the data by changing the
5790 @code{%n} spec to the @code{%f} spec in the
5791 @code{gnus-summary-line-format} variable.
5792
5793 In summary, you'd typically put something like the following in
5794 @file{~/.gnus.el}:
5795
5796 @lisp
5797 (setq gnus-extra-headers
5798       '(To Newsgroups))
5799 (setq nnmail-extra-headers gnus-extra-headers)
5800 (setq gnus-summary-line-format
5801       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
5802 (setq gnus-ignored-from-addresses
5803       "Your Name Here")
5804 @end lisp
5805
5806 (The values listed above are the default values in Gnus.  Alter them
5807 to fit your needs.)
5808
5809 A note for news server administrators, or for users who wish to try to
5810 convince their news server administrator to provide some additional
5811 support:
5812
5813 The above is mostly useful for mail groups, where you have control over
5814 the @acronym{NOV} files that are created.  However, if you can persuade your
5815 nntp admin to add (in the usual implementation, notably INN):
5816
5817 @example
5818 Newsgroups:full
5819 @end example
5820
5821 to the end of her @file{overview.fmt} file, then you can use that just
5822 as you would the extra headers from the mail groups.
5823
5824
5825 @node Summary Buffer Mode Line
5826 @subsection Summary Buffer Mode Line
5827
5828 @vindex gnus-summary-mode-line-format
5829 You can also change the format of the summary mode bar (@pxref{Mode Line
5830 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
5831 like.  The default is @samp{Gnus: %%b [%A] %Z}.
5832
5833 Here are the elements you can play with:
5834
5835 @table @samp
5836 @item G
5837 Group name.
5838 @item p
5839 Unprefixed group name.
5840 @item A
5841 Current article number.
5842 @item z
5843 Current article score.
5844 @item V
5845 Gnus version.
5846 @item U
5847 Number of unread articles in this group.
5848 @item e
5849 Number of unread articles in this group that aren't displayed in the
5850 summary buffer.
5851 @item Z
5852 A string with the number of unread and unselected articles represented
5853 either as @samp{<%U(+%e) more>} if there are both unread and unselected
5854 articles, and just as @samp{<%U more>} if there are just unread articles
5855 and no unselected ones.
5856 @item g
5857 Shortish group name.  For instance, @samp{rec.arts.anime} will be
5858 shortened to @samp{r.a.anime}.
5859 @item S
5860 Subject of the current article.
5861 @item u
5862 User-defined spec (@pxref{User-Defined Specs}).
5863 @item s
5864 Name of the current score file (@pxref{Scoring}).
5865 @item d
5866 Number of dormant articles (@pxref{Unread Articles}).
5867 @item t
5868 Number of ticked articles (@pxref{Unread Articles}).
5869 @item r
5870 Number of articles that have been marked as read in this session.
5871 @item E
5872 Number of articles expunged by the score files.
5873 @end table
5874
5875
5876 @node Summary Highlighting
5877 @subsection Summary Highlighting
5878
5879 @table @code
5880
5881 @item gnus-visual-mark-article-hook
5882 @vindex gnus-visual-mark-article-hook
5883 This hook is run after selecting an article.  It is meant to be used for
5884 highlighting the article in some way.  It is not run if
5885 @code{gnus-visual} is @code{nil}.
5886
5887 @item gnus-summary-update-hook
5888 @vindex gnus-summary-update-hook
5889 This hook is called when a summary line is changed.  It is not run if
5890 @code{gnus-visual} is @code{nil}.
5891
5892 @item gnus-summary-selected-face
5893 @vindex gnus-summary-selected-face
5894 This is the face (or @dfn{font} as some people call it) used to
5895 highlight the current article in the summary buffer.
5896
5897 @item gnus-summary-highlight
5898 @vindex gnus-summary-highlight
5899 Summary lines are highlighted according to this variable, which is a
5900 list where the elements are of the format @code{(@var{form}
5901 . @var{face})}.  If you would, for instance, like ticked articles to be
5902 italic and high-scored articles to be bold, you could set this variable
5903 to something like
5904 @lisp
5905 (((eq mark gnus-ticked-mark) . italic)
5906  ((> score default) . bold))
5907 @end lisp
5908 As you may have guessed, if @var{form} returns a non-@code{nil} value,
5909 @var{face} will be applied to the line.
5910 @end table
5911
5912
5913 @node Summary Maneuvering
5914 @section Summary Maneuvering
5915 @cindex summary movement
5916
5917 All the straight movement commands understand the numeric prefix and
5918 behave pretty much as you'd expect.
5919
5920 None of these commands select articles.
5921
5922 @table @kbd
5923 @item G M-n
5924 @itemx M-n
5925 @kindex M-n (Summary)
5926 @kindex G M-n (Summary)
5927 @findex gnus-summary-next-unread-subject
5928 Go to the next summary line of an unread article
5929 (@code{gnus-summary-next-unread-subject}).
5930
5931 @item G M-p
5932 @itemx M-p
5933 @kindex M-p (Summary)
5934 @kindex G M-p (Summary)
5935 @findex gnus-summary-prev-unread-subject
5936 Go to the previous summary line of an unread article
5937 (@code{gnus-summary-prev-unread-subject}).
5938
5939 @item G g
5940 @kindex G g (Summary)
5941 @findex gnus-summary-goto-subject
5942 Ask for an article number and then go to the summary line of that article
5943 without displaying the article (@code{gnus-summary-goto-subject}).
5944 @end table
5945
5946 If Gnus asks you to press a key to confirm going to the next group, you
5947 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
5948 buffer, searching for the next group to read without actually returning
5949 to the group buffer.
5950
5951 Variables related to summary movement:
5952
5953 @table @code
5954
5955 @vindex gnus-auto-select-next
5956 @item gnus-auto-select-next
5957 If you issue one of the movement commands (like @kbd{n}) and there are
5958 no more unread articles after the current one, Gnus will offer to go to
5959 the next group.  If this variable is @code{t} and the next group is
5960 empty, Gnus will exit summary mode and return to the group buffer.  If
5961 this variable is neither @code{t} nor @code{nil}, Gnus will select the
5962 next group with unread articles.  As a special case, if this variable
5963 is @code{quietly}, Gnus will select the next group without asking for
5964 confirmation.  If this variable is @code{almost-quietly}, the same
5965 will happen only if you are located on the last article in the group.
5966 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
5967 command will go to the next group without confirmation.  Also
5968 @pxref{Group Levels}.
5969
5970 @item gnus-auto-select-same
5971 @vindex gnus-auto-select-same
5972 If non-@code{nil}, all the movement commands will try to go to the next
5973 article with the same subject as the current.  (@dfn{Same} here might
5974 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
5975 for details (@pxref{Customizing Threading}).)  If there are no more
5976 articles with the same subject, go to the first unread article.
5977
5978 This variable is not particularly useful if you use a threaded display.
5979
5980 @item gnus-summary-check-current
5981 @vindex gnus-summary-check-current
5982 If non-@code{nil}, all the ``unread'' movement commands will not proceed
5983 to the next (or previous) article if the current article is unread.
5984 Instead, they will choose the current article.
5985
5986 @item gnus-auto-center-summary
5987 @vindex gnus-auto-center-summary
5988 If non-@code{nil}, Gnus will keep the point in the summary buffer
5989 centered at all times.  This makes things quite tidy, but if you have a
5990 slow network connection, or simply do not like this un-Emacsism, you can
5991 set this variable to @code{nil} to get the normal Emacs scrolling
5992 action.  This will also inhibit horizontal re-centering of the summary
5993 buffer, which might make it more inconvenient to read extremely long
5994 threads.
5995
5996 This variable can also be a number.  In that case, center the window at
5997 the given number of lines from the top.
5998
5999 @end table
6000
6001
6002 @node Choosing Articles
6003 @section Choosing Articles
6004 @cindex selecting articles
6005
6006 @menu
6007 * Choosing Commands::           Commands for choosing articles.
6008 * Choosing Variables::          Variables that influence these commands.
6009 @end menu
6010
6011
6012 @node Choosing Commands
6013 @subsection Choosing Commands
6014
6015 None of the following movement commands understand the numeric prefix,
6016 and they all select and display an article.
6017
6018 If you want to fetch new articles or redisplay the group, see
6019 @ref{Exiting the Summary Buffer}.
6020
6021 @table @kbd
6022 @item SPACE
6023 @kindex SPACE (Summary)
6024 @findex gnus-summary-next-page
6025 Select the current article, or, if that one's read already, the next
6026 unread article (@code{gnus-summary-next-page}).
6027
6028 If you have an article window open already and you press @kbd{SPACE}
6029 again, the article will be scrolled.  This lets you conveniently
6030 @kbd{SPACE} through an entire newsgroup.  @xref{Paging the Article}.
6031
6032 @item G n
6033 @itemx n
6034 @kindex n (Summary)
6035 @kindex G n (Summary)
6036 @findex gnus-summary-next-unread-article
6037 @c @icon{gnus-summary-next-unread}
6038 Go to next unread article (@code{gnus-summary-next-unread-article}).
6039
6040 @item G p
6041 @itemx p
6042 @kindex p (Summary)
6043 @findex gnus-summary-prev-unread-article
6044 @c @icon{gnus-summary-prev-unread}
6045 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
6046
6047 @item G N
6048 @itemx N
6049 @kindex N (Summary)
6050 @kindex G N (Summary)
6051 @findex gnus-summary-next-article
6052 Go to the next article (@code{gnus-summary-next-article}).
6053
6054 @item G P
6055 @itemx P
6056 @kindex P (Summary)
6057 @kindex G P (Summary)
6058 @findex gnus-summary-prev-article
6059 Go to the previous article (@code{gnus-summary-prev-article}).
6060
6061 @item G C-n
6062 @kindex G C-n (Summary)
6063 @findex gnus-summary-next-same-subject
6064 Go to the next article with the same subject
6065 (@code{gnus-summary-next-same-subject}).
6066
6067 @item G C-p
6068 @kindex G C-p (Summary)
6069 @findex gnus-summary-prev-same-subject
6070 Go to the previous article with the same subject
6071 (@code{gnus-summary-prev-same-subject}).
6072
6073 @item G f
6074 @itemx .
6075 @kindex G f  (Summary)
6076 @kindex .  (Summary)
6077 @findex gnus-summary-first-unread-article
6078 Go to the first unread article
6079 (@code{gnus-summary-first-unread-article}).
6080
6081 @item G b
6082 @itemx ,
6083 @kindex G b (Summary)
6084 @kindex , (Summary)
6085 @findex gnus-summary-best-unread-article
6086 Go to the unread article with the highest score
6087 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
6088 go to the first unread article that has a score over the default score.
6089
6090 @item G l
6091 @itemx l
6092 @kindex l (Summary)
6093 @kindex G l (Summary)
6094 @findex gnus-summary-goto-last-article
6095 Go to the previous article read (@code{gnus-summary-goto-last-article}).
6096
6097 @item G o
6098 @kindex G o (Summary)
6099 @findex gnus-summary-pop-article
6100 @cindex history
6101 @cindex article history
6102 Pop an article off the summary history and go to this article
6103 (@code{gnus-summary-pop-article}).  This command differs from the
6104 command above in that you can pop as many previous articles off the
6105 history as you like, while @kbd{l} toggles the two last read articles.
6106 For a somewhat related issue (if you use these commands a lot),
6107 @pxref{Article Backlog}.
6108
6109 @item G j
6110 @itemx j
6111 @kindex j (Summary)
6112 @kindex G j (Summary)
6113 @findex gnus-summary-goto-article
6114 Ask for an article number or @code{Message-ID}, and then go to that
6115 article (@code{gnus-summary-goto-article}).
6116
6117 @end table
6118
6119
6120 @node Choosing Variables
6121 @subsection Choosing Variables
6122
6123 Some variables relevant for moving and selecting articles:
6124
6125 @table @code
6126 @item gnus-auto-extend-newsgroup
6127 @vindex gnus-auto-extend-newsgroup
6128 All the movement commands will try to go to the previous (or next)
6129 article, even if that article isn't displayed in the Summary buffer if
6130 this variable is non-@code{nil}.  Gnus will then fetch the article from
6131 the server and display it in the article buffer.
6132
6133 @item gnus-select-article-hook
6134 @vindex gnus-select-article-hook
6135 This hook is called whenever an article is selected.  The default is
6136 @code{nil}.  If you would like each article to be saved in the Agent as
6137 you read it, putting @code{gnus-agent-fetch-selected-article} on this
6138 hook will do so.
6139
6140 @item gnus-mark-article-hook
6141 @vindex gnus-mark-article-hook
6142 @findex gnus-summary-mark-unread-as-read
6143 @findex gnus-summary-mark-read-and-unread-as-read
6144 @findex gnus-unread-mark
6145 This hook is called whenever an article is selected.  It is intended to
6146 be used for marking articles as read.  The default value is
6147 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
6148 mark of almost any article you read to @code{gnus-read-mark}.  The only
6149 articles not affected by this function are ticked, dormant, and
6150 expirable articles.  If you'd instead like to just have unread articles
6151 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
6152 instead.  It will leave marks like @code{gnus-low-score-mark},
6153 @code{gnus-del-mark} (and so on) alone.
6154
6155 @end table
6156
6157
6158 @node Paging the Article
6159 @section Scrolling the Article
6160 @cindex article scrolling
6161
6162 @table @kbd
6163
6164 @item SPACE
6165 @kindex SPACE (Summary)
6166 @findex gnus-summary-next-page
6167 Pressing @kbd{SPACE} will scroll the current article forward one page,
6168 or, if you have come to the end of the current article, will choose the
6169 next article (@code{gnus-summary-next-page}).
6170
6171 @vindex gnus-article-boring-faces
6172 @vindex gnus-article-skip-boring
6173 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
6174 the article consists only of citations and signature, then it will be
6175 skipped; the next article will be shown instead.  You can customize
6176 what is considered uninteresting with
6177 @code{gnus-article-boring-faces}.  You can manually view the article's
6178 pages, no matter how boring, using @kbd{C-M-v}.
6179
6180 @item DEL
6181 @kindex DEL (Summary)
6182 @findex gnus-summary-prev-page
6183 Scroll the current article back one page (@code{gnus-summary-prev-page}).
6184
6185 @item RET
6186 @kindex RET (Summary)
6187 @findex gnus-summary-scroll-up
6188 Scroll the current article one line forward
6189 (@code{gnus-summary-scroll-up}).
6190
6191 @item M-RET
6192 @kindex M-RET (Summary)
6193 @findex gnus-summary-scroll-down
6194 Scroll the current article one line backward
6195 (@code{gnus-summary-scroll-down}).
6196
6197 @item A g
6198 @itemx g
6199 @kindex A g (Summary)
6200 @kindex g (Summary)
6201 @findex gnus-summary-show-article
6202 @vindex gnus-summary-show-article-charset-alist
6203 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
6204 given a prefix, fetch the current article, but don't run any of the
6205 article treatment functions.  This will give you a ``raw'' article, just
6206 the way it came from the server.
6207
6208 If given a numerical prefix, you can do semi-manual charset stuff.
6209 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
6210 encoded in the @code{cn-gb-2312} charset.  If you have
6211
6212 @lisp
6213 (setq gnus-summary-show-article-charset-alist
6214       '((1 . cn-gb-2312)
6215         (2 . big5)))
6216 @end lisp
6217
6218 then you can say @kbd{C-u 1 g} to get the same effect.
6219
6220 @item A <
6221 @itemx <
6222 @kindex < (Summary)
6223 @kindex A < (Summary)
6224 @findex gnus-summary-beginning-of-article
6225 Scroll to the beginning of the article
6226 (@code{gnus-summary-beginning-of-article}).
6227
6228 @item A >
6229 @itemx >
6230 @kindex > (Summary)
6231 @kindex A > (Summary)
6232 @findex gnus-summary-end-of-article
6233 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
6234
6235 @item A s
6236 @itemx s
6237 @kindex A s (Summary)
6238 @kindex s (Summary)
6239 @findex gnus-summary-isearch-article
6240 Perform an isearch in the article buffer
6241 (@code{gnus-summary-isearch-article}).
6242
6243 @item h
6244 @kindex h (Summary)
6245 @findex gnus-summary-select-article-buffer
6246 Select the article buffer (@code{gnus-summary-select-article-buffer}).
6247
6248 @end table
6249
6250
6251 @node Reply Followup and Post
6252 @section Reply, Followup and Post
6253
6254 @menu
6255 * Summary Mail Commands::       Sending mail.
6256 * Summary Post Commands::       Sending news.
6257 * Summary Message Commands::    Other Message-related commands.
6258 * Canceling and Superseding::
6259 @end menu
6260
6261
6262 @node Summary Mail Commands
6263 @subsection Summary Mail Commands
6264 @cindex mail
6265 @cindex composing mail
6266
6267 Commands for composing a mail message:
6268
6269 @table @kbd
6270
6271 @item S r
6272 @itemx r
6273 @kindex S r (Summary)
6274 @kindex r (Summary)
6275 @findex gnus-summary-reply
6276 @c @icon{gnus-summary-mail-reply}
6277 @c @icon{gnus-summary-reply}
6278 Mail a reply to the author of the current article
6279 (@code{gnus-summary-reply}).
6280
6281 @item S R
6282 @itemx R
6283 @kindex R (Summary)
6284 @kindex S R (Summary)
6285 @findex gnus-summary-reply-with-original
6286 @c @icon{gnus-summary-reply-with-original}
6287 Mail a reply to the author of the current article and include the
6288 original message (@code{gnus-summary-reply-with-original}).  This
6289 command uses the process/prefix convention.
6290
6291 @item S w
6292 @kindex S w (Summary)
6293 @findex gnus-summary-wide-reply
6294 Mail a wide reply to the author of the current article
6295 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
6296 goes out to all people listed in the @code{To}, @code{From} (or
6297 @code{Reply-to}) and @code{Cc} headers.  If @code{Mail-Followup-To} is
6298 present, that's used instead.
6299
6300 @item S W
6301 @kindex S W (Summary)
6302 @findex gnus-summary-wide-reply-with-original
6303 Mail a wide reply to the current article and include the original
6304 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
6305 the process/prefix convention.
6306
6307 @item S v
6308 @kindex S v (Summary)
6309 @findex gnus-summary-very-wide-reply
6310 Mail a very wide reply to the author of the current article
6311 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
6312 that goes out to all people listed in the @code{To}, @code{From} (or
6313 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
6314 articles.  This command uses the process/prefix convention.
6315
6316 @item S V
6317 @kindex S V (Summary)
6318 @findex gnus-summary-very-wide-reply-with-original
6319 Mail a very wide reply to the author of the current article and include the
6320 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
6321 command uses the process/prefix convention.
6322
6323 @item S B r
6324 @kindex S B r (Summary)
6325 @findex gnus-summary-reply-broken-reply-to
6326 Mail a reply to the author of the current article but ignore the
6327 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
6328 If you need this because a mailing list incorrectly sets a
6329 @code{Reply-To} header pointing to the list, you probably want to set
6330 the @code{broken-reply-to} group parameter instead, so things will work
6331 correctly.  @xref{Group Parameters}.
6332
6333 @item S B R
6334 @kindex S B R (Summary)
6335 @findex gnus-summary-reply-broken-reply-to-with-original
6336 Mail a reply to the author of the current article and include the
6337 original message but ignore the @code{Reply-To} field
6338 (@code{gnus-summary-reply-broken-reply-to-with-original}).
6339
6340 @item S o m
6341 @itemx C-c C-f
6342 @kindex S o m (Summary)
6343 @kindex C-c C-f (Summary)
6344 @findex gnus-summary-mail-forward
6345 @c @icon{gnus-summary-mail-forward}
6346 Forward the current article to some other person
6347 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
6348 is forwarded according to the value of (@code{message-forward-as-mime})
6349 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
6350 message and forward directly inline; if the prefix is 2, forward message
6351 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
6352 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
6353 directly inline; otherwise, the message is forwarded as no prefix given
6354 but use the flipped value of (@code{message-forward-as-mime}).  By
6355 default, the message is decoded and forwarded as an rfc822 @acronym{MIME}
6356 section.
6357
6358 @item S m
6359 @itemx m
6360 @kindex m (Summary)
6361 @kindex S m (Summary)
6362 @findex gnus-summary-mail-other-window
6363 @c @icon{gnus-summary-mail-originate}
6364 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
6365 the posting style of the current group.  If given a prefix, disable that.
6366 If the prefix is 1, prompt for a group name to find the posting style.
6367
6368 @item S i
6369 @itemx i
6370 @kindex i (Summary)
6371 @kindex S i (Summary)
6372 @findex gnus-summary-news-other-window
6373 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
6374 post to the current group.  If given a prefix, disable that.  If the
6375 prefix is 1, prompt for a group to post to.
6376
6377 This function actually prepares a news even when using mail groups.
6378 This is useful for ``posting'' messages to mail groups without actually
6379 sending them over the network: they're just saved directly to the group
6380 in question.  The corresponding back end must have a request-post method
6381 for this to work though.
6382
6383 @item S D b
6384 @kindex S D b (Summary)
6385 @findex gnus-summary-resend-bounced-mail
6386 @cindex bouncing mail
6387 If you have sent a mail, but the mail was bounced back to you for some
6388 reason (wrong address, transient failure), you can use this command to
6389 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
6390 will be popped into a mail buffer where you can edit the headers before
6391 sending the mail off again.  If you give a prefix to this command, and
6392 the bounced mail is a reply to some other mail, Gnus will try to fetch
6393 that mail and display it for easy perusal of its headers.  This might
6394 very well fail, though.
6395
6396 @item S D r
6397 @kindex S D r (Summary)
6398 @findex gnus-summary-resend-message
6399 Not to be confused with the previous command,
6400 @code{gnus-summary-resend-message} will prompt you for an address to
6401 send the current message off to, and then send it to that place.  The
6402 headers of the message won't be altered---but lots of headers that say
6403 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
6404 means that you actually send a mail to someone that has a @code{To}
6405 header that (probably) points to yourself.  This will confuse people.
6406 So, natcherly you'll only do that if you're really eVIl.
6407
6408 This command is mainly used if you have several accounts and want to
6409 ship a mail to a different account of yours.  (If you're both
6410 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
6411 to the @code{root} account, you may want to resend it to
6412 @code{postmaster}.  Ordnung muss sein!
6413
6414 This command understands the process/prefix convention
6415 (@pxref{Process/Prefix}).
6416
6417 @item S D e
6418 @kindex S D e (Summary)
6419 @findex gnus-summary-resend-message-edit
6420
6421 Like the previous command, but will allow you to edit the message as
6422 if it were a new message before resending.
6423
6424 @item S O m
6425 @kindex S O m (Summary)
6426 @findex gnus-uu-digest-mail-forward
6427 Digest the current series (@pxref{Decoding Articles}) and forward the
6428 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
6429 uses the process/prefix convention (@pxref{Process/Prefix}).
6430
6431 @item S M-c
6432 @kindex S M-c (Summary)
6433 @findex gnus-summary-mail-crosspost-complaint
6434 @cindex crossposting
6435 @cindex excessive crossposting
6436 Send a complaint about excessive crossposting to the author of the
6437 current article (@code{gnus-summary-mail-crosspost-complaint}).
6438
6439 @findex gnus-crosspost-complaint
6440 This command is provided as a way to fight back against the current
6441 crossposting pandemic that's sweeping Usenet.  It will compose a reply
6442 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
6443 command understands the process/prefix convention
6444 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
6445
6446 @end table
6447
6448 Also @xref{Header Commands, ,Header Commands, message, The Message
6449 Manual}, for more information.
6450
6451
6452 @node Summary Post Commands
6453 @subsection Summary Post Commands
6454 @cindex post
6455 @cindex composing news
6456
6457 Commands for posting a news article:
6458
6459 @table @kbd
6460 @item S p
6461 @itemx a
6462 @kindex a (Summary)
6463 @kindex S p (Summary)
6464 @findex gnus-summary-post-news
6465 @c @icon{gnus-summary-post-news}
6466 Prepare for posting an article (@code{gnus-summary-post-news}).  By
6467 default, post to the current group.  If given a prefix, disable that.
6468 If the prefix is 1, prompt for another group instead.
6469
6470 @item S f
6471 @itemx f
6472 @kindex f (Summary)
6473 @kindex S f (Summary)
6474 @findex gnus-summary-followup
6475 @c @icon{gnus-summary-followup}
6476 Post a followup to the current article (@code{gnus-summary-followup}).
6477
6478 @item S F
6479 @itemx F
6480 @kindex S F (Summary)
6481 @kindex F (Summary)
6482 @c @icon{gnus-summary-followup-with-original}
6483 @findex gnus-summary-followup-with-original
6484 Post a followup to the current article and include the original message
6485 (@code{gnus-summary-followup-with-original}).  This command uses the
6486 process/prefix convention.
6487
6488 @item S n
6489 @kindex S n (Summary)
6490 @findex gnus-summary-followup-to-mail
6491 Post a followup to the current article via news, even if you got the
6492 message through mail (@code{gnus-summary-followup-to-mail}).
6493
6494 @item S N
6495 @kindex S N (Summary)
6496 @findex gnus-summary-followup-to-mail-with-original
6497 Post a followup to the current article via news, even if you got the
6498 message through mail and include the original message
6499 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
6500 the process/prefix convention.
6501
6502 @item S o p
6503 @kindex S o p (Summary)
6504 @findex gnus-summary-post-forward
6505 Forward the current article to a newsgroup
6506 (@code{gnus-summary-post-forward}).
6507  If no prefix is given, the message is forwarded according to the value
6508 of (@code{message-forward-as-mime}) and
6509 (@code{message-forward-show-mml}); if the prefix is 1, decode the
6510 message and forward directly inline; if the prefix is 2, forward message
6511 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
6512 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
6513 directly inline; otherwise, the message is forwarded as no prefix given
6514 but use the flipped value of (@code{message-forward-as-mime}).  By
6515 default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section.
6516
6517 @item S O p
6518 @kindex S O p (Summary)
6519 @findex gnus-uu-digest-post-forward
6520 @cindex digests
6521 @cindex making digests
6522 Digest the current series and forward the result to a newsgroup
6523 (@code{gnus-uu-digest-post-forward}).  This command uses the
6524 process/prefix convention.
6525
6526 @item S u
6527 @kindex S u (Summary)
6528 @findex gnus-uu-post-news
6529 @c @icon{gnus-uu-post-news}
6530 Uuencode a file, split it into parts, and post it as a series
6531 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
6532 @end table
6533
6534 Also @xref{Header Commands, ,Header Commands, message, The Message
6535 Manual}, for more information.
6536
6537
6538 @node Summary Message Commands
6539 @subsection Summary Message Commands
6540
6541 @table @kbd
6542 @item S y
6543 @kindex S y (Summary)
6544 @findex gnus-summary-yank-message
6545 Yank the current article into an already existing Message composition
6546 buffer (@code{gnus-summary-yank-message}).  This command prompts for
6547 what message buffer you want to yank into, and understands the
6548 process/prefix convention (@pxref{Process/Prefix}).
6549
6550 @end table
6551
6552
6553 @node Canceling and Superseding
6554 @subsection Canceling Articles
6555 @cindex canceling articles
6556 @cindex superseding articles
6557
6558 Have you ever written something, and then decided that you really,
6559 really, really wish you hadn't posted that?
6560
6561 Well, you can't cancel mail, but you can cancel posts.
6562
6563 @findex gnus-summary-cancel-article
6564 @kindex C (Summary)
6565 @c @icon{gnus-summary-cancel-article}
6566 Find the article you wish to cancel (you can only cancel your own
6567 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
6568 c} (@code{gnus-summary-cancel-article}).  Your article will be
6569 canceled---machines all over the world will be deleting your article.
6570 This command uses the process/prefix convention (@pxref{Process/Prefix}).
6571
6572 Be aware, however, that not all sites honor cancels, so your article may
6573 live on here and there, while most sites will delete the article in
6574 question.
6575
6576 Gnus will use the ``current'' select method when canceling.  If you
6577 want to use the standard posting method, use the @samp{a} symbolic
6578 prefix (@pxref{Symbolic Prefixes}).
6579
6580 Gnus ensures that only you can cancel your own messages using a
6581 @code{Cancel-Lock} header (@pxref{Canceling News, Canceling News, ,
6582 message, Message Manual}).
6583
6584 If you discover that you have made some mistakes and want to do some
6585 corrections, you can post a @dfn{superseding} article that will replace
6586 your original article.
6587
6588 @findex gnus-summary-supersede-article
6589 @kindex S (Summary)
6590 Go to the original article and press @kbd{S s}
6591 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
6592 where you can edit the article all you want before sending it off the
6593 usual way.
6594
6595 The same goes for superseding as for canceling, only more so: Some
6596 sites do not honor superseding.  On those sites, it will appear that you
6597 have posted almost the same article twice.
6598
6599 If you have just posted the article, and change your mind right away,
6600 there is a trick you can use to cancel/supersede the article without
6601 waiting for the article to appear on your site first.  You simply return
6602 to the post buffer (which is called @code{*sent ...*}).  There you will
6603 find the article you just posted, with all the headers intact.  Change
6604 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
6605 header by substituting one of those words for the word
6606 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
6607 you would do normally.  The previous article will be
6608 canceled/superseded.
6609
6610 Just remember, kids: There is no 'c' in 'supersede'.
6611
6612 @node Delayed Articles
6613 @section Delayed Articles
6614 @cindex delayed sending
6615 @cindex send delayed
6616
6617 Sometimes, you might wish to delay the sending of a message.  For
6618 example, you might wish to arrange for a message to turn up just in time
6619 to remind your about the birthday of your Significant Other.  For this,
6620 there is the @code{gnus-delay} package.  Setup is simple:
6621
6622 @lisp
6623 (gnus-delay-initialize)
6624 @end lisp
6625
6626 @findex gnus-delay-article
6627 Normally, to send a message you use the @kbd{C-c C-c} command from
6628 Message mode.  To delay a message, use @kbd{C-c C-j}
6629 (@code{gnus-delay-article}) instead.  This will ask you for how long the
6630 message should be delayed.  Possible answers are:
6631
6632 @itemize @bullet
6633 @item
6634 A time span.  Consists of an integer and a letter.  For example,
6635 @code{42d} means to delay for 42 days.  Available letters are @code{m}
6636 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
6637 (months) and @code{Y} (years).
6638
6639 @item
6640 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
6641 delayed until that day, at a specific time (eight o'clock by default).
6642 See also @code{gnus-delay-default-hour}.
6643
6644 @item
6645 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
6646 stuff.  The deadline will be at that time today, except if that time has
6647 already passed, then it's at the given time tomorrow.  So if it's ten
6648 o'clock in the morning and you specify @code{11:15}, then the deadline
6649 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
6650 that means a time tomorrow.
6651 @end itemize
6652
6653 The action of the @code{gnus-delay-article} command is influenced by a
6654 couple of variables:
6655
6656 @table @code
6657 @item gnus-delay-default-hour
6658 @vindex gnus-delay-default-hour
6659 When you specify a specific date, the message will be due on that hour
6660 on the given date.  Possible values are integers 0 through 23.
6661
6662 @item gnus-delay-default-delay
6663 @vindex gnus-delay-default-delay
6664 This is a string and gives the default delay.  It can be of any of the
6665 formats described above.
6666
6667 @item gnus-delay-group
6668 @vindex gnus-delay-group
6669 Delayed articles will be kept in this group on the drafts server until
6670 they are due.  You probably don't need to change this.  The default
6671 value is @code{"delayed"}.
6672
6673 @item gnus-delay-header
6674 @vindex gnus-delay-header
6675 The deadline for each article will be stored in a header.  This variable
6676 is a string and gives the header name.  You probably don't need to
6677 change this.  The default value is @code{"X-Gnus-Delayed"}.
6678 @end table
6679
6680 The way delaying works is like this: when you use the
6681 @code{gnus-delay-article} command, you give a certain delay.  Gnus
6682 calculates the deadline of the message and stores it in the
6683 @code{X-Gnus-Delayed} header and puts the message in the
6684 @code{nndraft:delayed} group.
6685
6686 @findex gnus-delay-send-queue
6687 And whenever you get new news, Gnus looks through the group for articles
6688 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
6689 function for this.  By default, this function is added to the hook
6690 @code{gnus-get-new-news-hook}.  But of course, you can change this.
6691 Maybe you want to use the demon to send drafts?  Just tell the demon to
6692 execute the @code{gnus-delay-send-queue} function.
6693
6694 @table @code
6695 @item gnus-delay-initialize
6696 @findex gnus-delay-initialize
6697 By default, this function installs @code{gnus-delay-send-queue} in
6698 @code{gnus-get-new-news-hook}.  But it accepts the optional second
6699 argument @code{no-check}.  If it is non-@code{nil},
6700 @code{gnus-get-new-news-hook} is not changed.  The optional first
6701 argument is ignored.
6702
6703 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
6704 Presumably, you want to use the demon for sending due delayed articles.
6705 Just don't forget to set that up :-)
6706 @end table
6707
6708
6709 @node Marking Articles
6710 @section Marking Articles
6711 @cindex article marking
6712 @cindex article ticking
6713 @cindex marks
6714
6715 There are several marks you can set on an article.
6716
6717 You have marks that decide the @dfn{readedness} (whoo, neato-keano
6718 neologism ohoy!) of the article.  Alphabetic marks generally mean
6719 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
6720
6721 In addition, you also have marks that do not affect readedness.
6722
6723 @ifinfo
6724 There's a plethora of commands for manipulating these marks.
6725 @end ifinfo
6726
6727 @menu
6728 * Unread Articles::             Marks for unread articles.
6729 * Read Articles::               Marks for read articles.
6730 * Other Marks::                 Marks that do not affect readedness.
6731 * Setting Marks::               How to set and remove marks.
6732 * Generic Marking Commands::    How to customize the marking.
6733 * Setting Process Marks::       How to mark articles for later processing.
6734 @end menu
6735
6736
6737 @node Unread Articles
6738 @subsection Unread Articles
6739
6740 The following marks mark articles as (kinda) unread, in one form or
6741 other.
6742
6743 @table @samp
6744 @item !
6745 @vindex gnus-ticked-mark
6746 Marked as ticked (@code{gnus-ticked-mark}).
6747
6748 @dfn{Ticked articles} are articles that will remain visible always.  If
6749 you see an article that you find interesting, or you want to put off
6750 reading it, or replying to it, until sometime later, you'd typically
6751 tick it.  However, articles can be expired (from news servers by the
6752 news server software, Gnus itself never expires ticked messages), so if
6753 you want to keep an article forever, you'll have to make it persistent
6754 (@pxref{Persistent Articles}).
6755
6756 @item ?
6757 @vindex gnus-dormant-mark
6758 Marked as dormant (@code{gnus-dormant-mark}).
6759
6760 @dfn{Dormant articles} will only appear in the summary buffer if there
6761 are followups to it.  If you want to see them even if they don't have
6762 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
6763 Otherwise (except for the visibility issue), they are just like ticked
6764 messages.
6765
6766 @item SPACE
6767 @vindex gnus-unread-mark
6768 Marked as unread (@code{gnus-unread-mark}).
6769
6770 @dfn{Unread articles} are articles that haven't been read at all yet.
6771 @end table
6772
6773
6774 @node Read Articles
6775 @subsection Read Articles
6776 @cindex expirable mark
6777
6778 All the following marks mark articles as read.
6779
6780 @table @samp
6781
6782 @item r
6783 @vindex gnus-del-mark
6784 These are articles that the user has marked as read with the @kbd{d}
6785 command manually, more or less (@code{gnus-del-mark}).
6786
6787 @item R
6788 @vindex gnus-read-mark
6789 Articles that have actually been read (@code{gnus-read-mark}).
6790
6791 @item O
6792 @vindex gnus-ancient-mark
6793 Articles that were marked as read in previous sessions and are now
6794 @dfn{old} (@code{gnus-ancient-mark}).
6795
6796 @item K
6797 @vindex gnus-killed-mark
6798 Marked as killed (@code{gnus-killed-mark}).
6799
6800 @item X
6801 @vindex gnus-kill-file-mark
6802 Marked as killed by kill files (@code{gnus-kill-file-mark}).
6803
6804 @item Y
6805 @vindex gnus-low-score-mark
6806 Marked as read by having too low a score (@code{gnus-low-score-mark}).
6807
6808 @item C
6809 @vindex gnus-catchup-mark
6810 Marked as read by a catchup (@code{gnus-catchup-mark}).
6811
6812 @item G
6813 @vindex gnus-canceled-mark
6814 Canceled article (@code{gnus-canceled-mark})
6815
6816 @item F
6817 @vindex gnus-souped-mark
6818 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
6819
6820 @item Q
6821 @vindex gnus-sparse-mark
6822 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
6823 Threading}.
6824
6825 @item M
6826 @vindex gnus-duplicate-mark
6827 Article marked as read by duplicate suppression
6828 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
6829
6830 @end table
6831
6832 All these marks just mean that the article is marked as read, really.
6833 They are interpreted differently when doing adaptive scoring, though.
6834
6835 One more special mark, though:
6836
6837 @table @samp
6838 @item E
6839 @vindex gnus-expirable-mark
6840 Marked as expirable (@code{gnus-expirable-mark}).
6841
6842 Marking articles as @dfn{expirable} (or have them marked as such
6843 automatically) doesn't make much sense in normal groups---a user doesn't
6844 control expiring of news articles, but in mail groups, for instance,
6845 articles marked as @dfn{expirable} can be deleted by Gnus at
6846 any time.
6847 @end table
6848
6849
6850 @node Other Marks
6851 @subsection Other Marks
6852 @cindex process mark
6853 @cindex bookmarks
6854
6855 There are some marks that have nothing to do with whether the article is
6856 read or not.
6857
6858 @itemize @bullet
6859
6860 @item
6861 You can set a bookmark in the current article.  Say you are reading a
6862 long thesis on cats' urinary tracts, and have to go home for dinner
6863 before you've finished reading the thesis.  You can then set a bookmark
6864 in the article, and Gnus will jump to this bookmark the next time it
6865 encounters the article.  @xref{Setting Marks}.
6866
6867 @item
6868 @vindex gnus-replied-mark
6869 All articles that you have replied to or made a followup to (i.e., have
6870 answered) will be marked with an @samp{A} in the second column
6871 (@code{gnus-replied-mark}).
6872
6873 @item
6874 @vindex gnus-forwarded-mark
6875 All articles that you have forwarded will be marked with an @samp{F} in
6876 the second column (@code{gnus-forwarded-mark}).
6877
6878 @item
6879 @vindex gnus-cached-mark
6880 Articles stored in the article cache will be marked with an @samp{*} in
6881 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
6882
6883 @item
6884 @vindex gnus-saved-mark
6885 Articles ``saved'' (in some manner or other; not necessarily
6886 religiously) are marked with an @samp{S} in the second column
6887 (@code{gnus-saved-mark}).
6888
6889 @item
6890 @vindex gnus-recent-mark
6891 Articles that according to the server haven't been shown to the user
6892 before are marked with a @samp{N} in the second column
6893 (@code{gnus-recent-mark}).  Note that not all servers support this
6894 mark, in which case it simply never appears.  Compare with
6895 @code{gnus-unseen-mark}.
6896
6897 @item
6898 @vindex gnus-unseen-mark
6899 Articles that haven't been seen before in Gnus by the user are marked
6900 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
6901 Compare with @code{gnus-recent-mark}.
6902
6903 @item
6904 @vindex gnus-downloaded-mark
6905 When using the Gnus agent (@pxref{Agent Basics}), articles may be
6906 downloaded for unplugged (offline) viewing.  If you are using the
6907 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
6908 (The variable @code{gnus-downloaded-mark} controls which character to
6909 use.)
6910
6911 @item
6912 @vindex gnus-undownloaded-mark
6913 When using the Gnus agent (@pxref{Agent Basics}), some articles might
6914 not have been downloaded.  Such articles cannot be viewed while you
6915 are unplugged (offline).  If you are using the @samp{%O} spec, these
6916 articles get the @samp{-} mark in that spec.  (The variable
6917 @code{gnus-undownloaded-mark} controls which character to use.)
6918
6919 @item
6920 @vindex gnus-downloadable-mark
6921 The Gnus agent (@pxref{Agent Basics}) downloads some articles
6922 automatically, but it is also possible to explicitly mark articles for
6923 download, even if they would not be downloaded automatically.  Such
6924 explicitly-marked articles get the @samp{%} mark in the first column.
6925 (The variable @code{gnus-downloadable-mark} controls which character to
6926 use.)
6927
6928 @item
6929 @vindex gnus-not-empty-thread-mark
6930 @vindex gnus-empty-thread-mark
6931 If the @samp{%e} spec is used, the presence of threads or not will be
6932 marked with @code{gnus-not-empty-thread-mark} and
6933 @code{gnus-empty-thread-mark} in the third column, respectively.
6934
6935 @item
6936 @vindex gnus-process-mark
6937 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
6938 variety of commands react to the presence of the process mark.  For
6939 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
6940 all articles that have been marked with the process mark.  Articles
6941 marked with the process mark have a @samp{#} in the second column.
6942
6943 @end itemize
6944
6945 You might have noticed that most of these ``non-readedness'' marks
6946 appear in the second column by default.  So if you have a cached, saved,
6947 replied article that you have process-marked, what will that look like?
6948
6949 Nothing much.  The precedence rules go as follows: process -> cache ->
6950 replied -> saved.  So if the article is in the cache and is replied,
6951 you'll only see the cache mark and not the replied mark.
6952
6953
6954 @node Setting Marks
6955 @subsection Setting Marks
6956 @cindex setting marks
6957
6958 All the marking commands understand the numeric prefix.
6959
6960 @table @kbd
6961 @item M c
6962 @itemx M-u
6963 @kindex M c (Summary)
6964 @kindex M-u (Summary)
6965 @findex gnus-summary-clear-mark-forward
6966 @cindex mark as unread
6967 Clear all readedness-marks from the current article
6968 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
6969 article as unread.
6970
6971 @item M t
6972 @itemx !
6973 @kindex ! (Summary)
6974 @kindex M t (Summary)
6975 @findex gnus-summary-tick-article-forward
6976 Tick the current article (@code{gnus-summary-tick-article-forward}).
6977 @xref{Article Caching}.
6978
6979 @item M ?
6980 @itemx ?
6981 @kindex ? (Summary)
6982 @kindex M ? (Summary)
6983 @findex gnus-summary-mark-as-dormant
6984 Mark the current article as dormant
6985 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
6986
6987 @item M d
6988 @itemx d
6989 @kindex M d (Summary)
6990 @kindex d (Summary)
6991 @findex gnus-summary-mark-as-read-forward
6992 Mark the current article as read
6993 (@code{gnus-summary-mark-as-read-forward}).
6994
6995 @item D
6996 @kindex D (Summary)
6997 @findex gnus-summary-mark-as-read-backward
6998 Mark the current article as read and move point to the previous line
6999 (@code{gnus-summary-mark-as-read-backward}).
7000
7001 @item M k
7002 @itemx k
7003 @kindex k (Summary)
7004 @kindex M k (Summary)
7005 @findex gnus-summary-kill-same-subject-and-select
7006 Mark all articles that have the same subject as the current one as read,
7007 and then select the next unread article
7008 (@code{gnus-summary-kill-same-subject-and-select}).
7009
7010 @item M K
7011 @itemx C-k
7012 @kindex M K (Summary)
7013 @kindex C-k (Summary)
7014 @findex gnus-summary-kill-same-subject
7015 Mark all articles that have the same subject as the current one as read
7016 (@code{gnus-summary-kill-same-subject}).
7017
7018 @item M C
7019 @kindex M C (Summary)
7020 @findex gnus-summary-catchup
7021 @c @icon{gnus-summary-catchup}
7022 Mark all unread articles as read (@code{gnus-summary-catchup}).
7023
7024 @item M C-c
7025 @kindex M C-c (Summary)
7026 @findex gnus-summary-catchup-all
7027 Mark all articles in the group as read---even the ticked and dormant
7028 articles (@code{gnus-summary-catchup-all}).
7029
7030 @item M H
7031 @kindex M H (Summary)
7032 @findex gnus-summary-catchup-to-here
7033 Catchup the current group to point (before the point)
7034 (@code{gnus-summary-catchup-to-here}).
7035
7036 @item M h
7037 @kindex M h (Summary)
7038 @findex gnus-summary-catchup-from-here
7039 Catchup the current group from point (after the point)
7040 (@code{gnus-summary-catchup-from-here}).
7041
7042 @item C-w
7043 @kindex C-w (Summary)
7044 @findex gnus-summary-mark-region-as-read
7045 Mark all articles between point and mark as read
7046 (@code{gnus-summary-mark-region-as-read}).
7047
7048 @item M V k
7049 @kindex M V k (Summary)
7050 @findex gnus-summary-kill-below
7051 Kill all articles with scores below the default score (or below the
7052 numeric prefix) (@code{gnus-summary-kill-below}).
7053
7054 @item M e
7055 @itemx E
7056 @kindex M e (Summary)
7057 @kindex E (Summary)
7058 @findex gnus-summary-mark-as-expirable
7059 Mark the current article as expirable
7060 (@code{gnus-summary-mark-as-expirable}).
7061
7062 @item M b
7063 @kindex M b (Summary)
7064 @findex gnus-summary-set-bookmark
7065 Set a bookmark in the current article
7066 (@code{gnus-summary-set-bookmark}).
7067
7068 @item M B
7069 @kindex M B (Summary)
7070 @findex gnus-summary-remove-bookmark
7071 Remove the bookmark from the current article
7072 (@code{gnus-summary-remove-bookmark}).
7073
7074 @item M V c
7075 @kindex M V c (Summary)
7076 @findex gnus-summary-clear-above
7077 Clear all marks from articles with scores over the default score (or
7078 over the numeric prefix) (@code{gnus-summary-clear-above}).
7079
7080 @item M V u
7081 @kindex M V u (Summary)
7082 @findex gnus-summary-tick-above
7083 Tick all articles with scores over the default score (or over the
7084 numeric prefix) (@code{gnus-summary-tick-above}).
7085
7086 @item M V m
7087 @kindex M V m (Summary)
7088 @findex gnus-summary-mark-above
7089 Prompt for a mark, and mark all articles with scores over the default
7090 score (or over the numeric prefix) with this mark
7091 (@code{gnus-summary-clear-above}).
7092 @end table
7093
7094 @vindex gnus-summary-goto-unread
7095 The @code{gnus-summary-goto-unread} variable controls what action should
7096 be taken after setting a mark.  If non-@code{nil}, point will move to
7097 the next/previous unread article.  If @code{nil}, point will just move
7098 one line up or down.  As a special case, if this variable is
7099 @code{never}, all the marking commands as well as other commands (like
7100 @kbd{SPACE}) will move to the next article, whether it is unread or not.
7101 The default is @code{t}.
7102
7103
7104 @node Generic Marking Commands
7105 @subsection Generic Marking Commands
7106
7107 Some people would like the command that ticks an article (@kbd{!}) go to
7108 the next article.  Others would like it to go to the next unread
7109 article.  Yet others would like it to stay on the current article.  And
7110 even though I haven't heard of anybody wanting it to go to the
7111 previous (unread) article, I'm sure there are people that want that as
7112 well.
7113
7114 Multiply these five behaviors with five different marking commands, and
7115 you get a potentially complex set of variable to control what each
7116 command should do.
7117
7118 To sidestep that mess, Gnus provides commands that do all these
7119 different things.  They can be found on the @kbd{M M} map in the summary
7120 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
7121 to list in this manual.
7122
7123 While you can use these commands directly, most users would prefer
7124 altering the summary mode keymap.  For instance, if you would like the
7125 @kbd{!} command to go to the next article instead of the next unread
7126 article, you could say something like:
7127
7128 @lisp
7129 @group
7130 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
7131 (defun my-alter-summary-map ()
7132   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
7133 @end group
7134 @end lisp
7135
7136 @noindent
7137 or
7138
7139 @lisp
7140 (defun my-alter-summary-map ()
7141   (local-set-key "!" "MM!n"))
7142 @end lisp
7143
7144
7145 @node Setting Process Marks
7146 @subsection Setting Process Marks
7147 @cindex setting process marks
7148
7149 Process marks are displayed as @code{#} in the summary buffer, and are
7150 used for marking articles in such a way that other commands will
7151 process these articles.  For instance, if you process mark four
7152 articles and then use the @kbd{*} command, Gnus will enter these four
7153 articles into the cache.  For more information,
7154 @pxref{Process/Prefix}.
7155
7156 @table @kbd
7157
7158 @item M P p
7159 @itemx #
7160 @kindex # (Summary)
7161 @kindex M P p (Summary)
7162 @findex gnus-summary-mark-as-processable
7163 Mark the current article with the process mark
7164 (@code{gnus-summary-mark-as-processable}).
7165 @findex gnus-summary-unmark-as-processable
7166
7167 @item M P u
7168 @itemx M-#
7169 @kindex M P u (Summary)
7170 @kindex M-# (Summary)
7171 Remove the process mark, if any, from the current article
7172 (@code{gnus-summary-unmark-as-processable}).
7173
7174 @item M P U
7175 @kindex M P U (Summary)
7176 @findex gnus-summary-unmark-all-processable
7177 Remove the process mark from all articles
7178 (@code{gnus-summary-unmark-all-processable}).
7179
7180 @item M P i
7181 @kindex M P i (Summary)
7182 @findex gnus-uu-invert-processable
7183 Invert the list of process marked articles
7184 (@code{gnus-uu-invert-processable}).
7185
7186 @item M P R
7187 @kindex M P R (Summary)
7188 @findex gnus-uu-mark-by-regexp
7189 Mark articles that have a @code{Subject} header that matches a regular
7190 expression (@code{gnus-uu-mark-by-regexp}).
7191
7192 @item M P G
7193 @kindex M P G (Summary)
7194 @findex gnus-uu-unmark-by-regexp
7195 Unmark articles that have a @code{Subject} header that matches a regular
7196 expression (@code{gnus-uu-unmark-by-regexp}).
7197
7198 @item M P r
7199 @kindex M P r (Summary)
7200 @findex gnus-uu-mark-region
7201 Mark articles in region (@code{gnus-uu-mark-region}).
7202
7203 @item M P g
7204 @kindex M P g (Summary)
7205 @findex gnus-uu-unmark-region
7206 Unmark articles in region (@code{gnus-uu-unmark-region}).
7207
7208 @item M P t
7209 @kindex M P t (Summary)
7210 @findex gnus-uu-mark-thread
7211 Mark all articles in the current (sub)thread
7212 (@code{gnus-uu-mark-thread}).
7213
7214 @item M P T
7215 @kindex M P T (Summary)
7216 @findex gnus-uu-unmark-thread
7217 Unmark all articles in the current (sub)thread
7218 (@code{gnus-uu-unmark-thread}).
7219
7220 @item M P v
7221 @kindex M P v (Summary)
7222 @findex gnus-uu-mark-over
7223 Mark all articles that have a score above the prefix argument
7224 (@code{gnus-uu-mark-over}).
7225
7226 @item M P s
7227 @kindex M P s (Summary)
7228 @findex gnus-uu-mark-series
7229 Mark all articles in the current series (@code{gnus-uu-mark-series}).
7230
7231 @item M P S
7232 @kindex M P S (Summary)
7233 @findex gnus-uu-mark-sparse
7234 Mark all series that have already had some articles marked
7235 (@code{gnus-uu-mark-sparse}).
7236
7237 @item M P a
7238 @kindex M P a (Summary)
7239 @findex gnus-uu-mark-all
7240 Mark all articles in series order (@code{gnus-uu-mark-all}).
7241
7242 @item M P b
7243 @kindex M P b (Summary)
7244 @findex gnus-uu-mark-buffer
7245 Mark all articles in the buffer in the order they appear
7246 (@code{gnus-uu-mark-buffer}).
7247
7248 @item M P k
7249 @kindex M P k (Summary)
7250 @findex gnus-summary-kill-process-mark
7251 Push the current process mark set onto the stack and unmark all articles
7252 (@code{gnus-summary-kill-process-mark}).
7253
7254 @item M P y
7255 @kindex M P y (Summary)
7256 @findex gnus-summary-yank-process-mark
7257 Pop the previous process mark set from the stack and restore it
7258 (@code{gnus-summary-yank-process-mark}).
7259
7260 @item M P w
7261 @kindex M P w (Summary)
7262 @findex gnus-summary-save-process-mark
7263 Push the current process mark set onto the stack
7264 (@code{gnus-summary-save-process-mark}).
7265
7266 @end table
7267
7268 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
7269 set process marks based on article body contents.
7270
7271
7272 @node Limiting
7273 @section Limiting
7274 @cindex limiting
7275
7276 It can be convenient to limit the summary buffer to just show some
7277 subset of the articles currently in the group.  The effect most limit
7278 commands have is to remove a few (or many) articles from the summary
7279 buffer.
7280
7281 All limiting commands work on subsets of the articles already fetched
7282 from the servers.  None of these commands query the server for
7283 additional articles.
7284
7285 @table @kbd
7286
7287 @item / /
7288 @itemx / s
7289 @kindex / / (Summary)
7290 @findex gnus-summary-limit-to-subject
7291 Limit the summary buffer to articles that match some subject
7292 (@code{gnus-summary-limit-to-subject}).  If given a prefix, exclude
7293 matching articles.
7294
7295 @item / a
7296 @kindex / a (Summary)
7297 @findex gnus-summary-limit-to-author
7298 Limit the summary buffer to articles that match some author
7299 (@code{gnus-summary-limit-to-author}).  If given a prefix, exclude
7300 matching articles.
7301
7302 @item / R
7303 @kindex / R (Summary)
7304 @findex gnus-summary-limit-to-recipient
7305 Limit the summary buffer to articles that match some recipient
7306 (@code{gnus-summary-limit-to-recipient}).  If given a prefix, exclude
7307 matching articles.
7308
7309 @item / A
7310 @kindex / A (Summary)
7311 @findex gnus-summary-limit-to-address
7312 Limit the summary buffer to articles in which contents of From, To or Cc
7313 header match a given address (@code{gnus-summary-limit-to-address}).  If
7314 given a prefix, exclude matching articles.
7315
7316 @item / S
7317 @kindex / S (Summary)
7318 @findex gnus-summary-limit-to-singletons
7319 Limit the summary buffer to articles that aren't part of any displayed
7320 threads (@code{gnus-summary-limit-to-singletons}).  If given a prefix,
7321 limit to articles that are part of displayed threads.
7322
7323 @item / x
7324 @kindex / x (Summary)
7325 @findex gnus-summary-limit-to-extra
7326 Limit the summary buffer to articles that match one of the ``extra''
7327 headers (@pxref{To From Newsgroups})
7328 (@code{gnus-summary-limit-to-extra}).  If given a prefix, exclude
7329 matching articles.
7330
7331 @item / u
7332 @itemx x
7333 @kindex / u (Summary)
7334 @kindex x (Summary)
7335 @findex gnus-summary-limit-to-unread
7336 Limit the summary buffer to articles not marked as read
7337 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
7338 buffer to articles strictly unread.  This means that ticked and
7339 dormant articles will also be excluded.
7340
7341 @item / m
7342 @kindex / m (Summary)
7343 @findex gnus-summary-limit-to-marks
7344 Ask for a mark and then limit to all articles that have been marked
7345 with that mark (@code{gnus-summary-limit-to-marks}).
7346
7347 @item / t
7348 @kindex / t (Summary)
7349 @findex gnus-summary-limit-to-age
7350 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
7351 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
7352 articles younger than that number of days.
7353
7354 @item / n
7355 @kindex / n (Summary)
7356 @findex gnus-summary-limit-to-articles
7357 With prefix @samp{n}, limit the summary buffer to the next @samp{n}
7358 articles.  If not given a prefix, use the process marked articles
7359 instead.  (@code{gnus-summary-limit-to-articles}).
7360
7361 @item / w
7362 @kindex / w (Summary)
7363 @findex gnus-summary-pop-limit
7364 Pop the previous limit off the stack and restore it
7365 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
7366 the stack.
7367
7368 @item / .
7369 @kindex / . (Summary)
7370 @findex gnus-summary-limit-to-unseen
7371 Limit the summary buffer to the unseen articles
7372 (@code{gnus-summary-limit-to-unseen}).
7373
7374 @item / v
7375 @kindex / v (Summary)
7376 @findex gnus-summary-limit-to-score
7377 Limit the summary buffer to articles that have a score at or above some
7378 score (@code{gnus-summary-limit-to-score}).
7379
7380 @item / p
7381 @kindex / p (Summary)
7382 @findex gnus-summary-limit-to-display-predicate
7383 Limit the summary buffer to articles that satisfy the @code{display}
7384 group parameter predicate
7385 (@code{gnus-summary-limit-to-display-predicate}).  @xref{Group
7386 Parameters}, for more on this predicate.
7387
7388 @item / r
7389 @kindex / r (Summary)
7390 @findex gnus-summary-limit-to-replied
7391 Limit the summary buffer to replied articles
7392 (@code{gnus-summary-limit-to-replied}).  If given a prefix, exclude
7393 replied articles.
7394
7395 @item / E
7396 @itemx M S
7397 @kindex M S (Summary)
7398 @kindex / E (Summary)
7399 @findex gnus-summary-limit-include-expunged
7400 Include all expunged articles in the limit
7401 (@code{gnus-summary-limit-include-expunged}).
7402
7403 @item / D
7404 @kindex / D (Summary)
7405 @findex gnus-summary-limit-include-dormant
7406 Include all dormant articles in the limit
7407 (@code{gnus-summary-limit-include-dormant}).
7408
7409 @item / *
7410 @kindex / * (Summary)
7411 @findex gnus-summary-limit-include-cached
7412 Include all cached articles in the limit
7413 (@code{gnus-summary-limit-include-cached}).
7414
7415 @item / d
7416 @kindex / d (Summary)
7417 @findex gnus-summary-limit-exclude-dormant
7418 Exclude all dormant articles from the limit
7419 (@code{gnus-summary-limit-exclude-dormant}).
7420
7421 @item / M
7422 @kindex / M (Summary)
7423 @findex gnus-summary-limit-exclude-marks
7424 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
7425
7426 @item / T
7427 @kindex / T (Summary)
7428 @findex gnus-summary-limit-include-thread
7429 Include all the articles in the current thread in the limit.
7430
7431 @item / c
7432 @kindex / c (Summary)
7433 @findex gnus-summary-limit-exclude-childless-dormant
7434 Exclude all dormant articles that have no children from the limit@*
7435 (@code{gnus-summary-limit-exclude-childless-dormant}).
7436
7437 @item / C
7438 @kindex / C (Summary)
7439 @findex gnus-summary-limit-mark-excluded-as-read
7440 Mark all excluded unread articles as read
7441 (@code{gnus-summary-limit-mark-excluded-as-read}).  If given a prefix,
7442 also mark excluded ticked and dormant articles as read.
7443
7444 @item / N
7445 @kindex / N (Summary)
7446 @findex gnus-summary-insert-new-articles
7447 Insert all new articles in the summary buffer.  It scans for new emails
7448 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
7449
7450 @item / o
7451 @kindex / o (Summary)
7452 @findex gnus-summary-insert-old-articles
7453 Insert all old articles in the summary buffer.  If given a numbered
7454 prefix, fetch this number of articles.
7455
7456 @item / b
7457 @kindex / b (Summary)
7458 @findex gnus-summary-limit-to-bodies
7459 Limit the summary buffer to articles that have bodies that match a
7460 certain regexp (@code{gnus-summary-limit-to-bodies}).  If given a
7461 prefix, reverse the limit.  This command is quite slow since it
7462 requires selecting each article to find the matches.
7463
7464 @item / h
7465 @kindex / h (Summary)
7466 @findex gnus-summary-limit-to-headers
7467 Like the previous command, only limit to headers instead
7468 (@code{gnus-summary-limit-to-headers}).
7469
7470 @end table
7471
7472
7473 @node Threading
7474 @section Threading
7475 @cindex threading
7476 @cindex article threading
7477
7478 Gnus threads articles by default.  @dfn{To thread} is to put responses
7479 to articles directly after the articles they respond to---in a
7480 hierarchical fashion.
7481
7482 Threading is done by looking at the @code{References} headers of the
7483 articles.  In a perfect world, this would be enough to build pretty
7484 trees, but unfortunately, the @code{References} header is often broken
7485 or simply missing.  Weird news propagation exacerbates the problem,
7486 so one has to employ other heuristics to get pleasing results.  A
7487 plethora of approaches exists, as detailed in horrible detail in
7488 @ref{Customizing Threading}.
7489
7490 First, a quick overview of the concepts:
7491
7492 @table @dfn
7493 @item root
7494 The top-most article in a thread; the first article in the thread.
7495
7496 @item thread
7497 A tree-like article structure.
7498
7499 @item sub-thread
7500 A small(er) section of this tree-like structure.
7501
7502 @item loose threads
7503 Threads often lose their roots due to article expiry, or due to the root
7504 already having been read in a previous session, and not displayed in the
7505 summary buffer.  We then typically have many sub-threads that really
7506 belong to one thread, but are without connecting roots.  These are
7507 called loose threads.
7508
7509 @item thread gathering
7510 An attempt to gather loose threads into bigger threads.
7511
7512 @item sparse threads
7513 A thread where the missing articles have been ``guessed'' at, and are
7514 displayed as empty lines in the summary buffer.
7515
7516 @end table
7517
7518
7519 @menu
7520 * Customizing Threading::       Variables you can change to affect the threading.
7521 * Thread Commands::             Thread based commands in the summary buffer.
7522 @end menu
7523
7524
7525 @node Customizing Threading
7526 @subsection Customizing Threading
7527 @cindex customizing threading
7528
7529 @menu
7530 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
7531 * Filling In Threads::          Making the threads displayed look fuller.
7532 * More Threading::              Even more variables for fiddling with threads.
7533 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
7534 @end menu
7535
7536
7537 @node Loose Threads
7538 @subsubsection Loose Threads
7539 @cindex <
7540 @cindex >
7541 @cindex loose threads
7542
7543 @table @code
7544 @item gnus-summary-make-false-root
7545 @vindex gnus-summary-make-false-root
7546 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
7547 and create a dummy root at the top.  (Wait a minute.  Root at the top?
7548 Yup.)  Loose subtrees occur when the real root has expired, or you've
7549 read or killed the root in a previous session.
7550
7551 When there is no real root of a thread, Gnus will have to fudge
7552 something.  This variable says what fudging method Gnus should use.
7553 There are four possible values:
7554
7555 @iftex
7556 @iflatex
7557 \gnusfigure{The Summary Buffer}{390}{
7558 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
7559 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
7560 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
7561 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
7562 }
7563 @end iflatex
7564 @end iftex
7565
7566 @cindex adopting articles
7567
7568 @table @code
7569
7570 @item adopt
7571 Gnus will make the first of the orphaned articles the parent.  This
7572 parent will adopt all the other articles.  The adopted articles will be
7573 marked as such by pointy brackets (@samp{<>}) instead of the standard
7574 square brackets (@samp{[]}).  This is the default method.
7575
7576 @item dummy
7577 @vindex gnus-summary-dummy-line-format
7578 @vindex gnus-summary-make-false-root-always
7579 Gnus will create a dummy summary line that will pretend to be the
7580 parent.  This dummy line does not correspond to any real article, so
7581 selecting it will just select the first real article after the dummy
7582 article.  @code{gnus-summary-dummy-line-format} is used to specify the
7583 format of the dummy roots.  It accepts only one format spec:  @samp{S},
7584 which is the subject of the article.  @xref{Formatting Variables}.
7585 If you want all threads to have a dummy root, even the non-gathered
7586 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
7587
7588 @item empty
7589 Gnus won't actually make any article the parent, but simply leave the
7590 subject field of all orphans except the first empty.  (Actually, it will
7591 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
7592 Buffer Format}).)
7593
7594 @item none
7595 Don't make any article parent at all.  Just gather the threads and
7596 display them after one another.
7597
7598 @item nil
7599 Don't gather loose threads.
7600 @end table
7601
7602 @item gnus-summary-gather-subject-limit
7603 @vindex gnus-summary-gather-subject-limit
7604 Loose threads are gathered by comparing subjects of articles.  If this
7605 variable is @code{nil}, Gnus requires an exact match between the
7606 subjects of the loose threads before gathering them into one big
7607 super-thread.  This might be too strict a requirement, what with the
7608 presence of stupid newsreaders that chop off long subject lines.  If
7609 you think so, set this variable to, say, 20 to require that only the
7610 first 20 characters of the subjects have to match.  If you set this
7611 variable to a really low number, you'll find that Gnus will gather
7612 everything in sight into one thread, which isn't very helpful.
7613
7614 @cindex fuzzy article gathering
7615 If you set this variable to the special value @code{fuzzy}, Gnus will
7616 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
7617 Matching}).
7618
7619 @item gnus-simplify-subject-fuzzy-regexp
7620 @vindex gnus-simplify-subject-fuzzy-regexp
7621 This can either be a regular expression or list of regular expressions
7622 that match strings that will be removed from subjects if fuzzy subject
7623 simplification is used.
7624
7625 @item gnus-simplify-ignored-prefixes
7626 @vindex gnus-simplify-ignored-prefixes
7627 If you set @code{gnus-summary-gather-subject-limit} to something as low
7628 as 10, you might consider setting this variable to something sensible:
7629
7630 @c Written by Michael Ernst <mernst@cs.rice.edu>
7631 @lisp
7632 (setq gnus-simplify-ignored-prefixes
7633       (concat
7634        "\\`\\[?\\("
7635        (mapconcat
7636         'identity
7637         '("looking"
7638           "wanted" "followup" "summary\\( of\\)?"
7639           "help" "query" "problem" "question"
7640           "answer" "reference" "announce"
7641           "How can I" "How to" "Comparison of"
7642           ;; ...
7643           )
7644         "\\|")
7645        "\\)\\s *\\("
7646        (mapconcat 'identity
7647                   '("for" "for reference" "with" "about")
7648                   "\\|")
7649        "\\)?\\]?:?[ \t]*"))
7650 @end lisp
7651
7652 All words that match this regexp will be removed before comparing two
7653 subjects.
7654
7655 @item gnus-simplify-subject-functions
7656 @vindex gnus-simplify-subject-functions
7657 If non-@code{nil}, this variable overrides
7658 @code{gnus-summary-gather-subject-limit}.  This variable should be a
7659 list of functions to apply to the @code{Subject} string iteratively to
7660 arrive at the simplified version of the string.
7661
7662 Useful functions to put in this list include:
7663
7664 @table @code
7665 @item gnus-simplify-subject-re
7666 @findex gnus-simplify-subject-re
7667 Strip the leading @samp{Re:}.
7668
7669 @item gnus-simplify-subject-fuzzy
7670 @findex gnus-simplify-subject-fuzzy
7671 Simplify fuzzily.
7672
7673 @item gnus-simplify-whitespace
7674 @findex gnus-simplify-whitespace
7675 Remove excessive whitespace.
7676
7677 @item gnus-simplify-all-whitespace
7678 @findex gnus-simplify-all-whitespace
7679 Remove all whitespace.
7680 @end table
7681
7682 You may also write your own functions, of course.
7683
7684
7685 @item gnus-summary-gather-exclude-subject
7686 @vindex gnus-summary-gather-exclude-subject
7687 Since loose thread gathering is done on subjects only, that might lead
7688 to many false hits, especially with certain common subjects like
7689 @samp{} and @samp{(none)}.  To make the situation slightly better,
7690 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
7691 what subjects should be excluded from the gathering process.@*
7692 The default is @samp{^ *$\\|^(none)$}.
7693
7694 @item gnus-summary-thread-gathering-function
7695 @vindex gnus-summary-thread-gathering-function
7696 Gnus gathers threads by looking at @code{Subject} headers.  This means
7697 that totally unrelated articles may end up in the same ``thread'', which
7698 is confusing.  An alternate approach is to look at all the
7699 @code{Message-ID}s in all the @code{References} headers to find matches.
7700 This will ensure that no gathered threads ever include unrelated
7701 articles, but it also means that people who have posted with broken
7702 newsreaders won't be gathered properly.  The choice is yours---plague or
7703 cholera:
7704
7705 @table @code
7706 @item gnus-gather-threads-by-subject
7707 @findex gnus-gather-threads-by-subject
7708 This function is the default gathering function and looks at
7709 @code{Subject}s exclusively.
7710
7711 @item gnus-gather-threads-by-references
7712 @findex gnus-gather-threads-by-references
7713 This function looks at @code{References} headers exclusively.
7714 @end table
7715
7716 If you want to test gathering by @code{References}, you could say
7717 something like:
7718
7719 @lisp
7720 (setq gnus-summary-thread-gathering-function
7721       'gnus-gather-threads-by-references)
7722 @end lisp
7723
7724 @end table
7725
7726
7727 @node Filling In Threads
7728 @subsubsection Filling In Threads
7729
7730 @table @code
7731 @item gnus-fetch-old-headers
7732 @vindex gnus-fetch-old-headers
7733 If non-@code{nil}, Gnus will attempt to build old threads by fetching
7734 more old headers---headers to articles marked as read.  If you would
7735 like to display as few summary lines as possible, but still connect as
7736 many loose threads as possible, you should set this variable to
7737 @code{some} or a number.  If you set it to a number, no more than that
7738 number of extra old headers will be fetched.  In either case, fetching
7739 old headers only works if the back end you are using carries overview
7740 files---this would normally be @code{nntp}, @code{nnspool},
7741 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
7742 the thread has been expired by the server, there's not much Gnus can
7743 do about that.
7744
7745 This variable can also be set to @code{invisible}.  This won't have any
7746 visible effects, but is useful if you use the @kbd{A T} command a lot
7747 (@pxref{Finding the Parent}).
7748
7749 The server has to support @acronym{NOV} for any of this to work.
7750
7751 @cindex Gmane, gnus-fetch-old-headers
7752 This feature can seriously impact performance it ignores all locally
7753 cached header entries.  Setting it to @code{t} for groups for a server
7754 that doesn't expire articles (such as news.gmane.org), leads to very
7755 slow summary generation.
7756
7757 @item gnus-fetch-old-ephemeral-headers
7758 @vindex gnus-fetch-old-ephemeral-headers
7759 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
7760 newsgroups.
7761
7762 @item gnus-build-sparse-threads
7763 @vindex gnus-build-sparse-threads
7764 Fetching old headers can be slow.  A low-rent similar effect can be
7765 gotten by setting this variable to @code{some}.  Gnus will then look at
7766 the complete @code{References} headers of all articles and try to string
7767 together articles that belong in the same thread.  This will leave
7768 @dfn{gaps} in the threading display where Gnus guesses that an article
7769 is missing from the thread.  (These gaps appear like normal summary
7770 lines.  If you select a gap, Gnus will try to fetch the article in
7771 question.)  If this variable is @code{t}, Gnus will display all these
7772 ``gaps'' without regard for whether they are useful for completing the
7773 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
7774 off sparse leaf nodes that don't lead anywhere.  This variable is
7775 @code{nil} by default.
7776
7777 @item gnus-read-all-available-headers
7778 @vindex gnus-read-all-available-headers
7779 This is a rather obscure variable that few will find useful.  It's
7780 intended for those non-news newsgroups where the back end has to fetch
7781 quite a lot to present the summary buffer, and where it's impossible to
7782 go back to parents of articles.  This is mostly the case in the
7783 web-based groups, like the @code{nnultimate} groups.
7784
7785 If you don't use those, then it's safe to leave this as the default
7786 @code{nil}.  If you want to use this variable, it should be a regexp
7787 that matches the group name, or @code{t} for all groups.
7788
7789 @end table
7790
7791
7792 @node More Threading
7793 @subsubsection More Threading
7794
7795 @table @code
7796 @item gnus-show-threads
7797 @vindex gnus-show-threads
7798 If this variable is @code{nil}, no threading will be done, and all of
7799 the rest of the variables here will have no effect.  Turning threading
7800 off will speed group selection up a bit, but it is sure to make reading
7801 slower and more awkward.
7802
7803 @item gnus-thread-hide-subtree
7804 @vindex gnus-thread-hide-subtree
7805 If non-@code{nil}, all threads will be hidden when the summary buffer is
7806 generated.
7807
7808 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
7809 Available predicates are @code{gnus-article-unread-p} and
7810 @code{gnus-article-unseen-p}.
7811
7812 Here's an example:
7813
7814 @lisp
7815 (setq gnus-thread-hide-subtree
7816       '(or gnus-article-unread-p
7817            gnus-article-unseen-p))
7818 @end lisp
7819
7820 (It's a pretty nonsensical example, since all unseen articles are also
7821 unread, but you get my drift.)
7822
7823
7824 @item gnus-thread-expunge-below
7825 @vindex gnus-thread-expunge-below
7826 All threads that have a total score (as defined by
7827 @code{gnus-thread-score-function}) less than this number will be
7828 expunged.  This variable is @code{nil} by default, which means that no
7829 threads are expunged.
7830
7831 @item gnus-thread-hide-killed
7832 @vindex gnus-thread-hide-killed
7833 if you kill a thread and this variable is non-@code{nil}, the subtree
7834 will be hidden.
7835
7836 @item gnus-thread-ignore-subject
7837 @vindex gnus-thread-ignore-subject
7838 Sometimes somebody changes the subject in the middle of a thread.  If
7839 this variable is non-@code{nil}, which is the default, the subject
7840 change is ignored.  If it is @code{nil}, a change in the subject will
7841 result in a new thread.
7842
7843 @item gnus-thread-indent-level
7844 @vindex gnus-thread-indent-level
7845 This is a number that says how much each sub-thread should be indented.
7846 The default is 4.
7847
7848 @item gnus-sort-gathered-threads-function
7849 @vindex gnus-sort-gathered-threads-function
7850 Sometimes, particularly with mailing lists, the order in which mails
7851 arrive locally is not necessarily the same as the order in which they
7852 arrived on the mailing list.  Consequently, when sorting sub-threads
7853 using the default @code{gnus-thread-sort-by-number}, responses can end
7854 up appearing before the article to which they are responding to.
7855 Setting this variable to an alternate value
7856 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
7857 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
7858 more logical sub-thread ordering in such instances.
7859
7860 @end table
7861
7862
7863 @node Low-Level Threading
7864 @subsubsection Low-Level Threading
7865
7866 @table @code
7867
7868 @item gnus-parse-headers-hook
7869 @vindex gnus-parse-headers-hook
7870 Hook run before parsing any headers.
7871
7872 @item gnus-alter-header-function
7873 @vindex gnus-alter-header-function
7874 If non-@code{nil}, this function will be called to allow alteration of
7875 article header structures.  The function is called with one parameter,
7876 the article header vector, which it may alter in any way.  For instance,
7877 if you have a mail-to-news gateway which alters the @code{Message-ID}s
7878 in systematic ways (by adding prefixes and such), you can use this
7879 variable to un-scramble the @code{Message-ID}s so that they are more
7880 meaningful.  Here's one example:
7881
7882 @lisp
7883 (setq gnus-alter-header-function 'my-alter-message-id)
7884
7885 (defun my-alter-message-id (header)
7886   (let ((id (mail-header-id header)))
7887     (when (string-match
7888            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
7889       (mail-header-set-id
7890        (concat (match-string 1 id) "@@" (match-string 2 id))
7891        header))))
7892 @end lisp
7893
7894 @end table
7895
7896
7897 @node Thread Commands
7898 @subsection Thread Commands
7899 @cindex thread commands
7900
7901 @table @kbd
7902
7903 @item T k
7904 @itemx C-M-k
7905 @kindex T k (Summary)
7906 @kindex C-M-k (Summary)
7907 @findex gnus-summary-kill-thread
7908 Mark all articles in the current (sub-)thread as read
7909 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
7910 remove all marks instead.  If the prefix argument is negative, tick
7911 articles instead.
7912
7913 @item T l
7914 @itemx C-M-l
7915 @kindex T l (Summary)
7916 @kindex C-M-l (Summary)
7917 @findex gnus-summary-lower-thread
7918 Lower the score of the current (sub-)thread
7919 (@code{gnus-summary-lower-thread}).
7920
7921 @item T i
7922 @kindex T i (Summary)
7923 @findex gnus-summary-raise-thread
7924 Increase the score of the current (sub-)thread
7925 (@code{gnus-summary-raise-thread}).
7926
7927 @item T #
7928 @kindex T # (Summary)
7929 @findex gnus-uu-mark-thread
7930 Set the process mark on the current (sub-)thread
7931 (@code{gnus-uu-mark-thread}).
7932
7933 @item T M-#
7934 @kindex T M-# (Summary)
7935 @findex gnus-uu-unmark-thread
7936 Remove the process mark from the current (sub-)thread
7937 (@code{gnus-uu-unmark-thread}).
7938
7939 @item T T
7940 @kindex T T (Summary)
7941 @findex gnus-summary-toggle-threads
7942 Toggle threading (@code{gnus-summary-toggle-threads}).
7943
7944 @item T s
7945 @kindex T s (Summary)
7946 @findex gnus-summary-show-thread
7947 Expose the (sub-)thread hidden under the current article, if any@*
7948 (@code{gnus-summary-show-thread}).
7949
7950 @item T h
7951 @kindex T h (Summary)
7952 @findex gnus-summary-hide-thread
7953 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
7954
7955 @item T S
7956 @kindex T S (Summary)
7957 @findex gnus-summary-show-all-threads
7958 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
7959
7960 @item T H
7961 @kindex T H (Summary)
7962 @findex gnus-summary-hide-all-threads
7963 Hide all threads (@code{gnus-summary-hide-all-threads}).
7964
7965 @item T t
7966 @kindex T t (Summary)
7967 @findex gnus-summary-rethread-current
7968 Re-thread the current article's thread
7969 (@code{gnus-summary-rethread-current}).  This works even when the
7970 summary buffer is otherwise unthreaded.
7971
7972 @item T ^
7973 @kindex T ^ (Summary)
7974 @findex gnus-summary-reparent-thread
7975 Make the current article the child of the marked (or previous) article
7976 (@code{gnus-summary-reparent-thread}).
7977
7978 @item T M-^
7979 @kindex T M-^ (Summary)
7980 @findex gnus-summary-reparent-children
7981 Make the current article the parent of the marked articles
7982 (@code{gnus-summary-reparent-children}).
7983
7984 @end table
7985
7986 The following commands are thread movement commands.  They all
7987 understand the numeric prefix.
7988
7989 @table @kbd
7990
7991 @item T n
7992 @kindex T n (Summary)
7993 @itemx C-M-f
7994 @kindex C-M-n (Summary)
7995 @itemx M-down
7996 @kindex M-down (Summary)
7997 @findex gnus-summary-next-thread
7998 Go to the next thread (@code{gnus-summary-next-thread}).
7999
8000 @item T p
8001 @kindex T p (Summary)
8002 @itemx C-M-b
8003 @kindex C-M-p (Summary)
8004 @itemx M-up
8005 @kindex M-up (Summary)
8006 @findex gnus-summary-prev-thread
8007 Go to the previous thread (@code{gnus-summary-prev-thread}).
8008
8009 @item T d
8010 @kindex T d (Summary)
8011 @findex gnus-summary-down-thread
8012 Descend the thread (@code{gnus-summary-down-thread}).
8013
8014 @item T u
8015 @kindex T u (Summary)
8016 @findex gnus-summary-up-thread
8017 Ascend the thread (@code{gnus-summary-up-thread}).
8018
8019 @item T o
8020 @kindex T o (Summary)
8021 @findex gnus-summary-top-thread
8022 Go to the top of the thread (@code{gnus-summary-top-thread}).
8023 @end table
8024
8025 @vindex gnus-thread-operation-ignore-subject
8026 If you ignore subject while threading, you'll naturally end up with
8027 threads that have several different subjects in them.  If you then issue
8028 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
8029 wish to kill the entire thread, but just those parts of the thread that
8030 have the same subject as the current article.  If you like this idea,
8031 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
8032 is non-@code{nil} (which it is by default), subjects will be ignored
8033 when doing thread commands.  If this variable is @code{nil}, articles in
8034 the same thread with different subjects will not be included in the
8035 operation in question.  If this variable is @code{fuzzy}, only articles
8036 that have subjects fuzzily equal will be included (@pxref{Fuzzy
8037 Matching}).
8038
8039
8040 @node Sorting the Summary Buffer
8041 @section Sorting the Summary Buffer
8042
8043 @findex gnus-thread-sort-by-total-score
8044 @findex gnus-thread-sort-by-date
8045 @findex gnus-thread-sort-by-score
8046 @findex gnus-thread-sort-by-subject
8047 @findex gnus-thread-sort-by-author
8048 @findex gnus-thread-sort-by-recipient
8049 @findex gnus-thread-sort-by-number
8050 @findex gnus-thread-sort-by-random
8051 @vindex gnus-thread-sort-functions
8052 @findex gnus-thread-sort-by-most-recent-number
8053 @findex gnus-thread-sort-by-most-recent-date
8054 If you are using a threaded summary display, you can sort the threads by
8055 setting @code{gnus-thread-sort-functions}, which can be either a single
8056 function, a list of functions, or a list containing functions and
8057 @code{(not some-function)} elements.
8058
8059 By default, sorting is done on article numbers.  Ready-made sorting
8060 predicate functions include @code{gnus-thread-sort-by-number},
8061 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-recipient},
8062 @code{gnus-thread-sort-by-subject},
8063 @code{gnus-thread-sort-by-date},
8064 @code{gnus-thread-sort-by-score},
8065 @code{gnus-thread-sort-by-most-recent-number},
8066 @code{gnus-thread-sort-by-most-recent-date},
8067 @code{gnus-thread-sort-by-random} and
8068 @code{gnus-thread-sort-by-total-score}.
8069
8070 Each function takes two threads and returns non-@code{nil} if the first
8071 thread should be sorted before the other.  Note that sorting really is
8072 normally done by looking only at the roots of each thread.
8073
8074 If you use more than one function, the primary sort key should be the
8075 last function in the list.  You should probably always include
8076 @code{gnus-thread-sort-by-number} in the list of sorting
8077 functions---preferably first.  This will ensure that threads that are
8078 equal with respect to the other sort criteria will be displayed in
8079 ascending article order.
8080
8081 If you would like to sort by reverse score, then by subject, and finally
8082 by number, you could do something like:
8083
8084 @lisp
8085 (setq gnus-thread-sort-functions
8086       '(gnus-thread-sort-by-number
8087         gnus-thread-sort-by-subject
8088         (not gnus-thread-sort-by-total-score)))
8089 @end lisp
8090
8091 The threads that have highest score will be displayed first in the
8092 summary buffer.  When threads have the same score, they will be sorted
8093 alphabetically.  The threads that have the same score and the same
8094 subject will be sorted by number, which is (normally) the sequence in
8095 which the articles arrived.
8096
8097 If you want to sort by score and then reverse arrival order, you could
8098 say something like:
8099
8100 @lisp
8101 (setq gnus-thread-sort-functions
8102       '((not gnus-thread-sort-by-number)
8103         gnus-thread-sort-by-score))
8104 @end lisp
8105
8106 @vindex gnus-thread-score-function
8107 The function in the @code{gnus-thread-score-function} variable (default
8108 @code{+}) is used for calculating the total score of a thread.  Useful
8109 functions might be @code{max}, @code{min}, or squared means, or whatever
8110 tickles your fancy.
8111
8112 @findex gnus-article-sort-functions
8113 @findex gnus-article-sort-by-date
8114 @findex gnus-article-sort-by-score
8115 @findex gnus-article-sort-by-subject
8116 @findex gnus-article-sort-by-author
8117 @findex gnus-article-sort-by-random
8118 @findex gnus-article-sort-by-number
8119 If you are using an unthreaded display for some strange reason or
8120 other, you have to fiddle with the @code{gnus-article-sort-functions}
8121 variable.  It is very similar to the
8122 @code{gnus-thread-sort-functions}, except that it uses slightly
8123 different functions for article comparison.  Available sorting
8124 predicate functions are @code{gnus-article-sort-by-number},
8125 @code{gnus-article-sort-by-author},
8126 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
8127 @code{gnus-article-sort-by-random}, and
8128 @code{gnus-article-sort-by-score}.
8129
8130 If you want to sort an unthreaded summary display by subject, you could
8131 say something like:
8132
8133 @lisp
8134 (setq gnus-article-sort-functions
8135       '(gnus-article-sort-by-number
8136         gnus-article-sort-by-subject))
8137 @end lisp
8138
8139 You can define group specific sorting via @code{gnus-parameters},
8140 @xref{Group Parameters}.
8141
8142
8143 @node Asynchronous Fetching
8144 @section Asynchronous Article Fetching
8145 @cindex asynchronous article fetching
8146 @cindex article pre-fetch
8147 @cindex pre-fetch
8148
8149 If you read your news from an @acronym{NNTP} server that's far away, the
8150 network latencies may make reading articles a chore.  You have to wait
8151 for a while after pressing @kbd{n} to go to the next article before the
8152 article appears.  Why can't Gnus just go ahead and fetch the article
8153 while you are reading the previous one?  Why not, indeed.
8154
8155 First, some caveats.  There are some pitfalls to using asynchronous
8156 article fetching, especially the way Gnus does it.
8157
8158 Let's say you are reading article 1, which is short, and article 2 is
8159 quite long, and you are not interested in reading that.  Gnus does not
8160 know this, so it goes ahead and fetches article 2.  You decide to read
8161 article 3, but since Gnus is in the process of fetching article 2, the
8162 connection is blocked.
8163
8164 To avoid these situations, Gnus will open two (count 'em two)
8165 connections to the server.  Some people may think this isn't a very nice
8166 thing to do, but I don't see any real alternatives.  Setting up that
8167 extra connection takes some time, so Gnus startup will be slower.
8168
8169 Gnus will fetch more articles than you will read.  This will mean that
8170 the link between your machine and the @acronym{NNTP} server will become more
8171 loaded than if you didn't use article pre-fetch.  The server itself will
8172 also become more loaded---both with the extra article requests, and the
8173 extra connection.
8174
8175 Ok, so now you know that you shouldn't really use this thing@dots{} unless
8176 you really want to.
8177
8178 @vindex gnus-asynchronous
8179 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
8180 happen automatically.
8181
8182 @vindex gnus-use-article-prefetch
8183 You can control how many articles are to be pre-fetched by setting
8184 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
8185 that when you read an article in the group, the back end will pre-fetch
8186 the next 30 articles.  If this variable is @code{t}, the back end will
8187 pre-fetch all the articles it can without bound.  If it is
8188 @code{nil}, no pre-fetching will be done.
8189
8190 @vindex gnus-async-prefetch-article-p
8191 @findex gnus-async-unread-p
8192 There are probably some articles that you don't want to pre-fetch---read
8193 articles, for instance.  The @code{gnus-async-prefetch-article-p}
8194 variable controls whether an article is to be pre-fetched.  This
8195 function should return non-@code{nil} when the article in question is
8196 to be pre-fetched.  The default is @code{gnus-async-unread-p}, which
8197 returns @code{nil} on read articles.  The function is called with an
8198 article data structure as the only parameter.
8199
8200 If, for instance, you wish to pre-fetch only unread articles shorter
8201 than 100 lines, you could say something like:
8202
8203 @lisp
8204 (defun my-async-short-unread-p (data)
8205   "Return non-nil for short, unread articles."
8206   (and (gnus-data-unread-p data)
8207        (< (mail-header-lines (gnus-data-header data))
8208           100)))
8209
8210 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
8211 @end lisp
8212
8213 These functions will be called many, many times, so they should
8214 preferably be short and sweet to avoid slowing down Gnus too much.
8215 It's probably a good idea to byte-compile things like this.
8216
8217 @vindex gnus-prefetched-article-deletion-strategy
8218 Articles have to be removed from the asynch buffer sooner or later.  The
8219 @code{gnus-prefetched-article-deletion-strategy} says when to remove
8220 articles.  This is a list that may contain the following elements:
8221
8222 @table @code
8223 @item read
8224 Remove articles when they are read.
8225
8226 @item exit
8227 Remove articles when exiting the group.
8228 @end table
8229
8230 The default value is @code{(read exit)}.
8231
8232 @c @vindex gnus-use-header-prefetch
8233 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
8234 @c from the next group.
8235
8236
8237 @node Article Caching
8238 @section Article Caching
8239 @cindex article caching
8240 @cindex caching
8241
8242 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
8243 consider turning article caching on.  Each article will then be stored
8244 locally under your home directory.  As you may surmise, this could
8245 potentially use @emph{huge} amounts of disk space, as well as eat up all
8246 your inodes so fast it will make your head swim.  In vodka.
8247
8248 Used carefully, though, it could be just an easier way to save articles.
8249
8250 @vindex gnus-use-long-file-name
8251 @vindex gnus-cache-directory
8252 @vindex gnus-use-cache
8253 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
8254 all articles ticked or marked as dormant will then be copied
8255 over to your local cache (@code{gnus-cache-directory}).  Whether this
8256 cache is flat or hierarchical is controlled by the
8257 @code{gnus-use-long-file-name} variable, as usual.
8258
8259 When re-selecting a ticked or dormant article, it will be fetched from the
8260 cache instead of from the server.  As articles in your cache will never
8261 expire, this might serve as a method of saving articles while still
8262 keeping them where they belong.  Just mark all articles you want to save
8263 as dormant, and don't worry.
8264
8265 When an article is marked as read, is it removed from the cache.
8266
8267 @vindex gnus-cache-remove-articles
8268 @vindex gnus-cache-enter-articles
8269 The entering/removal of articles from the cache is controlled by the
8270 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
8271 variables.  Both are lists of symbols.  The first is @code{(ticked
8272 dormant)} by default, meaning that ticked and dormant articles will be
8273 put in the cache.  The latter is @code{(read)} by default, meaning that
8274 articles marked as read are removed from the cache.  Possibly
8275 symbols in these two lists are @code{ticked}, @code{dormant},
8276 @code{unread} and @code{read}.
8277
8278 @findex gnus-jog-cache
8279 So where does the massive article-fetching and storing come into the
8280 picture?  The @code{gnus-jog-cache} command will go through all
8281 subscribed newsgroups, request all unread articles, score them, and
8282 store them in the cache.  You should only ever, ever ever ever, use this
8283 command if 1) your connection to the @acronym{NNTP} server is really, really,
8284 really slow and 2) you have a really, really, really huge disk.
8285 Seriously.  One way to cut down on the number of articles downloaded is
8286 to score unwanted articles down and have them marked as read.  They will
8287 not then be downloaded by this command.
8288
8289 @vindex gnus-uncacheable-groups
8290 @vindex gnus-cacheable-groups
8291 It is likely that you do not want caching on all groups.  For instance,
8292 if your @code{nnml} mail is located under your home directory, it makes no
8293 sense to cache it somewhere else under your home directory.  Unless you
8294 feel that it's neat to use twice as much space.
8295
8296 To limit the caching, you could set @code{gnus-cacheable-groups} to a
8297 regexp of groups to cache, @samp{^nntp} for instance, or set the
8298 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
8299 Both variables are @code{nil} by default.  If a group matches both
8300 variables, the group is not cached.
8301
8302 @findex gnus-cache-generate-nov-databases
8303 @findex gnus-cache-generate-active
8304 @vindex gnus-cache-active-file
8305 The cache stores information on what articles it contains in its active
8306 file (@code{gnus-cache-active-file}).  If this file (or any other parts
8307 of the cache) becomes all messed up for some reason or other, Gnus
8308 offers two functions that will try to set things right.  @kbd{M-x
8309 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
8310 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
8311 file.
8312
8313 @findex gnus-cache-move-cache
8314 @code{gnus-cache-move-cache} will move your whole
8315 @code{gnus-cache-directory} to some other location.  You get asked to
8316 where, isn't that cool?
8317
8318 @node Persistent Articles
8319 @section Persistent Articles
8320 @cindex persistent articles
8321
8322 Closely related to article caching, we have @dfn{persistent articles}.
8323 In fact, it's just a different way of looking at caching, and much more
8324 useful in my opinion.
8325
8326 Say you're reading a newsgroup, and you happen on to some valuable gem
8327 that you want to keep and treasure forever.  You'd normally just save it
8328 (using one of the many saving commands) in some file.  The problem with
8329 that is that it's just, well, yucky.  Ideally you'd prefer just having
8330 the article remain in the group where you found it forever; untouched by
8331 the expiry going on at the news server.
8332
8333 This is what a @dfn{persistent article} is---an article that just won't
8334 be deleted.  It's implemented using the normal cache functions, but
8335 you use two explicit commands for managing persistent articles:
8336
8337 @table @kbd
8338
8339 @item *
8340 @kindex * (Summary)
8341 @findex gnus-cache-enter-article
8342 Make the current article persistent (@code{gnus-cache-enter-article}).
8343
8344 @item M-*
8345 @kindex M-* (Summary)
8346 @findex gnus-cache-remove-article
8347 Remove the current article from the persistent articles
8348 (@code{gnus-cache-remove-article}).  This will normally delete the
8349 article.
8350 @end table
8351
8352 Both these commands understand the process/prefix convention.
8353
8354 To avoid having all ticked articles (and stuff) entered into the cache,
8355 you should set @code{gnus-use-cache} to @code{passive} if you're just
8356 interested in persistent articles:
8357
8358 @lisp
8359 (setq gnus-use-cache 'passive)
8360 @end lisp
8361
8362 @node Sticky Articles
8363 @section Sticky Articles
8364 @cindex sticky articles
8365
8366 When you select an article the current article buffer will be reused
8367 according to the value of the variable
8368 @code{gnus-single-article-buffer}.  If its value is non-@code{nil} (the
8369 default) all articles reuse the same article buffer.  Else each group
8370 has its own article buffer.
8371
8372 This implies that it's not possible to have more than one article buffer
8373 in a group at a time.  But sometimes you might want to display all the
8374 latest emails from your mother, your father, your aunt, your uncle and
8375 your 17 cousins to coordinate the next christmas party.
8376
8377 That's where sticky articles come in handy.  A sticky article buffer
8378 basically is a normal article buffer, but it won't be reused when you
8379 select another article.  You can make an article sticky with:
8380
8381 @table @kbd
8382 @item A S
8383 @kindex A S (Summary)
8384 @findex gnus-sticky-article
8385 Make the current article sticky.  If a prefix arg is given, ask for a
8386 name for this sticky article buffer.
8387 @end table
8388
8389 To close a sticky article buffer you can use these commands:
8390
8391 @table @kbd
8392 @item q
8393 @kindex q (Article)
8394 @findex bury-buffer
8395 Puts this sticky article buffer at the end of the list of all buffers.
8396
8397 @item k
8398 @kindex k (Article)
8399 @findex gnus-kill-sticky-article-buffer
8400 Kills this sticky article buffer.
8401 @end table
8402
8403 To kill all sticky article buffers you can use:
8404
8405 @defun gnus-kill-sticky-article-buffers ARG
8406 Kill all sticky article buffers.
8407 If a prefix ARG is given, ask for confirmation.
8408 @end defun
8409
8410 @node Article Backlog
8411 @section Article Backlog
8412 @cindex backlog
8413 @cindex article backlog
8414
8415 If you have a slow connection, but the idea of using caching seems
8416 unappealing to you (and it is, really), you can help the situation some
8417 by switching on the @dfn{backlog}.  This is where Gnus will buffer
8418 already read articles so that it doesn't have to re-fetch articles
8419 you've already read.  This only helps if you are in the habit of
8420 re-selecting articles you've recently read, of course.  If you never do
8421 that, turning the backlog on will slow Gnus down a little bit, and
8422 increase memory usage some.
8423
8424 @vindex gnus-keep-backlog
8425 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
8426 at most @var{n} old articles in a buffer for later re-fetching.  If this
8427 variable is non-@code{nil} and is not a number, Gnus will store
8428 @emph{all} read articles, which means that your Emacs will grow without
8429 bound before exploding and taking your machine down with you.  I put
8430 that in there just to keep y'all on your toes.
8431
8432 The default value is 20.
8433
8434
8435 @node Saving Articles
8436 @section Saving Articles
8437 @cindex saving articles
8438
8439 Gnus can save articles in a number of ways.  Below is the documentation
8440 for saving articles in a fairly straight-forward fashion (i.e., little
8441 processing of the article is done before it is saved).  For a different
8442 approach (uudecoding, unsharing) you should use @code{gnus-uu}
8443 (@pxref{Decoding Articles}).
8444
8445 For the commands listed here, the target is a file.  If you want to
8446 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
8447 command (@pxref{Mail Group Commands}).
8448
8449 @vindex gnus-save-all-headers
8450 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
8451 unwanted headers before saving the article.
8452
8453 @vindex gnus-saved-headers
8454 If the preceding variable is @code{nil}, all headers that match the
8455 @code{gnus-saved-headers} regexp will be kept, while the rest will be
8456 deleted before saving.
8457
8458 @table @kbd
8459
8460 @item O o
8461 @itemx o
8462 @kindex O o (Summary)
8463 @kindex o (Summary)
8464 @findex gnus-summary-save-article
8465 @c @icon{gnus-summary-save-article}
8466 Save the current article using the default article saver
8467 (@code{gnus-summary-save-article}).
8468
8469 @item O m
8470 @kindex O m (Summary)
8471 @findex gnus-summary-save-article-mail
8472 Save the current article in a Unix mail box (mbox) file
8473 (@code{gnus-summary-save-article-mail}).
8474
8475 @item O r
8476 @kindex O r (Summary)
8477 @findex gnus-summary-save-article-rmail
8478 Save the current article in Rmail format
8479 (@code{gnus-summary-save-article-rmail}).
8480
8481 @item O f
8482 @kindex O f (Summary)
8483 @findex gnus-summary-save-article-file
8484 @c @icon{gnus-summary-save-article-file}
8485 Save the current article in plain file format
8486 (@code{gnus-summary-save-article-file}).
8487
8488 @item O F
8489 @kindex O F (Summary)
8490 @findex gnus-summary-write-article-file
8491 Write the current article in plain file format, overwriting any previous
8492 file contents (@code{gnus-summary-write-article-file}).
8493
8494 @item O b
8495 @kindex O b (Summary)
8496 @findex gnus-summary-save-article-body-file
8497 Save the current article body in plain file format
8498 (@code{gnus-summary-save-article-body-file}).
8499
8500 @item O h
8501 @kindex O h (Summary)
8502 @findex gnus-summary-save-article-folder
8503 Save the current article in mh folder format
8504 (@code{gnus-summary-save-article-folder}).
8505
8506 @item O v
8507 @kindex O v (Summary)
8508 @findex gnus-summary-save-article-vm
8509 Save the current article in a VM folder
8510 (@code{gnus-summary-save-article-vm}).
8511
8512 @item O p
8513 @itemx |
8514 @kindex O p (Summary)
8515 @kindex | (Summary)
8516 @findex gnus-summary-pipe-output
8517 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
8518 the current article to a process (@code{gnus-summary-pipe-output}).
8519 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
8520 complete headers in the piped output.
8521
8522 @item O P
8523 @kindex O P (Summary)
8524 @findex gnus-summary-muttprint
8525 @vindex gnus-summary-muttprint-program
8526 Save the current article into muttprint.  That is, print it using the
8527 external program @uref{http://muttprint.sourceforge.net/,
8528 Muttprint}.  The program name and options to use is controlled by the
8529 variable @code{gnus-summary-muttprint-program}.
8530 (@code{gnus-summary-muttprint}).
8531
8532 @end table
8533
8534 @vindex gnus-prompt-before-saving
8535 All these commands use the process/prefix convention
8536 (@pxref{Process/Prefix}).  If you save bunches of articles using these
8537 functions, you might get tired of being prompted for files to save each
8538 and every article in.  The prompting action is controlled by
8539 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
8540 default, giving you that excessive prompting action you know and
8541 loathe.  If you set this variable to @code{t} instead, you'll be prompted
8542 just once for each series of articles you save.  If you like to really
8543 have Gnus do all your thinking for you, you can even set this variable
8544 to @code{nil}, which means that you will never be prompted for files to
8545 save articles in.  Gnus will simply save all the articles in the default
8546 files.
8547
8548
8549 @vindex gnus-default-article-saver
8550 You can customize the @code{gnus-default-article-saver} variable to make
8551 Gnus do what you want it to.  You can use any of the eight ready-made
8552 functions below, or you can create your own.
8553
8554 @table @code
8555
8556 @item gnus-summary-save-in-rmail
8557 @findex gnus-summary-save-in-rmail
8558 @vindex gnus-rmail-save-name
8559 @findex gnus-plain-save-name
8560 This is the default format, @dfn{Babyl}.  Uses the function in the
8561 @code{gnus-rmail-save-name} variable to get a file name to save the
8562 article in.  The default is @code{gnus-plain-save-name}.
8563
8564 @item gnus-summary-save-in-mail
8565 @findex gnus-summary-save-in-mail
8566 @vindex gnus-mail-save-name
8567 Save in a Unix mail (mbox) file.  Uses the function in the
8568 @code{gnus-mail-save-name} variable to get a file name to save the
8569 article in.  The default is @code{gnus-plain-save-name}.
8570
8571 @item gnus-summary-save-in-file
8572 @findex gnus-summary-save-in-file
8573 @vindex gnus-file-save-name
8574 @findex gnus-numeric-save-name
8575 Append the article straight to an ordinary file.  Uses the function in
8576 the @code{gnus-file-save-name} variable to get a file name to save the
8577 article in.  The default is @code{gnus-numeric-save-name}.
8578
8579 @item gnus-summary-write-to-file
8580 @findex gnus-summary-write-to-file
8581 Write the article straight to an ordinary file.  The file is
8582 overwritten if it exists.  Uses the function in the
8583 @code{gnus-file-save-name} variable to get a file name to save the
8584 article in.  The default is @code{gnus-numeric-save-name}.
8585
8586 @item gnus-summary-save-body-in-file
8587 @findex gnus-summary-save-body-in-file
8588 Append the article body to an ordinary file.  Uses the function in the
8589 @code{gnus-file-save-name} variable to get a file name to save the
8590 article in.  The default is @code{gnus-numeric-save-name}.
8591
8592 @item gnus-summary-write-body-to-file
8593 @findex gnus-summary-write-body-to-file
8594 Write the article body straight to an ordinary file.  The file is
8595 overwritten if it exists.  Uses the function in the
8596 @code{gnus-file-save-name} variable to get a file name to save the
8597 article in.  The default is @code{gnus-numeric-save-name}.
8598
8599 @item gnus-summary-save-in-folder
8600 @findex gnus-summary-save-in-folder
8601 @findex gnus-folder-save-name
8602 @findex gnus-Folder-save-name
8603 @vindex gnus-folder-save-name
8604 @cindex rcvstore
8605 @cindex MH folders
8606 Save the article to an MH folder using @code{rcvstore} from the MH
8607 library.  Uses the function in the @code{gnus-folder-save-name} variable
8608 to get a file name to save the article in.  The default is
8609 @code{gnus-folder-save-name}, but you can also use
8610 @code{gnus-Folder-save-name}, which creates capitalized names.
8611
8612 @item gnus-summary-save-in-vm
8613 @findex gnus-summary-save-in-vm
8614 Save the article in a VM folder.  You have to have the VM mail
8615 reader to use this setting.
8616 @end table
8617
8618 The symbol of each function may have the following properties:
8619
8620 @table @code
8621 @item :decode
8622 The value non-@code{nil} means save decoded articles.  This is
8623 meaningful only with @code{gnus-summary-save-in-file},
8624 @code{gnus-summary-save-body-in-file},
8625 @code{gnus-summary-write-to-file}, and
8626 @code{gnus-summary-write-body-to-file}.
8627
8628 @item :function
8629 The value specifies an alternative function which appends, not
8630 overwrites, articles to a file.  This implies that when saving many
8631 articles at a time, @code{gnus-prompt-before-saving} is bound to
8632 @code{t} and all articles are saved in a single file.  This is
8633 meaningful only with @code{gnus-summary-write-to-file} and
8634 @code{gnus-summary-write-body-to-file}.
8635
8636 @item :headers
8637 The value specifies the symbol of a variable of which the value
8638 specifies headers to be saved.  If it is omitted,
8639 @code{gnus-save-all-headers} and @code{gnus-saved-headers} control what
8640 headers should be saved.
8641 @end table
8642
8643 @vindex gnus-article-save-directory
8644 All of these functions, except for the last one, will save the article
8645 in the @code{gnus-article-save-directory}, which is initialized from the
8646 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
8647 default.
8648
8649 As you can see above, the functions use different functions to find a
8650 suitable name of a file to save the article in.  Below is a list of
8651 available functions that generate names:
8652
8653 @table @code
8654
8655 @item gnus-Numeric-save-name
8656 @findex gnus-Numeric-save-name
8657 File names like @file{~/News/Alt.andrea-dworkin/45}.
8658
8659 @item gnus-numeric-save-name
8660 @findex gnus-numeric-save-name
8661 File names like @file{~/News/alt.andrea-dworkin/45}.
8662
8663 @item gnus-Plain-save-name
8664 @findex gnus-Plain-save-name
8665 File names like @file{~/News/Alt.andrea-dworkin}.
8666
8667 @item gnus-plain-save-name
8668 @findex gnus-plain-save-name
8669 File names like @file{~/News/alt.andrea-dworkin}.
8670
8671 @item gnus-sender-save-name
8672 @findex gnus-sender-save-name
8673 File names like @file{~/News/larsi}.
8674 @end table
8675
8676 @vindex gnus-split-methods
8677 You can have Gnus suggest where to save articles by plonking a regexp into
8678 the @code{gnus-split-methods} alist.  For instance, if you would like to
8679 save articles related to Gnus in the file @file{gnus-stuff}, and articles
8680 related to VM in @file{vm-stuff}, you could set this variable to something
8681 like:
8682
8683 @lisp
8684 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
8685  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
8686  (my-choosing-function "../other-dir/my-stuff")
8687  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
8688 @end lisp
8689
8690 We see that this is a list where each element is a list that has two
8691 elements---the @dfn{match} and the @dfn{file}.  The match can either be
8692 a string (in which case it is used as a regexp to match on the article
8693 head); it can be a symbol (which will be called as a function with the
8694 group name as a parameter); or it can be a list (which will be
8695 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
8696 the @dfn{file} will be used as a default prompt.  In addition, the
8697 result of the operation itself will be used if the function or form
8698 called returns a string or a list of strings.
8699
8700 You basically end up with a list of file names that might be used when
8701 saving the current article.  (All ``matches'' will be used.)  You will
8702 then be prompted for what you really want to use as a name, with file
8703 name completion over the results from applying this variable.
8704
8705 This variable is @code{((gnus-article-archive-name))} by default, which
8706 means that Gnus will look at the articles it saves for an
8707 @code{Archive-name} line and use that as a suggestion for the file
8708 name.
8709
8710 Here's an example function to clean up file names somewhat.  If you have
8711 lots of mail groups called things like
8712 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
8713 these group names before creating the file name to save to.  The
8714 following will do just that:
8715
8716 @lisp
8717 (defun my-save-name (group)
8718   (when (string-match "^nnml:mail." group)
8719     (substring group (match-end 0))))
8720
8721 (setq gnus-split-methods
8722       '((gnus-article-archive-name)
8723         (my-save-name)))
8724 @end lisp
8725
8726
8727 @vindex gnus-use-long-file-name
8728 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
8729 @code{nil}, all the preceding functions will replace all periods
8730 (@samp{.}) in the group names with slashes (@samp{/})---which means that
8731 the functions will generate hierarchies of directories instead of having
8732 all the files in the top level directory
8733 (@file{~/News/alt/andrea-dworkin} instead of
8734 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
8735 on most systems.  However, for historical reasons, this is @code{nil} on
8736 Xenix and usg-unix-v machines by default.
8737
8738 This function also affects kill and score file names.  If this variable
8739 is a list, and the list contains the element @code{not-score}, long file
8740 names will not be used for score files, if it contains the element
8741 @code{not-save}, long file names will not be used for saving, and if it
8742 contains the element @code{not-kill}, long file names will not be used
8743 for kill files.
8744
8745 If you'd like to save articles in a hierarchy that looks something like
8746 a spool, you could
8747
8748 @lisp
8749 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
8750 (setq gnus-default-article-saver
8751       'gnus-summary-save-in-file)          ; @r{no encoding}
8752 @end lisp
8753
8754 Then just save with @kbd{o}.  You'd then read this hierarchy with
8755 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
8756 the top level directory as the argument (@file{~/News/}).  Then just walk
8757 around to the groups/directories with @code{nneething}.
8758
8759
8760 @node Decoding Articles
8761 @section Decoding Articles
8762 @cindex decoding articles
8763
8764 Sometime users post articles (or series of articles) that have been
8765 encoded in some way or other.  Gnus can decode them for you.
8766
8767 @menu
8768 * Uuencoded Articles::          Uudecode articles.
8769 * Shell Archives::              Unshar articles.
8770 * PostScript Files::            Split PostScript.
8771 * Other Files::                 Plain save and binhex.
8772 * Decoding Variables::          Variables for a happy decoding.
8773 * Viewing Files::               You want to look at the result of the decoding?
8774 @end menu
8775
8776 @cindex series
8777 @cindex article series
8778 All these functions use the process/prefix convention
8779 (@pxref{Process/Prefix}) for finding out what articles to work on, with
8780 the extension that a ``single article'' means ``a single series''.  Gnus
8781 can find out by itself what articles belong to a series, decode all the
8782 articles and unpack/view/save the resulting file(s).
8783
8784 Gnus guesses what articles are in the series according to the following
8785 simplish rule: The subjects must be (nearly) identical, except for the
8786 last two numbers of the line.  (Spaces are largely ignored, however.)
8787
8788 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
8789 will find all the articles that match the regexp @samp{^cat.gif
8790 ([0-9]+/[0-9]+).*$}.
8791
8792 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
8793 series}, will not be properly recognized by any of the automatic viewing
8794 commands, and you have to mark the articles manually with @kbd{#}.
8795
8796
8797 @node Uuencoded Articles
8798 @subsection Uuencoded Articles
8799 @cindex uudecode
8800 @cindex uuencoded articles
8801
8802 @table @kbd
8803
8804 @item X u
8805 @kindex X u (Summary)
8806 @findex gnus-uu-decode-uu
8807 @c @icon{gnus-uu-decode-uu}
8808 Uudecodes the current series (@code{gnus-uu-decode-uu}).
8809
8810 @item X U
8811 @kindex X U (Summary)
8812 @findex gnus-uu-decode-uu-and-save
8813 Uudecodes and saves the current series
8814 (@code{gnus-uu-decode-uu-and-save}).
8815
8816 @item X v u
8817 @kindex X v u (Summary)
8818 @findex gnus-uu-decode-uu-view
8819 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
8820
8821 @item X v U
8822 @kindex X v U (Summary)
8823 @findex gnus-uu-decode-uu-and-save-view
8824 Uudecodes, views and saves the current series
8825 (@code{gnus-uu-decode-uu-and-save-view}).
8826
8827 @end table
8828
8829 Remember that these all react to the presence of articles marked with
8830 the process mark.  If, for instance, you'd like to decode and save an
8831 entire newsgroup, you'd typically do @kbd{M P a}
8832 (@code{gnus-uu-mark-all}) and then @kbd{X U}
8833 (@code{gnus-uu-decode-uu-and-save}).
8834
8835 All this is very much different from how @code{gnus-uu} worked with
8836 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
8837 the sun.  This version of @code{gnus-uu} generally assumes that you mark
8838 articles in some way (@pxref{Setting Process Marks}) and then press
8839 @kbd{X u}.
8840
8841 @vindex gnus-uu-notify-files
8842 Note: When trying to decode articles that have names matching
8843 @code{gnus-uu-notify-files}, which is hard-coded to
8844 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
8845 automatically post an article on @samp{comp.unix.wizards} saying that
8846 you have just viewed the file in question.  This feature can't be turned
8847 off.
8848
8849
8850 @node Shell Archives
8851 @subsection Shell Archives
8852 @cindex unshar
8853 @cindex shell archives
8854 @cindex shared articles
8855
8856 Shell archives (``shar files'') used to be a popular way to distribute
8857 sources, but it isn't used all that much today.  In any case, we have
8858 some commands to deal with these:
8859
8860 @table @kbd
8861
8862 @item X s
8863 @kindex X s (Summary)
8864 @findex gnus-uu-decode-unshar
8865 Unshars the current series (@code{gnus-uu-decode-unshar}).
8866
8867 @item X S
8868 @kindex X S (Summary)
8869 @findex gnus-uu-decode-unshar-and-save
8870 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
8871
8872 @item X v s
8873 @kindex X v s (Summary)
8874 @findex gnus-uu-decode-unshar-view
8875 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
8876
8877 @item X v S
8878 @kindex X v S (Summary)
8879 @findex gnus-uu-decode-unshar-and-save-view
8880 Unshars, views and saves the current series
8881 (@code{gnus-uu-decode-unshar-and-save-view}).
8882 @end table
8883
8884
8885 @node PostScript Files
8886 @subsection PostScript Files
8887 @cindex PostScript
8888
8889 @table @kbd
8890
8891 @item X p
8892 @kindex X p (Summary)
8893 @findex gnus-uu-decode-postscript
8894 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
8895
8896 @item X P
8897 @kindex X P (Summary)
8898 @findex gnus-uu-decode-postscript-and-save
8899 Unpack and save the current PostScript series
8900 (@code{gnus-uu-decode-postscript-and-save}).
8901
8902 @item X v p
8903 @kindex X v p (Summary)
8904 @findex gnus-uu-decode-postscript-view
8905 View the current PostScript series
8906 (@code{gnus-uu-decode-postscript-view}).
8907
8908 @item X v P
8909 @kindex X v P (Summary)
8910 @findex gnus-uu-decode-postscript-and-save-view
8911 View and save the current PostScript series
8912 (@code{gnus-uu-decode-postscript-and-save-view}).
8913 @end table
8914
8915
8916 @node Other Files
8917 @subsection Other Files
8918
8919 @table @kbd
8920 @item X o
8921 @kindex X o (Summary)
8922 @findex gnus-uu-decode-save
8923 Save the current series
8924 (@code{gnus-uu-decode-save}).
8925
8926 @item X b
8927 @kindex X b (Summary)
8928 @findex gnus-uu-decode-binhex
8929 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
8930 doesn't really work yet.
8931
8932 @item X Y
8933 @kindex X Y (Summary)
8934 @findex gnus-uu-decode-yenc
8935 yEnc-decode the current series and save it (@code{gnus-uu-decode-yenc}).
8936 @end table
8937
8938
8939 @node Decoding Variables
8940 @subsection Decoding Variables
8941
8942 Adjective, not verb.
8943
8944 @menu
8945 * Rule Variables::              Variables that say how a file is to be viewed.
8946 * Other Decode Variables::      Other decode variables.
8947 * Uuencoding and Posting::      Variables for customizing uuencoding.
8948 @end menu
8949
8950
8951 @node Rule Variables
8952 @subsubsection Rule Variables
8953 @cindex rule variables
8954
8955 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
8956 variables are of the form
8957
8958 @lisp
8959       (list '(regexp1 command2)
8960             '(regexp2 command2)
8961             ...)
8962 @end lisp
8963
8964 @table @code
8965
8966 @item gnus-uu-user-view-rules
8967 @vindex gnus-uu-user-view-rules
8968 @cindex sox
8969 This variable is consulted first when viewing files.  If you wish to use,
8970 for instance, @code{sox} to convert an @file{.au} sound file, you could
8971 say something like:
8972 @lisp
8973 (setq gnus-uu-user-view-rules
8974       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
8975 @end lisp
8976
8977 @item gnus-uu-user-view-rules-end
8978 @vindex gnus-uu-user-view-rules-end
8979 This variable is consulted if Gnus couldn't make any matches from the
8980 user and default view rules.
8981
8982 @item gnus-uu-user-archive-rules
8983 @vindex gnus-uu-user-archive-rules
8984 This variable can be used to say what commands should be used to unpack
8985 archives.
8986 @end table
8987
8988
8989 @node Other Decode Variables
8990 @subsubsection Other Decode Variables
8991
8992 @table @code
8993 @vindex gnus-uu-grabbed-file-functions
8994
8995 @item gnus-uu-grabbed-file-functions
8996 All functions in this list will be called right after each file has been
8997 successfully decoded---so that you can move or view files right away,
8998 and don't have to wait for all files to be decoded before you can do
8999 anything.  Ready-made functions you can put in this list are:
9000
9001 @table @code
9002
9003 @item gnus-uu-grab-view
9004 @findex gnus-uu-grab-view
9005 View the file.
9006
9007 @item gnus-uu-grab-move
9008 @findex gnus-uu-grab-move
9009 Move the file (if you're using a saving function.)
9010 @end table
9011
9012 @item gnus-uu-be-dangerous
9013 @vindex gnus-uu-be-dangerous
9014 Specifies what to do if unusual situations arise during decoding.  If
9015 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
9016 that didn't work, and overwrite existing files.  Otherwise, ask each
9017 time.
9018
9019 @item gnus-uu-ignore-files-by-name
9020 @vindex gnus-uu-ignore-files-by-name
9021 Files with name matching this regular expression won't be viewed.
9022
9023 @item gnus-uu-ignore-files-by-type
9024 @vindex gnus-uu-ignore-files-by-type
9025 Files with a @acronym{MIME} type matching this variable won't be viewed.
9026 Note that Gnus tries to guess what type the file is based on the name.
9027 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
9028 kludgey.
9029
9030 @item gnus-uu-tmp-dir
9031 @vindex gnus-uu-tmp-dir
9032 Where @code{gnus-uu} does its work.
9033
9034 @item gnus-uu-do-not-unpack-archives
9035 @vindex gnus-uu-do-not-unpack-archives
9036 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
9037 looking for files to display.
9038
9039 @item gnus-uu-view-and-save
9040 @vindex gnus-uu-view-and-save
9041 Non-@code{nil} means that the user will always be asked to save a file
9042 after viewing it.
9043
9044 @item gnus-uu-ignore-default-view-rules
9045 @vindex gnus-uu-ignore-default-view-rules
9046 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
9047 rules.
9048
9049 @item gnus-uu-ignore-default-archive-rules
9050 @vindex gnus-uu-ignore-default-archive-rules
9051 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
9052 unpacking commands.
9053
9054 @item gnus-uu-kill-carriage-return
9055 @vindex gnus-uu-kill-carriage-return
9056 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
9057 from articles.
9058
9059 @item gnus-uu-unmark-articles-not-decoded
9060 @vindex gnus-uu-unmark-articles-not-decoded
9061 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
9062 decoded articles as unread.
9063
9064 @item gnus-uu-correct-stripped-uucode
9065 @vindex gnus-uu-correct-stripped-uucode
9066 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
9067 uuencoded files that have had trailing spaces deleted.
9068
9069 @item gnus-uu-pre-uudecode-hook
9070 @vindex gnus-uu-pre-uudecode-hook
9071 Hook run before sending a message to @code{uudecode}.
9072
9073 @item gnus-uu-view-with-metamail
9074 @vindex gnus-uu-view-with-metamail
9075 @cindex metamail
9076 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
9077 commands defined by the rule variables and just fudge a @acronym{MIME}
9078 content type based on the file name.  The result will be fed to
9079 @code{metamail} for viewing.
9080
9081 @item gnus-uu-save-in-digest
9082 @vindex gnus-uu-save-in-digest
9083 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
9084 decoding, will save in digests.  If this variable is @code{nil},
9085 @code{gnus-uu} will just save everything in a file without any
9086 embellishments.  The digesting almost conforms to RFC 1153---no easy way
9087 to specify any meaningful volume and issue numbers were found, so I
9088 simply dropped them.
9089
9090 @end table
9091
9092
9093 @node Uuencoding and Posting
9094 @subsubsection Uuencoding and Posting
9095
9096 @table @code
9097
9098 @item gnus-uu-post-include-before-composing
9099 @vindex gnus-uu-post-include-before-composing
9100 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
9101 before you compose the article.  If this variable is @code{t}, you can
9102 either include an encoded file with @kbd{C-c C-i} or have one included
9103 for you when you post the article.
9104
9105 @item gnus-uu-post-length
9106 @vindex gnus-uu-post-length
9107 Maximum length of an article.  The encoded file will be split into how
9108 many articles it takes to post the entire file.
9109
9110 @item gnus-uu-post-threaded
9111 @vindex gnus-uu-post-threaded
9112 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
9113 thread.  This may not be smart, as no other decoder I have seen is able
9114 to follow threads when collecting uuencoded articles.  (Well, I have
9115 seen one package that does that---@code{gnus-uu}, but somehow, I don't
9116 think that counts@dots{}) Default is @code{nil}.
9117
9118 @item gnus-uu-post-separate-description
9119 @vindex gnus-uu-post-separate-description
9120 Non-@code{nil} means that the description will be posted in a separate
9121 article.  The first article will typically be numbered (0/x).  If this
9122 variable is @code{nil}, the description the user enters will be included
9123 at the beginning of the first article, which will be numbered (1/x).
9124 Default is @code{t}.
9125
9126 @end table
9127
9128
9129 @node Viewing Files
9130 @subsection Viewing Files
9131 @cindex viewing files
9132 @cindex pseudo-articles
9133
9134 After decoding, if the file is some sort of archive, Gnus will attempt
9135 to unpack the archive and see if any of the files in the archive can be
9136 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
9137 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
9138 uncompress and de-tar the main file, and then view the two pictures.
9139 This unpacking process is recursive, so if the archive contains archives
9140 of archives, it'll all be unpacked.
9141
9142 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
9143 extracted file into the summary buffer.  If you go to these
9144 ``articles'', you will be prompted for a command to run (usually Gnus
9145 will make a suggestion), and then the command will be run.
9146
9147 @vindex gnus-view-pseudo-asynchronously
9148 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
9149 until the viewing is done before proceeding.
9150
9151 @vindex gnus-view-pseudos
9152 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
9153 the pseudo-articles into the summary buffer, but view them
9154 immediately.  If this variable is @code{not-confirm}, the user won't even
9155 be asked for a confirmation before viewing is done.
9156
9157 @vindex gnus-view-pseudos-separately
9158 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
9159 pseudo-article will be created for each file to be viewed.  If
9160 @code{nil}, all files that use the same viewing command will be given as
9161 a list of parameters to that command.
9162
9163 @vindex gnus-insert-pseudo-articles
9164 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
9165 pseudo-articles when decoding.  It is @code{t} by default.
9166
9167 So; there you are, reading your @emph{pseudo-articles} in your
9168 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
9169 Why isn't anything real anymore? How did we get here?
9170
9171
9172 @node Article Treatment
9173 @section Article Treatment
9174
9175 Reading through this huge manual, you may have quite forgotten that the
9176 object of newsreaders is to actually, like, read what people have
9177 written.  Reading articles.  Unfortunately, people are quite bad at
9178 writing, so there are tons of functions and variables to make reading
9179 these articles easier.
9180
9181 @menu
9182 * Article Highlighting::        You want to make the article look like fruit salad.
9183 * Article Fontisizing::         Making emphasized text look nice.
9184 * Article Hiding::              You also want to make certain info go away.
9185 * Article Washing::             Lots of way-neat functions to make life better.
9186 * Article Header::              Doing various header transformations.
9187 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
9188 * Article Button Levels::       Controlling appearance of buttons.
9189 * Article Date::                Grumble, UT!
9190 * Article Display::             Display various stuff---X-Face, Picons, Smileys
9191 * Article Signature::           What is a signature?
9192 * Article Miscellanea::         Various other stuff.
9193 @end menu
9194
9195
9196 @node Article Highlighting
9197 @subsection Article Highlighting
9198 @cindex highlighting
9199
9200 Not only do you want your article buffer to look like fruit salad, but
9201 you want it to look like technicolor fruit salad.
9202
9203 @table @kbd
9204
9205 @item W H a
9206 @kindex W H a (Summary)
9207 @findex gnus-article-highlight
9208 @findex gnus-article-maybe-highlight
9209 Do much highlighting of the current article
9210 (@code{gnus-article-highlight}).  This function highlights header, cited
9211 text, the signature, and adds buttons to the body and the head.
9212
9213 @item W H h
9214 @kindex W H h (Summary)
9215 @findex gnus-article-highlight-headers
9216 @vindex gnus-header-face-alist
9217 Highlight the headers (@code{gnus-article-highlight-headers}).  The
9218 highlighting will be done according to the @code{gnus-header-face-alist}
9219 variable, which is a list where each element has the form
9220 @code{(@var{regexp} @var{name} @var{content})}.
9221 @var{regexp} is a regular expression for matching the
9222 header, @var{name} is the face used for highlighting the header name
9223 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
9224 the header value.  The first match made will be used.  Note that
9225 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
9226
9227 @item W H c
9228 @kindex W H c (Summary)
9229 @findex gnus-article-highlight-citation
9230 Highlight cited text (@code{gnus-article-highlight-citation}).
9231
9232 Some variables to customize the citation highlights:
9233
9234 @table @code
9235 @vindex gnus-cite-parse-max-size
9236
9237 @item gnus-cite-parse-max-size
9238 If the article size in bytes is bigger than this variable (which is
9239 25000 by default), no citation highlighting will be performed.
9240
9241 @item gnus-cite-max-prefix
9242 @vindex gnus-cite-max-prefix
9243 Maximum possible length for a citation prefix (default 20).
9244
9245 @item gnus-cite-face-list
9246 @vindex gnus-cite-face-list
9247 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
9248 When there are citations from multiple articles in the same message,
9249 Gnus will try to give each citation from each article its own face.
9250 This should make it easier to see who wrote what.
9251
9252 @item gnus-supercite-regexp
9253 @vindex gnus-supercite-regexp
9254 Regexp matching normal Supercite attribution lines.
9255
9256 @item gnus-supercite-secondary-regexp
9257 @vindex gnus-supercite-secondary-regexp
9258 Regexp matching mangled Supercite attribution lines.
9259
9260 @item gnus-cite-minimum-match-count
9261 @vindex gnus-cite-minimum-match-count
9262 Minimum number of identical prefixes we have to see before we believe
9263 that it's a citation.
9264
9265 @item gnus-cite-attribution-prefix
9266 @vindex gnus-cite-attribution-prefix
9267 Regexp matching the beginning of an attribution line.
9268
9269 @item gnus-cite-attribution-suffix
9270 @vindex gnus-cite-attribution-suffix
9271 Regexp matching the end of an attribution line.
9272
9273 @item gnus-cite-attribution-face
9274 @vindex gnus-cite-attribution-face
9275 Face used for attribution lines.  It is merged with the face for the
9276 cited text belonging to the attribution.
9277
9278 @item gnus-cite-ignore-quoted-from
9279 @vindex gnus-cite-ignore-quoted-from
9280 If non-@code{nil}, no citation highlighting will be performed on lines
9281 beginning with @samp{>From }.  Those lines may have been quoted by MTAs
9282 in order not to mix up with the envelope From line.  The default value
9283 is @code{t}.
9284
9285 @end table
9286
9287
9288 @item W H s
9289 @kindex W H s (Summary)
9290 @vindex gnus-signature-separator
9291 @vindex gnus-signature-face
9292 @findex gnus-article-highlight-signature
9293 Highlight the signature (@code{gnus-article-highlight-signature}).
9294 Everything after @code{gnus-signature-separator} (@pxref{Article
9295 Signature}) in an article will be considered a signature and will be
9296 highlighted with @code{gnus-signature-face}, which is @code{italic} by
9297 default.
9298
9299 @end table
9300
9301 @xref{Customizing Articles}, for how to highlight articles automatically.
9302
9303
9304 @node Article Fontisizing
9305 @subsection Article Fontisizing
9306 @cindex emphasis
9307 @cindex article emphasis
9308
9309 @findex gnus-article-emphasize
9310 @kindex W e (Summary)
9311 People commonly add emphasis to words in news articles by writing things
9312 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
9313 this look nicer by running the article through the @kbd{W e}
9314 (@code{gnus-article-emphasize}) command.
9315
9316 @vindex gnus-emphasis-alist
9317 How the emphasis is computed is controlled by the
9318 @code{gnus-emphasis-alist} variable.  This is an alist where the first
9319 element is a regular expression to be matched.  The second is a number
9320 that says what regular expression grouping is used to find the entire
9321 emphasized word.  The third is a number that says what regexp grouping
9322 should be displayed and highlighted.  (The text between these two
9323 groupings will be hidden.)  The fourth is the face used for
9324 highlighting.
9325
9326 @lisp
9327 (setq gnus-emphasis-alist
9328       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
9329         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
9330 @end lisp
9331
9332 @cindex slash
9333 @cindex asterisk
9334 @cindex underline
9335 @cindex /
9336 @cindex *
9337
9338 @vindex gnus-emphasis-underline
9339 @vindex gnus-emphasis-bold
9340 @vindex gnus-emphasis-italic
9341 @vindex gnus-emphasis-underline-bold
9342 @vindex gnus-emphasis-underline-italic
9343 @vindex gnus-emphasis-bold-italic
9344 @vindex gnus-emphasis-underline-bold-italic
9345 By default, there are seven rules, and they use the following faces:
9346 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
9347 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
9348 @code{gnus-emphasis-underline-italic},
9349 @code{gnus-emphasis-underline-bold}, and
9350 @code{gnus-emphasis-underline-bold-italic}.
9351
9352 If you want to change these faces, you can either use @kbd{M-x
9353 customize}, or you can use @code{copy-face}.  For instance, if you want
9354 to make @code{gnus-emphasis-italic} use a red face instead, you could
9355 say something like:
9356
9357 @lisp
9358 (copy-face 'red 'gnus-emphasis-italic)
9359 @end lisp
9360
9361 @vindex gnus-group-highlight-words-alist
9362
9363 If you want to highlight arbitrary words, you can use the
9364 @code{gnus-group-highlight-words-alist} variable, which uses the same
9365 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
9366 parameter (@pxref{Group Parameters}) can also be used.
9367
9368 @xref{Customizing Articles}, for how to fontize articles automatically.
9369
9370
9371 @node Article Hiding
9372 @subsection Article Hiding
9373 @cindex article hiding
9374
9375 Or rather, hiding certain things in each article.  There usually is much
9376 too much cruft in most articles.
9377
9378 @table @kbd
9379
9380 @item W W a
9381 @kindex W W a (Summary)
9382 @findex gnus-article-hide
9383 Do quite a lot of hiding on the article buffer
9384 (@kbd{gnus-article-hide}).  In particular, this function will hide
9385 headers, @acronym{PGP}, cited text and the signature.
9386
9387 @item W W h
9388 @kindex W W h (Summary)
9389 @findex gnus-article-hide-headers
9390 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
9391 Headers}.
9392
9393 @item W W b
9394 @kindex W W b (Summary)
9395 @findex gnus-article-hide-boring-headers
9396 Hide headers that aren't particularly interesting
9397 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
9398
9399 @item W W s
9400 @kindex W W s (Summary)
9401 @findex gnus-article-hide-signature
9402 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
9403 Signature}.
9404
9405 @item W W l
9406 @kindex W W l (Summary)
9407 @findex gnus-article-hide-list-identifiers
9408 @vindex gnus-list-identifiers
9409 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
9410 are strings some mailing list servers add to the beginning of all
9411 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
9412 @samp{Re: } is skipped before stripping.  @code{gnus-list-identifiers}
9413 may not contain @code{\\(..\\)}.
9414
9415 @table @code
9416
9417 @item gnus-list-identifiers
9418 @vindex gnus-list-identifiers
9419 A regular expression that matches list identifiers to be removed from
9420 subject.  This can also be a list of regular expressions.
9421
9422 @end table
9423
9424 @item W W P
9425 @kindex W W P (Summary)
9426 @findex gnus-article-hide-pem
9427 Hide @acronym{PEM} (privacy enhanced messages) cruft
9428 (@code{gnus-article-hide-pem}).
9429
9430 @item W W B
9431 @kindex W W B (Summary)
9432 @findex gnus-article-strip-banner
9433 @vindex gnus-article-banner-alist
9434 @vindex gnus-article-address-banner-alist
9435 @cindex banner
9436 @cindex OneList
9437 @cindex stripping advertisements
9438 @cindex advertisements
9439 Strip the banner specified by the @code{banner} group parameter
9440 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
9441 annoying banners and/or signatures that some mailing lists and moderated
9442 groups adds to all the messages.  The way to use this function is to add
9443 the @code{banner} group parameter (@pxref{Group Parameters}) to the
9444 group you want banners stripped from.  The parameter either be a string,
9445 which will be interpreted as a regular expression matching text to be
9446 removed, or the symbol @code{signature}, meaning that the (last)
9447 signature should be removed, or other symbol, meaning that the
9448 corresponding regular expression in @code{gnus-article-banner-alist} is
9449 used.
9450
9451 Regardless of a group, you can hide things like advertisements only when
9452 the sender of an article has a certain mail address specified in
9453 @code{gnus-article-address-banner-alist}.
9454
9455 @table @code
9456
9457 @item gnus-article-address-banner-alist
9458 @vindex gnus-article-address-banner-alist
9459 Alist of mail addresses and banners.  Each element has the form
9460 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
9461 matching a mail address in the From header, @var{banner} is one of a
9462 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
9463 a regexp and @code{nil}.  If @var{address} matches author's mail
9464 address, it will remove things like advertisements.  For example, if a
9465 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
9466 banner something like @samp{Do You Yoo-hoo!?} in all articles he
9467 sends, you can use the following element to remove them:
9468
9469 @lisp
9470 ("@@yoo-hoo\\.co\\.jp\\'" .
9471  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
9472 @end lisp
9473
9474 @end table
9475
9476 @item W W c
9477 @kindex W W c (Summary)
9478 @findex gnus-article-hide-citation
9479 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
9480 customizing the hiding:
9481
9482 @table @code
9483
9484 @item gnus-cited-opened-text-button-line-format
9485 @itemx gnus-cited-closed-text-button-line-format
9486 @vindex gnus-cited-closed-text-button-line-format
9487 @vindex gnus-cited-opened-text-button-line-format
9488 Gnus adds buttons to show where the cited text has been hidden, and to
9489 allow toggle hiding the text.  The format of the variable is specified
9490 by these format-like variable (@pxref{Formatting Variables}).  These
9491 specs are valid:
9492
9493 @table @samp
9494 @item b
9495 Starting point of the hidden text.
9496 @item e
9497 Ending point of the hidden text.
9498 @item l
9499 Number of characters in the hidden region.
9500 @item n
9501 Number of lines of hidden text.
9502 @end table
9503
9504 @item gnus-cited-lines-visible
9505 @vindex gnus-cited-lines-visible
9506 The number of lines at the beginning of the cited text to leave
9507 shown.  This can also be a cons cell with the number of lines at the top
9508 and bottom of the text, respectively, to remain visible.
9509
9510 @end table
9511
9512 @item W W C-c
9513 @kindex W W C-c (Summary)
9514 @findex gnus-article-hide-citation-maybe
9515
9516 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
9517 following two variables:
9518
9519 @table @code
9520 @item gnus-cite-hide-percentage
9521 @vindex gnus-cite-hide-percentage
9522 If the cited text is of a bigger percentage than this variable (default
9523 50), hide the cited text.
9524
9525 @item gnus-cite-hide-absolute
9526 @vindex gnus-cite-hide-absolute
9527 The cited text must have at least this length (default 10) before it
9528 is hidden.
9529 @end table
9530
9531 @item W W C
9532 @kindex W W C (Summary)
9533 @findex gnus-article-hide-citation-in-followups
9534 Hide cited text in articles that aren't roots
9535 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
9536 useful as an interactive command, but might be a handy function to stick
9537 have happen automatically (@pxref{Customizing Articles}).
9538
9539 @end table
9540
9541 All these ``hiding'' commands are toggles, but if you give a negative
9542 prefix to these commands, they will show what they have previously
9543 hidden.  If you give a positive prefix, they will always hide.
9544
9545 Also @pxref{Article Highlighting} for further variables for
9546 citation customization.
9547
9548 @xref{Customizing Articles}, for how to hide article elements
9549 automatically.
9550
9551
9552 @node Article Washing
9553 @subsection Article Washing
9554 @cindex washing
9555 @cindex article washing
9556
9557 We call this ``article washing'' for a really good reason.  Namely, the
9558 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
9559
9560 @dfn{Washing} is defined by us as ``changing something from something to
9561 something else'', but normally results in something looking better.
9562 Cleaner, perhaps.
9563
9564 @xref{Customizing Articles}, if you want to change how Gnus displays
9565 articles by default.
9566
9567 @table @kbd
9568
9569 @item C-u g
9570 This is not really washing, it's sort of the opposite of washing.  If
9571 you type this, you see the article exactly as it exists on disk or on
9572 the server.
9573
9574 @item g
9575 Force redisplaying of the current article
9576 (@code{gnus-summary-show-article}).  This is also not really washing.
9577 If you type this, you see the article without any previously applied
9578 interactive Washing functions but with all default treatments
9579 (@pxref{Customizing Articles}).
9580
9581 @item W l
9582 @kindex W l (Summary)
9583 @findex gnus-summary-stop-page-breaking
9584 Remove page breaks from the current article
9585 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
9586 delimiters.
9587
9588 @item W r
9589 @kindex W r (Summary)
9590 @findex gnus-summary-caesar-message
9591 @c @icon{gnus-summary-caesar-message}
9592 Do a Caesar rotate (rot13) on the article buffer
9593 (@code{gnus-summary-caesar-message}).
9594 Unreadable articles that tell you to read them with Caesar rotate or rot13.
9595 (Typically offensive jokes and such.)
9596
9597 It's commonly called ``rot13'' because each letter is rotated 13
9598 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
9599 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
9600 is rumored to have employed this form of, uh, somewhat weak encryption.
9601
9602 @item W m
9603 @kindex W m (Summary)
9604 @findex gnus-summary-morse-message
9605 Morse decode the article buffer (@code{gnus-summary-morse-message}).
9606
9607 @item W i
9608 @kindex W i (Summary)
9609 @findex gnus-summary-idna-message
9610 Decode IDNA encoded domain names in the current articles.  IDNA
9611 encoded domain names looks like @samp{xn--bar}.  If a string remain
9612 unencoded after running invoking this, it is likely an invalid IDNA
9613 string (@samp{xn--bar} is invalid).  You must have GNU Libidn
9614 (@url{http://www.gnu.org/software/libidn/}) installed for this command
9615 to work.
9616
9617 @item W t
9618 @item t
9619 @kindex W t (Summary)
9620 @kindex t (Summary)
9621 @findex gnus-summary-toggle-header
9622 Toggle whether to display all headers in the article buffer
9623 (@code{gnus-summary-toggle-header}).
9624
9625 @item W v
9626 @kindex W v (Summary)
9627 @findex gnus-summary-verbose-headers
9628 Toggle whether to display all headers in the article buffer permanently
9629 (@code{gnus-summary-verbose-headers}).
9630
9631 @item W o
9632 @kindex W o (Summary)
9633 @findex gnus-article-treat-overstrike
9634 Treat overstrike (@code{gnus-article-treat-overstrike}).
9635
9636 @item W d
9637 @kindex W d (Summary)
9638 @findex gnus-article-treat-dumbquotes
9639 @vindex gnus-article-dumbquotes-map
9640 @cindex Smartquotes
9641 @cindex M****s*** sm*rtq**t*s
9642 @cindex Latin 1
9643 Treat M****s*** sm*rtq**t*s according to
9644 @code{gnus-article-dumbquotes-map}
9645 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
9646 whether a character is a sm*rtq**t* or not, so it should only be used
9647 interactively.
9648
9649 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
9650 an attempt to provide more quoting characters.  If you see something
9651 like @code{\222} or @code{\264} where you're expecting some kind of
9652 apostrophe or quotation mark, then try this wash.
9653
9654 @item W Y f
9655 @kindex W Y f (Summary)
9656 @findex gnus-article-outlook-deuglify-article
9657 @cindex Outlook Express
9658 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
9659 unwrap lines, repair attribution and rearrange citation.
9660 (@code{gnus-article-outlook-deuglify-article}).
9661
9662 @item W Y u
9663 @kindex W Y u (Summary)
9664 @findex gnus-article-outlook-unwrap-lines
9665 @vindex gnus-outlook-deuglify-unwrap-min
9666 @vindex gnus-outlook-deuglify-unwrap-max
9667 Unwrap lines that appear to be wrapped citation lines.  You can control
9668 what lines will be unwrapped by frobbing
9669 @code{gnus-outlook-deuglify-unwrap-min} and
9670 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
9671 maximum length of an unwrapped citation line.
9672 (@code{gnus-article-outlook-unwrap-lines}).
9673
9674 @item W Y a
9675 @kindex W Y a (Summary)
9676 @findex gnus-article-outlook-repair-attribution
9677 Repair a broken attribution line.@*
9678 (@code{gnus-article-outlook-repair-attribution}).
9679
9680 @item W Y c
9681 @kindex W Y c (Summary)
9682 @findex gnus-article-outlook-rearrange-citation
9683 Repair broken citations by rearranging the text.
9684 (@code{gnus-article-outlook-rearrange-citation}).
9685
9686 @item W w
9687 @kindex W w (Summary)
9688 @findex gnus-article-fill-cited-article
9689 Do word wrap (@code{gnus-article-fill-cited-article}).
9690
9691 You can give the command a numerical prefix to specify the width to use
9692 when filling.
9693
9694 @item W Q
9695 @kindex W Q (Summary)
9696 @findex gnus-article-fill-long-lines
9697 Fill long lines (@code{gnus-article-fill-long-lines}).
9698
9699 @item W C
9700 @kindex W C (Summary)
9701 @findex gnus-article-capitalize-sentences
9702 Capitalize the first word in each sentence
9703 (@code{gnus-article-capitalize-sentences}).
9704
9705 @item W c
9706 @kindex W c (Summary)
9707 @findex gnus-article-remove-cr
9708 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
9709 (this takes care of DOS line endings), and then translate any remaining
9710 CRs into LF (this takes care of Mac line endings)
9711 (@code{gnus-article-remove-cr}).
9712
9713 @item W q
9714 @kindex W q (Summary)
9715 @findex gnus-article-de-quoted-unreadable
9716 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
9717 Quoted-Printable is one common @acronym{MIME} encoding employed when
9718 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
9719 makes strings like @samp{d@'ej@`a vu} look like @samp{d=E9j=E0 vu},
9720 which doesn't look very readable to me.  Note that this is usually
9721 done automatically by Gnus if the message in question has a
9722 @code{Content-Transfer-Encoding} header that says that this encoding
9723 has been done.  If a prefix is given, a charset will be asked for.
9724
9725 @item W 6
9726 @kindex W 6 (Summary)
9727 @findex gnus-article-de-base64-unreadable
9728 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
9729 one common @acronym{MIME} encoding employed when sending
9730 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
9731 usually done automatically by Gnus if the message in question has a
9732 @code{Content-Transfer-Encoding} header that says that this encoding
9733 has been done.  If a prefix is given, a charset will be asked for.
9734
9735 @item W Z
9736 @kindex W Z (Summary)
9737 @findex gnus-article-decode-HZ
9738 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
9739 common encoding employed when sending Chinese articles.  It typically
9740 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
9741
9742 @item W A
9743 @kindex W A (Summary)
9744 @findex gnus-article-treat-ansi-sequences
9745 @cindex @acronym{ANSI} control sequences
9746 Translate @acronym{ANSI} SGR control sequences into overlays or
9747 extents (@code{gnus-article-treat-ansi-sequences}).  @acronym{ANSI}
9748 sequences are used in some Chinese hierarchies for highlighting.
9749
9750 @item W u
9751 @kindex W u (Summary)
9752 @findex gnus-article-unsplit-urls
9753 Remove newlines from within URLs.  Some mailers insert newlines into
9754 outgoing email messages to keep lines short.  This reformatting can
9755 split long URLs onto multiple lines.  Repair those URLs by removing
9756 the newlines (@code{gnus-article-unsplit-urls}).
9757
9758 @item W h
9759 @kindex W h (Summary)
9760 @findex gnus-article-wash-html
9761 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
9762 usually done automatically by Gnus if the message in question has a
9763 @code{Content-Type} header that says that the message is @acronym{HTML}.
9764
9765 If a prefix is given, a charset will be asked for.  If it is a number,
9766 the charset defined in @code{gnus-summary-show-article-charset-alist}
9767 (@pxref{Paging the Article}) will be used.
9768
9769 @vindex gnus-article-wash-function
9770 The default is to use the function specified by
9771 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
9772 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
9773 @acronym{HTML}, but this is controlled by the
9774 @code{gnus-article-wash-function} variable.  Pre-defined functions you
9775 can use include:
9776
9777 @table @code
9778 @item w3
9779 Use Emacs/W3.
9780
9781 @item w3m
9782 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
9783
9784 @item w3m-standalone
9785 Use @uref{http://w3m.sourceforge.net/, w3m}.
9786
9787 @item links
9788 Use @uref{http://links.sf.net/, Links}.
9789
9790 @item lynx
9791 Use @uref{http://lynx.isc.org/, Lynx}.
9792
9793 @item html2text
9794 Use html2text---a simple @acronym{HTML} converter included with Gnus.
9795
9796 @end table
9797
9798 @item W b
9799 @kindex W b (Summary)
9800 @findex gnus-article-add-buttons
9801 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
9802 @xref{Article Buttons}.
9803
9804 @item W B
9805 @kindex W B (Summary)
9806 @findex gnus-article-add-buttons-to-head
9807 Add clickable buttons to the article headers
9808 (@code{gnus-article-add-buttons-to-head}).
9809
9810 @item W p
9811 @kindex W p (Summary)
9812 @findex gnus-article-verify-x-pgp-sig
9813 Verify a signed control message
9814 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
9815 @code{newgroup} and @code{checkgroups} are usually signed by the
9816 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
9817 the maintainer to your keyring to verify the
9818 message.@footnote{@acronym{PGP} keys for many hierarchies are
9819 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
9820
9821 @item W s
9822 @kindex W s (Summary)
9823 @findex gnus-summary-force-verify-and-decrypt
9824 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
9825 @acronym{S/MIME}) message
9826 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
9827
9828 @item W a
9829 @kindex W a (Summary)
9830 @findex gnus-article-strip-headers-in-body
9831 Strip headers like the @code{X-No-Archive} header from the beginning of
9832 article bodies (@code{gnus-article-strip-headers-in-body}).
9833
9834 @item W E l
9835 @kindex W E l (Summary)
9836 @findex gnus-article-strip-leading-blank-lines
9837 Remove all blank lines from the beginning of the article
9838 (@code{gnus-article-strip-leading-blank-lines}).
9839
9840 @item W E m
9841 @kindex W E m (Summary)
9842 @findex gnus-article-strip-multiple-blank-lines
9843 Replace all blank lines with empty lines and then all multiple empty
9844 lines with a single empty line.
9845 (@code{gnus-article-strip-multiple-blank-lines}).
9846
9847 @item W E t
9848 @kindex W E t (Summary)
9849 @findex gnus-article-remove-trailing-blank-lines
9850 Remove all blank lines at the end of the article
9851 (@code{gnus-article-remove-trailing-blank-lines}).
9852
9853 @item W E a
9854 @kindex W E a (Summary)
9855 @findex gnus-article-strip-blank-lines
9856 Do all the three commands above
9857 (@code{gnus-article-strip-blank-lines}).
9858
9859 @item W E A
9860 @kindex W E A (Summary)
9861 @findex gnus-article-strip-all-blank-lines
9862 Remove all blank lines
9863 (@code{gnus-article-strip-all-blank-lines}).
9864
9865 @item W E s
9866 @kindex W E s (Summary)
9867 @findex gnus-article-strip-leading-space
9868 Remove all white space from the beginning of all lines of the article
9869 body (@code{gnus-article-strip-leading-space}).
9870
9871 @item W E e
9872 @kindex W E e (Summary)
9873 @findex gnus-article-strip-trailing-space
9874 Remove all white space from the end of all lines of the article
9875 body (@code{gnus-article-strip-trailing-space}).
9876
9877 @end table
9878
9879 @xref{Customizing Articles}, for how to wash articles automatically.
9880
9881
9882 @node Article Header
9883 @subsection Article Header
9884
9885 These commands perform various transformations of article header.
9886
9887 @table @kbd
9888
9889 @item W G u
9890 @kindex W G u (Summary)
9891 @findex gnus-article-treat-unfold-headers
9892 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
9893
9894 @item W G n
9895 @kindex W G n (Summary)
9896 @findex gnus-article-treat-fold-newsgroups
9897 Fold the @code{Newsgroups} and @code{Followup-To} headers
9898 (@code{gnus-article-treat-fold-newsgroups}).
9899
9900 @item W G f
9901 @kindex W G f (Summary)
9902 @findex gnus-article-treat-fold-headers
9903 Fold all the message headers
9904 (@code{gnus-article-treat-fold-headers}).
9905
9906 @item W E w
9907 @kindex W E w (Summary)
9908 @findex gnus-article-remove-leading-whitespace
9909 Remove excessive whitespace from all headers
9910 (@code{gnus-article-remove-leading-whitespace}).
9911
9912 @end table
9913
9914
9915 @node Article Buttons
9916 @subsection Article Buttons
9917 @cindex buttons
9918
9919 People often include references to other stuff in articles, and it would
9920 be nice if Gnus could just fetch whatever it is that people talk about
9921 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
9922 button on these references.
9923
9924 @vindex gnus-button-man-handler
9925 Gnus adds @dfn{buttons} to certain standard references by default:
9926 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
9927 Emacs or Gnus related references.  This is controlled by two variables,
9928 one that handles article bodies and one that handles article heads:
9929
9930 @table @code
9931
9932 @item gnus-button-alist
9933 @vindex gnus-button-alist
9934 This is an alist where each entry has this form:
9935
9936 @lisp
9937 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
9938 @end lisp
9939
9940 @table @var
9941
9942 @item regexp
9943 All text that match this regular expression (case insensitive) will be
9944 considered an external reference.  Here's a typical regexp that matches
9945 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
9946 variable containing a regexp, useful variables to use include
9947 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
9948
9949 @item button-par
9950 Gnus has to know which parts of the matches is to be highlighted.  This
9951 is a number that says what sub-expression of the regexp is to be
9952 highlighted.  If you want it all highlighted, you use 0 here.
9953
9954 @item use-p
9955 This form will be @code{eval}ed, and if the result is non-@code{nil},
9956 this is considered a match.  This is useful if you want extra sifting to
9957 avoid false matches.  Often variables named
9958 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
9959 Levels}, but any other form may be used too.
9960
9961 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
9962
9963 @item function
9964 This function will be called when you click on this button.
9965
9966 @item data-par
9967 As with @var{button-par}, this is a sub-expression number, but this one
9968 says which part of the match is to be sent as data to @var{function}.
9969
9970 @end table
9971
9972 So the full entry for buttonizing URLs is then
9973
9974 @lisp
9975 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
9976 @end lisp
9977
9978 @item gnus-header-button-alist
9979 @vindex gnus-header-button-alist
9980 This is just like the other alist, except that it is applied to the
9981 article head only, and that each entry has an additional element that is
9982 used to say what headers to apply the buttonize coding to:
9983
9984 @lisp
9985 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
9986 @end lisp
9987
9988 @var{header} is a regular expression.
9989 @end table
9990
9991 @subsubsection Related variables and functions
9992
9993 @table @code
9994 @item gnus-button-@var{*}-level
9995 @xref{Article Button Levels}.
9996
9997 @c Stuff related to gnus-button-browse-level
9998
9999 @item gnus-button-url-regexp
10000 @vindex gnus-button-url-regexp
10001 A regular expression that matches embedded URLs.  It is used in the
10002 default values of the variables above.
10003
10004 @c Stuff related to gnus-button-man-level
10005
10006 @item gnus-button-man-handler
10007 @vindex gnus-button-man-handler
10008 The function to use for displaying man pages.  It must take at least one
10009 argument with a string naming the man page.
10010
10011 @c Stuff related to gnus-button-message-level
10012
10013 @item gnus-button-mid-or-mail-regexp
10014 @vindex gnus-button-mid-or-mail-regexp
10015 Regular expression that matches a message ID or a mail address.
10016
10017 @item gnus-button-prefer-mid-or-mail
10018 @vindex gnus-button-prefer-mid-or-mail
10019 This variable determines what to do when the button on a string as
10020 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
10021 message ID or a mail address.  If it is one of the symbols @code{mid} or
10022 @code{mail}, Gnus will always assume that the string is a message ID or
10023 a mail address, respectively.  If this variable is set to the symbol
10024 @code{ask}, always query the user what to do.  If it is a function, this
10025 function will be called with the string as its only argument.  The
10026 function must return @code{mid}, @code{mail}, @code{invalid} or
10027 @code{ask}.  The default value is the function
10028 @code{gnus-button-mid-or-mail-heuristic}.
10029
10030 @item gnus-button-mid-or-mail-heuristic
10031 @findex gnus-button-mid-or-mail-heuristic
10032 Function that guesses whether its argument is a message ID or a mail
10033 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
10034 it's a mail address, @code{ask} if unsure and @code{invalid} if the
10035 string is invalid.
10036
10037 @item gnus-button-mid-or-mail-heuristic-alist
10038 @vindex gnus-button-mid-or-mail-heuristic-alist
10039 An alist of @code{(RATE . REGEXP)} pairs used by the function
10040 @code{gnus-button-mid-or-mail-heuristic}.
10041
10042 @c Stuff related to gnus-button-tex-level
10043
10044 @item gnus-button-ctan-handler
10045 @findex gnus-button-ctan-handler
10046 The function to use for displaying CTAN links.  It must take one
10047 argument, the string naming the URL.
10048
10049 @item gnus-ctan-url
10050 @vindex gnus-ctan-url
10051 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
10052 by @code{gnus-button-ctan-handler}.
10053
10054 @c Misc stuff
10055
10056 @item gnus-article-button-face
10057 @vindex gnus-article-button-face
10058 Face used on buttons.
10059
10060 @item gnus-article-mouse-face
10061 @vindex gnus-article-mouse-face
10062 Face used when the mouse cursor is over a button.
10063
10064 @end table
10065
10066 @xref{Customizing Articles}, for how to buttonize articles automatically.
10067
10068
10069 @node Article Button Levels
10070 @subsection Article button levels
10071 @cindex button levels
10072 The higher the value of the variables @code{gnus-button-@var{*}-level},
10073 the more buttons will appear.  If the level is zero, no corresponding
10074 buttons are displayed.  With the default value (which is 5) you should
10075 already see quite a lot of buttons.  With higher levels, you will see
10076 more buttons, but you may also get more false positives.  To avoid them,
10077 you can set the variables @code{gnus-button-@var{*}-level} local to
10078 specific groups (@pxref{Group Parameters}).  Here's an example for the
10079 variable @code{gnus-parameters}:
10080
10081 @lisp
10082 ;; @r{increase @code{gnus-button-*-level} in some groups:}
10083 (setq gnus-parameters
10084       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
10085         ("\\<unix\\>"               (gnus-button-man-level 10))
10086         ("\\<tex\\>"                (gnus-button-tex-level 10))))
10087 @end lisp
10088
10089 @table @code
10090
10091 @item gnus-button-browse-level
10092 @vindex gnus-button-browse-level
10093 Controls the display of references to message IDs, mail addresses and
10094 news URLs.  Related variables and functions include
10095 @code{gnus-button-url-regexp}, @code{browse-url}, and
10096 @code{browse-url-browser-function}.
10097
10098 @item gnus-button-emacs-level
10099 @vindex gnus-button-emacs-level
10100 Controls the display of Emacs or Gnus references.  Related functions are
10101 @code{gnus-button-handle-custom},
10102 @code{gnus-button-handle-describe-function},
10103 @code{gnus-button-handle-describe-variable},
10104 @code{gnus-button-handle-symbol},
10105 @code{gnus-button-handle-describe-key},
10106 @code{gnus-button-handle-apropos},
10107 @code{gnus-button-handle-apropos-command},
10108 @code{gnus-button-handle-apropos-variable},
10109 @code{gnus-button-handle-apropos-documentation}, and
10110 @code{gnus-button-handle-library}.
10111
10112 @item gnus-button-man-level
10113 @vindex gnus-button-man-level
10114 Controls the display of references to (Unix) man pages.
10115 See @code{gnus-button-man-handler}.
10116
10117 @item gnus-button-message-level
10118 @vindex gnus-button-message-level
10119 Controls the display of message IDs, mail addresses and news URLs.
10120 Related variables and functions include
10121 @code{gnus-button-mid-or-mail-regexp},
10122 @code{gnus-button-prefer-mid-or-mail},
10123 @code{gnus-button-mid-or-mail-heuristic}, and
10124 @code{gnus-button-mid-or-mail-heuristic-alist}.
10125
10126 @item gnus-button-tex-level
10127 @vindex gnus-button-tex-level
10128 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
10129 URLs.  See the variables @code{gnus-ctan-url},
10130 @code{gnus-button-ctan-handler},
10131 @code{gnus-button-ctan-directory-regexp}, and
10132 @code{gnus-button-handle-ctan-bogus-regexp}.
10133
10134 @end table
10135
10136
10137 @node Article Date
10138 @subsection Article Date
10139
10140 The date is most likely generated in some obscure timezone you've never
10141 heard of, so it's quite nice to be able to find out what the time was
10142 when the article was sent.
10143
10144 @table @kbd
10145
10146 @item W T u
10147 @kindex W T u (Summary)
10148 @findex gnus-article-date-ut
10149 Display the date in UT (aka. GMT, aka ZULU)
10150 (@code{gnus-article-date-ut}).
10151
10152 @item W T i
10153 @kindex W T i (Summary)
10154 @findex gnus-article-date-iso8601
10155 @cindex ISO 8601
10156 Display the date in international format, aka. ISO 8601
10157 (@code{gnus-article-date-iso8601}).
10158
10159 @item W T l
10160 @kindex W T l (Summary)
10161 @findex gnus-article-date-local
10162 Display the date in the local timezone (@code{gnus-article-date-local}).
10163
10164 @item W T p
10165 @kindex W T p (Summary)
10166 @findex gnus-article-date-english
10167 Display the date in a format that's easily pronounceable in English
10168 (@code{gnus-article-date-english}).
10169
10170 @item W T s
10171 @kindex W T s (Summary)
10172 @vindex gnus-article-time-format
10173 @findex gnus-article-date-user
10174 @findex format-time-string
10175 Display the date using a user-defined format
10176 (@code{gnus-article-date-user}).  The format is specified by the
10177 @code{gnus-article-time-format} variable, and is a string that's passed
10178 to @code{format-time-string}.  See the documentation of that variable
10179 for a list of possible format specs.
10180
10181 @item W T e
10182 @kindex W T e (Summary)
10183 @findex gnus-article-date-lapsed
10184 @findex gnus-start-date-timer
10185 @findex gnus-stop-date-timer
10186 Say how much time has elapsed between the article was posted and now
10187 (@code{gnus-article-date-lapsed}).  It looks something like:
10188
10189 @example
10190 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
10191 @end example
10192
10193 @vindex gnus-article-date-lapsed-new-header
10194 The value of @code{gnus-article-date-lapsed-new-header} determines
10195 whether this header will just be added below the old Date one, or will
10196 replace it.
10197
10198 An advantage of using Gnus to read mail is that it converts simple bugs
10199 into wonderful absurdities.
10200
10201 If you want to have this line updated continually, you can put
10202
10203 @lisp
10204 (gnus-start-date-timer)
10205 @end lisp
10206
10207 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
10208 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
10209 command.
10210
10211 @item W T o
10212 @kindex W T o (Summary)
10213 @findex gnus-article-date-original
10214 Display the original date (@code{gnus-article-date-original}).  This can
10215 be useful if you normally use some other conversion function and are
10216 worried that it might be doing something totally wrong.  Say, claiming
10217 that the article was posted in 1854.  Although something like that is
10218 @emph{totally} impossible.  Don't you trust me? *titter*
10219
10220 @end table
10221
10222 @xref{Customizing Articles}, for how to display the date in your
10223 preferred format automatically.
10224
10225
10226 @node Article Display
10227 @subsection Article Display
10228 @cindex picons
10229 @cindex x-face
10230 @cindex smileys
10231
10232 These commands add various frivolous display gimmicks to the article
10233 buffer in Emacs versions that support them.
10234
10235 @code{X-Face} headers are small black-and-white images supplied by the
10236 message headers (@pxref{X-Face}).
10237
10238 @code{Face} headers are small colored images supplied by the message
10239 headers (@pxref{Face}).
10240
10241 Smileys are those little @samp{:-)} symbols that people like to litter
10242 their messages with (@pxref{Smileys}).
10243
10244 Picons, on the other hand, reside on your own system, and Gnus will
10245 try to match the headers to what you have (@pxref{Picons}).
10246
10247 All these functions are toggles---if the elements already exist,
10248 they'll be removed.
10249
10250 @table @kbd
10251 @item W D x
10252 @kindex W D x (Summary)
10253 @findex gnus-article-display-x-face
10254 Display an @code{X-Face} in the @code{From} header.
10255 (@code{gnus-article-display-x-face}).
10256
10257 @item W D d
10258 @kindex W D d (Summary)
10259 @findex gnus-article-display-face
10260 Display a @code{Face} in the @code{From} header.
10261 (@code{gnus-article-display-face}).
10262
10263 @item W D s
10264 @kindex W D s (Summary)
10265 @findex gnus-treat-smiley
10266 Display smileys (@code{gnus-treat-smiley}).
10267
10268 @item W D f
10269 @kindex W D f (Summary)
10270 @findex gnus-treat-from-picon
10271 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
10272
10273 @item W D m
10274 @kindex W D m (Summary)
10275 @findex gnus-treat-mail-picon
10276 Piconify all mail headers (i. e., @code{Cc}, @code{To})
10277 (@code{gnus-treat-mail-picon}).
10278
10279 @item W D n
10280 @kindex W D n (Summary)
10281 @findex gnus-treat-newsgroups-picon
10282 Piconify all news headers (i. e., @code{Newsgroups} and
10283 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
10284
10285 @item W D D
10286 @kindex W D D (Summary)
10287 @findex gnus-article-remove-images
10288 Remove all images from the article buffer
10289 (@code{gnus-article-remove-images}).
10290
10291 @end table
10292
10293
10294
10295 @node Article Signature
10296 @subsection Article Signature
10297 @cindex signatures
10298 @cindex article signature
10299
10300 @vindex gnus-signature-separator
10301 Each article is divided into two parts---the head and the body.  The
10302 body can be divided into a signature part and a text part.  The variable
10303 that says what is to be considered a signature is
10304 @code{gnus-signature-separator}.  This is normally the standard
10305 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
10306 non-standard signature separators, so this variable can also be a list
10307 of regular expressions to be tested, one by one.  (Searches are done
10308 from the end of the body towards the beginning.)  One likely value is:
10309
10310 @lisp
10311 (setq gnus-signature-separator
10312       '("^-- $"         ; @r{The standard}
10313         "^-- *$"        ; @r{A common mangling}
10314         "^-------*$"    ; @r{Many people just use a looong}
10315                         ; @r{line of dashes.  Shame!}
10316         "^ *--------*$" ; @r{Double-shame!}
10317         "^________*$"   ; @r{Underscores are also popular}
10318         "^========*$")) ; @r{Pervert!}
10319 @end lisp
10320
10321 The more permissive you are, the more likely it is that you'll get false
10322 positives.
10323
10324 @vindex gnus-signature-limit
10325 @code{gnus-signature-limit} provides a limit to what is considered a
10326 signature when displaying articles.
10327
10328 @enumerate
10329 @item
10330 If it is an integer, no signature may be longer (in characters) than
10331 that integer.
10332 @item
10333 If it is a floating point number, no signature may be longer (in lines)
10334 than that number.
10335 @item
10336 If it is a function, the function will be called without any parameters,
10337 and if it returns @code{nil}, there is no signature in the buffer.
10338 @item
10339 If it is a string, it will be used as a regexp.  If it matches, the text
10340 in question is not a signature.
10341 @end enumerate
10342
10343 This variable can also be a list where the elements may be of the types
10344 listed above.  Here's an example:
10345
10346 @lisp
10347 (setq gnus-signature-limit
10348       '(200.0 "^---*Forwarded article"))
10349 @end lisp
10350
10351 This means that if there are more than 200 lines after the signature
10352 separator, or the text after the signature separator is matched by
10353 the regular expression @samp{^---*Forwarded article}, then it isn't a
10354 signature after all.
10355
10356
10357 @node Article Miscellanea
10358 @subsection Article Miscellanea
10359
10360 @table @kbd
10361 @item A t
10362 @kindex A t (Summary)
10363 @findex gnus-article-babel
10364 Translate the article from one language to another
10365 (@code{gnus-article-babel}).
10366
10367 @end table
10368
10369
10370 @node MIME Commands
10371 @section MIME Commands
10372 @cindex MIME decoding
10373 @cindex attachments
10374 @cindex viewing attachments
10375
10376 The following commands all understand the numerical prefix.  For
10377 instance, @kbd{3 K v} means ``view the third @acronym{MIME} part''.
10378
10379 @table @kbd
10380 @item b
10381 @itemx K v
10382 @kindex b (Summary)
10383 @kindex K v (Summary)
10384 View the @acronym{MIME} part.
10385
10386 @item K o
10387 @kindex K o (Summary)
10388 Save the @acronym{MIME} part.
10389
10390 @item K O
10391 @kindex K O (Summary)
10392 Prompt for a file name, then save the @acronym{MIME} part and strip it
10393 from the article.  The stripped @acronym{MIME} object will be referred
10394 via the message/external-body @acronym{MIME} type.
10395
10396 @item K r
10397 @kindex K r (Summary)
10398 Replace the @acronym{MIME} part with an external body.
10399
10400 @item K d
10401 @kindex K d (Summary)
10402 Delete the @acronym{MIME} part and add some information about the
10403 removed part.
10404
10405 @item K c
10406 @kindex K c (Summary)
10407 Copy the @acronym{MIME} part.
10408
10409 @item K e
10410 @kindex K e (Summary)
10411 View the @acronym{MIME} part externally.
10412
10413 @item K i
10414 @kindex K i (Summary)
10415 View the @acronym{MIME} part internally.
10416
10417 @item K |
10418 @kindex K | (Summary)
10419 Pipe the @acronym{MIME} part to an external command.
10420 @end table
10421
10422 The rest of these @acronym{MIME} commands do not use the numerical prefix in
10423 the same manner:
10424
10425 @table @kbd
10426 @item K H
10427 @kindex K H (Summary)
10428 @findex gnus-article-browse-html-article
10429 View @samp{text/html} parts of the current article with a WWW browser.
10430 The message header is added to the beginning of every html part unless
10431 the prefix argument is given.
10432
10433 Warning: Spammers use links to images in HTML articles to verify whether
10434 you have read the message.  As this command passes the @acronym{HTML}
10435 content to the browser without eliminating these ``web bugs'' you should
10436 only use it for mails from trusted senders.
10437
10438 If you always want to display @acronym{HTML} parts in the browser, set
10439 @code{mm-text-html-renderer} to @code{nil}.
10440
10441 @item K b
10442 @kindex K b (Summary)
10443 Make all the @acronym{MIME} parts have buttons in front of them.  This is
10444 mostly useful if you wish to save (or perform other actions) on inlined
10445 parts.
10446
10447 @item K m
10448 @kindex K m (Summary)
10449 @findex gnus-summary-repair-multipart
10450 Some multipart messages are transmitted with missing or faulty headers.
10451 This command will attempt to ``repair'' these messages so that they can
10452 be viewed in a more pleasant manner
10453 (@code{gnus-summary-repair-multipart}).
10454
10455 @item X m
10456 @kindex X m (Summary)
10457 @findex gnus-summary-save-parts
10458 Save all parts matching a @acronym{MIME} type to a directory
10459 (@code{gnus-summary-save-parts}).  Understands the process/prefix
10460 convention (@pxref{Process/Prefix}).
10461
10462 @item M-t
10463 @kindex M-t (Summary)
10464 @findex gnus-summary-toggle-display-buttonized
10465 Toggle the buttonized display of the article buffer
10466 (@code{gnus-summary-toggle-display-buttonized}).
10467
10468 @item W M w
10469 @kindex W M w (Summary)
10470 @findex gnus-article-decode-mime-words
10471 Decode RFC 2047-encoded words in the article headers
10472 (@code{gnus-article-decode-mime-words}).
10473
10474 @item W M c
10475 @kindex W M c (Summary)
10476 @findex gnus-article-decode-charset
10477 Decode encoded article bodies as well as charsets
10478 (@code{gnus-article-decode-charset}).
10479
10480 This command looks in the @code{Content-Type} header to determine the
10481 charset.  If there is no such header in the article, you can give it a
10482 prefix, which will prompt for the charset to decode as.  In regional
10483 groups where people post using some common encoding (but do not
10484 include @acronym{MIME} headers), you can set the @code{charset} group/topic
10485 parameter to the required charset (@pxref{Group Parameters}).
10486
10487 @item W M v
10488 @kindex W M v (Summary)
10489 @findex gnus-mime-view-all-parts
10490 View all the @acronym{MIME} parts in the current article
10491 (@code{gnus-mime-view-all-parts}).
10492
10493 @end table
10494
10495 Relevant variables:
10496
10497 @table @code
10498 @item gnus-ignored-mime-types
10499 @vindex gnus-ignored-mime-types
10500 This is a list of regexps.  @acronym{MIME} types that match a regexp from
10501 this list will be completely ignored by Gnus.  The default value is
10502 @code{nil}.
10503
10504 To have all Vcards be ignored, you'd say something like this:
10505
10506 @lisp
10507 (setq gnus-ignored-mime-types
10508       '("text/x-vcard"))
10509 @end lisp
10510
10511 @item gnus-article-loose-mime
10512 @vindex gnus-article-loose-mime
10513 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
10514 before interpreting the message as a @acronym{MIME} message.  This helps
10515 when reading messages from certain broken mail user agents.  The
10516 default is @code{t}.
10517
10518 @item gnus-article-emulate-mime
10519 @vindex gnus-article-emulate-mime
10520 @cindex uuencode
10521 @cindex yEnc
10522 There are other, non-@acronym{MIME} encoding methods used.  The most common
10523 is @samp{uuencode}, but yEncode is also getting to be popular.  If
10524 this variable is non-@code{nil}, Gnus will look in message bodies to
10525 see if it finds these encodings, and if so, it'll run them through the
10526 Gnus @acronym{MIME} machinery.  The default is @code{t}.  Only
10527 single-part yEnc encoded attachments can be decoded.  There's no support
10528 for encoding in Gnus.
10529
10530 @item gnus-unbuttonized-mime-types
10531 @vindex gnus-unbuttonized-mime-types
10532 This is a list of regexps.  @acronym{MIME} types that match a regexp from
10533 this list won't have @acronym{MIME} buttons inserted unless they aren't
10534 displayed or this variable is overridden by
10535 @code{gnus-buttonized-mime-types}.  The default value is
10536 @code{(".*/.*")}.  This variable is only used when
10537 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
10538
10539 @item gnus-buttonized-mime-types
10540 @vindex gnus-buttonized-mime-types
10541 This is a list of regexps.  @acronym{MIME} types that match a regexp from
10542 this list will have @acronym{MIME} buttons inserted unless they aren't
10543 displayed.  This variable overrides
10544 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
10545 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
10546 is @code{nil}.
10547
10548 To see e.g. security buttons but no other buttons, you could set this
10549 variable to @code{("multipart/signed")} and leave
10550 @code{gnus-unbuttonized-mime-types} at the default value.
10551
10552 You could also add @code{"multipart/alternative"} to this list to
10553 display radio buttons that allow you to choose one of two media types
10554 those mails include.  See also @code{mm-discouraged-alternatives}
10555 (@pxref{Display Customization, ,Display Customization, emacs-mime, The
10556 Emacs MIME Manual}).
10557
10558 @item gnus-inhibit-mime-unbuttonizing
10559 @vindex gnus-inhibit-mime-unbuttonizing
10560 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
10561 default value is @code{nil}.
10562
10563 @item gnus-article-mime-part-function
10564 @vindex gnus-article-mime-part-function
10565 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
10566 handle as the parameter.  The function is meant to be used to allow
10567 users to gather information from the article (e. g., add Vcard info to
10568 the bbdb database) or to do actions based on parts (e. g., automatically
10569 save all jpegs into some directory).
10570
10571 Here's an example function the does the latter:
10572
10573 @lisp
10574 (defun my-save-all-jpeg-parts (handle)
10575   (when (equal (car (mm-handle-type handle)) "image/jpeg")
10576     (with-temp-buffer
10577       (insert (mm-get-part handle))
10578       (write-region (point-min) (point-max)
10579                     (read-file-name "Save jpeg to: ")))))
10580 (setq gnus-article-mime-part-function
10581       'my-save-all-jpeg-parts)
10582 @end lisp
10583
10584 @vindex gnus-mime-multipart-functions
10585 @item gnus-mime-multipart-functions
10586 Alist of @acronym{MIME} multipart types and functions to handle them.
10587
10588 @vindex gnus-mime-display-multipart-alternative-as-mixed
10589 @item gnus-mime-display-multipart-alternative-as-mixed
10590 Display "multipart/alternative" parts as "multipart/mixed".
10591
10592 @vindex gnus-mime-display-multipart-related-as-mixed
10593 @item gnus-mime-display-multipart-related-as-mixed
10594 Display "multipart/related" parts as "multipart/mixed".
10595
10596 If displaying @samp{text/html} is discouraged, see
10597 @code{mm-discouraged-alternatives}, images or other material inside a
10598 "multipart/related" part might be overlooked when this variable is
10599 @code{nil}.  @ref{Display Customization, Display Customization, ,
10600 emacs-mime, Emacs-Mime Manual}.
10601
10602 @vindex gnus-mime-display-multipart-as-mixed
10603 @item gnus-mime-display-multipart-as-mixed
10604 Display "multipart" parts as "multipart/mixed".  If @code{t}, it
10605 overrides @code{nil} values of
10606 @code{gnus-mime-display-multipart-alternative-as-mixed} and
10607 @code{gnus-mime-display-multipart-related-as-mixed}.
10608
10609 @vindex mm-file-name-rewrite-functions
10610 @item mm-file-name-rewrite-functions
10611 List of functions used for rewriting file names of @acronym{MIME} parts.
10612 Each function takes a file name as input and returns a file name.
10613
10614 Ready-made functions include@*
10615 @code{mm-file-name-delete-whitespace},
10616 @code{mm-file-name-trim-whitespace},
10617 @code{mm-file-name-collapse-whitespace}, and
10618 @code{mm-file-name-replace-whitespace}.  The later uses the value of
10619 the variable @code{mm-file-name-replace-whitespace} to replace each
10620 whitespace character in a file name with that string; default value
10621 is @code{"_"} (a single underscore).
10622 @findex mm-file-name-delete-whitespace
10623 @findex mm-file-name-trim-whitespace
10624 @findex mm-file-name-collapse-whitespace
10625 @findex mm-file-name-replace-whitespace
10626 @vindex mm-file-name-replace-whitespace
10627
10628 The standard functions @code{capitalize}, @code{downcase},
10629 @code{upcase}, and @code{upcase-initials} may be useful, too.
10630
10631 Everybody knows that whitespace characters in file names are evil,
10632 except those who don't know.  If you receive lots of attachments from
10633 such unenlightened users, you can make live easier by adding
10634
10635 @lisp
10636 (setq mm-file-name-rewrite-functions
10637       '(mm-file-name-trim-whitespace
10638         mm-file-name-collapse-whitespace
10639         mm-file-name-replace-whitespace))
10640 @end lisp
10641
10642 @noindent
10643 to your @file{~/.gnus.el} file.
10644
10645 @end table
10646
10647
10648 @node Charsets
10649 @section Charsets
10650 @cindex charsets
10651
10652 People use different charsets, and we have @acronym{MIME} to let us know what
10653 charsets they use.  Or rather, we wish we had.  Many people use
10654 newsreaders and mailers that do not understand or use @acronym{MIME}, and
10655 just send out messages without saying what character sets they use.  To
10656 help a bit with this, some local news hierarchies have policies that say
10657 what character set is the default.  For instance, the @samp{fj}
10658 hierarchy uses @code{iso-2022-jp}.
10659
10660 @vindex gnus-group-charset-alist
10661 This knowledge is encoded in the @code{gnus-group-charset-alist}
10662 variable, which is an alist of regexps (use the first item to match full
10663 group names) and default charsets to be used when reading these groups.
10664
10665 @vindex gnus-newsgroup-ignored-charsets
10666 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
10667 aren't.  These blithely mark messages as being in @code{iso-8859-1}
10668 even if they really are in @code{koi-8}.  To help here, the
10669 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
10670 charsets that are listed here will be ignored.  The variable can be
10671 set on a group-by-group basis using the group parameters (@pxref{Group
10672 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
10673 which includes values some agents insist on having in there.
10674
10675 @vindex gnus-group-posting-charset-alist
10676 When posting, @code{gnus-group-posting-charset-alist} is used to
10677 determine which charsets should not be encoded using the @acronym{MIME}
10678 encodings.  For instance, some hierarchies discourage using
10679 quoted-printable header encoding.
10680
10681 This variable is an alist of regexps and permitted unencoded charsets
10682 for posting.  Each element of the alist has the form @code{(}@var{test
10683 header body-list}@code{)}, where:
10684
10685 @table @var
10686 @item test
10687 is either a regular expression matching the newsgroup header or a
10688 variable to query,
10689 @item header
10690 is the charset which may be left unencoded in the header (@code{nil}
10691 means encode all charsets),
10692 @item body-list
10693 is a list of charsets which may be encoded using 8bit content-transfer
10694 encoding in the body, or one of the special values @code{nil} (always
10695 encode using quoted-printable) or @code{t} (always use 8bit).
10696 @end table
10697
10698 @cindex Russian
10699 @cindex koi8-r
10700 @cindex koi8-u
10701 @cindex iso-8859-5
10702 @cindex coding system aliases
10703 @cindex preferred charset
10704
10705 @xref{Encoding Customization, , Encoding Customization, emacs-mime,
10706 The Emacs MIME Manual}, for additional variables that control which
10707 MIME charsets are used when sending messages.
10708
10709 Other charset tricks that may be useful, although not Gnus-specific:
10710
10711 If there are several @acronym{MIME} charsets that encode the same Emacs
10712 charset, you can choose what charset to use by saying the following:
10713
10714 @lisp
10715 (put-charset-property 'cyrillic-iso8859-5
10716                       'preferred-coding-system 'koi8-r)
10717 @end lisp
10718
10719 This means that Russian will be encoded using @code{koi8-r} instead of
10720 the default @code{iso-8859-5} @acronym{MIME} charset.
10721
10722 If you want to read messages in @code{koi8-u}, you can cheat and say
10723
10724 @lisp
10725 (define-coding-system-alias 'koi8-u 'koi8-r)
10726 @end lisp
10727
10728 This will almost do the right thing.
10729
10730 And finally, to read charsets like @code{windows-1251}, you can say
10731 something like
10732
10733 @lisp
10734 (codepage-setup 1251)
10735 (define-coding-system-alias 'windows-1251 'cp1251)
10736 @end lisp
10737
10738
10739 @node Article Commands
10740 @section Article Commands
10741
10742 @table @kbd
10743
10744 @item A P
10745 @cindex PostScript
10746 @cindex printing
10747 @kindex A P (Summary)
10748 @vindex gnus-ps-print-hook
10749 @findex gnus-summary-print-article
10750 Generate and print a PostScript image of the article buffer
10751 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
10752 be run just before printing the buffer.  An alternative way to print
10753 article is to use Muttprint (@pxref{Saving Articles}).
10754
10755 @end table
10756
10757
10758 @node Summary Sorting
10759 @section Summary Sorting
10760 @cindex summary sorting
10761
10762 You can have the summary buffer sorted in various ways, even though I
10763 can't really see why you'd want that.
10764
10765 @table @kbd
10766
10767 @item C-c C-s C-n
10768 @kindex C-c C-s C-n (Summary)
10769 @findex gnus-summary-sort-by-number
10770 Sort by article number (@code{gnus-summary-sort-by-number}).
10771
10772 @item C-c C-s C-a
10773 @kindex C-c C-s C-a (Summary)
10774 @findex gnus-summary-sort-by-author
10775 Sort by author (@code{gnus-summary-sort-by-author}).
10776
10777 @item C-c C-s C-t
10778 @kindex C-c C-s C-t (Summary)
10779 @findex gnus-summary-sort-by-recipient
10780 Sort by recipient (@code{gnus-summary-sort-by-recipient}).
10781
10782 @item C-c C-s C-s
10783 @kindex C-c C-s C-s (Summary)
10784 @findex gnus-summary-sort-by-subject
10785 Sort by subject (@code{gnus-summary-sort-by-subject}).
10786
10787 @item C-c C-s C-d
10788 @kindex C-c C-s C-d (Summary)
10789 @findex gnus-summary-sort-by-date
10790 Sort by date (@code{gnus-summary-sort-by-date}).
10791
10792 @item C-c C-s C-l
10793 @kindex C-c C-s C-l (Summary)
10794 @findex gnus-summary-sort-by-lines
10795 Sort by lines (@code{gnus-summary-sort-by-lines}).
10796
10797 @item C-c C-s C-c
10798 @kindex C-c C-s C-c (Summary)
10799 @findex gnus-summary-sort-by-chars
10800 Sort by article length (@code{gnus-summary-sort-by-chars}).
10801
10802 @item C-c C-s C-i
10803 @kindex C-c C-s C-i (Summary)
10804 @findex gnus-summary-sort-by-score
10805 Sort by score (@code{gnus-summary-sort-by-score}).
10806
10807 @item C-c C-s C-r
10808 @kindex C-c C-s C-r (Summary)
10809 @findex gnus-summary-sort-by-random
10810 Randomize (@code{gnus-summary-sort-by-random}).
10811
10812 @item C-c C-s C-o
10813 @kindex C-c C-s C-o (Summary)
10814 @findex gnus-summary-sort-by-original
10815 Sort using the default sorting method
10816 (@code{gnus-summary-sort-by-original}).
10817 @end table
10818
10819 These functions will work both when you use threading and when you don't
10820 use threading.  In the latter case, all summary lines will be sorted,
10821 line by line.  In the former case, sorting will be done on a
10822 root-by-root basis, which might not be what you were looking for.  To
10823 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
10824 Commands}).
10825
10826
10827 @node Finding the Parent
10828 @section Finding the Parent
10829 @cindex parent articles
10830 @cindex referring articles
10831
10832 @table @kbd
10833 @item ^
10834 @kindex ^ (Summary)
10835 @findex gnus-summary-refer-parent-article
10836 If you'd like to read the parent of the current article, and it is not
10837 displayed in the summary buffer, you might still be able to.  That is,
10838 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
10839 and the @code{References} in the current article are not mangled, you
10840 can just press @kbd{^} or @kbd{A r}
10841 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
10842 you'll get the parent.  If the parent is already displayed in the
10843 summary buffer, point will just move to this article.
10844
10845 If given a positive numerical prefix, fetch that many articles back into
10846 the ancestry.  If given a negative numerical prefix, fetch just that
10847 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
10848 grandparent and the grandgrandparent of the current article.  If you say
10849 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
10850 article.
10851
10852 @item A R (Summary)
10853 @findex gnus-summary-refer-references
10854 @kindex A R (Summary)
10855 Fetch all articles mentioned in the @code{References} header of the
10856 article (@code{gnus-summary-refer-references}).
10857
10858 @item A T (Summary)
10859 @findex gnus-summary-refer-thread
10860 @kindex A T (Summary)
10861 Display the full thread where the current article appears
10862 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
10863 headers in the current group to work, so it usually takes a while.  If
10864 you do it often, you may consider setting @code{gnus-fetch-old-headers}
10865 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
10866 visible effects normally, but it'll make this command work a whole lot
10867 faster.  Of course, it'll make group entry somewhat slow.
10868
10869 @vindex gnus-refer-thread-limit
10870 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
10871 articles before the first displayed in the current group) headers to
10872 fetch when doing this command.  The default is 200.  If @code{t}, all
10873 the available headers will be fetched.  This variable can be overridden
10874 by giving the @kbd{A T} command a numerical prefix.
10875
10876 @item M-^ (Summary)
10877 @findex gnus-summary-refer-article
10878 @kindex M-^ (Summary)
10879 @cindex Message-ID
10880 @cindex fetching by Message-ID
10881 You can also ask Gnus for an arbitrary article, no matter what group it
10882 belongs to.  @kbd{M-^} (@code{gnus-summary-refer-article}) will ask you
10883 for a @code{Message-ID}, which is one of those long, hard-to-read
10884 thingies that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.
10885 You have to get it all exactly right.  No fuzzy searches, I'm afraid.
10886
10887 Gnus looks for the @code{Message-ID} in the headers that have already
10888 been fetched, but also tries all the select methods specified by
10889 @code{gnus-refer-article-method} if it is not found.
10890 @end table
10891
10892 @vindex gnus-refer-article-method
10893 If the group you are reading is located on a back end that does not
10894 support fetching by @code{Message-ID} very well (like @code{nnspool}),
10895 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
10896 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
10897 updating the spool you are reading from, but that's not really
10898 necessary.
10899
10900 It can also be a list of select methods, as well as the special symbol
10901 @code{current}, which means to use the current select method.  If it
10902 is a list, Gnus will try all the methods in the list until it finds a
10903 match.
10904
10905 Here's an example setting that will first try the current method, and
10906 then ask Google if that fails:
10907
10908 @lisp
10909 (setq gnus-refer-article-method
10910       '(current
10911         (nnweb "google" (nnweb-type google))))
10912 @end lisp
10913
10914 Most of the mail back ends support fetching by @code{Message-ID}, but
10915 do not do a particularly excellent job at it.  That is, @code{nnmbox},
10916 @code{nnbabyl}, @code{nnmaildir}, @code{nnml}, are able to locate
10917 articles from any groups, while @code{nnfolder}, and @code{nnimap} are
10918 only able to locate articles that have been posted to the current
10919 group.  (Anything else would be too time consuming.)  @code{nnmh} does
10920 not support this at all.
10921
10922
10923 @node Alternative Approaches
10924 @section Alternative Approaches
10925
10926 Different people like to read news using different methods.  This being
10927 Gnus, we offer a small selection of minor modes for the summary buffers.
10928
10929 @menu
10930 * Pick and Read::               First mark articles and then read them.
10931 * Binary Groups::               Auto-decode all articles.
10932 @end menu
10933
10934
10935 @node Pick and Read
10936 @subsection Pick and Read
10937 @cindex pick and read
10938
10939 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
10940 a two-phased reading interface.  The user first marks in a summary
10941 buffer the articles she wants to read.  Then she starts reading the
10942 articles with just an article buffer displayed.
10943
10944 @findex gnus-pick-mode
10945 @kindex M-x gnus-pick-mode
10946 Gnus provides a summary buffer minor mode that allows
10947 this---@code{gnus-pick-mode}.  This basically means that a few process
10948 mark commands become one-keystroke commands to allow easy marking, and
10949 it provides one additional command for switching to the summary buffer.
10950
10951 Here are the available keystrokes when using pick mode:
10952
10953 @table @kbd
10954 @item .
10955 @kindex . (Pick)
10956 @findex gnus-pick-article-or-thread
10957 Pick the article or thread on the current line
10958 (@code{gnus-pick-article-or-thread}).  If the variable
10959 @code{gnus-thread-hide-subtree} is true, then this key selects the
10960 entire thread when used at the first article of the thread.  Otherwise,
10961 it selects just the article.  If given a numerical prefix, go to that
10962 thread or article and pick it.  (The line number is normally displayed
10963 at the beginning of the summary pick lines.)
10964
10965 @item SPACE
10966 @kindex SPACE (Pick)
10967 @findex gnus-pick-next-page
10968 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
10969 at the end of the buffer, start reading the picked articles.
10970
10971 @item u
10972 @kindex u (Pick)
10973 @findex gnus-pick-unmark-article-or-thread.
10974 Unpick the thread or article
10975 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
10976 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
10977 thread if used at the first article of the thread.  Otherwise it unpicks
10978 just the article.  You can give this key a numerical prefix to unpick
10979 the thread or article at that line.
10980
10981 @item RET
10982 @kindex RET (Pick)
10983 @findex gnus-pick-start-reading
10984 @vindex gnus-pick-display-summary
10985 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
10986 given a prefix, mark all unpicked articles as read first.  If
10987 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
10988 will still be visible when you are reading.
10989
10990 @end table
10991
10992 All the normal summary mode commands are still available in the
10993 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
10994 which is mapped to the same function
10995 @code{gnus-summary-tick-article-forward}.
10996
10997 If this sounds like a good idea to you, you could say:
10998
10999 @lisp
11000 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
11001 @end lisp
11002
11003 @vindex gnus-pick-mode-hook
11004 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
11005
11006 @vindex gnus-mark-unpicked-articles-as-read
11007 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
11008 all unpicked articles as read.  The default is @code{nil}.
11009
11010 @vindex gnus-summary-pick-line-format
11011 The summary line format in pick mode is slightly different from the
11012 standard format.  At the beginning of each line the line number is
11013 displayed.  The pick mode line format is controlled by the
11014 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
11015 Variables}).  It accepts the same format specs that
11016 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
11017
11018
11019 @node Binary Groups
11020 @subsection Binary Groups
11021 @cindex binary groups
11022
11023 @findex gnus-binary-mode
11024 @kindex M-x gnus-binary-mode
11025 If you spend much time in binary groups, you may grow tired of hitting
11026 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
11027 is a minor mode for summary buffers that makes all ordinary Gnus article
11028 selection functions uudecode series of articles and display the result
11029 instead of just displaying the articles the normal way.
11030
11031 @kindex g (Binary)
11032 @findex gnus-binary-show-article
11033 The only way, in fact, to see the actual articles is the @kbd{g}
11034 command, when you have turned on this mode
11035 (@code{gnus-binary-show-article}).
11036
11037 @vindex gnus-binary-mode-hook
11038 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
11039
11040
11041 @node Tree Display
11042 @section Tree Display
11043 @cindex trees
11044
11045 @vindex gnus-use-trees
11046 If you don't like the normal Gnus summary display, you might try setting
11047 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
11048 additional @dfn{tree buffer}.  You can execute all summary mode commands
11049 in the tree buffer.
11050
11051 There are a few variables to customize the tree display, of course:
11052
11053 @table @code
11054 @item gnus-tree-mode-hook
11055 @vindex gnus-tree-mode-hook
11056 A hook called in all tree mode buffers.
11057
11058 @item gnus-tree-mode-line-format
11059 @vindex gnus-tree-mode-line-format
11060 A format string for the mode bar in the tree mode buffers (@pxref{Mode
11061 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
11062 of valid specs, @pxref{Summary Buffer Mode Line}.
11063
11064 @item gnus-selected-tree-face
11065 @vindex gnus-selected-tree-face
11066 Face used for highlighting the selected article in the tree buffer.  The
11067 default is @code{modeline}.
11068
11069 @item gnus-tree-line-format
11070 @vindex gnus-tree-line-format
11071 A format string for the tree nodes.  The name is a bit of a misnomer,
11072 though---it doesn't define a line, but just the node.  The default value
11073 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
11074 the name of the poster.  It is vital that all nodes are of the same
11075 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
11076
11077 Valid specs are:
11078
11079 @table @samp
11080 @item n
11081 The name of the poster.
11082 @item f
11083 The @code{From} header.
11084 @item N
11085 The number of the article.
11086 @item [
11087 The opening bracket.
11088 @item ]
11089 The closing bracket.
11090 @item s
11091 The subject.
11092 @end table
11093
11094 @xref{Formatting Variables}.
11095
11096 Variables related to the display are:
11097
11098 @table @code
11099 @item gnus-tree-brackets
11100 @vindex gnus-tree-brackets
11101 This is used for differentiating between ``real'' articles and
11102 ``sparse'' articles.  The format is
11103 @example
11104 ((@var{real-open} . @var{real-close})
11105  (@var{sparse-open} . @var{sparse-close})
11106  (@var{dummy-open} . @var{dummy-close}))
11107 @end example
11108 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
11109
11110 @item gnus-tree-parent-child-edges
11111 @vindex gnus-tree-parent-child-edges
11112 This is a list that contains the characters used for connecting parent
11113 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
11114
11115 @end table
11116
11117 @item gnus-tree-minimize-window
11118 @vindex gnus-tree-minimize-window
11119 If this variable is non-@code{nil}, Gnus will try to keep the tree
11120 buffer as small as possible to allow more room for the other Gnus
11121 windows.  If this variable is a number, the tree buffer will never be
11122 higher than that number.  The default is @code{t}.  Note that if you
11123 have several windows displayed side-by-side in a frame and the tree
11124 buffer is one of these, minimizing the tree window will also resize all
11125 other windows displayed next to it.
11126
11127 You may also wish to add the following hook to keep the window minimized
11128 at all times:
11129
11130 @lisp
11131 (add-hook 'gnus-configure-windows-hook
11132           'gnus-tree-perhaps-minimize)
11133 @end lisp
11134
11135 @item gnus-generate-tree-function
11136 @vindex gnus-generate-tree-function
11137 @findex gnus-generate-horizontal-tree
11138 @findex gnus-generate-vertical-tree
11139 The function that actually generates the thread tree.  Two predefined
11140 functions are available: @code{gnus-generate-horizontal-tree} and
11141 @code{gnus-generate-vertical-tree} (which is the default).
11142
11143 @end table
11144
11145 Here's an example from a horizontal tree buffer:
11146
11147 @example
11148 @{***@}-(***)-[odd]-[Gun]
11149      |      \[Jan]
11150      |      \[odd]-[Eri]
11151      |      \(***)-[Eri]
11152      |            \[odd]-[Paa]
11153      \[Bjo]
11154      \[Gun]
11155      \[Gun]-[Jor]
11156 @end example
11157
11158 Here's the same thread displayed in a vertical tree buffer:
11159
11160 @example
11161 @group
11162 @{***@}
11163   |--------------------------\-----\-----\
11164 (***)                         [Bjo] [Gun] [Gun]
11165   |--\-----\-----\                          |
11166 [odd] [Jan] [odd] (***)                   [Jor]
11167   |           |     |--\
11168 [Gun]       [Eri] [Eri] [odd]
11169                           |
11170                         [Paa]
11171 @end group
11172 @end example
11173
11174 If you're using horizontal trees, it might be nice to display the trees
11175 side-by-side with the summary buffer.  You could add something like the
11176 following to your @file{~/.gnus.el} file:
11177
11178 @lisp
11179 (setq gnus-use-trees t
11180       gnus-generate-tree-function 'gnus-generate-horizontal-tree
11181       gnus-tree-minimize-window nil)
11182 (gnus-add-configuration
11183  '(article
11184    (vertical 1.0
11185              (horizontal 0.25
11186                          (summary 0.75 point)
11187                          (tree 1.0))
11188              (article 1.0))))
11189 @end lisp
11190
11191 @xref{Window Layout}.
11192
11193
11194 @node Mail Group Commands
11195 @section Mail Group Commands
11196 @cindex mail group commands
11197
11198 Some commands only make sense in mail groups.  If these commands are
11199 invalid in the current group, they will raise a hell and let you know.
11200
11201 All these commands (except the expiry and edit commands) use the
11202 process/prefix convention (@pxref{Process/Prefix}).
11203
11204 @table @kbd
11205
11206 @item B e
11207 @kindex B e (Summary)
11208 @findex gnus-summary-expire-articles
11209 @cindex expiring mail
11210 Run all expirable articles in the current group through the expiry
11211 process (@code{gnus-summary-expire-articles}).  That is, delete all
11212 expirable articles in the group that have been around for a while.
11213 (@pxref{Expiring Mail}).
11214
11215 @item B C-M-e
11216 @kindex B C-M-e (Summary)
11217 @findex gnus-summary-expire-articles-now
11218 @cindex expiring mail
11219 Delete all the expirable articles in the group
11220 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
11221 articles eligible for expiry in the current group will
11222 disappear forever into that big @file{/dev/null} in the sky.
11223
11224 @item B DEL
11225 @kindex B DEL (Summary)
11226 @findex gnus-summary-delete-article
11227 @c @icon{gnus-summary-mail-delete}
11228 Delete the mail article.  This is ``delete'' as in ``delete it from your
11229 disk forever and ever, never to return again.'' Use with caution.
11230 (@code{gnus-summary-delete-article}).
11231
11232 @item B m
11233 @kindex B m (Summary)
11234 @cindex move mail
11235 @findex gnus-summary-move-article
11236 @vindex gnus-preserve-marks
11237 Move the article from one mail group to another
11238 (@code{gnus-summary-move-article}).  Marks will be preserved if
11239 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
11240
11241 @item B c
11242 @kindex B c (Summary)
11243 @cindex copy mail
11244 @findex gnus-summary-copy-article
11245 @c @icon{gnus-summary-mail-copy}
11246 Copy the article from one group (mail group or not) to a mail group
11247 (@code{gnus-summary-copy-article}).  Marks will be preserved if
11248 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
11249
11250 @item B B
11251 @kindex B B (Summary)
11252 @cindex crosspost mail
11253 @findex gnus-summary-crosspost-article
11254 Crosspost the current article to some other group
11255 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
11256 the article in the other group, and the Xref headers of the article will
11257 be properly updated.
11258
11259 @item B i
11260 @kindex B i (Summary)
11261 @findex gnus-summary-import-article
11262 Import an arbitrary file into the current mail newsgroup
11263 (@code{gnus-summary-import-article}).  You will be prompted for a file
11264 name, a @code{From} header and a @code{Subject} header.
11265
11266 @item B I
11267 @kindex B I (Summary)
11268 @findex gnus-summary-create-article
11269 Create an empty article in the current mail newsgroups
11270 (@code{gnus-summary-create-article}).  You will be prompted for a
11271 @code{From} header and a @code{Subject} header.
11272
11273 @item B r
11274 @kindex B r (Summary)
11275 @findex gnus-summary-respool-article
11276 @vindex gnus-summary-respool-default-method
11277 Respool the mail article (@code{gnus-summary-respool-article}).
11278 @code{gnus-summary-respool-default-method} will be used as the default
11279 select method when respooling.  This variable is @code{nil} by default,
11280 which means that the current group select method will be used instead.
11281 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
11282 (which is the default).
11283
11284 @item B w
11285 @itemx e
11286 @kindex B w (Summary)
11287 @kindex e (Summary)
11288 @findex gnus-summary-edit-article
11289 @kindex C-c C-c (Article)
11290 @findex gnus-summary-edit-article-done
11291 Edit the current article (@code{gnus-summary-edit-article}).  To finish
11292 editing and make the changes permanent, type @kbd{C-c C-c}
11293 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
11294 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
11295
11296 @item B q
11297 @kindex B q (Summary)
11298 @findex gnus-summary-respool-query
11299 If you want to re-spool an article, you might be curious as to what group
11300 the article will end up in before you do the re-spooling.  This command
11301 will tell you (@code{gnus-summary-respool-query}).
11302
11303 @item B t
11304 @kindex B t (Summary)
11305 @findex gnus-summary-respool-trace
11306 Similarly, this command will display all fancy splitting patterns used
11307 when respooling, if any (@code{gnus-summary-respool-trace}).
11308
11309 @item B p
11310 @kindex B p (Summary)
11311 @findex gnus-summary-article-posted-p
11312 Some people have a tendency to send you ``courtesy'' copies when they
11313 follow up to articles you have posted.  These usually have a
11314 @code{Newsgroups} header in them, but not always.  This command
11315 (@code{gnus-summary-article-posted-p}) will try to fetch the current
11316 article from your news server (or rather, from
11317 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
11318 report back whether it found the article or not.  Even if it says that
11319 it didn't find the article, it may have been posted anyway---mail
11320 propagation is much faster than news propagation, and the news copy may
11321 just not have arrived yet.
11322
11323 @item K E
11324 @kindex K E (Summary)
11325 @findex gnus-article-encrypt-body
11326 @vindex gnus-article-encrypt-protocol
11327 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
11328 The body is encrypted with the encryption protocol specified by the
11329 variable @code{gnus-article-encrypt-protocol}.
11330
11331 @end table
11332
11333 @vindex gnus-move-split-methods
11334 @cindex moving articles
11335 If you move (or copy) articles regularly, you might wish to have Gnus
11336 suggest where to put the articles.  @code{gnus-move-split-methods} is a
11337 variable that uses the same syntax as @code{gnus-split-methods}
11338 (@pxref{Saving Articles}).  You may customize that variable to create
11339 suggestions you find reasonable.  (Note that
11340 @code{gnus-move-split-methods} uses group names where
11341 @code{gnus-split-methods} uses file names.)
11342
11343 @lisp
11344 (setq gnus-move-split-methods
11345       '(("^From:.*Lars Magne" "nnml:junk")
11346         ("^Subject:.*gnus" "nnfolder:important")
11347         (".*" "nnml:misc")))
11348 @end lisp
11349
11350
11351 @node Various Summary Stuff
11352 @section Various Summary Stuff
11353
11354 @menu
11355 * Summary Group Information::   Information oriented commands.
11356 * Searching for Articles::      Multiple article commands.
11357 * Summary Generation Commands::
11358 * Really Various Summary Commands::  Those pesky non-conformant commands.
11359 @end menu
11360
11361 @table @code
11362 @vindex gnus-summary-display-while-building
11363 @item gnus-summary-display-while-building
11364 If non-@code{nil}, show and update the summary buffer as it's being
11365 built.  If @code{t}, update the buffer after every line is inserted.
11366 If the value is an integer, @var{n}, update the display every @var{n}
11367 lines.  The default is @code{nil}.
11368
11369 @vindex gnus-summary-display-arrow
11370 @item gnus-summary-display-arrow
11371 If non-@code{nil}, display an arrow in the fringe to indicate the
11372 current article.
11373
11374 @vindex gnus-summary-mode-hook
11375 @item gnus-summary-mode-hook
11376 This hook is called when creating a summary mode buffer.
11377
11378 @vindex gnus-summary-generate-hook
11379 @item gnus-summary-generate-hook
11380 This is called as the last thing before doing the threading and the
11381 generation of the summary buffer.  It's quite convenient for customizing
11382 the threading variables based on what data the newsgroup has.  This hook
11383 is called from the summary buffer after most summary buffer variables
11384 have been set.
11385
11386 @vindex gnus-summary-prepare-hook
11387 @item gnus-summary-prepare-hook
11388 It is called after the summary buffer has been generated.  You might use
11389 it to, for instance, highlight lines or modify the look of the buffer in
11390 some other ungodly manner.  I don't care.
11391
11392 @vindex gnus-summary-prepared-hook
11393 @item gnus-summary-prepared-hook
11394 A hook called as the very last thing after the summary buffer has been
11395 generated.
11396
11397 @vindex gnus-summary-ignore-duplicates
11398 @item gnus-summary-ignore-duplicates
11399 When Gnus discovers two articles that have the same @code{Message-ID},
11400 it has to do something drastic.  No articles are allowed to have the
11401 same @code{Message-ID}, but this may happen when reading mail from some
11402 sources.  Gnus allows you to customize what happens with this variable.
11403 If it is @code{nil} (which is the default), Gnus will rename the
11404 @code{Message-ID} (for display purposes only) and display the article as
11405 any other article.  If this variable is @code{t}, it won't display the
11406 article---it'll be as if it never existed.
11407
11408 @vindex gnus-alter-articles-to-read-function
11409 @item gnus-alter-articles-to-read-function
11410 This function, which takes two parameters (the group name and the list
11411 of articles to be selected), is called to allow the user to alter the
11412 list of articles to be selected.
11413
11414 For instance, the following function adds the list of cached articles to
11415 the list in one particular group:
11416
11417 @lisp
11418 (defun my-add-cached-articles (group articles)
11419   (if (string= group "some.group")
11420       (append gnus-newsgroup-cached articles)
11421     articles))
11422 @end lisp
11423
11424 @vindex gnus-newsgroup-variables
11425 @item gnus-newsgroup-variables
11426 A list of newsgroup (summary buffer) local variables, or cons of
11427 variables and their default expressions to be evalled (when the default
11428 values are not @code{nil}), that should be made global while the summary
11429 buffer is active.
11430
11431 Note: The default expressions will be evaluated (using function
11432 @code{eval}) before assignment to the local variable rather than just
11433 assigned to it.  If the default expression is the symbol @code{global},
11434 that symbol will not be evaluated but the global value of the local
11435 variable will be used instead.
11436
11437 These variables can be used to set variables in the group parameters
11438 while still allowing them to affect operations done in other
11439 buffers.  For example:
11440
11441 @lisp
11442 (setq gnus-newsgroup-variables
11443       '(message-use-followup-to
11444         (gnus-visible-headers .
11445  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
11446 @end lisp
11447
11448 Also @pxref{Group Parameters}.
11449
11450 @vindex gnus-propagate-marks
11451 @item gnus-propagate-marks
11452 If non-@code{nil}, propagate marks to the backends for possible
11453 storing.  @xref{NNTP marks}, and friends, for a more fine-grained
11454 sieve.
11455
11456 @end table
11457
11458
11459 @node Summary Group Information
11460 @subsection Summary Group Information
11461
11462 @table @kbd
11463
11464 @item H f
11465 @kindex H f (Summary)
11466 @findex gnus-summary-fetch-faq
11467 @vindex gnus-group-faq-directory
11468 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
11469 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
11470 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
11471 is usually a directory on a remote machine.  This variable can also be
11472 a list of directories.  In that case, giving a prefix to this command
11473 will allow you to choose between the various sites.  @code{ange-ftp}
11474 or @code{efs} will probably be used for fetching the file.
11475
11476 @item H d
11477 @kindex H d (Summary)
11478 @findex gnus-summary-describe-group
11479 Give a brief description of the current group
11480 (@code{gnus-summary-describe-group}).  If given a prefix, force
11481 rereading the description from the server.
11482
11483 @item H h
11484 @kindex H h (Summary)
11485 @findex gnus-summary-describe-briefly
11486 Give an extremely brief description of the most important summary
11487 keystrokes (@code{gnus-summary-describe-briefly}).
11488
11489 @item H i
11490 @kindex H i (Summary)
11491 @findex gnus-info-find-node
11492 Go to the Gnus info node (@code{gnus-info-find-node}).
11493 @end table
11494
11495
11496 @node Searching for Articles
11497 @subsection Searching for Articles
11498
11499 @table @kbd
11500
11501 @item M-s
11502 @kindex M-s (Summary)
11503 @findex gnus-summary-search-article-forward
11504 Search through all subsequent (raw) articles for a regexp
11505 (@code{gnus-summary-search-article-forward}).
11506
11507 @item M-r
11508 @kindex M-r (Summary)
11509 @findex gnus-summary-search-article-backward
11510 Search through all previous (raw) articles for a regexp
11511 (@code{gnus-summary-search-article-backward}).
11512
11513 @item M-S
11514 @kindex M-S (Summary)
11515 @findex gnus-summary-repeat-search-article-forward
11516 Repeat the previous search forwards
11517 (@code{gnus-summary-repeat-search-article-forward}).
11518
11519 @item M-R
11520 @kindex M-R (Summary)
11521 @findex gnus-summary-repeat-search-article-backward
11522 Repeat the previous search backwards
11523 (@code{gnus-summary-repeat-search-article-backward}).
11524
11525 @item &
11526 @kindex & (Summary)
11527 @findex gnus-summary-execute-command
11528 This command will prompt you for a header, a regular expression to match
11529 on this field, and a command to be executed if the match is made
11530 (@code{gnus-summary-execute-command}).  If the header is an empty
11531 string, the match is done on the entire article.  If given a prefix,
11532 search backward instead.
11533
11534 For instance, @kbd{& RET some.*string RET #} will put the process mark on
11535 all articles that have heads or bodies that match @samp{some.*string}.
11536
11537 @item M-&
11538 @kindex M-& (Summary)
11539 @findex gnus-summary-universal-argument
11540 Perform any operation on all articles that have been marked with
11541 the process mark (@code{gnus-summary-universal-argument}).
11542 @end table
11543
11544 @node Summary Generation Commands
11545 @subsection Summary Generation Commands
11546
11547 @table @kbd
11548
11549 @item Y g
11550 @kindex Y g (Summary)
11551 @findex gnus-summary-prepare
11552 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
11553
11554 @item Y c
11555 @kindex Y c (Summary)
11556 @findex gnus-summary-insert-cached-articles
11557 Pull all cached articles (for the current group) into the summary buffer
11558 (@code{gnus-summary-insert-cached-articles}).
11559
11560 @item Y d
11561 @kindex Y d (Summary)
11562 @findex gnus-summary-insert-dormant-articles
11563 Pull all dormant articles (for the current group) into the summary buffer
11564 (@code{gnus-summary-insert-dormant-articles}).
11565
11566 @item Y t
11567 @kindex Y t (Summary)
11568 @findex gnus-summary-insert-ticked-articles
11569 Pull all ticked articles (for the current group) into the summary buffer
11570 (@code{gnus-summary-insert-ticked-articles}).
11571
11572 @end table
11573
11574
11575 @node Really Various Summary Commands
11576 @subsection Really Various Summary Commands
11577
11578 @table @kbd
11579
11580 @item A D
11581 @itemx C-d
11582 @kindex C-d (Summary)
11583 @kindex A D (Summary)
11584 @findex gnus-summary-enter-digest-group
11585 If the current article is a collection of other articles (for instance,
11586 a digest), you might use this command to enter a group based on the that
11587 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
11588 guess what article type is currently displayed unless you give a prefix
11589 to this command, which forces a ``digest'' interpretation.  Basically,
11590 whenever you see a message that is a collection of other messages of
11591 some format, you @kbd{C-d} and read these messages in a more convenient
11592 fashion.
11593
11594 @vindex gnus-auto-select-on-ephemeral-exit
11595 The variable @code{gnus-auto-select-on-ephemeral-exit} controls what
11596 article should be selected after exiting a digest group.  Valid values
11597 include:
11598
11599 @table @code
11600 @item next
11601 Select the next article.
11602
11603 @item next-unread
11604 Select the next unread article.
11605
11606 @item next-noselect
11607 Move the cursor to the next article.  This is the default.
11608
11609 @item next-unread-noselect
11610 Move the cursor to the next unread article.
11611 @end table
11612
11613 If it has any other value or there is no next (unread) article, the
11614 article selected before entering to the digest group will appear.
11615
11616 @item C-M-d
11617 @kindex C-M-d (Summary)
11618 @findex gnus-summary-read-document
11619 This command is very similar to the one above, but lets you gather
11620 several documents into one biiig group
11621 (@code{gnus-summary-read-document}).  It does this by opening several
11622 @code{nndoc} groups for each document, and then opening an
11623 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
11624 command understands the process/prefix convention
11625 (@pxref{Process/Prefix}).
11626
11627 @item C-t
11628 @kindex C-t (Summary)
11629 @findex gnus-summary-toggle-truncation
11630 Toggle truncation of summary lines
11631 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
11632 line centering function in the summary buffer, so it's not a good idea
11633 to have truncation switched off while reading articles.
11634
11635 @item =
11636 @kindex = (Summary)
11637 @findex gnus-summary-expand-window
11638 Expand the summary buffer window (@code{gnus-summary-expand-window}).
11639 If given a prefix, force an @code{article} window configuration.
11640
11641 @item C-M-e
11642 @kindex C-M-e (Summary)
11643 @findex gnus-summary-edit-parameters
11644 Edit the group parameters (@pxref{Group Parameters}) of the current
11645 group (@code{gnus-summary-edit-parameters}).
11646
11647 @item C-M-a
11648 @kindex C-M-a (Summary)
11649 @findex gnus-summary-customize-parameters
11650 Customize the group parameters (@pxref{Group Parameters}) of the current
11651 group (@code{gnus-summary-customize-parameters}).
11652
11653 @end table
11654
11655
11656 @node Exiting the Summary Buffer
11657 @section Exiting the Summary Buffer
11658 @cindex summary exit
11659 @cindex exiting groups
11660
11661 Exiting from the summary buffer will normally update all info on the
11662 group and return you to the group buffer.
11663
11664 @table @kbd
11665
11666 @item Z Z
11667 @itemx Z Q
11668 @itemx q
11669 @kindex Z Z (Summary)
11670 @kindex Z Q (Summary)
11671 @kindex q (Summary)
11672 @findex gnus-summary-exit
11673 @vindex gnus-summary-exit-hook
11674 @vindex gnus-summary-prepare-exit-hook
11675 @vindex gnus-group-no-more-groups-hook
11676 @c @icon{gnus-summary-exit}
11677 Exit the current group and update all information on the group
11678 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
11679 called before doing much of the exiting, which calls
11680 @code{gnus-summary-expire-articles} by default.
11681 @code{gnus-summary-exit-hook} is called after finishing the exit
11682 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
11683 group mode having no more (unread) groups.
11684
11685 @item Z E
11686 @itemx Q
11687 @kindex Z E (Summary)
11688 @kindex Q (Summary)
11689 @findex gnus-summary-exit-no-update
11690 Exit the current group without updating any information on the group
11691 (@code{gnus-summary-exit-no-update}).
11692
11693 @item Z c
11694 @itemx c
11695 @kindex Z c (Summary)
11696 @kindex c (Summary)
11697 @findex gnus-summary-catchup-and-exit
11698 @c @icon{gnus-summary-catchup-and-exit}
11699 Mark all unticked articles in the group as read and then exit
11700 (@code{gnus-summary-catchup-and-exit}).
11701
11702 @item Z C
11703 @kindex Z C (Summary)
11704 @findex gnus-summary-catchup-all-and-exit
11705 Mark all articles, even the ticked ones, as read and then exit
11706 (@code{gnus-summary-catchup-all-and-exit}).
11707
11708 @item Z n
11709 @kindex Z n (Summary)
11710 @findex gnus-summary-catchup-and-goto-next-group
11711 Mark all articles as read and go to the next group
11712 (@code{gnus-summary-catchup-and-goto-next-group}).
11713
11714 @item Z p
11715 @kindex Z p (Summary)
11716 @findex gnus-summary-catchup-and-goto-prev-group
11717 Mark all articles as read and go to the previous group
11718 (@code{gnus-summary-catchup-and-goto-prev-group}).
11719
11720 @item Z R
11721 @itemx C-x C-s
11722 @kindex Z R (Summary)
11723 @kindex C-x C-s (Summary)
11724 @findex gnus-summary-reselect-current-group
11725 Exit this group, and then enter it again
11726 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
11727 all articles, both read and unread.
11728
11729 @item Z G
11730 @itemx M-g
11731 @kindex Z G (Summary)
11732 @kindex M-g (Summary)
11733 @findex gnus-summary-rescan-group
11734 @c @icon{gnus-summary-mail-get}
11735 Exit the group, check for new articles in the group, and select the
11736 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
11737 articles, both read and unread.
11738
11739 @item Z N
11740 @kindex Z N (Summary)
11741 @findex gnus-summary-next-group
11742 Exit the group and go to the next group
11743 (@code{gnus-summary-next-group}).
11744
11745 @item Z P
11746 @kindex Z P (Summary)
11747 @findex gnus-summary-prev-group
11748 Exit the group and go to the previous group
11749 (@code{gnus-summary-prev-group}).
11750
11751 @item Z s
11752 @kindex Z s (Summary)
11753 @findex gnus-summary-save-newsrc
11754 Save the current number of read/marked articles in the dribble buffer
11755 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
11756 given a prefix, also save the @file{.newsrc} file(s).  Using this
11757 command will make exit without updating (the @kbd{Q} command) worthless.
11758 @end table
11759
11760 @vindex gnus-exit-group-hook
11761 @code{gnus-exit-group-hook} is called when you exit the current group
11762 with an ``updating'' exit.  For instance @kbd{Q}
11763 (@code{gnus-summary-exit-no-update}) does not call this hook.
11764
11765 @findex gnus-summary-wake-up-the-dead
11766 @findex gnus-dead-summary-mode
11767 @vindex gnus-kill-summary-on-exit
11768 If you're in the habit of exiting groups, and then changing your mind
11769 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
11770 If you do that, Gnus won't kill the summary buffer when you exit it.
11771 (Quelle surprise!)  Instead it will change the name of the buffer to
11772 something like @samp{*Dead Summary ... *} and install a minor mode
11773 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
11774 buffer, you'll find that all keys are mapped to a function called
11775 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
11776 summary buffer will result in a live, normal summary buffer.
11777
11778 There will never be more than one dead summary buffer at any one time.
11779
11780 @vindex gnus-use-cross-reference
11781 The data on the current group will be updated (which articles you have
11782 read, which articles you have replied to, etc.) when you exit the
11783 summary buffer.  If the @code{gnus-use-cross-reference} variable is
11784 @code{t} (which is the default), articles that are cross-referenced to
11785 this group and are marked as read, will also be marked as read in the
11786 other subscribed groups they were cross-posted to.  If this variable is
11787 neither @code{nil} nor @code{t}, the article will be marked as read in
11788 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
11789
11790
11791 @node Crosspost Handling
11792 @section Crosspost Handling
11793
11794 @cindex velveeta
11795 @cindex spamming
11796 Marking cross-posted articles as read ensures that you'll never have to
11797 read the same article more than once.  Unless, of course, somebody has
11798 posted it to several groups separately.  Posting the same article to
11799 several groups (not cross-posting) is called @dfn{spamming}, and you are
11800 by law required to send nasty-grams to anyone who perpetrates such a
11801 heinous crime.  You may want to try NoCeM handling to filter out spam
11802 (@pxref{NoCeM}).
11803
11804 Remember: Cross-posting is kinda ok, but posting the same article
11805 separately to several groups is not.  Massive cross-posting (aka.
11806 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
11807 @code{gnus-summary-mail-crosspost-complaint} command to complain about
11808 excessive crossposting (@pxref{Summary Mail Commands}).
11809
11810 @cindex cross-posting
11811 @cindex Xref
11812 @cindex @acronym{NOV}
11813 One thing that may cause Gnus to not do the cross-posting thing
11814 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
11815 (which is very nice, because it speeds things up considerably) which
11816 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
11817 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
11818 even with @sc{xover} by registering the @code{Xref} lines of all
11819 articles you actually read, but if you kill the articles, or just mark
11820 them as read without reading them, Gnus will not get a chance to snoop
11821 the @code{Xref} lines out of these articles, and will be unable to use
11822 the cross reference mechanism.
11823
11824 @cindex LIST overview.fmt
11825 @cindex overview.fmt
11826 To check whether your @acronym{NNTP} server includes the @code{Xref} header
11827 in its overview files, try @samp{telnet your.nntp.server nntp},
11828 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
11829 overview.fmt}.  This may not work, but if it does, and the last line you
11830 get does not read @samp{Xref:full}, then you should shout and whine at
11831 your news admin until she includes the @code{Xref} header in the
11832 overview files.
11833
11834 If you want Gnus to get the @code{Xref}s right all the time, you have to
11835 set @code{nntp-nov-is-evil} to @code{t}, which slows things down
11836 considerably.  Also @pxref{Slow/Expensive Connection}.
11837
11838 C'est la vie.
11839
11840 For an alternative approach, @pxref{Duplicate Suppression}.
11841
11842
11843 @node Duplicate Suppression
11844 @section Duplicate Suppression
11845
11846 By default, Gnus tries to make sure that you don't have to read the same
11847 article more than once by utilizing the crossposting mechanism
11848 (@pxref{Crosspost Handling}).  However, that simple and efficient
11849 approach may not work satisfactory for some users for various
11850 reasons.
11851
11852 @enumerate
11853 @item
11854 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
11855 is evil and not very common.
11856
11857 @item
11858 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
11859 @file{.overview} data bases.  This is evil and all too common, alas.
11860
11861 @item
11862 You may be reading the same group (or several related groups) from
11863 different @acronym{NNTP} servers.
11864
11865 @item
11866 You may be getting mail that duplicates articles posted to groups.
11867 @end enumerate
11868
11869 I'm sure there are other situations where @code{Xref} handling fails as
11870 well, but these four are the most common situations.
11871
11872 If, and only if, @code{Xref} handling fails for you, then you may
11873 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
11874 will remember the @code{Message-ID}s of all articles you have read or
11875 otherwise marked as read, and then, as if by magic, mark them as read
11876 all subsequent times you see them---in @emph{all} groups.  Using this
11877 mechanism is quite likely to be somewhat inefficient, but not overly
11878 so.  It's certainly preferable to reading the same articles more than
11879 once.
11880
11881 Duplicate suppression is not a very subtle instrument.  It's more like a
11882 sledge hammer than anything else.  It works in a very simple
11883 fashion---if you have marked an article as read, it adds this Message-ID
11884 to a cache.  The next time it sees this Message-ID, it will mark the
11885 article as read with the @samp{M} mark.  It doesn't care what group it
11886 saw the article in.
11887
11888 @table @code
11889 @item gnus-suppress-duplicates
11890 @vindex gnus-suppress-duplicates
11891 If non-@code{nil}, suppress duplicates.
11892
11893 @item gnus-save-duplicate-list
11894 @vindex gnus-save-duplicate-list
11895 If non-@code{nil}, save the list of duplicates to a file.  This will
11896 make startup and shutdown take longer, so the default is @code{nil}.
11897 However, this means that only duplicate articles read in a single Gnus
11898 session are suppressed.
11899
11900 @item gnus-duplicate-list-length
11901 @vindex gnus-duplicate-list-length
11902 This variable says how many @code{Message-ID}s to keep in the duplicate
11903 suppression list.  The default is 10000.
11904
11905 @item gnus-duplicate-file
11906 @vindex gnus-duplicate-file
11907 The name of the file to store the duplicate suppression list in.  The
11908 default is @file{~/News/suppression}.
11909 @end table
11910
11911 If you have a tendency to stop and start Gnus often, setting
11912 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
11913 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
11914 the other hand, saving the list makes startup and shutdown much slower,
11915 so that means that if you stop and start Gnus often, you should set
11916 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
11917 to you to figure out, I think.
11918
11919 @node Security
11920 @section Security
11921
11922 Gnus is able to verify signed messages or decrypt encrypted messages.
11923 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
11924 and @acronym{S/MIME}, however you need some external programs to get
11925 things to work:
11926
11927 @enumerate
11928 @item
11929 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
11930 install an OpenPGP implementation such as GnuPG.  The Lisp interface
11931 to GnuPG included with Gnus is called PGG (@pxref{Top, ,PGG, pgg, PGG
11932 Manual}), but Mailcrypt and gpg.el are also supported.
11933
11934 @item
11935 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
11936 or newer is recommended.
11937
11938 @end enumerate
11939
11940 The variables that control security functionality on reading messages
11941 include:
11942
11943 @table @code
11944 @item mm-verify-option
11945 @vindex mm-verify-option
11946 Option of verifying signed parts.  @code{never}, not verify;
11947 @code{always}, always verify; @code{known}, only verify known
11948 protocols.  Otherwise, ask user.
11949
11950 @item mm-decrypt-option
11951 @vindex mm-decrypt-option
11952 Option of decrypting encrypted parts.  @code{never}, no decryption;
11953 @code{always}, always decrypt; @code{known}, only decrypt known
11954 protocols.  Otherwise, ask user.
11955
11956 @item mml1991-use
11957 @vindex mml1991-use
11958 Symbol indicating elisp interface to OpenPGP implementation for
11959 @acronym{PGP} messages.  The default is @code{pgg}, but
11960 @code{mailcrypt} and @code{gpg} are also supported although
11961 deprecated.
11962
11963 @item mml2015-use
11964 @vindex mml2015-use
11965 Symbol indicating elisp interface to OpenPGP implementation for
11966 @acronym{PGP/MIME} messages.  The default is @code{pgg}, but
11967 @code{mailcrypt} and @code{gpg} are also supported although
11968 deprecated.
11969
11970 @end table
11971
11972 By default the buttons that display security information are not
11973 shown, because they clutter reading the actual e-mail.  You can type
11974 @kbd{K b} manually to display the information.  Use the
11975 @code{gnus-buttonized-mime-types} and
11976 @code{gnus-unbuttonized-mime-types} variables to control this
11977 permanently.  @ref{MIME Commands} for further details, and hints on
11978 how to customize these variables to always display security
11979 information.
11980
11981 @cindex snarfing keys
11982 @cindex importing PGP keys
11983 @cindex PGP key ring import
11984 Snarfing OpenPGP keys (i.e., importing keys from articles into your
11985 key ring) is not supported explicitly through a menu item or command,
11986 rather Gnus do detect and label keys as @samp{application/pgp-keys},
11987 allowing you to specify whatever action you think is appropriate
11988 through the usual @acronym{MIME} infrastructure.  You can use a
11989 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
11990 Emacs MIME Manual}) such as the following to import keys using GNU
11991 Privacy Guard when you click on the @acronym{MIME} button
11992 (@pxref{Using MIME}).
11993
11994 @example
11995 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
11996 @end example
11997 @noindent
11998 This happens to also be the default action defined in
11999 @code{mailcap-mime-data}.
12000
12001 More information on how to set things for sending outgoing signed and
12002 encrypted messages up can be found in the message manual
12003 (@pxref{Security, ,Security, message, Message Manual}).
12004
12005 @node Mailing List
12006 @section Mailing List
12007 @cindex mailing list
12008 @cindex RFC 2396
12009
12010 @kindex A M (summary)
12011 @findex gnus-mailing-list-insinuate
12012 Gnus understands some mailing list fields of RFC 2369.  To enable it,
12013 add a @code{to-list} group parameter (@pxref{Group Parameters}),
12014 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
12015 summary buffer.
12016
12017 That enables the following commands to the summary buffer:
12018
12019 @table @kbd
12020
12021 @item C-c C-n h
12022 @kindex C-c C-n h (Summary)
12023 @findex gnus-mailing-list-help
12024 Send a message to fetch mailing list help, if List-Help field exists.
12025
12026 @item C-c C-n s
12027 @kindex C-c C-n s (Summary)
12028 @findex gnus-mailing-list-subscribe
12029 Send a message to subscribe the mailing list, if List-Subscribe field exists.
12030
12031 @item C-c C-n u
12032 @kindex C-c C-n u (Summary)
12033 @findex gnus-mailing-list-unsubscribe
12034 Send a message to unsubscribe the mailing list, if List-Unsubscribe
12035 field exists.
12036
12037 @item C-c C-n p
12038 @kindex C-c C-n p (Summary)
12039 @findex gnus-mailing-list-post
12040 Post to the mailing list, if List-Post field exists.
12041
12042 @item C-c C-n o
12043 @kindex C-c C-n o (Summary)
12044 @findex gnus-mailing-list-owner
12045 Send a message to the mailing list owner, if List-Owner field exists.
12046
12047 @item C-c C-n a
12048 @kindex C-c C-n a (Summary)
12049 @findex gnus-mailing-list-archive
12050 Browse the mailing list archive, if List-Archive field exists.
12051
12052 @end table
12053
12054
12055 @node Article Buffer
12056 @chapter Article Buffer
12057 @cindex article buffer
12058
12059 The articles are displayed in the article buffer, of which there is only
12060 one.  All the summary buffers share the same article buffer unless you
12061 tell Gnus otherwise.
12062
12063 @menu
12064 * Hiding Headers::              Deciding what headers should be displayed.
12065 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
12066 * Customizing Articles::        Tailoring the look of the articles.
12067 * Article Keymap::              Keystrokes available in the article buffer.
12068 * Misc Article::                Other stuff.
12069 @end menu
12070
12071
12072 @node Hiding Headers
12073 @section Hiding Headers
12074 @cindex hiding headers
12075 @cindex deleting headers
12076
12077 The top section of each article is the @dfn{head}.  (The rest is the
12078 @dfn{body}, but you may have guessed that already.)
12079
12080 @vindex gnus-show-all-headers
12081 There is a lot of useful information in the head: the name of the person
12082 who wrote the article, the date it was written and the subject of the
12083 article.  That's well and nice, but there's also lots of information
12084 most people do not want to see---what systems the article has passed
12085 through before reaching you, the @code{Message-ID}, the
12086 @code{References}, etc. ad nauseam---and you'll probably want to get rid
12087 of some of those lines.  If you want to keep all those lines in the
12088 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
12089
12090 Gnus provides you with two variables for sifting headers:
12091
12092 @table @code
12093
12094 @item gnus-visible-headers
12095 @vindex gnus-visible-headers
12096 If this variable is non-@code{nil}, it should be a regular expression
12097 that says what headers you wish to keep in the article buffer.  All
12098 headers that do not match this variable will be hidden.
12099
12100 For instance, if you only want to see the name of the person who wrote
12101 the article and the subject, you'd say:
12102
12103 @lisp
12104 (setq gnus-visible-headers "^From:\\|^Subject:")
12105 @end lisp
12106
12107 This variable can also be a list of regexps to match headers to
12108 remain visible.
12109
12110 @item gnus-ignored-headers
12111 @vindex gnus-ignored-headers
12112 This variable is the reverse of @code{gnus-visible-headers}.  If this
12113 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
12114 should be a regular expression that matches all lines that you want to
12115 hide.  All lines that do not match this variable will remain visible.
12116
12117 For instance, if you just want to get rid of the @code{References} line
12118 and the @code{Xref} line, you might say:
12119
12120 @lisp
12121 (setq gnus-ignored-headers "^References:\\|^Xref:")
12122 @end lisp
12123
12124 This variable can also be a list of regexps to match headers to
12125 be removed.
12126
12127 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
12128 variable will have no effect.
12129
12130 @end table
12131
12132 @vindex gnus-sorted-header-list
12133 Gnus can also sort the headers for you.  (It does this by default.)  You
12134 can control the sorting by setting the @code{gnus-sorted-header-list}
12135 variable.  It is a list of regular expressions that says in what order
12136 the headers are to be displayed.
12137
12138 For instance, if you want the name of the author of the article first,
12139 and then the subject, you might say something like:
12140
12141 @lisp
12142 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
12143 @end lisp
12144
12145 Any headers that are to remain visible, but are not listed in this
12146 variable, will be displayed in random order after all the headers listed in this variable.
12147
12148 @findex gnus-article-hide-boring-headers
12149 @vindex gnus-boring-article-headers
12150 You can hide further boring headers by setting
12151 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
12152 does depends on the @code{gnus-boring-article-headers} variable.  It's a
12153 list, but this list doesn't actually contain header names.  Instead it
12154 lists various @dfn{boring conditions} that Gnus can check and remove
12155 from sight.
12156
12157 These conditions are:
12158 @table @code
12159 @item empty
12160 Remove all empty headers.
12161 @item followup-to
12162 Remove the @code{Followup-To} header if it is identical to the
12163 @code{Newsgroups} header.
12164 @item reply-to
12165 Remove the @code{Reply-To} header if it lists the same addresses as
12166 the @code{From} header, or if the @code{broken-reply-to} group
12167 parameter is set.
12168 @item newsgroups
12169 Remove the @code{Newsgroups} header if it only contains the current group
12170 name.
12171 @item to-address
12172 Remove the @code{To} header if it only contains the address identical to
12173 the current group's @code{to-address} parameter.
12174 @item to-list
12175 Remove the @code{To} header if it only contains the address identical to
12176 the current group's @code{to-list} parameter.
12177 @item cc-list
12178 Remove the @code{Cc} header if it only contains the address identical to
12179 the current group's @code{to-list} parameter.
12180 @item date
12181 Remove the @code{Date} header if the article is less than three days
12182 old.
12183 @item long-to
12184 Remove the @code{To} and/or @code{Cc} header if it is very long.
12185 @item many-to
12186 Remove all @code{To} and/or @code{Cc} headers if there are more than one.
12187 @end table
12188
12189 To include these three elements, you could say something like:
12190
12191 @lisp
12192 (setq gnus-boring-article-headers
12193       '(empty followup-to reply-to))
12194 @end lisp
12195
12196 This is also the default value for this variable.
12197
12198
12199 @node Using MIME
12200 @section Using MIME
12201 @cindex @acronym{MIME}
12202
12203 Mime is a standard for waving your hands through the air, aimlessly,
12204 while people stand around yawning.
12205
12206 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
12207 while all newsreaders die of fear.
12208
12209 @acronym{MIME} may specify what character set the article uses, the encoding
12210 of the characters, and it also makes it possible to embed pictures and
12211 other naughty stuff in innocent-looking articles.
12212
12213 @vindex gnus-display-mime-function
12214 @findex gnus-display-mime
12215 Gnus pushes @acronym{MIME} articles through @code{gnus-display-mime-function}
12216 to display the @acronym{MIME} parts.  This is @code{gnus-display-mime} by
12217 default, which creates a bundle of clickable buttons that can be used to
12218 display, save and manipulate the @acronym{MIME} objects.
12219
12220 The following commands are available when you have placed point over a
12221 @acronym{MIME} button:
12222
12223 @table @kbd
12224 @findex gnus-article-press-button
12225 @item RET (Article)
12226 @kindex RET (Article)
12227 @itemx BUTTON-2 (Article)
12228 Toggle displaying of the @acronym{MIME} object
12229 (@code{gnus-article-press-button}).  If built-in viewers can not display
12230 the object, Gnus resorts to external viewers in the @file{mailcap}
12231 files.  If a viewer has the @samp{copiousoutput} specification, the
12232 object is displayed inline.
12233
12234 @findex gnus-mime-view-part
12235 @item M-RET (Article)
12236 @kindex M-RET (Article)
12237 @itemx v (Article)
12238 Prompt for a method, and then view the @acronym{MIME} object using this
12239 method (@code{gnus-mime-view-part}).
12240
12241 @findex gnus-mime-view-part-as-type
12242 @item t (Article)
12243 @kindex t (Article)
12244 View the @acronym{MIME} object as if it were a different @acronym{MIME} media type
12245 (@code{gnus-mime-view-part-as-type}).
12246
12247 @findex gnus-mime-view-part-as-charset
12248 @item C (Article)
12249 @kindex C (Article)
12250 Prompt for a charset, and then view the @acronym{MIME} object using this
12251 charset (@code{gnus-mime-view-part-as-charset}).
12252
12253 @findex gnus-mime-save-part
12254 @item o (Article)
12255 @kindex o (Article)
12256 Prompt for a file name, and then save the @acronym{MIME} object
12257 (@code{gnus-mime-save-part}).
12258
12259 @findex gnus-mime-save-part-and-strip
12260 @item C-o (Article)
12261 @kindex C-o (Article)
12262 Prompt for a file name, then save the @acronym{MIME} object and strip it from
12263 the article.  Then proceed to article editing, where a reasonable
12264 suggestion is being made on how the altered article should look
12265 like.  The stripped @acronym{MIME} object will be referred via the
12266 message/external-body @acronym{MIME} type.
12267 (@code{gnus-mime-save-part-and-strip}).
12268
12269 @findex gnus-mime-replace-part
12270 @item r (Article)
12271 @kindex r (Article)
12272 Prompt for a file name, replace the @acronym{MIME} object with an
12273 external body refering to the file via the message/external-body
12274 @acronym{MIME} type.  (@code{gnus-mime-replace-part}).
12275
12276 @findex gnus-mime-delete-part
12277 @item d (Article)
12278 @kindex d (Article)
12279 Delete the @acronym{MIME} object from the article and replace it with some
12280 information about the removed @acronym{MIME} object
12281 (@code{gnus-mime-delete-part}).
12282
12283 @c FIXME: gnus-auto-select-part should be documented here
12284
12285 @findex gnus-mime-copy-part
12286 @item c (Article)
12287 @kindex c (Article)
12288 Copy the @acronym{MIME} object to a fresh buffer and display this buffer
12289 (@code{gnus-mime-copy-part}).  If given a prefix, copy the raw contents
12290 without decoding.  If given a numerical prefix, you can do semi-manual
12291 charset stuff (see @code{gnus-summary-show-article-charset-alist} in
12292 @ref{Paging the Article}).  Compressed files like @file{.gz} and
12293 @file{.bz2} are automatically decompressed if
12294 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
12295 Accessing Compressed Files, emacs, The Emacs Editor}).
12296
12297 @findex gnus-mime-print-part
12298 @item p (Article)
12299 @kindex p (Article)
12300 Print the @acronym{MIME} object (@code{gnus-mime-print-part}).  This
12301 command respects the @samp{print=} specifications in the
12302 @file{.mailcap} file.
12303
12304 @findex gnus-mime-inline-part
12305 @item i (Article)
12306 @kindex i (Article)
12307 Insert the contents of the @acronym{MIME} object into the buffer
12308 (@code{gnus-mime-inline-part}) as @samp{text/plain}.  If given a prefix, insert
12309 the raw contents without decoding.  If given a numerical prefix, you can
12310 do semi-manual charset stuff (see
12311 @code{gnus-summary-show-article-charset-alist} in @ref{Paging the
12312 Article}).  Compressed files like @file{.gz} and @file{.bz2} are
12313 automatically decompressed depending on @code{jka-compr} regardless of
12314 @code{auto-compression-mode} (@pxref{Compressed Files,, Accessing
12315 Compressed Files, emacs, The Emacs Editor}).
12316
12317 @findex gnus-mime-view-part-internally
12318 @item E (Article)
12319 @kindex E (Article)
12320 View the @acronym{MIME} object with an internal viewer.  If no internal
12321 viewer is available, use an external viewer
12322 (@code{gnus-mime-view-part-internally}).
12323
12324 @findex gnus-mime-view-part-externally
12325 @item e (Article)
12326 @kindex e (Article)
12327 View the @acronym{MIME} object with an external viewer.
12328 (@code{gnus-mime-view-part-externally}).
12329
12330 @findex gnus-mime-pipe-part
12331 @item | (Article)
12332 @kindex | (Article)
12333 Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}).
12334
12335 @findex gnus-mime-action-on-part
12336 @item . (Article)
12337 @kindex . (Article)
12338 Interactively run an action on the @acronym{MIME} object
12339 (@code{gnus-mime-action-on-part}).
12340
12341 @end table
12342
12343 Gnus will display some @acronym{MIME} objects automatically.  The way Gnus
12344 determines which parts to do this with is described in the Emacs
12345 @acronym{MIME} manual.
12346
12347 It might be best to just use the toggling functions from the article
12348 buffer to avoid getting nasty surprises.  (For instance, you enter the
12349 group @samp{alt.sing-a-long} and, before you know it, @acronym{MIME} has
12350 decoded the sound file in the article and some horrible sing-a-long song
12351 comes screaming out your speakers, and you can't find the volume button,
12352 because there isn't one, and people are starting to look at you, and you
12353 try to stop the program, but you can't, and you can't find the program
12354 to control the volume, and everybody else in the room suddenly decides
12355 to look at you disdainfully, and you'll feel rather stupid.)
12356
12357 Any similarity to real events and people is purely coincidental.  Ahem.
12358
12359 Also @pxref{MIME Commands}.
12360
12361
12362 @node Customizing Articles
12363 @section Customizing Articles
12364 @cindex article customization
12365
12366 A slew of functions for customizing how the articles are to look like
12367 exist.  You can call these functions interactively
12368 (@pxref{Article Washing}), or you can have them
12369 called automatically when you select the articles.
12370
12371 To have them called automatically, you should set the corresponding
12372 ``treatment'' variable.  For instance, to have headers hidden, you'd set
12373 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
12374 be set, but first we discuss the values these variables can have.
12375
12376 Note: Some values, while valid, make little sense.  Check the list below
12377 for sensible values.
12378
12379 @enumerate
12380 @item
12381 @code{nil}: Don't do this treatment.
12382
12383 @item
12384 @code{t}: Do this treatment on all body parts.
12385
12386 @item
12387 @code{head}: Do the treatment on the headers.
12388
12389 @item
12390 @code{first}: Do this treatment on the first body part.
12391
12392 @item
12393 @code{last}: Do this treatment on the last body part.
12394
12395 @item
12396 An integer: Do this treatment on all body parts that have a length less
12397 than this number.
12398
12399 @item
12400 A list of strings: Do this treatment on all body parts that are in
12401 articles that are read in groups that have names that match one of the
12402 regexps in the list.
12403
12404 @item
12405 A list where the first element is not a string:
12406
12407 The list is evaluated recursively.  The first element of the list is a
12408 predicate.  The following predicates are recognized: @code{or},
12409 @code{and}, @code{not} and @code{typep}.  Here's an example:
12410
12411 @lisp
12412 (or last
12413     (typep "text/x-vcard"))
12414 @end lisp
12415
12416 @end enumerate
12417
12418 You may have noticed that the word @dfn{part} is used here.  This refers
12419 to the fact that some messages are @acronym{MIME} multipart articles that may
12420 be divided into several parts.  Articles that are not multiparts are
12421 considered to contain just a single part.
12422
12423 @vindex gnus-article-treat-types
12424 Are the treatments applied to all sorts of multipart parts?  Yes, if you
12425 want to, but by default, only @samp{text/plain} parts are given the
12426 treatment.  This is controlled by the @code{gnus-article-treat-types}
12427 variable, which is a list of regular expressions that are matched to the
12428 type of the part.  This variable is ignored if the value of the
12429 controlling variable is a predicate list, as described above.
12430
12431 @ifinfo
12432 @c Avoid sort of redundant entries in the same section for the printed
12433 @c manual, but add them in info to allow `i gnus-treat-foo-bar RET' or
12434 @c `i foo-bar'.
12435 @vindex gnus-treat-buttonize
12436 @vindex gnus-treat-buttonize-head
12437 @vindex gnus-treat-capitalize-sentences
12438 @vindex gnus-treat-overstrike
12439 @vindex gnus-treat-strip-cr
12440 @vindex gnus-treat-strip-headers-in-body
12441 @vindex gnus-treat-strip-leading-blank-lines
12442 @vindex gnus-treat-strip-multiple-blank-lines
12443 @vindex gnus-treat-strip-pem
12444 @vindex gnus-treat-strip-trailing-blank-lines
12445 @vindex gnus-treat-unsplit-urls
12446 @vindex gnus-treat-wash-html
12447 @vindex gnus-treat-date-english
12448 @vindex gnus-treat-date-iso8601
12449 @vindex gnus-treat-date-lapsed
12450 @vindex gnus-treat-date-local
12451 @vindex gnus-treat-date-original
12452 @vindex gnus-treat-date-user-defined
12453 @vindex gnus-treat-date-ut
12454 @vindex gnus-treat-from-picon
12455 @vindex gnus-treat-mail-picon
12456 @vindex gnus-treat-newsgroups-picon
12457 @vindex gnus-treat-display-smileys
12458 @vindex gnus-treat-body-boundary
12459 @vindex gnus-treat-display-x-face
12460 @vindex gnus-treat-display-face
12461 @vindex gnus-treat-emphasize
12462 @vindex gnus-treat-fill-article
12463 @vindex gnus-treat-fill-long-lines
12464 @vindex gnus-treat-hide-boring-headers
12465 @vindex gnus-treat-hide-citation
12466 @vindex gnus-treat-hide-citation-maybe
12467 @vindex gnus-treat-hide-headers
12468 @vindex gnus-treat-hide-signature
12469 @vindex gnus-treat-strip-banner
12470 @vindex gnus-treat-strip-list-identifiers
12471 @vindex gnus-treat-highlight-citation
12472 @vindex gnus-treat-highlight-headers
12473 @vindex gnus-treat-highlight-signature
12474 @vindex gnus-treat-play-sounds
12475 @vindex gnus-treat-translate
12476 @vindex gnus-treat-x-pgp-sig
12477 @vindex gnus-treat-unfold-headers
12478 @vindex gnus-treat-fold-headers
12479 @vindex gnus-treat-fold-newsgroups
12480 @vindex gnus-treat-leading-whitespace
12481 @end ifinfo
12482
12483 The following treatment options are available.  The easiest way to
12484 customize this is to examine the @code{gnus-article-treat} customization
12485 group.  Values in parenthesis are suggested sensible values.  Others are
12486 possible but those listed are probably sufficient for most people.
12487
12488 @table @code
12489 @item gnus-treat-buttonize (t, integer)
12490 @item gnus-treat-buttonize-head (head)
12491
12492 @xref{Article Buttons}.
12493
12494 @item gnus-treat-capitalize-sentences (t, integer)
12495 @item gnus-treat-overstrike (t, integer)
12496 @item gnus-treat-strip-cr (t, integer)
12497 @item gnus-treat-strip-headers-in-body (t, integer)
12498 @item gnus-treat-strip-leading-blank-lines (t, first, integer)
12499 @item gnus-treat-strip-multiple-blank-lines (t, integer)
12500 @item gnus-treat-strip-pem (t, last, integer)
12501 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
12502 @item gnus-treat-unsplit-urls (t, integer)
12503 @item gnus-treat-wash-html (t, integer)
12504
12505 @xref{Article Washing}.
12506
12507 @item gnus-treat-date-english (head)
12508 @item gnus-treat-date-iso8601 (head)
12509 @item gnus-treat-date-lapsed (head)
12510 @item gnus-treat-date-local (head)
12511 @item gnus-treat-date-original (head)
12512 @item gnus-treat-date-user-defined (head)
12513 @item gnus-treat-date-ut (head)
12514
12515 @xref{Article Date}.
12516
12517 @item gnus-treat-from-picon (head)
12518 @item gnus-treat-mail-picon (head)
12519 @item gnus-treat-newsgroups-picon (head)
12520
12521 @xref{Picons}.
12522
12523 @item gnus-treat-display-smileys (t, integer)
12524
12525 @item gnus-treat-body-boundary (head)
12526
12527 @vindex gnus-body-boundary-delimiter
12528 Adds a delimiter between header and body, the string used as delimiter
12529 is controlled by @code{gnus-body-boundary-delimiter}.
12530
12531 @xref{Smileys}.
12532
12533 @vindex gnus-treat-display-x-face
12534 @item gnus-treat-display-x-face (head)
12535
12536 @xref{X-Face}.
12537
12538 @vindex gnus-treat-display-face
12539 @item gnus-treat-display-face (head)
12540
12541 @xref{Face}.
12542
12543 @vindex gnus-treat-emphasize
12544 @item gnus-treat-emphasize (t, head, integer)
12545 @vindex gnus-treat-fill-article
12546 @item gnus-treat-fill-article (t, integer)
12547 @vindex gnus-treat-fill-long-lines
12548 @item gnus-treat-fill-long-lines (t, integer)
12549 @vindex gnus-treat-hide-boring-headers
12550 @item gnus-treat-hide-boring-headers (head)
12551 @vindex gnus-treat-hide-citation
12552 @item gnus-treat-hide-citation (t, integer)
12553 @vindex gnus-treat-hide-citation-maybe
12554 @item gnus-treat-hide-citation-maybe (t, integer)
12555 @vindex gnus-treat-hide-headers
12556 @item gnus-treat-hide-headers (head)
12557 @vindex gnus-treat-hide-signature
12558 @item gnus-treat-hide-signature (t, last)
12559 @vindex gnus-treat-strip-banner
12560 @item gnus-treat-strip-banner (t, last)
12561 @vindex gnus-treat-strip-list-identifiers
12562 @item gnus-treat-strip-list-identifiers (head)
12563
12564 @xref{Article Hiding}.
12565
12566 @vindex gnus-treat-highlight-citation
12567 @item gnus-treat-highlight-citation (t, integer)
12568 @vindex gnus-treat-highlight-headers
12569 @item gnus-treat-highlight-headers (head)
12570 @vindex gnus-treat-highlight-signature
12571 @item gnus-treat-highlight-signature (t, last, integer)
12572
12573 @xref{Article Highlighting}.
12574
12575 @vindex gnus-treat-play-sounds
12576 @item gnus-treat-play-sounds
12577 @vindex gnus-treat-translate
12578 @item gnus-treat-translate
12579 @item gnus-treat-ansi-sequences (t)
12580 @vindex gnus-treat-x-pgp-sig
12581 @item gnus-treat-x-pgp-sig (head)
12582
12583 @vindex gnus-treat-unfold-headers
12584 @item gnus-treat-unfold-headers (head)
12585 @vindex gnus-treat-fold-headers
12586 @item gnus-treat-fold-headers (head)
12587 @vindex gnus-treat-fold-newsgroups
12588 @item gnus-treat-fold-newsgroups (head)
12589 @vindex gnus-treat-leading-whitespace
12590 @item gnus-treat-leading-whitespace (head)
12591
12592 @xref{Article Header}.
12593
12594
12595 @end table
12596
12597 @vindex gnus-part-display-hook
12598 You can, of course, write your own functions to be called from
12599 @code{gnus-part-display-hook}.  The functions are called narrowed to the
12600 part, and you can do anything you like, pretty much.  There is no
12601 information that you have to keep in the buffer---you can change
12602 everything.
12603
12604
12605 @node Article Keymap
12606 @section Article Keymap
12607
12608 Most of the keystrokes in the summary buffer can also be used in the
12609 article buffer.  They should behave as if you typed them in the summary
12610 buffer, which means that you don't actually have to have a summary
12611 buffer displayed while reading.  You can do it all from the article
12612 buffer.
12613
12614 @kindex v (Article)
12615 @cindex keys, reserved for users (Article)
12616 The key @kbd{v} is reserved for users.  You can bind it to some
12617 command or better use it as a prefix key.
12618
12619 A few additional keystrokes are available:
12620
12621 @table @kbd
12622
12623 @item SPACE
12624 @kindex SPACE (Article)
12625 @findex gnus-article-next-page
12626 Scroll forwards one page (@code{gnus-article-next-page}).
12627 This is exactly the same as @kbd{h SPACE h}.
12628
12629 @item DEL
12630 @kindex DEL (Article)
12631 @findex gnus-article-prev-page
12632 Scroll backwards one page (@code{gnus-article-prev-page}).
12633 This is exactly the same as @kbd{h DEL h}.
12634
12635 @item C-c ^
12636 @kindex C-c ^ (Article)
12637 @findex gnus-article-refer-article
12638 If point is in the neighborhood of a @code{Message-ID} and you press
12639 @kbd{C-c ^}, Gnus will try to get that article from the server
12640 (@code{gnus-article-refer-article}).
12641
12642 @item C-c C-m
12643 @kindex C-c C-m (Article)
12644 @findex gnus-article-mail
12645 Send a reply to the address near point (@code{gnus-article-mail}).  If
12646 given a prefix, include the mail.
12647
12648 @item s
12649 @kindex s (Article)
12650 @findex gnus-article-show-summary
12651 Reconfigure the buffers so that the summary buffer becomes visible
12652 (@code{gnus-article-show-summary}).
12653
12654 @item ?
12655 @kindex ? (Article)
12656 @findex gnus-article-describe-briefly
12657 Give a very brief description of the available keystrokes
12658 (@code{gnus-article-describe-briefly}).
12659
12660 @item TAB
12661 @kindex TAB (Article)
12662 @findex gnus-article-next-button
12663 Go to the next button, if any (@code{gnus-article-next-button}).  This
12664 only makes sense if you have buttonizing turned on.
12665
12666 @item M-TAB
12667 @kindex M-TAB (Article)
12668 @findex gnus-article-prev-button
12669 Go to the previous button, if any (@code{gnus-article-prev-button}).
12670
12671 @item R
12672 @kindex R (Article)
12673 @findex gnus-article-reply-with-original
12674 Send a reply to the current article and yank the current article
12675 (@code{gnus-article-reply-with-original}).  If the region is active,
12676 only yank the text in the region.
12677
12678 @item S W
12679 @kindex S W (Article)
12680 @findex gnus-article-wide-reply-with-original
12681 Send a wide reply to the current article and yank the current article
12682 (@code{gnus-article-wide-reply-with-original}).  If the region is
12683 active, only yank the text in the region.
12684
12685 @item F
12686 @kindex F (Article)
12687 @findex gnus-article-followup-with-original
12688 Send a followup to the current article and yank the current article
12689 (@code{gnus-article-followup-with-original}).  If the region is active,
12690 only yank the text in the region.
12691
12692
12693 @end table
12694
12695
12696 @node Misc Article
12697 @section Misc Article
12698
12699 @table @code
12700
12701 @item gnus-single-article-buffer
12702 @vindex gnus-single-article-buffer
12703 @cindex article buffers, several
12704 If non-@code{nil}, use the same article buffer for all the groups.
12705 (This is the default.)  If @code{nil}, each group will have its own
12706 article buffer.
12707
12708 @vindex gnus-article-decode-hook
12709 @item gnus-article-decode-hook
12710 @cindex @acronym{MIME}
12711 Hook used to decode @acronym{MIME} articles.  The default value is
12712 @code{(article-decode-charset article-decode-encoded-words)}
12713
12714 @vindex gnus-article-prepare-hook
12715 @item gnus-article-prepare-hook
12716 This hook is called right after the article has been inserted into the
12717 article buffer.  It is mainly intended for functions that do something
12718 depending on the contents; it should probably not be used for changing
12719 the contents of the article buffer.
12720
12721 @item gnus-article-mode-hook
12722 @vindex gnus-article-mode-hook
12723 Hook called in article mode buffers.
12724
12725 @item gnus-article-mode-syntax-table
12726 @vindex gnus-article-mode-syntax-table
12727 Syntax table used in article buffers.  It is initialized from
12728 @code{text-mode-syntax-table}.
12729
12730 @vindex gnus-article-over-scroll
12731 @item gnus-article-over-scroll
12732 If non-@code{nil}, allow scrolling the article buffer even when there
12733 no more new text to scroll in.  The default is @code{nil}.
12734
12735 @vindex gnus-article-mode-line-format
12736 @item gnus-article-mode-line-format
12737 This variable is a format string along the same lines as
12738 @code{gnus-summary-mode-line-format} (@pxref{Summary Buffer Mode
12739 Line}).  It accepts the same format specifications as that variable,
12740 with two extensions:
12741
12742 @table @samp
12743
12744 @item w
12745 The @dfn{wash status} of the article.  This is a short string with one
12746 character for each possible article wash operation that may have been
12747 performed.  The characters and their meaning:
12748
12749 @table @samp
12750
12751 @item c
12752 Displayed when cited text may be hidden in the article buffer.
12753
12754 @item h
12755 Displayed when headers are hidden in the article buffer.
12756
12757 @item p
12758 Displayed when article is digitally signed or encrypted, and Gnus has
12759 hidden the security headers.  (N.B. does not tell anything about
12760 security status, i.e. good or bad signature.)
12761
12762 @item s
12763 Displayed when the signature has been hidden in the Article buffer.
12764
12765 @item o
12766 Displayed when Gnus has treated overstrike characters in the article buffer.
12767
12768 @item e
12769 Displayed when Gnus has treated emphasised strings in the article buffer.
12770
12771 @end table
12772
12773 @item m
12774 The number of @acronym{MIME} parts in the article.
12775
12776 @end table
12777
12778 @vindex gnus-break-pages
12779
12780 @item gnus-break-pages
12781 Controls whether @dfn{page breaking} is to take place.  If this variable
12782 is non-@code{nil}, the articles will be divided into pages whenever a
12783 page delimiter appears in the article.  If this variable is @code{nil},
12784 paging will not be done.
12785
12786 @item gnus-page-delimiter
12787 @vindex gnus-page-delimiter
12788 This is the delimiter mentioned above.  By default, it is @samp{^L}
12789 (formfeed).
12790
12791 @cindex IDNA
12792 @cindex internationalized domain names
12793 @vindex gnus-use-idna
12794 @item gnus-use-idna
12795 This variable controls whether Gnus performs IDNA decoding of
12796 internationalized domain names inside @samp{From}, @samp{To} and
12797 @samp{Cc} headers.  @xref{IDNA, ,IDNA,message, The Message Manual},
12798 for how to compose such messages.  This requires
12799 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
12800 variable is only enabled if you have installed it.
12801
12802 @end table
12803
12804
12805 @node Composing Messages
12806 @chapter Composing Messages
12807 @cindex composing messages
12808 @cindex messages
12809 @cindex mail
12810 @cindex sending mail
12811 @cindex reply
12812 @cindex followup
12813 @cindex post
12814 @cindex using gpg
12815 @cindex using s/mime
12816 @cindex using smime
12817
12818 @kindex C-c C-c (Post)
12819 All commands for posting and mailing will put you in a message buffer
12820 where you can edit the article all you like, before you send the
12821 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
12822 Message Manual}.  Where the message will be posted/mailed to depends
12823 on your setup (@pxref{Posting Server}).
12824
12825 @menu
12826 * Mail::                        Mailing and replying.
12827 * Posting Server::              What server should you post and mail via?
12828 * POP before SMTP::             You cannot send a mail unless you read a mail.
12829 * Mail and Post::               Mailing and posting at the same time.
12830 * Archived Messages::           Where Gnus stores the messages you've sent.
12831 * Posting Styles::              An easier way to specify who you are.
12832 * Drafts::                      Postponing messages and rejected messages.
12833 * Rejected Articles::           What happens if the server doesn't like your article?
12834 * Signing and encrypting::      How to compose secure messages.
12835 @end menu
12836
12837 Also @pxref{Canceling and Superseding} for information on how to
12838 remove articles you shouldn't have posted.
12839
12840
12841 @node Mail
12842 @section Mail
12843
12844 Variables for customizing outgoing mail:
12845
12846 @table @code
12847 @item gnus-uu-digest-headers
12848 @vindex gnus-uu-digest-headers
12849 List of regexps to match headers included in digested messages.  The
12850 headers will be included in the sequence they are matched.  If
12851 @code{nil} include all headers.
12852
12853 @item gnus-add-to-list
12854 @vindex gnus-add-to-list
12855 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
12856 that have none when you do a @kbd{a}.
12857
12858 @item gnus-confirm-mail-reply-to-news
12859 @vindex gnus-confirm-mail-reply-to-news
12860 If non-@code{nil}, Gnus will ask you for a confirmation when you are
12861 about to reply to news articles by mail.  If it is @code{nil}, nothing
12862 interferes in what you want to do.  This can also be a function
12863 receiving the group name as the only parameter which should return
12864 non-@code{nil} if a confirmation is needed, or a regular expression
12865 matching group names, where confirmation should be asked for.
12866
12867 If you find yourself never wanting to reply to mail, but occasionally
12868 press @kbd{R} anyway, this variable might be for you.
12869
12870 @item gnus-confirm-treat-mail-like-news
12871 @vindex gnus-confirm-treat-mail-like-news
12872 If non-@code{nil}, Gnus also requests confirmation according to
12873 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
12874 useful for treating mailing lists like newsgroups.
12875
12876 @end table
12877
12878
12879 @node Posting Server
12880 @section Posting Server
12881
12882 When you press those magical @kbd{C-c C-c} keys to ship off your latest
12883 (extremely intelligent, of course) article, where does it go?
12884
12885 Thank you for asking.  I hate you.
12886
12887 It can be quite complicated.
12888
12889 @vindex gnus-post-method
12890 When posting news, Message usually invokes @code{message-send-news}
12891 (@pxref{News Variables, , News Variables, message, Message Manual}).
12892 Normally, Gnus will post using the same select method as you're
12893 reading from (which might be convenient if you're reading lots of
12894 groups from different private servers).  However.  If the server
12895 you're reading from doesn't allow posting, just reading, you probably
12896 want to use some other server to post your (extremely intelligent and
12897 fabulously interesting) articles.  You can then set the
12898 @code{gnus-post-method} to some other method:
12899
12900 @lisp
12901 (setq gnus-post-method '(nnspool ""))
12902 @end lisp
12903
12904 Now, if you've done this, and then this server rejects your article, or
12905 this server is down, what do you do then?  To override this variable you
12906 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
12907 the ``current'' server, to get back the default behavior, for posting.
12908
12909 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
12910 Gnus will prompt you for what method to use for posting.
12911
12912 You can also set @code{gnus-post-method} to a list of select methods.
12913 If that's the case, Gnus will always prompt you for what method to use
12914 for posting.
12915
12916 Finally, if you want to always post using the native select method,
12917 you can set this variable to @code{native}.
12918
12919 @vindex message-send-mail-function
12920 When sending mail, Message invokes the function specified by the
12921 variable @code{message-send-mail-function}.  Gnus tries to set it to a
12922 value suitable for your system.
12923 @xref{Mail Variables, ,Mail Variables,message,Message manual}, for more
12924 information.
12925
12926 @node POP before SMTP
12927 @section POP before SMTP
12928 @cindex pop before smtp
12929 @findex message-smtpmail-send-it
12930 @findex mail-source-touch-pop
12931
12932 Does your @acronym{ISP} require the @acronym{POP}-before-@acronym{SMTP}
12933 authentication?  It is whether you need to connect to the @acronym{POP}
12934 mail server within a certain time before sending mails.  If so, there is
12935 a convenient way.  To do that, put the following lines in your
12936 @file{~/.gnus.el} file:
12937
12938 @lisp
12939 (setq message-send-mail-function 'message-smtpmail-send-it)
12940 (add-hook 'message-send-mail-hook 'mail-source-touch-pop)
12941 @end lisp
12942
12943 @noindent
12944 It means to let Gnus connect to the @acronym{POP} mail server in advance
12945 whenever you send a mail.  The @code{mail-source-touch-pop} function
12946 does only a @acronym{POP} authentication according to the value of
12947 @code{mail-sources} without fetching mails, just before sending a mail.
12948 Note that you have to use @code{message-smtpmail-send-it} which runs
12949 @code{message-send-mail-hook} rather than @code{smtpmail-send-it} and
12950 set the value of @code{mail-sources} for a @acronym{POP} connection
12951 correctly.  @xref{Mail Sources}.
12952
12953 If you have two or more @acronym{POP} mail servers set in
12954 @code{mail-sources}, you may want to specify one of them to
12955 @code{mail-source-primary-source} as the @acronym{POP} mail server to be
12956 used for the @acronym{POP}-before-@acronym{SMTP} authentication.  If it
12957 is your primary @acronym{POP} mail server (i.e., you are fetching mails
12958 mainly from that server), you can set it permanently as follows:
12959
12960 @lisp
12961 (setq mail-source-primary-source
12962       '(pop :server "pop3.mail.server"
12963             :password "secret"))
12964 @end lisp
12965
12966 @noindent
12967 Otherwise, bind it dynamically only when performing the
12968 @acronym{POP}-before-@acronym{SMTP} authentication as follows:
12969
12970 @lisp
12971 (add-hook 'message-send-mail-hook
12972           (lambda ()
12973             (let ((mail-source-primary-source
12974                    '(pop :server "pop3.mail.server"
12975                          :password "secret")))
12976               (mail-source-touch-pop))))
12977 @end lisp
12978
12979 @node Mail and Post
12980 @section Mail and Post
12981
12982 Here's a list of variables relevant to both mailing and
12983 posting:
12984
12985 @table @code
12986 @item gnus-mailing-list-groups
12987 @findex gnus-mailing-list-groups
12988 @cindex mailing lists
12989
12990 If your news server offers groups that are really mailing lists
12991 gatewayed to the @acronym{NNTP} server, you can read those groups without
12992 problems, but you can't post/followup to them without some difficulty.
12993 One solution is to add a @code{to-address} to the group parameters
12994 (@pxref{Group Parameters}).  An easier thing to do is set the
12995 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
12996 really are mailing lists.  Then, at least, followups to the mailing
12997 lists will work most of the time.  Posting to these groups (@kbd{a}) is
12998 still a pain, though.
12999
13000 @item gnus-user-agent
13001 @vindex gnus-user-agent
13002 @cindex User-Agent
13003
13004 This variable controls which information should be exposed in the
13005 User-Agent header.  It can be a list of symbols or a string.  Valid
13006 symbols are @code{gnus} (show Gnus version) and @code{emacs} (show Emacs
13007 version).  In addition to the Emacs version, you can add @code{codename}
13008 (show (S)XEmacs codename) or either @code{config} (show system
13009 configuration) or @code{type} (show system type).  If you set it to a
13010 string, be sure to use a valid format, see RFC 2616.
13011
13012 @end table
13013
13014 You may want to do spell-checking on messages that you send out.  Or, if
13015 you don't want to spell-check by hand, you could add automatic
13016 spell-checking via the @code{ispell} package:
13017
13018 @cindex ispell
13019 @findex ispell-message
13020 @lisp
13021 (add-hook 'message-send-hook 'ispell-message)
13022 @end lisp
13023
13024 If you want to change the @code{ispell} dictionary based on what group
13025 you're in, you could say something like the following:
13026
13027 @lisp
13028 (add-hook 'gnus-select-group-hook
13029           (lambda ()
13030             (cond
13031              ((string-match
13032                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
13033               (ispell-change-dictionary "deutsch"))
13034              (t
13035               (ispell-change-dictionary "english")))))
13036 @end lisp
13037
13038 Modify to suit your needs.
13039
13040 @vindex gnus-message-highlight-citation
13041 If @code{gnus-message-highlight-citation} is t, different levels of
13042 citations are highlighted like in Gnus article buffers also in message
13043 mode buffers.
13044
13045 @node Archived Messages
13046 @section Archived Messages
13047 @cindex archived messages
13048 @cindex sent messages
13049
13050 Gnus provides a few different methods for storing the mail and news you
13051 send.  The default method is to use the @dfn{archive virtual server} to
13052 store the messages.  If you want to disable this completely, the
13053 @code{gnus-message-archive-group} variable should be @code{nil}, which
13054 is the default.
13055
13056 For archiving interesting messages in a group you read, see the
13057 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
13058 Group Commands}).
13059
13060 @vindex gnus-message-archive-method
13061 @code{gnus-message-archive-method} says what virtual server Gnus is to
13062 use to store sent messages.  The default is @code{"archive"}, and when
13063 actually being used it is expanded into:
13064
13065 @lisp
13066 (nnfolder "archive"
13067           (nnfolder-directory   "~/Mail/archive")
13068           (nnfolder-active-file "~/Mail/archive/active")
13069           (nnfolder-get-new-mail nil)
13070           (nnfolder-inhibit-expiry t))
13071 @end lisp
13072
13073 @quotation
13074 @vindex gnus-update-message-archive-method
13075 Note: a server like this is saved in the @file{~/.newsrc.eld} file first
13076 so that it may be used as a real method of the server which is named
13077 @code{"archive"} (that is, for the case where
13078 @code{gnus-message-archive-method} is set to @code{"archive"}) ever
13079 since.  If it once has been saved, it will never be updated by default
13080 even if you change the value of @code{gnus-message-archive-method}
13081 afterward.  Therefore, the server @code{"archive"} doesn't necessarily
13082 mean the @code{nnfolder} server like this at all times.  If you want the
13083 saved method to reflect always the value of
13084 @code{gnus-message-archive-method}, set the
13085 @code{gnus-update-message-archive-method} variable to a non-@code{nil}
13086 value.  The default value of this variable is @code{nil}.
13087 @end quotation
13088
13089 You can, however, use any mail select method (@code{nnml},
13090 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
13091 for doing this sort of thing, though.  If you don't like the default
13092 directory chosen, you could say something like:
13093
13094 @lisp
13095 (setq gnus-message-archive-method
13096       '(nnfolder "archive"
13097                  (nnfolder-inhibit-expiry t)
13098                  (nnfolder-active-file "~/News/sent-mail/active")
13099                  (nnfolder-directory "~/News/sent-mail/")))
13100 @end lisp
13101
13102 @vindex gnus-message-archive-group
13103 @cindex Gcc
13104 Gnus will insert @code{Gcc} headers in all outgoing messages that point
13105 to one or more group(s) on that server.  Which group to use is
13106 determined by the @code{gnus-message-archive-group} variable.
13107
13108 This variable can be used to do the following:
13109
13110 @table @asis
13111 @item a string
13112 Messages will be saved in that group.
13113
13114 Note that you can include a select method in the group name, then the
13115 message will not be stored in the select method given by
13116 @code{gnus-message-archive-method}, but in the select method specified
13117 by the group name, instead.  Suppose @code{gnus-message-archive-method}
13118 has the default value shown above.  Then setting
13119 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
13120 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
13121 value @code{"nnml:foo"}, then outgoing messages will be stored in
13122 @samp{nnml:foo}.
13123
13124 @item a list of strings
13125 Messages will be saved in all those groups.
13126
13127 @item an alist of regexps, functions and forms
13128 When a key ``matches'', the result is used.
13129
13130 @item @code{nil}
13131 No message archiving will take place.  This is the default.
13132 @end table
13133
13134 Let's illustrate:
13135
13136 Just saving to a single group called @samp{MisK}:
13137 @lisp
13138 (setq gnus-message-archive-group "MisK")
13139 @end lisp
13140
13141 Saving to two groups, @samp{MisK} and @samp{safe}:
13142 @lisp
13143 (setq gnus-message-archive-group '("MisK" "safe"))
13144 @end lisp
13145
13146 Save to different groups based on what group you are in:
13147 @lisp
13148 (setq gnus-message-archive-group
13149       '(("^alt" "sent-to-alt")
13150         ("mail" "sent-to-mail")
13151         (".*" "sent-to-misc")))
13152 @end lisp
13153
13154 More complex stuff:
13155 @lisp
13156 (setq gnus-message-archive-group
13157       '((if (message-news-p)
13158             "misc-news"
13159           "misc-mail")))
13160 @end lisp
13161
13162 How about storing all news messages in one file, but storing all mail
13163 messages in one file per month:
13164
13165 @lisp
13166 (setq gnus-message-archive-group
13167       '((if (message-news-p)
13168             "misc-news"
13169           (concat "mail." (format-time-string "%Y-%m")))))
13170 @end lisp
13171
13172 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
13173 @c use a different value for @code{gnus-message-archive-group} there.)
13174
13175 Now, when you send a message off, it will be stored in the appropriate
13176 group.  (If you want to disable storing for just one particular message,
13177 you can just remove the @code{Gcc} header that has been inserted.)  The
13178 archive group will appear in the group buffer the next time you start
13179 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
13180 enter it and read the articles in it just like you'd read any other
13181 group.  If the group gets really big and annoying, you can simply rename
13182 if (using @kbd{G r} in the group buffer) to something
13183 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
13184 continue to be stored in the old (now empty) group.
13185
13186 That's the default method of archiving sent messages.  Gnus offers a
13187 different way for the people who don't like the default method.  In that
13188 case you should set @code{gnus-message-archive-group} to @code{nil};
13189 this will disable archiving.
13190
13191 @table @code
13192 @item gnus-outgoing-message-group
13193 @vindex gnus-outgoing-message-group
13194 All outgoing messages will be put in this group.  If you want to store
13195 all your outgoing mail and articles in the group @samp{nnml:archive},
13196 you set this variable to that value.  This variable can also be a list of
13197 group names.
13198
13199 If you want to have greater control over what group to put each
13200 message in, you can set this variable to a function that checks the
13201 current newsgroup name and then returns a suitable group name (or list
13202 of names).
13203
13204 This variable can be used instead of @code{gnus-message-archive-group},
13205 but the latter is the preferred method.
13206
13207 @item gnus-gcc-mark-as-read
13208 @vindex gnus-gcc-mark-as-read
13209 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
13210
13211 @item gnus-gcc-externalize-attachments
13212 @vindex gnus-gcc-externalize-attachments
13213 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
13214 and matches the Gcc group name, attach files as external parts; if it is
13215 @code{all}, attach local files as external parts; if it is other
13216 non-@code{nil}, the behavior is the same as @code{all}, but it may be
13217 changed in the future.
13218
13219 @end table
13220
13221
13222 @node Posting Styles
13223 @section Posting Styles
13224 @cindex posting styles
13225 @cindex styles
13226
13227 All them variables, they make my head swim.
13228
13229 So what if you want a different @code{Organization} and signature based
13230 on what groups you post to?  And you post both from your home machine
13231 and your work machine, and you want different @code{From} lines, and so
13232 on?
13233
13234 @vindex gnus-posting-styles
13235 One way to do stuff like that is to write clever hooks that change the
13236 variables you need to have changed.  That's a bit boring, so somebody
13237 came up with the bright idea of letting the user specify these things in
13238 a handy alist.  Here's an example of a @code{gnus-posting-styles}
13239 variable:
13240
13241 @lisp
13242 ((".*"
13243   (signature "Peace and happiness")
13244   (organization "What me?"))
13245  ("^comp"
13246   (signature "Death to everybody"))
13247  ("comp.emacs.i-love-it"
13248   (organization "Emacs is it")))
13249 @end lisp
13250
13251 As you might surmise from this example, this alist consists of several
13252 @dfn{styles}.  Each style will be applicable if the first element
13253 ``matches'', in some form or other.  The entire alist will be iterated
13254 over, from the beginning towards the end, and each match will be
13255 applied, which means that attributes in later styles that match override
13256 the same attributes in earlier matching styles.  So
13257 @samp{comp.programming.literate} will have the @samp{Death to everybody}
13258 signature and the @samp{What me?} @code{Organization} header.
13259
13260 The first element in each style is called the @code{match}.  If it's a
13261 string, then Gnus will try to regexp match it against the group name.
13262 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
13263 will look in the original article for a header whose name is
13264 @var{match} and compare that @var{regexp}.  @var{match} and
13265 @var{regexp} are strings.  (The original article is the one you are
13266 replying or following up to.  If you are not composing a reply or a
13267 followup, then there is nothing to match against.)  If the
13268 @code{match} is a function symbol, that function will be called with
13269 no arguments.  If it's a variable symbol, then the variable will be
13270 referenced.  If it's a list, then that list will be @code{eval}ed.  In
13271 any case, if this returns a non-@code{nil} value, then the style is
13272 said to @dfn{match}.
13273
13274 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
13275 attribute consists of a @code{(@var{name} @var{value})} pair.  In
13276 addition, you can also use the @code{(@var{name} :file @var{value})}
13277 form or the @code{(@var{name} :value @var{value})} form.  Where
13278 @code{:file} signifies @var{value} represents a file name and its
13279 contents should be used as the attribute value, @code{:value} signifies
13280 @var{value} does not represent a file name explicitly.  The attribute
13281 name can be one of:
13282
13283 @itemize @bullet
13284 @item @code{signature}
13285 @item @code{signature-file}
13286 @item @code{x-face-file}
13287 @item @code{address}, overriding @code{user-mail-address}
13288 @item @code{name}, overriding @code{(user-full-name)}
13289 @item @code{body}
13290 @end itemize
13291
13292 Note that the @code{signature-file} attribute honors the variable
13293 @code{message-signature-directory}.
13294
13295 The attribute name can also be a string or a symbol.  In that case,
13296 this will be used as a header name, and the value will be inserted in
13297 the headers of the article; if the value is @code{nil}, the header
13298 name will be removed.  If the attribute name is @code{eval}, the form
13299 is evaluated, and the result is thrown away.
13300
13301 The attribute value can be a string (used verbatim), a function with
13302 zero arguments (the return value will be used), a variable (its value
13303 will be used) or a list (it will be @code{eval}ed and the return value
13304 will be used).  The functions and sexps are called/@code{eval}ed in the
13305 message buffer that is being set up.  The headers of the current article
13306 are available through the @code{message-reply-headers} variable, which
13307 is a vector of the following headers: number subject from date id
13308 references chars lines xref extra.
13309
13310 @vindex message-reply-headers
13311
13312 If you wish to check whether the message you are about to compose is
13313 meant to be a news article or a mail message, you can check the values
13314 of the @code{message-news-p} and @code{message-mail-p} functions.
13315
13316 @findex message-mail-p
13317 @findex message-news-p
13318
13319 So here's a new example:
13320
13321 @lisp
13322 (setq gnus-posting-styles
13323       '((".*"
13324          (signature-file "~/.signature")
13325          (name "User Name")
13326          (x-face-file "~/.xface")
13327          (x-url (getenv "WWW_HOME"))
13328          (organization "People's Front Against MWM"))
13329         ("^rec.humor"
13330          (signature my-funny-signature-randomizer))
13331         ((equal (system-name) "gnarly")  ;; @r{A form}
13332          (signature my-quote-randomizer))
13333         (message-news-p        ;; @r{A function symbol}
13334          (signature my-news-signature))
13335         (window-system         ;; @r{A value symbol}
13336          ("X-Window-System" (format "%s" window-system)))
13337         ;; @r{If I'm replying to Larsi, set the Organization header.}
13338         ((header "from" "larsi.*org")
13339          (Organization "Somewhere, Inc."))
13340         ((posting-from-work-p) ;; @r{A user defined function}
13341          (signature-file "~/.work-signature")
13342          (address "user@@bar.foo")
13343          (body "You are fired.\n\nSincerely, your boss.")
13344          (organization "Important Work, Inc"))
13345         ("nnml:.*"
13346          (From (save-excursion
13347                  (set-buffer gnus-article-buffer)
13348                  (message-fetch-field "to"))))
13349         ("^nn.+:"
13350          (signature-file "~/.mail-signature"))))
13351 @end lisp
13352
13353 The @samp{nnml:.*} rule means that you use the @code{To} address as the
13354 @code{From} address in all your outgoing replies, which might be handy
13355 if you fill many roles.
13356 You may also use @code{message-alternative-emails} instead.
13357 @xref{Message Headers, ,Message Headers, message, Message Manual}.
13358
13359 @node Drafts
13360 @section Drafts
13361 @cindex drafts
13362
13363 If you are writing a message (mail or news) and suddenly remember that
13364 you have a steak in the oven (or some pesto in the food processor, you
13365 craaazy vegetarians), you'll probably wish there was a method to save
13366 the message you are writing so that you can continue editing it some
13367 other day, and send it when you feel its finished.
13368
13369 Well, don't worry about it.  Whenever you start composing a message of
13370 some sort using the Gnus mail and post commands, the buffer you get will
13371 automatically associate to an article in a special @dfn{draft} group.
13372 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
13373 article will be saved there.  (Auto-save files also go to the draft
13374 group.)
13375
13376 @cindex nndraft
13377 @vindex nndraft-directory
13378 The draft group is a special group (which is implemented as an
13379 @code{nndraft} group, if you absolutely have to know) called
13380 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
13381 @code{nndraft} is to store its files.  What makes this group special is
13382 that you can't tick any articles in it or mark any articles as
13383 read---all articles in the group are permanently unread.
13384
13385 If the group doesn't exist, it will be created and you'll be subscribed
13386 to it.  The only way to make it disappear from the Group buffer is to
13387 unsubscribe it.  The special properties of the draft group comes from
13388 a group property (@pxref{Group Parameters}), and if lost the group
13389 behaves like any other group.  This means the commands below will not
13390 be available.  To restore the special properties of the group, the
13391 simplest way is to kill the group, using @kbd{C-k}, and restart
13392 Gnus.  The group is automatically created again with the
13393 correct parameters.  The content of the group is not lost.
13394
13395 @c @findex gnus-dissociate-buffer-from-draft
13396 @c @kindex C-c M-d (Mail)
13397 @c @kindex C-c M-d (Post)
13398 @c @findex gnus-associate-buffer-with-draft
13399 @c @kindex C-c C-d (Mail)
13400 @c @kindex C-c C-d (Post)
13401 @c If you're writing some super-secret message that you later want to
13402 @c encode with PGP before sending, you may wish to turn the auto-saving
13403 @c (and association with the draft group) off.  You never know who might be
13404 @c interested in reading all your extremely valuable and terribly horrible
13405 @c and interesting secrets.  The @kbd{C-c M-d}
13406 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
13407 @c If you change your mind and want to turn the auto-saving back on again,
13408 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
13409 @c
13410 @c @vindex gnus-use-draft
13411 @c To leave association with the draft group off by default, set
13412 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
13413
13414 @findex gnus-draft-edit-message
13415 @kindex D e (Draft)
13416 When you want to continue editing the article, you simply enter the
13417 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
13418 that.  You will be placed in a buffer where you left off.
13419
13420 Rejected articles will also be put in this draft group (@pxref{Rejected
13421 Articles}).
13422
13423 @findex gnus-draft-send-all-messages
13424 @kindex D s (Draft)
13425 @findex gnus-draft-send-message
13426 @kindex D S (Draft)
13427 If you have lots of rejected messages you want to post (or mail) without
13428 doing further editing, you can use the @kbd{D s} command
13429 (@code{gnus-draft-send-message}).  This command understands the
13430 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
13431 command (@code{gnus-draft-send-all-messages}) will ship off all messages
13432 in the buffer.
13433
13434 @findex gnus-draft-toggle-sending
13435 @kindex D t (Draft)
13436 If you have some messages that you wish not to send, you can use the
13437 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
13438 as unsendable.  This is a toggling command.
13439
13440
13441 @node Rejected Articles
13442 @section Rejected Articles
13443 @cindex rejected articles
13444
13445 Sometimes a news server will reject an article.  Perhaps the server
13446 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
13447 @emph{there be demons}.  Perhaps you have included too much cited text.
13448 Perhaps the disk is full.  Perhaps the server is down.
13449
13450 These situations are, of course, totally beyond the control of Gnus.
13451 (Gnus, of course, loves the way you look, always feels great, has angels
13452 fluttering around inside of it, doesn't care about how much cited text
13453 you include, never runs full and never goes down.)  So Gnus saves these
13454 articles until some later time when the server feels better.
13455
13456 The rejected articles will automatically be put in a special draft group
13457 (@pxref{Drafts}).  When the server comes back up again, you'd then
13458 typically enter that group and send all the articles off.
13459
13460 @node Signing and encrypting
13461 @section Signing and encrypting
13462 @cindex using gpg
13463 @cindex using s/mime
13464 @cindex using smime
13465
13466 Gnus can digitally sign and encrypt your messages, using vanilla
13467 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
13468 decoding such messages, see the @code{mm-verify-option} and
13469 @code{mm-decrypt-option} options (@pxref{Security}).
13470
13471 @vindex gnus-message-replysign
13472 @vindex gnus-message-replyencrypt
13473 @vindex gnus-message-replysignencrypted
13474 Often, you would like to sign replies to people who send you signed
13475 messages.  Even more often, you might want to encrypt messages which
13476 are in reply to encrypted messages.  Gnus offers
13477 @code{gnus-message-replysign} to enable the former, and
13478 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
13479 @code{gnus-message-replysignencrypted} (on by default) will sign
13480 automatically encrypted messages.
13481
13482 Instructing @acronym{MML} to perform security operations on a
13483 @acronym{MIME} part is done using the @kbd{C-c C-m s} key map for
13484 signing and the @kbd{C-c C-m c} key map for encryption, as follows.
13485
13486 @table @kbd
13487
13488 @item C-c C-m s s
13489 @kindex C-c C-m s s (Message)
13490 @findex mml-secure-message-sign-smime
13491
13492 Digitally sign current message using @acronym{S/MIME}.
13493
13494 @item C-c C-m s o
13495 @kindex C-c C-m s o (Message)
13496 @findex mml-secure-message-sign-pgp
13497
13498 Digitally sign current message using @acronym{PGP}.
13499
13500 @item C-c C-m s p
13501 @kindex C-c C-m s p (Message)
13502 @findex mml-secure-message-sign-pgp
13503
13504 Digitally sign current message using @acronym{PGP/MIME}.
13505
13506 @item C-c C-m c s
13507 @kindex C-c C-m c s (Message)
13508 @findex mml-secure-message-encrypt-smime
13509
13510 Digitally encrypt current message using @acronym{S/MIME}.
13511
13512 @item C-c C-m c o
13513 @kindex C-c C-m c o (Message)
13514 @findex mml-secure-message-encrypt-pgp
13515
13516 Digitally encrypt current message using @acronym{PGP}.
13517
13518 @item C-c C-m c p
13519 @kindex C-c C-m c p (Message)
13520 @findex mml-secure-message-encrypt-pgpmime
13521
13522 Digitally encrypt current message using @acronym{PGP/MIME}.
13523
13524 @item C-c C-m C-n
13525 @kindex C-c C-m C-n (Message)
13526 @findex mml-unsecure-message
13527 Remove security related @acronym{MML} tags from message.
13528
13529 @end table
13530
13531 @xref{Security, ,Security, message, Message Manual}, for more information.
13532
13533 @node Select Methods
13534 @chapter Select Methods
13535 @cindex foreign groups
13536 @cindex select methods
13537
13538 A @dfn{foreign group} is a group not read by the usual (or
13539 default) means.  It could be, for instance, a group from a different
13540 @acronym{NNTP} server, it could be a virtual group, or it could be your own
13541 personal mail group.
13542
13543 A foreign group (or any group, really) is specified by a @dfn{name} and
13544 a @dfn{select method}.  To take the latter first, a select method is a
13545 list where the first element says what back end to use (e.g. @code{nntp},
13546 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
13547 name}.  There may be additional elements in the select method, where the
13548 value may have special meaning for the back end in question.
13549
13550 One could say that a select method defines a @dfn{virtual server}---so
13551 we do just that (@pxref{Server Buffer}).
13552
13553 The @dfn{name} of the group is the name the back end will recognize the
13554 group as.
13555
13556 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
13557 @samp{some.where.edu} will have the name @samp{soc.motss} and select
13558 method @code{(nntp "some.where.edu")}.  Gnus will call this group
13559 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
13560 back end just knows this group as @samp{soc.motss}.
13561
13562 The different methods all have their peculiarities, of course.
13563
13564 @menu
13565 * Server Buffer::               Making and editing virtual servers.
13566 * Getting News::                Reading USENET news with Gnus.
13567 * Getting Mail::                Reading your personal mail with Gnus.
13568 * Browsing the Web::            Getting messages from a plethora of Web sources.
13569 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
13570 * Other Sources::               Reading directories, files, SOUP packets.
13571 * Combined Groups::             Combining groups into one group.
13572 * Email Based Diary::           Using mails to manage diary events in Gnus.
13573 * Gnus Unplugged::              Reading news and mail offline.
13574 @end menu
13575
13576
13577 @node Server Buffer
13578 @section Server Buffer
13579
13580 Traditionally, a @dfn{server} is a machine or a piece of software that
13581 one connects to, and then requests information from.  Gnus does not
13582 connect directly to any real servers, but does all transactions through
13583 one back end or other.  But that's just putting one layer more between
13584 the actual media and Gnus, so we might just as well say that each
13585 back end represents a virtual server.
13586
13587 For instance, the @code{nntp} back end may be used to connect to several
13588 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
13589 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
13590 use, and what parameters to set by specifying a @dfn{select method}.
13591
13592 These select method specifications can sometimes become quite
13593 complicated---say, for instance, that you want to read from the
13594 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
13595 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
13596 Anyway, if you had to specify that for each group that used this
13597 server, that would be too much work, so Gnus offers a way of naming
13598 select methods, which is what you do in the server buffer.
13599
13600 To enter the server buffer, use the @kbd{^}
13601 (@code{gnus-group-enter-server-mode}) command in the group buffer.
13602
13603 @menu
13604 * Server Buffer Format::        You can customize the look of this buffer.
13605 * Server Commands::             Commands to manipulate servers.
13606 * Example Methods::             Examples server specifications.
13607 * Creating a Virtual Server::   An example session.
13608 * Server Variables::            Which variables to set.
13609 * Servers and Methods::         You can use server names as select methods.
13610 * Unavailable Servers::         Some servers you try to contact may be down.
13611 @end menu
13612
13613 @vindex gnus-server-mode-hook
13614 @code{gnus-server-mode-hook} is run when creating the server buffer.
13615
13616
13617 @node Server Buffer Format
13618 @subsection Server Buffer Format
13619 @cindex server buffer format
13620
13621 @vindex gnus-server-line-format
13622 You can change the look of the server buffer lines by changing the
13623 @code{gnus-server-line-format} variable.  This is a @code{format}-like
13624 variable, with some simple extensions:
13625
13626 @table @samp
13627
13628 @item h
13629 How the news is fetched---the back end name.
13630
13631 @item n
13632 The name of this server.
13633
13634 @item w
13635 Where the news is to be fetched from---the address.
13636
13637 @item s
13638 The opened/closed/denied status of the server.
13639
13640 @item a
13641 Whether this server is agentized.
13642 @end table
13643
13644 @vindex gnus-server-mode-line-format
13645 The mode line can also be customized by using the
13646 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
13647 Formatting}).  The following specs are understood:
13648
13649 @table @samp
13650 @item S
13651 Server name.
13652
13653 @item M
13654 Server method.
13655 @end table
13656
13657 Also @pxref{Formatting Variables}.
13658
13659
13660 @node Server Commands
13661 @subsection Server Commands
13662 @cindex server commands
13663
13664 @table @kbd
13665
13666 @item v
13667 @kindex v (Server)
13668 @cindex keys, reserved for users (Server)
13669 The key @kbd{v} is reserved for users.  You can bind it to some
13670 command or better use it as a prefix key.
13671
13672 @item a
13673 @kindex a (Server)
13674 @findex gnus-server-add-server
13675 Add a new server (@code{gnus-server-add-server}).
13676
13677 @item e
13678 @kindex e (Server)
13679 @findex gnus-server-edit-server
13680 Edit a server (@code{gnus-server-edit-server}).
13681
13682 @item SPACE
13683 @kindex SPACE (Server)
13684 @findex gnus-server-read-server
13685 Browse the current server (@code{gnus-server-read-server}).
13686
13687 @item q
13688 @kindex q (Server)
13689 @findex gnus-server-exit
13690 Return to the group buffer (@code{gnus-server-exit}).
13691
13692 @item k
13693 @kindex k (Server)
13694 @findex gnus-server-kill-server
13695 Kill the current server (@code{gnus-server-kill-server}).
13696
13697 @item y
13698 @kindex y (Server)
13699 @findex gnus-server-yank-server
13700 Yank the previously killed server (@code{gnus-server-yank-server}).
13701
13702 @item c
13703 @kindex c (Server)
13704 @findex gnus-server-copy-server
13705 Copy the current server (@code{gnus-server-copy-server}).
13706
13707 @item l
13708 @kindex l (Server)
13709 @findex gnus-server-list-servers
13710 List all servers (@code{gnus-server-list-servers}).
13711
13712 @item s
13713 @kindex s (Server)
13714 @findex gnus-server-scan-server
13715 Request that the server scan its sources for new articles
13716 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
13717 servers.
13718
13719 @item g
13720 @kindex g (Server)
13721 @findex gnus-server-regenerate-server
13722 Request that the server regenerate all its data structures
13723 (@code{gnus-server-regenerate-server}).  This can be useful if you have
13724 a mail back end that has gotten out of sync.
13725
13726 @item z
13727 @kindex z (Server)
13728 @findex gnus-server-compact-server
13729
13730 Compact all groups in the server under point
13731 (@code{gnus-server-compact-server}).  Currently implemented only in
13732 nnml (@pxref{Mail Spool}).  This removes gaps between article numbers,
13733 hence getting a correct total article count.
13734
13735 @end table
13736
13737
13738 @node Example Methods
13739 @subsection Example Methods
13740
13741 Most select methods are pretty simple and self-explanatory:
13742
13743 @lisp
13744 (nntp "news.funet.fi")
13745 @end lisp
13746
13747 Reading directly from the spool is even simpler:
13748
13749 @lisp
13750 (nnspool "")
13751 @end lisp
13752
13753 As you can see, the first element in a select method is the name of the
13754 back end, and the second is the @dfn{address}, or @dfn{name}, if you
13755 will.
13756
13757 After these two elements, there may be an arbitrary number of
13758 @code{(@var{variable} @var{form})} pairs.
13759
13760 To go back to the first example---imagine that you want to read from
13761 port 15 on that machine.  This is what the select method should
13762 look like then:
13763
13764 @lisp
13765 (nntp "news.funet.fi" (nntp-port-number 15))
13766 @end lisp
13767
13768 You should read the documentation to each back end to find out what
13769 variables are relevant, but here's an @code{nnmh} example:
13770
13771 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
13772 you have two structures that you wish to access: One is your private
13773 mail spool, and the other is a public one.  Here's the possible spec for
13774 your private mail:
13775
13776 @lisp
13777 (nnmh "private" (nnmh-directory "~/private/mail/"))
13778 @end lisp
13779
13780 (This server is then called @samp{private}, but you may have guessed
13781 that.)
13782
13783 Here's the method for a public spool:
13784
13785 @lisp
13786 (nnmh "public"
13787       (nnmh-directory "/usr/information/spool/")
13788       (nnmh-get-new-mail nil))
13789 @end lisp
13790
13791 @cindex proxy
13792 @cindex firewall
13793
13794 If you are behind a firewall and only have access to the @acronym{NNTP}
13795 server from the firewall machine, you can instruct Gnus to @code{rlogin}
13796 on the firewall machine and connect with
13797 @uref{http://netcat.sourceforge.net/, netcat} from there to the
13798 @acronym{NNTP} server.
13799 Doing this can be rather fiddly, but your virtual server definition
13800 should probably look something like this:
13801
13802 @lisp
13803 (nntp "firewall"
13804       (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)
13805       (nntp-via-address "the.firewall.machine")
13806       (nntp-address "the.real.nntp.host"))
13807 @end lisp
13808
13809 If you want to use the wonderful @code{ssh} program to provide a
13810 compressed connection over the modem line, you could add the following
13811 configuration to the example above:
13812
13813 @lisp
13814       (nntp-via-rlogin-command "ssh")
13815 @end lisp
13816
13817 See also @code{nntp-via-rlogin-command-switches}.  Here's an example for
13818 an indirect connection:
13819
13820 @lisp
13821 (setq gnus-select-method
13822       '(nntp "indirect"
13823              (nntp-address "news.server.example")
13824              (nntp-via-user-name "intermediate_user_name")
13825              (nntp-via-address "intermediate.host.example")
13826              (nntp-via-rlogin-command "ssh")
13827              (nntp-via-rlogin-command-switches ("-C"))
13828              (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)))
13829 @end lisp
13830
13831 This means that you have to have set up @code{ssh-agent} correctly to
13832 provide automatic authorization, of course.
13833
13834 If you're behind a firewall, but have direct access to the outside world
13835 through a wrapper command like "runsocks", you could open a socksified
13836 netcat connection to the news server as follows:
13837
13838 @lisp
13839 (nntp "outside"
13840       (nntp-pre-command "runsocks")
13841       (nntp-open-connection-function nntp-open-netcat-stream)
13842       (nntp-address "the.news.server"))
13843 @end lisp
13844
13845
13846 @node Creating a Virtual Server
13847 @subsection Creating a Virtual Server
13848
13849 If you're saving lots of articles in the cache by using persistent
13850 articles, you may want to create a virtual server to read the cache.
13851
13852 First you need to add a new server.  The @kbd{a} command does that.  It
13853 would probably be best to use @code{nnml} to read the cache.  You
13854 could also use @code{nnspool} or @code{nnmh}, though.
13855
13856 Type @kbd{a nnml RET cache RET}.
13857
13858 You should now have a brand new @code{nnml} virtual server called
13859 @samp{cache}.  You now need to edit it to have the right definitions.
13860 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
13861 will contain the following:
13862
13863 @lisp
13864 (nnml "cache")
13865 @end lisp
13866
13867 Change that to:
13868
13869 @lisp
13870 (nnml "cache"
13871          (nnml-directory "~/News/cache/")
13872          (nnml-active-file "~/News/cache/active"))
13873 @end lisp
13874
13875 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
13876 @kbd{RET} over this virtual server, you should be entered into a browse
13877 buffer, and you should be able to enter any of the groups displayed.
13878
13879
13880 @node Server Variables
13881 @subsection Server Variables
13882 @cindex server variables
13883 @cindex server parameters
13884
13885 One sticky point when defining variables (both on back ends and in Emacs
13886 in general) is that some variables are typically initialized from other
13887 variables when the definition of the variables is being loaded.  If you
13888 change the ``base'' variable after the variables have been loaded, you
13889 won't change the ``derived'' variables.
13890
13891 This typically affects directory and file variables.  For instance,
13892 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
13893 directory variables are initialized from that variable, so
13894 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
13895 new virtual @code{nnml} server, it will @emph{not} suffice to set just
13896 @code{nnml-directory}---you have to explicitly set all the file
13897 variables to be what you want them to be.  For a complete list of
13898 variables for each back end, see each back end's section later in this
13899 manual, but here's an example @code{nnml} definition:
13900
13901 @lisp
13902 (nnml "public"
13903       (nnml-directory "~/my-mail/")
13904       (nnml-active-file "~/my-mail/active")
13905       (nnml-newsgroups-file "~/my-mail/newsgroups"))
13906 @end lisp
13907
13908 Server variables are often called @dfn{server parameters}.
13909
13910 @node Servers and Methods
13911 @subsection Servers and Methods
13912
13913 Wherever you would normally use a select method
13914 (e.g. @code{gnus-secondary-select-method}, in the group select method,
13915 when browsing a foreign server) you can use a virtual server name
13916 instead.  This could potentially save lots of typing.  And it's nice all
13917 over.
13918
13919
13920 @node Unavailable Servers
13921 @subsection Unavailable Servers
13922
13923 If a server seems to be unreachable, Gnus will mark that server as
13924 @code{denied}.  That means that any subsequent attempt to make contact
13925 with that server will just be ignored.  ``It can't be opened,'' Gnus
13926 will tell you, without making the least effort to see whether that is
13927 actually the case or not.
13928
13929 That might seem quite naughty, but it does make sense most of the time.
13930 Let's say you have 10 groups subscribed to on server
13931 @samp{nephelococcygia.com}.  This server is located somewhere quite far
13932 away from you and the machine is quite slow, so it takes 1 minute just
13933 to find out that it refuses connection to you today.  If Gnus were to
13934 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
13935 attempt to do that.  Once it has gotten a single ``connection refused'',
13936 it will regard that server as ``down''.
13937
13938 So, what happens if the machine was only feeling unwell temporarily?
13939 How do you test to see whether the machine has come up again?
13940
13941 You jump to the server buffer (@pxref{Server Buffer}) and poke it
13942 with the following commands:
13943
13944 @table @kbd
13945
13946 @item O
13947 @kindex O (Server)
13948 @findex gnus-server-open-server
13949 Try to establish connection to the server on the current line
13950 (@code{gnus-server-open-server}).
13951
13952 @item C
13953 @kindex C (Server)
13954 @findex gnus-server-close-server
13955 Close the connection (if any) to the server
13956 (@code{gnus-server-close-server}).
13957
13958 @item D
13959 @kindex D (Server)
13960 @findex gnus-server-deny-server
13961 Mark the current server as unreachable
13962 (@code{gnus-server-deny-server}).
13963
13964 @item M-o
13965 @kindex M-o (Server)
13966 @findex gnus-server-open-all-servers
13967 Open the connections to all servers in the buffer
13968 (@code{gnus-server-open-all-servers}).
13969
13970 @item M-c
13971 @kindex M-c (Server)
13972 @findex gnus-server-close-all-servers
13973 Close the connections to all servers in the buffer
13974 (@code{gnus-server-close-all-servers}).
13975
13976 @item R
13977 @kindex R (Server)
13978 @findex gnus-server-remove-denials
13979 Remove all marks to whether Gnus was denied connection from any servers
13980 (@code{gnus-server-remove-denials}).
13981
13982 @item L
13983 @kindex L (Server)
13984 @findex gnus-server-offline-server
13985 Set server status to offline (@code{gnus-server-offline-server}).
13986
13987 @end table
13988
13989
13990 @node Getting News
13991 @section Getting News
13992 @cindex reading news
13993 @cindex news back ends
13994
13995 A newsreader is normally used for reading news.  Gnus currently provides
13996 only two methods of getting news---it can read from an @acronym{NNTP} server,
13997 or it can read from a local spool.
13998
13999 @menu
14000 * NNTP::                        Reading news from an @acronym{NNTP} server.
14001 * News Spool::                  Reading news from the local spool.
14002 @end menu
14003
14004
14005 @node NNTP
14006 @subsection NNTP
14007 @cindex nntp
14008
14009 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
14010 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
14011 server as the, uhm, address.
14012
14013 If the @acronym{NNTP} server is located at a non-standard port, setting the
14014 third element of the select method to this port number should allow you
14015 to connect to the right port.  You'll have to edit the group info for
14016 that (@pxref{Foreign Groups}).
14017
14018 The name of the foreign group can be the same as a native group.  In
14019 fact, you can subscribe to the same group from as many different servers
14020 you feel like.  There will be no name collisions.
14021
14022 The following variables can be used to create a virtual @code{nntp}
14023 server:
14024
14025 @table @code
14026
14027 @item nntp-server-opened-hook
14028 @vindex nntp-server-opened-hook
14029 @cindex @sc{mode reader}
14030 @cindex authinfo
14031 @cindex authentication
14032 @cindex nntp authentication
14033 @findex nntp-send-authinfo
14034 @findex nntp-send-mode-reader
14035 is run after a connection has been made.  It can be used to send
14036 commands to the @acronym{NNTP} server after it has been contacted.  By
14037 default it sends the command @code{MODE READER} to the server with the
14038 @code{nntp-send-mode-reader} function.  This function should always be
14039 present in this hook.
14040
14041 @item nntp-authinfo-function
14042 @vindex nntp-authinfo-function
14043 @findex nntp-send-authinfo
14044 @vindex nntp-authinfo-file
14045 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
14046 server.  The default function is @code{nntp-send-authinfo}, which looks
14047 through your @file{~/.authinfo} (or whatever you've set the
14048 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
14049 are found, it will prompt you for a login name and a password.  The
14050 format of the @file{~/.authinfo} file is (almost) the same as the
14051 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
14052 manual page, but here are the salient facts:
14053
14054 @enumerate
14055 @item
14056 The file contains one or more line, each of which define one server.
14057
14058 @item
14059 Each line may contain an arbitrary number of token/value pairs.
14060
14061 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
14062 @samp{default}.  In addition Gnus introduces two new tokens, not present
14063 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
14064 @samp{force}.  (This is the only way the @file{.authinfo} file format
14065 deviates from the @file{.netrc} file format.)  @samp{port} is used to
14066 indicate what port on the server the credentials apply to and
14067 @samp{force} is explained below.
14068
14069 @end enumerate
14070
14071 Here's an example file:
14072
14073 @example
14074 machine news.uio.no login larsi password geheimnis
14075 machine nntp.ifi.uio.no login larsi force yes
14076 @end example
14077
14078 The token/value pairs may appear in any order; @samp{machine} doesn't
14079 have to be first, for instance.
14080
14081 In this example, both login name and password have been supplied for the
14082 former server, while the latter has only the login name listed, and the
14083 user will be prompted for the password.  The latter also has the
14084 @samp{force} tag, which means that the authinfo will be sent to the
14085 @var{nntp} server upon connection; the default (i.e., when there is not
14086 @samp{force} tag) is to not send authinfo to the @var{nntp} server
14087 until the @var{nntp} server asks for it.
14088
14089 You can also add @samp{default} lines that will apply to all servers
14090 that don't have matching @samp{machine} lines.
14091
14092 @example
14093 default force yes
14094 @end example
14095
14096 This will force sending @samp{AUTHINFO} commands to all servers not
14097 previously mentioned.
14098
14099 Remember to not leave the @file{~/.authinfo} file world-readable.
14100
14101 @item nntp-server-action-alist
14102 @vindex nntp-server-action-alist
14103 This is a list of regexps to match on server types and actions to be
14104 taken when matches are made.  For instance, if you want Gnus to beep
14105 every time you connect to innd, you could say something like:
14106
14107 @lisp
14108 (setq nntp-server-action-alist
14109       '(("innd" (ding))))
14110 @end lisp
14111
14112 You probably don't want to do that, though.
14113
14114 The default value is
14115
14116 @lisp
14117 '(("nntpd 1\\.5\\.11t"
14118    (remove-hook 'nntp-server-opened-hook
14119                 'nntp-send-mode-reader)))
14120 @end lisp
14121
14122 This ensures that Gnus doesn't send the @code{MODE READER} command to
14123 nntpd 1.5.11t, since that command chokes that server, I've been told.
14124
14125 @item nntp-maximum-request
14126 @vindex nntp-maximum-request
14127 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
14128 will collect headers by sending a series of @code{head} commands.  To
14129 speed things up, the back end sends lots of these commands without
14130 waiting for reply, and then reads all the replies.  This is controlled
14131 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
14132 your network is buggy, you should set this to 1.
14133
14134 @item nntp-connection-timeout
14135 @vindex nntp-connection-timeout
14136 If you have lots of foreign @code{nntp} groups that you connect to
14137 regularly, you're sure to have problems with @acronym{NNTP} servers not
14138 responding properly, or being too loaded to reply within reasonable
14139 time.  This is can lead to awkward problems, which can be helped
14140 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
14141 that says how many seconds the @code{nntp} back end should wait for a
14142 connection before giving up.  If it is @code{nil}, which is the default,
14143 no timeouts are done.
14144
14145 @item nntp-nov-is-evil
14146 @vindex nntp-nov-is-evil
14147 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
14148 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
14149 can be used.
14150
14151 @item nntp-xover-commands
14152 @vindex nntp-xover-commands
14153 @cindex @acronym{NOV}
14154 @cindex XOVER
14155 List of strings used as commands to fetch @acronym{NOV} lines from a
14156 server.  The default value of this variable is @code{("XOVER"
14157 "XOVERVIEW")}.
14158
14159 @item nntp-nov-gap
14160 @vindex nntp-nov-gap
14161 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
14162 the server.  The server responds with one huge list of lines.  However,
14163 if you have read articles 2-5000 in the group, and only want to read
14164 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
14165 lines that you will not need.  This variable says how
14166 big a gap between two consecutive articles is allowed to be before the
14167 @code{XOVER} request is split into several request.  Note that if your
14168 network is fast, setting this variable to a really small number means
14169 that fetching will probably be slower.  If this variable is @code{nil},
14170 @code{nntp} will never split requests.  The default is 5.
14171
14172 @item nntp-xref-number-is-evil
14173 @vindex nntp-xref-number-is-evil
14174 When Gnus refers to an article having the @code{Message-ID} that a user
14175 specifies or having the @code{Message-ID} of the parent article of the
14176 current one (@pxref{Finding the Parent}), Gnus sends a @code{HEAD}
14177 command to the @acronym{NNTP} server to know where it is, and the server
14178 returns the data containing the pairs of a group and an article number
14179 in the @code{Xref} header.  Gnus normally uses the article number to
14180 refer to the article if the data shows that that article is in the
14181 current group, while it uses the @code{Message-ID} otherwise.  However,
14182 some news servers, e.g., ones running Diablo, run multiple engines
14183 having the same articles but article numbers are not kept synchronized
14184 between them.  In that case, the article number that appears in the
14185 @code{Xref} header varies by which engine is chosen, so you cannot refer
14186 to the parent article that is in the current group, for instance.  If
14187 you connect to such a server, set this variable to a non-@code{nil}
14188 value, and Gnus never uses article numbers.  For example:
14189
14190 @lisp
14191 (setq gnus-select-method
14192       '(nntp "newszilla"
14193              (nntp-address "newszilla.example.com")
14194              (nntp-xref-number-is-evil t)
14195              @dots{}))
14196 @end lisp
14197
14198 The default value of this server variable is @code{nil}.
14199
14200 @item nntp-prepare-server-hook
14201 @vindex nntp-prepare-server-hook
14202 A hook run before attempting to connect to an @acronym{NNTP} server.
14203
14204 @item nntp-record-commands
14205 @vindex nntp-record-commands
14206 If non-@code{nil}, @code{nntp} will log all commands it sends to the
14207 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
14208 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
14209 that doesn't seem to work.
14210
14211 @item nntp-open-connection-function
14212 @vindex nntp-open-connection-function
14213 It is possible to customize how the connection to the nntp server will
14214 be opened.  If you specify an @code{nntp-open-connection-function}
14215 parameter, Gnus will use that function to establish the connection.
14216 Seven pre-made functions are supplied.  These functions can be grouped
14217 in two categories: direct connection functions (four pre-made), and
14218 indirect ones (three pre-made).
14219
14220 @item nntp-never-echoes-commands
14221 @vindex nntp-never-echoes-commands
14222 Non-@code{nil} means the nntp server never echoes commands.  It is
14223 reported that some nntps server doesn't echo commands.  So, you may want
14224 to set this to non-@code{nil} in the method for such a server setting
14225 @code{nntp-open-connection-function} to @code{nntp-open-ssl-stream} for
14226 example.  The default value is @code{nil}.  Note that the
14227 @code{nntp-open-connection-functions-never-echo-commands} variable
14228 overrides the @code{nil} value of this variable.
14229
14230 @item nntp-open-connection-functions-never-echo-commands
14231 @vindex nntp-open-connection-functions-never-echo-commands
14232 List of functions that never echo commands.  Add or set a function which
14233 you set to @code{nntp-open-connection-function} to this list if it does
14234 not echo commands.  Note that a non-@code{nil} value of the
14235 @code{nntp-never-echoes-commands} variable overrides this variable.  The
14236 default value is @code{(nntp-open-network-stream)}.
14237
14238 @item nntp-prepare-post-hook
14239 @vindex nntp-prepare-post-hook
14240 A hook run just before posting an article.  If there is no
14241 @code{Message-ID} header in the article and the news server provides the
14242 recommended ID, it will be added to the article before running this
14243 hook.  It is useful to make @code{Cancel-Lock} headers even if you
14244 inhibit Gnus to add a @code{Message-ID} header, you could say:
14245
14246 @lisp
14247 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
14248 @end lisp
14249
14250 Note that not all servers support the recommended ID.  This works for
14251 INN versions 2.3.0 and later, for instance.
14252
14253 @end table
14254
14255 @menu
14256 * Direct Functions::            Connecting directly to the server.
14257 * Indirect Functions::          Connecting indirectly to the server.
14258 * Common Variables::            Understood by several connection functions.
14259 * NNTP marks::                  Storing marks for @acronym{NNTP} servers.
14260 @end menu
14261
14262
14263 @node Direct Functions
14264 @subsubsection Direct Functions
14265 @cindex direct connection functions
14266
14267 These functions are called direct because they open a direct connection
14268 between your machine and the @acronym{NNTP} server.  The behavior of these
14269 functions is also affected by commonly understood variables
14270 (@pxref{Common Variables}).
14271
14272 @table @code
14273 @findex nntp-open-network-stream
14274 @item nntp-open-network-stream
14275 This is the default, and simply connects to some port or other on the
14276 remote system.
14277
14278 @findex nntp-open-tls-stream
14279 @item nntp-open-tls-stream
14280 Opens a connection to a server over a @dfn{secure} channel.  To use
14281 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
14282 installed.  You then define a server as follows:
14283
14284 @lisp
14285 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
14286 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
14287 ;;
14288 (nntp "snews.bar.com"
14289       (nntp-open-connection-function nntp-open-tls-stream)
14290       (nntp-port-number )
14291       (nntp-address "snews.bar.com"))
14292 @end lisp
14293
14294 @findex nntp-open-ssl-stream
14295 @item nntp-open-ssl-stream
14296 Opens a connection to a server over a @dfn{secure} channel.  To use
14297 this you must have @uref{http://www.openssl.org, OpenSSL} or
14298 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
14299 then define a server as follows:
14300
14301 @lisp
14302 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
14303 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
14304 ;;
14305 (nntp "snews.bar.com"
14306       (nntp-open-connection-function nntp-open-ssl-stream)
14307       (nntp-port-number 563)
14308       (nntp-address "snews.bar.com"))
14309 @end lisp
14310
14311 @findex nntp-open-netcat-stream
14312 @item nntp-open-netcat-stream
14313 Opens a connection to an @acronym{NNTP} server using the @code{netcat}
14314 program.  You might wonder why this function exists, since we have
14315 the default @code{nntp-open-network-stream} which would do the job.  (One
14316 of) the reason(s) is that if you are behind a firewall but have direct
14317 connections to the outside world thanks to a command wrapper like
14318 @code{runsocks}, you can use it like this:
14319
14320 @lisp
14321 (nntp "socksified"
14322       (nntp-pre-command "runsocks")
14323       (nntp-open-connection-function nntp-open-netcat-stream)
14324       (nntp-address "the.news.server"))
14325 @end lisp
14326
14327 With the default method, you would need to wrap your whole Emacs
14328 session, which is not a good idea.
14329
14330 @findex nntp-open-telnet-stream
14331 @item nntp-open-telnet-stream
14332 Like @code{nntp-open-netcat-stream}, but uses @code{telnet} rather than
14333 @code{netcat}.  @code{telnet} is a bit less robust because of things
14334 like line-end-conversion, but sometimes netcat is simply
14335 not available.  The previous example would turn into:
14336
14337 @lisp
14338 (nntp "socksified"
14339       (nntp-pre-command "runsocks")
14340       (nntp-open-connection-function nntp-open-telnet-stream)
14341       (nntp-address "the.news.server")
14342       (nntp-end-of-line "\n"))
14343 @end lisp
14344 @end table
14345
14346
14347 @node Indirect Functions
14348 @subsubsection Indirect Functions
14349 @cindex indirect connection functions
14350
14351 These functions are called indirect because they connect to an
14352 intermediate host before actually connecting to the @acronym{NNTP} server.
14353 All of these functions and related variables are also said to belong to
14354 the ``via'' family of connection: they're all prefixed with ``via'' to make
14355 things cleaner.  The behavior of these functions is also affected by
14356 commonly understood variables (@pxref{Common Variables}).
14357
14358 @table @code
14359 @item nntp-open-via-rlogin-and-netcat
14360 @findex nntp-open-via-rlogin-and-netcat
14361 Does an @samp{rlogin} on a remote system, and then uses @code{netcat} to connect
14362 to the real @acronym{NNTP} server from there.  This is useful for instance if
14363 you need to connect to a firewall machine first.
14364
14365 @code{nntp-open-via-rlogin-and-netcat}-specific variables:
14366
14367 @table @code
14368 @item nntp-via-rlogin-command
14369 @vindex nntp-via-rlogin-command
14370 Command used to log in on the intermediate host.  The default is
14371 @samp{rsh}, but @samp{ssh} is a popular alternative.
14372
14373 @item nntp-via-rlogin-command-switches
14374 @vindex nntp-via-rlogin-command-switches
14375 List of strings to be used as the switches to
14376 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
14377 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
14378 @samp{("-C")} in order to compress all data connections.
14379 @end table
14380
14381 @item nntp-open-via-rlogin-and-telnet
14382 @findex nntp-open-via-rlogin-and-telnet
14383 Does essentially the same, but uses @code{telnet} instead of @samp{netcat}
14384 to connect to the real @acronym{NNTP} server from the intermediate host.
14385 @code{telnet} is a bit less robust because of things like
14386 line-end-conversion, but sometimes @code{netcat} is simply not available.  
14387
14388 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
14389
14390 @table @code
14391 @item nntp-telnet-command
14392 @vindex nntp-telnet-command
14393 Command used to connect to the real @acronym{NNTP} server from the
14394 intermediate host.  The default is @samp{telnet}.
14395
14396 @item nntp-telnet-switches
14397 @vindex nntp-telnet-switches
14398 List of strings to be used as the switches to the
14399 @code{nntp-telnet-command} command.  The default is @code{("-8")}.
14400
14401 @item nntp-via-rlogin-command
14402 @vindex nntp-via-rlogin-command
14403 Command used to log in on the intermediate host.  The default is
14404 @samp{rsh}, but @samp{ssh} is a popular alternative.
14405
14406 @item nntp-via-rlogin-command-switches
14407 @vindex nntp-via-rlogin-command-switches
14408 List of strings to be used as the switches to
14409 @code{nntp-via-rlogin-command}.  If you use @samp{ssh},  you may need to set
14410 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
14411 the telnet command requires a pseudo-tty allocation on an intermediate
14412 host.  The default is @code{nil}.
14413 @end table
14414
14415 Note that you may want to change the value for @code{nntp-end-of-line}
14416 to @samp{\n} (@pxref{Common Variables}).
14417
14418 @item nntp-open-via-telnet-and-telnet
14419 @findex nntp-open-via-telnet-and-telnet
14420 Does essentially the same, but uses @samp{telnet} instead of
14421 @samp{rlogin} to connect to the intermediate host.
14422
14423 @code{nntp-open-via-telnet-and-telnet}-specific variables:
14424
14425 @table @code
14426 @item nntp-via-telnet-command
14427 @vindex nntp-via-telnet-command
14428 Command used to @code{telnet} the intermediate host.  The default is
14429 @samp{telnet}.
14430
14431 @item nntp-via-telnet-switches
14432 @vindex nntp-via-telnet-switches
14433 List of strings to be used as the switches to the
14434 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
14435
14436 @item nntp-via-user-password
14437 @vindex nntp-via-user-password
14438 Password to use when logging in on the intermediate host.
14439
14440 @item nntp-via-envuser
14441 @vindex nntp-via-envuser
14442 If non-@code{nil}, the intermediate @code{telnet} session (client and
14443 server both) will support the @code{ENVIRON} option and not prompt for
14444 login name.  This works for Solaris @code{telnet}, for instance.
14445
14446 @item nntp-via-shell-prompt
14447 @vindex nntp-via-shell-prompt
14448 Regexp matching the shell prompt on the intermediate host.  The default
14449 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
14450
14451 @end table
14452
14453 Note that you may want to change the value for @code{nntp-end-of-line}
14454 to @samp{\n} (@pxref{Common Variables}).
14455 @end table
14456
14457
14458 Here are some additional variables that are understood by all the above
14459 functions:
14460
14461 @table @code
14462
14463 @item nntp-via-user-name
14464 @vindex nntp-via-user-name
14465 User name to use when connecting to the intermediate host.
14466
14467 @item nntp-via-address
14468 @vindex nntp-via-address
14469 Address of the intermediate host to connect to.
14470
14471 @end table
14472
14473
14474 @node Common Variables
14475 @subsubsection Common Variables
14476
14477 The following variables affect the behavior of all, or several of the
14478 pre-made connection functions.  When not specified, all functions are
14479 affected (the values of the following variables will be used as the
14480 default if each virtual @code{nntp} server doesn't specify those server
14481 variables individually).
14482
14483 @table @code
14484
14485 @item nntp-pre-command
14486 @vindex nntp-pre-command
14487 A command wrapper to use when connecting through a non native
14488 connection function (all except @code{nntp-open-network-stream},
14489 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}).  This is
14490 where you would put a @samp{SOCKS} wrapper for instance.
14491
14492 @item nntp-address
14493 @vindex nntp-address
14494 The address of the @acronym{NNTP} server.
14495
14496 @item nntp-port-number
14497 @vindex nntp-port-number
14498 Port number to connect to the @acronym{NNTP} server.  The default is
14499 @samp{nntp}.  If you use @acronym{NNTP} over
14500 @acronym{TLS}/@acronym{SSL}, you may want to use integer ports rather
14501 than named ports (i.e, use @samp{563} instead of @samp{snews} or
14502 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
14503 not work with named ports.
14504
14505 @item nntp-end-of-line
14506 @vindex nntp-end-of-line
14507 String to use as end-of-line marker when talking to the @acronym{NNTP}
14508 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
14509 using a non native telnet connection function.
14510
14511 @item nntp-netcat-command
14512 @vindex nntp-netcat-command
14513 Command to use when connecting to the @acronym{NNTP} server through
14514 @samp{netcat}.  This is @emph{not} for an intermediate host.  This is
14515 just for the real @acronym{NNTP} server.  The default is
14516 @samp{nc}.
14517
14518 @item nntp-netcat-switches
14519 @vindex nntp-netcat-switches
14520 A list of switches to pass to @code{nntp-netcat-command}.  The default
14521 is @samp{()}.
14522
14523 @end table
14524
14525 @node NNTP marks
14526 @subsubsection NNTP marks
14527 @cindex storing NNTP marks
14528
14529 Gnus stores marks (@pxref{Marking Articles}) for @acronym{NNTP}
14530 servers in marks files.  A marks file records what marks you have set
14531 in a group and each file is specific to the corresponding server.
14532 Marks files are stored in @file{~/News/marks}
14533 (@code{nntp-marks-directory}) under a classic hierarchy resembling
14534 that of a news server, for example marks for the group
14535 @samp{gmane.discuss} on the news.gmane.org server will be stored in
14536 the file @file{~/News/marks/news.gmane.org/gmane/discuss/.marks}.
14537
14538 Marks files are useful because you can copy the @file{~/News/marks}
14539 directory (using rsync, scp or whatever) to another Gnus installation,
14540 and it will realize what articles you have read and marked.  The data
14541 in @file{~/News/marks} has priority over the same data in
14542 @file{~/.newsrc.eld}.
14543
14544 Note that marks files are very much server-specific: Gnus remembers
14545 the article numbers so if you don't use the same servers on both
14546 installations things are most likely to break (most @acronym{NNTP}
14547 servers do not use the same article numbers as any other server).
14548 However, if you use servers A, B, C on one installation and servers A,
14549 D, E on the other, you can sync the marks files for A and then you'll
14550 get synchronization for that server between the two installations.
14551
14552 Using @acronym{NNTP} marks can possibly incur a performance penalty so
14553 if Gnus feels sluggish, try setting the @code{nntp-marks-is-evil}
14554 variable to @code{t}.  Marks will then be stored in @file{~/.newsrc.eld}.
14555
14556 Related variables:
14557
14558 @table @code
14559
14560 @item nntp-marks-is-evil
14561 @vindex nntp-marks-is-evil
14562 If non-@code{nil}, this back end will ignore any marks files.  The
14563 default is @code{nil}.
14564
14565 @item nntp-marks-directory
14566 @vindex nntp-marks-directory
14567 The directory where marks for nntp groups will be stored.
14568
14569 @end table
14570
14571
14572 @node News Spool
14573 @subsection News Spool
14574 @cindex nnspool
14575 @cindex news spool
14576
14577 Subscribing to a foreign group from the local spool is extremely easy,
14578 and might be useful, for instance, to speed up reading groups that
14579 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
14580 instance.
14581
14582 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
14583 anything else) as the address.
14584
14585 If you have access to a local spool, you should probably use that as the
14586 native select method (@pxref{Finding the News}).  It is normally faster
14587 than using an @code{nntp} select method, but might not be.  It depends.
14588 You just have to try to find out what's best at your site.
14589
14590 @table @code
14591
14592 @item nnspool-inews-program
14593 @vindex nnspool-inews-program
14594 Program used to post an article.
14595
14596 @item nnspool-inews-switches
14597 @vindex nnspool-inews-switches
14598 Parameters given to the inews program when posting an article.
14599
14600 @item nnspool-spool-directory
14601 @vindex nnspool-spool-directory
14602 Where @code{nnspool} looks for the articles.  This is normally
14603 @file{/usr/spool/news/}.
14604
14605 @item nnspool-nov-directory
14606 @vindex nnspool-nov-directory
14607 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
14608 @file{/usr/spool/news/over.view/}.
14609
14610 @item nnspool-lib-dir
14611 @vindex nnspool-lib-dir
14612 Where the news lib dir is (@file{/usr/lib/news/} by default).
14613
14614 @item nnspool-active-file
14615 @vindex nnspool-active-file
14616 The name of the active file.
14617
14618 @item nnspool-newsgroups-file
14619 @vindex nnspool-newsgroups-file
14620 The name of the group descriptions file.
14621
14622 @item nnspool-history-file
14623 @vindex nnspool-history-file
14624 The name of the news history file.
14625
14626 @item nnspool-active-times-file
14627 @vindex nnspool-active-times-file
14628 The name of the active date file.
14629
14630 @item nnspool-nov-is-evil
14631 @vindex nnspool-nov-is-evil
14632 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
14633 that it finds.
14634
14635 @item nnspool-sift-nov-with-sed
14636 @vindex nnspool-sift-nov-with-sed
14637 @cindex sed
14638 If non-@code{nil}, which is the default, use @code{sed} to get the
14639 relevant portion from the overview file.  If @code{nil},
14640 @code{nnspool} will load the entire file into a buffer and process it
14641 there.
14642
14643 @end table
14644
14645
14646 @node Getting Mail
14647 @section Getting Mail
14648 @cindex reading mail
14649 @cindex mail
14650
14651 Reading mail with a newsreader---isn't that just plain WeIrD? But of
14652 course.
14653
14654 @menu
14655 * Mail in a Newsreader::        Important introductory notes.
14656 * Getting Started Reading Mail::  A simple cookbook example.
14657 * Splitting Mail::              How to create mail groups.
14658 * Mail Sources::                How to tell Gnus where to get mail from.
14659 * Mail Back End Variables::     Variables for customizing mail handling.
14660 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
14661 * Group Mail Splitting::        Use group customize to drive mail splitting.
14662 * Incorporating Old Mail::      What about the old mail you have?
14663 * Expiring Mail::               Getting rid of unwanted mail.
14664 * Washing Mail::                Removing cruft from the mail you get.
14665 * Duplicates::                  Dealing with duplicated mail.
14666 * Not Reading Mail::            Using mail back ends for reading other files.
14667 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
14668 @end menu
14669
14670
14671 @node Mail in a Newsreader
14672 @subsection Mail in a Newsreader
14673
14674 If you are used to traditional mail readers, but have decided to switch
14675 to reading mail with Gnus, you may find yourself experiencing something
14676 of a culture shock.
14677
14678 Gnus does not behave like traditional mail readers.  If you want to make
14679 it behave that way, you can, but it's an uphill battle.
14680
14681 Gnus, by default, handles all its groups using the same approach.  This
14682 approach is very newsreaderly---you enter a group, see the new/unread
14683 messages, and when you read the messages, they get marked as read, and
14684 you don't see them any more.  (Unless you explicitly ask for them.)
14685
14686 In particular, you do not do anything explicitly to delete messages.
14687
14688 Does this mean that all the messages that have been marked as read are
14689 deleted?  How awful!
14690
14691 But, no, it means that old messages are @dfn{expired} according to some
14692 scheme or other.  For news messages, the expire process is controlled by
14693 the news administrator; for mail, the expire process is controlled by
14694 you.  The expire process for mail is covered in depth in @ref{Expiring
14695 Mail}.
14696
14697 What many Gnus users find, after using it a while for both news and
14698 mail, is that the transport mechanism has very little to do with how
14699 they want to treat a message.
14700
14701 Many people subscribe to several mailing lists.  These are transported
14702 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
14703 answering, or even reading these messages very carefully.  We may not
14704 need to save them because if we should need to read one again, they are
14705 archived somewhere else.
14706
14707 Some people have local news groups which have only a handful of readers.
14708 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
14709 to read and answer a large fraction of the messages very carefully in
14710 order to do our work.  And there may not be an archive, so we may need
14711 to save the interesting messages the same way we would personal mail.
14712
14713 The important distinction turns out to be not the transport mechanism,
14714 but other factors such as how interested we are in the subject matter,
14715 or how easy it is to retrieve the message if we need to read it again.
14716
14717 Gnus provides many options for sorting mail into ``groups'' which behave
14718 like newsgroups, and for treating each group (whether mail or news)
14719 differently.
14720
14721 Some users never get comfortable using the Gnus (ahem) paradigm and wish
14722 that Gnus should grow up and be a male, er, mail reader.  It is possible
14723 to whip Gnus into a more mailreaderly being, but, as said before, it's
14724 not easy.  People who prefer proper mail readers should try @sc{vm}
14725 instead, which is an excellent, and proper, mail reader.
14726
14727 I don't mean to scare anybody off, but I want to make it clear that you
14728 may be required to learn a new way of thinking about messages.  After
14729 you've been subjected to The Gnus Way, you will come to love it.  I can
14730 guarantee it.  (At least the guy who sold me the Emacs Subliminal
14731 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
14732 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
14733 You Do.)
14734
14735
14736 @node Getting Started Reading Mail
14737 @subsection Getting Started Reading Mail
14738
14739 It's quite easy to use Gnus to read your new mail.  You just plonk the
14740 mail back end of your choice into @code{gnus-secondary-select-methods},
14741 and things will happen automatically.
14742
14743 For instance, if you want to use @code{nnml} (which is a ``one file per
14744 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
14745
14746 @lisp
14747 (setq gnus-secondary-select-methods '((nnml "")))
14748 @end lisp
14749
14750 Now, the next time you start Gnus, this back end will be queried for new
14751 articles, and it will move all the messages in your spool file to its
14752 directory, which is @file{~/Mail/} by default.  The new group that will
14753 be created (@samp{mail.misc}) will be subscribed, and you can read it
14754 like any other group.
14755
14756 You will probably want to split the mail into several groups, though:
14757
14758 @lisp
14759 (setq nnmail-split-methods
14760       '(("junk" "^From:.*Lars Ingebrigtsen")
14761         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
14762         ("other" "")))
14763 @end lisp
14764
14765 This will result in three new @code{nnml} mail groups being created:
14766 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
14767 mail that doesn't fit into the first two groups will be placed in the
14768 last group.
14769
14770 This should be sufficient for reading mail with Gnus.  You might want to
14771 give the other sections in this part of the manual a perusal, though.
14772 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
14773
14774
14775 @node Splitting Mail
14776 @subsection Splitting Mail
14777 @cindex splitting mail
14778 @cindex mail splitting
14779 @cindex mail filtering (splitting)
14780
14781 @vindex nnmail-split-methods
14782 The @code{nnmail-split-methods} variable says how the incoming mail is
14783 to be split into groups.
14784
14785 @lisp
14786 (setq nnmail-split-methods
14787   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
14788     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
14789     ("mail.other" "")))
14790 @end lisp
14791
14792 This variable is a list of lists, where the first element of each of
14793 these lists is the name of the mail group (they do not have to be called
14794 something beginning with @samp{mail}, by the way), and the second
14795 element is a regular expression used on the header of each mail to
14796 determine if it belongs in this mail group.  The first string may
14797 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
14798 insert sub-expressions from the matched text.  For instance:
14799
14800 @lisp
14801 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
14802 @end lisp
14803
14804 @noindent
14805 In that case, @code{nnmail-split-lowercase-expanded} controls whether
14806 the inserted text should be made lowercase.  @xref{Fancy Mail Splitting}.
14807
14808 The second element can also be a function.  In that case, it will be
14809 called narrowed to the headers with the first element of the rule as the
14810 argument.  It should return a non-@code{nil} value if it thinks that the
14811 mail belongs in that group.
14812
14813 @cindex @samp{bogus} group
14814 The last of these groups should always be a general one, and the regular
14815 expression should @emph{always} be @samp{""} so that it matches any mails
14816 that haven't been matched by any of the other regexps.  (These rules are
14817 processed from the beginning of the alist toward the end.  The first rule
14818 to make a match will ``win'', unless you have crossposting enabled.  In
14819 that case, all matching rules will ``win''.)  If no rule matched, the mail
14820 will end up in the @samp{bogus} group.  When new groups are created by
14821 splitting mail, you may want to run @code{gnus-group-find-new-groups} to
14822 see the new groups.  This also applies to the @samp{bogus} group.
14823
14824 If you like to tinker with this yourself, you can set this variable to a
14825 function of your choice.  This function will be called without any
14826 arguments in a buffer narrowed to the headers of an incoming mail
14827 message.  The function should return a list of group names that it
14828 thinks should carry this mail message.
14829
14830 Note that the mail back ends are free to maul the poor, innocent,
14831 incoming headers all they want to.  They all add @code{Lines} headers;
14832 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
14833 @code{From<SPACE>} line to something else.
14834
14835 @vindex nnmail-crosspost
14836 The mail back ends all support cross-posting.  If several regexps match,
14837 the mail will be ``cross-posted'' to all those groups.
14838 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
14839 that no articles are crossposted to the general (@samp{""}) group.
14840
14841 @vindex nnmail-crosspost-link-function
14842 @cindex crosspost
14843 @cindex links
14844 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
14845 the crossposted articles.  However, not all file systems support hard
14846 links.  If that's the case for you, set
14847 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
14848 variable is @code{add-name-to-file} by default.)
14849
14850 @kindex M-x nnmail-split-history
14851 @findex nnmail-split-history
14852 If you wish to see where the previous mail split put the messages, you
14853 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
14854 where re-spooling messages would put the messages, you can use
14855 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
14856 Group Commands}).
14857
14858 @vindex nnmail-split-header-length-limit
14859 Header lines longer than the value of
14860 @code{nnmail-split-header-length-limit} are excluded from the split
14861 function.
14862
14863 @vindex nnmail-mail-splitting-decodes
14864 @vindex nnmail-mail-splitting-charset
14865 By default, splitting does not decode headers, so you can not match on
14866 non-@acronym{ASCII} strings.  But it is useful if you want to match
14867 articles based on the raw header data.  To enable it, set the
14868 @code{nnmail-mail-splitting-decodes} variable to a non-@code{nil} value.
14869 In addition, the value of the @code{nnmail-mail-splitting-charset}
14870 variable is used for decoding non-@acronym{MIME} encoded string when
14871 @code{nnmail-mail-splitting-decodes} is non-@code{nil}.  The default
14872 value is @code{nil} which means not to decode non-@acronym{MIME} encoded
14873 string.  A suitable value for you will be @code{undecided} or be the
14874 charset used normally in mails you are interested in.
14875
14876 @vindex nnmail-resplit-incoming
14877 By default, splitting is performed on all incoming messages.  If you
14878 specify a @code{directory} entry for the variable @code{mail-sources}
14879 (@pxref{Mail Source Specifiers}), however, then splitting does
14880 @emph{not} happen by default.  You can set the variable
14881 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
14882 splitting happen even in this case.  (This variable has no effect on
14883 other kinds of entries.)
14884
14885 Gnus gives you all the opportunity you could possibly want for shooting
14886 yourself in the foot.  Let's say you create a group that will contain
14887 all the mail you get from your boss.  And then you accidentally
14888 unsubscribe from the group.  Gnus will still put all the mail from your
14889 boss in the unsubscribed group, and so, when your boss mails you ``Have
14890 that report ready by Monday or you're fired!'', you'll never see it and,
14891 come Tuesday, you'll still believe that you're gainfully employed while
14892 you really should be out collecting empty bottles to save up for next
14893 month's rent money.
14894
14895
14896 @node Mail Sources
14897 @subsection Mail Sources
14898
14899 Mail can be gotten from many different sources---the mail spool, from
14900 a @acronym{POP} mail server, from a procmail directory, or from a
14901 maildir, for instance.
14902
14903 @menu
14904 * Mail Source Specifiers::      How to specify what a mail source is.
14905 * Mail Source Customization::   Some variables that influence things.
14906 * Fetching Mail::               Using the mail source specifiers.
14907 @end menu
14908
14909
14910 @node Mail Source Specifiers
14911 @subsubsection Mail Source Specifiers
14912 @cindex POP
14913 @cindex mail server
14914 @cindex procmail
14915 @cindex mail spool
14916 @cindex mail source
14917
14918 You tell Gnus how to fetch mail by setting @code{mail-sources}
14919 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
14920
14921 Here's an example:
14922
14923 @lisp
14924 (pop :server "pop3.mailserver.com" :user "myname")
14925 @end lisp
14926
14927 As can be observed, a mail source specifier is a list where the first
14928 element is a @dfn{mail source type}, followed by an arbitrary number of
14929 @dfn{keywords}.  Keywords that are not explicitly specified are given
14930 default values.
14931
14932 The @code{mail-sources} is global for all mail groups.  You can specify
14933 an additional mail source for a particular group by including the
14934 @code{group} mail specifier in @code{mail-sources}, and setting a
14935 @code{mail-source} group parameter (@pxref{Group Parameters}) specifying
14936 a single mail source.  When this is used, @code{mail-sources} is
14937 typically just @code{(group)}; the @code{mail-source} parameter for a
14938 group might look like this:
14939
14940 @lisp
14941 (mail-source . (file :path "home/user/spools/foo.spool"))
14942 @end lisp
14943
14944 This means that the group's (and only this group's) messages will be
14945 fetched from the spool file @samp{/user/spools/foo.spool}.
14946
14947 The following mail source types are available:
14948
14949 @table @code
14950 @item file
14951 Get mail from a single file; typically from the mail spool.
14952
14953 Keywords:
14954
14955 @table @code
14956 @item :path
14957 The file name.  Defaults to the value of the @env{MAIL}
14958 environment variable or the value of @code{rmail-spool-directory}
14959 (usually something like @file{/usr/mail/spool/user-name}).
14960
14961 @item :prescript
14962 @itemx :postscript
14963 Script run before/after fetching mail.
14964 @end table
14965
14966 An example file mail source:
14967
14968 @lisp
14969 (file :path "/usr/spool/mail/user-name")
14970 @end lisp
14971
14972 Or using the default file name:
14973
14974 @lisp
14975 (file)
14976 @end lisp
14977
14978 If the mail spool file is not located on the local machine, it's best
14979 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
14980 You can not use ange-ftp file names here---it has no way to lock the
14981 mail spool while moving the mail.
14982
14983 If it's impossible to set up a proper server, you can use ssh instead.
14984
14985 @lisp
14986 (setq mail-sources
14987       '((file :prescript "ssh host bin/getmail >%t")))
14988 @end lisp
14989
14990 The @samp{getmail} script would look something like the following:
14991
14992 @example
14993 #!/bin/sh
14994 #  getmail - move mail from spool to stdout
14995 #  flu@@iki.fi
14996
14997 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
14998 TMP=$HOME/Mail/tmp
14999 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
15000 @end example
15001
15002 Alter this script to fit the @samp{movemail} and temporary
15003 file you want to use.
15004
15005
15006 @item directory
15007 @vindex nnmail-scan-directory-mail-source-once
15008 Get mail from several files in a directory.  This is typically used
15009 when you have procmail split the incoming mail into several files.
15010 That is, there is a one-to-one correspondence between files in that
15011 directory and groups, so that mail from the file @file{foo.bar.spool}
15012 will be put in the group @code{foo.bar}.  (You can change the suffix
15013 to be used instead of @code{.spool}.)  Setting
15014 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
15015 Gnus to scan the mail source only once.  This is particularly useful
15016 if you want to scan mail groups at a specified level.
15017
15018 @vindex nnmail-resplit-incoming
15019 There is also the variable @code{nnmail-resplit-incoming}, if you set
15020 that to a non-@code{nil} value, then the normal splitting process is
15021 applied to all the files from the directory, @ref{Splitting Mail}.
15022
15023 Keywords:
15024
15025 @table @code
15026 @item :path
15027 The name of the directory where the files are.  There is no default
15028 value.
15029
15030 @item :suffix
15031 Only files ending with this suffix are used.  The default is
15032 @samp{.spool}.
15033
15034 @item :predicate
15035 Only files that have this predicate return non-@code{nil} are returned.
15036 The default is @code{identity}.  This is used as an additional
15037 filter---only files that have the right suffix @emph{and} satisfy this
15038 predicate are considered.
15039
15040 @item :prescript
15041 @itemx :postscript
15042 Script run before/after fetching mail.
15043
15044 @end table
15045
15046 An example directory mail source:
15047
15048 @lisp
15049 (directory :path "/home/user-name/procmail-dir/"
15050            :suffix ".prcml")
15051 @end lisp
15052
15053 @item pop
15054 Get mail from a @acronym{POP} server.
15055
15056 Keywords:
15057
15058 @table @code
15059 @item :server
15060 The name of the @acronym{POP} server.  The default is taken from the
15061 @env{MAILHOST} environment variable.
15062
15063 @item :port
15064 The port number of the @acronym{POP} server.  This can be a number (eg,
15065 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
15066 string, it should be a service name as listed in @file{/etc/services} on
15067 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
15068 need to specify it as @samp{"pop-3"} instead.
15069
15070 @item :user
15071 The user name to give to the @acronym{POP} server.  The default is the login
15072 name.
15073
15074 @item :password
15075 The password to give to the @acronym{POP} server.  If not specified,
15076 the user is prompted.
15077
15078 @item :program
15079 The program to use to fetch mail from the @acronym{POP} server.  This
15080 should be a @code{format}-like string.  Here's an example:
15081
15082 @example
15083 fetchmail %u@@%s -P %p %t
15084 @end example
15085
15086 The valid format specifier characters are:
15087
15088 @table @samp
15089 @item t
15090 The name of the file the mail is to be moved to.  This must always be
15091 included in this string.
15092
15093 @item s
15094 The name of the server.
15095
15096 @item P
15097 The port number of the server.
15098
15099 @item u
15100 The user name to use.
15101
15102 @item p
15103 The password to use.
15104 @end table
15105
15106 The values used for these specs are taken from the values you give the
15107 corresponding keywords.
15108
15109 @item :prescript
15110 A script to be run before fetching the mail.  The syntax is the same as
15111 the @code{:program} keyword.  This can also be a function to be run.
15112
15113 @item :postscript
15114 A script to be run after fetching the mail.  The syntax is the same as
15115 the @code{:program} keyword.  This can also be a function to be run.
15116
15117 @item :function
15118 The function to use to fetch mail from the @acronym{POP} server.  The
15119 function is called with one parameter---the name of the file where the
15120 mail should be moved to.
15121
15122 @item :authentication
15123 This can be either the symbol @code{password} or the symbol @code{apop}
15124 and says what authentication scheme to use.  The default is
15125 @code{password}.
15126
15127 @end table
15128
15129 @vindex pop3-movemail
15130 @vindex pop3-leave-mail-on-server
15131 If the @code{:program} and @code{:function} keywords aren't specified,
15132 @code{pop3-movemail} will be used.  If @code{pop3-leave-mail-on-server}
15133 is non-@code{nil} the mail is to be left on the @acronym{POP} server
15134 after fetching when using @code{pop3-movemail}.  Note that POP servers
15135 maintain no state information between sessions, so what the client
15136 believes is there and what is actually there may not match up.  If they
15137 do not, then you may get duplicate mails or the whole thing can fall
15138 apart and leave you with a corrupt mailbox.
15139
15140 Here are some examples for getting mail from a @acronym{POP} server.
15141 Fetch from the default @acronym{POP} server, using the default user
15142 name, and default fetcher:
15143
15144 @lisp
15145 (pop)
15146 @end lisp
15147
15148 Fetch from a named server with a named user and password:
15149
15150 @lisp
15151 (pop :server "my.pop.server"
15152      :user "user-name" :password "secret")
15153 @end lisp
15154
15155 Use @samp{movemail} to move the mail:
15156
15157 @lisp
15158 (pop :program "movemail po:%u %t %p")
15159 @end lisp
15160
15161 @item maildir
15162 Get mail from a maildir.  This is a type of mailbox that is supported by
15163 at least qmail and postfix, where each file in a special directory
15164 contains exactly one mail.
15165
15166 Keywords:
15167
15168 @table @code
15169 @item :path
15170 The name of the directory where the mails are stored.  The default is
15171 taken from the @env{MAILDIR} environment variable or
15172 @file{~/Maildir/}.
15173 @item :subdirs
15174 The subdirectories of the Maildir.  The default is
15175 @samp{("new" "cur")}.
15176
15177 @c If you sometimes look at your mail through a pop3 daemon before fetching
15178 @c them with Gnus, you may also have to fetch your mails from the
15179 @c @code{cur} directory inside the maildir, like in the first example
15180 @c below.
15181
15182 You can also get mails from remote hosts (because maildirs don't suffer
15183 from locking problems).
15184
15185 @end table
15186
15187 Two example maildir mail sources:
15188
15189 @lisp
15190 (maildir :path "/home/user-name/Maildir/"
15191          :subdirs ("cur" "new"))
15192 @end lisp
15193
15194 @lisp
15195 (maildir :path "/user@@remotehost.org:~/Maildir/"
15196          :subdirs ("new"))
15197 @end lisp
15198
15199 @item imap
15200 Get mail from a @acronym{IMAP} server.  If you don't want to use
15201 @acronym{IMAP} as intended, as a network mail reading protocol (ie
15202 with nnimap), for some reason or other, Gnus let you treat it similar
15203 to a @acronym{POP} server and fetches articles from a given
15204 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
15205
15206 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
15207 may need external programs and libraries, @xref{IMAP}.
15208
15209 Keywords:
15210
15211 @table @code
15212 @item :server
15213 The name of the @acronym{IMAP} server.  The default is taken from the
15214 @env{MAILHOST} environment variable.
15215
15216 @item :port
15217 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
15218 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
15219
15220 @item :user
15221 The user name to give to the @acronym{IMAP} server.  The default is the login
15222 name.
15223
15224 @item :password
15225 The password to give to the @acronym{IMAP} server.  If not specified, the user is
15226 prompted.
15227
15228 @item :stream
15229 What stream to use for connecting to the server, this is one of the
15230 symbols in @code{imap-stream-alist}.  Right now, this means
15231 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
15232 @samp{ssl}, @samp{shell} or the default @samp{network}.
15233
15234 @item :authentication
15235 Which authenticator to use for authenticating to the server, this is
15236 one of the symbols in @code{imap-authenticator-alist}.  Right now,
15237 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
15238 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
15239
15240 @item :program
15241 When using the `shell' :stream, the contents of this variable is
15242 mapped into the @code{imap-shell-program} variable.  This should be a
15243 @code{format}-like string (or list of strings).  Here's an example:
15244
15245 @example
15246 ssh %s imapd
15247 @end example
15248
15249 Make sure nothing is interfering with the output of the program, e.g.,
15250 don't forget to redirect the error output to the void.  The valid format
15251 specifier characters are:
15252
15253 @table @samp
15254 @item s
15255 The name of the server.
15256
15257 @item l
15258 User name from @code{imap-default-user}.
15259
15260 @item p
15261 The port number of the server.
15262 @end table
15263
15264 The values used for these specs are taken from the values you give the
15265 corresponding keywords.
15266
15267 @item :mailbox
15268 The name of the mailbox to get mail from.  The default is @samp{INBOX}
15269 which normally is the mailbox which receives incoming mail.
15270
15271 @item :predicate
15272 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
15273 UNDELETED}, is probably the best choice for most people, but if you
15274 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
15275 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
15276 Then all articles in the mailbox is fetched, no matter what.  For a
15277 complete list of predicates, see RFC 2060 section 6.4.4.
15278
15279 @item :fetchflag
15280 How to flag fetched articles on the server, the default @samp{\Deleted}
15281 will mark them as deleted, an alternative would be @samp{\Seen} which
15282 would simply mark them as read.  These are the two most likely choices,
15283 but more flags are defined in RFC 2060 section 2.3.2.
15284
15285 @item :dontexpunge
15286 If non-@code{nil}, don't remove all articles marked as deleted in the
15287 mailbox after finishing the fetch.
15288
15289 @end table
15290
15291 An example @acronym{IMAP} mail source:
15292
15293 @lisp
15294 (imap :server "mail.mycorp.com"
15295       :stream kerberos4
15296       :fetchflag "\\Seen")
15297 @end lisp
15298
15299 @item webmail
15300 Get mail from a webmail server, such as @uref{http://www.hotmail.com/},
15301 @uref{http://webmail.netscape.com/}, @uref{http://www.netaddress.com/},
15302 @uref{http://mail.yahoo.com/}.
15303
15304 NOTE: Webmail largely depends on cookies.  A "one-line-cookie" patch is
15305 required for url "4.0pre.46".
15306
15307 WARNING: Mails may be lost.  NO WARRANTY.
15308
15309 Keywords:
15310
15311 @table @code
15312 @item :subtype
15313 The type of the webmail server.  The default is @code{hotmail}.  The
15314 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
15315
15316 @item :user
15317 The user name to give to the webmail server.  The default is the login
15318 name.
15319
15320 @item :password
15321 The password to give to the webmail server.  If not specified, the user is
15322 prompted.
15323
15324 @item :dontexpunge
15325 If non-@code{nil}, only fetch unread articles and don't move them to
15326 trash folder after finishing the fetch.
15327
15328 @end table
15329
15330 An example webmail source:
15331
15332 @lisp
15333 (webmail :subtype 'hotmail
15334          :user "user-name"
15335          :password "secret")
15336 @end lisp
15337
15338 @item group
15339 Get the actual mail source from the @code{mail-source} group parameter,
15340 @xref{Group Parameters}.
15341
15342 @end table
15343
15344 @table @dfn
15345 @item Common Keywords
15346 Common keywords can be used in any type of mail source.
15347
15348 Keywords:
15349
15350 @table @code
15351 @item :plugged
15352 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
15353 use directory source to get mail, you can specify it as in this
15354 example:
15355
15356 @lisp
15357 (setq mail-sources
15358       '((directory :path "/home/pavel/.Spool/"
15359                    :suffix ""
15360                    :plugged t)))
15361 @end lisp
15362
15363 Gnus will then fetch your mail even when you are unplugged.  This is
15364 useful when you use local mail and news.
15365
15366 @end table
15367 @end table
15368
15369 @subsubsection Function Interface
15370
15371 Some of the above keywords specify a Lisp function to be executed.
15372 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
15373 the value of the keyword while the function is executing.  For example,
15374 consider the following mail-source setting:
15375
15376 @lisp
15377 (setq mail-sources '((pop :user "jrl"
15378                           :server "pophost" :function fetchfunc)))
15379 @end lisp
15380
15381 While the function @code{fetchfunc} is executing, the symbol @code{user}
15382 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
15383 @code{"pophost"}.  The symbols @code{port}, @code{password},
15384 @code{program}, @code{prescript}, @code{postscript}, @code{function},
15385 and @code{authentication} are also bound (to their default values).
15386
15387 See above for a list of keywords for each type of mail source.
15388
15389
15390 @node Mail Source Customization
15391 @subsubsection Mail Source Customization
15392
15393 The following is a list of variables that influence how the mail is
15394 fetched.  You would normally not need to set or change any of these
15395 variables.
15396
15397 @table @code
15398 @item mail-source-crash-box
15399 @vindex mail-source-crash-box
15400 File where mail will be stored while processing it.  The default is@*
15401 @file{~/.emacs-mail-crash-box}.
15402
15403 @cindex Incoming*
15404 @item mail-source-delete-incoming
15405 @vindex mail-source-delete-incoming
15406 If non-@code{nil}, delete incoming files after handling them.  If
15407 @code{t}, delete the files immediately, if @code{nil}, never delete any
15408 files.  If a positive number, delete files older than number of days
15409 (the deletion will only happen when receiving new mail).  You may also
15410 set @code{mail-source-delete-incoming} to @code{nil} and call
15411 @code{mail-source-delete-old-incoming} from a hook or interactively.
15412 @code{mail-source-delete-incoming} defaults to @code{10} in alpha Gnusae
15413 and @code{2} in released Gnusae.  @xref{Gnus Development}.
15414
15415 @item mail-source-delete-old-incoming-confirm
15416 @vindex mail-source-delete-old-incoming-confirm
15417 If non-@code{nil}, ask for confirmation before deleting old incoming
15418 files.  This variable only applies when
15419 @code{mail-source-delete-incoming} is a positive number.
15420
15421 @item mail-source-ignore-errors
15422 @vindex mail-source-ignore-errors
15423 If non-@code{nil}, ignore errors when reading mail from a mail source.
15424
15425 @item mail-source-directory
15426 @vindex mail-source-directory
15427 Directory where incoming mail source files (if any) will be stored.  The
15428 default is @file{~/Mail/}.  At present, the only thing this is used for
15429 is to say where the incoming files will be stored if the variable
15430 @code{mail-source-delete-incoming} is @code{nil} or a number.
15431
15432 @item mail-source-incoming-file-prefix
15433 @vindex mail-source-incoming-file-prefix
15434 Prefix for file name for storing incoming mail.  The default is
15435 @file{Incoming}, in which case files will end up with names like
15436 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
15437 relevant if @code{mail-source-delete-incoming} is @code{nil} or a
15438 number.
15439
15440 @item mail-source-default-file-modes
15441 @vindex mail-source-default-file-modes
15442 All new mail files will get this file mode.  The default is 384.
15443
15444 @item mail-source-movemail-program
15445 @vindex mail-source-movemail-program
15446 If non-@code{nil}, name of program for fetching new mail.  If
15447 @code{nil}, @code{movemail} in @var{exec-directory}.
15448
15449 @end table
15450
15451
15452 @node Fetching Mail
15453 @subsubsection Fetching Mail
15454
15455 @vindex mail-sources
15456 The way to actually tell Gnus where to get new mail from is to set
15457 @code{mail-sources} to a list of mail source specifiers
15458 (@pxref{Mail Source Specifiers}).
15459
15460 If this variable is @code{nil}, the mail back ends will never attempt to
15461 fetch mail by themselves.
15462
15463 If you want to fetch mail both from your local spool as well as a
15464 @acronym{POP} mail server, you'd say something like:
15465
15466 @lisp
15467 (setq mail-sources
15468       '((file)
15469         (pop :server "pop3.mail.server"
15470              :password "secret")))
15471 @end lisp
15472
15473 Or, if you don't want to use any of the keyword defaults:
15474
15475 @lisp
15476 (setq mail-sources
15477       '((file :path "/var/spool/mail/user-name")
15478         (pop :server "pop3.mail.server"
15479              :user "user-name"
15480              :port "pop3"
15481              :password "secret")))
15482 @end lisp
15483
15484
15485 When you use a mail back end, Gnus will slurp all your mail from your
15486 inbox and plonk it down in your home directory.  Gnus doesn't move any
15487 mail if you're not using a mail back end---you have to do a lot of magic
15488 invocations first.  At the time when you have finished drawing the
15489 pentagram, lightened the candles, and sacrificed the goat, you really
15490 shouldn't be too surprised when Gnus moves your mail.
15491
15492
15493
15494 @node Mail Back End Variables
15495 @subsection Mail Back End Variables
15496
15497 These variables are (for the most part) pertinent to all the various
15498 mail back ends.
15499
15500 @table @code
15501 @vindex nnmail-read-incoming-hook
15502 @item nnmail-read-incoming-hook
15503 The mail back ends all call this hook after reading new mail.  You can
15504 use this hook to notify any mail watch programs, if you want to.
15505
15506 @vindex nnmail-split-hook
15507 @item nnmail-split-hook
15508 @findex gnus-article-decode-encoded-words
15509 @cindex RFC 1522 decoding
15510 @cindex RFC 2047 decoding
15511 Hook run in the buffer where the mail headers of each message is kept
15512 just before the splitting based on these headers is done.  The hook is
15513 free to modify the buffer contents in any way it sees fit---the buffer
15514 is discarded after the splitting has been done, and no changes performed
15515 in the buffer will show up in any files.
15516 @code{gnus-article-decode-encoded-words} is one likely function to add
15517 to this hook.
15518
15519 @vindex nnmail-pre-get-new-mail-hook
15520 @vindex nnmail-post-get-new-mail-hook
15521 @item nnmail-pre-get-new-mail-hook
15522 @itemx nnmail-post-get-new-mail-hook
15523 These are two useful hooks executed when treating new incoming
15524 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
15525 starting to handle the new mail) and
15526 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
15527 is done).  Here's and example of using these two hooks to change the
15528 default file modes the new mail files get:
15529
15530 @lisp
15531 (add-hook 'nnmail-pre-get-new-mail-hook
15532           (lambda () (set-default-file-modes 511)))
15533
15534 (add-hook 'nnmail-post-get-new-mail-hook
15535           (lambda () (set-default-file-modes 551)))
15536 @end lisp
15537
15538 @item nnmail-use-long-file-names
15539 @vindex nnmail-use-long-file-names
15540 If non-@code{nil}, the mail back ends will use long file and directory
15541 names.  Groups like @samp{mail.misc} will end up in directories
15542 (assuming use of @code{nnml} back end) or files (assuming use of
15543 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
15544 the same group will end up in @file{mail/misc}.
15545
15546 @item nnmail-delete-file-function
15547 @vindex nnmail-delete-file-function
15548 @findex delete-file
15549 Function called to delete files.  It is @code{delete-file} by default.
15550
15551 @item nnmail-cache-accepted-message-ids
15552 @vindex nnmail-cache-accepted-message-ids
15553 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
15554 the back end (via @code{Gcc}, for instance) into the mail duplication
15555 discovery cache.  The default is @code{nil}.
15556
15557 @item nnmail-cache-ignore-groups
15558 @vindex nnmail-cache-ignore-groups
15559 This can be a regular expression or a list of regular expressions.
15560 Group names that match any of the regular expressions will never be
15561 recorded in the @code{Message-ID} cache.
15562
15563 This can be useful, for example, when using Fancy Splitting
15564 (@pxref{Fancy Mail Splitting}) together with the function
15565 @code{nnmail-split-fancy-with-parent}.
15566
15567 @end table
15568
15569
15570 @node Fancy Mail Splitting
15571 @subsection Fancy Mail Splitting
15572 @cindex mail splitting
15573 @cindex fancy mail splitting
15574
15575 @vindex nnmail-split-fancy
15576 @findex nnmail-split-fancy
15577 If the rather simple, standard method for specifying how to split mail
15578 doesn't allow you to do what you want, you can set
15579 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
15580 play with the @code{nnmail-split-fancy} variable.
15581
15582 Let's look at an example value of this variable first:
15583
15584 @lisp
15585 ;; @r{Messages from the mailer daemon are not crossposted to any of}
15586 ;; @r{the ordinary groups.  Warnings are put in a separate group}
15587 ;; @r{from real errors.}
15588 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
15589                    "mail.misc"))
15590    ;; @r{Non-error messages are crossposted to all relevant}
15591    ;; @r{groups, but we don't crosspost between the group for the}
15592    ;; @r{(ding) list and the group for other (ding) related mail.}
15593    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
15594          ("subject" "ding" "ding.misc"))
15595       ;; @r{Other mailing lists@dots{}}
15596       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
15597       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
15598       ;; @r{Both lists below have the same suffix, so prevent}
15599       ;; @r{cross-posting to mkpkg.list of messages posted only to}
15600       ;; @r{the bugs- list, but allow cross-posting when the}
15601       ;; @r{message was really cross-posted.}
15602       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
15603       (any "mypackage@@somewhere" - "bugs-mypackage" "mypkg.list")
15604       ;; @r{People@dots{}}
15605       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
15606    ;; @r{Unmatched mail goes to the catch all group.}
15607    "misc.misc")
15608 @end lisp
15609
15610 This variable has the format of a @dfn{split}.  A split is a
15611 (possibly) recursive structure where each split may contain other
15612 splits.  Here are the possible split syntaxes:
15613
15614 @table @code
15615
15616 @item group
15617 If the split is a string, that will be taken as a group name.  Normal
15618 regexp match expansion will be done.  See below for examples.
15619
15620 @c Don't fold this line.
15621 @item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split} [@var{invert-partial}])
15622 The split can be a list containing at least three elements.  If the
15623 first element @var{field} (a regexp matching a header) contains
15624 @var{value} (also a regexp) then store the message as specified by
15625 @var{split}.
15626
15627 If @var{restrict} (yet another regexp) matches some string after
15628 @var{field} and before the end of the matched @var{value}, the
15629 @var{split} is ignored.  If none of the @var{restrict} clauses match,
15630 @var{split} is processed.
15631
15632 The last element @var{invert-partial} is optional.  If it is
15633 non-@code{nil}, the match-partial-words behavior controlled by the
15634 variable @code{nnmail-split-fancy-match-partial-words} (see below) is
15635 be inverted.  (New in Gnus 5.10.7)
15636
15637 @item (| @var{split} @dots{})
15638 If the split is a list, and the first element is @code{|} (vertical
15639 bar), then process each @var{split} until one of them matches.  A
15640 @var{split} is said to match if it will cause the mail message to be
15641 stored in one or more groups.
15642
15643 @item (& @var{split} @dots{})
15644 If the split is a list, and the first element is @code{&}, then
15645 process all @var{split}s in the list.
15646
15647 @item junk
15648 If the split is the symbol @code{junk}, then don't save (i.e., delete)
15649 this message.  Use with extreme caution.
15650
15651 @item (: @var{function} @var{arg1} @var{arg2} @dots{})
15652 If the split is a list, and the first element is @samp{:}, then the
15653 second element will be called as a function with @var{args} given as
15654 arguments.  The function should return a @var{split}.
15655
15656 @cindex body split
15657 For instance, the following function could be used to split based on the
15658 body of the messages:
15659
15660 @lisp
15661 (defun split-on-body ()
15662   (save-excursion
15663     (save-restriction
15664       (widen)
15665       (goto-char (point-min))
15666       (when (re-search-forward "Some.*string" nil t)
15667         "string.group"))))
15668 @end lisp
15669
15670 The buffer is narrowed to the header of the message in question when
15671 @var{function} is run.  That's why @code{(widen)} needs to be called
15672 after @code{save-excursion} and @code{save-restriction} in the example
15673 above.  Also note that with the nnimap backend, message bodies will
15674 not be downloaded by default.  You need to set
15675 @code{nnimap-split-download-body} to @code{t} to do that
15676 (@pxref{Splitting in IMAP}).
15677
15678 @item (! @var{func} @var{split})
15679 If the split is a list, and the first element is @code{!}, then
15680 @var{split} will be processed, and @var{func} will be called as a
15681 function with the result of @var{split} as argument.  @var{func}
15682 should return a split.
15683
15684 @item nil
15685 If the split is @code{nil}, it is ignored.
15686
15687 @end table
15688
15689 In these splits, @var{field} must match a complete field name.
15690
15691 Normally, @var{value} in these splits must match a complete @emph{word}
15692 according to the fundamental mode syntax table.  In other words, all
15693 @var{value}'s will be implicitly surrounded by @code{\<...\>} markers,
15694 which are word delimiters.  Therefore, if you use the following split,
15695 for example,
15696
15697 @example
15698 (any "joe" "joemail")
15699 @end example
15700
15701 @noindent
15702 messages sent from @samp{joedavis@@foo.org} will normally not be filed
15703 in @samp{joemail}.  If you want to alter this behavior, you can use any
15704 of the following three ways:
15705
15706 @enumerate
15707 @item
15708 @vindex nnmail-split-fancy-match-partial-words
15709 You can set the @code{nnmail-split-fancy-match-partial-words} variable
15710 to non-@code{nil} in order to ignore word boundaries and instead the
15711 match becomes more like a grep.  This variable controls whether partial
15712 words are matched during fancy splitting.  The default value is
15713 @code{nil}.
15714
15715 Note that it influences all @var{value}'s in your split rules.
15716
15717 @item
15718 @var{value} beginning with @code{.*} ignores word boundaries in front of
15719 a word.  Similarly, if @var{value} ends with @code{.*}, word boundaries
15720 in the rear of a word will be ignored.  For example, the @var{value}
15721 @code{"@@example\\.com"} does not match @samp{foo@@example.com} but
15722 @code{".*@@example\\.com"} does.
15723
15724 @item
15725 You can set the @var{invert-partial} flag in your split rules of the
15726 @samp{(@var{field} @var{value} @dots{})} types, aforementioned in this
15727 section.  If the flag is set, word boundaries on both sides of a word
15728 are ignored even if @code{nnmail-split-fancy-match-partial-words} is
15729 @code{nil}.  Contrarily, if the flag is set, word boundaries are not
15730 ignored even if @code{nnmail-split-fancy-match-partial-words} is
15731 non-@code{nil}.  (New in Gnus 5.10.7)
15732 @end enumerate
15733
15734 @vindex nnmail-split-abbrev-alist
15735 @var{field} and @var{value} can also be Lisp symbols, in that case
15736 they are expanded as specified by the variable
15737 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells,
15738 where the @sc{car} of a cell contains the key, and the @sc{cdr}
15739 contains the associated value.  Predefined entries in
15740 @code{nnmail-split-abbrev-alist} include:
15741
15742 @table @code
15743 @item from
15744 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
15745 @item to
15746 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
15747 @samp{Resent-To} and @samp{Resent-Cc} fields.
15748 @item any
15749 Is the union of the @code{from} and @code{to} entries.
15750 @end table
15751
15752 @vindex nnmail-split-fancy-syntax-table
15753 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
15754 when all this splitting is performed.
15755
15756 If you want to have Gnus create groups dynamically based on some
15757 information in the headers (i.e., do @code{replace-match}-like
15758 substitutions in the group names), you can say things like:
15759
15760 @example
15761 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
15762 @end example
15763
15764 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
15765 will be filed in @samp{mail.debian.foo}.
15766
15767 If the string contains the element @samp{\&}, then the previously
15768 matched string will be substituted.  Similarly, the elements @samp{\\1}
15769 up to @samp{\\9} will be substituted with the text matched by the
15770 groupings 1 through 9.
15771
15772 @vindex nnmail-split-lowercase-expanded
15773 Where @code{nnmail-split-lowercase-expanded} controls whether the
15774 lowercase of the matched string should be used for the substitution.
15775 Setting it as non-@code{nil} is useful to avoid the creation of multiple
15776 groups when users send to an address using different case
15777 (i.e. mailing-list@@domain vs Mailing-List@@Domain).  The default value
15778 is @code{t}.
15779
15780 @findex nnmail-split-fancy-with-parent
15781 @code{nnmail-split-fancy-with-parent} is a function which allows you to
15782 split followups into the same groups their parents are in.  Sometimes
15783 you can't make splitting rules for all your mail.  For example, your
15784 boss might send you personal mail regarding different projects you are
15785 working on, and as you can't tell your boss to put a distinguishing
15786 string into the subject line, you have to resort to manually moving the
15787 messages into the right group.  With this function, you only have to do
15788 it once per thread.
15789
15790 To use this feature, you have to set @code{nnmail-treat-duplicates}
15791 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
15792 value.  And then you can include @code{nnmail-split-fancy-with-parent}
15793 using the colon feature, like so:
15794 @lisp
15795 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
15796       nnmail-cache-accepted-message-ids t
15797       nnmail-split-fancy
15798       '(| (: nnmail-split-fancy-with-parent)
15799           ;; @r{other splits go here}
15800         ))
15801 @end lisp
15802
15803 This feature works as follows: when @code{nnmail-treat-duplicates} is
15804 non-@code{nil}, Gnus records the message id of every message it sees
15805 in the file specified by the variable
15806 @code{nnmail-message-id-cache-file}, together with the group it is in
15807 (the group is omitted for non-mail messages).  When mail splitting is
15808 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
15809 at the References (and In-Reply-To) header of each message to split
15810 and searches the file specified by @code{nnmail-message-id-cache-file}
15811 for the message ids.  When it has found a parent, it returns the
15812 corresponding group name unless the group name matches the regexp
15813 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
15814 recommended that you set @code{nnmail-message-id-cache-length} to a
15815 somewhat higher number than the default so that the message ids are
15816 still in the cache.  (A value of 5000 appears to create a file some
15817 300 kBytes in size.)
15818 @vindex nnmail-cache-accepted-message-ids
15819 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
15820 also records the message ids of moved articles, so that the followup
15821 messages goes into the new group.
15822
15823 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
15824 want certain groups to be recorded in the cache.  For example, if all
15825 outgoing messages are written to an ``outgoing'' group, you could set
15826 @code{nnmail-cache-ignore-groups} to match that group name.
15827 Otherwise, answers to all your messages would end up in the
15828 ``outgoing'' group.
15829
15830
15831 @node Group Mail Splitting
15832 @subsection Group Mail Splitting
15833 @cindex mail splitting
15834 @cindex group mail splitting
15835
15836 @findex gnus-group-split
15837 If you subscribe to dozens of mailing lists but you don't want to
15838 maintain mail splitting rules manually, group mail splitting is for you.
15839 You just have to set @code{to-list} and/or @code{to-address} in group
15840 parameters or group customization and set @code{nnmail-split-methods} to
15841 @code{gnus-group-split}.  This splitting function will scan all groups
15842 for those parameters and split mail accordingly, i.e., messages posted
15843 from or to the addresses specified in the parameters @code{to-list} or
15844 @code{to-address} of a mail group will be stored in that group.
15845
15846 Sometimes, mailing lists have multiple addresses, and you may want mail
15847 splitting to recognize them all: just set the @code{extra-aliases} group
15848 parameter to the list of additional addresses and it's done.  If you'd
15849 rather use a regular expression, set @code{split-regexp}.
15850
15851 All these parameters in a group will be used to create an
15852 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
15853 the @var{value} is a single regular expression that matches
15854 @code{to-list}, @code{to-address}, all of @code{extra-aliases} and all
15855 matches of @code{split-regexp}, and the @var{split} is the name of the
15856 group.  @var{restrict}s are also supported: just set the
15857 @code{split-exclude} parameter to a list of regular expressions.
15858
15859 If you can't get the right split to be generated using all these
15860 parameters, or you just need something fancier, you can set the
15861 parameter @code{split-spec} to an @code{nnmail-split-fancy} split.  In
15862 this case, all other aforementioned parameters will be ignored by
15863 @code{gnus-group-split}.  In particular, @code{split-spec} may be set to
15864 @code{nil}, in which case the group will be ignored by
15865 @code{gnus-group-split}.
15866
15867 @vindex gnus-group-split-default-catch-all-group
15868 @code{gnus-group-split} will do cross-posting on all groups that match,
15869 by defining a single @code{&} fancy split containing one split for each
15870 group.  If a message doesn't match any split, it will be stored in the
15871 group named in @code{gnus-group-split-default-catch-all-group}, unless
15872 some group has @code{split-spec} set to @code{catch-all}, in which case
15873 that group is used as the catch-all group.  Even though this variable is
15874 often used just to name a group, it may also be set to an arbitrarily
15875 complex fancy split (after all, a group name is a fancy split), and this
15876 may be useful to split mail that doesn't go to any mailing list to
15877 personal mail folders.  Note that this fancy split is added as the last
15878 element of a @code{|} split list that also contains a @code{&} split
15879 with the rules extracted from group parameters.
15880
15881 It's time for an example.  Assume the following group parameters have
15882 been defined:
15883
15884 @example
15885 nnml:mail.bar:
15886 ((to-address . "bar@@femail.com")
15887  (split-regexp . ".*@@femail\\.com"))
15888 nnml:mail.foo:
15889 ((to-list . "foo@@nowhere.gov")
15890  (extra-aliases "foo@@localhost" "foo-redist@@home")
15891  (split-exclude "bugs-foo" "rambling-foo")
15892  (admin-address . "foo-request@@nowhere.gov"))
15893 nnml:mail.others:
15894 ((split-spec . catch-all))
15895 @end example
15896
15897 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
15898 behave as if @code{nnmail-split-fancy} had been selected and variable
15899 @code{nnmail-split-fancy} had been set as follows:
15900
15901 @lisp
15902 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
15903       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
15904            - "bugs-foo" - "rambling-foo" "mail.foo"))
15905    "mail.others")
15906 @end lisp
15907
15908 @findex gnus-group-split-fancy
15909 If you'd rather not use group splitting for all your mail groups, you
15910 may use it for only some of them, by using @code{nnmail-split-fancy}
15911 splits like this:
15912
15913 @lisp
15914 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
15915 @end lisp
15916
15917 @var{groups} may be a regular expression or a list of group names whose
15918 parameters will be scanned to generate the output split.
15919 @var{no-crosspost} can be used to disable cross-posting; in this case, a
15920 single @code{|} split will be output.  @var{catch-all} is the fall back
15921 fancy split, used like @code{gnus-group-split-default-catch-all-group}.
15922 If @var{catch-all} is @code{nil}, or if @code{split-regexp} matches the
15923 empty string in any selected group, no catch-all split will be issued.
15924 Otherwise, if some group has @code{split-spec} set to @code{catch-all},
15925 this group will override the value of the @var{catch-all} argument.
15926
15927 @findex gnus-group-split-setup
15928 Unfortunately, scanning all groups and their parameters can be quite
15929 slow, especially considering that it has to be done for every message.
15930 But don't despair!  The function @code{gnus-group-split-setup} can be
15931 used to enable @code{gnus-group-split} in a much more efficient way.  It
15932 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
15933 @code{nnmail-split-fancy} to the split produced by
15934 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
15935 scanned once, no matter how many messages are split.
15936
15937 @findex gnus-group-split-update
15938 However, if you change group parameters, you'd have to update
15939 @code{nnmail-split-fancy} manually.  You can do it by running
15940 @code{gnus-group-split-update}.  If you'd rather have it updated
15941 automatically, just tell @code{gnus-group-split-setup} to do it for
15942 you.  For example, add to your @file{~/.gnus.el}:
15943
15944 @lisp
15945 (gnus-group-split-setup @var{auto-update} @var{catch-all})
15946 @end lisp
15947
15948 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
15949 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
15950 have to worry about updating @code{nnmail-split-fancy} again.  If you
15951 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
15952 @code{gnus-group-split-default-catch-all-group} will be set to its
15953 value.
15954
15955 @vindex gnus-group-split-updated-hook
15956 Because you may want to change @code{nnmail-split-fancy} after it is set
15957 by @code{gnus-group-split-update}, this function will run
15958 @code{gnus-group-split-updated-hook} just before finishing.
15959
15960 @node Incorporating Old Mail
15961 @subsection Incorporating Old Mail
15962 @cindex incorporating old mail
15963 @cindex import old mail
15964
15965 Most people have lots of old mail stored in various file formats.  If
15966 you have set up Gnus to read mail using one of the spiffy Gnus mail
15967 back ends, you'll probably wish to have that old mail incorporated into
15968 your mail groups.
15969
15970 Doing so can be quite easy.
15971
15972 To take an example: You're reading mail using @code{nnml}
15973 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
15974 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
15975 file filled with important, but old, mail.  You want to move it into
15976 your @code{nnml} groups.
15977
15978 Here's how:
15979
15980 @enumerate
15981 @item
15982 Go to the group buffer.
15983
15984 @item
15985 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
15986 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
15987
15988 @item
15989 Type @kbd{SPACE} to enter the newly created group.
15990
15991 @item
15992 Type @kbd{M P b} to process-mark all articles in this group's buffer
15993 (@pxref{Setting Process Marks}).
15994
15995 @item
15996 Type @kbd{B r} to respool all the process-marked articles, and answer
15997 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
15998 @end enumerate
15999
16000 All the mail messages in the mbox file will now also be spread out over
16001 all your @code{nnml} groups.  Try entering them and check whether things
16002 have gone without a glitch.  If things look ok, you may consider
16003 deleting the mbox file, but I wouldn't do that unless I was absolutely
16004 sure that all the mail has ended up where it should be.
16005
16006 Respooling is also a handy thing to do if you're switching from one mail
16007 back end to another.  Just respool all the mail in the old mail groups
16008 using the new mail back end.
16009
16010
16011 @node Expiring Mail
16012 @subsection Expiring Mail
16013 @cindex article expiry
16014 @cindex expiring mail
16015
16016 Traditional mail readers have a tendency to remove mail articles when
16017 you mark them as read, in some way.  Gnus takes a fundamentally
16018 different approach to mail reading.
16019
16020 Gnus basically considers mail just to be news that has been received in
16021 a rather peculiar manner.  It does not think that it has the power to
16022 actually change the mail, or delete any mail messages.  If you enter a
16023 mail group, and mark articles as ``read'', or kill them in some other
16024 fashion, the mail articles will still exist on the system.  I repeat:
16025 Gnus will not delete your old, read mail.  Unless you ask it to, of
16026 course.
16027
16028 To make Gnus get rid of your unwanted mail, you have to mark the
16029 articles as @dfn{expirable}.  (With the default key bindings, this means
16030 that you have to type @kbd{E}.)  This does not mean that the articles
16031 will disappear right away, however.  In general, a mail article will be
16032 deleted from your system if, 1) it is marked as expirable, AND 2) it is
16033 more than one week old.  If you do not mark an article as expirable, it
16034 will remain on your system until hell freezes over.  This bears
16035 repeating one more time, with some spurious capitalizations: IF you do
16036 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
16037
16038 You do not have to mark articles as expirable by hand.  Gnus provides
16039 two features, called ``auto-expire'' and ``total-expire'', that can help you
16040 with this.  In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
16041 for you when you select an article.  And ``total-expire'' means that Gnus
16042 considers all articles as expirable that are read.  So, in addition to
16043 the articles marked @samp{E}, also the articles marked @samp{r},
16044 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
16045 expirable.
16046
16047 When should either auto-expire or total-expire be used?  Most people
16048 who are subscribed to mailing lists split each list into its own group
16049 and then turn on auto-expire or total-expire for those groups.
16050 (@xref{Splitting Mail}, for more information on splitting each list
16051 into its own group.)
16052
16053 Which one is better, auto-expire or total-expire?  It's not easy to
16054 answer.  Generally speaking, auto-expire is probably faster.  Another
16055 advantage of auto-expire is that you get more marks to work with: for
16056 the articles that are supposed to stick around, you can still choose
16057 between tick and dormant and read marks.  But with total-expire, you
16058 only have dormant and ticked to choose from.  The advantage of
16059 total-expire is that it works well with adaptive scoring (@pxref{Adaptive
16060 Scoring}).  Auto-expire works with normal scoring but not with adaptive
16061 scoring.
16062
16063 @vindex gnus-auto-expirable-newsgroups
16064 Groups that match the regular expression
16065 @code{gnus-auto-expirable-newsgroups} will have all articles that you
16066 read marked as expirable automatically.  All articles marked as
16067 expirable have an @samp{E} in the first column in the summary buffer.
16068
16069 By default, if you have auto expiry switched on, Gnus will mark all the
16070 articles you read as expirable, no matter if they were read or unread
16071 before.  To avoid having articles marked as read marked as expirable
16072 automatically, you can put something like the following in your
16073 @file{~/.gnus.el} file:
16074
16075 @vindex gnus-mark-article-hook
16076 @lisp
16077 (remove-hook 'gnus-mark-article-hook
16078              'gnus-summary-mark-read-and-unread-as-read)
16079 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
16080 @end lisp
16081
16082 Note that making a group auto-expirable doesn't mean that all read
16083 articles are expired---only the articles marked as expirable
16084 will be expired.  Also note that using the @kbd{d} command won't make
16085 articles expirable---only semi-automatic marking of articles as read will
16086 mark the articles as expirable in auto-expirable groups.
16087
16088 Let's say you subscribe to a couple of mailing lists, and you want the
16089 articles you have read to disappear after a while:
16090
16091 @lisp
16092 (setq gnus-auto-expirable-newsgroups
16093       "mail.nonsense-list\\|mail.nice-list")
16094 @end lisp
16095
16096 Another way to have auto-expiry happen is to have the element
16097 @code{auto-expire} in the group parameters of the group.
16098
16099 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
16100 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
16101 don't really mix very well.
16102
16103 @vindex nnmail-expiry-wait
16104 The @code{nnmail-expiry-wait} variable supplies the default time an
16105 expirable article has to live.  Gnus starts counting days from when the
16106 message @emph{arrived}, not from when it was sent.  The default is seven
16107 days.
16108
16109 Gnus also supplies a function that lets you fine-tune how long articles
16110 are to live, based on what group they are in.  Let's say you want to
16111 have one month expiry period in the @samp{mail.private} group, a one day
16112 expiry period in the @samp{mail.junk} group, and a six day expiry period
16113 everywhere else:
16114
16115 @vindex nnmail-expiry-wait-function
16116 @lisp
16117 (setq nnmail-expiry-wait-function
16118       (lambda (group)
16119        (cond ((string= group "mail.private")
16120                31)
16121              ((string= group "mail.junk")
16122                1)
16123              ((string= group "important")
16124                'never)
16125              (t
16126                6))))
16127 @end lisp
16128
16129 The group names this function is fed are ``unadorned'' group
16130 names---no @samp{nnml:} prefixes and the like.
16131
16132 The @code{nnmail-expiry-wait} variable and
16133 @code{nnmail-expiry-wait-function} function can either be a number (not
16134 necessarily an integer) or one of the symbols @code{immediate} or
16135 @code{never}.
16136
16137 You can also use the @code{expiry-wait} group parameter to selectively
16138 change the expiry period (@pxref{Group Parameters}).
16139
16140 @vindex nnmail-expiry-target
16141 The normal action taken when expiring articles is to delete them.
16142 However, in some circumstances it might make more sense to move them
16143 to other groups instead of deleting them.  The variable
16144 @code{nnmail-expiry-target} (and the @code{expiry-target} group
16145 parameter) controls this.  The variable supplies a default value for
16146 all groups, which can be overridden for specific groups by the group
16147 parameter.  default value is @code{delete}, but this can also be a
16148 string (which should be the name of the group the message should be
16149 moved to), or a function (which will be called in a buffer narrowed to
16150 the message in question, and with the name of the group being moved
16151 from as its parameter) which should return a target---either a group
16152 name or @code{delete}.
16153
16154 Here's an example for specifying a group name:
16155 @lisp
16156 (setq nnmail-expiry-target "nnml:expired")
16157 @end lisp
16158
16159 @findex nnmail-fancy-expiry-target
16160 @vindex nnmail-fancy-expiry-targets
16161 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
16162 expire mail to groups according to the variable
16163 @code{nnmail-fancy-expiry-targets}.  Here's an example:
16164
16165 @lisp
16166  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
16167        nnmail-fancy-expiry-targets
16168        '((to-from "boss" "nnfolder:Work")
16169          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
16170          ("from" ".*" "nnfolder:Archive-%Y")))
16171 @end lisp
16172
16173 With this setup, any mail that has @code{IMPORTANT} in its Subject
16174 header and was sent in the year @code{YYYY} and month @code{MMM}, will
16175 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}.  If its
16176 From or To header contains the string @code{boss}, it will get expired
16177 to @code{nnfolder:Work}.  All other mail will get expired to
16178 @code{nnfolder:Archive-YYYY}.
16179
16180 @vindex nnmail-keep-last-article
16181 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
16182 expire the final article in a mail newsgroup.  This is to make life
16183 easier for procmail users.
16184
16185 @vindex gnus-total-expirable-newsgroups
16186 By the way: That line up there, about Gnus never expiring non-expirable
16187 articles, is a lie.  If you put @code{total-expire} in the group
16188 parameters, articles will not be marked as expirable, but all read
16189 articles will be put through the expiry process.  Use with extreme
16190 caution.  Even more dangerous is the
16191 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
16192 this regexp will have all read articles put through the expiry process,
16193 which means that @emph{all} old mail articles in the groups in question
16194 will be deleted after a while.  Use with extreme caution, and don't come
16195 crying to me when you discover that the regexp you used matched the
16196 wrong group and all your important mail has disappeared.  Be a
16197 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
16198 with!  So there!
16199
16200 Most people make most of their mail groups total-expirable, though.
16201
16202 @vindex gnus-inhibit-user-auto-expire
16203 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
16204 commands will not mark an article as expirable, even if the group has
16205 auto-expire turned on.
16206
16207
16208 @node Washing Mail
16209 @subsection Washing Mail
16210 @cindex mail washing
16211 @cindex list server brain damage
16212 @cindex incoming mail treatment
16213
16214 Mailers and list servers are notorious for doing all sorts of really,
16215 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
16216 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
16217 end of all lines passing through our server, so let's do that!!!!1!''
16218 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
16219 considered to be self-evident were not discussed.  So.  Here we are.
16220
16221 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
16222 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
16223 be shocked and dismayed by this, but I haven't got the energy.  It is to
16224 laugh.
16225
16226 Gnus provides a plethora of functions for washing articles while
16227 displaying them, but it might be nicer to do the filtering before
16228 storing the mail to disk.  For that purpose, we have three hooks and
16229 various functions that can be put in these hooks.
16230
16231 @table @code
16232 @item nnmail-prepare-incoming-hook
16233 @vindex nnmail-prepare-incoming-hook
16234 This hook is called before doing anything with the mail and is meant for
16235 grand, sweeping gestures.  It is called in a buffer that contains all
16236 the new, incoming mail.  Functions to be used include:
16237
16238 @table @code
16239 @item nnheader-ms-strip-cr
16240 @findex nnheader-ms-strip-cr
16241 Remove trailing carriage returns from each line.  This is default on
16242 Emacs running on MS machines.
16243
16244 @end table
16245
16246 @item nnmail-prepare-incoming-header-hook
16247 @vindex nnmail-prepare-incoming-header-hook
16248 This hook is called narrowed to each header.  It can be used when
16249 cleaning up the headers.  Functions that can be used include:
16250
16251 @table @code
16252 @item nnmail-remove-leading-whitespace
16253 @findex nnmail-remove-leading-whitespace
16254 Clear leading white space that ``helpful'' listservs have added to the
16255 headers to make them look nice.  Aaah.
16256
16257 (Note that this function works on both the header on the body of all
16258 messages, so it is a potentially dangerous function to use (if a body
16259 of a message contains something that looks like a header line).  So
16260 rather than fix the bug, it is of course the right solution to make it
16261 into a feature by documenting it.)
16262
16263 @item nnmail-remove-list-identifiers
16264 @findex nnmail-remove-list-identifiers
16265 Some list servers add an identifier---for example, @samp{(idm)}---to the
16266 beginning of all @code{Subject} headers.  I'm sure that's nice for
16267 people who use stone age mail readers.  This function will remove
16268 strings that match the @code{nnmail-list-identifiers} regexp, which can
16269 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
16270 @code{\\(..\\)}.
16271
16272 For instance, if you want to remove the @samp{(idm)} and the
16273 @samp{nagnagnag} identifiers:
16274
16275 @lisp
16276 (setq nnmail-list-identifiers
16277       '("(idm)" "nagnagnag"))
16278 @end lisp
16279
16280 This can also be done non-destructively with
16281 @code{gnus-list-identifiers}, @xref{Article Hiding}.
16282
16283 @item nnmail-remove-tabs
16284 @findex nnmail-remove-tabs
16285 Translate all @samp{TAB} characters into @samp{SPACE} characters.
16286
16287 @item nnmail-ignore-broken-references
16288 @findex nnmail-ignore-broken-references
16289 @c @findex nnmail-fix-eudora-headers
16290 @cindex Eudora
16291 @cindex Pegasus
16292 Some mail user agents (e.g. Eudora and Pegasus) produce broken
16293 @code{References} headers, but correct @code{In-Reply-To} headers.  This
16294 function will get rid of the @code{References} header if the headers
16295 contain a line matching the regular expression
16296 @code{nnmail-broken-references-mailers}.
16297
16298 @end table
16299
16300 @item nnmail-prepare-incoming-message-hook
16301 @vindex nnmail-prepare-incoming-message-hook
16302 This hook is called narrowed to each message.  Functions to be used
16303 include:
16304
16305 @table @code
16306 @item article-de-quoted-unreadable
16307 @findex article-de-quoted-unreadable
16308 Decode Quoted Readable encoding.
16309
16310 @end table
16311 @end table
16312
16313
16314 @node Duplicates
16315 @subsection Duplicates
16316
16317 @vindex nnmail-treat-duplicates
16318 @vindex nnmail-message-id-cache-length
16319 @vindex nnmail-message-id-cache-file
16320 @cindex duplicate mails
16321 If you are a member of a couple of mailing lists, you will sometimes
16322 receive two copies of the same mail.  This can be quite annoying, so
16323 @code{nnmail} checks for and treats any duplicates it might find.  To do
16324 this, it keeps a cache of old @code{Message-ID}s---
16325 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
16326 default.  The approximate maximum number of @code{Message-ID}s stored
16327 there is controlled by the @code{nnmail-message-id-cache-length}
16328 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
16329 stored.) If all this sounds scary to you, you can set
16330 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
16331 default), and @code{nnmail} won't delete duplicate mails.  Instead it
16332 will insert a warning into the head of the mail saying that it thinks
16333 that this is a duplicate of a different message.
16334
16335 This variable can also be a function.  If that's the case, the function
16336 will be called from a buffer narrowed to the message in question with
16337 the @code{Message-ID} as a parameter.  The function must return either
16338 @code{nil}, @code{warn}, or @code{delete}.
16339
16340 You can turn this feature off completely by setting the variable to
16341 @code{nil}.
16342
16343 If you want all the duplicate mails to be put into a special
16344 @dfn{duplicates} group, you could do that using the normal mail split
16345 methods:
16346
16347 @lisp
16348 (setq nnmail-split-fancy
16349       '(| ;; @r{Messages duplicates go to a separate group.}
16350         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
16351         ;; @r{Message from daemons, postmaster, and the like to another.}
16352         (any mail "mail.misc")
16353         ;; @r{Other rules.}
16354         [...] ))
16355 @end lisp
16356 @noindent
16357 Or something like:
16358 @lisp
16359 (setq nnmail-split-methods
16360       '(("duplicates" "^Gnus-Warning:.*duplicate")
16361         ;; @r{Other rules.}
16362         [...]))
16363 @end lisp
16364
16365 Here's a neat feature: If you know that the recipient reads her mail
16366 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
16367 @code{delete}, you can send her as many insults as you like, just by
16368 using a @code{Message-ID} of a mail that you know that she's already
16369 received.  Think of all the fun!  She'll never see any of it!  Whee!
16370
16371
16372 @node Not Reading Mail
16373 @subsection Not Reading Mail
16374
16375 If you start using any of the mail back ends, they have the annoying
16376 habit of assuming that you want to read mail with them.  This might not
16377 be unreasonable, but it might not be what you want.
16378
16379 If you set @code{mail-sources} and @code{nnmail-spool-file} to
16380 @code{nil}, none of the back ends will ever attempt to read incoming
16381 mail, which should help.
16382
16383 @vindex nnbabyl-get-new-mail
16384 @vindex nnmbox-get-new-mail
16385 @vindex nnml-get-new-mail
16386 @vindex nnmh-get-new-mail
16387 @vindex nnfolder-get-new-mail
16388 This might be too much, if, for instance, you are reading mail quite
16389 happily with @code{nnml} and just want to peek at some old Rmail
16390 file you have stashed away with @code{nnbabyl}.  All back ends have
16391 variables called back-end-@code{get-new-mail}.  If you want to disable
16392 the @code{nnbabyl} mail reading, you edit the virtual server for the
16393 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
16394
16395 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
16396 narrowed to the article to be saved before saving it when reading
16397 incoming mail.
16398
16399
16400 @node Choosing a Mail Back End
16401 @subsection Choosing a Mail Back End
16402
16403 Gnus will read the mail spool when you activate a mail group.  The mail
16404 file is first copied to your home directory.  What happens after that
16405 depends on what format you want to store your mail in.
16406
16407 There are six different mail back ends in the standard Gnus, and more
16408 back ends are available separately.  The mail back end most people use
16409 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
16410 Spool}).
16411
16412 @menu
16413 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
16414 * Rmail Babyl::                 Emacs programs use the Rmail Babyl format.
16415 * Mail Spool::                  Store your mail in a private spool?
16416 * MH Spool::                    An mhspool-like back end.
16417 * Maildir::                     Another one-file-per-message format.
16418 * Mail Folders::                Having one file for each group.
16419 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
16420 @end menu
16421
16422
16423 @node Unix Mail Box
16424 @subsubsection Unix Mail Box
16425 @cindex nnmbox
16426 @cindex unix mail box
16427
16428 @vindex nnmbox-active-file
16429 @vindex nnmbox-mbox-file
16430 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
16431 mail.  @code{nnmbox} will add extra headers to each mail article to say
16432 which group it belongs in.
16433
16434 Virtual server settings:
16435
16436 @table @code
16437 @item nnmbox-mbox-file
16438 @vindex nnmbox-mbox-file
16439 The name of the mail box in the user's home directory.  Default is
16440 @file{~/mbox}.
16441
16442 @item nnmbox-active-file
16443 @vindex nnmbox-active-file
16444 The name of the active file for the mail box.  Default is
16445 @file{~/.mbox-active}.
16446
16447 @item nnmbox-get-new-mail
16448 @vindex nnmbox-get-new-mail
16449 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
16450 into groups.  Default is @code{t}.
16451 @end table
16452
16453
16454 @node Rmail Babyl
16455 @subsubsection Rmail Babyl
16456 @cindex nnbabyl
16457 @cindex Rmail mbox
16458
16459 @vindex nnbabyl-active-file
16460 @vindex nnbabyl-mbox-file
16461 The @dfn{nnbabyl} back end will use a Babyl mail box (aka. @dfn{Rmail
16462 mbox}) to store mail.  @code{nnbabyl} will add extra headers to each
16463 mail article to say which group it belongs in.
16464
16465 Virtual server settings:
16466
16467 @table @code
16468 @item nnbabyl-mbox-file
16469 @vindex nnbabyl-mbox-file
16470 The name of the Rmail mbox file.  The default is @file{~/RMAIL}
16471
16472 @item nnbabyl-active-file
16473 @vindex nnbabyl-active-file
16474 The name of the active file for the rmail box.  The default is
16475 @file{~/.rmail-active}
16476
16477 @item nnbabyl-get-new-mail
16478 @vindex nnbabyl-get-new-mail
16479 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
16480 @code{t}
16481 @end table
16482
16483
16484 @node Mail Spool
16485 @subsubsection Mail Spool
16486 @cindex nnml
16487 @cindex mail @acronym{NOV} spool
16488
16489 The @dfn{nnml} spool mail format isn't compatible with any other known
16490 format.  It should be used with some caution.
16491
16492 @vindex nnml-directory
16493 If you use this back end, Gnus will split all incoming mail into files,
16494 one file for each mail, and put the articles into the corresponding
16495 directories under the directory specified by the @code{nnml-directory}
16496 variable.  The default value is @file{~/Mail/}.
16497
16498 You do not have to create any directories beforehand; Gnus will take
16499 care of all that.
16500
16501 If you have a strict limit as to how many files you are allowed to store
16502 in your account, you should not use this back end.  As each mail gets its
16503 own file, you might very well occupy thousands of inodes within a few
16504 weeks.  If this is no problem for you, and it isn't a problem for you
16505 having your friendly systems administrator walking around, madly,
16506 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
16507 know that this is probably the fastest format to use.  You do not have
16508 to trudge through a big mbox file just to read your new mail.
16509
16510 @code{nnml} is probably the slowest back end when it comes to article
16511 splitting.  It has to create lots of files, and it also generates
16512 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
16513 fastest back end when it comes to reading mail.
16514
16515 @cindex self contained nnml servers
16516 @cindex marks
16517 When the marks file is used (which it is by default), @code{nnml}
16518 servers have the property that you may backup them using @code{tar} or
16519 similar, and later be able to restore them into Gnus (by adding the
16520 proper @code{nnml} server) and have all your marks be preserved.  Marks
16521 for a group are usually stored in the @code{.marks} file (but see
16522 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
16523 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
16524 to restore the group (after restoring the backup into the nnml
16525 directory).
16526
16527 If for some reason you believe your @file{.marks} files are screwed
16528 up, you can just delete them all.  Gnus will then correctly regenerate
16529 them next time it starts.
16530
16531 Virtual server settings:
16532
16533 @table @code
16534 @item nnml-directory
16535 @vindex nnml-directory
16536 All @code{nnml} directories will be placed under this directory.  The
16537 default is the value of @code{message-directory} (whose default value
16538 is @file{~/Mail}).
16539
16540 @item nnml-active-file
16541 @vindex nnml-active-file
16542 The active file for the @code{nnml} server.  The default is
16543 @file{~/Mail/active}.
16544
16545 @item nnml-newsgroups-file
16546 @vindex nnml-newsgroups-file
16547 The @code{nnml} group descriptions file.  @xref{Newsgroups File
16548 Format}.  The default is @file{~/Mail/newsgroups}.
16549
16550 @item nnml-get-new-mail
16551 @vindex nnml-get-new-mail
16552 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
16553 @code{t}.
16554
16555 @item nnml-nov-is-evil
16556 @vindex nnml-nov-is-evil
16557 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
16558 default is @code{nil}.
16559
16560 @item nnml-nov-file-name
16561 @vindex nnml-nov-file-name
16562 The name of the @acronym{NOV} files.  The default is @file{.overview}.
16563
16564 @item nnml-prepare-save-mail-hook
16565 @vindex nnml-prepare-save-mail-hook
16566 Hook run narrowed to an article before saving.
16567
16568 @item nnml-marks-is-evil
16569 @vindex nnml-marks-is-evil
16570 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
16571 default is @code{nil}.
16572
16573 @item nnml-marks-file-name
16574 @vindex nnml-marks-file-name
16575 The name of the @dfn{marks} files.  The default is @file{.marks}.
16576
16577 @item nnml-use-compressed-files
16578 @vindex nnml-use-compressed-files
16579 If non-@code{nil}, @code{nnml} will allow using compressed message
16580 files.  This requires @code{auto-compression-mode} to be enabled
16581 (@pxref{Compressed Files, ,Compressed Files, emacs, The Emacs Manual}).
16582 If the value of @code{nnml-use-compressed-files} is a string, it is used
16583 as the file extension specifying the compression program.  You can set it
16584 to @samp{.bz2} if your Emacs supports it.  A value of @code{t} is
16585 equivalent to @samp{.gz}.
16586
16587 @item nnml-compressed-files-size-threshold
16588 @vindex nnml-compressed-files-size-threshold
16589 Default size threshold for compressed message files.  Message files with
16590 bodies larger than that many characters will be automatically compressed
16591 if @code{nnml-use-compressed-files} is non-@code{nil}.
16592
16593 @end table
16594
16595 @findex nnml-generate-nov-databases
16596 If your @code{nnml} groups and @acronym{NOV} files get totally out of
16597 whack, you can do a complete update by typing @kbd{M-x
16598 nnml-generate-nov-databases}.  This command will trawl through the
16599 entire @code{nnml} hierarchy, looking at each and every article, so it
16600 might take a while to complete.  A better interface to this
16601 functionality can be found in the server buffer (@pxref{Server
16602 Commands}).
16603
16604
16605 @node MH Spool
16606 @subsubsection MH Spool
16607 @cindex nnmh
16608 @cindex mh-e mail spool
16609
16610 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
16611 @acronym{NOV} databases and it doesn't keep an active file or marks
16612 file.  This makes @code{nnmh} a @emph{much} slower back end than
16613 @code{nnml}, but it also makes it easier to write procmail scripts
16614 for.
16615
16616 Virtual server settings:
16617
16618 @table @code
16619 @item nnmh-directory
16620 @vindex nnmh-directory
16621 All @code{nnmh} directories will be located under this directory.  The
16622 default is the value of @code{message-directory} (whose default is
16623 @file{~/Mail})
16624
16625 @item nnmh-get-new-mail
16626 @vindex nnmh-get-new-mail
16627 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
16628 @code{t}.
16629
16630 @item nnmh-be-safe
16631 @vindex nnmh-be-safe
16632 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
16633 sure that the articles in the folder are actually what Gnus thinks
16634 they are.  It will check date stamps and stat everything in sight, so
16635 setting this to @code{t} will mean a serious slow-down.  If you never
16636 use anything but Gnus to read the @code{nnmh} articles, you do not
16637 have to set this variable to @code{t}.  The default is @code{nil}.
16638 @end table
16639
16640
16641 @node Maildir
16642 @subsubsection Maildir
16643 @cindex nnmaildir
16644 @cindex maildir
16645
16646 @code{nnmaildir} stores mail in the maildir format, with each maildir
16647 corresponding to a group in Gnus.  This format is documented here:
16648 @uref{http://cr.yp.to/proto/maildir.html} and here:
16649 @uref{http://www.qmail.org/man/man5/maildir.html}.  @code{nnmaildir}
16650 also stores extra information in the @file{.nnmaildir/} directory
16651 within a maildir.
16652
16653 Maildir format was designed to allow concurrent deliveries and
16654 reading, without needing locks.  With other back ends, you would have
16655 your mail delivered to a spool of some kind, and then you would
16656 configure Gnus to split mail from that spool into your groups.  You
16657 can still do that with @code{nnmaildir}, but the more common
16658 configuration is to have your mail delivered directly to the maildirs
16659 that appear as group in Gnus.
16660
16661 @code{nnmaildir} is designed to be perfectly reliable: @kbd{C-g} will
16662 never corrupt its data in memory, and @code{SIGKILL} will never
16663 corrupt its data in the filesystem.
16664
16665 @code{nnmaildir} stores article marks and @acronym{NOV} data in each
16666 maildir.  So you can copy a whole maildir from one Gnus setup to
16667 another, and you will keep your marks.
16668
16669 Virtual server settings:
16670
16671 @table @code
16672 @item directory
16673 For each of your @code{nnmaildir} servers (it's very unlikely that
16674 you'd need more than one), you need to create a directory and populate
16675 it with maildirs or symlinks to maildirs (and nothing else; do not
16676 choose a directory already used for other purposes).  Each maildir
16677 will be represented in Gnus as a newsgroup on that server; the
16678 filename of the symlink will be the name of the group.  Any filenames
16679 in the directory starting with @samp{.} are ignored.  The directory is
16680 scanned when you first start Gnus, and each time you type @kbd{g} in
16681 the group buffer; if any maildirs have been removed or added,
16682 @code{nnmaildir} notices at these times.
16683
16684 The value of the @code{directory} parameter should be a Lisp form
16685 which is processed by @code{eval} and @code{expand-file-name} to get
16686 the path of the directory for this server.  The form is @code{eval}ed
16687 only when the server is opened; the resulting string is used until the
16688 server is closed.  (If you don't know about forms and @code{eval},
16689 don't worry---a simple string will work.)  This parameter is not
16690 optional; you must specify it.  I don't recommend using
16691 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
16692 use that directory by default for various things, and may get confused
16693 if @code{nnmaildir} uses it too.  @code{"~/.nnmaildir"} is a typical
16694 value.
16695
16696 @item target-prefix
16697 This should be a Lisp form which is processed by @code{eval} and
16698 @code{expand-file-name}.  The form is @code{eval}ed only when the
16699 server is opened; the resulting string is used until the server is
16700 closed.
16701
16702 When you create a group on an @code{nnmaildir} server, the maildir is
16703 created with @code{target-prefix} prepended to its name, and a symlink
16704 pointing to that maildir is created, named with the plain group name.
16705 So if @code{directory} is @code{"~/.nnmaildir"} and
16706 @code{target-prefix} is @code{"../maildirs/"}, then when you create
16707 the group @code{foo}, @code{nnmaildir} will create
16708 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
16709 @file{~/.nnmaildir/foo} as a symlink pointing to
16710 @file{../maildirs/foo}.
16711
16712 You can set @code{target-prefix} to a string without any slashes to
16713 create both maildirs and symlinks in the same @code{directory}; in
16714 this case, any maildirs found in @code{directory} whose names start
16715 with @code{target-prefix} will not be listed as groups (but the
16716 symlinks pointing to them will be).
16717
16718 As a special case, if @code{target-prefix} is @code{""} (the default),
16719 then when you create a group, the maildir will be created in
16720 @code{directory} without a corresponding symlink.  Beware that you
16721 cannot use @code{gnus-group-delete-group} on such groups without the
16722 @code{force} argument.
16723
16724 @item directory-files
16725 This should be a function with the same interface as
16726 @code{directory-files} (such as @code{directory-files} itself).  It is
16727 used to scan the server's @code{directory} for maildirs.  This
16728 parameter is optional; the default is
16729 @code{nnheader-directory-files-safe} if
16730 @code{nnheader-directory-files-is-safe} is @code{nil}, and
16731 @code{directory-files} otherwise.
16732 (@code{nnheader-directory-files-is-safe} is checked only once when the
16733 server is opened; if you want to check it each time the directory is
16734 scanned, you'll have to provide your own function that does that.)
16735
16736 @item get-new-mail
16737 If non-@code{nil}, then after scanning for new mail in the group
16738 maildirs themselves as usual, this server will also incorporate mail
16739 the conventional Gnus way, from @code{mail-sources} according to
16740 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
16741 value is @code{nil}.
16742
16743 Do @emph{not} use the same maildir both in @code{mail-sources} and as
16744 an @code{nnmaildir} group.  The results might happen to be useful, but
16745 that would be by chance, not by design, and the results might be
16746 different in the future.  If your split rules create new groups,
16747 remember to supply a @code{create-directory} server parameter.
16748 @end table
16749
16750 @subsubsection Group parameters
16751
16752 @code{nnmaildir} uses several group parameters.  It's safe to ignore
16753 all this; the default behavior for @code{nnmaildir} is the same as the
16754 default behavior for other mail back ends: articles are deleted after
16755 one week, etc.  Except for the expiry parameters, all this
16756 functionality is unique to @code{nnmaildir}, so you can ignore it if
16757 you're just trying to duplicate the behavior you already have with
16758 another back end.
16759
16760 If the value of any of these parameters is a vector, the first element
16761 is evaluated as a Lisp form and the result is used, rather than the
16762 original value.  If the value is not a vector, the value itself is
16763 evaluated as a Lisp form.  (This is why these parameters use names
16764 different from those of other, similar parameters supported by other
16765 back ends: they have different, though similar, meanings.)  (For
16766 numbers, strings, @code{nil}, and @code{t}, you can ignore the
16767 @code{eval} business again; for other values, remember to use an extra
16768 quote and wrap the value in a vector when appropriate.)
16769
16770 @table @code
16771 @item expire-age
16772 An integer specifying the minimum age, in seconds, of an article
16773 before it will be expired, or the symbol @code{never} to specify that
16774 articles should never be expired.  If this parameter is not set,
16775 @code{nnmaildir} falls back to the usual
16776 @code{nnmail-expiry-wait}(@code{-function}) variables (the
16777 @code{expiry-wait} group parameter overrides @code{nnmail-expiry-wait}
16778 and makes @code{nnmail-expiry-wait-function} ineffective).  If you
16779 wanted a value of 3 days, you could use something like @code{[(* 3 24
16780 60 60)]}; @code{nnmaildir} will evaluate the form and use the result.
16781 An article's age is measured starting from the article file's
16782 modification time.  Normally, this is the same as the article's
16783 delivery time, but editing an article makes it younger.  Moving an
16784 article (other than via expiry) may also make an article younger.
16785
16786 @item expire-group
16787 If this is set to a string such as a full Gnus group name, like
16788 @example
16789 "backend+server.address.string:group.name"
16790 @end example
16791 and if it is not the name of the same group that the parameter belongs
16792 to, then articles will be moved to the specified group during expiry
16793 before being deleted.  @emph{If this is set to an @code{nnmaildir}
16794 group, the article will be just as old in the destination group as it
16795 was in the source group.}  So be careful with @code{expire-age} in the
16796 destination group.  If this is set to the name of the same group that
16797 the parameter belongs to, then the article is not expired at all.  If
16798 you use the vector form, the first element is evaluated once for each
16799 article.  So that form can refer to
16800 @code{nnmaildir-article-file-name}, etc., to decide where to put the
16801 article.  @emph{Even if this parameter is not set, @code{nnmaildir}
16802 does not fall back to the @code{expiry-target} group parameter or the
16803 @code{nnmail-expiry-target} variable.}
16804
16805 @item read-only
16806 If this is set to @code{t}, @code{nnmaildir} will treat the articles
16807 in this maildir as read-only.  This means: articles are not renamed
16808 from @file{new/} into @file{cur/}; articles are only found in
16809 @file{new/}, not @file{cur/}; articles are never deleted; articles
16810 cannot be edited.  @file{new/} is expected to be a symlink to the
16811 @file{new/} directory of another maildir---e.g., a system-wide mailbox
16812 containing a mailing list of common interest.  Everything in the
16813 maildir outside @file{new/} is @emph{not} treated as read-only, so for
16814 a shared mailbox, you do still need to set up your own maildir (or
16815 have write permission to the shared mailbox); your maildir just won't
16816 contain extra copies of the articles.
16817
16818 @item directory-files
16819 A function with the same interface as @code{directory-files}.  It is
16820 used to scan the directories in the maildir corresponding to this
16821 group to find articles.  The default is the function specified by the
16822 server's @code{directory-files} parameter.
16823
16824 @item distrust-Lines:
16825 If non-@code{nil}, @code{nnmaildir} will always count the lines of an
16826 article, rather than use the @code{Lines:} header field.  If
16827 @code{nil}, the header field will be used if present.
16828
16829 @item always-marks
16830 A list of mark symbols, such as @code{['(read expire)]}.  Whenever
16831 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
16832 say that all articles have these marks, regardless of whether the
16833 marks stored in the filesystem say so.  This is a proof-of-concept
16834 feature that will probably be removed eventually; it ought to be done
16835 in Gnus proper, or abandoned if it's not worthwhile.
16836
16837 @item never-marks
16838 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
16839 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
16840 say that no articles have these marks, regardless of whether the marks
16841 stored in the filesystem say so.  @code{never-marks} overrides
16842 @code{always-marks}.  This is a proof-of-concept feature that will
16843 probably be removed eventually; it ought to be done in Gnus proper, or
16844 abandoned if it's not worthwhile.
16845
16846 @item nov-cache-size
16847 An integer specifying the size of the @acronym{NOV} memory cache.  To
16848 speed things up, @code{nnmaildir} keeps @acronym{NOV} data in memory
16849 for a limited number of articles in each group.  (This is probably not
16850 worthwhile, and will probably be removed in the future.)  This
16851 parameter's value is noticed only the first time a group is seen after
16852 the server is opened---i.e., when you first start Gnus, typically.
16853 The @acronym{NOV} cache is never resized until the server is closed
16854 and reopened.  The default is an estimate of the number of articles
16855 that would be displayed in the summary buffer: a count of articles
16856 that are either marked with @code{tick} or not marked with
16857 @code{read}, plus a little extra.
16858 @end table
16859
16860 @subsubsection Article identification
16861 Articles are stored in the @file{cur/} subdirectory of each maildir.
16862 Each article file is named like @code{uniq:info}, where @code{uniq}
16863 contains no colons.  @code{nnmaildir} ignores, but preserves, the
16864 @code{:info} part.  (Other maildir readers typically use this part of
16865 the filename to store marks.)  The @code{uniq} part uniquely
16866 identifies the article, and is used in various places in the
16867 @file{.nnmaildir/} subdirectory of the maildir to store information
16868 about the corresponding article.  The full pathname of an article is
16869 available in the variable @code{nnmaildir-article-file-name} after you
16870 request the article in the summary buffer.
16871
16872 @subsubsection NOV data
16873 An article identified by @code{uniq} has its @acronym{NOV} data (used
16874 to generate lines in the summary buffer) stored in
16875 @code{.nnmaildir/nov/uniq}.  There is no
16876 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
16877 need for it---an article's @acronym{NOV} data is updated automatically
16878 when the article or @code{nnmail-extra-headers} has changed.)  You can
16879 force @code{nnmaildir} to regenerate the @acronym{NOV} data for a
16880 single article simply by deleting the corresponding @acronym{NOV}
16881 file, but @emph{beware}: this will also cause @code{nnmaildir} to
16882 assign a new article number for this article, which may cause trouble
16883 with @code{seen} marks, the Agent, and the cache.
16884
16885 @subsubsection Article marks
16886 An article identified by @code{uniq} is considered to have the mark
16887 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
16888 When Gnus asks @code{nnmaildir} for a group's marks, @code{nnmaildir}
16889 looks for such files and reports the set of marks it finds.  When Gnus
16890 asks @code{nnmaildir} to store a new set of marks, @code{nnmaildir}
16891 creates and deletes the corresponding files as needed.  (Actually,
16892 rather than create a new file for each mark, it just creates hard
16893 links to @file{.nnmaildir/markfile}, to save inodes.)
16894
16895 You can invent new marks by creating a new directory in
16896 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
16897 your server, untar it later, and keep your marks.  You can add and
16898 remove marks yourself by creating and deleting mark files.  If you do
16899 this while Gnus is running and your @code{nnmaildir} server is open,
16900 it's best to exit all summary buffers for @code{nnmaildir} groups and
16901 type @kbd{s} in the group buffer first, and to type @kbd{g} or
16902 @kbd{M-g} in the group buffer afterwards.  Otherwise, Gnus might not
16903 pick up the changes, and might undo them.
16904
16905
16906 @node Mail Folders
16907 @subsubsection Mail Folders
16908 @cindex nnfolder
16909 @cindex mbox folders
16910 @cindex mail folders
16911
16912 @code{nnfolder} is a back end for storing each mail group in a
16913 separate file.  Each file is in the standard Un*x mbox format.
16914 @code{nnfolder} will add extra headers to keep track of article
16915 numbers and arrival dates.
16916
16917 @cindex self contained nnfolder servers
16918 @cindex marks
16919 When the marks file is used (which it is by default), @code{nnfolder}
16920 servers have the property that you may backup them using @code{tar} or
16921 similar, and later be able to restore them into Gnus (by adding the
16922 proper @code{nnfolder} server) and have all your marks be preserved.
16923 Marks for a group are usually stored in a file named as the mbox file
16924 with @code{.mrk} concatenated to it (but see
16925 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder}
16926 directory.  Individual @code{nnfolder} groups are also possible to
16927 backup, use @kbd{G m} to restore the group (after restoring the backup
16928 into the @code{nnfolder} directory).
16929
16930 Virtual server settings:
16931
16932 @table @code
16933 @item nnfolder-directory
16934 @vindex nnfolder-directory
16935 All the @code{nnfolder} mail boxes will be stored under this
16936 directory.  The default is the value of @code{message-directory}
16937 (whose default is @file{~/Mail})
16938
16939 @item nnfolder-active-file
16940 @vindex nnfolder-active-file
16941 The name of the active file.  The default is @file{~/Mail/active}.
16942
16943 @item nnfolder-newsgroups-file
16944 @vindex nnfolder-newsgroups-file
16945 The name of the group descriptions file.  @xref{Newsgroups File
16946 Format}.  The default is @file{~/Mail/newsgroups}
16947
16948 @item nnfolder-get-new-mail
16949 @vindex nnfolder-get-new-mail
16950 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The
16951 default is @code{t}
16952
16953 @item nnfolder-save-buffer-hook
16954 @vindex nnfolder-save-buffer-hook
16955 @cindex backup files
16956 Hook run before saving the folders.  Note that Emacs does the normal
16957 backup renaming of files even with the @code{nnfolder} buffers.  If
16958 you wish to switch this off, you could say something like the
16959 following in your @file{.emacs} file:
16960
16961 @lisp
16962 (defun turn-off-backup ()
16963   (set (make-local-variable 'backup-inhibited) t))
16964
16965 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
16966 @end lisp
16967
16968 @item nnfolder-delete-mail-hook
16969 @vindex nnfolder-delete-mail-hook
16970 Hook run in a buffer narrowed to the message that is to be deleted.
16971 This function can be used to copy the message to somewhere else, or to
16972 extract some information from it before removing it.
16973
16974 @item nnfolder-nov-is-evil
16975 @vindex nnfolder-nov-is-evil
16976 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
16977 default is @code{nil}.
16978
16979 @item nnfolder-nov-file-suffix
16980 @vindex nnfolder-nov-file-suffix
16981 The extension for @acronym{NOV} files.  The default is @file{.nov}.
16982
16983 @item nnfolder-nov-directory
16984 @vindex nnfolder-nov-directory
16985 The directory where the @acronym{NOV} files should be stored.  If
16986 @code{nil}, @code{nnfolder-directory} is used.
16987
16988 @item nnfolder-marks-is-evil
16989 @vindex nnfolder-marks-is-evil
16990 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
16991 default is @code{nil}.
16992
16993 @item nnfolder-marks-file-suffix
16994 @vindex nnfolder-marks-file-suffix
16995 The extension for @sc{marks} files.  The default is @file{.mrk}.
16996
16997 @item nnfolder-marks-directory
16998 @vindex nnfolder-marks-directory
16999 The directory where the @sc{marks} files should be stored.  If
17000 @code{nil}, @code{nnfolder-directory} is used.
17001
17002 @end table
17003
17004
17005 @findex nnfolder-generate-active-file
17006 @kindex M-x nnfolder-generate-active-file
17007 If you have lots of @code{nnfolder}-like files you'd like to read with
17008 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
17009 command to make @code{nnfolder} aware of all likely files in
17010 @code{nnfolder-directory}.  This only works if you use long file names,
17011 though.
17012
17013 @node Comparing Mail Back Ends
17014 @subsubsection Comparing Mail Back Ends
17015
17016 First, just for terminology, the @dfn{back end} is the common word for a
17017 low-level access method---a transport, if you will, by which something
17018 is acquired.  The sense is that one's mail has to come from somewhere,
17019 and so selection of a suitable back end is required in order to get that
17020 mail within spitting distance of Gnus.
17021
17022 The same concept exists for Usenet itself: Though access to articles is
17023 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
17024 in the world got at Usenet by running a reader on the machine where the
17025 articles lay (the machine which today we call an @acronym{NNTP} server), and
17026 access was by the reader stepping into the articles' directory spool
17027 area directly.  One can still select between either the @code{nntp} or
17028 @code{nnspool} back ends, to select between these methods, if one happens
17029 actually to live on the server (or can see its spool directly, anyway,
17030 via NFS).
17031
17032 The goal in selecting a mail back end is to pick one which
17033 simultaneously represents a suitable way of dealing with the original
17034 format plus leaving mail in a form that is convenient to use in the
17035 future.  Here are some high and low points on each:
17036
17037 @table @code
17038 @item nnmbox
17039
17040 UNIX systems have historically had a single, very common, and well-
17041 defined format.  All messages arrive in a single @dfn{spool file}, and
17042 they are delineated by a line whose regular expression matches
17043 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
17044 to make it clear in this instance that this is not the RFC-specified
17045 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
17046 historically from the Unix environment, it is simplest if one does not
17047 mess a great deal with the original mailbox format, so if one chooses
17048 this back end, Gnus' primary activity in getting mail from the real spool
17049 area to Gnus' preferred directory is simply to copy it, with no
17050 (appreciable) format change in the process.  It is the ``dumbest'' way
17051 to move mail into availability in the Gnus environment.  This makes it
17052 fast to move into place, but slow to parse, when Gnus has to look at
17053 what's where.
17054
17055 @item nnbabyl
17056
17057 Once upon a time, there was the DEC-10 and DEC-20, running operating
17058 systems called TOPS and related things, and the usual (only?) mail
17059 reading environment was a thing called Babyl.  I don't know what format
17060 was used for mail landing on the system, but Babyl had its own internal
17061 format to which mail was converted, primarily involving creating a
17062 spool-file-like entity with a scheme for inserting Babyl-specific
17063 headers and status bits above the top of each message in the file.
17064 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
17065 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
17066 to understand the mail files folks already had in existence.  Gnus (and
17067 VM, for that matter) continue to support this format because it's
17068 perceived as having some good qualities in those mailer-specific
17069 headers/status bits stuff.  Rmail itself still exists as well, of
17070 course, and is still maintained by Stallman.
17071
17072 Both of the above forms leave your mail in a single file on your
17073 file system, and they must parse that entire file each time you take a
17074 look at your mail.
17075
17076 @item nnml
17077
17078 @code{nnml} is the back end which smells the most as though you were
17079 actually operating with an @code{nnspool}-accessed Usenet system.  (In
17080 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
17081 lo these years ago.)  One's mail is taken from the original spool file,
17082 and is then cut up into individual message files, 1:1.  It maintains a
17083 Usenet-style active file (analogous to what one finds in an INN- or
17084 CNews-based news system in (for instance) @file{/var/lib/news/active},
17085 or what is returned via the @samp{NNTP LIST} verb) and also creates
17086 @dfn{overview} files for efficient group entry, as has been defined for
17087 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
17088 due to the creation of lots of files, updates to the @code{nnml} active
17089 file, and additions to overview files on a per-message basis, but it is
17090 extremely fast on access because of what amounts to the indexing support
17091 provided by the active file and overviews.
17092
17093 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
17094 resource which defines available places in the file system to put new
17095 files.  Sysadmins take a dim view of heavy inode occupation within
17096 tight, shared file systems.  But if you live on a personal machine where
17097 the file system is your own and space is not at a premium, @code{nnml}
17098 wins big.
17099
17100 It is also problematic using this back end if you are living in a
17101 FAT16-based Windows world, since much space will be wasted on all these
17102 tiny files.
17103
17104 @item nnmh
17105
17106 The Rand MH mail-reading system has been around UNIX systems for a very
17107 long time; it operates by splitting one's spool file of messages into
17108 individual files, but with little or no indexing support---@code{nnmh}
17109 is considered to be semantically equivalent to ``@code{nnml} without
17110 active file or overviews''.  This is arguably the worst choice, because
17111 one gets the slowness of individual file creation married to the
17112 slowness of access parsing when learning what's new in one's groups.
17113
17114 @item nnfolder
17115
17116 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
17117 method described above) on a per-group basis.  That is, @code{nnmbox}
17118 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
17119 little bit of optimization to this so that each of one's mail groups has
17120 a Unix mail box file.  It's faster than @code{nnmbox} because each group
17121 can be parsed separately, and still provides the simple Unix mail box
17122 format requiring minimal effort in moving the mail around.  In addition,
17123 it maintains an ``active'' file making it much faster for Gnus to figure
17124 out how many messages there are in each separate group.
17125
17126 If you have groups that are expected to have a massive amount of
17127 messages, @code{nnfolder} is not the best choice, but if you receive
17128 only a moderate amount of mail, @code{nnfolder} is probably the most
17129 friendly mail back end all over.
17130
17131 @item nnmaildir
17132
17133 For configuring expiry and other things, @code{nnmaildir} uses
17134 incompatible group parameters, slightly different from those of other
17135 mail back ends.
17136
17137 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
17138 differences.  Each message is stored in a separate file, but the
17139 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
17140 also stores the equivalent of @code{nnml}'s overview files in one file
17141 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
17142 @code{df -i} to see how plentiful your inode supply is.)  If this slows
17143 you down or takes up very much space, consider switching to
17144 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
17145 file system.
17146
17147 Since maildirs don't require locking for delivery, the maildirs you use
17148 as groups can also be the maildirs your mail is directly delivered to.
17149 This means you can skip Gnus' mail splitting if your mail is already
17150 organized into different mailboxes during delivery.  A @code{directory}
17151 entry in @code{mail-sources} would have a similar effect, but would
17152 require one set of mailboxes for spooling deliveries (in mbox format,
17153 thus damaging message bodies), and another set to be used as groups (in
17154 whatever format you like).  A maildir has a built-in spool, in the
17155 @code{new/} subdirectory.  Beware that currently, mail moved from
17156 @code{new/} to @code{cur/} instead of via mail splitting will not
17157 undergo treatment such as duplicate checking.
17158
17159 @code{nnmaildir} stores article marks for a given group in the
17160 corresponding maildir, in a way designed so that it's easy to manipulate
17161 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
17162 else, and still have your marks.  @code{nnml} also stores marks, but
17163 it's not as easy to work with them from outside Gnus as with
17164 @code{nnmaildir}.
17165
17166 @code{nnmaildir} uses a significant amount of memory to speed things up.
17167 (It keeps in memory some of the things that @code{nnml} stores in files
17168 and that @code{nnmh} repeatedly parses out of message files.)  If this
17169 is a problem for you, you can set the @code{nov-cache-size} group
17170 parameter to something small (0 would probably not work, but 1 probably
17171 would) to make it use less memory.  This caching will probably be
17172 removed in the future.
17173
17174 Startup is likely to be slower with @code{nnmaildir} than with other
17175 back ends.  Everything else is likely to be faster, depending in part
17176 on your file system.
17177
17178 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
17179 to write an @code{nnmaildir}-derived back end.
17180
17181 @end table
17182
17183
17184 @node Browsing the Web
17185 @section Browsing the Web
17186 @cindex web
17187 @cindex browsing the web
17188 @cindex www
17189 @cindex http
17190
17191 Web-based discussion forums are getting more and more popular.  On many
17192 subjects, the web-based forums have become the most important forums,
17193 eclipsing the importance of mailing lists and news groups.  The reason
17194 is easy to understand---they are friendly to new users; you just point
17195 and click, and there's the discussion.  With mailing lists, you have to
17196 go through a cumbersome subscription procedure, and most people don't
17197 even know what a news group is.
17198
17199 The problem with this scenario is that web browsers are not very good at
17200 being newsreaders.  They do not keep track of what articles you've read;
17201 they do not allow you to score on subjects you're interested in; they do
17202 not allow off-line browsing; they require you to click around and drive
17203 you mad in the end.
17204
17205 So---if web browsers suck at reading discussion forums, why not use Gnus
17206 to do it instead?
17207
17208 Gnus has been getting a bit of a collection of back ends for providing
17209 interfaces to these sources.
17210
17211 @menu
17212 * Archiving Mail::
17213 * Web Searches::                Creating groups from articles that match a string.
17214 * Slashdot::                    Reading the Slashdot comments.
17215 * Ultimate::                    The Ultimate Bulletin Board systems.
17216 * Web Archive::                 Reading mailing list archived on web.
17217 * RSS::                         Reading RDF site summary.
17218 * Customizing W3::              Doing stuff to Emacs/W3 from Gnus.
17219 @end menu
17220
17221 All the web sources require Emacs/W3 and the url library or those
17222 alternatives to work.
17223
17224 The main caveat with all these web sources is that they probably won't
17225 work for a very long time.  Gleaning information from the @acronym{HTML} data
17226 is guesswork at best, and when the layout is altered, the Gnus back end
17227 will fail.  If you have reasonably new versions of these back ends,
17228 though, you should be ok.
17229
17230 One thing all these Web methods have in common is that the Web sources
17231 are often down, unavailable or just plain too slow to be fun.  In those
17232 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
17233 Unplugged}) handle downloading articles, and then you can read them at
17234 leisure from your local disk.  No more World Wide Wait for you.
17235
17236 @node Archiving Mail
17237 @subsection Archiving Mail
17238 @cindex archiving mail
17239 @cindex backup of mail
17240
17241 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
17242 @code{nnmaildir}, now actually store the article marks with each group.
17243 For these servers, archiving and restoring a group while preserving
17244 marks is fairly simple.
17245
17246 (Preserving the group level and group parameters as well still
17247 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
17248 though.)
17249
17250 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
17251 server, take a recursive copy of the server directory.  There is no need
17252 to shut down Gnus, so archiving may be invoked by @code{cron} or
17253 similar.  You restore the data by restoring the directory tree, and
17254 adding a server definition pointing to that directory in Gnus.  The
17255 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
17256 might interfere with overwriting data, so you may want to shut down Gnus
17257 before you restore the data.
17258
17259 It is also possible to archive individual @code{nnml},
17260 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
17261 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
17262 directory.  For @code{nnfolder} you need to copy both the base folder
17263 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
17264 this example).  Restoring the group is done with @kbd{G m} from the Group
17265 buffer.  The last step makes Gnus notice the new directory.
17266 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
17267 is unnecessary in that case.
17268
17269 @node Web Searches
17270 @subsection Web Searches
17271 @cindex nnweb
17272 @cindex Google
17273 @cindex dejanews
17274 @cindex gmane
17275 @cindex Usenet searches
17276 @cindex searching the Usenet
17277
17278 It's, like, too neat to search the Usenet for articles that match a
17279 string, but it, like, totally @emph{sucks}, like, totally, to use one of
17280 those, like, Web browsers, and you, like, have to, rilly, like, look at
17281 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
17282 searches without having to use a browser.
17283
17284 The @code{nnweb} back end allows an easy interface to the mighty search
17285 engine.  You create an @code{nnweb} group, enter a search pattern, and
17286 then enter the group and read the articles like you would any normal
17287 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
17288 Groups}) will do this in an easy-to-use fashion.
17289
17290 @code{nnweb} groups don't really lend themselves to being solid
17291 groups---they have a very fleeting idea of article numbers.  In fact,
17292 each time you enter an @code{nnweb} group (not even changing the search
17293 pattern), you are likely to get the articles ordered in a different
17294 manner.  Not even using duplicate suppression (@pxref{Duplicate
17295 Suppression}) will help, since @code{nnweb} doesn't even know the
17296 @code{Message-ID} of the articles before reading them using some search
17297 engines (Google, for instance).  The only possible way to keep track
17298 of which articles you've read is by scoring on the @code{Date}
17299 header---mark all articles posted before the last date you read the
17300 group as read.
17301
17302 If the search engine changes its output substantially, @code{nnweb}
17303 won't be able to parse it and will fail.  One could hardly fault the Web
17304 providers if they were to do this---their @emph{raison d'@^etre} is to
17305 make money off of advertisements, not to provide services to the
17306 community.  Since @code{nnweb} washes the ads off all the articles, one
17307 might think that the providers might be somewhat miffed.  We'll see.
17308
17309 You must have the @code{url} and @code{W3} package or those alternatives
17310 (try @code{customize-group} on the @samp{mm-url} variable group)
17311 installed to be able to use @code{nnweb}.
17312
17313 Virtual server variables:
17314
17315 @table @code
17316 @item nnweb-type
17317 @vindex nnweb-type
17318 What search engine type is being used.  The currently supported types
17319 are @code{google}, @code{dejanews}, and @code{gmane}.  Note that
17320 @code{dejanews} is an alias to @code{google}.
17321
17322 @item nnweb-search
17323 @vindex nnweb-search
17324 The search string to feed to the search engine.
17325
17326 @item nnweb-max-hits
17327 @vindex nnweb-max-hits
17328 Advisory maximum number of hits per search to display.  The default is
17329 999.
17330
17331 @item nnweb-type-definition
17332 @vindex nnweb-type-definition
17333 Type-to-definition alist.  This alist says what @code{nnweb} should do
17334 with the various search engine types.  The following elements must be
17335 present:
17336
17337 @table @code
17338 @item article
17339 Function to decode the article and provide something that Gnus
17340 understands.
17341
17342 @item map
17343 Function to create an article number to message header and URL alist.
17344
17345 @item search
17346 Function to send the search string to the search engine.
17347
17348 @item address
17349 The address the aforementioned function should send the search string
17350 to.
17351
17352 @item id
17353 Format string URL to fetch an article by @code{Message-ID}.
17354 @end table
17355
17356 @end table
17357
17358
17359 @node Slashdot
17360 @subsection Slashdot
17361 @cindex Slashdot
17362 @cindex nnslashdot
17363
17364 @uref{http://slashdot.org/, Slashdot} is a popular news site, with
17365 lively discussion following the news articles.  @code{nnslashdot} will
17366 let you read this forum in a convenient manner.
17367
17368 The easiest way to read this source is to put something like the
17369 following in your @file{~/.gnus.el} file:
17370
17371 @lisp
17372 (setq gnus-secondary-select-methods
17373       '((nnslashdot "")))
17374 @end lisp
17375
17376 This will make Gnus query the @code{nnslashdot} back end for new comments
17377 and groups.  The @kbd{F} command will subscribe each new news article as
17378 a new Gnus group, and you can read the comments by entering these
17379 groups.  (Note that the default subscription method is to subscribe new
17380 groups as zombies.  Other methods are available (@pxref{Subscription
17381 Methods}).
17382
17383 If you want to remove an old @code{nnslashdot} group, the @kbd{G DEL}
17384 command is the most handy tool (@pxref{Foreign Groups}).
17385
17386 When following up to @code{nnslashdot} comments (or posting new
17387 comments), some light @acronym{HTML}izations will be performed.  In
17388 particular, text quoted with @samp{> } will be quoted with
17389 @samp{blockquote} instead, and signatures will have @samp{br} added to
17390 the end of each line.  Other than that, you can just write @acronym{HTML}
17391 directly into the message buffer.  Note that Slashdot filters out some
17392 @acronym{HTML} forms.
17393
17394 The following variables can be altered to change its behavior:
17395
17396 @table @code
17397 @item nnslashdot-threaded
17398 Whether @code{nnslashdot} should display threaded groups or not.  The
17399 default is @code{t}.  To be able to display threads, @code{nnslashdot}
17400 has to retrieve absolutely all comments in a group upon entry.  If a
17401 threaded display is not required, @code{nnslashdot} will only retrieve
17402 the comments that are actually wanted by the user.  Threading is nicer,
17403 but much, much slower than unthreaded.
17404
17405 @item nnslashdot-login-name
17406 @vindex nnslashdot-login-name
17407 The login name to use when posting.
17408
17409 @item nnslashdot-password
17410 @vindex nnslashdot-password
17411 The password to use when posting.
17412
17413 @item nnslashdot-directory
17414 @vindex nnslashdot-directory
17415 Where @code{nnslashdot} will store its files.  The default is
17416 @file{~/News/slashdot/}.
17417
17418 @item nnslashdot-active-url
17419 @vindex nnslashdot-active-url
17420 The @acronym{URL} format string that will be used to fetch the
17421 information on news articles and comments.  The default is@*
17422 @samp{http://slashdot.org/search.pl?section=&min=%d}.
17423
17424 @item nnslashdot-comments-url
17425 @vindex nnslashdot-comments-url
17426 The @acronym{URL} format string that will be used to fetch comments.
17427
17428 @item nnslashdot-article-url
17429 @vindex nnslashdot-article-url
17430 The @acronym{URL} format string that will be used to fetch the news
17431 article.  The default is
17432 @samp{http://slashdot.org/article.pl?sid=%s&mode=nocomment}.
17433
17434 @item nnslashdot-threshold
17435 @vindex nnslashdot-threshold
17436 The score threshold.  The default is -1.
17437
17438 @item nnslashdot-group-number
17439 @vindex nnslashdot-group-number
17440 The number of old groups, in addition to the ten latest, to keep
17441 updated.  The default is 0.
17442
17443 @end table
17444
17445
17446
17447 @node Ultimate
17448 @subsection Ultimate
17449 @cindex nnultimate
17450 @cindex Ultimate Bulletin Board
17451
17452 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
17453 probably the most popular Web bulletin board system used.  It has a
17454 quite regular and nice interface, and it's possible to get the
17455 information Gnus needs to keep groups updated.
17456
17457 The easiest way to get started with @code{nnultimate} is to say
17458 something like the following in the group buffer:  @kbd{B nnultimate RET
17459 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @acronym{URL}
17460 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
17461 you're interested in; there's quite a list of them on the Ultimate web
17462 site.)  Then subscribe to the groups you're interested in from the
17463 server buffer, and read them from the group buffer.
17464
17465 The following @code{nnultimate} variables can be altered:
17466
17467 @table @code
17468 @item nnultimate-directory
17469 @vindex nnultimate-directory
17470 The directory where @code{nnultimate} stores its files.  The default is@*
17471 @file{~/News/ultimate/}.
17472 @end table
17473
17474
17475 @node Web Archive
17476 @subsection Web Archive
17477 @cindex nnwarchive
17478 @cindex Web Archive
17479
17480 Some mailing lists only have archives on Web servers, such as
17481 @uref{http://www.egroups.com/} and
17482 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
17483 interface, and it's possible to get the information Gnus needs to keep
17484 groups updated.
17485
17486 @findex gnus-group-make-warchive-group
17487 The easiest way to get started with @code{nnwarchive} is to say
17488 something like the following in the group buffer: @kbd{M-x
17489 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
17490 www.egroups.com RET @var{your@@email.address} RET}.  (Substitute the
17491 @var{an_egroup} with the mailing list you subscribed, the
17492 @var{your@@email.address} with your email address.), or to browse the
17493 back end by @kbd{B nnwarchive RET mail-archive RET}.
17494
17495 The following @code{nnwarchive} variables can be altered:
17496
17497 @table @code
17498 @item nnwarchive-directory
17499 @vindex nnwarchive-directory
17500 The directory where @code{nnwarchive} stores its files.  The default is@*
17501 @file{~/News/warchive/}.
17502
17503 @item nnwarchive-login
17504 @vindex nnwarchive-login
17505 The account name on the web server.
17506
17507 @item nnwarchive-passwd
17508 @vindex nnwarchive-passwd
17509 The password for your account on the web server.
17510 @end table
17511
17512 @node RSS
17513 @subsection RSS
17514 @cindex nnrss
17515 @cindex RSS
17516
17517 Some web sites have an RDF Site Summary (@acronym{RSS}).
17518 @acronym{RSS} is a format for summarizing headlines from news related
17519 sites (such as BBC or CNN).  But basically anything list-like can be
17520 presented as an @acronym{RSS} feed: weblogs, changelogs or recent
17521 changes to a wiki (e.g. @url{http://cliki.net/recent-changes.rdf}).
17522
17523 @acronym{RSS} has a quite regular and nice interface, and it's
17524 possible to get the information Gnus needs to keep groups updated.
17525
17526 Note: you had better use Emacs which supports the @code{utf-8} coding
17527 system because @acronym{RSS} uses UTF-8 for encoding non-@acronym{ASCII}
17528 text by default.  It is also used by default for non-@acronym{ASCII}
17529 group names.
17530
17531 @kindex G R (Group)
17532 Use @kbd{G R} from the group buffer to subscribe to a feed---you will be
17533 prompted for the location, the title and the description of the feed.
17534 The title, which allows any characters, will be used for the group name
17535 and the name of the group data file.  The description can be omitted.
17536
17537 An easy way to get started with @code{nnrss} is to say something like
17538 the following in the group buffer: @kbd{B nnrss RET RET y}, then
17539 subscribe to groups.
17540
17541 The @code{nnrss} back end saves the group data file in
17542 @code{nnrss-directory} (see below) for each @code{nnrss} group.  File
17543 names containing non-@acronym{ASCII} characters will be encoded by the
17544 coding system specified with the @code{nnmail-pathname-coding-system}
17545 variable.  If it is @code{nil}, in Emacs the coding system defaults to
17546 the value of @code{default-file-name-coding-system}.  If you are using
17547 XEmacs and want to use non-@acronym{ASCII} group names, you should set
17548 the value for the @code{nnmail-pathname-coding-system} variable properly.
17549
17550 The @code{nnrss} back end generates @samp{multipart/alternative}
17551 @acronym{MIME} articles in which each contains a @samp{text/plain} part
17552 and a @samp{text/html} part.
17553
17554 @cindex OPML
17555 You can also use the following commands to import and export your
17556 subscriptions from a file in @acronym{OPML} format (Outline Processor
17557 Markup Language).
17558
17559 @defun nnrss-opml-import file
17560 Prompt for an @acronym{OPML} file, and subscribe to each feed in the
17561 file.
17562 @end defun
17563
17564 @defun nnrss-opml-export
17565 Write your current @acronym{RSS} subscriptions to a buffer in
17566 @acronym{OPML} format.
17567 @end defun
17568
17569 The following @code{nnrss} variables can be altered:
17570
17571 @table @code
17572 @item nnrss-directory
17573 @vindex nnrss-directory
17574 The directory where @code{nnrss} stores its files.  The default is
17575 @file{~/News/rss/}.
17576
17577 @item nnrss-file-coding-system
17578 @vindex nnrss-file-coding-system
17579 The coding system used when reading and writing the @code{nnrss} groups
17580 data files.  The default is the value of
17581 @code{mm-universal-coding-system} (which defaults to @code{emacs-mule}
17582 in Emacs or @code{escape-quoted} in XEmacs).
17583
17584 @item nnrss-ignore-article-fields
17585 @vindex nnrss-ignore-article-fields
17586 Some feeds update constantly article fields during their publications,
17587 e.g. to indicate the number of comments.  However, if there is
17588 a difference between the local article and the distant one, the latter
17589 is considered to be new.  To avoid this and discard some fields, set this
17590 variable to the list of fields to be ignored.  The default is
17591 @code{'(slash:comments)}.
17592
17593 @item nnrss-use-local
17594 @vindex nnrss-use-local
17595 @findex nnrss-generate-download-script
17596 If you set @code{nnrss-use-local} to @code{t}, @code{nnrss} will read
17597 the feeds from local files in @code{nnrss-directory}.  You can use
17598 the command @code{nnrss-generate-download-script} to generate a
17599 download script using @command{wget}.
17600
17601 @item nnrss-wash-html-in-text-plain-parts
17602 Non-@code{nil} means that @code{nnrss} renders text in @samp{text/plain}
17603 parts as @acronym{HTML}.  The function specified by the
17604 @code{mm-text-html-renderer} variable (@pxref{Display Customization,
17605 ,Display Customization, emacs-mime, The Emacs MIME Manual}) will be used
17606 to render text.  If it is @code{nil}, which is the default, text will
17607 simply be folded.  Leave it @code{nil} if you prefer to see
17608 @samp{text/html} parts.
17609 @end table
17610
17611 The following code may be helpful, if you want to show the description in
17612 the summary buffer.
17613
17614 @lisp
17615 (add-to-list 'nnmail-extra-headers nnrss-description-field)
17616 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
17617
17618 (defun gnus-user-format-function-X (header)
17619   (let ((descr
17620          (assq nnrss-description-field (mail-header-extra header))))
17621     (if descr (concat "\n\t" (cdr descr)) "")))
17622 @end lisp
17623
17624 The following code may be useful to open an nnrss url directly from the
17625 summary buffer.
17626
17627 @lisp
17628 (require 'browse-url)
17629
17630 (defun browse-nnrss-url (arg)
17631   (interactive "p")
17632   (let ((url (assq nnrss-url-field
17633                    (mail-header-extra
17634                     (gnus-data-header
17635                      (assq (gnus-summary-article-number)
17636                            gnus-newsgroup-data))))))
17637     (if url
17638         (progn
17639           (browse-url (cdr url))
17640           (gnus-summary-mark-as-read-forward 1))
17641       (gnus-summary-scroll-up arg))))
17642
17643 (eval-after-load "gnus"
17644   #'(define-key gnus-summary-mode-map
17645       (kbd "<RET>") 'browse-nnrss-url))
17646 (add-to-list 'nnmail-extra-headers nnrss-url-field)
17647 @end lisp
17648
17649 Even if you have added @samp{text/html} to the
17650 @code{mm-discouraged-alternatives} variable (@pxref{Display
17651 Customization, ,Display Customization, emacs-mime, The Emacs MIME
17652 Manual}) since you don't want to see @acronym{HTML} parts, it might be
17653 more useful especially in @code{nnrss} groups to display
17654 @samp{text/html} parts.  Here's an example of setting
17655 @code{mm-discouraged-alternatives} as a group parameter (@pxref{Group
17656 Parameters}) in order to display @samp{text/html} parts only in
17657 @code{nnrss} groups:
17658
17659 @lisp
17660 ;; @r{Set the default value of @code{mm-discouraged-alternatives}.}
17661 (eval-after-load "gnus-sum"
17662   '(add-to-list
17663     'gnus-newsgroup-variables
17664     '(mm-discouraged-alternatives
17665       . '("text/html" "image/.*"))))
17666
17667 ;; @r{Display @samp{text/html} parts in @code{nnrss} groups.}
17668 (add-to-list
17669  'gnus-parameters
17670  '("\\`nnrss:" (mm-discouraged-alternatives nil)))
17671 @end lisp
17672
17673
17674 @node Customizing W3
17675 @subsection Customizing W3
17676 @cindex W3
17677 @cindex html
17678 @cindex url
17679 @cindex Netscape
17680
17681 Gnus uses the url library to fetch web pages and Emacs/W3 (or those
17682 alternatives) to display web pages.  Emacs/W3 is documented in its own
17683 manual, but there are some things that may be more relevant for Gnus
17684 users.
17685
17686 For instance, a common question is how to make Emacs/W3 follow links
17687 using the @code{browse-url} functions (which will call some external web
17688 browser like Netscape).  Here's one way:
17689
17690 @lisp
17691 (eval-after-load "w3"
17692   '(progn
17693     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
17694     (defun w3-fetch (&optional url target)
17695       (interactive (list (w3-read-url-with-default)))
17696       (if (eq major-mode 'gnus-article-mode)
17697           (browse-url url)
17698         (w3-fetch-orig url target)))))
17699 @end lisp
17700
17701 Put that in your @file{.emacs} file, and hitting links in W3-rendered
17702 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
17703 follow the link.
17704
17705
17706 @node IMAP
17707 @section IMAP
17708 @cindex nnimap
17709 @cindex @acronym{IMAP}
17710
17711 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
17712 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
17713 server is much similar to connecting to a news server, you just
17714 specify the network address of the server.
17715
17716 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
17717 everything that @acronym{POP} can, it can hence be viewed as a
17718 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
17719 similar to @acronym{NNTP} being a news storage protocol---however,
17720 @acronym{IMAP} offers more features than @acronym{NNTP} because news
17721 is more or less read-only whereas mail is read-write.
17722
17723 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
17724 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
17725 the @acronym{IMAP} server and store them on the local disk.  This is
17726 not the usage described in this section---@xref{Mail Sources}.
17727
17728 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
17729 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
17730 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
17731 usage explained in this section.
17732
17733 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP}
17734 servers might look something like the following.  (Note that for
17735 @acronym{TLS}/@acronym{SSL}, you need external programs and libraries,
17736 see below.)
17737
17738 @lisp
17739 (setq gnus-secondary-select-methods
17740       '((nnimap "simpleserver") ; @r{no special configuration}
17741         ; @r{perhaps a ssh port forwarded server:}
17742         (nnimap "dolk"
17743                 (nnimap-address "localhost")
17744                 (nnimap-server-port 1430))
17745         ; @r{a UW server running on localhost}
17746         (nnimap "barbar"
17747                 (nnimap-server-port 143)
17748                 (nnimap-address "localhost")
17749                 (nnimap-list-pattern ("INBOX" "mail/*")))
17750         ; @r{anonymous public cyrus server:}
17751         (nnimap "cyrus.andrew.cmu.edu"
17752                 (nnimap-authenticator anonymous)
17753                 (nnimap-list-pattern "archive.*")
17754                 (nnimap-stream network))
17755         ; @r{a ssl server on a non-standard port:}
17756         (nnimap "vic20"
17757                 (nnimap-address "vic20.somewhere.com")
17758                 (nnimap-server-port 9930)
17759                 (nnimap-stream ssl))))
17760 @end lisp
17761
17762 After defining the new server, you can subscribe to groups on the
17763 server using normal Gnus commands such as @kbd{U} in the Group Buffer
17764 (@pxref{Subscription Commands}) or via the Server Buffer
17765 (@pxref{Server Buffer}).
17766
17767 The following variables can be used to create a virtual @code{nnimap}
17768 server:
17769
17770 @table @code
17771
17772 @item nnimap-address
17773 @vindex nnimap-address
17774
17775 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
17776 server name if not specified.
17777
17778 @item nnimap-server-port
17779 @vindex nnimap-server-port
17780 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
17781
17782 Note that this should be an integer, example server specification:
17783
17784 @lisp
17785 (nnimap "mail.server.com"
17786         (nnimap-server-port 4711))
17787 @end lisp
17788
17789 @item nnimap-list-pattern
17790 @vindex nnimap-list-pattern
17791 String or list of strings of mailboxes to limit available groups to.
17792 This is used when the server has very many mailboxes and you're only
17793 interested in a few---some servers export your home directory via
17794 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
17795 @file{~/Mail/*} then.
17796
17797 The string can also be a cons of REFERENCE and the string as above, what
17798 REFERENCE is used for is server specific, but on the University of
17799 Washington server it's a directory that will be concatenated with the
17800 mailbox.
17801
17802 Example server specification:
17803
17804 @lisp
17805 (nnimap "mail.server.com"
17806         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
17807                                ("~friend/Mail/" . "list/*"))))
17808 @end lisp
17809
17810 @item nnimap-stream
17811 @vindex nnimap-stream
17812 The type of stream used to connect to your server.  By default, nnimap
17813 will detect and automatically use all of the below, with the exception
17814 of @acronym{TLS}/@acronym{SSL}.  (@acronym{IMAP} over
17815 @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can
17816 be automatically detected, but it's not widely deployed yet.)
17817
17818 Example server specification:
17819
17820 @lisp
17821 (nnimap "mail.server.com"
17822         (nnimap-stream ssl))
17823 @end lisp
17824
17825 Please note that the value of @code{nnimap-stream} is a symbol!
17826
17827 @itemize @bullet
17828 @item
17829 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5).  Requires the
17830 @samp{gsasl} or @samp{imtest} program.
17831 @item
17832 @dfn{kerberos4:} Connect with Kerberos 4.  Requires the @samp{imtest} program.
17833 @item
17834 @dfn{starttls:} Connect via the STARTTLS extension (similar to
17835 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
17836 @samp{starttls}.
17837 @item
17838 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
17839 @samp{gnutls-cli}).
17840 @item
17841 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
17842 @samp{openssl}) or SSLeay (@samp{s_client}).
17843 @item
17844 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
17845 @item
17846 @dfn{network:} Plain, TCP/IP network connection.
17847 @end itemize
17848
17849 @vindex imap-kerberos4-program
17850 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
17851 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
17852 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
17853 to make @code{imap.el} use a pty instead of a pipe when communicating
17854 with @samp{imtest}.  You will then suffer from a line length
17855 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
17856 indefinitely if you have many articles in a mailbox.  The variable
17857 @code{imap-kerberos4-program} contain parameters to pass to the imtest
17858 program.
17859
17860 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
17861 needed.  It is available from
17862 @uref{http://www.gnu.org/software/gnutls/}.
17863
17864 @vindex imap-gssapi-program
17865 This parameter specifies a list of command lines that invoke a GSSAPI
17866 authenticated @acronym{IMAP} stream in a subshell.  They are tried
17867 sequentially until a connection is made, or the list has been
17868 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
17869 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
17870 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
17871 tried.
17872
17873 @vindex imap-ssl-program
17874 For @acronym{SSL} connections, the OpenSSL program is available from
17875 @uref{http://www.openssl.org/}.  OpenSSL was formerly known as SSLeay,
17876 and nnimap support it too---although the most recent versions of
17877 SSLeay, 0.9.x, are known to have serious bugs making it
17878 useless.  Earlier versions, especially 0.8.x, of SSLeay are known to
17879 work.  The variable @code{imap-ssl-program} contain parameters to pass
17880 to OpenSSL/SSLeay.
17881
17882 @vindex imap-shell-program
17883 @vindex imap-shell-host
17884 For @acronym{IMAP} connections using the @code{shell} stream, the
17885 variable @code{imap-shell-program} specify what program to call.  Make
17886 sure nothing is interfering with the output of the program, e.g., don't
17887 forget to redirect the error output to the void.
17888
17889 @item nnimap-authenticator
17890 @vindex nnimap-authenticator
17891
17892 The authenticator used to connect to the server.  By default, nnimap
17893 will use the most secure authenticator your server is capable of.
17894
17895 Example server specification:
17896
17897 @lisp
17898 (nnimap "mail.server.com"
17899         (nnimap-authenticator anonymous))
17900 @end lisp
17901
17902 Please note that the value of @code{nnimap-authenticator} is a symbol!
17903
17904 @itemize @bullet
17905 @item
17906 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication.  Requires
17907 external program @code{gsasl} or @code{imtest}.
17908 @item
17909 @dfn{kerberos4:} Kerberos 4 authentication.  Requires external program
17910 @code{imtest}.
17911 @item
17912 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5.  Requires
17913 external library @code{digest-md5.el}.
17914 @item
17915 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
17916 @item
17917 @dfn{login:} Plain-text username/password via LOGIN.
17918 @item
17919 @dfn{anonymous:} Login as ``anonymous'', supplying your email address as password.
17920 @end itemize
17921
17922 @item nnimap-expunge-on-close
17923 @cindex expunging
17924 @vindex nnimap-expunge-on-close
17925 Unlike Parmenides the @acronym{IMAP} designers have decided things that
17926 don't exist actually do exist.  More specifically, @acronym{IMAP} has
17927 this concept of marking articles @code{Deleted} which doesn't actually
17928 delete them, and this (marking them @code{Deleted}, that is) is what
17929 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
17930 similar).
17931
17932 Since the articles aren't really removed when we mark them with the
17933 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
17934 running in circles yet?
17935
17936 Traditionally, nnimap has removed all articles marked as @code{Deleted}
17937 when closing a mailbox but this is now configurable by this server
17938 variable.
17939
17940 The possible options are:
17941
17942 @table @code
17943
17944 @item always
17945 The default behavior, delete all articles marked as ``Deleted'' when
17946 closing a mailbox.
17947 @item never
17948 Never actually delete articles.  Currently there is no way of showing
17949 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
17950 may allow you to do this.  If you ever want to run the EXPUNGE command
17951 manually, @xref{Expunging mailboxes}.
17952 @item ask
17953 When closing mailboxes, nnimap will ask if you wish to expunge deleted
17954 articles or not.
17955
17956 @end table
17957
17958 @item nnimap-importantize-dormant
17959 @vindex nnimap-importantize-dormant
17960
17961 If non-@code{nil} (the default), marks dormant articles as ticked (as
17962 well), for other @acronym{IMAP} clients.  Within Gnus, dormant articles will
17963 naturally still (only) be marked as dormant.  This is to make dormant
17964 articles stand out, just like ticked articles, in other @acronym{IMAP}
17965 clients.  (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
17966 has only one.)
17967
17968 Probably the only reason for frobbing this would be if you're trying
17969 enable per-user persistent dormant flags, using something like:
17970
17971 @lisp
17972 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
17973         (format "gnus-dormant-%s" (user-login-name)))
17974 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
17975         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
17976 @end lisp
17977
17978 In this case, you would not want the per-user dormant flag showing up
17979 as ticked for other users.
17980
17981 @item nnimap-expunge-search-string
17982 @cindex expunging
17983 @vindex nnimap-expunge-search-string
17984 @cindex expiring @acronym{IMAP} mail
17985
17986 This variable contain the @acronym{IMAP} search command sent to server when
17987 searching for articles eligible for expiring.  The default is
17988 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
17989 UID set and the second @code{%s} is replaced by a date.
17990
17991 Probably the only useful value to change this to is
17992 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
17993 messages instead of the internal article date.  See section 6.4.4 of
17994 RFC 2060 for more information on valid strings.
17995
17996 However, if @code{nnimap-search-uids-not-since-is-evil}
17997 is true, this variable has no effect since the search logic
17998 is reversed, as described below.
17999
18000 @item nnimap-authinfo-file
18001 @vindex nnimap-authinfo-file
18002
18003 A file containing credentials used to log in on servers.  The format is
18004 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
18005 variable @code{nntp-authinfo-file} for exact syntax; also see
18006 @ref{NNTP}.  An example of an .authinfo line for an IMAP server, is:
18007
18008 @example
18009 machine students.uio.no login larsi password geheimnis port imap
18010 @end example
18011
18012 Note that it should be @code{port imap}, or @code{port 143}, if you
18013 use a @code{nnimap-stream} of @code{tls} or @code{ssl}, even if the
18014 actual port number used is port 993 for secured IMAP.  For
18015 convenience, Gnus will accept @code{port imaps} as a synonym of
18016 @code{port imap}.
18017
18018 @item nnimap-need-unselect-to-notice-new-mail
18019 @vindex nnimap-need-unselect-to-notice-new-mail
18020
18021 Unselect mailboxes before looking for new mail in them.  Some servers
18022 seem to need this under some circumstances; it was reported that
18023 Courier 1.7.1 did.
18024
18025 @item nnimap-nov-is-evil
18026 @vindex nnimap-nov-is-evil
18027 @cindex Courier @acronym{IMAP} server
18028 @cindex @acronym{NOV}
18029
18030 Never generate or use a local @acronym{NOV} database. Defaults to the
18031 value of @code{gnus-agent}.
18032
18033 Using a @acronym{NOV} database usually makes header fetching much
18034 faster, but it uses the @code{UID SEARCH UID} command, which is very
18035 slow on some servers (notably some versions of Courier). Since the Gnus
18036 Agent caches the information in the @acronym{NOV} database without using
18037 the slow command, this variable defaults to true if the Agent is in use,
18038 and false otherwise.
18039
18040 @item nnimap-search-uids-not-since-is-evil
18041 @vindex nnimap-search-uids-not-since-is-evil
18042 @cindex Courier @acronym{IMAP} server
18043 @cindex expiring @acronym{IMAP} mail
18044
18045 Avoid the @code{UID SEARCH UID @var{message numbers} NOT SINCE
18046 @var{date}} command, which is slow on some @acronym{IMAP} servers
18047 (notably, some versions of Courier). Instead, use @code{UID SEARCH SINCE
18048 @var{date}} and prune the list of expirable articles within Gnus.
18049
18050 When Gnus expires your mail (@pxref{Expiring Mail}), it starts with a
18051 list of expirable articles and asks the IMAP server questions like ``Of
18052 these articles, which ones are older than a week?'' While this seems
18053 like a perfectly reasonable question, some IMAP servers take a long time
18054 to answer it, since they seemingly go looking into every old article to
18055 see if it is one of the expirable ones. Curiously, the question ``Of
18056 @emph{all} articles, which ones are newer than a week?'' seems to be
18057 much faster to answer, so setting this variable causes Gnus to ask this
18058 question and figure out the answer to the real question itself.
18059
18060 This problem can really sneak up on you: when you first configure Gnus,
18061 everything works fine, but once you accumulate a couple thousand
18062 messages, you start cursing Gnus for being so slow. On the other hand,
18063 if you get a lot of email within a week, setting this variable will
18064 cause a lot of network traffic between Gnus and the IMAP server.
18065
18066 @item nnimap-logout-timeout
18067 @vindex nnimap-logout-timeout
18068
18069 There is a case where a connection to a @acronym{IMAP} server is unable
18070 to close, when connecting to the server via a certain kind of network,
18071 e.g. @acronym{VPN}.  In that case, it will be observed that a connection
18072 between Emacs and the local network looks alive even if the server has
18073 closed a connection for some reason (typically, a timeout).
18074 Consequently, Emacs continues waiting for a response from the server for
18075 the @code{LOGOUT} command that Emacs sent, or hangs in other words.  If
18076 you are in such a network, setting this variable to a number of seconds
18077 will be helpful.  If it is set, a hung connection will be closed
18078 forcibly, after this number of seconds from the time Emacs sends the
18079 @code{LOGOUT} command.  It should not be too small value but too large
18080 value will be inconvenient too.  Perhaps the value 1.0 will be a good
18081 candidate but it might be worth trying some other values.
18082
18083 Example server specification:
18084
18085 @lisp
18086 (nnimap "mail.server.com"
18087         (nnimap-logout-timeout 1.0))
18088 @end lisp
18089
18090 @end table
18091
18092 @menu
18093 * Splitting in IMAP::           Splitting mail with nnimap.
18094 * Expiring in IMAP::            Expiring mail with nnimap.
18095 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
18096 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
18097 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
18098 * Debugging IMAP::              What to do when things don't work.
18099 @end menu
18100
18101
18102
18103 @node Splitting in IMAP
18104 @subsection Splitting in IMAP
18105 @cindex splitting imap mail
18106
18107 Splitting is something Gnus users have loved and used for years, and now
18108 the rest of the world is catching up.  Yeah, dream on, not many
18109 @acronym{IMAP} servers have server side splitting and those that have
18110 splitting seem to use some non-standard protocol.  This means that
18111 @acronym{IMAP} support for Gnus has to do its own splitting.
18112
18113 And it does.
18114
18115 (Incidentally, people seem to have been dreaming on, and Sieve has
18116 gaining a market share and is supported by several IMAP servers.
18117 Fortunately, Gnus support it too, @xref{Sieve Commands}.)
18118
18119 Here are the variables of interest:
18120
18121 @table @code
18122
18123 @item nnimap-split-crosspost
18124 @cindex splitting, crosspost
18125 @cindex crosspost
18126 @vindex nnimap-split-crosspost
18127
18128 If non-@code{nil}, do crossposting if several split methods match the
18129 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
18130 found will be used.
18131
18132 Nnmail equivalent: @code{nnmail-crosspost}.
18133
18134 @item nnimap-split-inbox
18135 @cindex splitting, inbox
18136 @cindex inbox
18137 @vindex nnimap-split-inbox
18138
18139 A string or a list of strings that gives the name(s) of @acronym{IMAP}
18140 mailboxes to split from.  Defaults to @code{nil}, which means that
18141 splitting is disabled!
18142
18143 @lisp
18144 (setq nnimap-split-inbox
18145       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
18146 @end lisp
18147
18148 No nnmail equivalent.
18149
18150 @item nnimap-split-rule
18151 @cindex splitting, rules
18152 @vindex nnimap-split-rule
18153
18154 New mail found in @code{nnimap-split-inbox} will be split according to
18155 this variable.
18156
18157 This variable contains a list of lists, where the first element in the
18158 sublist gives the name of the @acronym{IMAP} mailbox to move articles
18159 matching the regexp in the second element in the sublist.  Got that?
18160 Neither did I, we need examples.
18161
18162 @lisp
18163 (setq nnimap-split-rule
18164       '(("INBOX.nnimap"
18165          "^Sender: owner-nnimap@@vic20.globalcom.se")
18166         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
18167         ("INBOX.private" "")))
18168 @end lisp
18169
18170 This will put all articles from the nnimap mailing list into mailbox
18171 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
18172 into INBOX.junk and everything else in INBOX.private.
18173
18174 The first string may contain @samp{\\1} forms, like the ones used by
18175 replace-match to insert sub-expressions from the matched text.  For
18176 instance:
18177
18178 @lisp
18179 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
18180 @end lisp
18181
18182 The first element can also be the symbol @code{junk} to indicate that
18183 matching messages should simply be deleted.  Use with care.
18184
18185 The second element can also be a function.  In that case, it will be
18186 called with the first element of the rule as the argument, in a buffer
18187 containing the headers of the article.  It should return a
18188 non-@code{nil} value if it thinks that the mail belongs in that group.
18189
18190 Nnmail users might recollect that the last regexp had to be empty to
18191 match all articles (like in the example above).  This is not required in
18192 nnimap.  Articles not matching any of the regexps will not be moved out
18193 of your inbox.  (This might affect performance if you keep lots of
18194 unread articles in your inbox, since the splitting code would go over
18195 them every time you fetch new mail.)
18196
18197 These rules are processed from the beginning of the alist toward the
18198 end.  The first rule to make a match will ``win'', unless you have
18199 crossposting enabled.  In that case, all matching rules will ``win''.
18200
18201 This variable can also have a function as its value, the function will
18202 be called with the headers narrowed and should return a group where it
18203 thinks the article should be split to.  See @code{nnimap-split-fancy}.
18204
18205 The splitting code tries to create mailboxes if it needs to.
18206
18207 To allow for different split rules on different virtual servers, and
18208 even different split rules in different inboxes on the same server,
18209 the syntax of this variable have been extended along the lines of:
18210
18211 @lisp
18212 (setq nnimap-split-rule
18213       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
18214                                ("junk"    "From:.*Simon"))))
18215         ("my2server"    ("INBOX" nnimap-split-fancy))
18216         ("my[34]server" (".*" (("private" "To:.*Simon")
18217                                ("junk"    my-junk-func))))))
18218 @end lisp
18219
18220 The virtual server name is in fact a regexp, so that the same rules
18221 may apply to several servers.  In the example, the servers
18222 @code{my3server} and @code{my4server} both use the same rules.
18223 Similarly, the inbox string is also a regexp.  The actual splitting
18224 rules are as before, either a function, or a list with group/regexp or
18225 group/function elements.
18226
18227 Nnmail equivalent: @code{nnmail-split-methods}.
18228
18229 @item nnimap-split-predicate
18230 @cindex splitting
18231 @vindex nnimap-split-predicate
18232
18233 Mail matching this predicate in @code{nnimap-split-inbox} will be
18234 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
18235
18236 This might be useful if you use another @acronym{IMAP} client to read mail in
18237 your inbox but would like Gnus to split all articles in the inbox
18238 regardless of readedness.  Then you might change this to
18239 @samp{UNDELETED}.
18240
18241 @item nnimap-split-fancy
18242 @cindex splitting, fancy
18243 @findex nnimap-split-fancy
18244 @vindex nnimap-split-fancy
18245
18246 It's possible to set @code{nnimap-split-rule} to
18247 @code{nnmail-split-fancy} if you want to use fancy
18248 splitting.  @xref{Fancy Mail Splitting}.
18249
18250 However, to be able to have different fancy split rules for nnmail and
18251 nnimap back ends you can set @code{nnimap-split-rule} to
18252 @code{nnimap-split-fancy} and define the nnimap specific fancy split
18253 rule in @code{nnimap-split-fancy}.
18254
18255 Example:
18256
18257 @lisp
18258 (setq nnimap-split-rule 'nnimap-split-fancy
18259       nnimap-split-fancy ...)
18260 @end lisp
18261
18262 Nnmail equivalent: @code{nnmail-split-fancy}.
18263
18264 @item nnimap-split-download-body
18265 @findex nnimap-split-download-body
18266 @vindex nnimap-split-download-body
18267
18268 Set to non-@code{nil} to download entire articles during splitting.
18269 This is generally not required, and will slow things down
18270 considerably.  You may need it if you want to use an advanced
18271 splitting function that analyzes the body to split the article.
18272
18273 @end table
18274
18275 @node Expiring in IMAP
18276 @subsection Expiring in IMAP
18277 @cindex expiring @acronym{IMAP} mail
18278
18279 Even though @code{nnimap} is not a proper @code{nnmail} derived back
18280 end, it supports most features in regular expiring (@pxref{Expiring
18281 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
18282 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
18283 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
18284 follows below are the variables used by the @code{nnimap} expiry
18285 process.
18286
18287 A note on how the expire mark is stored on the @acronym{IMAP} server is
18288 appropriate here as well.  The expire mark is translated into a
18289 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
18290 message.  This means that likely only Gnus will understand and treat
18291 the @code{gnus-expire} mark properly, although other clients may allow
18292 you to view client specific flags on the message.  It also means that
18293 your server must support permanent storage of client specific flags on
18294 messages.  Most do, fortunately.
18295
18296 If expiring @acronym{IMAP} mail seems very slow, try setting the server
18297 variable @code{nnimap-search-uids-not-since-is-evil}.
18298
18299 @table @code
18300
18301 @item nnmail-expiry-wait
18302 @item nnmail-expiry-wait-function
18303
18304 These variables are fully supported.  The expire value can be a
18305 number, the symbol @code{immediate} or @code{never}.
18306
18307 @item nnmail-expiry-target
18308
18309 This variable is supported, and internally implemented by calling the
18310 @code{nnmail} functions that handle this.  It contains an optimization
18311 that if the destination is a @acronym{IMAP} group on the same server, the
18312 article is copied instead of appended (that is, uploaded again).
18313
18314 @end table
18315
18316 @node Editing IMAP ACLs
18317 @subsection Editing IMAP ACLs
18318 @cindex editing imap acls
18319 @cindex Access Control Lists
18320 @cindex Editing @acronym{IMAP} ACLs
18321 @kindex G l (Group)
18322 @findex gnus-group-nnimap-edit-acl
18323
18324 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
18325 limiting (or enabling) other users access to your mail boxes.  Not all
18326 @acronym{IMAP} servers support this, this function will give an error if it
18327 doesn't.
18328
18329 To edit an ACL for a mailbox, type @kbd{G l}
18330 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
18331 editing window with detailed instructions.
18332
18333 Some possible uses:
18334
18335 @itemize @bullet
18336 @item
18337 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
18338 on your mailing list mailboxes enables other users on the same server to
18339 follow the list without subscribing to it.
18340 @item
18341 At least with the Cyrus server, you are required to give the user
18342 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
18343 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
18344 INBOX.mailbox).
18345 @end itemize
18346
18347 @node Expunging mailboxes
18348 @subsection Expunging mailboxes
18349 @cindex expunging
18350
18351 @cindex expunge
18352 @cindex manual expunging
18353 @kindex G x (Group)
18354 @findex gnus-group-nnimap-expunge
18355
18356 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
18357 you may want the option of expunging all deleted articles in a mailbox
18358 manually.  This is exactly what @kbd{G x} does.
18359
18360 Currently there is no way of showing deleted articles, you can just
18361 delete them.
18362
18363 @node A note on namespaces
18364 @subsection A note on namespaces
18365 @cindex IMAP namespace
18366 @cindex namespaces
18367
18368 The @acronym{IMAP} protocol has a concept called namespaces, described
18369 by the following text in the RFC2060:
18370
18371 @display
18372 5.1.2.  Mailbox Namespace Naming Convention
18373
18374    By convention, the first hierarchical element of any mailbox name
18375    which begins with "#" identifies the "namespace" of the remainder of
18376    the name.  This makes it possible to disambiguate between different
18377    types of mailbox stores, each of which have their own namespaces.
18378
18379       For example, implementations which offer access to USENET
18380       newsgroups MAY use the "#news" namespace to partition the USENET
18381       newsgroup namespace from that of other mailboxes.  Thus, the
18382       comp.mail.misc newsgroup would have an mailbox name of
18383       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
18384       to a different object (e.g. a user's private mailbox).
18385 @end display
18386
18387 While there is nothing in this text that warrants concern for the
18388 @acronym{IMAP} implementation in Gnus, some servers use namespace
18389 prefixes in a way that does not work with how Gnus uses mailbox names.
18390
18391 Specifically, University of Washington's @acronym{IMAP} server uses
18392 mailbox names like @code{#driver.mbx/read-mail} which are valid only
18393 in the @sc{create} and @sc{append} commands.  After the mailbox is
18394 created (or a messages is appended to a mailbox), it must be accessed
18395 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
18396 not make it possible for the user to guarantee that user entered
18397 mailbox names will only be used with the CREATE and APPEND commands,
18398 you should simply not use the namespace prefixed mailbox names in
18399 Gnus.
18400
18401 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
18402 for more information on how to use the prefixes.  They are a power
18403 tool and should be used only if you are sure what the effects are.
18404
18405 @node Debugging IMAP
18406 @subsection Debugging IMAP
18407 @cindex IMAP debugging
18408 @cindex protocol dump (IMAP)
18409
18410 @acronym{IMAP} is a complex protocol, more so than @acronym{NNTP} or
18411 @acronym{POP3}.  Implementation bugs are not unlikely, and we do our
18412 best to fix them right away.  If you encounter odd behavior, chances
18413 are that either the server or Gnus is buggy.
18414
18415 If you are familiar with network protocols in general, you will
18416 probably be able to extract some clues from the protocol dump of the
18417 exchanges between Gnus and the server.  Even if you are not familiar
18418 with network protocols, when you include the protocol dump in
18419 @acronym{IMAP}-related bug reports you are helping us with data
18420 critical to solving the problem.  Therefore, we strongly encourage you
18421 to include the protocol dump when reporting IMAP bugs in Gnus.
18422
18423
18424 @vindex imap-log
18425 Because the protocol dump, when enabled, generates lots of data, it is
18426 disabled by default.  You can enable it by setting @code{imap-log} as
18427 follows:
18428
18429 @lisp
18430 (setq imap-log t)
18431 @end lisp
18432
18433 This instructs the @code{imap.el} package to log any exchanges with
18434 the server.  The log is stored in the buffer @samp{*imap-log*}.  Look
18435 for error messages, which sometimes are tagged with the keyword
18436 @code{BAD}---but when submitting a bug, make sure to include all the
18437 data.
18438
18439 @node Other Sources
18440 @section Other Sources
18441
18442 Gnus can do more than just read news or mail.  The methods described
18443 below allow Gnus to view directories and files as if they were
18444 newsgroups.
18445
18446 @menu
18447 * Directory Groups::            You can read a directory as if it was a newsgroup.
18448 * Anything Groups::             Dired?  Who needs dired?
18449 * Document Groups::             Single files can be the basis of a group.
18450 * SOUP::                        Reading @sc{soup} packets ``offline''.
18451 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
18452 @end menu
18453
18454
18455 @node Directory Groups
18456 @subsection Directory Groups
18457 @cindex nndir
18458 @cindex directory groups
18459
18460 If you have a directory that has lots of articles in separate files in
18461 it, you might treat it as a newsgroup.  The files have to have numerical
18462 names, of course.
18463
18464 This might be an opportune moment to mention @code{ange-ftp} (and its
18465 successor @code{efs}), that most wonderful of all wonderful Emacs
18466 packages.  When I wrote @code{nndir}, I didn't think much about it---a
18467 back end to read directories.  Big deal.
18468
18469 @code{ange-ftp} changes that picture dramatically.  For instance, if you
18470 enter the @code{ange-ftp} file name
18471 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
18472 @code{ange-ftp} or @code{efs} will actually allow you to read this
18473 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
18474
18475 @code{nndir} will use @acronym{NOV} files if they are present.
18476
18477 @code{nndir} is a ``read-only'' back end---you can't delete or expire
18478 articles with this method.  You can use @code{nnmh} or @code{nnml} for
18479 whatever you use @code{nndir} for, so you could switch to any of those
18480 methods if you feel the need to have a non-read-only @code{nndir}.
18481
18482
18483 @node Anything Groups
18484 @subsection Anything Groups
18485 @cindex nneething
18486
18487 From the @code{nndir} back end (which reads a single spool-like
18488 directory), it's just a hop and a skip to @code{nneething}, which
18489 pretends that any arbitrary directory is a newsgroup.  Strange, but
18490 true.
18491
18492 When @code{nneething} is presented with a directory, it will scan this
18493 directory and assign article numbers to each file.  When you enter such
18494 a group, @code{nneething} must create ``headers'' that Gnus can use.
18495 After all, Gnus is a newsreader, in case you're forgetting.
18496 @code{nneething} does this in a two-step process.  First, it snoops each
18497 file in question.  If the file looks like an article (i.e., the first
18498 few lines look like headers), it will use this as the head.  If this is
18499 just some arbitrary file without a head (e.g. a C source file),
18500 @code{nneething} will cobble up a header out of thin air.  It will use
18501 file ownership, name and date and do whatever it can with these
18502 elements.
18503
18504 All this should happen automatically for you, and you will be presented
18505 with something that looks very much like a newsgroup.  Totally like a
18506 newsgroup, to be precise.  If you select an article, it will be displayed
18507 in the article buffer, just as usual.
18508
18509 If you select a line that represents a directory, Gnus will pop you into
18510 a new summary buffer for this @code{nneething} group.  And so on.  You can
18511 traverse the entire disk this way, if you feel like, but remember that
18512 Gnus is not dired, really, and does not intend to be, either.
18513
18514 There are two overall modes to this action---ephemeral or solid.  When
18515 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
18516 will not store information on what files you have read, and what files
18517 are new, and so on.  If you create a solid @code{nneething} group the
18518 normal way with @kbd{G m}, Gnus will store a mapping table between
18519 article numbers and file names, and you can treat this group like any
18520 other groups.  When you activate a solid @code{nneething} group, you will
18521 be told how many unread articles it contains, etc., etc.
18522
18523 Some variables:
18524
18525 @table @code
18526 @item nneething-map-file-directory
18527 @vindex nneething-map-file-directory
18528 All the mapping files for solid @code{nneething} groups will be stored
18529 in this directory, which defaults to @file{~/.nneething/}.
18530
18531 @item nneething-exclude-files
18532 @vindex nneething-exclude-files
18533 All files that match this regexp will be ignored.  Nice to use to exclude
18534 auto-save files and the like, which is what it does by default.
18535
18536 @item nneething-include-files
18537 @vindex nneething-include-files
18538 Regexp saying what files to include in the group.  If this variable is
18539 non-@code{nil}, only files matching this regexp will be included.
18540
18541 @item nneething-map-file
18542 @vindex nneething-map-file
18543 Name of the map files.
18544 @end table
18545
18546
18547 @node Document Groups
18548 @subsection Document Groups
18549 @cindex nndoc
18550 @cindex documentation group
18551 @cindex help group
18552
18553 @code{nndoc} is a cute little thing that will let you read a single file
18554 as a newsgroup.  Several files types are supported:
18555
18556 @table @code
18557 @cindex Babyl
18558 @cindex Rmail mbox
18559 @item babyl
18560 The Babyl (Rmail) mail box.
18561
18562 @cindex mbox
18563 @cindex Unix mbox
18564 @item mbox
18565 The standard Unix mbox file.
18566
18567 @cindex MMDF mail box
18568 @item mmdf
18569 The MMDF mail box format.
18570
18571 @item news
18572 Several news articles appended into a file.
18573
18574 @cindex rnews batch files
18575 @item rnews
18576 The rnews batch transport format.
18577
18578 @item nsmail
18579 Netscape mail boxes.
18580
18581 @item mime-parts
18582 @acronym{MIME} multipart messages.
18583
18584 @item standard-digest
18585 The standard (RFC 1153) digest format.
18586
18587 @item mime-digest
18588 A @acronym{MIME} digest of messages.
18589
18590 @item lanl-gov-announce
18591 Announcement messages from LANL Gov Announce.
18592
18593 @cindex forwarded messages
18594 @item rfc822-forward
18595 A message forwarded according to RFC822.
18596
18597 @item outlook
18598 The Outlook mail box.
18599
18600 @item oe-dbx
18601 The Outlook Express dbx mail box.
18602
18603 @item exim-bounce
18604 A bounce message from the Exim MTA.
18605
18606 @item forward
18607 A message forwarded according to informal rules.
18608
18609 @item rfc934
18610 An RFC934-forwarded message.
18611
18612 @item mailman
18613 A mailman digest.
18614
18615 @item clari-briefs
18616 A digest of Clarinet brief news items.
18617
18618 @item slack-digest
18619 Non-standard digest format---matches most things, but does it badly.
18620
18621 @item mail-in-mail
18622 The last resort.
18623 @end table
18624
18625 You can also use the special ``file type'' @code{guess}, which means
18626 that @code{nndoc} will try to guess what file type it is looking at.
18627 @code{digest} means that @code{nndoc} should guess what digest type the
18628 file is.
18629
18630 @code{nndoc} will not try to change the file or insert any extra headers into
18631 it---it will simply, like, let you use the file as the basis for a
18632 group.  And that's it.
18633
18634 If you have some old archived articles that you want to insert into your
18635 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
18636 that.  Say you have an old @file{RMAIL} file with mail that you now want
18637 to split into your new @code{nnml} groups.  You look at that file using
18638 @code{nndoc} (using the @kbd{G f} command in the group buffer
18639 (@pxref{Foreign Groups})), set the process mark on all the articles in
18640 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
18641 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
18642 file is now also stored in lots of @code{nnml} directories, and you can
18643 delete that pesky @file{RMAIL} file.  If you have the guts!
18644
18645 Virtual server variables:
18646
18647 @table @code
18648 @item nndoc-article-type
18649 @vindex nndoc-article-type
18650 This should be one of @code{mbox}, @code{babyl}, @code{digest},
18651 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
18652 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
18653 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
18654 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
18655
18656 @item nndoc-post-type
18657 @vindex nndoc-post-type
18658 This variable says whether Gnus is to consider the group a news group or
18659 a mail group.  There are two valid values:  @code{mail} (the default)
18660 and @code{news}.
18661 @end table
18662
18663 @menu
18664 * Document Server Internals::   How to add your own document types.
18665 @end menu
18666
18667
18668 @node Document Server Internals
18669 @subsubsection Document Server Internals
18670
18671 Adding new document types to be recognized by @code{nndoc} isn't
18672 difficult.  You just have to whip up a definition of what the document
18673 looks like, write a predicate function to recognize that document type,
18674 and then hook into @code{nndoc}.
18675
18676 First, here's an example document type definition:
18677
18678 @example
18679 (mmdf
18680  (article-begin .  "^\^A\^A\^A\^A\n")
18681  (body-end .  "^\^A\^A\^A\^A\n"))
18682 @end example
18683
18684 The definition is simply a unique @dfn{name} followed by a series of
18685 regexp pseudo-variable settings.  Below are the possible
18686 variables---don't be daunted by the number of variables; most document
18687 types can be defined with very few settings:
18688
18689 @table @code
18690 @item first-article
18691 If present, @code{nndoc} will skip past all text until it finds
18692 something that match this regexp.  All text before this will be
18693 totally ignored.
18694
18695 @item article-begin
18696 This setting has to be present in all document type definitions.  It
18697 says what the beginning of each article looks like.  To do more
18698 complicated things that cannot be dealt with a simple regexp, you can
18699 use @code{article-begin-function} instead of this.
18700
18701 @item article-begin-function
18702 If present, this should be a function that moves point to the beginning
18703 of each article.  This setting overrides @code{article-begin}.
18704
18705 @item head-begin
18706 If present, this should be a regexp that matches the head of the
18707 article.  To do more complicated things that cannot be dealt with a
18708 simple regexp, you can use @code{head-begin-function} instead of this.
18709
18710 @item head-begin-function
18711 If present, this should be a function that moves point to the head of
18712 the article.  This setting overrides @code{head-begin}.
18713
18714 @item head-end
18715 This should match the end of the head of the article.  It defaults to
18716 @samp{^$}---the empty line.
18717
18718 @item body-begin
18719 This should match the beginning of the body of the article.  It defaults
18720 to @samp{^\n}.  To do more complicated things that cannot be dealt with
18721 a simple regexp, you can use @code{body-begin-function} instead of this.
18722
18723 @item body-begin-function
18724 If present, this function should move point to the beginning of the body
18725 of the article.  This setting overrides @code{body-begin}.
18726
18727 @item body-end
18728 If present, this should match the end of the body of the article.  To do
18729 more complicated things that cannot be dealt with a simple regexp, you
18730 can use @code{body-end-function} instead of this.
18731
18732 @item body-end-function
18733 If present, this function should move point to the end of the body of
18734 the article.  This setting overrides @code{body-end}.
18735
18736 @item file-begin
18737 If present, this should match the beginning of the file.  All text
18738 before this regexp will be totally ignored.
18739
18740 @item file-end
18741 If present, this should match the end of the file.  All text after this
18742 regexp will be totally ignored.
18743
18744 @end table
18745
18746 So, using these variables @code{nndoc} is able to dissect a document
18747 file into a series of articles, each with a head and a body.  However, a
18748 few more variables are needed since not all document types are all that
18749 news-like---variables needed to transform the head or the body into
18750 something that's palatable for Gnus:
18751
18752 @table @code
18753 @item prepare-body-function
18754 If present, this function will be called when requesting an article.  It
18755 will be called with point at the start of the body, and is useful if the
18756 document has encoded some parts of its contents.
18757
18758 @item article-transform-function
18759 If present, this function is called when requesting an article.  It's
18760 meant to be used for more wide-ranging transformation of both head and
18761 body of the article.
18762
18763 @item generate-head-function
18764 If present, this function is called to generate a head that Gnus can
18765 understand.  It is called with the article number as a parameter, and is
18766 expected to generate a nice head for the article in question.  It is
18767 called when requesting the headers of all articles.
18768
18769 @item generate-article-function
18770 If present, this function is called to generate an entire article that
18771 Gnus can understand.  It is called with the article number as a
18772 parameter when requesting all articles.
18773
18774 @item dissection-function
18775 If present, this function is called to dissect a document by itself,
18776 overriding @code{first-article}, @code{article-begin},
18777 @code{article-begin-function}, @code{head-begin},
18778 @code{head-begin-function}, @code{head-end}, @code{body-begin},
18779 @code{body-begin-function}, @code{body-end}, @code{body-end-function},
18780 @code{file-begin}, and @code{file-end}.
18781
18782 @end table
18783
18784 Let's look at the most complicated example I can come up with---standard
18785 digests:
18786
18787 @example
18788 (standard-digest
18789  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
18790  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
18791  (prepare-body-function . nndoc-unquote-dashes)
18792  (body-end-function . nndoc-digest-body-end)
18793  (head-end . "^ ?$")
18794  (body-begin . "^ ?\n")
18795  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
18796  (subtype digest guess))
18797 @end example
18798
18799 We see that all text before a 70-width line of dashes is ignored; all
18800 text after a line that starts with that @samp{^End of} is also ignored;
18801 each article begins with a 30-width line of dashes; the line separating
18802 the head from the body may contain a single space; and that the body is
18803 run through @code{nndoc-unquote-dashes} before being delivered.
18804
18805 To hook your own document definition into @code{nndoc}, use the
18806 @code{nndoc-add-type} function.  It takes two parameters---the first
18807 is the definition itself and the second (optional) parameter says
18808 where in the document type definition alist to put this definition.
18809 The alist is traversed sequentially, and
18810 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
18811 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
18812 @code{mmdf} type, and so on.  These type predicates should return
18813 @code{nil} if the document is not of the correct type; @code{t} if it
18814 is of the correct type; and a number if the document might be of the
18815 correct type.  A high number means high probability; a low number
18816 means low probability with @samp{0} being the lowest valid number.
18817
18818
18819 @node SOUP
18820 @subsection SOUP
18821 @cindex SOUP
18822 @cindex offline
18823
18824 In the PC world people often talk about ``offline'' newsreaders.  These
18825 are thingies that are combined reader/news transport monstrosities.
18826 With built-in modem programs.  Yecchh!
18827
18828 Of course, us Unix Weenie types of human beans use things like
18829 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
18830 transport things like Ghod intended.  And then we just use normal
18831 newsreaders.
18832
18833 However, it can sometimes be convenient to do something that's a bit
18834 easier on the brain if you have a very slow modem, and you're not really
18835 that interested in doing things properly.
18836
18837 A file format called @sc{soup} has been developed for transporting news
18838 and mail from servers to home machines and back again.  It can be a bit
18839 fiddly.
18840
18841 First some terminology:
18842
18843 @table @dfn
18844
18845 @item server
18846 This is the machine that is connected to the outside world and where you
18847 get news and/or mail from.
18848
18849 @item home machine
18850 This is the machine that you want to do the actual reading and responding
18851 on.  It is typically not connected to the rest of the world in any way.
18852
18853 @item packet
18854 Something that contains messages and/or commands.  There are two kinds
18855 of packets:
18856
18857 @table @dfn
18858 @item message packets
18859 These are packets made at the server, and typically contain lots of
18860 messages for you to read.  These are called @file{SoupoutX.tgz} by
18861 default, where @var{x} is a number.
18862
18863 @item response packets
18864 These are packets made at the home machine, and typically contains
18865 replies that you've written.  These are called @file{SoupinX.tgz} by
18866 default, where @var{x} is a number.
18867
18868 @end table
18869
18870 @end table
18871
18872
18873 @enumerate
18874
18875 @item
18876 You log in on the server and create a @sc{soup} packet.  You can either
18877 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
18878 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
18879 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
18880
18881 @item
18882 You transfer the packet home.  Rail, boat, car or modem will do fine.
18883
18884 @item
18885 You put the packet in your home directory.
18886
18887 @item
18888 You fire up Gnus on your home machine using the @code{nnsoup} back end as
18889 the native or secondary server.
18890
18891 @item
18892 You read articles and mail and answer and followup to the things you
18893 want (@pxref{SOUP Replies}).
18894
18895 @item
18896 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
18897 packet.
18898
18899 @item
18900 You transfer this packet to the server.
18901
18902 @item
18903 You use Gnus to mail this packet out with the @kbd{G s s} command.
18904
18905 @item
18906 You then repeat until you die.
18907
18908 @end enumerate
18909
18910 So you basically have a bipartite system---you use @code{nnsoup} for
18911 reading and Gnus for packing/sending these @sc{soup} packets.
18912
18913 @menu
18914 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
18915 * SOUP Groups::                 A back end for reading @sc{soup} packets.
18916 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
18917 @end menu
18918
18919
18920 @node SOUP Commands
18921 @subsubsection SOUP Commands
18922
18923 These are commands for creating and manipulating @sc{soup} packets.
18924
18925 @table @kbd
18926 @item G s b
18927 @kindex G s b (Group)
18928 @findex gnus-group-brew-soup
18929 Pack all unread articles in the current group
18930 (@code{gnus-group-brew-soup}).  This command understands the
18931 process/prefix convention.
18932
18933 @item G s w
18934 @kindex G s w (Group)
18935 @findex gnus-soup-save-areas
18936 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
18937
18938 @item G s s
18939 @kindex G s s (Group)
18940 @findex gnus-soup-send-replies
18941 Send all replies from the replies packet
18942 (@code{gnus-soup-send-replies}).
18943
18944 @item G s p
18945 @kindex G s p (Group)
18946 @findex gnus-soup-pack-packet
18947 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
18948
18949 @item G s r
18950 @kindex G s r (Group)
18951 @findex nnsoup-pack-replies
18952 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
18953
18954 @item O s
18955 @kindex O s (Summary)
18956 @findex gnus-soup-add-article
18957 This summary-mode command adds the current article to a @sc{soup} packet
18958 (@code{gnus-soup-add-article}).  It understands the process/prefix
18959 convention (@pxref{Process/Prefix}).
18960
18961 @end table
18962
18963
18964 There are a few variables to customize where Gnus will put all these
18965 thingies:
18966
18967 @table @code
18968
18969 @item gnus-soup-directory
18970 @vindex gnus-soup-directory
18971 Directory where Gnus will save intermediate files while composing
18972 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
18973
18974 @item gnus-soup-replies-directory
18975 @vindex gnus-soup-replies-directory
18976 This is what Gnus will use as a temporary directory while sending our
18977 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
18978
18979 @item gnus-soup-prefix-file
18980 @vindex gnus-soup-prefix-file
18981 Name of the file where Gnus stores the last used prefix.  The default is
18982 @samp{gnus-prefix}.
18983
18984 @item gnus-soup-packer
18985 @vindex gnus-soup-packer
18986 A format string command for packing a @sc{soup} packet.  The default is
18987 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
18988
18989 @item gnus-soup-unpacker
18990 @vindex gnus-soup-unpacker
18991 Format string command for unpacking a @sc{soup} packet.  The default is
18992 @samp{gunzip -c %s | tar xvf -}.
18993
18994 @item gnus-soup-packet-directory
18995 @vindex gnus-soup-packet-directory
18996 Where Gnus will look for reply packets.  The default is @file{~/}.
18997
18998 @item gnus-soup-packet-regexp
18999 @vindex gnus-soup-packet-regexp
19000 Regular expression matching @sc{soup} reply packets in
19001 @code{gnus-soup-packet-directory}.
19002
19003 @end table
19004
19005
19006 @node SOUP Groups
19007 @subsubsection SOUP Groups
19008 @cindex nnsoup
19009
19010 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
19011 read incoming packets, unpack them, and put them in a directory where
19012 you can read them at leisure.
19013
19014 These are the variables you can use to customize its behavior:
19015
19016 @table @code
19017
19018 @item nnsoup-tmp-directory
19019 @vindex nnsoup-tmp-directory
19020 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
19021 directory.  (@file{/tmp/} by default.)
19022
19023 @item nnsoup-directory
19024 @vindex nnsoup-directory
19025 @code{nnsoup} then moves each message and index file to this directory.
19026 The default is @file{~/SOUP/}.
19027
19028 @item nnsoup-replies-directory
19029 @vindex nnsoup-replies-directory
19030 All replies will be stored in this directory before being packed into a
19031 reply packet.  The default is @file{~/SOUP/replies/}.
19032
19033 @item nnsoup-replies-format-type
19034 @vindex nnsoup-replies-format-type
19035 The @sc{soup} format of the replies packets.  The default is @samp{?n}
19036 (rnews), and I don't think you should touch that variable.  I probably
19037 shouldn't even have documented it.  Drats!  Too late!
19038
19039 @item nnsoup-replies-index-type
19040 @vindex nnsoup-replies-index-type
19041 The index type of the replies packet.  The default is @samp{?n}, which
19042 means ``none''.  Don't fiddle with this one either!
19043
19044 @item nnsoup-active-file
19045 @vindex nnsoup-active-file
19046 Where @code{nnsoup} stores lots of information.  This is not an ``active
19047 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
19048 this file or mess it up in any way, you're dead.  The default is
19049 @file{~/SOUP/active}.
19050
19051 @item nnsoup-packer
19052 @vindex nnsoup-packer
19053 Format string command for packing a reply @sc{soup} packet.  The default
19054 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
19055
19056 @item nnsoup-unpacker
19057 @vindex nnsoup-unpacker
19058 Format string command for unpacking incoming @sc{soup} packets.  The
19059 default is @samp{gunzip -c %s | tar xvf -}.
19060
19061 @item nnsoup-packet-directory
19062 @vindex nnsoup-packet-directory
19063 Where @code{nnsoup} will look for incoming packets.  The default is
19064 @file{~/}.
19065
19066 @item nnsoup-packet-regexp
19067 @vindex nnsoup-packet-regexp
19068 Regular expression matching incoming @sc{soup} packets.  The default is
19069 @samp{Soupout}.
19070
19071 @item nnsoup-always-save
19072 @vindex nnsoup-always-save
19073 If non-@code{nil}, save the replies buffer after each posted message.
19074
19075 @end table
19076
19077
19078 @node SOUP Replies
19079 @subsubsection SOUP Replies
19080
19081 Just using @code{nnsoup} won't mean that your postings and mailings end
19082 up in @sc{soup} reply packets automagically.  You have to work a bit
19083 more for that to happen.
19084
19085 @findex nnsoup-set-variables
19086 The @code{nnsoup-set-variables} command will set the appropriate
19087 variables to ensure that all your followups and replies end up in the
19088 @sc{soup} system.
19089
19090 In specific, this is what it does:
19091
19092 @lisp
19093 (setq message-send-news-function 'nnsoup-request-post)
19094 (setq message-send-mail-function 'nnsoup-request-mail)
19095 @end lisp
19096
19097 And that's it, really.  If you only want news to go into the @sc{soup}
19098 system you just use the first line.  If you only want mail to be
19099 @sc{soup}ed you use the second.
19100
19101
19102 @node Mail-To-News Gateways
19103 @subsection Mail-To-News Gateways
19104 @cindex mail-to-news gateways
19105 @cindex gateways
19106
19107 If your local @code{nntp} server doesn't allow posting, for some reason
19108 or other, you can post using one of the numerous mail-to-news gateways.
19109 The @code{nngateway} back end provides the interface.
19110
19111 Note that you can't read anything from this back end---it can only be
19112 used to post with.
19113
19114 Server variables:
19115
19116 @table @code
19117 @item nngateway-address
19118 @vindex nngateway-address
19119 This is the address of the mail-to-news gateway.
19120
19121 @item nngateway-header-transformation
19122 @vindex nngateway-header-transformation
19123 News headers often have to be transformed in some odd way or other
19124 for the mail-to-news gateway to accept it.  This variable says what
19125 transformation should be called, and defaults to
19126 @code{nngateway-simple-header-transformation}.  The function is called
19127 narrowed to the headers to be transformed and with one parameter---the
19128 gateway address.
19129
19130 This default function just inserts a new @code{To} header based on the
19131 @code{Newsgroups} header and the gateway address.
19132 For instance, an article with this @code{Newsgroups} header:
19133
19134 @example
19135 Newsgroups: alt.religion.emacs
19136 @end example
19137
19138 will get this @code{To} header inserted:
19139
19140 @example
19141 To: alt-religion-emacs@@GATEWAY
19142 @end example
19143
19144 The following pre-defined functions exist:
19145
19146 @findex nngateway-simple-header-transformation
19147 @table @code
19148
19149 @item nngateway-simple-header-transformation
19150 Creates a @code{To} header that looks like
19151 @var{newsgroup}@@@code{nngateway-address}.
19152
19153 @findex nngateway-mail2news-header-transformation
19154
19155 @item nngateway-mail2news-header-transformation
19156 Creates a @code{To} header that looks like
19157 @code{nngateway-address}.
19158 @end table
19159
19160 @end table
19161
19162 Here's an example:
19163
19164 @lisp
19165 (setq gnus-post-method
19166       '(nngateway
19167         "mail2news@@replay.com"
19168         (nngateway-header-transformation
19169          nngateway-mail2news-header-transformation)))
19170 @end lisp
19171
19172 So, to use this, simply say something like:
19173
19174 @lisp
19175 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
19176 @end lisp
19177
19178
19179
19180 @node Combined Groups
19181 @section Combined Groups
19182
19183 Gnus allows combining a mixture of all the other group types into bigger
19184 groups.
19185
19186 @menu
19187 * Virtual Groups::              Combining articles from many groups.
19188 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
19189 @end menu
19190
19191
19192 @node Virtual Groups
19193 @subsection Virtual Groups
19194 @cindex nnvirtual
19195 @cindex virtual groups
19196 @cindex merging groups
19197
19198 An @dfn{nnvirtual group} is really nothing more than a collection of
19199 other groups.
19200
19201 For instance, if you are tired of reading many small groups, you can
19202 put them all in one big group, and then grow tired of reading one
19203 big, unwieldy group.  The joys of computing!
19204
19205 You specify @code{nnvirtual} as the method.  The address should be a
19206 regexp to match component groups.
19207
19208 All marks in the virtual group will stick to the articles in the
19209 component groups.  So if you tick an article in a virtual group, the
19210 article will also be ticked in the component group from whence it
19211 came.  (And vice versa---marks from the component groups will also be
19212 shown in the virtual group.).  To create an empty virtual group, run
19213 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
19214 and edit the method regexp with @kbd{M-e}
19215 (@code{gnus-group-edit-group-method})
19216
19217 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
19218 newsgroups into one, big, happy newsgroup:
19219
19220 @lisp
19221 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
19222 @end lisp
19223
19224 The component groups can be native or foreign; everything should work
19225 smoothly, but if your computer explodes, it was probably my fault.
19226
19227 Collecting the same group from several servers might actually be a good
19228 idea if users have set the Distribution header to limit distribution.
19229 If you would like to read @samp{soc.motss} both from a server in Japan
19230 and a server in Norway, you could use the following as the group regexp:
19231
19232 @example
19233 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
19234 @end example
19235
19236 (Remember, though, that if you're creating the group with @kbd{G m}, you
19237 shouldn't double the backslashes, and you should leave off the quote
19238 characters at the beginning and the end of the string.)
19239
19240 This should work kinda smoothly---all articles from both groups should
19241 end up in this one, and there should be no duplicates.  Threading (and
19242 the rest) will still work as usual, but there might be problems with the
19243 sequence of articles.  Sorting on date might be an option here
19244 (@pxref{Selecting a Group}).
19245
19246 One limitation, however---all groups included in a virtual
19247 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
19248 zombie groups can't be component groups for @code{nnvirtual} groups.
19249
19250 @vindex nnvirtual-always-rescan
19251 If the @code{nnvirtual-always-rescan} variable is non-@code{nil} (which
19252 is the default), @code{nnvirtual} will always scan groups for unread
19253 articles when entering a virtual group.  If this variable is @code{nil}
19254 and you read articles in a component group after the virtual group has
19255 been activated, the read articles from the component group will show up
19256 when you enter the virtual group.  You'll also see this effect if you
19257 have two virtual groups that have a component group in common.  If
19258 that's the case, you should set this variable to @code{t}.  Or you can
19259 just tap @code{M-g} on the virtual group every time before you enter
19260 it---it'll have much the same effect.
19261
19262 @code{nnvirtual} can have both mail and news groups as component groups.
19263 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
19264 has to ask the back end of the component group the article comes from
19265 whether it is a news or mail back end.  However, when you do a @kbd{^},
19266 there is typically no sure way for the component back end to know this,
19267 and in that case @code{nnvirtual} tells Gnus that the article came from a
19268 not-news back end.  (Just to be on the safe side.)
19269
19270 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
19271 line from the article you respond to in these cases.
19272
19273 @code{nnvirtual} groups do not inherit anything but articles and marks
19274 from component groups---group parameters, for instance, are not
19275 inherited.
19276
19277
19278 @node Kibozed Groups
19279 @subsection Kibozed Groups
19280 @cindex nnkiboze
19281 @cindex kibozing
19282
19283 @dfn{Kibozing} is defined by the @acronym{OED} as ``grepping through
19284 (parts of) the news feed''.  @code{nnkiboze} is a back end that will
19285 do this for you.  Oh joy!  Now you can grind any @acronym{NNTP} server
19286 down to a halt with useless requests!  Oh happiness!
19287
19288 @kindex G k (Group)
19289 To create a kibozed group, use the @kbd{G k} command in the group
19290 buffer.
19291
19292 The address field of the @code{nnkiboze} method is, as with
19293 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
19294 @code{nnkiboze} group.  That's where most similarities between
19295 @code{nnkiboze} and @code{nnvirtual} end.
19296
19297 In addition to this regexp detailing component groups, an
19298 @code{nnkiboze} group must have a score file to say what articles are
19299 to be included in the group (@pxref{Scoring}).
19300
19301 @kindex M-x nnkiboze-generate-groups
19302 @findex nnkiboze-generate-groups
19303 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
19304 @code{nnkiboze} groups you want to have.  This command will take time.
19305 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
19306 headers from all the articles in all the component groups and run them
19307 through the scoring process to determine if there are any articles in
19308 the groups that are to be part of the @code{nnkiboze} groups.
19309
19310 Please limit the number of component groups by using restrictive
19311 regexps.  Otherwise your sysadmin may become annoyed with you, and the
19312 @acronym{NNTP} site may throw you off and never let you back in again.
19313 Stranger things have happened.
19314
19315 @code{nnkiboze} component groups do not have to be alive---they can be dead,
19316 and they can be foreign.  No restrictions.
19317
19318 @vindex nnkiboze-directory
19319 The generation of an @code{nnkiboze} group means writing two files in
19320 @code{nnkiboze-directory}, which is @file{~/News/kiboze/} by default.
19321 One contains the @acronym{NOV} header lines for all the articles in
19322 the group, and the other is an additional @file{.newsrc} file to store
19323 information on what groups have been searched through to find
19324 component articles.
19325
19326 Articles marked as read in the @code{nnkiboze} group will have
19327 their @acronym{NOV} lines removed from the @acronym{NOV} file.
19328
19329
19330 @node Email Based Diary
19331 @section Email Based Diary
19332 @cindex diary
19333 @cindex email based diary
19334 @cindex calendar
19335
19336 This section describes a special mail back end called @code{nndiary},
19337 and its companion library @code{gnus-diary}.  It is ``special'' in the
19338 sense that it is not meant to be one of the standard alternatives for
19339 reading mail with Gnus.  See @ref{Choosing a Mail Back End} for that.
19340 Instead, it is used to treat @emph{some} of your mails in a special way,
19341 namely, as event reminders.
19342
19343 Here is a typical scenario:
19344
19345 @itemize @bullet
19346 @item
19347 You've got a date with Andy Mc Dowell or Bruce Willis (select according
19348 to your sexual preference) in one month.  You don't want to forget it.
19349 @item
19350 So you send a ``reminder'' message (actually, a diary one) to yourself.
19351 @item
19352 You forget all about it and keep on getting and reading new mail, as usual.
19353 @item
19354 From time to time, as you type `g' in the group buffer and as the date
19355 is getting closer, the message will pop up again to remind you of your
19356 appointment, just as if it were new and unread.
19357 @item
19358 Read your ``new'' messages, this one included, and start dreaming again
19359 of the night you're gonna have.
19360 @item
19361 Once the date is over (you actually fell asleep just after dinner), the
19362 message will be automatically deleted if it is marked as expirable.
19363 @end itemize
19364
19365 The Gnus Diary back end has the ability to handle regular appointments
19366 (that wouldn't ever be deleted) as well as punctual ones, operates as a
19367 real mail back end and is configurable in many ways.  All of this is
19368 explained in the sections below.
19369
19370 @menu
19371 * The NNDiary Back End::        Basic setup and usage.
19372 * The Gnus Diary Library::      Utility toolkit on top of nndiary.
19373 * Sending or Not Sending::      A final note on sending diary messages.
19374 @end menu
19375
19376
19377 @node The NNDiary Back End
19378 @subsection The NNDiary Back End
19379 @cindex nndiary
19380 @cindex the nndiary back end
19381
19382 @code{nndiary} is a back end very similar to @code{nnml} (@pxref{Mail
19383 Spool}).  Actually, it could appear as a mix of @code{nnml} and
19384 @code{nndraft}.  If you know @code{nnml}, you're already familiar with
19385 the message storing scheme of @code{nndiary}: one file per message, one
19386 directory per group.
19387
19388   Before anything, there is one requirement to be able to run
19389 @code{nndiary} properly: you @emph{must} use the group timestamp feature
19390 of Gnus.  This adds a timestamp to each group's parameters.  @ref{Group
19391 Timestamp} to see how it's done.
19392
19393 @menu
19394 * Diary Messages::              What makes a message valid for nndiary.
19395 * Running NNDiary::             NNDiary has two modes of operation.
19396 * Customizing NNDiary::         Bells and whistles.
19397 @end menu
19398
19399 @node Diary Messages
19400 @subsubsection Diary Messages
19401 @cindex nndiary messages
19402 @cindex nndiary mails
19403
19404 @code{nndiary} messages are just normal ones, except for the mandatory
19405 presence of 7 special headers.  These headers are of the form
19406 @code{X-Diary-<something>}, @code{<something>} being one of
19407 @code{Minute}, @code{Hour}, @code{Dom}, @code{Month}, @code{Year},
19408 @code{Time-Zone} and @code{Dow}.  @code{Dom} means ``Day of Month'', and
19409 @code{dow} means ``Day of Week''.  These headers actually behave like
19410 crontab specifications and define the event date(s):
19411
19412 @itemize @bullet
19413 @item
19414 For all headers except the @code{Time-Zone} one, a header value is
19415 either a star (meaning all possible values), or a list of fields
19416 (separated by a comma).
19417 @item
19418 A field is either an integer, or a range.
19419 @item
19420 A range is two integers separated by a dash.
19421 @item
19422 Possible integer values are 0--59 for @code{Minute}, 0--23 for
19423 @code{Hour}, 1--31 for @code{Dom}, 1--12 for @code{Month}, above 1971
19424 for @code{Year} and 0--6 for @code{Dow} (0 meaning Sunday).
19425 @item
19426 As a special case, a star in either @code{Dom} or @code{Dow} doesn't
19427 mean ``all possible values'', but ``use only the other field''.  Note
19428 that if both are star'ed, the use of either one gives the same result.
19429 @item
19430 The @code{Time-Zone} header is special in that it can only have one
19431 value (@code{GMT}, for instance).  A star doesn't mean ``all possible
19432 values'' (because it makes no sense), but ``the current local time
19433 zone''.  Most of the time, you'll be using a star here.  However, for a
19434 list of available time zone values, see the variable
19435 @code{nndiary-headers}.
19436 @end itemize
19437
19438 As a concrete example, here are the diary headers to add to your message
19439 for specifying ``Each Monday and each 1st of month, at 12:00, 20:00,
19440 21:00, 22:00, 23:00 and 24:00, from 1999 to 2010'' (I'll let you find
19441 what to do then):
19442
19443 @example
19444 X-Diary-Minute: 0
19445 X-Diary-Hour: 12, 20-24
19446 X-Diary-Dom: 1
19447 X-Diary-Month: *
19448 X-Diary-Year: 1999-2010
19449 X-Diary-Dow: 1
19450 X-Diary-Time-Zone: *
19451 @end example
19452
19453 @node Running NNDiary
19454 @subsubsection Running NNDiary
19455 @cindex running nndiary
19456 @cindex nndiary operation modes
19457
19458 @code{nndiary} has two modes of operation: ``traditional'' (the default)
19459 and ``autonomous''.  In traditional mode, @code{nndiary} does not get new
19460 mail by itself.  You have to move (@kbd{B m}) or copy (@kbd{B c}) mails
19461 from your primary mail back end to nndiary groups in order to handle them
19462 as diary messages.  In autonomous mode, @code{nndiary} retrieves its own
19463 mail and handles it independently from your primary mail back end.
19464
19465 One should note that Gnus is not inherently designed to allow several
19466 ``master'' mail back ends at the same time.  However, this does make
19467 sense with @code{nndiary}: you really want to send and receive diary
19468 messages to your diary groups directly.  So, @code{nndiary} supports
19469 being sort of a ``second primary mail back end'' (to my knowledge, it is
19470 the only back end offering this feature).  However, there is a limitation
19471 (which I hope to fix some day): respooling doesn't work in autonomous
19472 mode.
19473
19474 In order to use @code{nndiary} in autonomous mode, you have several
19475 things to do:
19476
19477 @itemize @bullet
19478 @item
19479 Allow @code{nndiary} to retrieve new mail by itself.  Put the following
19480 line in your @file{~/.gnus.el} file:
19481
19482 @lisp
19483 (setq nndiary-get-new-mail t)
19484 @end lisp
19485 @item
19486 You must arrange for diary messages (those containing @code{X-Diary-*}
19487 headers) to be split in a private folder @emph{before} Gnus treat them.
19488 Again, this is needed because Gnus cannot (yet ?) properly handle
19489 multiple primary mail back ends.  Getting those messages from a separate
19490 source will compensate this misfeature to some extent.
19491
19492 As an example, here's my procmailrc entry to store diary files in
19493 @file{~/.nndiary} (the default @code{nndiary} mail source file):
19494
19495 @example
19496 :0 HD :
19497 * ^X-Diary
19498 .nndiary
19499 @end example
19500 @end itemize
19501
19502 Once this is done, you might want to customize the following two options
19503 that affect the diary mail retrieval and splitting processes:
19504
19505 @defvar nndiary-mail-sources
19506 This is the diary-specific replacement for the standard
19507 @code{mail-sources} variable.  It obeys the same syntax, and defaults to
19508 @code{(file :path "~/.nndiary")}.
19509 @end defvar
19510
19511 @defvar nndiary-split-methods
19512 This is the diary-specific replacement for the standard
19513 @code{nnmail-split-methods} variable.  It obeys the same syntax.
19514 @end defvar
19515
19516   Finally, you may add a permanent @code{nndiary} virtual server
19517 (something like @code{(nndiary "diary")} should do) to your
19518 @code{gnus-secondary-select-methods}.
19519
19520   Hopefully, almost everything (see the TODO section in
19521 @file{nndiary.el}) will work as expected when you restart Gnus: in
19522 autonomous mode, typing @kbd{g} and @kbd{M-g} in the group buffer, will
19523 also get your new diary mails and split them according to your
19524 diary-specific rules, @kbd{F} will find your new diary groups etc.
19525
19526 @node Customizing NNDiary
19527 @subsubsection Customizing NNDiary
19528 @cindex customizing nndiary
19529 @cindex nndiary customization
19530
19531 Now that @code{nndiary} is up and running, it's time to customize it.
19532 The custom group is called @code{nndiary} (no, really ?!).  You should
19533 browse it to figure out which options you'd like to tweak.  The following
19534 two variables are probably the only ones you will want to change:
19535
19536 @defvar nndiary-reminders
19537 This is the list of times when you want to be reminded of your
19538 appointments (e.g. 3 weeks before, then 2 days before, then 1 hour
19539 before and that's it).  Remember that ``being reminded'' means that the
19540 diary message will pop up as brand new and unread again when you get new
19541 mail.
19542 @end defvar
19543
19544 @defvar nndiary-week-starts-on-monday
19545 Rather self-explanatory.  Otherwise, Sunday is assumed (this is the
19546 default).
19547 @end defvar
19548
19549
19550 @node The Gnus Diary Library
19551 @subsection The Gnus Diary Library
19552 @cindex gnus-diary
19553 @cindex the gnus diary library
19554
19555 Using @code{nndiary} manually (I mean, writing the headers by hand and
19556 so on) would be rather boring.  Fortunately, there is a library called
19557 @code{gnus-diary} written on top of @code{nndiary}, that does many
19558 useful things for you.
19559
19560   In order to use it, add the following line to your @file{~/.gnus.el} file:
19561
19562 @lisp
19563 (require 'gnus-diary)
19564 @end lisp
19565
19566   Also, you shouldn't use any @code{gnus-user-format-function-[d|D]}
19567 (@pxref{Summary Buffer Lines}).  @code{gnus-diary} provides both of these
19568 (sorry if you used them before).
19569
19570
19571 @menu
19572 * Diary Summary Line Format::           A nicer summary buffer line format.
19573 * Diary Articles Sorting::              A nicer way to sort messages.
19574 * Diary Headers Generation::            Not doing it manually.
19575 * Diary Group Parameters::              Not handling them manually.
19576 @end menu
19577
19578 @node Diary Summary Line Format
19579 @subsubsection Diary Summary Line Format
19580 @cindex diary summary buffer line
19581 @cindex diary summary line format
19582
19583 Displaying diary messages in standard summary line format (usually
19584 something like @samp{From Joe: Subject}) is pretty useless.  Most of
19585 the time, you're the one who wrote the message, and you mostly want to
19586 see the event's date.
19587
19588   @code{gnus-diary} provides two supplemental user formats to be used in
19589 summary line formats.  @code{D} corresponds to a formatted time string
19590 for the next occurrence of the event (e.g. ``Sat, Sep 22 01, 12:00''),
19591 while @code{d} corresponds to an approximative remaining time until the
19592 next occurrence of the event (e.g. ``in 6 months, 1 week'').
19593
19594   For example, here's how Joe's birthday is displayed in my
19595 @code{nndiary+diary:birthdays} summary buffer (note that the message is
19596 expirable, but will never be deleted, as it specifies a periodic event):
19597
19598 @example
19599    E  Sat, Sep 22 01, 12:00: Joe's birthday (in 6 months, 1 week)
19600 @end example
19601
19602 In order to get something like the above, you would normally add the
19603 following line to your diary groups'parameters:
19604
19605 @lisp
19606 (gnus-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n")
19607 @end lisp
19608
19609 However, @code{gnus-diary} does it automatically (@pxref{Diary Group
19610 Parameters}).  You can however customize the provided summary line format
19611 with the following user options:
19612
19613 @defvar gnus-diary-summary-line-format
19614 Defines the summary line format used for diary groups (@pxref{Summary
19615 Buffer Lines}).  @code{gnus-diary} uses it to automatically update the
19616 diary groups'parameters.
19617 @end defvar
19618
19619 @defvar gnus-diary-time-format
19620 Defines the format to display dates in diary summary buffers.  This is
19621 used by the @code{D} user format.  See the docstring for details.
19622 @end defvar
19623
19624 @defvar gnus-diary-delay-format-function
19625 Defines the format function to use for displaying delays (remaining
19626 times) in diary summary buffers.  This is used by the @code{d} user
19627 format.  There are currently built-in functions for English and French;
19628 you can also define your own.  See the docstring for details.
19629 @end defvar
19630
19631 @node Diary Articles Sorting
19632 @subsubsection Diary Articles Sorting
19633 @cindex diary articles sorting
19634 @cindex diary summary lines sorting
19635 @findex gnus-summary-sort-by-schedule
19636 @findex gnus-thread-sort-by-schedule
19637 @findex gnus-article-sort-by-schedule
19638
19639 @code{gnus-diary} provides new sorting functions (@pxref{Sorting the
19640 Summary Buffer} ) called @code{gnus-summary-sort-by-schedule},
19641 @code{gnus-thread-sort-by-schedule} and
19642 @code{gnus-article-sort-by-schedule}.  These functions let you organize
19643 your diary summary buffers from the closest event to the farthest one.
19644
19645 @code{gnus-diary} automatically installs
19646 @code{gnus-summary-sort-by-schedule} as a menu item in the summary
19647 buffer's ``sort'' menu, and the two others as the primary (hence
19648 default) sorting functions in the group parameters (@pxref{Diary Group
19649 Parameters}).
19650
19651 @node Diary Headers Generation
19652 @subsubsection Diary Headers Generation
19653 @cindex diary headers generation
19654 @findex gnus-diary-check-message
19655
19656 @code{gnus-diary} provides a function called
19657 @code{gnus-diary-check-message} to help you handle the @code{X-Diary-*}
19658 headers.  This function ensures that the current message contains all the
19659 required diary headers, and prompts you for values or corrections if
19660 needed.
19661
19662   This function is hooked into the @code{nndiary} back end, so that
19663 moving or copying an article to a diary group will trigger it
19664 automatically.  It is also bound to @kbd{C-c C-f d} in
19665 @code{message-mode} and @code{article-edit-mode} in order to ease the
19666 process of converting a usual mail to a diary one.
19667
19668   This function takes a prefix argument which will force prompting of
19669 all diary headers, regardless of their presence or validity.  That way,
19670 you can very easily reschedule an already valid diary message, for
19671 instance.
19672
19673 @node Diary Group Parameters
19674 @subsubsection Diary Group Parameters
19675 @cindex diary group parameters
19676
19677 When you create a new diary group, or visit one, @code{gnus-diary}
19678 automatically checks your group parameters and if needed, sets the
19679 summary line format to the diary-specific value, installs the
19680 diary-specific sorting functions, and also adds the different
19681 @code{X-Diary-*} headers to the group's posting-style.  It is then easier
19682 to send a diary message, because if you use @kbd{C-u a} or @kbd{C-u m}
19683 on a diary group to prepare a message, these headers will be inserted
19684 automatically (although not filled with proper values yet).
19685
19686 @node Sending or Not Sending
19687 @subsection Sending or Not Sending
19688
19689 Well, assuming you've read all of the above, here are two final notes on
19690 mail sending with @code{nndiary}:
19691
19692 @itemize @bullet
19693 @item
19694 @code{nndiary} is a @emph{real} mail back end.  You really send real diary
19695 messsages for real.  This means for instance that you can give
19696 appointments to anybody (provided they use Gnus and @code{nndiary}) by
19697 sending the diary message to them as well.
19698 @item
19699 However, since @code{nndiary} also has a @code{request-post} method, you
19700 can also use @kbd{C-u a} instead of @kbd{C-u m} on a diary group and the
19701 message won't actually be sent; just stored locally in the group. This
19702 comes in very handy for private appointments.
19703 @end itemize
19704
19705 @node Gnus Unplugged
19706 @section Gnus Unplugged
19707 @cindex offline
19708 @cindex unplugged
19709 @cindex agent
19710 @cindex Gnus agent
19711 @cindex Gnus unplugged
19712
19713 In olden times (ca. February '88), people used to run their newsreaders
19714 on big machines with permanent connections to the net.  News transport
19715 was dealt with by news servers, and all the newsreaders had to do was to
19716 read news.  Believe it or not.
19717
19718 Nowadays most people read news and mail at home, and use some sort of
19719 modem to connect to the net.  To avoid running up huge phone bills, it
19720 would be nice to have a way to slurp down all the news and mail, hang up
19721 the phone, read for several hours, and then upload any responses you
19722 have to make.  And then you repeat the procedure.
19723
19724 Of course, you can use news servers for doing this as well.  I've used
19725 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
19726 for some years, but doing that's a bore.  Moving the news server
19727 functionality up to the newsreader makes sense if you're the only person
19728 reading news on a machine.
19729
19730 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
19731 fact, you don't have to configure anything as the agent is now enabled
19732 by default (@pxref{Agent Variables, gnus-agent}).
19733
19734 Of course, to use it as such, you have to learn a few new commands.
19735
19736 @menu
19737 * Agent Basics::                How it all is supposed to work.
19738 * Agent Categories::            How to tell the Gnus Agent what to download.
19739 * Agent Commands::              New commands for all the buffers.
19740 * Agent Visuals::               Ways that the agent may effect your summary buffer.
19741 * Agent as Cache::              The Agent is a big cache too.
19742 * Agent Expiry::                How to make old articles go away.
19743 * Agent Regeneration::          How to recover from lost connections and other accidents.
19744 * Agent and flags::             How the Agent maintains flags.
19745 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
19746 * Outgoing Messages::           What happens when you post/mail something?
19747 * Agent Variables::             Customizing is fun.
19748 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
19749 * Batching Agents::             How to fetch news from a @code{cron} job.
19750 * Agent Caveats::               What you think it'll do and what it does.
19751 @end menu
19752
19753
19754 @node Agent Basics
19755 @subsection Agent Basics
19756
19757 First, let's get some terminology out of the way.
19758
19759 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
19760 connection to the net (and notified the Agent that this is the case).
19761 When the connection to the net is up again (and Gnus knows this), the
19762 Agent is @dfn{plugged}.
19763
19764 The @dfn{local} machine is the one you're running on, and which isn't
19765 connected to the net continuously.
19766
19767 @dfn{Downloading} means fetching things from the net to your local
19768 machine.  @dfn{Uploading} is doing the opposite.
19769
19770 You know that Gnus gives you all the opportunity you'd ever want for
19771 shooting yourself in the foot.  Some people call it flexibility.  Gnus
19772 is also customizable to a great extent, which means that the user has a
19773 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
19774 you in your foot, but with Gnus, you have a choice!
19775
19776 Gnus is never really in plugged or unplugged state.  Rather, it applies
19777 that state to each server individually.  This means that some servers
19778 can be plugged while others can be unplugged.  Additionally, some
19779 servers can be ignored by the Agent altogether (which means that
19780 they're kinda like plugged always).
19781
19782 So when you unplug the Agent and then wonder why is Gnus opening a
19783 connection to the Net, the next step to do is to look whether all
19784 servers are agentized.  If there is an unagentized server, you found
19785 the culprit.
19786
19787 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
19788 reachable.  When Gnus notices this, it asks you whether you want the
19789 server to be switched to offline state.  If you say yes, then the
19790 server will behave somewhat as if it was unplugged, except that Gnus
19791 will ask you whether you want to switch it back online again.
19792
19793 Let's take a typical Gnus session using the Agent.
19794
19795 @itemize @bullet
19796
19797 @item
19798 @findex gnus-unplugged
19799 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
19800 Agent in a disconnected state.  You can read all the news that you have
19801 already fetched while in this mode.
19802
19803 @item
19804 You then decide to see whether any new news has arrived.  You connect
19805 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
19806 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
19807 as usual.  To check for new mail in unplugged mode (@pxref{Mail
19808 Source Specifiers}).
19809
19810 @item
19811 You can then read the new news immediately, or you can download the
19812 news onto your local machine.  If you want to do the latter, you press
19813 @kbd{g} to check if there are any new news and then @kbd{J s} to fetch
19814 all the eligible articles in all the groups.  (To let Gnus know which
19815 articles you want to download, @pxref{Agent Categories}).
19816
19817 @item
19818 After fetching the articles, you press @kbd{J j} to make Gnus become
19819 unplugged again, and you shut down the PPP thing (or whatever).  And
19820 then you read the news offline.
19821
19822 @item
19823 And then you go to step 2.
19824 @end itemize
19825
19826 Here are some things you should do the first time (or so) that you use
19827 the Agent.
19828
19829 @itemize @bullet
19830
19831 @item
19832 Decide which servers should be covered by the Agent.  If you have a mail
19833 back end, it would probably be nonsensical to have it covered by the
19834 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
19835 @kbd{J a} on the server (or servers) that you wish to have covered by the
19836 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
19837 added servers you do not wish to have covered by the Agent.  By default,
19838 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
19839 @code{gnus-secondary-select-methods} are agentized.
19840
19841 @item
19842 Decide on download policy.  It's fairly simple once you decide whether
19843 you are going to use agent categories, topic parameters, and/or group
19844 parameters to implement your policy.  If you're new to gnus, it
19845 is probably best to start with a category, @xref{Agent Categories}.
19846
19847 Both topic parameters (@pxref{Topic Parameters}) and agent categories
19848 (@pxref{Agent Categories}) provide for setting a policy that applies
19849 to multiple groups.  Which you use is entirely up to you.  Topic
19850 parameters do override categories so, if you mix the two, you'll have
19851 to take that into account.  If you have a few groups that deviate from
19852 your policy, you can use group parameters (@pxref{Group Parameters}) to
19853 configure them.
19854
19855 @item
19856 Uhm@dots{} that's it.
19857 @end itemize
19858
19859
19860 @node Agent Categories
19861 @subsection Agent Categories
19862
19863 One of the main reasons to integrate the news transport layer into the
19864 newsreader is to allow greater control over what articles to download.
19865 There's not much point in downloading huge amounts of articles, just to
19866 find out that you're not interested in reading any of them.  It's better
19867 to be somewhat more conservative in choosing what to download, and then
19868 mark the articles for downloading manually if it should turn out that
19869 you're interested in the articles anyway.
19870
19871 One of the more effective methods for controlling what is to be
19872 downloaded is to create a @dfn{category} and then assign some (or all)
19873 groups to this category.  Groups that do not belong in any other
19874 category belong to the @code{default} category.  Gnus has its own
19875 buffer for creating and managing categories.
19876
19877 If you prefer, you can also use group parameters (@pxref{Group
19878 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
19879 alternative approach to controlling the agent.  The only real
19880 difference is that categories are specific to the agent (so there is
19881 less to learn) while group and topic parameters include the kitchen
19882 sink.
19883
19884 Since you can set agent parameters in several different places we have
19885 a rule to decide which source to believe.  This rule specifies that
19886 the parameter sources are checked in the following order: group
19887 parameters, topic parameters, agent category, and finally customizable
19888 variables.  So you can mix all of these sources to produce a wide range
19889 of behavior, just don't blame me if you don't remember where you put
19890 your settings.
19891
19892 @menu
19893 * Category Syntax::             What a category looks like.
19894 * Category Buffer::             A buffer for maintaining categories.
19895 * Category Variables::          Customize'r'Us.
19896 @end menu
19897
19898
19899 @node Category Syntax
19900 @subsubsection Category Syntax
19901
19902 A category consists of a name, the list of groups belonging to the
19903 category, and a number of optional parameters that override the
19904 customizable variables.  The complete list of agent parameters are
19905 listed below.
19906
19907 @cindex Agent Parameters
19908 @table @code
19909 @item agent-groups
19910 The list of groups that are in this category.
19911
19912 @item agent-predicate
19913 A predicate which (generally) gives a rough outline of which articles
19914 are eligible for downloading; and
19915
19916 @item agent-score
19917 a score rule which (generally) gives you a finer granularity when
19918 deciding what articles to download.  (Note that this @dfn{download
19919 score} is not necessarily related to normal scores.)
19920
19921 @item agent-enable-expiration
19922 a boolean indicating whether the agent should expire old articles in
19923 this group.  Most groups should be expired to conserve disk space.  In
19924 fact, its probably safe to say that the gnus.* hierarchy contains the
19925 only groups that should not be expired.
19926
19927 @item agent-days-until-old
19928 an integer indicating the number of days that the agent should wait
19929 before deciding that a read article is safe to expire.
19930
19931 @item agent-low-score
19932 an integer that overrides the value of @code{gnus-agent-low-score}.
19933
19934 @item agent-high-score
19935 an integer that overrides the value of @code{gnus-agent-high-score}.
19936
19937 @item agent-short-article
19938 an integer that overrides the value of
19939 @code{gnus-agent-short-article}.
19940
19941 @item agent-long-article
19942 an integer that overrides the value of @code{gnus-agent-long-article}.
19943
19944 @item agent-enable-undownloaded-faces
19945 a symbol indicating whether the summary buffer should display
19946 undownloaded articles using the @code{gnus-summary-*-undownloaded-face}
19947 faces.  Any symbol other than @code{nil} will enable the use of
19948 undownloaded faces.
19949 @end table
19950
19951 The name of a category can not be changed once the category has been
19952 created.
19953
19954 Each category maintains a list of groups that are exclusive members of
19955 that category.  The exclusivity rule is automatically enforced, add a
19956 group to a new category and it is automatically removed from its old
19957 category.
19958
19959 A predicate in its simplest form can be a single predicate such as
19960 @code{true} or @code{false}.  These two will download every available
19961 article or nothing respectively.  In the case of these two special
19962 predicates an additional score rule is superfluous.
19963
19964 Predicates of @code{high} or @code{low} download articles in respect of
19965 their scores in relationship to @code{gnus-agent-high-score} and
19966 @code{gnus-agent-low-score} as described below.
19967
19968 To gain even finer control of what is to be regarded eligible for
19969 download a predicate can consist of a number of predicates with logical
19970 operators sprinkled in between.
19971
19972 Perhaps some examples are in order.
19973
19974 Here's a simple predicate.  (It's the default predicate, in fact, used
19975 for all groups that don't belong to any other category.)
19976
19977 @lisp
19978 short
19979 @end lisp
19980
19981 Quite simple, eh?  This predicate is true if and only if the article is
19982 short (for some value of ``short'').
19983
19984 Here's a more complex predicate:
19985
19986 @lisp
19987 (or high
19988     (and
19989      (not low)
19990      (not long)))
19991 @end lisp
19992
19993 This means that an article should be downloaded if it has a high score,
19994 or if the score is not low and the article is not long.  You get the
19995 drift.
19996
19997 The available logical operators are @code{or}, @code{and} and
19998 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
19999 @samp{|}, @code{&} and @code{!} instead.)
20000
20001 The following predicates are pre-defined, but if none of these fit what
20002 you want to do, you can write your own.
20003
20004 When evaluating each of these predicates, the named constant will be
20005 bound to the value determined by calling
20006 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
20007 example, gnus-agent-short-article will be bound to
20008 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
20009 means that you can specify a predicate in your category then tune that
20010 predicate to individual groups.
20011
20012 @table @code
20013 @item short
20014 True if the article is shorter than @code{gnus-agent-short-article}
20015 lines; default 100.
20016
20017 @item long
20018 True if the article is longer than @code{gnus-agent-long-article}
20019 lines; default 200.
20020
20021 @item low
20022 True if the article has a download score less than
20023 @code{gnus-agent-low-score}; default 0.
20024
20025 @item high
20026 True if the article has a download score greater than
20027 @code{gnus-agent-high-score}; default 0.
20028
20029 @item spam
20030 True if the Gnus Agent guesses that the article is spam.  The
20031 heuristics may change over time, but at present it just computes a
20032 checksum and sees whether articles match.
20033
20034 @item true
20035 Always true.
20036
20037 @item false
20038 Always false.
20039 @end table
20040
20041 If you want to create your own predicate function, here's what you have
20042 to know:  The functions are called with no parameters, but the
20043 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
20044 useful values.
20045
20046 For example, you could decide that you don't want to download articles
20047 that were posted more than a certain number of days ago (e.g. posted
20048 more than @code{gnus-agent-expire-days} ago) you might write a function
20049 something along the lines of the following:
20050
20051 @lisp
20052 (defun my-article-old-p ()
20053   "Say whether an article is old."
20054   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
20055      (- (time-to-days (current-time)) gnus-agent-expire-days)))
20056 @end lisp
20057
20058 with the predicate then defined as:
20059
20060 @lisp
20061 (not my-article-old-p)
20062 @end lisp
20063
20064 or you could append your predicate to the predefined
20065 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
20066 wherever.
20067
20068 @lisp
20069 (require 'gnus-agent)
20070 (setq  gnus-category-predicate-alist
20071   (append gnus-category-predicate-alist
20072          '((old . my-article-old-p))))
20073 @end lisp
20074
20075 and simply specify your predicate as:
20076
20077 @lisp
20078 (not old)
20079 @end lisp
20080
20081 If/when using something like the above, be aware that there are many
20082 misconfigured systems/mailers out there and so an article's date is not
20083 always a reliable indication of when it was posted.  Hell, some people
20084 just don't give a damn.
20085
20086 The above predicates apply to @emph{all} the groups which belong to the
20087 category.  However, if you wish to have a specific predicate for an
20088 individual group within a category, or you're just too lazy to set up a
20089 new category, you can enter a group's individual predicate in its group
20090 parameters like so:
20091
20092 @lisp
20093 (agent-predicate . short)
20094 @end lisp
20095
20096 This is the group/topic parameter equivalent of the agent category default.
20097 Note that when specifying a single word predicate like this, the
20098 @code{agent-predicate} specification must be in dotted pair notation.
20099
20100 The equivalent of the longer example from above would be:
20101
20102 @lisp
20103 (agent-predicate or high (and (not low) (not long)))
20104 @end lisp
20105
20106 The outer parenthesis required in the category specification are not
20107 entered here as, not being in dotted pair notation, the value of the
20108 predicate is assumed to be a list.
20109
20110
20111 Now, the syntax of the download score is the same as the syntax of
20112 normal score files, except that all elements that require actually
20113 seeing the article itself are verboten.  This means that only the
20114 following headers can be scored on: @code{Subject}, @code{From},
20115 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
20116 @code{Lines}, and @code{Xref}.
20117
20118 As with predicates, the specification of the @code{download score rule}
20119 to use in respect of a group can be in either the category definition if
20120 it's to be applicable to all groups in therein, or a group's parameters
20121 if it's to be specific to that group.
20122
20123 In both of these places the @code{download score rule} can take one of
20124 three forms:
20125
20126 @enumerate
20127 @item
20128 Score rule
20129
20130 This has the same syntax as a normal Gnus score file except only a
20131 subset of scoring keywords are available as mentioned above.
20132
20133 example:
20134
20135 @itemize @bullet
20136 @item
20137 Category specification
20138
20139 @lisp
20140 (("from"
20141        ("Lars Ingebrigtsen" 1000000 nil s))
20142 ("lines"
20143        (500 -100 nil <)))
20144 @end lisp
20145
20146 @item
20147 Group/Topic Parameter specification
20148
20149 @lisp
20150 (agent-score ("from"
20151                    ("Lars Ingebrigtsen" 1000000 nil s))
20152              ("lines"
20153                    (500 -100 nil <)))
20154 @end lisp
20155
20156 Again, note the omission of the outermost parenthesis here.
20157 @end itemize
20158
20159 @item
20160 Agent score file
20161
20162 These score files must @emph{only} contain the permitted scoring
20163 keywords stated above.
20164
20165 example:
20166
20167 @itemize @bullet
20168 @item
20169 Category specification
20170
20171 @lisp
20172 ("~/News/agent.SCORE")
20173 @end lisp
20174
20175 or perhaps
20176
20177 @lisp
20178 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
20179 @end lisp
20180
20181 @item
20182 Group Parameter specification
20183
20184 @lisp
20185 (agent-score "~/News/agent.SCORE")
20186 @end lisp
20187
20188 Additional score files can be specified as above.  Need I say anything
20189 about parenthesis?
20190 @end itemize
20191
20192 @item
20193 Use @code{normal} score files
20194
20195 If you don't want to maintain two sets of scoring rules for a group, and
20196 your desired @code{downloading} criteria for a group are the same as your
20197 @code{reading} criteria then you can tell the agent to refer to your
20198 @code{normal} score files when deciding what to download.
20199
20200 These directives in either the category definition or a group's
20201 parameters will cause the agent to read in all the applicable score
20202 files for a group, @emph{filtering out} those sections that do not
20203 relate to one of the permitted subset of scoring keywords.
20204
20205 @itemize @bullet
20206 @item
20207 Category Specification
20208
20209 @lisp
20210 file
20211 @end lisp
20212
20213 @item
20214 Group Parameter specification
20215
20216 @lisp
20217 (agent-score . file)
20218 @end lisp
20219 @end itemize
20220 @end enumerate
20221
20222 @node Category Buffer
20223 @subsubsection Category Buffer
20224
20225 You'd normally do all category maintenance from the category buffer.
20226 When you enter it for the first time (with the @kbd{J c} command from
20227 the group buffer), you'll only see the @code{default} category.
20228
20229 The following commands are available in this buffer:
20230
20231 @table @kbd
20232 @item q
20233 @kindex q (Category)
20234 @findex gnus-category-exit
20235 Return to the group buffer (@code{gnus-category-exit}).
20236
20237 @item e
20238 @kindex e (Category)
20239 @findex gnus-category-customize-category
20240 Use a customization buffer to set all of the selected category's
20241 parameters at one time (@code{gnus-category-customize-category}).
20242
20243 @item k
20244 @kindex k (Category)
20245 @findex gnus-category-kill
20246 Kill the current category (@code{gnus-category-kill}).
20247
20248 @item c
20249 @kindex c (Category)
20250 @findex gnus-category-copy
20251 Copy the current category (@code{gnus-category-copy}).
20252
20253 @item a
20254 @kindex a (Category)
20255 @findex gnus-category-add
20256 Add a new category (@code{gnus-category-add}).
20257
20258 @item p
20259 @kindex p (Category)
20260 @findex gnus-category-edit-predicate
20261 Edit the predicate of the current category
20262 (@code{gnus-category-edit-predicate}).
20263
20264 @item g
20265 @kindex g (Category)
20266 @findex gnus-category-edit-groups
20267 Edit the list of groups belonging to the current category
20268 (@code{gnus-category-edit-groups}).
20269
20270 @item s
20271 @kindex s (Category)
20272 @findex gnus-category-edit-score
20273 Edit the download score rule of the current category
20274 (@code{gnus-category-edit-score}).
20275
20276 @item l
20277 @kindex l (Category)
20278 @findex gnus-category-list
20279 List all the categories (@code{gnus-category-list}).
20280 @end table
20281
20282
20283 @node Category Variables
20284 @subsubsection Category Variables
20285
20286 @table @code
20287 @item gnus-category-mode-hook
20288 @vindex gnus-category-mode-hook
20289 Hook run in category buffers.
20290
20291 @item gnus-category-line-format
20292 @vindex gnus-category-line-format
20293 Format of the lines in the category buffer (@pxref{Formatting
20294 Variables}).  Valid elements are:
20295
20296 @table @samp
20297 @item c
20298 The name of the category.
20299
20300 @item g
20301 The number of groups in the category.
20302 @end table
20303
20304 @item gnus-category-mode-line-format
20305 @vindex gnus-category-mode-line-format
20306 Format of the category mode line (@pxref{Mode Line Formatting}).
20307
20308 @item gnus-agent-short-article
20309 @vindex gnus-agent-short-article
20310 Articles that have fewer lines than this are short.  Default 100.
20311
20312 @item gnus-agent-long-article
20313 @vindex gnus-agent-long-article
20314 Articles that have more lines than this are long.  Default 200.
20315
20316 @item gnus-agent-low-score
20317 @vindex gnus-agent-low-score
20318 Articles that have a score lower than this have a low score.  Default
20319 0.
20320
20321 @item gnus-agent-high-score
20322 @vindex gnus-agent-high-score
20323 Articles that have a score higher than this have a high score.  Default
20324 0.
20325
20326 @item gnus-agent-expire-days
20327 @vindex gnus-agent-expire-days
20328 The number of days that a @samp{read} article must stay in the agent's
20329 local disk before becoming eligible for expiration (While the name is
20330 the same, this doesn't mean expiring the article on the server.  It
20331 just means deleting the local copy of the article).  What is also
20332 important to understand is that the counter starts with the time the
20333 article was written to the local disk and not the time the article was
20334 read.
20335 Default 7.
20336
20337 @item gnus-agent-enable-expiration
20338 @vindex gnus-agent-enable-expiration
20339 Determines whether articles in a group are, by default, expired or
20340 retained indefinitely.  The default is @code{ENABLE} which means that
20341 you'll have to disable expiration when desired.  On the other hand,
20342 you could set this to @code{DISABLE}.  In that case, you would then
20343 have to enable expiration in selected groups.
20344
20345 @end table
20346
20347
20348 @node Agent Commands
20349 @subsection Agent Commands
20350 @findex gnus-agent-toggle-plugged
20351 @kindex J j (Agent)
20352
20353 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
20354 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
20355 toggles the plugged/unplugged state of the Gnus Agent.
20356
20357
20358 @menu
20359 * Group Agent Commands::        Configure groups and fetch their contents.
20360 * Summary Agent Commands::      Manually select then fetch specific articles.
20361 * Server Agent Commands::       Select the servers that are supported by the agent.
20362 @end menu
20363
20364
20365
20366
20367 @node Group Agent Commands
20368 @subsubsection Group Agent Commands
20369
20370 @table @kbd
20371 @item J u
20372 @kindex J u (Agent Group)
20373 @findex gnus-agent-fetch-groups
20374 Fetch all eligible articles in the current group
20375 (@code{gnus-agent-fetch-groups}).
20376
20377 @item J c
20378 @kindex J c (Agent Group)
20379 @findex gnus-enter-category-buffer
20380 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
20381
20382 @item J s
20383 @kindex J s (Agent Group)
20384 @findex gnus-agent-fetch-session
20385 Fetch all eligible articles in all groups
20386 (@code{gnus-agent-fetch-session}).
20387
20388 @item J S
20389 @kindex J S (Agent Group)
20390 @findex gnus-group-send-queue
20391 Send all sendable messages in the queue group
20392 (@code{gnus-group-send-queue}).  @xref{Drafts}.
20393
20394 @item J a
20395 @kindex J a (Agent Group)
20396 @findex gnus-agent-add-group
20397 Add the current group to an Agent category
20398 (@code{gnus-agent-add-group}).  This command understands the
20399 process/prefix convention (@pxref{Process/Prefix}).
20400
20401 @item J r
20402 @kindex J r (Agent Group)
20403 @findex gnus-agent-remove-group
20404 Remove the current group from its category, if any
20405 (@code{gnus-agent-remove-group}).  This command understands the
20406 process/prefix convention (@pxref{Process/Prefix}).
20407
20408 @item J Y
20409 @kindex J Y (Agent Group)
20410 @findex gnus-agent-synchronize-flags
20411 Synchronize flags changed while unplugged with remote server, if any.
20412
20413
20414 @end table
20415
20416
20417 @node Summary Agent Commands
20418 @subsubsection Summary Agent Commands
20419
20420 @table @kbd
20421 @item J #
20422 @kindex J # (Agent Summary)
20423 @findex gnus-agent-mark-article
20424 Mark the article for downloading (@code{gnus-agent-mark-article}).
20425
20426 @item J M-#
20427 @kindex J M-# (Agent Summary)
20428 @findex gnus-agent-unmark-article
20429 Remove the downloading mark from the article
20430 (@code{gnus-agent-unmark-article}).
20431
20432 @cindex %
20433 @item @@
20434 @kindex @@ (Agent Summary)
20435 @findex gnus-agent-toggle-mark
20436 Toggle whether to download the article
20437 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
20438 default.
20439
20440 @item J c
20441 @kindex J c (Agent Summary)
20442 @findex gnus-agent-catchup
20443 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
20444
20445 @item J S
20446 @kindex J S (Agent Summary)
20447 @findex gnus-agent-fetch-group
20448 Download all eligible (@pxref{Agent Categories}) articles in this group.
20449 (@code{gnus-agent-fetch-group}).
20450
20451 @item J s
20452 @kindex J s (Agent Summary)
20453 @findex gnus-agent-summary-fetch-series
20454 Download all processable articles in this group.
20455 (@code{gnus-agent-summary-fetch-series}).
20456
20457 @item J u
20458 @kindex J u (Agent Summary)
20459 @findex gnus-agent-summary-fetch-group
20460 Download all downloadable articles in the current group
20461 (@code{gnus-agent-summary-fetch-group}).
20462
20463 @end table
20464
20465
20466 @node Server Agent Commands
20467 @subsubsection Server Agent Commands
20468
20469 @table @kbd
20470 @item J a
20471 @kindex J a (Agent Server)
20472 @findex gnus-agent-add-server
20473 Add the current server to the list of servers covered by the Gnus Agent
20474 (@code{gnus-agent-add-server}).
20475
20476 @item J r
20477 @kindex J r (Agent Server)
20478 @findex gnus-agent-remove-server
20479 Remove the current server from the list of servers covered by the Gnus
20480 Agent (@code{gnus-agent-remove-server}).
20481
20482 @end table
20483
20484
20485 @node Agent Visuals
20486 @subsection Agent Visuals
20487
20488 If you open a summary while unplugged and, Gnus knows from the group's
20489 active range that there are more articles than the headers currently
20490 stored in the Agent, you may see some articles whose subject looks
20491 something like @samp{[Undownloaded article #####]}.  These are
20492 placeholders for the missing headers.  Aside from setting a mark,
20493 there is not much that can be done with one of these placeholders.
20494 When Gnus finally gets a chance to fetch the group's headers, the
20495 placeholders will automatically be replaced by the actual headers.
20496 You can configure the summary buffer's maneuvering to skip over the
20497 placeholders if you care (See @code{gnus-auto-goto-ignores}).
20498
20499 While it may be obvious to all, the only headers and articles
20500 available while unplugged are those headers and articles that were
20501 fetched into the Agent while previously plugged.  To put it another
20502 way, ``If you forget to fetch something while plugged, you might have a
20503 less than satisfying unplugged session''.  For this reason, the Agent
20504 adds two visual effects to your summary buffer.  These effects display
20505 the download status of each article so that you always know which
20506 articles will be available when unplugged.
20507
20508 The first visual effect is the @samp{%O} spec.  If you customize
20509 @code{gnus-summary-line-format} to include this specifier, you will add
20510 a single character field that indicates an article's download status.
20511 Articles that have been fetched into either the Agent or the Cache,
20512 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
20513 other articles will display @code{gnus-undownloaded-mark} (defaults to
20514 @samp{-}).  If you open a group that has not been agentized, a space
20515 (@samp{ }) will be displayed.
20516
20517 The second visual effect are the undownloaded faces.  The faces, there
20518 are three indicating the article's score (low, normal, high), seem to
20519 result in a love/hate response from many Gnus users.  The problem is
20520 that the face selection is controlled by a list of condition tests and
20521 face names (See @code{gnus-summary-highlight}).  Each condition is
20522 tested in the order in which it appears in the list so early
20523 conditions have precedence over later conditions.  All of this means
20524 that, if you tick an undownloaded article, the article will continue
20525 to be displayed in the undownloaded face rather than the ticked face.
20526
20527 If you use the Agent as a cache (to avoid downloading the same article
20528 each time you visit it or to minimize your connection time), the
20529 undownloaded face will probably seem like a good idea.  The reason
20530 being that you do all of our work (marking, reading, deleting) with
20531 downloaded articles so the normal faces always appear.  For those
20532 users using the agent to improve online performance by caching the NOV
20533 database (most users since 5.10.2), the undownloaded faces may appear
20534 to be an absolutely horrible idea.  The issue being that, since none
20535 of their articles have been fetched into the Agent, all of the
20536 normal faces will be obscured by the undownloaded faces.
20537
20538 If you would like to use the undownloaded faces, you must enable the
20539 undownloaded faces by setting the @code{agent-enable-undownloaded-faces}
20540 group parameter to @code{t}.  This parameter, like all other agent
20541 parameters, may be set on an Agent Category (@pxref{Agent Categories}),
20542 a Group Topic (@pxref{Topic Parameters}), or an individual group
20543 (@pxref{Group Parameters}).
20544
20545 The one problem common to all users using the agent is how quickly it
20546 can consume disk space.  If you using the agent on many groups, it is
20547 even more difficult to effectively recover disk space.  One solution
20548 is the @samp{%F} format available in @code{gnus-group-line-format}.
20549 This format will display the actual disk space used by articles
20550 fetched into both the agent and cache.  By knowing which groups use
20551 the most space, users know where to focus their efforts when ``agent
20552 expiring'' articles.
20553
20554 @node Agent as Cache
20555 @subsection Agent as Cache
20556
20557 When Gnus is plugged, it is not efficient to download headers or
20558 articles from the server again, if they are already stored in the
20559 Agent.  So, Gnus normally only downloads headers once, and stores them
20560 in the Agent.  These headers are later used when generating the summary
20561 buffer, regardless of whether you are plugged or unplugged.  Articles
20562 are not cached in the Agent by default though (that would potentially
20563 consume lots of disk space), but if you have already downloaded an
20564 article into the Agent, Gnus will not download the article from the
20565 server again but use the locally stored copy instead.
20566
20567 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
20568 @pxref{Agent Variables}) to always download headers and articles while
20569 plugged.  Gnus will almost certainly be slower, but it will be kept
20570 synchronized with the server.  That last point probably won't make any
20571 sense if you are using a nntp or nnimap back end.
20572
20573 @node Agent Expiry
20574 @subsection Agent Expiry
20575
20576 @vindex gnus-agent-expire-days
20577 @findex gnus-agent-expire
20578 @kindex M-x gnus-agent-expire
20579 @kindex M-x gnus-agent-expire-group
20580 @findex gnus-agent-expire-group
20581 @cindex agent expiry
20582 @cindex Gnus agent expiry
20583 @cindex expiry, in Gnus agent
20584
20585 The Agent back end, @code{nnagent}, doesn't handle expiry.  Well, at
20586 least it doesn't handle it like other back ends.  Instead, there are
20587 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
20588 commands that will expire all read articles that are older than
20589 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
20590 that you're running out of space.  Neither are particularly fast or
20591 efficient, and it's not a particularly good idea to interrupt them (with
20592 @kbd{C-g} or anything else) once you've started one of them.
20593
20594 Note that other functions, e.g. @code{gnus-request-expire-articles},
20595 might run @code{gnus-agent-expire} for you to keep the agent
20596 synchronized with the group.
20597
20598 The agent parameter @code{agent-enable-expiration} may be used to
20599 prevent expiration in selected groups.
20600
20601 @vindex gnus-agent-expire-all
20602 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
20603 expiration commands will expire all articles---unread, read, ticked
20604 and dormant.  If @code{nil} (which is the default), only read articles
20605 are eligible for expiry, and unread, ticked and dormant articles will
20606 be kept indefinitely.
20607
20608 If you find that some articles eligible for expiry are never expired,
20609 perhaps some Gnus Agent files are corrupted.  There's are special
20610 commands, @code{gnus-agent-regenerate} and
20611 @code{gnus-agent-regenerate-group}, to fix possible problems.
20612
20613 @node Agent Regeneration
20614 @subsection Agent Regeneration
20615
20616 @cindex agent regeneration
20617 @cindex Gnus agent regeneration
20618 @cindex regeneration
20619
20620 The local data structures used by @code{nnagent} may become corrupted
20621 due to certain exceptional conditions.  When this happens,
20622 @code{nnagent} functionality may degrade or even fail.  The solution
20623 to this problem is to repair the local data structures by removing all
20624 internal inconsistencies.
20625
20626 For example, if your connection to your server is lost while
20627 downloaded articles into the agent, the local data structures will not
20628 know about articles successfully downloaded prior to the connection
20629 failure.  Running @code{gnus-agent-regenerate} or
20630 @code{gnus-agent-regenerate-group} will update the data structures
20631 such that you don't need to download these articles a second time.
20632
20633 @findex gnus-agent-regenerate
20634 @kindex M-x gnus-agent-regenerate
20635 The command @code{gnus-agent-regenerate} will perform
20636 @code{gnus-agent-regenerate-group} on every agentized group.  While
20637 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
20638 recommended that you first close all summary buffers.
20639
20640 @findex gnus-agent-regenerate-group
20641 @kindex M-x gnus-agent-regenerate-group
20642 The command @code{gnus-agent-regenerate-group} uses the local copies
20643 of individual articles to repair the local @acronym{NOV}(header) database.  It
20644 then updates the internal data structures that document which articles
20645 are stored locally.  An optional argument will mark articles in the
20646 agent as unread.
20647
20648 @node Agent and flags
20649 @subsection Agent and flags
20650
20651 The Agent works with any Gnus back end including those, such as
20652 nnimap, that store flags (read, ticked, etc) on the server.  Sadly,
20653 the Agent does not actually know which backends keep their flags in
20654 the backend server rather than in @file{.newsrc}.  This means that the
20655 Agent, while unplugged or disconnected, will always record all changes
20656 to the flags in its own files.
20657
20658 When you plug back in, Gnus will then check to see if you have any
20659 changed any flags and ask if you wish to synchronize these with the
20660 server.  This behavior is customizable by @code{gnus-agent-synchronize-flags}.
20661
20662 @vindex gnus-agent-synchronize-flags
20663 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
20664 never automatically synchronize flags.  If it is @code{ask}, which is
20665 the default, the Agent will check if you made any changes and if so
20666 ask if you wish to synchronize these when you re-connect.  If it has
20667 any other value, all flags will be synchronized automatically.
20668
20669 If you do not wish to synchronize flags automatically when you
20670 re-connect, you can do it manually with the
20671 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
20672 in the group buffer.
20673
20674 Technical note: the synchronization algorithm does not work by ``pushing''
20675 all local flags to the server, but rather by incrementally updated the
20676 server view of flags by changing only those flags that were changed by
20677 the user.  Thus, if you set one flag on an article, quit the group then
20678 re-select the group and remove the flag; the flag will be set and
20679 removed from the server when you ``synchronize''.  The queued flag
20680 operations can be found in the per-server @code{flags} file in the Agent
20681 directory.  It's emptied when you synchronize flags.
20682
20683 @node Agent and IMAP
20684 @subsection Agent and IMAP
20685
20686 The Agent works with any Gnus back end, including nnimap.  However,
20687 since there are some conceptual differences between @acronym{NNTP} and
20688 @acronym{IMAP}, this section (should) provide you with some information to
20689 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
20690
20691 Some things are currently not implemented in the Agent that you'd might
20692 expect from a disconnected @acronym{IMAP} client, including:
20693
20694 @itemize @bullet
20695
20696 @item
20697 Copying/moving articles into nnimap groups when unplugged.
20698
20699 @item
20700 Creating/deleting nnimap groups when unplugged.
20701
20702 @end itemize
20703
20704 @node Outgoing Messages
20705 @subsection Outgoing Messages
20706
20707 By default, when Gnus is unplugged, all outgoing messages (both mail
20708 and news) are stored in the draft group ``queue'' (@pxref{Drafts}).
20709 You can view them there after posting, and edit them at will.
20710
20711 You can control the circumstances under which outgoing mail is queued
20712 (see @code{gnus-agent-queue-mail}, @pxref{Agent Variables}).  Outgoing
20713 news is always queued when Gnus is unplugged, and never otherwise.
20714
20715 You can send the messages either from the draft group with the special
20716 commands available there, or you can use the @kbd{J S} command in the
20717 group buffer to send all the sendable messages in the draft group.
20718 Posting news will only work when Gnus is plugged, but you can send
20719 mail at any time.
20720
20721 If sending mail while unplugged does not work for you and you worry
20722 about hitting @kbd{J S} by accident when unplugged, you can have Gnus
20723 ask you to confirm your action (see
20724 @code{gnus-agent-prompt-send-queue}, @pxref{Agent Variables}).
20725
20726 @node Agent Variables
20727 @subsection Agent Variables
20728
20729 @table @code
20730 @item gnus-agent
20731 @vindex gnus-agent
20732 Is the agent enabled?  The default is @code{t}.  When first enabled,
20733 the agent will use @code{gnus-agent-auto-agentize-methods} to
20734 automatically mark some back ends as agentized.  You may change which
20735 back ends are agentized using the agent commands in the server buffer.
20736
20737 To enter the server buffer, use the @kbd{^}
20738 (@code{gnus-group-enter-server-mode}) command in the group buffer.
20739
20740
20741 @item gnus-agent-directory
20742 @vindex gnus-agent-directory
20743 Where the Gnus Agent will store its files.  The default is
20744 @file{~/News/agent/}.
20745
20746 @item gnus-agent-handle-level
20747 @vindex gnus-agent-handle-level
20748 Groups on levels (@pxref{Group Levels}) higher than this variable will
20749 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
20750 which means that only subscribed group will be considered by the Agent
20751 by default.
20752
20753 @item gnus-agent-plugged-hook
20754 @vindex gnus-agent-plugged-hook
20755 Hook run when connecting to the network.
20756
20757 @item gnus-agent-unplugged-hook
20758 @vindex gnus-agent-unplugged-hook
20759 Hook run when disconnecting from the network.
20760
20761 @item gnus-agent-fetched-hook
20762 @vindex gnus-agent-fetched-hook
20763 Hook run when finished fetching articles.
20764
20765 @item gnus-agent-cache
20766 @vindex gnus-agent-cache
20767 Variable to control whether use the locally stored @acronym{NOV} and
20768 articles when plugged, e.g. essentially using the Agent as a cache.
20769 The default is non-@code{nil}, which means to use the Agent as a cache.
20770
20771 @item gnus-agent-go-online
20772 @vindex gnus-agent-go-online
20773 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
20774 automatically switch offline servers into online status.  If it is
20775 @code{ask}, the default, the Agent will ask if you wish to switch
20776 offline servers into online status when you re-connect.  If it has any
20777 other value, all offline servers will be automatically switched into
20778 online status.
20779
20780 @item gnus-agent-mark-unread-after-downloaded
20781 @vindex gnus-agent-mark-unread-after-downloaded
20782 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
20783 mark articles as unread after downloading.  This is usually a safe
20784 thing to do as the newly downloaded article has obviously not been
20785 read.  The default is @code{t}.
20786
20787 @item gnus-agent-synchronize-flags
20788 @vindex gnus-agent-synchronize-flags
20789 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
20790 never automatically synchronize flags.  If it is @code{ask}, which is
20791 the default, the Agent will check if you made any changes and if so
20792 ask if you wish to synchronize these when you re-connect.  If it has
20793 any other value, all flags will be synchronized automatically.
20794
20795 @item gnus-agent-consider-all-articles
20796 @vindex gnus-agent-consider-all-articles
20797 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
20798 agent will let the agent predicate decide whether articles need to be
20799 downloaded or not, for all articles.  When @code{nil}, the default,
20800 the agent will only let the predicate decide whether unread articles
20801 are downloaded or not.  If you enable this, you may also want to look
20802 into the agent expiry settings (@pxref{Category Variables}), so that
20803 the agent doesn't download articles which the agent will later expire,
20804 over and over again.
20805
20806 @item gnus-agent-max-fetch-size
20807 @vindex gnus-agent-max-fetch-size
20808 The agent fetches articles into a temporary buffer prior to parsing
20809 them into individual files.  To avoid exceeding the max. buffer size,
20810 the agent alternates between fetching and parsing until all articles
20811 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
20812 limit to control how often the cycling occurs.  A large value improves
20813 performance.  A small value minimizes the time lost should the
20814 connection be lost while fetching (You may need to run
20815 @code{gnus-agent-regenerate-group} to update the group's state.
20816 However, all articles parsed prior to loosing the connection will be
20817 available while unplugged).  The default is 10M so it is unusual to
20818 see any cycling.
20819
20820 @item gnus-server-unopen-status
20821 @vindex gnus-server-unopen-status
20822 Perhaps not an Agent variable, but closely related to the Agent, this
20823 variable says what will happen if Gnus cannot open a server.  If the
20824 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
20825 whether to deny the server or whether to unplug the agent.  If the
20826 Agent is disabled, Gnus always simply deny the server.  Other choices
20827 for this variable include @code{denied} and @code{offline} the latter
20828 is only valid if the Agent is used.
20829
20830 @item gnus-auto-goto-ignores
20831 @vindex gnus-auto-goto-ignores
20832 Another variable that isn't an Agent variable, yet so closely related
20833 that most will look for it here, this variable tells the summary
20834 buffer how to maneuver around undownloaded (only headers stored in the
20835 agent) and unfetched (neither article nor headers stored) articles.
20836
20837 The valid values are @code{nil} (maneuver to any article),
20838 @code{undownloaded} (maneuvering while unplugged ignores articles that
20839 have not been fetched), @code{always-undownloaded} (maneuvering always
20840 ignores articles that have not been fetched), @code{unfetched}
20841 (maneuvering ignores articles whose headers have not been fetched).
20842
20843 @item gnus-agent-queue-mail
20844 @vindex gnus-agent-queue-mail
20845 When @code{gnus-agent-queue-mail} is @code{always}, Gnus will always
20846 queue mail rather than sending it straight away.  When @code{t}, Gnus
20847 will queue mail when unplugged only.  When @code{nil}, never queue
20848 mail.  The default is @code{t}.
20849
20850 @item gnus-agent-prompt-send-queue
20851 @vindex gnus-agent-prompt-send-queue
20852 When @code{gnus-agent-prompt-send-queue} is non-@code{nil} Gnus will
20853 prompt you to confirm that you really wish to proceed if you hit
20854 @kbd{J S} while unplugged.  The default is @code{nil}.
20855
20856 @item gnus-agent-auto-agentize-methods
20857 @vindex gnus-agent-auto-agentize-methods
20858 If you have never used the Agent before (or more technically, if
20859 @file{~/News/agent/lib/servers} does not exist), Gnus will
20860 automatically agentize a few servers for you.  This variable control
20861 which back ends should be auto-agentized.  It is typically only useful
20862 to agentize remote back ends.  The auto-agentizing has the same effect
20863 as running @kbd{J a} on the servers (@pxref{Server Agent Commands}).
20864 If the file exist, you must manage the servers manually by adding or
20865 removing them, this variable is only applicable the first time you
20866 start Gnus.  The default is @samp{(nntp nnimap)}.
20867
20868 @end table
20869
20870
20871 @node Example Setup
20872 @subsection Example Setup
20873
20874 If you don't want to read this manual, and you have a fairly standard
20875 setup, you may be able to use something like the following as your
20876 @file{~/.gnus.el} file to get started.
20877
20878 @lisp
20879 ;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
20880 ;; @r{from your ISP's server.}
20881 (setq gnus-select-method '(nntp "news.your-isp.com"))
20882
20883 ;; @r{Define how Gnus is to read your mail.  We read mail from}
20884 ;; @r{your ISP's @acronym{POP} server.}
20885 (setq mail-sources '((pop :server "pop.your-isp.com")))
20886
20887 ;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
20888 (setq gnus-secondary-select-methods '((nnml "")))
20889
20890 ;; @r{Make Gnus into an offline newsreader.}
20891 ;; (gnus-agentize) ; @r{The obsolete setting.}
20892 ;; (setq gnus-agent t) ; @r{Now the default.}
20893 @end lisp
20894
20895 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
20896 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
20897 gnus}.
20898
20899 If this is the first time you've run Gnus, you will be subscribed
20900 automatically to a few default newsgroups.  You'll probably want to
20901 subscribe to more groups, and to do that, you have to query the
20902 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
20903 command.  This usually takes quite a while, but you only have to do it
20904 once.
20905
20906 After reading and parsing a while, you'll be presented with a list of
20907 groups.  Subscribe to the ones you want to read with the @kbd{u}
20908 command.  @kbd{l} to make all the killed groups disappear after you've
20909 subscribe to all the groups you want to read.  (@kbd{A k} will bring
20910 back all the killed groups.)
20911
20912 You can now read the groups at once, or you can download the articles
20913 with the @kbd{J s} command.  And then read the rest of this manual to
20914 find out which of the other gazillion things you want to customize.
20915
20916
20917 @node Batching Agents
20918 @subsection Batching Agents
20919 @findex gnus-agent-batch
20920
20921 Having the Gnus Agent fetch articles (and post whatever messages you've
20922 written) is quite easy once you've gotten things set up properly.  The
20923 following shell script will do everything that is necessary:
20924
20925 You can run a complete batch command from the command line with the
20926 following incantation:
20927
20928 @example
20929 #!/bin/sh
20930 emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-agent-batch >/dev/null 2>&1
20931 @end example
20932
20933
20934 @node Agent Caveats
20935 @subsection Agent Caveats
20936
20937 The Gnus Agent doesn't seem to work like most other offline
20938 newsreaders.  Here are some common questions that some imaginary people
20939 may ask:
20940
20941 @table @dfn
20942 @item If I read an article while plugged, do they get entered into the Agent?
20943
20944 @strong{No}.  If you want this behavior, add
20945 @code{gnus-agent-fetch-selected-article} to
20946 @code{gnus-select-article-hook}.
20947
20948 @item If I read an article while plugged, and the article already exists in
20949 the Agent, will it get downloaded once more?
20950
20951 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
20952
20953 @end table
20954
20955 In short, when Gnus is unplugged, it only looks into the locally stored
20956 articles; when it's plugged, it talks to your ISP and may also use the
20957 locally stored articles.
20958
20959
20960 @node Scoring
20961 @chapter Scoring
20962 @cindex scoring
20963
20964 Other people use @dfn{kill files}, but we here at Gnus Towers like
20965 scoring better than killing, so we'd rather switch than fight.  They do
20966 something completely different as well, so sit up straight and pay
20967 attention!
20968
20969 @vindex gnus-summary-mark-below
20970 All articles have a default score (@code{gnus-summary-default-score}),
20971 which is 0 by default.  This score may be raised or lowered either
20972 interactively or by score files.  Articles that have a score lower than
20973 @code{gnus-summary-mark-below} are marked as read.
20974
20975 Gnus will read any @dfn{score files} that apply to the current group
20976 before generating the summary buffer.
20977
20978 There are several commands in the summary buffer that insert score
20979 entries based on the current article.  You can, for instance, ask Gnus to
20980 lower or increase the score of all articles with a certain subject.
20981
20982 There are two sorts of scoring entries: Permanent and temporary.
20983 Temporary score entries are self-expiring entries.  Any entries that are
20984 temporary and have not been used for, say, a week, will be removed
20985 silently to help keep the sizes of the score files down.
20986
20987 @menu
20988 * Summary Score Commands::      Adding score entries for the current group.
20989 * Group Score Commands::        General score commands.
20990 * Score Variables::             Customize your scoring.  (My, what terminology).
20991 * Score File Format::           What a score file may contain.
20992 * Score File Editing::          You can edit score files by hand as well.
20993 * Adaptive Scoring::            Big Sister Gnus knows what you read.
20994 * Home Score File::             How to say where new score entries are to go.
20995 * Followups To Yourself::       Having Gnus notice when people answer you.
20996 * Scoring On Other Headers::    Scoring on non-standard headers.
20997 * Scoring Tips::                How to score effectively.
20998 * Reverse Scoring::             That problem child of old is not problem.
20999 * Global Score Files::          Earth-spanning, ear-splitting score files.
21000 * Kill Files::                  They are still here, but they can be ignored.
21001 * Converting Kill Files::       Translating kill files to score files.
21002 * Advanced Scoring::            Using logical expressions to build score rules.
21003 * Score Decays::                It can be useful to let scores wither away.
21004 @end menu
21005
21006
21007 @node Summary Score Commands
21008 @section Summary Score Commands
21009 @cindex score commands
21010
21011 The score commands that alter score entries do not actually modify real
21012 score files.  That would be too inefficient.  Gnus maintains a cache of
21013 previously loaded score files, one of which is considered the
21014 @dfn{current score file alist}.  The score commands simply insert
21015 entries into this list, and upon group exit, this list is saved.
21016
21017 The current score file is by default the group's local score file, even
21018 if no such score file actually exists.  To insert score commands into
21019 some other score file (e.g. @file{all.SCORE}), you must first make this
21020 score file the current one.
21021
21022 General score commands that don't actually change the score file:
21023
21024 @table @kbd
21025
21026 @item V s
21027 @kindex V s (Summary)
21028 @findex gnus-summary-set-score
21029 Set the score of the current article (@code{gnus-summary-set-score}).
21030
21031 @item V S
21032 @kindex V S (Summary)
21033 @findex gnus-summary-current-score
21034 Display the score of the current article
21035 (@code{gnus-summary-current-score}).
21036
21037 @item V t
21038 @kindex V t (Summary)
21039 @findex gnus-score-find-trace
21040 Display all score rules that have been used on the current article
21041 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
21042 may type @kbd{e} to edit score file corresponding to the score rule on
21043 current line and @kbd{f} to format (@code{gnus-score-pretty-print}) the
21044 score file and edit it.
21045
21046 @item V w
21047 @kindex V w (Summary)
21048 @findex gnus-score-find-favourite-words
21049 List words used in scoring (@code{gnus-score-find-favourite-words}).
21050
21051 @item V R
21052 @kindex V R (Summary)
21053 @findex gnus-summary-rescore
21054 Run the current summary through the scoring process
21055 (@code{gnus-summary-rescore}).  This might be useful if you're playing
21056 around with your score files behind Gnus' back and want to see the
21057 effect you're having.
21058
21059 @item V c
21060 @kindex V c (Summary)
21061 @findex gnus-score-change-score-file
21062 Make a different score file the current
21063 (@code{gnus-score-change-score-file}).
21064
21065 @item V e
21066 @kindex V e (Summary)
21067 @findex gnus-score-edit-current-scores
21068 Edit the current score file (@code{gnus-score-edit-current-scores}).
21069 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
21070 File Editing}).
21071
21072 @item V f
21073 @kindex V f (Summary)
21074 @findex gnus-score-edit-file
21075 Edit a score file and make this score file the current one
21076 (@code{gnus-score-edit-file}).
21077
21078 @item V F
21079 @kindex V F (Summary)
21080 @findex gnus-score-flush-cache
21081 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
21082 after editing score files.
21083
21084 @item V C
21085 @kindex V C (Summary)
21086 @findex gnus-score-customize
21087 Customize a score file in a visually pleasing manner
21088 (@code{gnus-score-customize}).
21089
21090 @end table
21091
21092 The rest of these commands modify the local score file.
21093
21094 @table @kbd
21095
21096 @item V m
21097 @kindex V m (Summary)
21098 @findex gnus-score-set-mark-below
21099 Prompt for a score, and mark all articles with a score below this as
21100 read (@code{gnus-score-set-mark-below}).
21101
21102 @item V x
21103 @kindex V x (Summary)
21104 @findex gnus-score-set-expunge-below
21105 Prompt for a score, and add a score rule to the current score file to
21106 expunge all articles below this score
21107 (@code{gnus-score-set-expunge-below}).
21108 @end table
21109
21110 The keystrokes for actually making score entries follow a very regular
21111 pattern, so there's no need to list all the commands.  (Hundreds of
21112 them.)
21113
21114 @findex gnus-summary-increase-score
21115 @findex gnus-summary-lower-score
21116
21117 @enumerate
21118 @item
21119 The first key is either @kbd{I} (upper case i) for increasing the score
21120 or @kbd{L} for lowering the score.
21121 @item
21122 The second key says what header you want to score on.  The following
21123 keys are available:
21124 @table @kbd
21125
21126 @item a
21127 Score on the author name.
21128
21129 @item s
21130 Score on the subject line.
21131
21132 @item x
21133 Score on the @code{Xref} line---i.e., the cross-posting line.
21134
21135 @item r
21136 Score on the @code{References} line.
21137
21138 @item d
21139 Score on the date.
21140
21141 @item l
21142 Score on the number of lines.
21143
21144 @item i
21145 Score on the @code{Message-ID} header.
21146
21147 @item e
21148 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
21149 if your @acronym{NNTP} server tracks additional header data in overviews.
21150
21151 @item f
21152 Score on followups---this matches the author name, and adds scores to
21153 the followups to this author.  (Using this key leads to the creation of
21154 @file{ADAPT} files.)
21155
21156 @item b
21157 Score on the body.
21158
21159 @item h
21160 Score on the head.
21161
21162 @item t
21163 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
21164 files.)
21165
21166 @end table
21167
21168 @item
21169 The third key is the match type.  Which match types are valid depends on
21170 what headers you are scoring on.
21171
21172 @table @code
21173
21174 @item strings
21175
21176 @table @kbd
21177
21178 @item e
21179 Exact matching.
21180
21181 @item s
21182 Substring matching.
21183
21184 @item f
21185 Fuzzy matching (@pxref{Fuzzy Matching}).
21186
21187 @item r
21188 Regexp matching
21189 @end table
21190
21191 @item date
21192 @table @kbd
21193
21194 @item b
21195 Before date.
21196
21197 @item a
21198 After date.
21199
21200 @item n
21201 This date.
21202 @end table
21203
21204 @item number
21205 @table @kbd
21206
21207 @item <
21208 Less than number.
21209
21210 @item =
21211 Equal to number.
21212
21213 @item >
21214 Greater than number.
21215 @end table
21216 @end table
21217
21218 @item
21219 The fourth and usually final key says whether this is a temporary (i.e.,
21220 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
21221 or whether it is to be done immediately, without adding to the score
21222 file.
21223 @table @kbd
21224
21225 @item t
21226 Temporary score entry.
21227
21228 @item p
21229 Permanent score entry.
21230
21231 @item i
21232 Immediately scoring.
21233 @end table
21234
21235 @item
21236 If you are scoring on `e' (extra) headers, you will then be prompted for
21237 the header name on which you wish to score.  This must be a header named
21238 in gnus-extra-headers, and @samp{TAB} completion is available.
21239
21240 @end enumerate
21241
21242 So, let's say you want to increase the score on the current author with
21243 exact matching permanently: @kbd{I a e p}.  If you want to lower the
21244 score based on the subject line, using substring matching, and make a
21245 temporary score entry: @kbd{L s s t}.  Pretty easy.
21246
21247 To make things a bit more complicated, there are shortcuts.  If you use
21248 a capital letter on either the second or third keys, Gnus will use
21249 defaults for the remaining one or two keystrokes.  The defaults are
21250 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
21251 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
21252
21253 These functions take both the numerical prefix and the symbolic prefix
21254 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
21255 (or increase) the score of the article.  A symbolic prefix of @code{a}
21256 says to use the @file{all.SCORE} file for the command instead of the
21257 current score file.
21258
21259 @vindex gnus-score-mimic-keymap
21260 The @code{gnus-score-mimic-keymap} says whether these commands will
21261 pretend they are keymaps or not.
21262
21263
21264 @node Group Score Commands
21265 @section Group Score Commands
21266 @cindex group score commands
21267
21268 There aren't many of these as yet, I'm afraid.
21269
21270 @table @kbd
21271
21272 @item W e
21273 @kindex W e (Group)
21274 @findex gnus-score-edit-all-score
21275 Edit the apply-to-all-groups all.SCORE file.  You will be popped into
21276 a @code{gnus-score-mode} buffer (@pxref{Score File Editing}).
21277
21278 @item W f
21279 @kindex W f (Group)
21280 @findex gnus-score-flush-cache
21281 Gnus maintains a cache of score alists to avoid having to reload them
21282 all the time.  This command will flush the cache
21283 (@code{gnus-score-flush-cache}).
21284
21285 @end table
21286
21287 You can do scoring from the command line by saying something like:
21288
21289 @findex gnus-batch-score
21290 @cindex batch scoring
21291 @example
21292 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
21293 @end example
21294
21295
21296 @node Score Variables
21297 @section Score Variables
21298 @cindex score variables
21299
21300 @table @code
21301
21302 @item gnus-use-scoring
21303 @vindex gnus-use-scoring
21304 If @code{nil}, Gnus will not check for score files, and will not, in
21305 general, do any score-related work.  This is @code{t} by default.
21306
21307 @item gnus-kill-killed
21308 @vindex gnus-kill-killed
21309 If this variable is @code{nil}, Gnus will never apply score files to
21310 articles that have already been through the kill process.  While this
21311 may save you lots of time, it also means that if you apply a kill file
21312 to a group, and then change the kill file and want to run it over you
21313 group again to kill more articles, it won't work.  You have to set this
21314 variable to @code{t} to do that.  (It is @code{t} by default.)
21315
21316 @item gnus-kill-files-directory
21317 @vindex gnus-kill-files-directory
21318 All kill and score files will be stored in this directory, which is
21319 initialized from the @env{SAVEDIR} environment variable by default.
21320 This is @file{~/News/} by default.
21321
21322 @item gnus-score-file-suffix
21323 @vindex gnus-score-file-suffix
21324 Suffix to add to the group name to arrive at the score file name
21325 (@file{SCORE} by default.)
21326
21327 @item gnus-score-uncacheable-files
21328 @vindex gnus-score-uncacheable-files
21329 @cindex score cache
21330 All score files are normally cached to avoid excessive re-loading of
21331 score files.  However, this might make your Emacs grow big and
21332 bloated, so this regexp can be used to weed out score files unlikely
21333 to be needed again.  It would be a bad idea to deny caching of
21334 @file{all.SCORE}, while it might be a good idea to not cache
21335 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
21336 variable is @samp{ADAPT$} by default, so no adaptive score files will
21337 be cached.
21338
21339 @item gnus-save-score
21340 @vindex gnus-save-score
21341 If you have really complicated score files, and do lots of batch
21342 scoring, then you might set this variable to @code{t}.  This will make
21343 Gnus save the scores into the @file{.newsrc.eld} file.
21344
21345 If you do not set this to @code{t}, then manual scores (like those set
21346 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
21347 across group visits.
21348
21349 @item gnus-score-interactive-default-score
21350 @vindex gnus-score-interactive-default-score
21351 Score used by all the interactive raise/lower commands to raise/lower
21352 score with.  Default is 1000, which may seem excessive, but this is to
21353 ensure that the adaptive scoring scheme gets enough room to play with.
21354 We don't want the small changes from the adaptive scoring to overwrite
21355 manually entered data.
21356
21357 @item gnus-summary-default-score
21358 @vindex gnus-summary-default-score
21359 Default score of an article, which is 0 by default.
21360
21361 @item gnus-summary-expunge-below
21362 @vindex gnus-summary-expunge-below
21363 Don't display the summary lines of articles that have scores lower than
21364 this variable.  This is @code{nil} by default, which means that no
21365 articles will be hidden.  This variable is local to the summary buffers,
21366 and has to be set from @code{gnus-summary-mode-hook}.
21367
21368 @item gnus-score-over-mark
21369 @vindex gnus-score-over-mark
21370 Mark (in the third column) used for articles with a score over the
21371 default.  Default is @samp{+}.
21372
21373 @item gnus-score-below-mark
21374 @vindex gnus-score-below-mark
21375 Mark (in the third column) used for articles with a score below the
21376 default.  Default is @samp{-}.
21377
21378 @item gnus-score-find-score-files-function
21379 @vindex gnus-score-find-score-files-function
21380 Function used to find score files for the current group.  This function
21381 is called with the name of the group as the argument.
21382
21383 Predefined functions available are:
21384 @table @code
21385
21386 @item gnus-score-find-single
21387 @findex gnus-score-find-single
21388 Only apply the group's own score file.
21389
21390 @item gnus-score-find-bnews
21391 @findex gnus-score-find-bnews
21392 Apply all score files that match, using bnews syntax.  This is the
21393 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
21394 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
21395 @file{gnu.all.SCORE} would all apply.  In short, the instances of
21396 @samp{all} in the score file names are translated into @samp{.*}, and
21397 then a regexp match is done.
21398
21399 This means that if you have some score entries that you want to apply to
21400 all groups, then you put those entries in the @file{all.SCORE} file.
21401
21402 The score files are applied in a semi-random order, although Gnus will
21403 try to apply the more general score files before the more specific score
21404 files.  It does this by looking at the number of elements in the score
21405 file names---discarding the @samp{all} elements.
21406
21407 @item gnus-score-find-hierarchical
21408 @findex gnus-score-find-hierarchical
21409 Apply all score files from all the parent groups.  This means that you
21410 can't have score files like @file{all.SCORE}, but you can have
21411 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
21412 server.
21413
21414 @end table
21415 This variable can also be a list of functions.  In that case, all
21416 these functions will be called with the group name as argument, and
21417 all the returned lists of score files will be applied.  These
21418 functions can also return lists of lists of score alists directly.  In
21419 that case, the functions that return these non-file score alists
21420 should probably be placed before the ``real'' score file functions, to
21421 ensure that the last score file returned is the local score file.
21422 Phu.
21423
21424 For example, to do hierarchical scoring but use a non-server-specific
21425 overall score file, you could use the value
21426 @example
21427 (list (lambda (group) ("all.SCORE"))
21428       'gnus-score-find-hierarchical)
21429 @end example
21430
21431 @item gnus-score-expiry-days
21432 @vindex gnus-score-expiry-days
21433 This variable says how many days should pass before an unused score file
21434 entry is expired.  If this variable is @code{nil}, no score file entries
21435 are expired.  It's 7 by default.
21436
21437 @item gnus-update-score-entry-dates
21438 @vindex gnus-update-score-entry-dates
21439 If this variable is non-@code{nil}, temporary score entries that have
21440 been triggered (matched) will have their dates updated.  (This is how Gnus
21441 controls expiry---all non-matched-entries will become too old while
21442 matched entries will stay fresh and young.)  However, if you set this
21443 variable to @code{nil}, even matched entries will grow old and will
21444 have to face that oh-so grim reaper.
21445
21446 @item gnus-score-after-write-file-function
21447 @vindex gnus-score-after-write-file-function
21448 Function called with the name of the score file just written.
21449
21450 @item gnus-score-thread-simplify
21451 @vindex gnus-score-thread-simplify
21452 If this variable is non-@code{nil}, article subjects will be
21453 simplified for subject scoring purposes in the same manner as with
21454 threading---according to the current value of
21455 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
21456 @code{substring} or @code{exact} matching, the match will also be
21457 simplified in this manner.
21458
21459 @end table
21460
21461
21462 @node Score File Format
21463 @section Score File Format
21464 @cindex score file format
21465
21466 A score file is an @code{emacs-lisp} file that normally contains just a
21467 single form.  Casual users are not expected to edit these files;
21468 everything can be changed from the summary buffer.
21469
21470 Anyway, if you'd like to dig into it yourself, here's an example:
21471
21472 @lisp
21473 (("from"
21474   ("Lars Ingebrigtsen" -10000)
21475   ("Per Abrahamsen")
21476   ("larsi\\|lmi" -50000 nil R))
21477  ("subject"
21478   ("Ding is Badd" nil 728373))
21479  ("xref"
21480   ("alt.politics" -1000 728372 s))
21481  ("lines"
21482   (2 -100 nil <))
21483  (mark 0)
21484  (expunge -1000)
21485  (mark-and-expunge -10)
21486  (read-only nil)
21487  (orphan -10)
21488  (adapt t)
21489  (files "/hom/larsi/News/gnu.SCORE")
21490  (exclude-files "all.SCORE")
21491  (local (gnus-newsgroup-auto-expire t)
21492         (gnus-summary-make-false-root empty))
21493  (eval (ding)))
21494 @end lisp
21495
21496 This example demonstrates most score file elements.  @xref{Advanced
21497 Scoring}, for a different approach.
21498
21499 Even though this looks much like Lisp code, nothing here is actually
21500 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
21501 has to be valid syntactically, if not semantically.
21502
21503 Six keys are supported by this alist:
21504
21505 @table @code
21506
21507 @item STRING
21508 If the key is a string, it is the name of the header to perform the
21509 match on.  Scoring can only be performed on these eight headers:
21510 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
21511 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
21512 these headers, there are three strings to tell Gnus to fetch the entire
21513 article and do the match on larger parts of the article: @code{Body}
21514 will perform the match on the body of the article, @code{Head} will
21515 perform the match on the head of the article, and @code{All} will
21516 perform the match on the entire article.  Note that using any of these
21517 last three keys will slow down group entry @emph{considerably}.  The
21518 final ``header'' you can score on is @code{Followup}.  These score
21519 entries will result in new score entries being added for all follow-ups
21520 to articles that matches these score entries.
21521
21522 Following this key is an arbitrary number of score entries, where each
21523 score entry has one to four elements.
21524 @enumerate
21525
21526 @item
21527 The first element is the @dfn{match element}.  On most headers this will
21528 be a string, but on the Lines and Chars headers, this must be an
21529 integer.
21530
21531 @item
21532 If the second element is present, it should be a number---the @dfn{score
21533 element}.  This number should be an integer in the neginf to posinf
21534 interval.  This number is added to the score of the article if the match
21535 is successful.  If this element is not present, the
21536 @code{gnus-score-interactive-default-score} number will be used
21537 instead.  This is 1000 by default.
21538
21539 @item
21540 If the third element is present, it should be a number---the @dfn{date
21541 element}.  This date says when the last time this score entry matched,
21542 which provides a mechanism for expiring the score entries.  It this
21543 element is not present, the score entry is permanent.  The date is
21544 represented by the number of days since December 31, 1 BCE.
21545
21546 @item
21547 If the fourth element is present, it should be a symbol---the @dfn{type
21548 element}.  This element specifies what function should be used to see
21549 whether this score entry matches the article.  What match types that can
21550 be used depends on what header you wish to perform the match on.
21551 @table @dfn
21552
21553 @item From, Subject, References, Xref, Message-ID
21554 For most header types, there are the @code{r} and @code{R} (regexp), as
21555 well as @code{s} and @code{S} (substring) types, and @code{e} and
21556 @code{E} (exact match), and @code{w} (word match) types.  If this
21557 element is not present, Gnus will assume that substring matching should
21558 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
21559 that the matches will be done in a case-sensitive manner.  All these
21560 one-letter types are really just abbreviations for the @code{regexp},
21561 @code{string}, @code{exact}, and @code{word} types, which you can use
21562 instead, if you feel like.
21563
21564 @item Extra
21565 Just as for the standard string overview headers, if you are using
21566 gnus-extra-headers, you can score on these headers' values.  In this
21567 case, there is a 5th element in the score entry, being the name of the
21568 header to be scored.  The following entry is useful in your
21569 @file{all.SCORE} file in case of spam attacks from a single origin
21570 host, if your @acronym{NNTP} server tracks @samp{NNTP-Posting-Host} in
21571 overviews:
21572
21573 @lisp
21574 ("111.222.333.444" -1000 nil s
21575  "NNTP-Posting-Host")
21576 @end lisp
21577
21578 @item Lines, Chars
21579 These two headers use different match types: @code{<}, @code{>},
21580 @code{=}, @code{>=} and @code{<=}.
21581
21582 These predicates are true if
21583
21584 @example
21585 (PREDICATE HEADER MATCH)
21586 @end example
21587
21588 evaluates to non-@code{nil}.  For instance, the advanced match
21589 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
21590 following form:
21591
21592 @lisp
21593 (< header-value 4)
21594 @end lisp
21595
21596 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
21597 the match, we get the score added if the article has less than 4 lines.
21598 (It's easy to get confused and think it's the other way around.  But
21599 it's not.  I think.)
21600
21601 When matching on @code{Lines}, be careful because some back ends (like
21602 @code{nndir}) do not generate @code{Lines} header, so every article ends
21603 up being marked as having 0 lines.  This can lead to strange results if
21604 you happen to lower score of the articles with few lines.
21605
21606 @item Date
21607 For the Date header we have three kinda silly match types:
21608 @code{before}, @code{at} and @code{after}.  I can't really imagine this
21609 ever being useful, but, like, it would feel kinda silly not to provide
21610 this function.  Just in case.  You never know.  Better safe than sorry.
21611 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
21612 sex on a first date.  (I have been told that at least one person, and I
21613 quote, ``found this function indispensable'', however.)
21614
21615 @cindex ISO8601
21616 @cindex date
21617 A more useful match type is @code{regexp}.  With it, you can match the
21618 date string using a regular expression.  The date is normalized to
21619 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
21620 you want to match all articles that have been posted on April 1st in
21621 every year, you could use @samp{....0401.........} as a match string,
21622 for instance.  (Note that the date is kept in its original time zone, so
21623 this will match articles that were posted when it was April 1st where
21624 the article was posted from.  Time zones are such wholesome fun for the
21625 whole family, eh?)
21626
21627 @item Head, Body, All
21628 These three match keys use the same match types as the @code{From} (etc)
21629 header uses.
21630
21631 @item Followup
21632 This match key is somewhat special, in that it will match the
21633 @code{From} header, and affect the score of not only the matching
21634 articles, but also all followups to the matching articles.  This allows
21635 you e.g. increase the score of followups to your own articles, or
21636 decrease the score of followups to the articles of some known
21637 trouble-maker.  Uses the same match types as the @code{From} header
21638 uses.  (Using this match key will lead to creation of @file{ADAPT}
21639 files.)
21640
21641 @item Thread
21642 This match key works along the same lines as the @code{Followup} match
21643 key.  If you say that you want to score on a (sub-)thread started by an
21644 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
21645 match.  This will add a new @samp{thread} match for each article that
21646 has @var{x} in its @code{References} header.  (These new @samp{thread}
21647 matches will use the @code{Message-ID}s of these matching articles.)
21648 This will ensure that you can raise/lower the score of an entire thread,
21649 even though some articles in the thread may not have complete
21650 @code{References} headers.  Note that using this may lead to
21651 undeterministic scores of the articles in the thread.  (Using this match
21652 key will lead to creation of @file{ADAPT} files.)
21653 @end table
21654 @end enumerate
21655
21656 @cindex score file atoms
21657 @item mark
21658 The value of this entry should be a number.  Any articles with a score
21659 lower than this number will be marked as read.
21660
21661 @item expunge
21662 The value of this entry should be a number.  Any articles with a score
21663 lower than this number will be removed from the summary buffer.
21664
21665 @item mark-and-expunge
21666 The value of this entry should be a number.  Any articles with a score
21667 lower than this number will be marked as read and removed from the
21668 summary buffer.
21669
21670 @item thread-mark-and-expunge
21671 The value of this entry should be a number.  All articles that belong to
21672 a thread that has a total score below this number will be marked as read
21673 and removed from the summary buffer.  @code{gnus-thread-score-function}
21674 says how to compute the total score for a thread.
21675
21676 @item files
21677 The value of this entry should be any number of file names.  These files
21678 are assumed to be score files as well, and will be loaded the same way
21679 this one was.
21680
21681 @item exclude-files
21682 The clue of this entry should be any number of files.  These files will
21683 not be loaded, even though they would normally be so, for some reason or
21684 other.
21685
21686 @item eval
21687 The value of this entry will be @code{eval}el.  This element will be
21688 ignored when handling global score files.
21689
21690 @item read-only
21691 Read-only score files will not be updated or saved.  Global score files
21692 should feature this atom (@pxref{Global Score Files}).  (Note:
21693 @dfn{Global} here really means @dfn{global}; not your personal
21694 apply-to-all-groups score files.)
21695
21696 @item orphan
21697 The value of this entry should be a number.  Articles that do not have
21698 parents will get this number added to their scores.  Imagine you follow
21699 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
21700 will only follow a few of the threads, also want to see any new threads.
21701
21702 You can do this with the following two score file entries:
21703
21704 @example
21705         (orphan -500)
21706         (mark-and-expunge -100)
21707 @end example
21708
21709 When you enter the group the first time, you will only see the new
21710 threads.  You then raise the score of the threads that you find
21711 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{C y}) the
21712 rest.  Next time you enter the group, you will see new articles in the
21713 interesting threads, plus any new threads.
21714
21715 I.e.---the orphan score atom is for high-volume groups where a few
21716 interesting threads which can't be found automatically by ordinary
21717 scoring rules exist.
21718
21719 @item adapt
21720 This entry controls the adaptive scoring.  If it is @code{t}, the
21721 default adaptive scoring rules will be used.  If it is @code{ignore}, no
21722 adaptive scoring will be performed on this group.  If it is a list, this
21723 list will be used as the adaptive scoring rules.  If it isn't present,
21724 or is something other than @code{t} or @code{ignore}, the default
21725 adaptive scoring rules will be used.  If you want to use adaptive
21726 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
21727 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
21728 not want adaptive scoring.  If you only want adaptive scoring in a few
21729 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
21730 insert @code{(adapt t)} in the score files of the groups where you want
21731 it.
21732
21733 @item adapt-file
21734 All adaptive score entries will go to the file named by this entry.  It
21735 will also be applied when entering the group.  This atom might be handy
21736 if you want to adapt on several groups at once, using the same adaptive
21737 file for a number of groups.
21738
21739 @item local
21740 @cindex local variables
21741 The value of this entry should be a list of @code{(@var{var}
21742 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
21743 current summary buffer, and set to the value specified.  This is a
21744 convenient, if somewhat strange, way of setting variables in some
21745 groups if you don't like hooks much.  Note that the @var{value} won't
21746 be evaluated.
21747 @end table
21748
21749
21750 @node Score File Editing
21751 @section Score File Editing
21752
21753 You normally enter all scoring commands from the summary buffer, but you
21754 might feel the urge to edit them by hand as well, so we've supplied you
21755 with a mode for that.
21756
21757 It's simply a slightly customized @code{emacs-lisp} mode, with these
21758 additional commands:
21759
21760 @table @kbd
21761
21762 @item C-c C-c
21763 @kindex C-c C-c (Score)
21764 @findex gnus-score-edit-exit
21765 Save the changes you have made and return to the summary buffer
21766 (@code{gnus-score-edit-exit}).
21767
21768 @item C-c C-d
21769 @kindex C-c C-d (Score)
21770 @findex gnus-score-edit-insert-date
21771 Insert the current date in numerical format
21772 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
21773 you were wondering.
21774
21775 @item C-c C-p
21776 @kindex C-c C-p (Score)
21777 @findex gnus-score-pretty-print
21778 The adaptive score files are saved in an unformatted fashion.  If you
21779 intend to read one of these files, you want to @dfn{pretty print} it
21780 first.  This command (@code{gnus-score-pretty-print}) does that for
21781 you.
21782
21783 @end table
21784
21785 Type @kbd{M-x gnus-score-mode} to use this mode.
21786
21787 @vindex gnus-score-mode-hook
21788 @code{gnus-score-menu-hook} is run in score mode buffers.
21789
21790 In the summary buffer you can use commands like @kbd{V f}, @kbd{V e} and
21791 @kbd{V t} to begin editing score files.
21792
21793
21794 @node Adaptive Scoring
21795 @section Adaptive Scoring
21796 @cindex adaptive scoring
21797
21798 If all this scoring is getting you down, Gnus has a way of making it all
21799 happen automatically---as if by magic.  Or rather, as if by artificial
21800 stupidity, to be precise.
21801
21802 @vindex gnus-use-adaptive-scoring
21803 When you read an article, or mark an article as read, or kill an
21804 article, you leave marks behind.  On exit from the group, Gnus can sniff
21805 these marks and add score elements depending on what marks it finds.
21806 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
21807 @code{t} or @code{(line)}.  If you want score adaptively on separate
21808 words appearing in the subjects, you should set this variable to
21809 @code{(word)}.  If you want to use both adaptive methods, set this
21810 variable to @code{(word line)}.
21811
21812 @vindex gnus-default-adaptive-score-alist
21813 To give you complete control over the scoring process, you can customize
21814 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
21815 might look something like this:
21816
21817 @lisp
21818 (setq gnus-default-adaptive-score-alist
21819   '((gnus-unread-mark)
21820     (gnus-ticked-mark (from 4))
21821     (gnus-dormant-mark (from 5))
21822     (gnus-del-mark (from -4) (subject -1))
21823     (gnus-read-mark (from 4) (subject 2))
21824     (gnus-expirable-mark (from -1) (subject -1))
21825     (gnus-killed-mark (from -1) (subject -3))
21826     (gnus-kill-file-mark)
21827     (gnus-ancient-mark)
21828     (gnus-low-score-mark)
21829     (gnus-catchup-mark (from -1) (subject -1))))
21830 @end lisp
21831
21832 As you see, each element in this alist has a mark as a key (either a
21833 variable name or a ``real'' mark---a character).  Following this key is
21834 a arbitrary number of header/score pairs.  If there are no header/score
21835 pairs following the key, no adaptive scoring will be done on articles
21836 that have that key as the article mark.  For instance, articles with
21837 @code{gnus-unread-mark} in the example above will not get adaptive score
21838 entries.
21839
21840 Each article can have only one mark, so just a single of these rules
21841 will be applied to each article.
21842
21843 To take @code{gnus-del-mark} as an example---this alist says that all
21844 articles that have that mark (i.e., are marked with @samp{e}) will have a
21845 score entry added to lower based on the @code{From} header by -4, and
21846 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
21847
21848 If you have marked 10 articles with the same subject with
21849 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
21850 That means that that subject will get a score of ten times -1, which
21851 should be, unless I'm much mistaken, -10.
21852
21853 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
21854 the read articles will be marked with the @samp{E} mark.  This'll
21855 probably make adaptive scoring slightly impossible, so auto-expiring and
21856 adaptive scoring doesn't really mix very well.
21857
21858 The headers you can score on are @code{from}, @code{subject},
21859 @code{message-id}, @code{references}, @code{xref}, @code{lines},
21860 @code{chars} and @code{date}.  In addition, you can score on
21861 @code{followup}, which will create an adaptive score entry that matches
21862 on the @code{References} header using the @code{Message-ID} of the
21863 current article, thereby matching the following thread.
21864
21865 If you use this scheme, you should set the score file atom @code{mark}
21866 to something small---like -300, perhaps, to avoid having small random
21867 changes result in articles getting marked as read.
21868
21869 After using adaptive scoring for a week or so, Gnus should start to
21870 become properly trained and enhance the authors you like best, and kill
21871 the authors you like least, without you having to say so explicitly.
21872
21873 You can control what groups the adaptive scoring is to be performed on
21874 by using the score files (@pxref{Score File Format}).  This will also
21875 let you use different rules in different groups.
21876
21877 @vindex gnus-adaptive-file-suffix
21878 The adaptive score entries will be put into a file where the name is the
21879 group name with @code{gnus-adaptive-file-suffix} appended.  The default
21880 is @file{ADAPT}.
21881
21882 @vindex gnus-adaptive-pretty-print
21883 Adaptive score files can get huge and are not meant to be edited by
21884 human hands.  If @code{gnus-adaptive-pretty-print} is @code{nil} (the
21885 deafult) those files will not be written in a human readable way.
21886
21887 @vindex gnus-score-exact-adapt-limit
21888 When doing adaptive scoring, substring or fuzzy matching would probably
21889 give you the best results in most cases.  However, if the header one
21890 matches is short, the possibility for false positives is great, so if
21891 the length of the match is less than
21892 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
21893 this variable is @code{nil}, exact matching will always be used to avoid
21894 this problem.
21895
21896 @vindex gnus-default-adaptive-word-score-alist
21897 As mentioned above, you can adapt either on individual words or entire
21898 headers.  If you adapt on words, the
21899 @code{gnus-default-adaptive-word-score-alist} variable says what score
21900 each instance of a word should add given a mark.
21901
21902 @lisp
21903 (setq gnus-default-adaptive-word-score-alist
21904       `((,gnus-read-mark . 30)
21905         (,gnus-catchup-mark . -10)
21906         (,gnus-killed-mark . -20)
21907         (,gnus-del-mark . -15)))
21908 @end lisp
21909
21910 This is the default value.  If you have adaption on words enabled, every
21911 word that appears in subjects of articles marked with
21912 @code{gnus-read-mark} will result in a score rule that increase the
21913 score with 30 points.
21914
21915 @vindex gnus-default-ignored-adaptive-words
21916 @vindex gnus-ignored-adaptive-words
21917 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
21918 will be ignored.  If you wish to add more words to be ignored, use the
21919 @code{gnus-ignored-adaptive-words} list instead.
21920
21921 @vindex gnus-adaptive-word-length-limit
21922 Some may feel that short words shouldn't count when doing adaptive
21923 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
21924 an integer.  Words shorter than this number will be ignored.  This
21925 variable defaults to @code{nil}.
21926
21927 @vindex gnus-adaptive-word-syntax-table
21928 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
21929 syntax table in effect.  It is similar to the standard syntax table, but
21930 it considers numbers to be non-word-constituent characters.
21931
21932 @vindex gnus-adaptive-word-minimum
21933 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
21934 word scoring process will never bring down the score of an article to
21935 below this number.  The default is @code{nil}.
21936
21937 @vindex gnus-adaptive-word-no-group-words
21938 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
21939 won't adaptively word score any of the words in the group name.  Useful
21940 for groups like @samp{comp.editors.emacs}, where most of the subject
21941 lines contain the word @samp{emacs}.
21942
21943 After using this scheme for a while, it might be nice to write a
21944 @code{gnus-psychoanalyze-user} command to go through the rules and see
21945 what words you like and what words you don't like.  Or perhaps not.
21946
21947 Note that the adaptive word scoring thing is highly experimental and is
21948 likely to change in the future.  Initial impressions seem to indicate
21949 that it's totally useless as it stands.  Some more work (involving more
21950 rigorous statistical methods) will have to be done to make this useful.
21951
21952
21953 @node Home Score File
21954 @section Home Score File
21955
21956 The score file where new score file entries will go is called the
21957 @dfn{home score file}.  This is normally (and by default) the score file
21958 for the group itself.  For instance, the home score file for
21959 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
21960
21961 However, this may not be what you want.  It is often convenient to share
21962 a common home score file among many groups---all @samp{emacs} groups
21963 could perhaps use the same home score file.
21964
21965 @vindex gnus-home-score-file
21966 The variable that controls this is @code{gnus-home-score-file}.  It can
21967 be:
21968
21969 @enumerate
21970 @item
21971 A string.  Then this file will be used as the home score file for all
21972 groups.
21973
21974 @item
21975 A function.  The result of this function will be used as the home score
21976 file.  The function will be called with the name of the group as the
21977 parameter.
21978
21979 @item
21980 A list.  The elements in this list can be:
21981
21982 @enumerate
21983 @item
21984 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
21985 group name, the @var{file-name} will be used as the home score file.
21986
21987 @item
21988 A function.  If the function returns non-@code{nil}, the result will
21989 be used as the home score file.  The function will be called with the
21990 name of the group as the parameter.
21991
21992 @item
21993 A string.  Use the string as the home score file.
21994 @end enumerate
21995
21996 The list will be traversed from the beginning towards the end looking
21997 for matches.
21998
21999 @end enumerate
22000
22001 So, if you want to use just a single score file, you could say:
22002
22003 @lisp
22004 (setq gnus-home-score-file
22005       "my-total-score-file.SCORE")
22006 @end lisp
22007
22008 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
22009 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
22010
22011 @findex gnus-hierarchial-home-score-file
22012 @lisp
22013 (setq gnus-home-score-file
22014       'gnus-hierarchial-home-score-file)
22015 @end lisp
22016
22017 This is a ready-made function provided for your convenience.
22018 Other functions include
22019
22020 @table @code
22021 @item gnus-current-home-score-file
22022 @findex gnus-current-home-score-file
22023 Return the ``current'' regular score file.  This will make scoring
22024 commands add entry to the ``innermost'' matching score file.
22025
22026 @end table
22027
22028 If you want to have one score file for the @samp{emacs} groups and
22029 another for the @samp{comp} groups, while letting all other groups use
22030 their own home score files:
22031
22032 @lisp
22033 (setq gnus-home-score-file
22034       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
22035       '(("\\.emacs" "emacs.SCORE")
22036         ;; @r{All the comp groups in one score file}
22037         ("^comp" "comp.SCORE")))
22038 @end lisp
22039
22040 @vindex gnus-home-adapt-file
22041 @code{gnus-home-adapt-file} works exactly the same way as
22042 @code{gnus-home-score-file}, but says what the home adaptive score file
22043 is instead.  All new adaptive file entries will go into the file
22044 specified by this variable, and the same syntax is allowed.
22045
22046 In addition to using @code{gnus-home-score-file} and
22047 @code{gnus-home-adapt-file}, you can also use group parameters
22048 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
22049 Parameters}) to achieve much the same.  Group and topic parameters take
22050 precedence over this variable.
22051
22052
22053 @node Followups To Yourself
22054 @section Followups To Yourself
22055
22056 Gnus offers two commands for picking out the @code{Message-ID} header in
22057 the current buffer.  Gnus will then add a score rule that scores using
22058 this @code{Message-ID} on the @code{References} header of other
22059 articles.  This will, in effect, increase the score of all articles that
22060 respond to the article in the current buffer.  Quite useful if you want
22061 to easily note when people answer what you've said.
22062
22063 @table @code
22064
22065 @item gnus-score-followup-article
22066 @findex gnus-score-followup-article
22067 This will add a score to articles that directly follow up your own
22068 article.
22069
22070 @item gnus-score-followup-thread
22071 @findex gnus-score-followup-thread
22072 This will add a score to all articles that appear in a thread ``below''
22073 your own article.
22074 @end table
22075
22076 @vindex message-sent-hook
22077 These two functions are both primarily meant to be used in hooks like
22078 @code{message-sent-hook}, like this:
22079 @lisp
22080 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
22081 @end lisp
22082
22083
22084 If you look closely at your own @code{Message-ID}, you'll notice that
22085 the first two or three characters are always the same.  Here's two of
22086 mine:
22087
22088 @example
22089 <x6u3u47icf.fsf@@eyesore.no>
22090 <x6sp9o7ibw.fsf@@eyesore.no>
22091 @end example
22092
22093 So ``my'' ident on this machine is @samp{x6}.  This can be
22094 exploited---the following rule will raise the score on all followups to
22095 myself:
22096
22097 @lisp
22098 ("references"
22099  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
22100   1000 nil r))
22101 @end lisp
22102
22103 Whether it's the first two or first three characters that are ``yours''
22104 is system-dependent.
22105
22106
22107 @node Scoring On Other Headers
22108 @section Scoring On Other Headers
22109 @cindex scoring on other headers
22110
22111 Gnus is quite fast when scoring the ``traditional''
22112 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
22113 other headers requires writing a @code{head} scoring rule, which means
22114 that Gnus has to request every single article from the back end to find
22115 matches.  This takes a long time in big groups.
22116
22117 @vindex gnus-inhibit-slow-scoring
22118 You can inhibit this slow scoring on headers or body by setting the
22119 variable @code{gnus-inhibit-slow-scoring}.  If
22120 @code{gnus-inhibit-slow-scoring} is regexp, slow scoring is inhibited if
22121 the group matches the regexp.  If it is t, slow scoring on it is
22122 inhibited for all groups.
22123
22124 Now, there's not much you can do about the slowness for news groups, but for
22125 mail groups, you have greater control.  In @ref{To From Newsgroups},
22126 it's explained in greater detail what this mechanism does, but here's
22127 a cookbook example for @code{nnml} on how to allow scoring on the
22128 @samp{To} and @samp{Cc} headers.
22129
22130 Put the following in your @file{~/.gnus.el} file.
22131
22132 @lisp
22133 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
22134       nnmail-extra-headers gnus-extra-headers)
22135 @end lisp
22136
22137 Restart Gnus and rebuild your @code{nnml} overview files with the
22138 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
22139 time if you have much mail.
22140
22141 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
22142 so: @kbd{I e s p To RET <your name> RET}.
22143
22144 See?  Simple.
22145
22146
22147 @node Scoring Tips
22148 @section Scoring Tips
22149 @cindex scoring tips
22150
22151 @table @dfn
22152
22153 @item Crossposts
22154 @cindex crossposts
22155 @cindex scoring crossposts
22156 If you want to lower the score of crossposts, the line to match on is
22157 the @code{Xref} header.
22158 @lisp
22159 ("xref" (" talk.politics.misc:" -1000))
22160 @end lisp
22161
22162 @item Multiple crossposts
22163 If you want to lower the score of articles that have been crossposted to
22164 more than, say, 3 groups:
22165 @lisp
22166 ("xref"
22167   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
22168    -1000 nil r))
22169 @end lisp
22170
22171 @item Matching on the body
22172 This is generally not a very good idea---it takes a very long time.
22173 Gnus actually has to fetch each individual article from the server.  But
22174 you might want to anyway, I guess.  Even though there are three match
22175 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
22176 and stick with it in each score file.  If you use any two, each article
22177 will be fetched @emph{twice}.  If you want to match a bit on the
22178 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
22179 the matches.
22180
22181 @item Marking as read
22182 You will probably want to mark articles that have scores below a certain
22183 number as read.  This is most easily achieved by putting the following
22184 in your @file{all.SCORE} file:
22185 @lisp
22186 ((mark -100))
22187 @end lisp
22188 You may also consider doing something similar with @code{expunge}.
22189
22190 @item Negated character classes
22191 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
22192 That will match newlines, which might lead to, well, The Unknown.  Say
22193 @code{[^abcd\n]*} instead.
22194 @end table
22195
22196
22197 @node Reverse Scoring
22198 @section Reverse Scoring
22199 @cindex reverse scoring
22200
22201 If you want to keep just articles that have @samp{Sex with Emacs} in the
22202 subject header, and expunge all other articles, you could put something
22203 like this in your score file:
22204
22205 @lisp
22206 (("subject"
22207   ("Sex with Emacs" 2))
22208  (mark 1)
22209  (expunge 1))
22210 @end lisp
22211
22212 So, you raise all articles that match @samp{Sex with Emacs} and mark the
22213 rest as read, and expunge them to boot.
22214
22215
22216 @node Global Score Files
22217 @section Global Score Files
22218 @cindex global score files
22219
22220 Sure, other newsreaders have ``global kill files''.  These are usually
22221 nothing more than a single kill file that applies to all groups, stored
22222 in the user's home directory.  Bah!  Puny, weak newsreaders!
22223
22224 What I'm talking about here are Global Score Files.  Score files from
22225 all over the world, from users everywhere, uniting all nations in one
22226 big, happy score file union!  Ange-score!  New and untested!
22227
22228 @vindex gnus-global-score-files
22229 All you have to do to use other people's score files is to set the
22230 @code{gnus-global-score-files} variable.  One entry for each score file,
22231 or each score file directory.  Gnus will decide by itself what score
22232 files are applicable to which group.
22233
22234 To use the score file
22235 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
22236 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
22237 say this:
22238
22239 @lisp
22240 (setq gnus-global-score-files
22241       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
22242         "/ftp@@ftp.some-where:/pub/score/"))
22243 @end lisp
22244
22245 @findex gnus-score-search-global-directories
22246 @noindent
22247 Simple, eh?  Directory names must end with a @samp{/}.  These
22248 directories are typically scanned only once during each Gnus session.
22249 If you feel the need to manually re-scan the remote directories, you can
22250 use the @code{gnus-score-search-global-directories} command.
22251
22252 Note that, at present, using this option will slow down group entry
22253 somewhat.  (That is---a lot.)
22254
22255 If you want to start maintaining score files for other people to use,
22256 just put your score file up for anonymous ftp and announce it to the
22257 world.  Become a retro-moderator!  Participate in the retro-moderator
22258 wars sure to ensue, where retro-moderators battle it out for the
22259 sympathy of the people, luring them to use their score files on false
22260 premises!  Yay!  The net is saved!
22261
22262 Here are some tips for the would-be retro-moderator, off the top of my
22263 head:
22264
22265 @itemize @bullet
22266
22267 @item
22268 Articles heavily crossposted are probably junk.
22269 @item
22270 To lower a single inappropriate article, lower by @code{Message-ID}.
22271 @item
22272 Particularly brilliant authors can be raised on a permanent basis.
22273 @item
22274 Authors that repeatedly post off-charter for the group can safely be
22275 lowered out of existence.
22276 @item
22277 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
22278 articles completely.
22279
22280 @item
22281 Use expiring score entries to keep the size of the file down.  You
22282 should probably have a long expiry period, though, as some sites keep
22283 old articles for a long time.
22284 @end itemize
22285
22286 @dots{} I wonder whether other newsreaders will support global score files
22287 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
22288 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
22289 holding our breath yet?
22290
22291
22292 @node Kill Files
22293 @section Kill Files
22294 @cindex kill files
22295
22296 Gnus still supports those pesky old kill files.  In fact, the kill file
22297 entries can now be expiring, which is something I wrote before Daniel
22298 Quinlan thought of doing score files, so I've left the code in there.
22299
22300 In short, kill processing is a lot slower (and I do mean @emph{a lot})
22301 than score processing, so it might be a good idea to rewrite your kill
22302 files into score files.
22303
22304 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
22305 forms into this file, which means that you can use kill files as some
22306 sort of primitive hook function to be run on group entry, even though
22307 that isn't a very good idea.
22308
22309 Normal kill files look like this:
22310
22311 @lisp
22312 (gnus-kill "From" "Lars Ingebrigtsen")
22313 (gnus-kill "Subject" "ding")
22314 (gnus-expunge "X")
22315 @end lisp
22316
22317 This will mark every article written by me as read, and remove the
22318 marked articles from the summary buffer.  Very useful, you'll agree.
22319
22320 Other programs use a totally different kill file syntax.  If Gnus
22321 encounters what looks like a @code{rn} kill file, it will take a stab at
22322 interpreting it.
22323
22324 Two summary functions for editing a @sc{gnus} kill file:
22325
22326 @table @kbd
22327
22328 @item M-k
22329 @kindex M-k (Summary)
22330 @findex gnus-summary-edit-local-kill
22331 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
22332
22333 @item M-K
22334 @kindex M-K (Summary)
22335 @findex gnus-summary-edit-global-kill
22336 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
22337 @end table
22338
22339 Two group mode functions for editing the kill files:
22340
22341 @table @kbd
22342
22343 @item M-k
22344 @kindex M-k (Group)
22345 @findex gnus-group-edit-local-kill
22346 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
22347
22348 @item M-K
22349 @kindex M-K (Group)
22350 @findex gnus-group-edit-global-kill
22351 Edit the general kill file (@code{gnus-group-edit-global-kill}).
22352 @end table
22353
22354 Kill file variables:
22355
22356 @table @code
22357 @item gnus-kill-file-name
22358 @vindex gnus-kill-file-name
22359 A kill file for the group @samp{soc.motss} is normally called
22360 @file{soc.motss.KILL}.  The suffix appended to the group name to get
22361 this file name is detailed by the @code{gnus-kill-file-name} variable.
22362 The ``global'' kill file (not in the score file sense of ``global'', of
22363 course) is just called @file{KILL}.
22364
22365 @vindex gnus-kill-save-kill-file
22366 @item gnus-kill-save-kill-file
22367 If this variable is non-@code{nil}, Gnus will save the
22368 kill file after processing, which is necessary if you use expiring
22369 kills.
22370
22371 @item gnus-apply-kill-hook
22372 @vindex gnus-apply-kill-hook
22373 @findex gnus-apply-kill-file-unless-scored
22374 @findex gnus-apply-kill-file
22375 A hook called to apply kill files to a group.  It is
22376 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
22377 kill file if you have a score file for the same group, you can set this
22378 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
22379 kill files to be processed, you should set this variable to @code{nil}.
22380
22381 @item gnus-kill-file-mode-hook
22382 @vindex gnus-kill-file-mode-hook
22383 A hook called in kill-file mode buffers.
22384
22385 @end table
22386
22387
22388 @node Converting Kill Files
22389 @section Converting Kill Files
22390 @cindex kill files
22391 @cindex converting kill files
22392
22393 If you have loads of old kill files, you may want to convert them into
22394 score files.  If they are ``regular'', you can use
22395 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
22396 by hand.
22397
22398 The kill to score conversion package isn't included in Gnus by default.
22399 You can fetch it from
22400 @uref{http://www.stud.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
22401
22402 If your old kill files are very complex---if they contain more
22403 non-@code{gnus-kill} forms than not, you'll have to convert them by
22404 hand.  Or just let them be as they are.  Gnus will still use them as
22405 before.
22406
22407
22408 @node Advanced Scoring
22409 @section Advanced Scoring
22410
22411 Scoring on Subjects and From headers is nice enough, but what if you're
22412 really interested in what a person has to say only when she's talking
22413 about a particular subject?  Or what if you really don't want to
22414 read what person A has to say when she's following up to person B, but
22415 want to read what she says when she's following up to person C?
22416
22417 By using advanced scoring rules you may create arbitrarily complex
22418 scoring patterns.
22419
22420 @menu
22421 * Advanced Scoring Syntax::     A definition.
22422 * Advanced Scoring Examples::   What they look like.
22423 * Advanced Scoring Tips::       Getting the most out of it.
22424 @end menu
22425
22426
22427 @node Advanced Scoring Syntax
22428 @subsection Advanced Scoring Syntax
22429
22430 Ordinary scoring rules have a string as the first element in the rule.
22431 Advanced scoring rules have a list as the first element.  The second
22432 element is the score to be applied if the first element evaluated to a
22433 non-@code{nil} value.
22434
22435 These lists may consist of three logical operators, one redirection
22436 operator, and various match operators.
22437
22438 Logical operators:
22439
22440 @table @code
22441 @item &
22442 @itemx and
22443 This logical operator will evaluate each of its arguments until it finds
22444 one that evaluates to @code{false}, and then it'll stop.  If all arguments
22445 evaluate to @code{true} values, then this operator will return
22446 @code{true}.
22447
22448 @item |
22449 @itemx or
22450 This logical operator will evaluate each of its arguments until it finds
22451 one that evaluates to @code{true}.  If no arguments are @code{true},
22452 then this operator will return @code{false}.
22453
22454 @item !
22455 @itemx not
22456 @itemx Â¬
22457 This logical operator only takes a single argument.  It returns the
22458 logical negation of the value of its argument.
22459
22460 @end table
22461
22462 There is an @dfn{indirection operator} that will make its arguments
22463 apply to the ancestors of the current article being scored.  For
22464 instance, @code{1-} will make score rules apply to the parent of the
22465 current article.  @code{2-} will make score rules apply to the
22466 grandparent of the current article.  Alternatively, you can write
22467 @code{^^}, where the number of @code{^}s (carets) says how far back into
22468 the ancestry you want to go.
22469
22470 Finally, we have the match operators.  These are the ones that do the
22471 real work.  Match operators are header name strings followed by a match
22472 and a match type.  A typical match operator looks like @samp{("from"
22473 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
22474 simple scoring, and the match types are also the same.
22475
22476
22477 @node Advanced Scoring Examples
22478 @subsection Advanced Scoring Examples
22479
22480 Please note that the following examples are score file rules.  To
22481 make a complete score file from them, surround them with another pair
22482 of parentheses.
22483
22484 Let's say you want to increase the score of articles written by Lars
22485 when he's talking about Gnus:
22486
22487 @example
22488 @group
22489 ((&
22490   ("from" "Lars Ingebrigtsen")
22491   ("subject" "Gnus"))
22492  1000)
22493 @end group
22494 @end example
22495
22496 Quite simple, huh?
22497
22498 When he writes long articles, he sometimes has something nice to say:
22499
22500 @example
22501 ((&
22502   ("from" "Lars Ingebrigtsen")
22503   (|
22504    ("subject" "Gnus")
22505    ("lines" 100 >)))
22506  1000)
22507 @end example
22508
22509 However, when he responds to things written by Reig Eigil Logge, you
22510 really don't want to read what he's written:
22511
22512 @example
22513 ((&
22514   ("from" "Lars Ingebrigtsen")
22515   (1- ("from" "Reig Eigil Logge")))
22516  -100000)
22517 @end example
22518
22519 Everybody that follows up Redmondo when he writes about disappearing
22520 socks should have their scores raised, but only when they talk about
22521 white socks.  However, when Lars talks about socks, it's usually not
22522 very interesting:
22523
22524 @example
22525 ((&
22526   (1-
22527    (&
22528     ("from" "redmondo@@.*no" r)
22529     ("body" "disappearing.*socks" t)))
22530   (! ("from" "Lars Ingebrigtsen"))
22531   ("body" "white.*socks"))
22532  1000)
22533 @end example
22534
22535 Suppose you're reading a high volume group and you're only interested
22536 in replies. The plan is to score down all articles that don't have
22537 subject that begin with "Re:", "Fw:" or "Fwd:" and then score up all
22538 parents of articles that have subjects that begin with reply marks.
22539
22540 @example
22541 ((! ("subject" "re:\\|fwd?:" r))
22542   -200)
22543 ((1- ("subject" "re:\\|fwd?:" r))
22544   200)
22545 @end example
22546
22547 The possibilities are endless.
22548
22549 @node Advanced Scoring Tips
22550 @subsection Advanced Scoring Tips
22551
22552 The @code{&} and @code{|} logical operators do short-circuit logic.
22553 That is, they stop processing their arguments when it's clear what the
22554 result of the operation will be.  For instance, if one of the arguments
22555 of an @code{&} evaluates to @code{false}, there's no point in evaluating
22556 the rest of the arguments.  This means that you should put slow matches
22557 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
22558 @samp{subject}) first.
22559
22560 The indirection arguments (@code{1-} and so on) will make their
22561 arguments work on previous generations of the thread.  If you say
22562 something like:
22563
22564 @example
22565 ...
22566 (1-
22567  (1-
22568   ("from" "lars")))
22569 ...
22570 @end example
22571
22572 Then that means ``score on the from header of the grandparent of the
22573 current article''.  An indirection is quite fast, but it's better to say:
22574
22575 @example
22576 (1-
22577  (&
22578   ("from" "Lars")
22579   ("subject" "Gnus")))
22580 @end example
22581
22582 than it is to say:
22583
22584 @example
22585 (&
22586  (1- ("from" "Lars"))
22587  (1- ("subject" "Gnus")))
22588 @end example
22589
22590
22591 @node Score Decays
22592 @section Score Decays
22593 @cindex score decays
22594 @cindex decays
22595
22596 You may find that your scores have a tendency to grow without
22597 bounds, especially if you're using adaptive scoring.  If scores get too
22598 big, they lose all meaning---they simply max out and it's difficult to
22599 use them in any sensible way.
22600
22601 @vindex gnus-decay-scores
22602 @findex gnus-decay-score
22603 @vindex gnus-decay-score-function
22604 Gnus provides a mechanism for decaying scores to help with this problem.
22605 When score files are loaded and @code{gnus-decay-scores} is
22606 non-@code{nil}, Gnus will run the score files through the decaying
22607 mechanism thereby lowering the scores of all non-permanent score rules.
22608 If @code{gnus-decay-scores} is a regexp, only score files matching this
22609 regexp are treated.  E.g. you may set it to @samp{\\.ADAPT\\'} if only
22610 @emph{adaptive} score files should be decayed.  The decay itself if
22611 performed by the @code{gnus-decay-score-function} function, which is
22612 @code{gnus-decay-score} by default.  Here's the definition of that
22613 function:
22614
22615 @lisp
22616 (defun gnus-decay-score (score)
22617   "Decay SCORE according to `gnus-score-decay-constant'
22618 and `gnus-score-decay-scale'."
22619   (let ((n (- score
22620               (* (if (< score 0) -1 1)
22621                  (min (abs score)
22622                       (max gnus-score-decay-constant
22623                            (* (abs score)
22624                               gnus-score-decay-scale)))))))
22625     (if (and (featurep 'xemacs)
22626              ;; XEmacs' floor can handle only the floating point
22627              ;; number below the half of the maximum integer.
22628              (> (abs n) (lsh -1 -2)))
22629         (string-to-number
22630          (car (split-string (number-to-string n) "\\.")))
22631       (floor n))))
22632 @end lisp
22633
22634 @vindex gnus-score-decay-scale
22635 @vindex gnus-score-decay-constant
22636 @code{gnus-score-decay-constant} is 3 by default and
22637 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
22638
22639 @enumerate
22640 @item
22641 Scores between -3 and 3 will be set to 0 when this function is called.
22642
22643 @item
22644 Scores with magnitudes between 3 and 60 will be shrunk by 3.
22645
22646 @item
22647 Scores with magnitudes greater than 60 will be shrunk by 5% of the
22648 score.
22649 @end enumerate
22650
22651 If you don't like this decay function, write your own.  It is called
22652 with the score to be decayed as its only parameter, and it should return
22653 the new score, which should be an integer.
22654
22655 Gnus will try to decay scores once a day.  If you haven't run Gnus for
22656 four days, Gnus will decay the scores four times, for instance.
22657
22658 @iftex
22659 @iflatex
22660 @chapter Message
22661 @include message.texi
22662 @chapter Emacs MIME
22663 @include emacs-mime.texi
22664 @chapter Sieve
22665 @include sieve.texi
22666 @chapter PGG
22667 @include pgg.texi
22668 @chapter SASL
22669 @include sasl.texi
22670 @end iflatex
22671 @end iftex
22672
22673 @node Various
22674 @chapter Various
22675
22676 @menu
22677 * Process/Prefix::              A convention used by many treatment commands.
22678 * Interactive::                 Making Gnus ask you many questions.
22679 * Symbolic Prefixes::           How to supply some Gnus functions with options.
22680 * Formatting Variables::        You can specify what buffers should look like.
22681 * Window Layout::               Configuring the Gnus buffer windows.
22682 * Faces and Fonts::             How to change how faces look.
22683 * Compilation::                 How to speed Gnus up.
22684 * Mode Lines::                  Displaying information in the mode lines.
22685 * Highlighting and Menus::      Making buffers look all nice and cozy.
22686 * Buttons::                     Get tendinitis in ten easy steps!
22687 * Daemons::                     Gnus can do things behind your back.
22688 * NoCeM::                       How to avoid spam and other fatty foods.
22689 * Undo::                        Some actions can be undone.
22690 * Predicate Specifiers::        Specifying predicates.
22691 * Moderation::                  What to do if you're a moderator.
22692 * Fetching a Group::            Starting Gnus just to read a group.
22693 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
22694 * Fuzzy Matching::              What's the big fuzz?
22695 * Thwarting Email Spam::        Simple ways to avoid unsolicited commercial email.
22696 * Spam Package::                A package for filtering and processing spam.
22697 * Other modes::                 Interaction with other modes.
22698 * Various Various::             Things that are really various.
22699 @end menu
22700
22701
22702 @node Process/Prefix
22703 @section Process/Prefix
22704 @cindex process/prefix convention
22705
22706 Many functions, among them functions for moving, decoding and saving
22707 articles, use what is known as the @dfn{Process/Prefix convention}.
22708
22709 This is a method for figuring out what articles the user wants the
22710 command to be performed on.
22711
22712 It goes like this:
22713
22714 If the numeric prefix is N, perform the operation on the next N
22715 articles, starting with the current one.  If the numeric prefix is
22716 negative, perform the operation on the previous N articles, starting
22717 with the current one.
22718
22719 @vindex transient-mark-mode
22720 If @code{transient-mark-mode} in non-@code{nil} and the region is
22721 active, all articles in the region will be worked upon.
22722
22723 If there is no numeric prefix, but some articles are marked with the
22724 process mark, perform the operation on the articles marked with
22725 the process mark.
22726
22727 If there is neither a numeric prefix nor any articles marked with the
22728 process mark, just perform the operation on the current article.
22729
22730 Quite simple, really, but it needs to be made clear so that surprises
22731 are avoided.
22732
22733 Commands that react to the process mark will push the current list of
22734 process marked articles onto a stack and will then clear all process
22735 marked articles.  You can restore the previous configuration with the
22736 @kbd{M P y} command (@pxref{Setting Process Marks}).
22737
22738 @vindex gnus-summary-goto-unread
22739 One thing that seems to shock & horrify lots of people is that, for
22740 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
22741 Since each @kbd{d} (which marks the current article as read) by default
22742 goes to the next unread article after marking, this means that @kbd{3 d}
22743 will mark the next three unread articles as read, no matter what the
22744 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
22745 @code{nil} for a more straightforward action.
22746
22747 Many commands do not use the process/prefix convention.  All commands
22748 that do explicitly say so in this manual.  To apply the process/prefix
22749 convention to commands that do not use it, you can use the @kbd{M-&}
22750 command.  For instance, to mark all the articles in the group as
22751 expirable, you could say @kbd{M P b M-& E}.
22752
22753
22754 @node Interactive
22755 @section Interactive
22756 @cindex interaction
22757
22758 @table @code
22759
22760 @item gnus-novice-user
22761 @vindex gnus-novice-user
22762 If this variable is non-@code{nil}, you are either a newcomer to the
22763 World of Usenet, or you are very cautious, which is a nice thing to be,
22764 really.  You will be given questions of the type ``Are you sure you want
22765 to do this?'' before doing anything dangerous.  This is @code{t} by
22766 default.
22767
22768 @item gnus-expert-user
22769 @vindex gnus-expert-user
22770 If this variable is non-@code{nil}, you will seldom be asked any
22771 questions by Gnus.  It will simply assume you know what you're doing, no
22772 matter how strange.
22773
22774 @item gnus-interactive-catchup
22775 @vindex gnus-interactive-catchup
22776 Require confirmation before catching up a group if non-@code{nil}.  It
22777 is @code{t} by default.
22778
22779 @item gnus-interactive-exit
22780 @vindex gnus-interactive-exit
22781 Require confirmation before exiting Gnus.  This variable is @code{t} by
22782 default.
22783 @end table
22784
22785
22786 @node Symbolic Prefixes
22787 @section Symbolic Prefixes
22788 @cindex symbolic prefixes
22789
22790 Quite a lot of Emacs commands react to the (numeric) prefix.  For
22791 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
22792 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
22793 rule of 900 to the current article.
22794
22795 This is all nice and well, but what if you want to give a command some
22796 additional information?  Well, what most commands do is interpret the
22797 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
22798 doesn't want a backup file to be created when saving the current buffer,
22799 for instance.  But what if you want to save without making a backup
22800 file, and you want Emacs to flash lights and play a nice tune at the
22801 same time?  You can't, and you're probably perfectly happy that way.
22802
22803 @kindex M-i (Summary)
22804 @findex gnus-symbolic-argument
22805 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
22806 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
22807 character typed in is the value.  You can stack as many @kbd{M-i}
22808 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
22809 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
22810 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
22811 @code{b}''.  You get the drift.
22812
22813 Typing in symbolic prefixes to commands that don't accept them doesn't
22814 hurt, but it doesn't do any good either.  Currently not many Gnus
22815 functions make use of the symbolic prefix.
22816
22817 If you're interested in how Gnus implements this, @pxref{Extended
22818 Interactive}.
22819
22820
22821 @node Formatting Variables
22822 @section Formatting Variables
22823 @cindex formatting variables
22824
22825 Throughout this manual you've probably noticed lots of variables called
22826 things like @code{gnus-group-line-format} and
22827 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
22828 output lines in the various buffers.  There's quite a lot of them.
22829 Fortunately, they all use the same syntax, so there's not that much to
22830 be annoyed by.
22831
22832 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
22833 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
22834 lots of percentages everywhere.
22835
22836 @menu
22837 * Formatting Basics::           A formatting variable is basically a format string.
22838 * Mode Line Formatting::        Some rules about mode line formatting variables.
22839 * Advanced Formatting::         Modifying output in various ways.
22840 * User-Defined Specs::          Having Gnus call your own functions.
22841 * Formatting Fonts::            Making the formatting look colorful and nice.
22842 * Positioning Point::           Moving point to a position after an operation.
22843 * Tabulation::                  Tabulating your output.
22844 * Wide Characters::             Dealing with wide characters.
22845 @end menu
22846
22847 Currently Gnus uses the following formatting variables:
22848 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
22849 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
22850 @code{gnus-group-mode-line-format},
22851 @code{gnus-summary-mode-line-format},
22852 @code{gnus-article-mode-line-format},
22853 @code{gnus-server-mode-line-format}, and
22854 @code{gnus-summary-pick-line-format}.
22855
22856 All these format variables can also be arbitrary elisp forms.  In that
22857 case, they will be @code{eval}ed to insert the required lines.
22858
22859 @kindex M-x gnus-update-format
22860 @findex gnus-update-format
22861 Gnus includes a command to help you while creating your own format
22862 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
22863 update the spec in question and pop you to a buffer where you can
22864 examine the resulting Lisp code to be run to generate the line.
22865
22866
22867
22868 @node Formatting Basics
22869 @subsection Formatting Basics
22870
22871 Each @samp{%} element will be replaced by some string or other when the
22872 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
22873 spec, and pad with spaces to get a 5-character field''.
22874
22875 As with normal C and Emacs Lisp formatting strings, the numerical
22876 modifier between the @samp{%} and the formatting type character will
22877 @dfn{pad} the output so that it is always at least that long.
22878 @samp{%5y} will make the field always (at least) five characters wide by
22879 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
22880 the right instead.
22881
22882 You may also wish to limit the length of the field to protect against
22883 particularly wide values.  For that you can say @samp{%4,6y}, which
22884 means that the field will never be more than 6 characters wide and never
22885 less than 4 characters wide.
22886
22887 Also Gnus supports some extended format specifications, such as
22888 @samp{%&user-date;}.
22889
22890
22891 @node Mode Line Formatting
22892 @subsection Mode Line Formatting
22893
22894 Mode line formatting variables (e.g.,
22895 @code{gnus-summary-mode-line-format}) follow the same rules as other,
22896 buffer line oriented formatting variables (@pxref{Formatting Basics})
22897 with the following two differences:
22898
22899 @enumerate
22900
22901 @item
22902 There must be no newline (@samp{\n}) at the end.
22903
22904 @item
22905 The special @samp{%%b} spec can be used to display the buffer name.
22906 Well, it's no spec at all, really---@samp{%%} is just a way to quote
22907 @samp{%} to allow it to pass through the formatting machinery unmangled,
22908 so that Emacs receives @samp{%b}, which is something the Emacs mode line
22909 display interprets to mean ``show the buffer name''.  For a full list of
22910 mode line specs Emacs understands, see the documentation of the
22911 @code{mode-line-format} variable.
22912
22913 @end enumerate
22914
22915
22916 @node Advanced Formatting
22917 @subsection Advanced Formatting
22918
22919 It is frequently useful to post-process the fields in some way.
22920 Padding, limiting, cutting off parts and suppressing certain values can
22921 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
22922 look like @samp{%~(cut 3)~(ignore "0")y}.
22923
22924 These are the valid modifiers:
22925
22926 @table @code
22927 @item pad
22928 @itemx pad-left
22929 Pad the field to the left with spaces until it reaches the required
22930 length.
22931
22932 @item pad-right
22933 Pad the field to the right with spaces until it reaches the required
22934 length.
22935
22936 @item max
22937 @itemx max-left
22938 Cut off characters from the left until it reaches the specified length.
22939
22940 @item max-right
22941 Cut off characters from the right until it reaches the specified
22942 length.
22943
22944 @item cut
22945 @itemx cut-left
22946 Cut off the specified number of characters from the left.
22947
22948 @item cut-right
22949 Cut off the specified number of characters from the right.
22950
22951 @item ignore
22952 Return an empty string if the field is equal to the specified value.
22953
22954 @item form
22955 Use the specified form as the field value when the @samp{@@} spec is
22956 used.
22957
22958 Here's an example:
22959
22960 @lisp
22961 "~(form (current-time-string))@@"
22962 @end lisp
22963
22964 @end table
22965
22966 Let's take an example.  The @samp{%o} spec in the summary mode lines
22967 will return a date in compact ISO8601 format---@samp{19960809T230410}.
22968 This is quite a mouthful, so we want to shave off the century number and
22969 the time, leaving us with a six-character date.  That would be
22970 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
22971 maxing, and we need the padding to ensure that the date is never less
22972 than 6 characters to make it look nice in columns.)
22973
22974 Ignoring is done first; then cutting; then maxing; and then as the very
22975 last operation, padding.
22976
22977 If you use lots of these advanced thingies, you'll find that Gnus gets
22978 quite slow.  This can be helped enormously by running @kbd{M-x
22979 gnus-compile} when you are satisfied with the look of your lines.
22980 @xref{Compilation}.
22981
22982
22983 @node User-Defined Specs
22984 @subsection User-Defined Specs
22985
22986 All the specs allow for inserting user defined specifiers---@samp{u}.
22987 The next character in the format string should be a letter.  Gnus
22988 will call the function @code{gnus-user-format-function-}@samp{X}, where
22989 @samp{X} is the letter following @samp{%u}.  The function will be passed
22990 a single parameter---what the parameter means depends on what buffer
22991 it's being called from.  The function should return a string, which will
22992 be inserted into the buffer just like information from any other
22993 specifier.  This function may also be called with dummy values, so it
22994 should protect against that.
22995
22996 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
22997 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
22998
22999 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
23000 much the same without defining new functions.  Here's an example:
23001 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
23002 given here will be evaluated to yield the current line number, and then
23003 inserted.
23004
23005
23006 @node Formatting Fonts
23007 @subsection Formatting Fonts
23008
23009 @cindex %(, %)
23010 @vindex gnus-mouse-face
23011 There are specs for highlighting, and these are shared by all the format
23012 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
23013 the special @code{mouse-face} property set, which means that it will be
23014 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
23015 over it.
23016
23017 @cindex %@{, %@}
23018 @vindex gnus-face-0
23019 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
23020 normal faces set using @code{gnus-face-0}, which is @code{bold} by
23021 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
23022 and so on.  Create as many faces as you wish.  The same goes for the
23023 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
23024 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
23025
23026 @cindex %<<, %>>, guillemets
23027 @c @cindex %<<, %>>, %«, %», guillemets
23028 @vindex gnus-balloon-face-0
23029 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
23030 special @code{balloon-help} property set to
23031 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
23032 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
23033 variables should be either strings or symbols naming functions that
23034 return a string.  When the mouse passes over text with this property
23035 set, a balloon window will appear and display the string.  Please
23036 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
23037 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
23038 XEmacs) for more information on this.  (For technical reasons, the
23039 guillemets have been approximated as @samp{<<} and @samp{>>} in this
23040 paragraph.)
23041
23042 Here's an alternative recipe for the group buffer:
23043
23044 @lisp
23045 ;; @r{Create three face types.}
23046 (setq gnus-face-1 'bold)
23047 (setq gnus-face-3 'italic)
23048
23049 ;; @r{We want the article count to be in}
23050 ;; @r{a bold and green face.  So we create}
23051 ;; @r{a new face called @code{my-green-bold}.}
23052 (copy-face 'bold 'my-green-bold)
23053 ;; @r{Set the color.}
23054 (set-face-foreground 'my-green-bold "ForestGreen")
23055 (setq gnus-face-2 'my-green-bold)
23056
23057 ;; @r{Set the new & fancy format.}
23058 (setq gnus-group-line-format
23059       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
23060 @end lisp
23061
23062 I'm sure you'll be able to use this scheme to create totally unreadable
23063 and extremely vulgar displays.  Have fun!
23064
23065 Note that the @samp{%(} specs (and friends) do not make any sense on the
23066 mode-line variables.
23067
23068 @node Positioning Point
23069 @subsection Positioning Point
23070
23071 Gnus usually moves point to a pre-defined place on each line in most
23072 buffers.  By default, point move to the first colon character on the
23073 line.  You can customize this behavior in three different ways.
23074
23075 You can move the colon character to somewhere else on the line.
23076
23077 @findex gnus-goto-colon
23078 You can redefine the function that moves the point to the colon.  The
23079 function is called @code{gnus-goto-colon}.
23080
23081 But perhaps the most convenient way to deal with this, if you don't want
23082 to have a colon in your line, is to use the @samp{%*} specifier.  If you
23083 put a @samp{%*} somewhere in your format line definition, Gnus will
23084 place point there.
23085
23086
23087 @node Tabulation
23088 @subsection Tabulation
23089
23090 You can usually line up your displays by padding and cutting your
23091 strings.  However, when combining various strings of different size, it
23092 can often be more convenient to just output the strings, and then worry
23093 about lining up the following text afterwards.
23094
23095 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
23096 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
23097
23098 @samp{%50=} will insert space characters to pad the line up to column
23099 50.  If the text is already past column 50, nothing will be inserted.
23100 This is the soft tabulator.
23101
23102 @samp{%-50=} will insert space characters to pad the line up to column
23103 50.  If the text is already past column 50, the excess text past column
23104 50 will be removed.  This is the hard tabulator.
23105
23106
23107 @node Wide Characters
23108 @subsection Wide Characters
23109
23110 Fixed width fonts in most countries have characters of the same width.
23111 Some countries, however, use Latin characters mixed with wider
23112 characters---most notable East Asian countries.
23113
23114 The problem is that when formatting, Gnus assumes that if a string is 10
23115 characters wide, it'll be 10 Latin characters wide on the screen.  In
23116 these countries, that's not true.
23117
23118 @vindex gnus-use-correct-string-widths
23119 To help fix this, you can set @code{gnus-use-correct-string-widths} to
23120 @code{t}.  This makes buffer generation slower, but the results will be
23121 prettier.  The default value under XEmacs is @code{t} but @code{nil}
23122 for Emacs.
23123
23124
23125 @node Window Layout
23126 @section Window Layout
23127 @cindex window layout
23128
23129 No, there's nothing here about X, so be quiet.
23130
23131 @vindex gnus-use-full-window
23132 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
23133 other windows and occupy the entire Emacs screen by itself.  It is
23134 @code{t} by default.
23135
23136 Setting this variable to @code{nil} kinda works, but there are
23137 glitches.  Use at your own peril.
23138
23139 @vindex gnus-buffer-configuration
23140 @code{gnus-buffer-configuration} describes how much space each Gnus
23141 buffer should be given.  Here's an excerpt of this variable:
23142
23143 @lisp
23144 ((group (vertical 1.0 (group 1.0 point)
23145                       (if gnus-carpal (group-carpal 4))))
23146  (article (vertical 1.0 (summary 0.25 point)
23147                         (article 1.0))))
23148 @end lisp
23149
23150 This is an alist.  The @dfn{key} is a symbol that names some action or
23151 other.  For instance, when displaying the group buffer, the window
23152 configuration function will use @code{group} as the key.  A full list of
23153 possible names is listed below.
23154
23155 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
23156 should occupy.  To take the @code{article} split as an example -
23157
23158 @lisp
23159 (article (vertical 1.0 (summary 0.25 point)
23160                        (article 1.0)))
23161 @end lisp
23162
23163 This @dfn{split} says that the summary buffer should occupy 25% of upper
23164 half of the screen, and that it is placed over the article buffer.  As
23165 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
23166 reaching for that calculator there).  However, the special number
23167 @code{1.0} is used to signal that this buffer should soak up all the
23168 rest of the space available after the rest of the buffers have taken
23169 whatever they need.  There should be only one buffer with the @code{1.0}
23170 size spec per split.
23171
23172 Point will be put in the buffer that has the optional third element
23173 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
23174 split where the tag @code{frame-focus} is a member (i.e. is the third or
23175 fourth element in the list, depending on whether the @code{point} tag is
23176 present) gets focus.
23177
23178 Here's a more complicated example:
23179
23180 @lisp
23181 (article (vertical 1.0 (group 4)
23182                        (summary 0.25 point)
23183                        (if gnus-carpal (summary-carpal 4))
23184                        (article 1.0)))
23185 @end lisp
23186
23187 If the size spec is an integer instead of a floating point number,
23188 then that number will be used to say how many lines a buffer should
23189 occupy, not a percentage.
23190
23191 If the @dfn{split} looks like something that can be @code{eval}ed (to be
23192 precise---if the @code{car} of the split is a function or a subr), this
23193 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
23194 be used as a split.  This means that there will be three buffers if
23195 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
23196 is non-@code{nil}.
23197
23198 Not complicated enough for you?  Well, try this on for size:
23199
23200 @lisp
23201 (article (horizontal 1.0
23202              (vertical 0.5
23203                  (group 1.0)
23204                  (gnus-carpal 4))
23205              (vertical 1.0
23206                  (summary 0.25 point)
23207                  (summary-carpal 4)
23208                  (article 1.0))))
23209 @end lisp
23210
23211 Whoops.  Two buffers with the mystery 100% tag.  And what's that
23212 @code{horizontal} thingie?
23213
23214 If the first element in one of the split is @code{horizontal}, Gnus will
23215 split the window horizontally, giving you two windows side-by-side.
23216 Inside each of these strips you may carry on all you like in the normal
23217 fashion.  The number following @code{horizontal} says what percentage of
23218 the screen is to be given to this strip.
23219
23220 For each split, there @emph{must} be one element that has the 100% tag.
23221 The splitting is never accurate, and this buffer will eat any leftover
23222 lines from the splits.
23223
23224 To be slightly more formal, here's a definition of what a valid split
23225 may look like:
23226
23227 @example
23228 @group
23229 split      = frame | horizontal | vertical | buffer | form
23230 frame      = "(frame " size *split ")"
23231 horizontal = "(horizontal " size *split ")"
23232 vertical   = "(vertical " size *split ")"
23233 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
23234 size       = number | frame-params
23235 buf-name   = group | article | summary ...
23236 @end group
23237 @end example
23238
23239 The limitations are that the @code{frame} split can only appear as the
23240 top-level split.  @var{form} should be an Emacs Lisp form that should
23241 return a valid split.  We see that each split is fully recursive, and
23242 may contain any number of @code{vertical} and @code{horizontal} splits.
23243
23244 @vindex gnus-window-min-width
23245 @vindex gnus-window-min-height
23246 @cindex window height
23247 @cindex window width
23248 Finding the right sizes can be a bit complicated.  No window may be less
23249 than @code{gnus-window-min-height} (default 1) characters high, and all
23250 windows must be at least @code{gnus-window-min-width} (default 1)
23251 characters wide.  Gnus will try to enforce this before applying the
23252 splits.  If you want to use the normal Emacs window width/height limit,
23253 you can just set these two variables to @code{nil}.
23254
23255 If you're not familiar with Emacs terminology, @code{horizontal} and
23256 @code{vertical} splits may work the opposite way of what you'd expect.
23257 Windows inside a @code{horizontal} split are shown side-by-side, and
23258 windows within a @code{vertical} split are shown above each other.
23259
23260 @findex gnus-configure-frame
23261 If you want to experiment with window placement, a good tip is to call
23262 @code{gnus-configure-frame} directly with a split.  This is the function
23263 that does all the real work when splitting buffers.  Below is a pretty
23264 nonsensical configuration with 5 windows; two for the group buffer and
23265 three for the article buffer.  (I said it was nonsensical.)  If you
23266 @code{eval} the statement below, you can get an idea of how that would
23267 look straight away, without going through the normal Gnus channels.
23268 Play with it until you're satisfied, and then use
23269 @code{gnus-add-configuration} to add your new creation to the buffer
23270 configuration list.
23271
23272 @lisp
23273 (gnus-configure-frame
23274  '(horizontal 1.0
23275     (vertical 10
23276       (group 1.0)
23277       (article 0.3 point))
23278     (vertical 1.0
23279       (article 1.0)
23280       (horizontal 4
23281         (group 1.0)
23282         (article 10)))))
23283 @end lisp
23284
23285 You might want to have several frames as well.  No prob---just use the
23286 @code{frame} split:
23287
23288 @lisp
23289 (gnus-configure-frame
23290  '(frame 1.0
23291          (vertical 1.0
23292                    (summary 0.25 point frame-focus)
23293                    (article 1.0))
23294          (vertical ((height . 5) (width . 15)
23295                     (user-position . t)
23296                     (left . -1) (top . 1))
23297                    (picon 1.0))))
23298
23299 @end lisp
23300
23301 This split will result in the familiar summary/article window
23302 configuration in the first (or ``main'') frame, while a small additional
23303 frame will be created where picons will be shown.  As you can see,
23304 instead of the normal @code{1.0} top-level spec, each additional split
23305 should have a frame parameter alist as the size spec.
23306 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
23307 Reference Manual}.  Under XEmacs, a frame property list will be
23308 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
23309 is such a plist.
23310 The list of all possible keys for @code{gnus-buffer-configuration} can
23311 be found in its default value.
23312
23313 Note that the @code{message} key is used for both
23314 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
23315 it is desirable to distinguish between the two, something like this
23316 might be used:
23317
23318 @lisp
23319 (message (horizontal 1.0
23320                      (vertical 1.0 (message 1.0 point))
23321                      (vertical 0.24
23322                                (if (buffer-live-p gnus-summary-buffer)
23323                                    '(summary 0.5))
23324                                (group 1.0))))
23325 @end lisp
23326
23327 One common desire for a multiple frame split is to have a separate frame
23328 for composing mail and news while leaving the original frame intact.  To
23329 accomplish that, something like the following can be done:
23330
23331 @lisp
23332 (message
23333   (frame 1.0
23334          (if (not (buffer-live-p gnus-summary-buffer))
23335              (car (cdr (assoc 'group gnus-buffer-configuration)))
23336            (car (cdr (assoc 'summary gnus-buffer-configuration))))
23337          (vertical ((user-position . t) (top . 1) (left . 1)
23338                     (name . "Message"))
23339                    (message 1.0 point))))
23340 @end lisp
23341
23342 @findex gnus-add-configuration
23343 Since the @code{gnus-buffer-configuration} variable is so long and
23344 complicated, there's a function you can use to ease changing the config
23345 of a single setting: @code{gnus-add-configuration}.  If, for instance,
23346 you want to change the @code{article} setting, you could say:
23347
23348 @lisp
23349 (gnus-add-configuration
23350  '(article (vertical 1.0
23351                (group 4)
23352                (summary .25 point)
23353                (article 1.0))))
23354 @end lisp
23355
23356 You'd typically stick these @code{gnus-add-configuration} calls in your
23357 @file{~/.gnus.el} file or in some startup hook---they should be run after
23358 Gnus has been loaded.
23359
23360 @vindex gnus-always-force-window-configuration
23361 If all windows mentioned in the configuration are already visible, Gnus
23362 won't change the window configuration.  If you always want to force the
23363 ``right'' window configuration, you can set
23364 @code{gnus-always-force-window-configuration} to non-@code{nil}.
23365
23366 If you're using tree displays (@pxref{Tree Display}), and the tree
23367 window is displayed vertically next to another window, you may also want
23368 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
23369 windows resized.
23370
23371 @subsection Example Window Configurations
23372
23373 @itemize @bullet
23374 @item
23375 Narrow left hand side occupied by group buffer.  Right hand side split
23376 between summary buffer (top one-sixth) and article buffer (bottom).
23377
23378 @ifinfo
23379 @example
23380 +---+---------+
23381 | G | Summary |
23382 | r +---------+
23383 | o |         |
23384 | u | Article |
23385 | p |         |
23386 +---+---------+
23387 @end example
23388 @end ifinfo
23389
23390 @lisp
23391 (gnus-add-configuration
23392  '(article
23393    (horizontal 1.0
23394                (vertical 25 (group 1.0))
23395                (vertical 1.0
23396                          (summary 0.16 point)
23397                          (article 1.0)))))
23398
23399 (gnus-add-configuration
23400  '(summary
23401    (horizontal 1.0
23402                (vertical 25 (group 1.0))
23403                (vertical 1.0 (summary 1.0 point)))))
23404 @end lisp
23405
23406 @end itemize
23407
23408
23409 @node Faces and Fonts
23410 @section Faces and Fonts
23411 @cindex faces
23412 @cindex fonts
23413 @cindex colors
23414
23415 Fiddling with fonts and faces used to be very difficult, but these days
23416 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
23417 the face you want to alter, and alter it via the standard Customize
23418 interface.
23419
23420
23421 @node Compilation
23422 @section Compilation
23423 @cindex compilation
23424 @cindex byte-compilation
23425
23426 @findex gnus-compile
23427
23428 Remember all those line format specification variables?
23429 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
23430 on.  Now, Gnus will of course heed whatever these variables are, but,
23431 unfortunately, changing them will mean a quite significant slow-down.
23432 (The default values of these variables have byte-compiled functions
23433 associated with them, while the user-generated versions do not, of
23434 course.)
23435
23436 To help with this, you can run @kbd{M-x gnus-compile} after you've
23437 fiddled around with the variables and feel that you're (kind of)
23438 satisfied.  This will result in the new specs being byte-compiled, and
23439 you'll get top speed again.  Gnus will save these compiled specs in the
23440 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
23441 this function, though---you should compile them yourself by sticking
23442 them into the @file{~/.gnus.el} file and byte-compiling that file.)
23443
23444
23445 @node Mode Lines
23446 @section Mode Lines
23447 @cindex mode lines
23448
23449 @vindex gnus-updated-mode-lines
23450 @code{gnus-updated-mode-lines} says what buffers should keep their mode
23451 lines updated.  It is a list of symbols.  Supported symbols include
23452 @code{group}, @code{article}, @code{summary}, @code{server},
23453 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
23454 Gnus will keep that mode line updated with information that may be
23455 pertinent.  If this variable is @code{nil}, screen refresh may be
23456 quicker.
23457
23458 @cindex display-time
23459
23460 @vindex gnus-mode-non-string-length
23461 By default, Gnus displays information on the current article in the mode
23462 lines of the summary and article buffers.  The information Gnus wishes
23463 to display (e.g. the subject of the article) is often longer than the
23464 mode lines, and therefore have to be cut off at some point.  The
23465 @code{gnus-mode-non-string-length} variable says how long the other
23466 elements on the line is (i.e., the non-info part).  If you put
23467 additional elements on the mode line (e.g. a clock), you should modify
23468 this variable:
23469
23470 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
23471 @lisp
23472 (add-hook 'display-time-hook
23473           (lambda () (setq gnus-mode-non-string-length
23474                            (+ 21
23475                               (if line-number-mode 5 0)
23476                               (if column-number-mode 4 0)
23477                               (length display-time-string)))))
23478 @end lisp
23479
23480 If this variable is @code{nil} (which is the default), the mode line
23481 strings won't be chopped off, and they won't be padded either.  Note
23482 that the default is unlikely to be desirable, as even the percentage
23483 complete in the buffer may be crowded off the mode line; the user should
23484 configure this variable appropriately for her configuration.
23485
23486
23487 @node Highlighting and Menus
23488 @section Highlighting and Menus
23489 @cindex visual
23490 @cindex highlighting
23491 @cindex menus
23492
23493 @vindex gnus-visual
23494 The @code{gnus-visual} variable controls most of the Gnus-prettifying
23495 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
23496 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
23497 file.
23498
23499 This variable can be a list of visual properties that are enabled.  The
23500 following elements are valid, and are all included by default:
23501
23502 @table @code
23503 @item group-highlight
23504 Do highlights in the group buffer.
23505 @item summary-highlight
23506 Do highlights in the summary buffer.
23507 @item article-highlight
23508 Do highlights in the article buffer.
23509 @item highlight
23510 Turn on highlighting in all buffers.
23511 @item group-menu
23512 Create menus in the group buffer.
23513 @item summary-menu
23514 Create menus in the summary buffers.
23515 @item article-menu
23516 Create menus in the article buffer.
23517 @item browse-menu
23518 Create menus in the browse buffer.
23519 @item server-menu
23520 Create menus in the server buffer.
23521 @item score-menu
23522 Create menus in the score buffers.
23523 @item menu
23524 Create menus in all buffers.
23525 @end table
23526
23527 So if you only want highlighting in the article buffer and menus in all
23528 buffers, you could say something like:
23529
23530 @lisp
23531 (setq gnus-visual '(article-highlight menu))
23532 @end lisp
23533
23534 If you want highlighting only and no menus whatsoever, you'd say:
23535
23536 @lisp
23537 (setq gnus-visual '(highlight))
23538 @end lisp
23539
23540 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
23541 in all Gnus buffers.
23542
23543 Other general variables that influence the look of all buffers include:
23544
23545 @table @code
23546 @item gnus-mouse-face
23547 @vindex gnus-mouse-face
23548 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
23549 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
23550
23551 @end table
23552
23553 There are hooks associated with the creation of all the different menus:
23554
23555 @table @code
23556
23557 @item gnus-article-menu-hook
23558 @vindex gnus-article-menu-hook
23559 Hook called after creating the article mode menu.
23560
23561 @item gnus-group-menu-hook
23562 @vindex gnus-group-menu-hook
23563 Hook called after creating the group mode menu.
23564
23565 @item gnus-summary-menu-hook
23566 @vindex gnus-summary-menu-hook
23567 Hook called after creating the summary mode menu.
23568
23569 @item gnus-server-menu-hook
23570 @vindex gnus-server-menu-hook
23571 Hook called after creating the server mode menu.
23572
23573 @item gnus-browse-menu-hook
23574 @vindex gnus-browse-menu-hook
23575 Hook called after creating the browse mode menu.
23576
23577 @item gnus-score-menu-hook
23578 @vindex gnus-score-menu-hook
23579 Hook called after creating the score mode menu.
23580
23581 @end table
23582
23583
23584 @node Buttons
23585 @section Buttons
23586 @cindex buttons
23587 @cindex mouse
23588 @cindex click
23589
23590 Those new-fangled @dfn{mouse} contraptions is very popular with the
23591 young, hep kids who don't want to learn the proper way to do things
23592 these days.  Why, I remember way back in the summer of '89, when I was
23593 using Emacs on a Tops 20 system.  Three hundred users on one single
23594 machine, and every user was running Simula compilers.  Bah!
23595
23596 Right.
23597
23598 @vindex gnus-carpal
23599 Well, you can make Gnus display bufferfuls of buttons you can click to
23600 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
23601 really.  Tell the chiropractor I sent you.
23602
23603
23604 @table @code
23605
23606 @item gnus-carpal-mode-hook
23607 @vindex gnus-carpal-mode-hook
23608 Hook run in all carpal mode buffers.
23609
23610 @item gnus-carpal-button-face
23611 @vindex gnus-carpal-button-face
23612 Face used on buttons.
23613
23614 @item gnus-carpal-header-face
23615 @vindex gnus-carpal-header-face
23616 Face used on carpal buffer headers.
23617
23618 @item gnus-carpal-group-buffer-buttons
23619 @vindex gnus-carpal-group-buffer-buttons
23620 Buttons in the group buffer.
23621
23622 @item gnus-carpal-summary-buffer-buttons
23623 @vindex gnus-carpal-summary-buffer-buttons
23624 Buttons in the summary buffer.
23625
23626 @item gnus-carpal-server-buffer-buttons
23627 @vindex gnus-carpal-server-buffer-buttons
23628 Buttons in the server buffer.
23629
23630 @item gnus-carpal-browse-buffer-buttons
23631 @vindex gnus-carpal-browse-buffer-buttons
23632 Buttons in the browse buffer.
23633 @end table
23634
23635 All the @code{buttons} variables are lists.  The elements in these list
23636 are either cons cells where the @code{car} contains a text to be displayed and
23637 the @code{cdr} contains a function symbol, or a simple string.
23638
23639
23640 @node Daemons
23641 @section Daemons
23642 @cindex demons
23643 @cindex daemons
23644
23645 Gnus, being larger than any program ever written (allegedly), does lots
23646 of strange stuff that you may wish to have done while you're not
23647 present.  For instance, you may want it to check for new mail once in a
23648 while.  Or you may want it to close down all connections to all servers
23649 when you leave Emacs idle.  And stuff like that.
23650
23651 Gnus will let you do stuff like that by defining various
23652 @dfn{handlers}.  Each handler consists of three elements:  A
23653 @var{function}, a @var{time}, and an @var{idle} parameter.
23654
23655 Here's an example of a handler that closes connections when Emacs has
23656 been idle for thirty minutes:
23657
23658 @lisp
23659 (gnus-demon-close-connections nil 30)
23660 @end lisp
23661
23662 Here's a handler that scans for @acronym{PGP} headers every hour when
23663 Emacs is idle:
23664
23665 @lisp
23666 (gnus-demon-scan-pgp 60 t)
23667 @end lisp
23668
23669 This @var{time} parameter and that @var{idle} parameter work together
23670 in a strange, but wonderful fashion.  Basically, if @var{idle} is
23671 @code{nil}, then the function will be called every @var{time} minutes.
23672
23673 If @var{idle} is @code{t}, then the function will be called after
23674 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
23675 the function will never be called.  But once Emacs goes idle, the
23676 function will be called every @var{time} minutes.
23677
23678 If @var{idle} is a number and @var{time} is a number, the function will
23679 be called every @var{time} minutes only when Emacs has been idle for
23680 @var{idle} minutes.
23681
23682 If @var{idle} is a number and @var{time} is @code{nil}, the function
23683 will be called once every time Emacs has been idle for @var{idle}
23684 minutes.
23685
23686 And if @var{time} is a string, it should look like @samp{07:31}, and
23687 the function will then be called once every day somewhere near that
23688 time.  Modified by the @var{idle} parameter, of course.
23689
23690 @vindex gnus-demon-timestep
23691 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
23692 seconds.  This is 60 by default.  If you change that variable,
23693 all the timings in the handlers will be affected.)
23694
23695 So, if you want to add a handler, you could put something like this in
23696 your @file{~/.gnus.el} file:
23697
23698 @findex gnus-demon-add-handler
23699 @lisp
23700 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
23701 @end lisp
23702
23703 @findex gnus-demon-add-nocem
23704 @findex gnus-demon-add-scanmail
23705 @findex gnus-demon-add-rescan
23706 @findex gnus-demon-add-scan-timestamps
23707 @findex gnus-demon-add-disconnection
23708 Some ready-made functions to do this have been created:
23709 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
23710 @code{gnus-demon-add-nntp-close-connection},
23711 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
23712 @code{gnus-demon-add-scanmail}.  Just put those functions in your
23713 @file{~/.gnus.el} if you want those abilities.
23714
23715 @findex gnus-demon-init
23716 @findex gnus-demon-cancel
23717 @vindex gnus-demon-handlers
23718 If you add handlers to @code{gnus-demon-handlers} directly, you should
23719 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
23720 daemons, you can use the @code{gnus-demon-cancel} function.
23721
23722 Note that adding daemons can be pretty naughty if you over do it.  Adding
23723 functions that scan all news and mail from all servers every two seconds
23724 is a sure-fire way of getting booted off any respectable system.  So
23725 behave.
23726
23727
23728 @node NoCeM
23729 @section NoCeM
23730 @cindex nocem
23731 @cindex spam
23732
23733 @dfn{Spamming} is posting the same article lots and lots of times.
23734 Spamming is bad.  Spamming is evil.
23735
23736 Spamming is usually canceled within a day or so by various anti-spamming
23737 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
23738 NoCeM is pronounced ``no see-'em'', and means what the name
23739 implies---these are messages that make the offending articles, like, go
23740 away.
23741
23742 What use are these NoCeM messages if the articles are canceled anyway?
23743 Some sites do not honor cancel messages and some sites just honor cancels
23744 from a select few people.  Then you may wish to make use of the NoCeM
23745 messages, which are distributed in the @samp{alt.nocem.misc} newsgroup.
23746
23747 Gnus can read and parse the messages in this group automatically, and
23748 this will make spam disappear.
23749
23750 There are some variables to customize, of course:
23751
23752 @table @code
23753 @item gnus-use-nocem
23754 @vindex gnus-use-nocem
23755 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
23756 by default.
23757
23758 You can also set this variable to a positive number as a group level.
23759 In that case, Gnus scans NoCeM messages when checking new news if this
23760 value is not exceeding a group level that you specify as the prefix
23761 argument to some commands, e.g. @code{gnus},
23762 @code{gnus-group-get-new-news}, etc.  Otherwise, Gnus does not scan
23763 NoCeM messages if you specify a group level to those commands.  For
23764 example, if you use 1 or 2 on the mail groups and the levels on the news
23765 groups remain the default, 3 is the best choice.
23766
23767 @item gnus-nocem-groups
23768 @vindex gnus-nocem-groups
23769 Gnus will look for NoCeM messages in the groups in this list.  The
23770 default is
23771 @lisp
23772 ("news.lists.filters" "news.admin.net-abuse.bulletins"
23773  "alt.nocem.misc" "news.admin.net-abuse.announce")
23774 @end lisp
23775
23776 @item gnus-nocem-issuers
23777 @vindex gnus-nocem-issuers
23778 There are many people issuing NoCeM messages.  This list says what
23779 people you want to listen to.  The default is
23780 @lisp
23781 ("Automoose-1" "clewis@@ferret.ocunix.on.ca"
23782  "cosmo.roadkill" "SpamHippo" "hweede@@snafu.de")
23783 @end lisp
23784 fine, upstanding citizens all of them.
23785
23786 Known despammers that you can put in this list are listed at@*
23787 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
23788
23789 You do not have to heed NoCeM messages from all these people---just the
23790 ones you want to listen to.  You also don't have to accept all NoCeM
23791 messages from the people you like.  Each NoCeM message has a @dfn{type}
23792 header that gives the message a (more or less, usually less) rigorous
23793 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
23794 @samp{binary}, and @samp{troll}.  To specify this, you have to use
23795 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
23796 Each condition is either a string (which is a regexp that matches types
23797 you want to use) or a list on the form @code{(not @var{string})}, where
23798 @var{string} is a regexp that matches types you don't want to use.
23799
23800 For instance, if you want all NoCeM messages from Chris Lewis except his
23801 @samp{troll} messages, you'd say:
23802
23803 @lisp
23804 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
23805 @end lisp
23806
23807 On the other hand, if you just want nothing but his @samp{spam} and
23808 @samp{spew} messages, you'd say:
23809
23810 @lisp
23811 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
23812 @end lisp
23813
23814 The specs are applied left-to-right.
23815
23816
23817 @item gnus-nocem-verifyer
23818 @vindex gnus-nocem-verifyer
23819 @findex pgg-verify
23820 This should be a function for verifying that the NoCeM issuer is who she
23821 says she is.  The default is @code{pgg-verify}, which returns
23822 non-@code{nil} if the verification is successful, otherwise (including
23823 the case the NoCeM message was not signed) returns @code{nil}.  If this
23824 is too slow and you don't care for verification (which may be dangerous),
23825 you can set this variable to @code{nil}.
23826
23827 Formerly the default was @code{mc-verify}, which is a Mailcrypt
23828 function.  While you can still use it, you can change it into
23829 @code{pgg-verify} running with GnuPG if you are willing to add the
23830 @acronym{PGP} public keys to GnuPG's keyring.
23831
23832 @item gnus-nocem-directory
23833 @vindex gnus-nocem-directory
23834 This is where Gnus will store its NoCeM cache files.  The default is@*
23835 @file{~/News/NoCeM/}.
23836
23837 @item gnus-nocem-expiry-wait
23838 @vindex gnus-nocem-expiry-wait
23839 The number of days before removing old NoCeM entries from the cache.
23840 The default is 15.  If you make it shorter Gnus will be faster, but you
23841 might then see old spam.
23842
23843 @item gnus-nocem-check-from
23844 @vindex gnus-nocem-check-from
23845 Non-@code{nil} means check for valid issuers in message bodies.
23846 Otherwise don't bother fetching articles unless their author matches a
23847 valid issuer; that is much faster if you are selective about the
23848 issuers.
23849
23850 @item gnus-nocem-check-article-limit
23851 @vindex gnus-nocem-check-article-limit
23852 If non-@code{nil}, the maximum number of articles to check in any NoCeM
23853 group.  NoCeM groups can be huge and very slow to process.
23854
23855 @end table
23856
23857 Using NoCeM could potentially be a memory hog.  If you have many living
23858 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
23859 big.  If this is a problem, you should kill off all (or most) of your
23860 unsubscribed groups (@pxref{Subscription Commands}).
23861
23862
23863 @node Undo
23864 @section Undo
23865 @cindex undo
23866
23867 It is very useful to be able to undo actions one has done.  In normal
23868 Emacs buffers, it's easy enough---you just push the @code{undo} button.
23869 In Gnus buffers, however, it isn't that simple.
23870
23871 The things Gnus displays in its buffer is of no value whatsoever to
23872 Gnus---it's all just data designed to look nice to the user.
23873 Killing a group in the group buffer with @kbd{C-k} makes the line
23874 disappear, but that's just a side-effect of the real action---the
23875 removal of the group in question from the internal Gnus structures.
23876 Undoing something like that can't be done by the normal Emacs
23877 @code{undo} function.
23878
23879 Gnus tries to remedy this somewhat by keeping track of what the user
23880 does and coming up with actions that would reverse the actions the user
23881 takes.  When the user then presses the @code{undo} key, Gnus will run
23882 the code to reverse the previous action, or the previous actions.
23883 However, not all actions are easily reversible, so Gnus currently offers
23884 a few key functions to be undoable.  These include killing groups,
23885 yanking groups, and changing the list of read articles of groups.
23886 That's it, really.  More functions may be added in the future, but each
23887 added function means an increase in data to be stored, so Gnus will
23888 never be totally undoable.
23889
23890 @findex gnus-undo-mode
23891 @vindex gnus-use-undo
23892 @findex gnus-undo
23893 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
23894 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
23895 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
23896 command, which should feel kinda like the normal Emacs @code{undo}
23897 command.
23898
23899
23900 @node Predicate Specifiers
23901 @section Predicate Specifiers
23902 @cindex predicate specifiers
23903
23904 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
23905 form that allows flexible specification of predicates without having
23906 to type all that much.
23907
23908 These specifiers are lists consisting of functions, symbols and lists.
23909
23910 Here's an example:
23911
23912 @lisp
23913 (or gnus-article-unseen-p
23914     gnus-article-unread-p)
23915 @end lisp
23916
23917 The available symbols are @code{or}, @code{and} and @code{not}.  The
23918 functions all take one parameter.
23919
23920 @findex gnus-make-predicate
23921 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
23922 to create a function that can be called.  This input parameter to this
23923 function will be passed along to all the functions in the predicate
23924 specifier.
23925
23926
23927 @node Moderation
23928 @section Moderation
23929 @cindex moderation
23930
23931 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
23932 It is not included in the standard Gnus package.  Write a mail to
23933 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
23934 get a copy.
23935
23936 The moderation package is implemented as a minor mode for summary
23937 buffers.  Put
23938
23939 @lisp
23940 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
23941 @end lisp
23942
23943 in your @file{~/.gnus.el} file.
23944
23945 If you are the moderator of @samp{rec.zoofle}, this is how it's
23946 supposed to work:
23947
23948 @enumerate
23949 @item
23950 You split your incoming mail by matching on
23951 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
23952 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
23953
23954 @item
23955 You enter that group once in a while and post articles using the @kbd{e}
23956 (edit-and-post) or @kbd{s} (just send unedited) commands.
23957
23958 @item
23959 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
23960 articles that weren't approved by you, you can cancel them with the
23961 @kbd{c} command.
23962 @end enumerate
23963
23964 To use moderation mode in these two groups, say:
23965
23966 @lisp
23967 (setq gnus-moderated-list
23968       "^nnml:rec.zoofle$\\|^rec.zoofle$")
23969 @end lisp
23970
23971
23972 @node Fetching a Group
23973 @section Fetching a Group
23974 @cindex fetching a group
23975
23976 @findex gnus-fetch-group
23977 It is sometimes convenient to be able to just say ``I want to read this
23978 group and I don't care whether Gnus has been started or not''.  This is
23979 perhaps more useful for people who write code than for users, but the
23980 command @code{gnus-fetch-group} provides this functionality in any case.
23981 It takes the group name as a parameter.
23982
23983
23984 @node Image Enhancements
23985 @section Image Enhancements
23986
23987 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
23988 support images, Emacs 22 does.} and up, are able to display pictures and
23989 stuff, so Gnus has taken advantage of that.
23990
23991 @menu
23992 * X-Face::                      Display a funky, teensy black-and-white image.
23993 * Face::                        Display a funkier, teensier colored image.
23994 * Smileys::                     Show all those happy faces the way they were meant to be shown.
23995 * Picons::                      How to display pictures of what you're reading.
23996 * XVarious::                    Other XEmacsy Gnusey variables.
23997 @end menu
23998
23999
24000 @node X-Face
24001 @subsection X-Face
24002 @cindex x-face
24003
24004 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
24005 depth) image that's supposed to represent the author of the message.
24006 It seems to be supported by an ever-growing number of mail and news
24007 readers.
24008
24009 @cindex x-face
24010 @findex gnus-article-display-x-face
24011 @vindex gnus-article-x-face-command
24012 @vindex gnus-article-x-face-too-ugly
24013 @iftex
24014 @iflatex
24015 \include{xface}
24016 @end iflatex
24017 @end iftex
24018 @c @anchor{X-Face}
24019
24020 Viewing an @code{X-Face} header either requires an Emacs that has
24021 @samp{compface} support (which most XEmacs versions have), or that you
24022 have suitable conversion or display programs installed.  If your Emacs
24023 has image support the default action is to display the face before the
24024 @code{From} header.  If there's no native @code{X-Face} support, Gnus
24025 will try to convert the @code{X-Face} header using external programs
24026 from the @code{pbmplus} package and friends, see below.  For XEmacs it's
24027 faster if XEmacs has been compiled with @code{X-Face} support.  The
24028 default action under Emacs without image support is to fork off the
24029 @code{display} program.
24030
24031 On a GNU/Linux system, the @code{display} program is included in the
24032 ImageMagick package.  For external conversion programs look for packages
24033 with names like @code{netpbm}, @code{libgr-progs} and @code{compface}.
24034 On Windows, you may use the packages @code{netpbm} and @code{compface}
24035 from @url{http://gnuwin32.sourceforge.net}.  You need to add the
24036 @code{bin} directory to your @code{PATH} environment variable.
24037 @c In fact only the following DLLs and binaries seem to be required:
24038 @c compface1.dll uncompface.exe libnetpbm10.dll icontopbm.exe
24039
24040 The variable @code{gnus-article-x-face-command} controls which programs
24041 are used to display the @code{X-Face} header.  If this variable is a
24042 string, this string will be executed in a sub-shell.  If it is a
24043 function, this function will be called with the face as the argument.
24044 If @code{gnus-article-x-face-too-ugly} (which is a regexp) matches the
24045 @code{From} header, the face will not be shown.
24046
24047 (Note: @code{x-face} is used in the variable/function names, not
24048 @code{xface}).
24049
24050 @noindent
24051 Face and variable:
24052
24053 @table @code
24054 @item gnus-x-face
24055 @vindex gnus-x-face
24056 Face to show X-Face.  The colors from this face are used as the
24057 foreground and background colors of the displayed X-Faces.  The
24058 default colors are black and white.
24059
24060 @item gnus-face-properties-alist
24061 @vindex gnus-face-properties-alist
24062 Alist of image types and properties applied to Face (@pxref{Face}) and
24063 X-Face images.  The default value is @code{((pbm . (:face gnus-x-face))
24064 (png . nil))} for Emacs or @code{((xface . (:face gnus-x-face)))} for
24065 XEmacs.  Here are examples:
24066
24067 @lisp
24068 ;; Specify the altitude of Face and X-Face images in the From header.
24069 (setq gnus-face-properties-alist
24070       '((pbm . (:face gnus-x-face :ascent 80))
24071         (png . (:ascent 80))))
24072
24073 ;; Show Face and X-Face images as pressed buttons.
24074 (setq gnus-face-properties-alist
24075       '((pbm . (:face gnus-x-face :relief -2))
24076         (png . (:relief -2))))
24077 @end lisp
24078
24079 @pxref{Image Descriptors, ,Image Descriptors, elisp, The Emacs Lisp
24080 Reference Manual} for the valid properties for various image types.
24081 Currently, @code{pbm} is used for X-Face images and @code{png} is used
24082 for Face images in Emacs.  Only the @code{:face} property is effective
24083 on the @code{xface} image type in XEmacs if it is built with the
24084 @samp{libcompface} library.
24085 @end table
24086
24087 If you use posting styles, you can use an @code{x-face-file} entry in
24088 @code{gnus-posting-styles}, @xref{Posting Styles}.  If you don't, Gnus
24089 provides a few convenience functions and variables to allow easier
24090 insertion of X-Face headers in outgoing messages.  You also need the
24091 above mentioned ImageMagick, netpbm or other image conversion packages
24092 (depending the values of the variables below) for these functions.
24093
24094 @findex gnus-random-x-face
24095 @vindex gnus-convert-pbm-to-x-face-command
24096 @vindex gnus-x-face-directory
24097 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
24098 @code{gnus-x-face-directory} and picks one at random, and then
24099 converts it to the X-Face format by using the
24100 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
24101 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
24102 header data as a string.
24103
24104 @findex gnus-insert-random-x-face-header
24105 @code{gnus-insert-random-x-face-header} calls
24106 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
24107 randomly generated data.
24108
24109 @findex gnus-x-face-from-file
24110 @vindex gnus-convert-image-to-x-face-command
24111 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
24112 converts the file to X-Face format by using the
24113 @code{gnus-convert-image-to-x-face-command} shell command.
24114
24115 Here's how you would typically use the first function.  Put something
24116 like the following in your @file{~/.gnus.el} file:
24117
24118 @lisp
24119 (setq message-required-news-headers
24120       (nconc message-required-news-headers
24121              (list '(X-Face . gnus-random-x-face))))
24122 @end lisp
24123
24124 Using the last function would be something like this:
24125
24126 @lisp
24127 (setq message-required-news-headers
24128       (nconc message-required-news-headers
24129              (list '(X-Face . (lambda ()
24130                                 (gnus-x-face-from-file
24131                                  "~/My-face.gif"))))))
24132 @end lisp
24133
24134
24135 @node Face
24136 @subsection Face
24137 @cindex face
24138
24139 @c #### FIXME: faces and x-faces' implementations should really be harmonized.
24140
24141 @code{Face} headers are essentially a funkier version of @code{X-Face}
24142 ones. They describe a 48x48 pixel colored image that's supposed to
24143 represent the author of the message.
24144
24145 @cindex face
24146 @findex gnus-article-display-face
24147 The contents of a @code{Face} header must be a base64 encoded PNG image.
24148 See @uref{http://quimby.gnus.org/circus/face/} for the precise
24149 specifications.
24150
24151 The @code{gnus-face-properties-alist} variable affects the appearance of
24152 displayed Face images.  @xref{X-Face}.
24153
24154 Viewing an @code{Face} header requires an Emacs that is able to display
24155 PNG images.
24156 @c Maybe add this:
24157 @c (if (featurep 'xemacs)
24158 @c     (featurep 'png)
24159 @c   (image-type-available-p 'png))
24160
24161 Gnus provides a few convenience functions and variables to allow
24162 easier insertion of Face headers in outgoing messages.
24163
24164 @findex gnus-convert-png-to-face
24165 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
24166 726 bytes long, and converts it to a face.
24167
24168 @findex gnus-face-from-file
24169 @vindex gnus-convert-image-to-face-command
24170 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
24171 converts the file to Face format by using the
24172 @code{gnus-convert-image-to-face-command} shell command.
24173
24174 Here's how you would typically use this function. Put something like the
24175 following in your @file{~/.gnus.el} file:
24176
24177 @lisp
24178 (setq message-required-news-headers
24179       (nconc message-required-news-headers
24180              (list '(Face . (lambda ()
24181                               (gnus-face-from-file "~/face.jpg"))))))
24182 @end lisp
24183
24184
24185 @node Smileys
24186 @subsection Smileys
24187 @cindex smileys
24188
24189 @iftex
24190 @iflatex
24191 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
24192 \input{smiley}
24193 @end iflatex
24194 @end iftex
24195
24196 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
24197 currently the only package that uses Smiley, it is documented here.
24198
24199 In short---to use Smiley in Gnus, put the following in your
24200 @file{~/.gnus.el} file:
24201
24202 @lisp
24203 (setq gnus-treat-display-smileys t)
24204 @end lisp
24205
24206 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
24207 the like---to pictures and displays those instead of the text smiley
24208 faces.  The conversion is controlled by a list of regexps that matches
24209 text and maps that to file names.
24210
24211 @vindex smiley-regexp-alist
24212 The alist used is specified by the @code{smiley-regexp-alist}
24213 variable.  The first item in each element is the regexp to be matched;
24214 the second element is the regexp match group that is to be replaced by
24215 the picture; and the third element is the name of the file to be
24216 displayed.
24217
24218 The following variables customize the appearance of the smileys:
24219
24220 @table @code
24221
24222 @item smiley-style
24223 @vindex smiley-style
24224 Specifies the smiley style.  Predefined smiley styles include
24225 @code{low-color} (small 13x14 pixel, three-color images), @code{medium}
24226 (more colorful images, 16x16 pixel), and @code{grayscale} (grayscale
24227 images, 14x14 pixel).  The default depends on the height of the default
24228 face.
24229
24230 @item smiley-data-directory
24231 @vindex smiley-data-directory
24232 Where Smiley will look for smiley faces files.  You shouldn't set this
24233 variable anymore.  Customize @code{smiley-style} instead.
24234
24235 @item gnus-smiley-file-types
24236 @vindex gnus-smiley-file-types
24237 List of suffixes on smiley file names to try.
24238
24239 @end table
24240
24241
24242 @node Picons
24243 @subsection Picons
24244
24245 @iftex
24246 @iflatex
24247 \include{picons}
24248 @end iflatex
24249 @end iftex
24250
24251 So@dots{}  You want to slow down your news reader even more!  This is a
24252 good way to do so.  It's also a great way to impress people staring
24253 over your shoulder as you read news.
24254
24255 What are Picons?  To quote directly from the Picons Web site:
24256
24257 @iftex
24258 @iflatex
24259 \margindex{}
24260 @end iflatex
24261 @end iftex
24262
24263 @quotation
24264 @dfn{Picons} is short for ``personal icons''.  They're small,
24265 constrained images used to represent users and domains on the net,
24266 organized into databases so that the appropriate image for a given
24267 e-mail address can be found.  Besides users and domains, there are picon
24268 databases for Usenet newsgroups and weather forecasts.  The picons are
24269 in either monochrome @code{XBM} format or color @code{XPM} and
24270 @code{GIF} formats.
24271 @end quotation
24272
24273 @vindex gnus-picon-databases
24274 For instructions on obtaining and installing the picons databases,
24275 point your Web browser at
24276 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
24277
24278 If you are using Debian GNU/Linux, saying @samp{apt-get install
24279 picons.*} will install the picons where Gnus can find them.
24280
24281 To enable displaying picons, simply make sure that
24282 @code{gnus-picon-databases} points to the directory containing the
24283 Picons databases.
24284
24285 @vindex gnus-picon-style
24286 The variable @code{gnus-picon-style} controls how picons are displayed.
24287 If @code{inline}, the textual representation is replaced.  If
24288 @code{right}, picons are added right to the textual representation.
24289
24290 The following variables offer control over where things are located.
24291
24292 @table @code
24293
24294 @item gnus-picon-databases
24295 @vindex gnus-picon-databases
24296 The location of the picons database.  This is a list of directories
24297 containing the @file{news}, @file{domains}, @file{users} (and so on)
24298 subdirectories.  Defaults to @code{("/usr/lib/picon"
24299 "/usr/local/faces")}.
24300
24301 @item gnus-picon-news-directories
24302 @vindex gnus-picon-news-directories
24303 List of subdirectories to search in @code{gnus-picon-databases} for
24304 newsgroups faces.  @code{("news")} is the default.
24305
24306 @item gnus-picon-user-directories
24307 @vindex gnus-picon-user-directories
24308 List of subdirectories to search in @code{gnus-picon-databases} for user
24309 faces.  @code{("users" "usenix" "local" "misc")} is the default.
24310
24311 @item gnus-picon-domain-directories
24312 @vindex gnus-picon-domain-directories
24313 List of subdirectories to search in @code{gnus-picon-databases} for
24314 domain name faces.  Defaults to @code{("domains")}.  Some people may
24315 want to add @samp{"unknown"} to this list.
24316
24317 @item gnus-picon-file-types
24318 @vindex gnus-picon-file-types
24319 Ordered list of suffixes on picon file names to try.  Defaults to
24320 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
24321
24322 @end table
24323
24324
24325 @node XVarious
24326 @subsection Various XEmacs Variables
24327
24328 @table @code
24329 @item gnus-xmas-glyph-directory
24330 @vindex gnus-xmas-glyph-directory
24331 This is where Gnus will look for pictures.  Gnus will normally
24332 auto-detect this directory, but you may set it manually if you have an
24333 unusual directory structure.
24334
24335 @item gnus-xmas-modeline-glyph
24336 @vindex gnus-xmas-modeline-glyph
24337 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
24338 default.
24339
24340 @end table
24341
24342 @subsubsection Toolbar
24343
24344 @table @code
24345
24346 @item gnus-use-toolbar
24347 @vindex gnus-use-toolbar
24348 This variable specifies the position to display the toolbar.  If
24349 @code{nil}, don't display toolbars.  If it is non-@code{nil}, it should
24350 be one of the symbols @code{default}, @code{top}, @code{bottom},
24351 @code{right}, and @code{left}.  @code{default} means to use the default
24352 toolbar, the rest mean to display the toolbar on the place which those
24353 names show.  The default is @code{default}.
24354
24355 @item gnus-toolbar-thickness
24356 @vindex gnus-toolbar-thickness
24357 Cons of the height and the width specifying the thickness of a toolbar.
24358 The height is used for the toolbar displayed on the top or the bottom,
24359 the width is used for the toolbar displayed on the right or the left.
24360 The default is that of the default toolbar.
24361
24362 @item gnus-group-toolbar
24363 @vindex gnus-group-toolbar
24364 The toolbar in the group buffer.
24365
24366 @item gnus-summary-toolbar
24367 @vindex gnus-summary-toolbar
24368 The toolbar in the summary buffer.
24369
24370 @item gnus-summary-mail-toolbar
24371 @vindex gnus-summary-mail-toolbar
24372 The toolbar in the summary buffer of mail groups.
24373
24374 @end table
24375
24376 @iftex
24377 @iflatex
24378 \margindex{}
24379 @end iflatex
24380 @end iftex
24381
24382
24383 @node Fuzzy Matching
24384 @section Fuzzy Matching
24385 @cindex fuzzy matching
24386
24387 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
24388 things like scoring, thread gathering and thread comparison.
24389
24390 As opposed to regular expression matching, fuzzy matching is very fuzzy.
24391 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
24392 means, and the implementation has changed over time.
24393
24394 Basically, it tries to remove all noise from lines before comparing.
24395 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
24396 out of the strings before comparing the results.  This often leads to
24397 adequate results---even when faced with strings generated by text
24398 manglers masquerading as newsreaders.
24399
24400
24401 @node Thwarting Email Spam
24402 @section Thwarting Email Spam
24403 @cindex email spam
24404 @cindex spam
24405 @cindex UCE
24406 @cindex unsolicited commercial email
24407
24408 In these last days of the Usenet, commercial vultures are hanging about
24409 and grepping through news like crazy to find email addresses they can
24410 foist off their scams and products to.  As a reaction to this, many
24411 people have started putting nonsense addresses into their @code{From}
24412 lines.  I think this is counterproductive---it makes it difficult for
24413 people to send you legitimate mail in response to things you write, as
24414 well as making it difficult to see who wrote what.  This rewriting may
24415 perhaps be a bigger menace than the unsolicited commercial email itself
24416 in the end.
24417
24418 The biggest problem I have with email spam is that it comes in under
24419 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
24420 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
24421 mail group, only to find two pyramid schemes, seven advertisements
24422 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
24423 and one mail asking me to repent and find some god.
24424
24425 This is annoying.  Here's what you can do about it.
24426
24427 @menu
24428 * The problem of spam::         Some background, and some solutions
24429 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
24430 * SpamAssassin::                How to use external anti-spam tools.
24431 * Hashcash::                    Reduce spam by burning CPU time.
24432 @end menu
24433
24434 @node The problem of spam
24435 @subsection The problem of spam
24436 @cindex email spam
24437 @cindex spam filtering approaches
24438 @cindex filtering approaches, spam
24439 @cindex UCE
24440 @cindex unsolicited commercial email
24441
24442 First, some background on spam.
24443
24444 If you have access to e-mail, you are familiar with spam (technically
24445 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it
24446 exists because e-mail delivery is very cheap compared to paper mail,
24447 so only a very small percentage of people need to respond to an UCE to
24448 make it worthwhile to the advertiser.  Ironically, one of the most
24449 common spams is the one offering a database of e-mail addresses for
24450 further spamming.  Senders of spam are usually called @emph{spammers},
24451 but terms like @emph{vermin}, @emph{scum}, @emph{sociopaths}, and
24452 @emph{morons} are in common use as well.
24453
24454 Spam comes from a wide variety of sources.  It is simply impossible to
24455 dispose of all spam without discarding useful messages.  A good
24456 example is the TMDA system, which requires senders
24457 unknown to you to confirm themselves as legitimate senders before
24458 their e-mail can reach you.  Without getting into the technical side
24459 of TMDA, a downside is clearly that e-mail from legitimate sources may
24460 be discarded if those sources can't or won't confirm themselves
24461 through the TMDA system.  Another problem with TMDA is that it
24462 requires its users to have a basic understanding of e-mail delivery
24463 and processing.
24464
24465 The simplest approach to filtering spam is filtering, at the mail
24466 server or when you sort through incoming mail.  If you get 200 spam
24467 messages per day from @samp{random-address@@vmadmin.com}, you block
24468 @samp{vmadmin.com}.  If you get 200 messages about @samp{VIAGRA}, you
24469 discard all messages with @samp{VIAGRA} in the message.  If you get
24470 lots of spam from Bulgaria, for example, you try to filter all mail
24471 from Bulgarian IPs.
24472
24473 This, unfortunately, is a great way to discard legitimate e-mail.  The
24474 risks of blocking a whole country (Bulgaria, Norway, Nigeria, China,
24475 etc.) or even a continent (Asia, Africa, Europe, etc.) from contacting
24476 you should be obvious, so don't do it if you have the choice.
24477
24478 In another instance, the very informative and useful RISKS digest has
24479 been blocked by overzealous mail filters because it @strong{contained}
24480 words that were common in spam messages.  Nevertheless, in isolated
24481 cases, with great care, direct filtering of mail can be useful.
24482
24483 Another approach to filtering e-mail is the distributed spam
24484 processing, for instance DCC implements such a system.  In essence,
24485 @var{N} systems around the world agree that a machine @var{X} in
24486 Ghana, Estonia, or California is sending out spam e-mail, and these
24487 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into a
24488 database.  The criteria for spam detection vary---it may be the number
24489 of messages sent, the content of the messages, and so on.  When a user
24490 of the distributed processing system wants to find out if a message is
24491 spam, he consults one of those @var{N} systems.
24492
24493 Distributed spam processing works very well against spammers that send
24494 a large number of messages at once, but it requires the user to set up
24495 fairly complicated checks.  There are commercial and free distributed
24496 spam processing systems.  Distributed spam processing has its risks as
24497 well.  For instance legitimate e-mail senders have been accused of
24498 sending spam, and their web sites and mailing lists have been shut
24499 down for some time because of the incident.
24500
24501 The statistical approach to spam filtering is also popular.  It is
24502 based on a statistical analysis of previous spam messages.  Usually
24503 the analysis is a simple word frequency count, with perhaps pairs of
24504 words or 3-word combinations thrown into the mix.  Statistical
24505 analysis of spam works very well in most of the cases, but it can
24506 classify legitimate e-mail as spam in some cases.  It takes time to
24507 run the analysis, the full message must be analyzed, and the user has
24508 to store the database of spam analysis.  Statistical analysis on the
24509 server is gaining popularity.  This has the advantage of letting the
24510 user Just Read Mail, but has the disadvantage that it's harder to tell
24511 the server that it has misclassified mail.
24512
24513 Fighting spam is not easy, no matter what anyone says.  There is no
24514 magic switch that will distinguish Viagra ads from Mom's e-mails.
24515 Even people are having a hard time telling spam apart from non-spam,
24516 because spammers are actively looking to fool us into thinking they
24517 are Mom, essentially.  Spamming is irritating, irresponsible, and
24518 idiotic behavior from a bunch of people who think the world owes them
24519 a favor.  We hope the following sections will help you in fighting the
24520 spam plague.
24521
24522 @node Anti-Spam Basics
24523 @subsection Anti-Spam Basics
24524 @cindex email spam
24525 @cindex spam
24526 @cindex UCE
24527 @cindex unsolicited commercial email
24528
24529 One way of dealing with spam is having Gnus split out all spam into a
24530 @samp{spam} mail group (@pxref{Splitting Mail}).
24531
24532 First, pick one (1) valid mail address that you can be reached at, and
24533 put it in your @code{From} header of all your news articles.  (I've
24534 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
24535 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
24536 sysadmin whether your sendmail installation accepts keywords in the local
24537 part of the mail address.)
24538
24539 @lisp
24540 (setq message-default-news-headers
24541       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
24542 @end lisp
24543
24544 Then put the following split rule in @code{nnmail-split-fancy}
24545 (@pxref{Fancy Mail Splitting}):
24546
24547 @lisp
24548 (...
24549  (to "larsi@@trym.ifi.uio.no"
24550      (| ("subject" "re:.*" "misc")
24551         ("references" ".*@@.*" "misc")
24552         "spam"))
24553  ...)
24554 @end lisp
24555
24556 This says that all mail to this address is suspect, but if it has a
24557 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
24558 header, it's probably ok.  All the rest goes to the @samp{spam} group.
24559 (This idea probably comes from Tim Pierce.)
24560
24561 In addition, many mail spammers talk directly to your @acronym{SMTP} server
24562 and do not include your email address explicitly in the @code{To}
24563 header.  Why they do this is unknown---perhaps it's to thwart this
24564 thwarting scheme?  In any case, this is trivial to deal with---you just
24565 put anything not addressed to you in the @samp{spam} group by ending
24566 your fancy split rule in this way:
24567
24568 @lisp
24569 (
24570  ...
24571  (to "larsi" "misc")
24572  "spam")
24573 @end lisp
24574
24575 In my experience, this will sort virtually everything into the right
24576 group.  You still have to check the @samp{spam} group from time to time to
24577 check for legitimate mail, though.  If you feel like being a good net
24578 citizen, you can even send off complaints to the proper authorities on
24579 each unsolicited commercial email---at your leisure.
24580
24581 This works for me.  It allows people an easy way to contact me (they can
24582 just press @kbd{r} in the usual way), and I'm not bothered at all with
24583 spam.  It's a win-win situation.  Forging @code{From} headers to point
24584 to non-existent domains is yucky, in my opinion.
24585
24586 Be careful with this approach.  Spammers are wise to it.
24587
24588
24589 @node SpamAssassin
24590 @subsection SpamAssassin, Vipul's Razor, DCC, etc
24591 @cindex SpamAssassin
24592 @cindex Vipul's Razor
24593 @cindex DCC
24594
24595 The days where the hints in the previous section were sufficient in
24596 avoiding spam are coming to an end.  There are many tools out there
24597 that claim to reduce the amount of spam you get.  This section could
24598 easily become outdated fast, as new products replace old, but
24599 fortunately most of these tools seem to have similar interfaces.  Even
24600 though this section will use SpamAssassin as an example, it should be
24601 easy to adapt it to most other tools.
24602
24603 Note that this section does not involve the @code{spam.el} package,
24604 which is discussed in the next section.  If you don't care for all
24605 the features of @code{spam.el}, you can make do with these simple
24606 recipes.
24607
24608 If the tool you are using is not installed on the mail server, you
24609 need to invoke it yourself.  Ideas on how to use the
24610 @code{:postscript} mail source parameter (@pxref{Mail Source
24611 Specifiers}) follow.
24612
24613 @lisp
24614 (setq mail-sources
24615       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
24616         (pop :user "jrl"
24617              :server "pophost"
24618              :postscript
24619              "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
24620 @end lisp
24621
24622 Once you manage to process your incoming spool somehow, thus making
24623 the mail contain e.g.@: a header indicating it is spam, you are ready to
24624 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
24625
24626 @lisp
24627 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
24628                              ...))
24629 @end lisp
24630
24631 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
24632
24633 @lisp
24634 (setq nnmail-split-methods 'nnmail-split-fancy
24635       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
24636                              ...))
24637 @end lisp
24638
24639 Some people might not like the idea of piping the mail through various
24640 programs using a @code{:prescript} (if some program is buggy, you
24641 might lose all mail).  If you are one of them, another solution is to
24642 call the external tools during splitting.  Example fancy split method:
24643
24644 @lisp
24645 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
24646                              ...))
24647 (defun kevin-spamassassin ()
24648   (save-excursion
24649     (save-restriction
24650       (widen)
24651       (if (eq 1 (call-process-region (point-min) (point-max)
24652                                      "spamc" nil nil nil "-c"))
24653           "spam"))))
24654 @end lisp
24655
24656 Note that with the nnimap back end, message bodies will not be
24657 downloaded by default.  You need to set
24658 @code{nnimap-split-download-body} to @code{t} to do that
24659 (@pxref{Splitting in IMAP}).
24660
24661 That is about it.  As some spam is likely to get through anyway, you
24662 might want to have a nifty function to call when you happen to read
24663 spam.  And here is the nifty function:
24664
24665 @lisp
24666  (defun my-gnus-raze-spam ()
24667   "Submit SPAM to Vipul's Razor, then mark it as expirable."
24668   (interactive)
24669   (gnus-summary-show-raw-article)
24670   (gnus-summary-save-in-pipe "razor-report -f -d")
24671   (gnus-summary-mark-as-expirable 1))
24672 @end lisp
24673
24674 @node Hashcash
24675 @subsection Hashcash
24676 @cindex hashcash
24677
24678 A novel technique to fight spam is to require senders to do something
24679 costly and demonstrably unique for each message they send.  This has
24680 the obvious drawback that you cannot rely on everyone in the world
24681 using this technique, since it is not part of the Internet standards,
24682 but it may be useful in smaller communities.
24683
24684 While the tools in the previous section work well in practice, they
24685 work only because the tools are constantly maintained and updated as
24686 new form of spam appears.  This means that a small percentage of spam
24687 will always get through.  It also means that somewhere, someone needs
24688 to read lots of spam to update these tools.  Hashcash avoids that, but
24689 instead prefers that everyone you contact through e-mail supports the
24690 scheme.  You can view the two approaches as pragmatic vs dogmatic.
24691 The approaches have their own advantages and disadvantages, but as
24692 often in the real world, a combination of them is stronger than either
24693 one of them separately.
24694
24695 @cindex X-Hashcash
24696 The ``something costly'' is to burn CPU time, more specifically to
24697 compute a hash collision up to a certain number of bits.  The
24698 resulting hashcash cookie is inserted in a @samp{X-Hashcash:} header.
24699 For more details, and for the external application @code{hashcash} you
24700 need to install to use this feature, see
24701 @uref{http://www.hashcash.org/}.  Even more information can be found
24702 at @uref{http://www.camram.org/}.
24703
24704 If you wish to generate hashcash for each message you send, you can
24705 customize @code{message-generate-hashcash} (@pxref{Mail Headers, ,Mail
24706 Headers,message, The Message Manual}), as in:
24707
24708 @lisp
24709 (setq message-generate-hashcash t)
24710 @end lisp
24711
24712 You will need to set up some additional variables as well:
24713
24714 @table @code
24715
24716 @item hashcash-default-payment
24717 @vindex hashcash-default-payment
24718 This variable indicates the default number of bits the hash collision
24719 should consist of.  By default this is 20.  Suggested useful values
24720 include 17 to 29.
24721
24722 @item hashcash-payment-alist
24723 @vindex hashcash-payment-alist
24724 Some receivers may require you to spend burn more CPU time than the
24725 default.  This variable contains a list of @samp{(@var{addr}
24726 @var{amount})} cells, where @var{addr} is the receiver (email address
24727 or newsgroup) and @var{amount} is the number of bits in the collision
24728 that is needed.  It can also contain @samp{(@var{addr} @var{string}
24729 @var{amount})} cells, where the @var{string} is the string to use
24730 (normally the email address or newsgroup name is used).
24731
24732 @item hashcash-path
24733 @vindex hashcash-path
24734 Where the @code{hashcash} binary is installed.  This variable should
24735 be automatically set by @code{executable-find}, but if it's @code{nil}
24736 (usually because the @code{hashcash} binary is not in your path)
24737 you'll get a warning when you check hashcash payments and an error
24738 when you generate hashcash payments.
24739
24740 @end table
24741
24742 Gnus can verify hashcash cookies, although this can also be done by
24743 hand customized mail filtering scripts.  To verify a hashcash cookie
24744 in a message, use the @code{mail-check-payment} function in the
24745 @code{hashcash.el} library.  You can also use the @code{spam.el}
24746 package with the @code{spam-use-hashcash} back end to validate hashcash
24747 cookies in incoming mail and filter mail accordingly (@pxref{Anti-spam
24748 Hashcash Payments}).
24749
24750 @node Spam Package
24751 @section Spam Package
24752 @cindex spam filtering
24753 @cindex spam
24754
24755 The Spam package provides Gnus with a centralized mechanism for
24756 detecting and filtering spam.  It filters new mail, and processes
24757 messages according to whether they are spam or ham.  (@dfn{Ham} is the
24758 name used throughout this manual to indicate non-spam messages.)
24759
24760 @menu
24761 * Spam Package Introduction::
24762 * Filtering Incoming Mail::
24763 * Detecting Spam in Groups::
24764 * Spam and Ham Processors::
24765 * Spam Package Configuration Examples::
24766 * Spam Back Ends::
24767 * Extending the Spam package::
24768 * Spam Statistics Package::
24769 @end menu
24770
24771 @node Spam Package Introduction
24772 @subsection Spam Package Introduction
24773 @cindex spam filtering
24774 @cindex spam filtering sequence of events
24775 @cindex spam
24776
24777 You must read this section to understand how the Spam package works.
24778 Do not skip, speed-read, or glance through this section.
24779
24780 Make sure you read the section on the @code{spam.el} sequence of
24781 events.  See @xref{Extending the Spam package}.
24782
24783 @cindex spam-initialize
24784 @vindex spam-use-stat
24785 To use the Spam package, you @strong{must} first run the function
24786 @code{spam-initialize}:
24787
24788 @example
24789 (spam-initialize)
24790 @end example
24791
24792 This autoloads @code{spam.el} and installs the various hooks necessary
24793 to let the Spam package do its job.  In order to make use of the Spam
24794 package, you have to set up certain group parameters and variables,
24795 which we will describe below.  All of the variables controlling the
24796 Spam package can be found in the @samp{spam} customization group.
24797
24798 There are two ``contact points'' between the Spam package and the rest
24799 of Gnus: checking new mail for spam, and leaving a group.
24800
24801 Checking new mail for spam is done in one of two ways: while splitting
24802 incoming mail, or when you enter a group.
24803
24804 The first way, checking for spam while splitting incoming mail, is
24805 suited to mail back ends such as @code{nnml} or @code{nnimap}, where
24806 new mail appears in a single spool file.  The Spam package processes
24807 incoming mail, and sends mail considered to be spam to a designated
24808 ``spam'' group.  @xref{Filtering Incoming Mail}.
24809
24810 The second way is suited to back ends such as @code{nntp}, which have
24811 no incoming mail spool, or back ends where the server is in charge of
24812 splitting incoming mail.  In this case, when you enter a Gnus group,
24813 the unseen or unread messages in that group are checked for spam.
24814 Detected spam messages are marked as spam.  @xref{Detecting Spam in
24815 Groups}.
24816
24817 @cindex spam back ends
24818 In either case, you have to tell the Spam package what method to use
24819 to detect spam messages.  There are several methods, or @dfn{spam back
24820 ends} (not to be confused with Gnus back ends!) to choose from: spam
24821 ``blacklists'' and ``whitelists'', dictionary-based filters, and so
24822 forth.  @xref{Spam Back Ends}.
24823
24824 In the Gnus summary buffer, messages that have been identified as spam
24825 always appear with a @samp{$} symbol.
24826
24827 The Spam package divides Gnus groups into three categories: ham
24828 groups, spam groups, and unclassified groups.  You should mark each of
24829 the groups you subscribe to as either a ham group or a spam group,
24830 using the @code{spam-contents} group parameter (@pxref{Group
24831 Parameters}).  Spam groups have a special property: when you enter a
24832 spam group, all unseen articles are marked as spam.  Thus, mail split
24833 into a spam group is automatically marked as spam.
24834
24835 Identifying spam messages is only half of the Spam package's job.  The
24836 second half comes into play whenever you exit a group buffer.  At this
24837 point, the Spam package does several things:
24838
24839 First, it calls @dfn{spam and ham processors} to process the articles
24840 according to whether they are spam or ham.  There is a pair of spam
24841 and ham processors associated with each spam back end, and what the
24842 processors do depends on the back end.  At present, the main role of
24843 spam and ham processors is for dictionary-based spam filters: they add
24844 the contents of the messages in the group to the filter's dictionary,
24845 to improve its ability to detect future spam.  The @code{spam-process}
24846 group parameter specifies what spam processors to use.  @xref{Spam and
24847 Ham Processors}.
24848
24849 If the spam filter failed to mark a spam message, you can mark it
24850 yourself, so that the message is processed as spam when you exit the
24851 group:
24852
24853 @table @kbd
24854 @item M-d
24855 @itemx M s x
24856 @itemx S x
24857 @kindex M-d
24858 @kindex S x
24859 @kindex M s x
24860 @findex gnus-summary-mark-as-spam
24861 @findex gnus-summary-mark-as-spam
24862 Mark current article as spam, showing it with the @samp{$} mark
24863 (@code{gnus-summary-mark-as-spam}).
24864 @end table
24865
24866 @noindent
24867 Similarly, you can unmark an article if it has been erroneously marked
24868 as spam.  @xref{Setting Marks}.
24869
24870 Normally, a ham message found in a non-ham group is not processed as
24871 ham---the rationale is that it should be moved into a ham group for
24872 further processing (see below).  However, you can force these articles
24873 to be processed as ham by setting
24874 @code{spam-process-ham-in-spam-groups} and
24875 @code{spam-process-ham-in-nonham-groups}.
24876
24877 @vindex gnus-ham-process-destinations
24878 @vindex gnus-spam-process-destinations
24879 The second thing that the Spam package does when you exit a group is
24880 to move ham articles out of spam groups, and spam articles out of ham
24881 groups.  Ham in a spam group is moved to the group specified by the
24882 variable @code{gnus-ham-process-destinations}, or the group parameter
24883 @code{ham-process-destination}.  Spam in a ham group is moved to the
24884 group specified by the variable @code{gnus-spam-process-destinations},
24885 or the group parameter @code{spam-process-destination}.  If these
24886 variables are not set, the articles are left in their current group.
24887 If an article cannot be moved (e.g., with a read-only backend such
24888 as @acronym{NNTP}), it is copied.
24889
24890 If an article is moved to another group, it is processed again when
24891 you visit the new group.  Normally, this is not a problem, but if you
24892 want each article to be processed only once, load the
24893 @code{gnus-registry.el} package and set the variable
24894 @code{spam-log-to-registry} to @code{t}.  @xref{Spam Package
24895 Configuration Examples}.
24896
24897 Normally, spam groups ignore @code{gnus-spam-process-destinations}.
24898 However, if you set @code{spam-move-spam-nonspam-groups-only} to
24899 @code{nil}, spam will also be moved out of spam groups, depending on
24900 the @code{spam-process-destination} parameter.
24901
24902 The final thing the Spam package does is to mark spam articles as
24903 expired, which is usually the right thing to do.
24904
24905 If all this seems confusing, don't worry.  Soon it will be as natural
24906 as typing Lisp one-liners on a neural interface@dots{} err, sorry, that's
24907 50 years in the future yet.  Just trust us, it's not so bad.
24908
24909 @node Filtering Incoming Mail
24910 @subsection Filtering Incoming Mail
24911 @cindex spam filtering
24912 @cindex spam filtering incoming mail
24913 @cindex spam
24914
24915 To use the Spam package to filter incoming mail, you must first set up
24916 fancy mail splitting.  @xref{Fancy Mail Splitting}.  The Spam package
24917 defines a special splitting function that you can add to your fancy
24918 split variable (either @code{nnmail-split-fancy} or
24919 @code{nnimap-split-fancy}, depending on your mail back end):
24920
24921 @example
24922 (: spam-split)
24923 @end example
24924
24925 @vindex spam-split-group
24926 @noindent
24927 The @code{spam-split} function scans incoming mail according to your
24928 chosen spam back end(s), and sends messages identified as spam to a
24929 spam group.  By default, the spam group is a group named @samp{spam},
24930 but you can change this by customizing @code{spam-split-group}.  Make
24931 sure the contents of @code{spam-split-group} are an unqualified group
24932 name.  For instance, in an @code{nnimap} server @samp{your-server},
24933 the value @samp{spam} means @samp{nnimap+your-server:spam}.  The value
24934 @samp{nnimap+server:spam} is therefore wrong---it gives the group
24935 @samp{nnimap+your-server:nnimap+server:spam}.
24936
24937 @code{spam-split} does not modify the contents of messages in any way.
24938
24939 @vindex nnimap-split-download-body
24940 Note for IMAP users: if you use the @code{spam-check-bogofilter},
24941 @code{spam-check-ifile}, and @code{spam-check-stat} spam back ends,
24942 you should also set set the variable @code{nnimap-split-download-body}
24943 to @code{t}.  These spam back ends are most useful when they can
24944 ``scan'' the full message body.  By default, the nnimap back end only
24945 retrieves the message headers; @code{nnimap-split-download-body} tells
24946 it to retrieve the message bodies as well.  We don't set this by
24947 default because it will slow @acronym{IMAP} down, and that is not an
24948 appropriate decision to make on behalf of the user.  @xref{Splitting
24949 in IMAP}.
24950
24951 You have to specify one or more spam back ends for @code{spam-split}
24952 to use, by setting the @code{spam-use-*} variables.  @xref{Spam Back
24953 Ends}.  Normally, @code{spam-split} simply uses all the spam back ends
24954 you enabled in this way.  However, you can tell @code{spam-split} to
24955 use only some of them.  Why this is useful?  Suppose you are using the
24956 @code{spam-use-regex-headers} and @code{spam-use-blackholes} spam back
24957 ends, and the following split rule:
24958
24959 @example
24960  nnimap-split-fancy '(|
24961                       (any "ding" "ding")
24962                       (: spam-split)
24963                       ;; @r{default mailbox}
24964                       "mail")
24965 @end example
24966
24967 @noindent
24968 The problem is that you want all ding messages to make it to the ding
24969 folder.  But that will let obvious spam (for example, spam detected by
24970 SpamAssassin, and @code{spam-use-regex-headers}) through, when it's
24971 sent to the ding list.  On the other hand, some messages to the ding
24972 list are from a mail server in the blackhole list, so the invocation
24973 of @code{spam-split} can't be before the ding rule.
24974
24975 The solution is to let SpamAssassin headers supersede ding rules, and
24976 perform the other @code{spam-split} rules (including a second
24977 invocation of the regex-headers check) after the ding rule.  This is
24978 done by passing a parameter to @code{spam-split}:
24979
24980 @example
24981 nnimap-split-fancy
24982       '(|
24983         ;; @r{spam detected by @code{spam-use-regex-headers} goes to @samp{regex-spam}}
24984         (: spam-split "regex-spam" 'spam-use-regex-headers)
24985         (any "ding" "ding")
24986         ;; @r{all other spam detected by spam-split goes to @code{spam-split-group}}
24987         (: spam-split)
24988         ;; @r{default mailbox}
24989         "mail")
24990 @end example
24991
24992 @noindent
24993 This lets you invoke specific @code{spam-split} checks depending on
24994 your particular needs, and target the results of those checks to a
24995 particular spam group.  You don't have to throw all mail into all the
24996 spam tests.  Another reason why this is nice is that messages to
24997 mailing lists you have rules for don't have to have resource-intensive
24998 blackhole checks performed on them.  You could also specify different
24999 spam checks for your nnmail split vs. your nnimap split.  Go crazy.
25000
25001 You should set the @code{spam-use-*} variables for whatever spam back
25002 ends you intend to use.  The reason is that when loading
25003 @file{spam.el}, some conditional loading is done depending on what
25004 @code{spam-use-xyz} variables you have set.  @xref{Spam Back Ends}.
25005
25006 @c @emph{TODO: spam.el needs to provide a uniform way of training all the
25007 @c statistical databases.  Some have that functionality built-in, others
25008 @c don't.}
25009
25010 @node Detecting Spam in Groups
25011 @subsection Detecting Spam in Groups
25012
25013 To detect spam when visiting a group, set the group's
25014 @code{spam-autodetect} and @code{spam-autodetect-methods} group
25015 parameters.  These are accessible with @kbd{G c} or @kbd{G p}, as
25016 usual (@pxref{Group Parameters}).
25017
25018 You should set the @code{spam-use-*} variables for whatever spam back
25019 ends you intend to use.  The reason is that when loading
25020 @file{spam.el}, some conditional loading is done depending on what
25021 @code{spam-use-xyz} variables you have set.
25022
25023 By default, only unseen articles are processed for spam.  You can
25024 force Gnus to recheck all messages in the group by setting the
25025 variable @code{spam-autodetect-recheck-messages} to @code{t}.
25026
25027 If you use the @code{spam-autodetect} method of checking for spam, you
25028 can specify different spam detection methods for different groups.
25029 For instance, the @samp{ding} group may have @code{spam-use-BBDB} as
25030 the autodetection method, while the @samp{suspect} group may have the
25031 @code{spam-use-blacklist} and @code{spam-use-bogofilter} methods
25032 enabled.  Unlike with @code{spam-split}, you don't have any control
25033 over the @emph{sequence} of checks, but this is probably unimportant.
25034
25035 @node Spam and Ham Processors
25036 @subsection Spam and Ham Processors
25037 @cindex spam filtering
25038 @cindex spam filtering variables
25039 @cindex spam variables
25040 @cindex spam
25041
25042 @vindex gnus-spam-process-newsgroups
25043 Spam and ham processors specify special actions to take when you exit
25044 a group buffer.  Spam processors act on spam messages, and ham
25045 processors on ham messages.  At present, the main role of these
25046 processors is to update the dictionaries of dictionary-based spam back
25047 ends such as Bogofilter (@pxref{Bogofilter}) and the Spam Statistics
25048 package (@pxref{Spam Statistics Filtering}).
25049
25050 The spam and ham processors that apply to each group are determined by
25051 the group's@code{spam-process} group parameter.  If this group
25052 parameter is not defined, they are determined by the variable
25053 @code{gnus-spam-process-newsgroups}.
25054
25055 @vindex gnus-spam-newsgroup-contents
25056 Gnus learns from the spam you get.  You have to collect your spam in
25057 one or more spam groups, and set or customize the variable
25058 @code{spam-junk-mailgroups} as appropriate.  You can also declare
25059 groups to contain spam by setting their group parameter
25060 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
25061 by customizing the corresponding variable
25062 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
25063 parameter and the @code{gnus-spam-newsgroup-contents} variable can
25064 also be used to declare groups as @emph{ham} groups if you set their
25065 classification to @code{gnus-group-spam-classification-ham}.  If
25066 groups are not classified by means of @code{spam-junk-mailgroups},
25067 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
25068 considered @emph{unclassified}.  All groups are unclassified by
25069 default.
25070
25071 @vindex gnus-spam-mark
25072 @cindex $
25073 In spam groups, all messages are considered to be spam by default:
25074 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
25075 group.  If you have seen a message, had it marked as spam, then
25076 unmarked it, it won't be marked as spam when you enter the group
25077 thereafter.  You can disable that behavior, so all unread messages
25078 will get the @samp{$} mark, if you set the
25079 @code{spam-mark-only-unseen-as-spam} parameter to @code{nil}.  You
25080 should remove the @samp{$} mark when you are in the group summary
25081 buffer for every message that is not spam after all.  To remove the
25082 @samp{$} mark, you can use @kbd{M-u} to ``unread'' the article, or
25083 @kbd{d} for declaring it read the non-spam way.  When you leave a
25084 group, all spam-marked (@samp{$}) articles are sent to a spam
25085 processor which will study them as spam samples.
25086
25087 Messages may also be deleted in various other ways, and unless
25088 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
25089 and @samp{r} for default read or explicit delete, marks @samp{X} and
25090 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
25091 low scores, are all considered to be associated with articles which
25092 are not spam.  This assumption might be false, in particular if you
25093 use kill files or score files as means for detecting genuine spam, you
25094 should then adjust the @code{ham-marks} group parameter.
25095
25096 @defvar ham-marks
25097 You can customize this group or topic parameter to be the list of
25098 marks you want to consider ham.  By default, the list contains the
25099 deleted, read, killed, kill-filed, and low-score marks (the idea is
25100 that these articles have been read, but are not spam).  It can be
25101 useful to also include the tick mark in the ham marks.  It is not
25102 recommended to make the unread mark a ham mark, because it normally
25103 indicates a lack of classification.  But you can do it, and we'll be
25104 happy for you.
25105 @end defvar
25106
25107 @defvar spam-marks
25108 You can customize this group or topic parameter to be the list of
25109 marks you want to consider spam.  By default, the list contains only
25110 the spam mark.  It is not recommended to change that, but you can if
25111 you really want to.
25112 @end defvar
25113
25114 When you leave @emph{any} group, regardless of its
25115 @code{spam-contents} classification, all spam-marked articles are sent
25116 to a spam processor, which will study these as spam samples.  If you
25117 explicit kill a lot, you might sometimes end up with articles marked
25118 @samp{K} which you never saw, and which might accidentally contain
25119 spam.  Best is to make sure that real spam is marked with @samp{$},
25120 and nothing else.
25121
25122 @vindex gnus-ham-process-destinations
25123 When you leave a @emph{spam} group, all spam-marked articles are
25124 marked as expired after processing with the spam processor.  This is
25125 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
25126 @strong{ham} articles in a spam group will be moved to a location
25127 determined by either the @code{ham-process-destination} group
25128 parameter or a match in the @code{gnus-ham-process-destinations}
25129 variable, which is a list of regular expressions matched with group
25130 names (it's easiest to customize this variable with @kbd{M-x
25131 customize-variable @key{RET} gnus-ham-process-destinations}).  Each
25132 group name list is a standard Lisp list, if you prefer to customize
25133 the variable manually.  If the @code{ham-process-destination}
25134 parameter is not set, ham articles are left in place.  If the
25135 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
25136 set, the ham articles are marked as unread before being moved.
25137
25138 If ham can not be moved---because of a read-only back end such as
25139 @acronym{NNTP}, for example, it will be copied.
25140
25141 Note that you can use multiples destinations per group or regular
25142 expression!  This enables you to send your ham to a regular mail
25143 group and to a @emph{ham training} group.
25144
25145 When you leave a @emph{ham} group, all ham-marked articles are sent to
25146 a ham processor, which will study these as non-spam samples.
25147
25148 @vindex spam-process-ham-in-spam-groups
25149 By default the variable @code{spam-process-ham-in-spam-groups} is
25150 @code{nil}.  Set it to @code{t} if you want ham found in spam groups
25151 to be processed.  Normally this is not done, you are expected instead
25152 to send your ham to a ham group and process it there.
25153
25154 @vindex spam-process-ham-in-nonham-groups
25155 By default the variable @code{spam-process-ham-in-nonham-groups} is
25156 @code{nil}.  Set it to @code{t} if you want ham found in non-ham (spam
25157 or unclassified) groups to be processed.  Normally this is not done,
25158 you are expected instead to send your ham to a ham group and process
25159 it there.
25160
25161 @vindex gnus-spam-process-destinations
25162 When you leave a @emph{ham} or @emph{unclassified} group, all
25163 @strong{spam} articles are moved to a location determined by either
25164 the @code{spam-process-destination} group parameter or a match in the
25165 @code{gnus-spam-process-destinations} variable, which is a list of
25166 regular expressions matched with group names (it's easiest to
25167 customize this variable with @kbd{M-x customize-variable @key{RET}
25168 gnus-spam-process-destinations}).  Each group name list is a standard
25169 Lisp list, if you prefer to customize the variable manually.  If the
25170 @code{spam-process-destination} parameter is not set, the spam
25171 articles are only expired.  The group name is fully qualified, meaning
25172 that if you see @samp{nntp:servername} before the group name in the
25173 group buffer then you need it here as well.
25174
25175 If spam can not be moved---because of a read-only back end such as
25176 @acronym{NNTP}, for example, it will be copied.
25177
25178 Note that you can use multiples destinations per group or regular
25179 expression!  This enables you to send your spam to multiple @emph{spam
25180 training} groups.
25181
25182 @vindex spam-log-to-registry
25183 The problem with processing ham and spam is that Gnus doesn't track
25184 this processing by default.  Enable the @code{spam-log-to-registry}
25185 variable so @code{spam.el} will use @code{gnus-registry.el} to track
25186 what articles have been processed, and avoid processing articles
25187 multiple times.  Keep in mind that if you limit the number of registry
25188 entries, this won't work as well as it does without a limit.
25189
25190 @vindex spam-mark-only-unseen-as-spam
25191 Set this variable if you want only unseen articles in spam groups to
25192 be marked as spam.  By default, it is set.  If you set it to
25193 @code{nil}, unread articles will also be marked as spam.
25194
25195 @vindex spam-mark-ham-unread-before-move-from-spam-group
25196 Set this variable if you want ham to be unmarked before it is moved
25197 out of the spam group.  This is very useful when you use something
25198 like the tick mark @samp{!} to mark ham---the article will be placed
25199 in your @code{ham-process-destination}, unmarked as if it came fresh
25200 from the mail server.
25201
25202 @vindex spam-autodetect-recheck-messages
25203 When autodetecting spam, this variable tells @code{spam.el} whether
25204 only unseen articles or all unread articles should be checked for
25205 spam.  It is recommended that you leave it off.
25206
25207 @node Spam Package Configuration Examples
25208 @subsection Spam Package Configuration Examples
25209 @cindex spam filtering
25210 @cindex spam filtering configuration examples
25211 @cindex spam configuration examples
25212 @cindex spam
25213
25214 @subsubheading Ted's setup
25215
25216 From Ted Zlatanov <tzz@@lifelogs.com>.
25217 @example
25218 ;; @r{for @code{gnus-registry-split-fancy-with-parent} and spam autodetection}
25219 ;; @r{see @file{gnus-registry.el} for more information}
25220 (gnus-registry-initialize)
25221 (spam-initialize)
25222
25223 (setq
25224  spam-log-to-registry t     ; @r{for spam autodetection}
25225  spam-use-BBDB t
25226  spam-use-regex-headers t   ; @r{catch X-Spam-Flag (SpamAssassin)}
25227  ;; @r{all groups with @samp{spam} in the name contain spam}
25228  gnus-spam-newsgroup-contents
25229   '(("spam" gnus-group-spam-classification-spam))
25230  ;; @r{see documentation for these}
25231  spam-move-spam-nonspam-groups-only nil
25232  spam-mark-only-unseen-as-spam t
25233  spam-mark-ham-unread-before-move-from-spam-group t
25234  nnimap-split-rule 'nnimap-split-fancy
25235  ;; @r{understand what this does before you copy it to your own setup!}
25236  nnimap-split-fancy '(|
25237                       ;; @r{trace references to parents and put in their group}
25238                       (: gnus-registry-split-fancy-with-parent)
25239                       ;; @r{this will catch server-side SpamAssassin tags}
25240                       (: spam-split 'spam-use-regex-headers)
25241                       (any "ding" "ding")
25242                       ;; @r{note that spam by default will go to @samp{spam}}
25243                       (: spam-split)
25244                       ;; @r{default mailbox}
25245                       "mail"))
25246
25247 ;; @r{my parameters, set with @kbd{G p}}
25248
25249 ;; @r{all nnml groups, and all nnimap groups except}
25250 ;; @r{@samp{nnimap+mail.lifelogs.com:train} and}
25251 ;; @r{@samp{nnimap+mail.lifelogs.com:spam}: any spam goes to nnimap training,}
25252 ;; @r{because it must have been detected manually}
25253
25254 ((spam-process-destination . "nnimap+mail.lifelogs.com:train"))
25255
25256 ;; @r{all @acronym{NNTP} groups}
25257 ;; @r{autodetect spam with the blacklist and ham with the BBDB}
25258 ((spam-autodetect-methods spam-use-blacklist spam-use-BBDB)
25259 ;; @r{send all spam to the training group}
25260  (spam-process-destination . "nnimap+mail.lifelogs.com:train"))
25261
25262 ;; @r{only some @acronym{NNTP} groups, where I want to autodetect spam}
25263 ((spam-autodetect . t))
25264
25265 ;; @r{my nnimap @samp{nnimap+mail.lifelogs.com:spam} group}
25266
25267 ;; @r{this is a spam group}
25268 ((spam-contents gnus-group-spam-classification-spam)
25269
25270  ;; @r{any spam (which happens when I enter for all unseen messages,}
25271  ;; @r{because of the @code{gnus-spam-newsgroup-contents} setting above), goes to}
25272  ;; @r{@samp{nnimap+mail.lifelogs.com:train} unless I mark it as ham}
25273
25274  (spam-process-destination "nnimap+mail.lifelogs.com:train")
25275
25276  ;; @r{any ham goes to my @samp{nnimap+mail.lifelogs.com:mail} folder, but}
25277  ;; @r{also to my @samp{nnimap+mail.lifelogs.com:trainham} folder for training}
25278
25279  (ham-process-destination "nnimap+mail.lifelogs.com:mail"
25280                           "nnimap+mail.lifelogs.com:trainham")
25281  ;; @r{in this group, only @samp{!} marks are ham}
25282  (ham-marks
25283   (gnus-ticked-mark))
25284  ;; @r{remembers senders in the blacklist on the way out---this is}
25285  ;; @r{definitely not needed, it just makes me feel better}
25286  (spam-process (gnus-group-spam-exit-processor-blacklist)))
25287
25288 ;; @r{Later, on the @acronym{IMAP} server I use the @samp{train} group for training}
25289 ;; @r{SpamAssassin to recognize spam, and the @samp{trainham} group fora}
25290 ;; @r{recognizing ham---but Gnus has nothing to do with it.}
25291
25292 @end example
25293
25294 @subsubheading Using @code{spam.el} on an IMAP server with a statistical filter on the server
25295 From Reiner Steib <reiner.steib@@gmx.de>.
25296
25297 My provider has set up bogofilter (in combination with @acronym{DCC}) on
25298 the mail server (@acronym{IMAP}).  Recognized spam goes to
25299 @samp{spam.detected}, the rest goes through the normal filter rules,
25300 i.e. to @samp{some.folder} or to @samp{INBOX}.  Training on false
25301 positives or negatives is done by copying or moving the article to
25302 @samp{training.ham} or @samp{training.spam} respectively.  A cron job on
25303 the server feeds those to bogofilter with the suitable ham or spam
25304 options and deletes them from the @samp{training.ham} and
25305 @samp{training.spam} folders.
25306
25307 With the following entries in @code{gnus-parameters}, @code{spam.el}
25308 does most of the job for me:
25309
25310 @lisp
25311    ("nnimap:spam\\.detected"
25312     (gnus-article-sort-functions '(gnus-article-sort-by-chars))
25313     (ham-process-destination "nnimap:INBOX" "nnimap:training.ham")
25314     (spam-contents gnus-group-spam-classification-spam))
25315    ("nnimap:\\(INBOX\\|other-folders\\)"
25316     (spam-process-destination . "nnimap:training.spam")
25317     (spam-contents gnus-group-spam-classification-ham))
25318 @end lisp
25319
25320 @itemize
25321
25322 @item @b{The Spam folder:}
25323
25324 In the folder @samp{spam.detected}, I have to check for false positives
25325 (i.e. legitimate mails, that were wrongly judged as spam by
25326 bogofilter or DCC).
25327
25328 Because of the @code{gnus-group-spam-classification-spam} entry, all
25329 messages are marked as spam (with @code{$}).  When I find a false
25330 positive, I mark the message with some other ham mark
25331 (@code{ham-marks}, @ref{Spam and Ham Processors}).  On group exit,
25332 those messages are copied to both groups, @samp{INBOX} (where I want
25333 to have the article) and @samp{training.ham} (for training bogofilter)
25334 and deleted from the @samp{spam.detected} folder.
25335
25336 The @code{gnus-article-sort-by-chars} entry simplifies detection of
25337 false positives for me.  I receive lots of worms (sweN, @dots{}), that all
25338 have a similar size.  Grouping them by size (i.e. chars) makes finding
25339 other false positives easier.  (Of course worms aren't @i{spam}
25340 (@acronym{UCE}, @acronym{UBE}) strictly speaking.  Anyhow, bogofilter is
25341 an excellent tool for filtering those unwanted mails for me.)
25342
25343 @item @b{Ham folders:}
25344
25345 In my ham folders, I just hit @kbd{S x}
25346 (@code{gnus-summary-mark-as-spam}) whenever I see an unrecognized spam
25347 mail (false negative).  On group exit, those messages are moved to
25348 @samp{training.spam}.
25349 @end itemize
25350
25351 @subsubheading Reporting spam articles in Gmane groups with @code{spam-report.el}
25352
25353 From Reiner Steib <reiner.steib@@gmx.de>.
25354
25355 With following entry in @code{gnus-parameters}, @kbd{S x}
25356 (@code{gnus-summary-mark-as-spam}) marks articles in @code{gmane.*}
25357 groups as spam and reports the to Gmane at group exit:
25358
25359 @lisp
25360    ("^gmane\\."
25361     (spam-process (gnus-group-spam-exit-processor-report-gmane)))
25362 @end lisp
25363
25364 Additionally, I use @code{(setq spam-report-gmane-use-article-number nil)}
25365 because I don't read the groups directly from news.gmane.org, but
25366 through my local news server (leafnode).  I.e. the article numbers are
25367 not the same as on news.gmane.org, thus @code{spam-report.el} has to check
25368 the @code{X-Report-Spam} header to find the correct number.
25369
25370 @node Spam Back Ends
25371 @subsection Spam Back Ends
25372 @cindex spam back ends
25373
25374 The spam package offers a variety of back ends for detecting spam.
25375 Each back end defines a set of methods for detecting spam
25376 (@pxref{Filtering Incoming Mail}, @pxref{Detecting Spam in Groups}),
25377 and a pair of spam and ham processors (@pxref{Spam and Ham
25378 Processors}).
25379
25380 @menu
25381 * Blacklists and Whitelists::
25382 * BBDB Whitelists::
25383 * Gmane Spam Reporting::
25384 * Anti-spam Hashcash Payments::
25385 * Blackholes::
25386 * Regular Expressions Header Matching::
25387 * Bogofilter::
25388 * SpamAssassin back end::
25389 * ifile spam filtering::
25390 * Spam Statistics Filtering::
25391 * SpamOracle::
25392 @end menu
25393
25394 @node Blacklists and Whitelists
25395 @subsubsection Blacklists and Whitelists
25396 @cindex spam filtering
25397 @cindex whitelists, spam filtering
25398 @cindex blacklists, spam filtering
25399 @cindex spam
25400
25401 @defvar spam-use-blacklist
25402
25403 Set this variable to @code{t} if you want to use blacklists when
25404 splitting incoming mail.  Messages whose senders are in the blacklist
25405 will be sent to the @code{spam-split-group}.  This is an explicit
25406 filter, meaning that it acts only on mail senders @emph{declared} to
25407 be spammers.
25408
25409 @end defvar
25410
25411 @defvar spam-use-whitelist
25412
25413 Set this variable to @code{t} if you want to use whitelists when
25414 splitting incoming mail.  Messages whose senders are not in the
25415 whitelist will be sent to the next spam-split rule.  This is an
25416 explicit filter, meaning that unless someone is in the whitelist, their
25417 messages are not assumed to be spam or ham.
25418
25419 @end defvar
25420
25421 @defvar spam-use-whitelist-exclusive
25422
25423 Set this variable to @code{t} if you want to use whitelists as an
25424 implicit filter, meaning that every message will be considered spam
25425 unless the sender is in the whitelist.  Use with care.
25426
25427 @end defvar
25428
25429 @defvar gnus-group-spam-exit-processor-blacklist
25430
25431 Add this symbol to a group's @code{spam-process} parameter by
25432 customizing the group parameters or the
25433 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25434 added to a group's @code{spam-process} parameter, the senders of
25435 spam-marked articles will be added to the blacklist.
25436
25437 @emph{WARNING}
25438
25439 Instead of the obsolete
25440 @code{gnus-group-spam-exit-processor-blacklist}, it is recommended
25441 that you use @code{(spam spam-use-blacklist)}.  Everything will work
25442 the same way, we promise.
25443
25444 @end defvar
25445
25446 @defvar gnus-group-ham-exit-processor-whitelist
25447
25448 Add this symbol to a group's @code{spam-process} parameter by
25449 customizing the group parameters or the
25450 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25451 added to a group's @code{spam-process} parameter, the senders of
25452 ham-marked articles in @emph{ham} groups will be added to the
25453 whitelist.
25454
25455 @emph{WARNING}
25456
25457 Instead of the obsolete
25458 @code{gnus-group-ham-exit-processor-whitelist}, it is recommended
25459 that you use @code{(ham spam-use-whitelist)}.  Everything will work
25460 the same way, we promise.
25461
25462 @end defvar
25463
25464 Blacklists are lists of regular expressions matching addresses you
25465 consider to be spam senders.  For instance, to block mail from any
25466 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
25467 blacklist.  You start out with an empty blacklist.  Blacklist entries
25468 use the Emacs regular expression syntax.
25469
25470 Conversely, whitelists tell Gnus what addresses are considered
25471 legitimate.  All messages from whitelisted addresses are considered
25472 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
25473 Emacs regular expression syntax.
25474
25475 The blacklist and whitelist file locations can be customized with the
25476 @code{spam-directory} variable (@file{~/News/spam} by default), or
25477 the @code{spam-whitelist} and @code{spam-blacklist} variables
25478 directly.  The whitelist and blacklist files will by default be in the
25479 @code{spam-directory} directory, named @file{whitelist} and
25480 @file{blacklist} respectively.
25481
25482 @node BBDB Whitelists
25483 @subsubsection BBDB Whitelists
25484 @cindex spam filtering
25485 @cindex BBDB whitelists, spam filtering
25486 @cindex BBDB, spam filtering
25487 @cindex spam
25488
25489 @defvar spam-use-BBDB
25490
25491 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
25492 Whitelists}), but uses the BBDB as the source of whitelisted
25493 addresses, without regular expressions.  You must have the BBDB loaded
25494 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
25495 not in the BBDB will be sent to the next spam-split rule.  This is an
25496 explicit filter, meaning that unless someone is in the BBDB, their
25497 messages are not assumed to be spam or ham.
25498
25499 @end defvar
25500
25501 @defvar spam-use-BBDB-exclusive
25502
25503 Set this variable to @code{t} if you want to use the BBDB as an
25504 implicit filter, meaning that every message will be considered spam
25505 unless the sender is in the BBDB.  Use with care.  Only sender
25506 addresses in the BBDB will be allowed through; all others will be
25507 classified as spammers.
25508
25509 While @code{spam-use-BBDB-exclusive} @emph{can} be used as an alias
25510 for @code{spam-use-BBDB} as far as @code{spam.el} is concerned, it is
25511 @emph{not} a separate back end.  If you set
25512 @code{spam-use-BBDB-exclusive} to t, @emph{all} your BBDB splitting
25513 will be exclusive.
25514
25515 @end defvar
25516
25517 @defvar gnus-group-ham-exit-processor-BBDB
25518
25519 Add this symbol to a group's @code{spam-process} parameter by
25520 customizing the group parameters or the
25521 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25522 added to a group's @code{spam-process} parameter, the senders of
25523 ham-marked articles in @emph{ham} groups will be added to the
25524 BBDB.
25525
25526 @emph{WARNING}
25527
25528 Instead of the obsolete
25529 @code{gnus-group-ham-exit-processor-BBDB}, it is recommended
25530 that you use @code{(ham spam-use-BBDB)}.  Everything will work
25531 the same way, we promise.
25532
25533 @end defvar
25534
25535 @node Gmane Spam Reporting
25536 @subsubsection Gmane Spam Reporting
25537 @cindex spam reporting
25538 @cindex Gmane, spam reporting
25539 @cindex Gmane, spam reporting
25540 @cindex spam
25541
25542 @defvar gnus-group-spam-exit-processor-report-gmane
25543
25544 Add this symbol to a group's @code{spam-process} parameter by
25545 customizing the group parameters or the
25546 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25547 added to a group's @code{spam-process} parameter, the spam-marked
25548 articles groups will be reported to the Gmane administrators via a
25549 HTTP request.
25550
25551 Gmane can be found at @uref{http://gmane.org}.
25552
25553 @emph{WARNING}
25554
25555 Instead of the obsolete
25556 @code{gnus-group-spam-exit-processor-report-gmane}, it is recommended
25557 that you use @code{(spam spam-use-gmane)}.  Everything will work the
25558 same way, we promise.
25559
25560 @end defvar
25561
25562 @defvar spam-report-gmane-use-article-number
25563
25564 This variable is @code{t} by default.  Set it to @code{nil} if you are
25565 running your own news server, for instance, and the local article
25566 numbers don't correspond to the Gmane article numbers.  When
25567 @code{spam-report-gmane-use-article-number} is @code{nil},
25568 @code{spam-report.el} will fetch the number from the article headers.
25569
25570 @end defvar
25571
25572 @defvar spam-report-user-mail-address
25573
25574 Mail address exposed in the User-Agent spam reports to Gmane.  It allows
25575 the Gmane administrators to contact you in case of misreports.  The
25576 default is @code{user-mail-address}.
25577
25578 @end defvar
25579
25580 @node Anti-spam Hashcash Payments
25581 @subsubsection Anti-spam Hashcash Payments
25582 @cindex spam filtering
25583 @cindex hashcash, spam filtering
25584 @cindex spam
25585
25586 @defvar spam-use-hashcash
25587
25588 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
25589 Whitelists}), but uses hashcash tokens for whitelisting messages
25590 instead of the sender address.  Messages without a hashcash payment
25591 token will be sent to the next spam-split rule.  This is an explicit
25592 filter, meaning that unless a hashcash token is found, the messages
25593 are not assumed to be spam or ham.
25594
25595 @end defvar
25596
25597 @node Blackholes
25598 @subsubsection Blackholes
25599 @cindex spam filtering
25600 @cindex blackholes, spam filtering
25601 @cindex spam
25602
25603 @defvar spam-use-blackholes
25604
25605 This option is disabled by default.  You can let Gnus consult the
25606 blackhole-type distributed spam processing systems (DCC, for instance)
25607 when you set this option.  The variable @code{spam-blackhole-servers}
25608 holds the list of blackhole servers Gnus will consult.  The current
25609 list is fairly comprehensive, but make sure to let us know if it
25610 contains outdated servers.
25611
25612 The blackhole check uses the @code{dig.el} package, but you can tell
25613 @code{spam.el} to use @code{dns.el} instead for better performance if
25614 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
25615 this time to set @code{spam-use-dig} to @code{nil} despite the
25616 possible performance improvements, because some users may be unable to
25617 use it, but you can try it and see if it works for you.
25618
25619 @end defvar
25620
25621 @defvar spam-blackhole-servers
25622
25623 The list of servers to consult for blackhole checks.
25624
25625 @end defvar
25626
25627 @defvar spam-blackhole-good-server-regex
25628
25629 A regular expression for IPs that should not be checked against the
25630 blackhole server list.  When set to @code{nil}, it has no effect.
25631
25632 @end defvar
25633
25634 @defvar spam-use-dig
25635
25636 Use the @code{dig.el} package instead of the @code{dns.el} package.
25637 The default setting of @code{t} is recommended.
25638
25639 @end defvar
25640
25641 Blackhole checks are done only on incoming mail.  There is no spam or
25642 ham processor for blackholes.
25643
25644 @node Regular Expressions Header Matching
25645 @subsubsection Regular Expressions Header Matching
25646 @cindex spam filtering
25647 @cindex regular expressions header matching, spam filtering
25648 @cindex spam
25649
25650 @defvar spam-use-regex-headers
25651
25652 This option is disabled by default.  You can let Gnus check the
25653 message headers against lists of regular expressions when you set this
25654 option.  The variables @code{spam-regex-headers-spam} and
25655 @code{spam-regex-headers-ham} hold the list of regular expressions.
25656 Gnus will check against the message headers to determine if the
25657 message is spam or ham, respectively.
25658
25659 @end defvar
25660
25661 @defvar spam-regex-headers-spam
25662
25663 The list of regular expressions that, when matched in the headers of
25664 the message, positively identify it as spam.
25665
25666 @end defvar
25667
25668 @defvar spam-regex-headers-ham
25669
25670 The list of regular expressions that, when matched in the headers of
25671 the message, positively identify it as ham.
25672
25673 @end defvar
25674
25675 Regular expression header checks are done only on incoming mail.
25676 There is no specific spam or ham processor for regular expressions.
25677
25678 @node Bogofilter
25679 @subsubsection Bogofilter
25680 @cindex spam filtering
25681 @cindex bogofilter, spam filtering
25682 @cindex spam
25683
25684 @defvar spam-use-bogofilter
25685
25686 Set this variable if you want @code{spam-split} to use Eric Raymond's
25687 speedy Bogofilter.
25688
25689 With a minimum of care for associating the @samp{$} mark for spam
25690 articles only, Bogofilter training all gets fairly automatic.  You
25691 should do this until you get a few hundreds of articles in each
25692 category, spam or not.  The command @kbd{S t} in summary mode, either
25693 for debugging or for curiosity, shows the @emph{spamicity} score of
25694 the current article (between 0.0 and 1.0).
25695
25696 Bogofilter determines if a message is spam based on a specific
25697 threshold.  That threshold can be customized, consult the Bogofilter
25698 documentation.
25699
25700 If the @code{bogofilter} executable is not in your path, Bogofilter
25701 processing will be turned off.
25702
25703 You should not enable this if you use @code{spam-use-bogofilter-headers}.
25704
25705 @end defvar
25706
25707 @table @kbd
25708 @item M s t
25709 @itemx S t
25710 @kindex M s t
25711 @kindex S t
25712 @findex spam-bogofilter-score
25713 Get the Bogofilter spamicity score (@code{spam-bogofilter-score}).
25714 @end table
25715
25716 @defvar spam-use-bogofilter-headers
25717
25718 Set this variable if you want @code{spam-split} to use Eric Raymond's
25719 speedy Bogofilter, looking only at the message headers.  It works
25720 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
25721 must be in the message already.  Normally you would do this with a
25722 procmail recipe or something similar; consult the Bogofilter
25723 installation documents for details.
25724
25725 You should not enable this if you use @code{spam-use-bogofilter}.
25726
25727 @end defvar
25728
25729 @defvar gnus-group-spam-exit-processor-bogofilter
25730 Add this symbol to a group's @code{spam-process} parameter by
25731 customizing the group parameters or the
25732 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25733 added to a group's @code{spam-process} parameter, spam-marked articles
25734 will be added to the Bogofilter spam database.
25735
25736 @emph{WARNING}
25737
25738 Instead of the obsolete
25739 @code{gnus-group-spam-exit-processor-bogofilter}, it is recommended
25740 that you use @code{(spam spam-use-bogofilter)}.  Everything will work
25741 the same way, we promise.
25742 @end defvar
25743
25744 @defvar gnus-group-ham-exit-processor-bogofilter
25745 Add this symbol to a group's @code{spam-process} parameter by
25746 customizing the group parameters or the
25747 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25748 added to a group's @code{spam-process} parameter, the ham-marked
25749 articles in @emph{ham} groups will be added to the Bogofilter database
25750 of non-spam messages.
25751
25752 @emph{WARNING}
25753
25754 Instead of the obsolete
25755 @code{gnus-group-ham-exit-processor-bogofilter}, it is recommended
25756 that you use @code{(ham spam-use-bogofilter)}.  Everything will work
25757 the same way, we promise.
25758 @end defvar
25759
25760 @defvar spam-bogofilter-database-directory
25761
25762 This is the directory where Bogofilter will store its databases.  It
25763 is not specified by default, so Bogofilter will use its own default
25764 database directory.
25765
25766 @end defvar
25767
25768 The Bogofilter mail classifier is similar to @command{ifile} in intent and
25769 purpose.  A ham and a spam processor are provided, plus the
25770 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
25771 variables to indicate to spam-split that Bogofilter should either be
25772 used, or has already been used on the article.  The 0.9.2.1 version of
25773 Bogofilter was used to test this functionality.
25774
25775 @node SpamAssassin back end
25776 @subsubsection SpamAssassin back end
25777 @cindex spam filtering
25778 @cindex spamassassin, spam filtering
25779 @cindex spam
25780
25781 @defvar spam-use-spamassassin
25782
25783 Set this variable if you want @code{spam-split} to use SpamAssassin.
25784
25785 SpamAssassin assigns a score to each article based on a set of rules
25786 and tests, including a Bayesian filter.  The Bayesian filter can be
25787 trained by associating the @samp{$} mark for spam articles.  The
25788 spam score can be viewed by using the command @kbd{S t} in summary
25789 mode.
25790
25791 If you set this variable, each article will be processed by
25792 SpamAssassin when @code{spam-split} is called.  If your mail is
25793 preprocessed by SpamAssassin, and you want to just use the
25794 SpamAssassin headers, set @code{spam-use-spamassassin-headers}
25795 instead.
25796
25797 You should not enable this if you use
25798 @code{spam-use-spamassassin-headers}.
25799
25800 @end defvar
25801
25802 @defvar spam-use-spamassassin-headers
25803
25804 Set this variable if your mail is preprocessed by SpamAssassin and
25805 want @code{spam-split} to split based on the SpamAssassin headers.
25806
25807 You should not enable this if you use @code{spam-use-spamassassin}.
25808
25809 @end defvar
25810
25811 @defvar spam-spamassassin-program
25812
25813 This variable points to the SpamAssassin executable.  If you have
25814 @code{spamd} running, you can set this variable to the @code{spamc}
25815 executable for faster processing.  See the SpamAssassin documentation
25816 for more information on @code{spamd}/@code{spamc}.
25817
25818 @end defvar
25819
25820 SpamAssassin is a powerful and flexible spam filter that uses a wide
25821 variety of tests to identify spam.  A ham and a spam processors are
25822 provided, plus the @code{spam-use-spamassassin} and
25823 @code{spam-use-spamassassin-headers} variables to indicate to
25824 spam-split that SpamAssassin should be either used, or has already
25825 been used on the article.  The 2.63 version of SpamAssassin was used
25826 to test this functionality.
25827
25828 @node ifile spam filtering
25829 @subsubsection ifile spam filtering
25830 @cindex spam filtering
25831 @cindex ifile, spam filtering
25832 @cindex spam
25833
25834 @defvar spam-use-ifile
25835
25836 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
25837 statistical analyzer similar to Bogofilter.
25838
25839 @end defvar
25840
25841 @defvar spam-ifile-all-categories
25842
25843 Enable this variable if you want @code{spam-use-ifile} to give you all
25844 the ifile categories, not just spam/non-spam.  If you use this, make
25845 sure you train ifile as described in its documentation.
25846
25847 @end defvar
25848
25849 @defvar spam-ifile-spam-category
25850
25851 This is the category of spam messages as far as ifile is concerned.
25852 The actual string used is irrelevant, but you probably want to leave
25853 the default value of @samp{spam}.
25854 @end defvar
25855
25856 @defvar spam-ifile-database
25857
25858 This is the filename for the ifile database.  It is not specified by
25859 default, so ifile will use its own default database name.
25860
25861 @end defvar
25862
25863 The ifile mail classifier is similar to Bogofilter in intent and
25864 purpose.  A ham and a spam processor are provided, plus the
25865 @code{spam-use-ifile} variable to indicate to spam-split that ifile
25866 should be used.  The 1.2.1 version of ifile was used to test this
25867 functionality.
25868
25869 @node Spam Statistics Filtering
25870 @subsubsection Spam Statistics Filtering
25871 @cindex spam filtering
25872 @cindex spam-stat, spam filtering
25873 @cindex spam-stat
25874 @cindex spam
25875
25876 This back end uses the Spam Statistics Emacs Lisp package to perform
25877 statistics-based filtering (@pxref{Spam Statistics Package}).  Before
25878 using this, you may want to perform some additional steps to
25879 initialize your Spam Statistics dictionary.  @xref{Creating a
25880 spam-stat dictionary}.
25881
25882 @defvar spam-use-stat
25883
25884 @end defvar
25885
25886 @defvar gnus-group-spam-exit-processor-stat
25887 Add this symbol to a group's @code{spam-process} parameter by
25888 customizing the group parameters or the
25889 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25890 added to a group's @code{spam-process} parameter, the spam-marked
25891 articles will be added to the spam-stat database of spam messages.
25892
25893 @emph{WARNING}
25894
25895 Instead of the obsolete
25896 @code{gnus-group-spam-exit-processor-stat}, it is recommended
25897 that you use @code{(spam spam-use-stat)}.  Everything will work
25898 the same way, we promise.
25899 @end defvar
25900
25901 @defvar gnus-group-ham-exit-processor-stat
25902 Add this symbol to a group's @code{spam-process} parameter by
25903 customizing the group parameters or the
25904 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25905 added to a group's @code{spam-process} parameter, the ham-marked
25906 articles in @emph{ham} groups will be added to the spam-stat database
25907 of non-spam messages.
25908
25909 @emph{WARNING}
25910
25911 Instead of the obsolete
25912 @code{gnus-group-ham-exit-processor-stat}, it is recommended
25913 that you use @code{(ham spam-use-stat)}.  Everything will work
25914 the same way, we promise.
25915 @end defvar
25916
25917 This enables @code{spam.el} to cooperate with @file{spam-stat.el}.
25918 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
25919 which unlike ifile or Bogofilter does not require external programs.
25920 A spam and a ham processor, and the @code{spam-use-stat} variable for
25921 @code{spam-split} are provided.
25922
25923 @node SpamOracle
25924 @subsubsection Using SpamOracle with Gnus
25925 @cindex spam filtering
25926 @cindex SpamOracle
25927 @cindex spam
25928
25929 An easy way to filter out spam is to use SpamOracle.  SpamOracle is an
25930 statistical mail filtering tool written by Xavier Leroy and needs to be
25931 installed separately.
25932
25933 There are several ways to use SpamOracle with Gnus.  In all cases, your
25934 mail is piped through SpamOracle in its @emph{mark} mode.  SpamOracle will
25935 then enter an @samp{X-Spam} header indicating whether it regards the
25936 mail as a spam mail or not.
25937
25938 One possibility is to run SpamOracle as a @code{:prescript} from the
25939 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
25940 the advantage that the user can see the @emph{X-Spam} headers.
25941
25942 The easiest method is to make @file{spam.el} (@pxref{Spam Package})
25943 call SpamOracle.
25944
25945 @vindex spam-use-spamoracle
25946 To enable SpamOracle usage by @code{spam.el}, set the variable
25947 @code{spam-use-spamoracle} to @code{t} and configure the
25948 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}.  @xref{Spam
25949 Package}.  In this example the @samp{INBOX} of an nnimap server is
25950 filtered using SpamOracle.  Mails recognized as spam mails will be
25951 moved to @code{spam-split-group}, @samp{Junk} in this case.  Ham
25952 messages stay in @samp{INBOX}:
25953
25954 @example
25955 (setq spam-use-spamoracle t
25956       spam-split-group "Junk"
25957       nnimap-split-inbox '("INBOX")
25958       nnimap-split-rule 'nnimap-split-fancy
25959       nnimap-split-fancy '(| (: spam-split) "INBOX"))
25960 @end example
25961
25962 @defvar spam-use-spamoracle
25963 Set to @code{t} if you want Gnus to enable spam filtering using
25964 SpamOracle.
25965 @end defvar
25966
25967 @defvar spam-spamoracle-binary
25968 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
25969 user's PATH.  Using the variable @code{spam-spamoracle-binary}, this
25970 can be customized.
25971 @end defvar
25972
25973 @defvar spam-spamoracle-database
25974 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
25975 store its analysis.  This is controlled by the variable
25976 @code{spam-spamoracle-database} which defaults to @code{nil}.  That means
25977 the default SpamOracle database will be used.  In case you want your
25978 database to live somewhere special, set
25979 @code{spam-spamoracle-database} to this path.
25980 @end defvar
25981
25982 SpamOracle employs a statistical algorithm to determine whether a
25983 message is spam or ham.  In order to get good results, meaning few
25984 false hits or misses, SpamOracle needs training.  SpamOracle learns
25985 the characteristics of your spam mails.  Using the @emph{add} mode
25986 (training mode) one has to feed good (ham) and spam mails to
25987 SpamOracle.  This can be done by pressing @kbd{|} in the Summary
25988 buffer and pipe the mail to a SpamOracle process or using
25989 @file{spam.el}'s spam- and ham-processors, which is much more
25990 convenient.  For a detailed description of spam- and ham-processors,
25991 @xref{Spam Package}.
25992
25993 @defvar gnus-group-spam-exit-processor-spamoracle
25994 Add this symbol to a group's @code{spam-process} parameter by
25995 customizing the group parameter or the
25996 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
25997 to a group's @code{spam-process} parameter, spam-marked articles will be
25998 sent to SpamOracle as spam samples.
25999
26000 @emph{WARNING}
26001
26002 Instead of the obsolete
26003 @code{gnus-group-spam-exit-processor-spamoracle}, it is recommended
26004 that you use @code{(spam spam-use-spamoracle)}.  Everything will work
26005 the same way, we promise.
26006 @end defvar
26007
26008 @defvar gnus-group-ham-exit-processor-spamoracle
26009 Add this symbol to a group's @code{spam-process} parameter by
26010 customizing the group parameter or the
26011 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
26012 to a group's @code{spam-process} parameter, the ham-marked articles in
26013 @emph{ham} groups will be sent to the SpamOracle as samples of ham
26014 messages.
26015
26016 @emph{WARNING}
26017
26018 Instead of the obsolete
26019 @code{gnus-group-ham-exit-processor-spamoracle}, it is recommended
26020 that you use @code{(ham spam-use-spamoracle)}.  Everything will work
26021 the same way, we promise.
26022 @end defvar
26023
26024 @emph{Example:} These are the Group Parameters of a group that has been
26025 classified as a ham group, meaning that it should only contain ham
26026 messages.
26027 @example
26028  ((spam-contents gnus-group-spam-classification-ham)
26029   (spam-process ((ham spam-use-spamoracle)
26030                  (spam spam-use-spamoracle))))
26031 @end example
26032 For this group the @code{spam-use-spamoracle} is installed for both
26033 ham and spam processing.  If the group contains spam message
26034 (e.g. because SpamOracle has not had enough sample messages yet) and
26035 the user marks some messages as spam messages, these messages will be
26036 processed by SpamOracle.  The processor sends the messages to
26037 SpamOracle as new samples for spam.
26038
26039 @node Extending the Spam package
26040 @subsection Extending the Spam package
26041 @cindex spam filtering
26042 @cindex spam elisp package, extending
26043 @cindex extending the spam elisp package
26044
26045 Say you want to add a new back end called blackbox.  For filtering
26046 incoming mail, provide the following:
26047
26048 @enumerate
26049
26050 @item
26051 Code
26052
26053 @lisp
26054 (defvar spam-use-blackbox nil
26055   "True if blackbox should be used.")
26056 @end lisp
26057
26058 Write @code{spam-check-blackbox} if Blackbox can check incoming mail.
26059
26060 Write @code{spam-blackbox-register-routine} and
26061 @code{spam-blackbox-unregister-routine} using the bogofilter
26062 register/unregister routines as a start, or other restister/unregister
26063 routines more appropriate to Blackbox, if Blackbox can
26064 register/unregister spam and ham.
26065
26066 @item
26067 Functionality
26068
26069 The @code{spam-check-blackbox} function should return @samp{nil} or
26070 @code{spam-split-group}, observing the other conventions.  See the
26071 existing @code{spam-check-*} functions for examples of what you can
26072 do, and stick to the template unless you fully understand the reasons
26073 why you aren't.
26074
26075 @end enumerate
26076
26077 For processing spam and ham messages, provide the following:
26078
26079 @enumerate
26080
26081 @item
26082 Code
26083
26084 Note you don't have to provide a spam or a ham processor.  Only
26085 provide them if Blackbox supports spam or ham processing.
26086
26087 Also, ham and spam processors are being phased out as single
26088 variables.  Instead the form @code{(spam spam-use-blackbox)} or
26089 @code{(ham spam-use-blackbox)} is favored.  For now, spam/ham
26090 processor variables are still around but they won't be for long.
26091
26092 @lisp
26093 (defvar gnus-group-spam-exit-processor-blackbox "blackbox-spam"
26094   "The Blackbox summary exit spam processor.
26095 Only applicable to spam groups.")
26096
26097 (defvar gnus-group-ham-exit-processor-blackbox "blackbox-ham"
26098   "The whitelist summary exit ham processor.
26099 Only applicable to non-spam (unclassified and ham) groups.")
26100
26101 @end lisp
26102
26103 @item
26104 Gnus parameters
26105
26106 Add
26107 @lisp
26108 (const :tag "Spam: Blackbox" (spam spam-use-blackbox))
26109 (const :tag "Ham: Blackbox"  (ham spam-use-blackbox))
26110 @end lisp
26111 to the @code{spam-process} group parameter in @code{gnus.el}.  Make
26112 sure you do it twice, once for the parameter and once for the
26113 variable customization.
26114
26115 Add
26116 @lisp
26117 (variable-item spam-use-blackbox)
26118 @end lisp
26119 to the @code{spam-autodetect-methods} group parameter in
26120 @code{gnus.el} if Blackbox can check incoming mail for spam contents.
26121
26122 Finally, use the appropriate @code{spam-install-*-backend} function in
26123 @code{spam.el}.  Here are the available functions.
26124
26125
26126 @enumerate
26127
26128 @item
26129 @code{spam-install-backend-alias}
26130
26131 This function will simply install an alias for a back end that does
26132 everything like the original back end.  It is currently only used to
26133 make @code{spam-use-BBDB-exclusive} act like @code{spam-use-BBDB}.
26134
26135 @item
26136 @code{spam-install-nocheck-backend}
26137
26138 This function installs a back end that has no check function, but can
26139 register/unregister ham or spam.  The @code{spam-use-gmane} back end is
26140 such a back end.
26141
26142 @item
26143 @code{spam-install-checkonly-backend}
26144
26145 This function will install a back end that can only check incoming mail
26146 for spam contents.  It can't register or unregister messages.
26147 @code{spam-use-blackholes} and @code{spam-use-hashcash} are such
26148 back ends.
26149
26150 @item
26151 @code{spam-install-statistical-checkonly-backend}
26152
26153 This function installs a statistical back end (one which requires the
26154 full body of a message to check it) that can only check incoming mail
26155 for contents.  @code{spam-use-regex-body} is such a filter.
26156
26157 @item
26158 @code{spam-install-statistical-backend}
26159
26160 This function install a statistical back end with incoming checks and
26161 registration/unregistration routines.  @code{spam-use-bogofilter} is
26162 set up this way.
26163
26164 @item
26165 @code{spam-install-backend}
26166
26167 This is the most normal back end installation, where a back end that can
26168 check and register/unregister messages is set up without statistical
26169 abilities.  The @code{spam-use-BBDB} is such a back end.
26170
26171 @item
26172 @code{spam-install-mover-backend}
26173
26174 Mover back ends are internal to @code{spam.el} and specifically move
26175 articles around when the summary is exited.  You will very probably
26176 never install such a back end.
26177 @end enumerate
26178
26179 @end enumerate
26180
26181 @node Spam Statistics Package
26182 @subsection Spam Statistics Package
26183 @cindex Paul Graham
26184 @cindex Graham, Paul
26185 @cindex naive Bayesian spam filtering
26186 @cindex Bayesian spam filtering, naive
26187 @cindex spam filtering, naive Bayesian
26188
26189 Paul Graham has written an excellent essay about spam filtering using
26190 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
26191 Spam}.  In it he describes the inherent deficiency of rule-based
26192 filtering as used by SpamAssassin, for example: Somebody has to write
26193 the rules, and everybody else has to install these rules.  You are
26194 always late.  It would be much better, he argues, to filter mail based
26195 on whether it somehow resembles spam or non-spam.  One way to measure
26196 this is word distribution.  He then goes on to describe a solution
26197 that checks whether a new mail resembles any of your other spam mails
26198 or not.
26199
26200 The basic idea is this:  Create a two collections of your mail, one
26201 with spam, one with non-spam.  Count how often each word appears in
26202 either collection, weight this by the total number of mails in the
26203 collections, and store this information in a dictionary.  For every
26204 word in a new mail, determine its probability to belong to a spam or a
26205 non-spam mail.  Use the 15 most conspicuous words, compute the total
26206 probability of the mail being spam.  If this probability is higher
26207 than a certain threshold, the mail is considered to be spam.
26208
26209 The Spam Statistics package adds support to Gnus for this kind of
26210 filtering.  It can be used as one of the back ends of the Spam package
26211 (@pxref{Spam Package}), or by itself.
26212
26213 Before using the Spam Statistics package, you need to set it up.
26214 First, you need two collections of your mail, one with spam, one with
26215 non-spam.  Then you need to create a dictionary using these two
26216 collections, and save it.  And last but not least, you need to use
26217 this dictionary in your fancy mail splitting rules.
26218
26219 @menu
26220 * Creating a spam-stat dictionary::
26221 * Splitting mail using spam-stat::
26222 * Low-level interface to the spam-stat dictionary::
26223 @end menu
26224
26225 @node Creating a spam-stat dictionary
26226 @subsubsection Creating a spam-stat dictionary
26227
26228 Before you can begin to filter spam based on statistics, you must
26229 create these statistics based on two mail collections, one with spam,
26230 one with non-spam.  These statistics are then stored in a dictionary
26231 for later use.  In order for these statistics to be meaningful, you
26232 need several hundred emails in both collections.
26233
26234 Gnus currently supports only the nnml back end for automated dictionary
26235 creation.  The nnml back end stores all mails in a directory, one file
26236 per mail.  Use the following:
26237
26238 @defun spam-stat-process-spam-directory
26239 Create spam statistics for every file in this directory.  Every file
26240 is treated as one spam mail.
26241 @end defun
26242
26243 @defun spam-stat-process-non-spam-directory
26244 Create non-spam statistics for every file in this directory.  Every
26245 file is treated as one non-spam mail.
26246 @end defun
26247
26248 Usually you would call @code{spam-stat-process-spam-directory} on a
26249 directory such as @file{~/Mail/mail/spam} (this usually corresponds to
26250 the group @samp{nnml:mail.spam}), and you would call
26251 @code{spam-stat-process-non-spam-directory} on a directory such as
26252 @file{~/Mail/mail/misc} (this usually corresponds to the group
26253 @samp{nnml:mail.misc}).
26254
26255 When you are using @acronym{IMAP}, you won't have the mails available
26256 locally, so that will not work.  One solution is to use the Gnus Agent
26257 to cache the articles.  Then you can use directories such as
26258 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
26259 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
26260
26261 @defvar spam-stat
26262 This variable holds the hash-table with all the statistics---the
26263 dictionary we have been talking about.  For every word in either
26264 collection, this hash-table stores a vector describing how often the
26265 word appeared in spam and often it appeared in non-spam mails.
26266 @end defvar
26267
26268 If you want to regenerate the statistics from scratch, you need to
26269 reset the dictionary.
26270
26271 @defun spam-stat-reset
26272 Reset the @code{spam-stat} hash-table, deleting all the statistics.
26273 @end defun
26274
26275 When you are done, you must save the dictionary.  The dictionary may
26276 be rather large.  If you will not update the dictionary incrementally
26277 (instead, you will recreate it once a month, for example), then you
26278 can reduce the size of the dictionary by deleting all words that did
26279 not appear often enough or that do not clearly belong to only spam or
26280 only non-spam mails.
26281
26282 @defun spam-stat-reduce-size
26283 Reduce the size of the dictionary.  Use this only if you do not want
26284 to update the dictionary incrementally.
26285 @end defun
26286
26287 @defun spam-stat-save
26288 Save the dictionary.
26289 @end defun
26290
26291 @defvar spam-stat-file
26292 The filename used to store the dictionary.  This defaults to
26293 @file{~/.spam-stat.el}.
26294 @end defvar
26295
26296 @node Splitting mail using spam-stat
26297 @subsubsection Splitting mail using spam-stat
26298
26299 This section describes how to use the Spam statistics
26300 @emph{independently} of the @xref{Spam Package}.
26301
26302 First, add the following to your @file{~/.gnus.el} file:
26303
26304 @lisp
26305 (require 'spam-stat)
26306 (spam-stat-load)
26307 @end lisp
26308
26309 This will load the necessary Gnus code, and the dictionary you
26310 created.
26311
26312 Next, you need to adapt your fancy splitting rules:  You need to
26313 determine how to use @code{spam-stat}.  The following examples are for
26314 the nnml back end.  Using the nnimap back end works just as well.  Just
26315 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
26316
26317 In the simplest case, you only have two groups, @samp{mail.misc} and
26318 @samp{mail.spam}.  The following expression says that mail is either
26319 spam or it should go into @samp{mail.misc}.  If it is spam, then
26320 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
26321
26322 @lisp
26323 (setq nnmail-split-fancy
26324       `(| (: spam-stat-split-fancy)
26325           "mail.misc"))
26326 @end lisp
26327
26328 @defvar spam-stat-split-fancy-spam-group
26329 The group to use for spam.  Default is @samp{mail.spam}.
26330 @end defvar
26331
26332 If you also filter mail with specific subjects into other groups, use
26333 the following expression.  Only mails not matching the regular
26334 expression are considered potential spam.
26335
26336 @lisp
26337 (setq nnmail-split-fancy
26338       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
26339           (: spam-stat-split-fancy)
26340           "mail.misc"))
26341 @end lisp
26342
26343 If you want to filter for spam first, then you must be careful when
26344 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
26345 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
26346 non-spam, therefore both should be in your collection of non-spam
26347 mails, when creating the dictionary!
26348
26349 @lisp
26350 (setq nnmail-split-fancy
26351       `(| (: spam-stat-split-fancy)
26352           ("Subject" "\\bspam-stat\\b" "mail.emacs")
26353           "mail.misc"))
26354 @end lisp
26355
26356 You can combine this with traditional filtering.  Here, we move all
26357 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
26358 @code{spam-stat-split-fancy} will never see them, the mails in
26359 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
26360 nor in your collection of non-spam mails, when creating the
26361 dictionary!
26362
26363 @lisp
26364 (setq nnmail-split-fancy
26365       `(| ("Content-Type" "text/html" "mail.spam.filtered")
26366           (: spam-stat-split-fancy)
26367           ("Subject" "\\bspam-stat\\b" "mail.emacs")
26368           "mail.misc"))
26369 @end lisp
26370
26371
26372 @node Low-level interface to the spam-stat dictionary
26373 @subsubsection Low-level interface to the spam-stat dictionary
26374
26375 The main interface to using @code{spam-stat}, are the following functions:
26376
26377 @defun spam-stat-buffer-is-spam
26378 Called in a buffer, that buffer is considered to be a new spam mail.
26379 Use this for new mail that has not been processed before.
26380 @end defun
26381
26382 @defun spam-stat-buffer-is-no-spam
26383 Called in a buffer, that buffer is considered to be a new non-spam
26384 mail.  Use this for new mail that has not been processed before.
26385 @end defun
26386
26387 @defun spam-stat-buffer-change-to-spam
26388 Called in a buffer, that buffer is no longer considered to be normal
26389 mail but spam.  Use this to change the status of a mail that has
26390 already been processed as non-spam.
26391 @end defun
26392
26393 @defun spam-stat-buffer-change-to-non-spam
26394 Called in a buffer, that buffer is no longer considered to be spam but
26395 normal mail.  Use this to change the status of a mail that has already
26396 been processed as spam.
26397 @end defun
26398
26399 @defun spam-stat-save
26400 Save the hash table to the file.  The filename used is stored in the
26401 variable @code{spam-stat-file}.
26402 @end defun
26403
26404 @defun spam-stat-load
26405 Load the hash table from a file.  The filename used is stored in the
26406 variable @code{spam-stat-file}.
26407 @end defun
26408
26409 @defun spam-stat-score-word
26410 Return the spam score for a word.
26411 @end defun
26412
26413 @defun spam-stat-score-buffer
26414 Return the spam score for a buffer.
26415 @end defun
26416
26417 @defun spam-stat-split-fancy
26418 Use this function for fancy mail splitting.  Add the rule @samp{(:
26419 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
26420 @end defun
26421
26422 Make sure you load the dictionary before using it.  This requires the
26423 following in your @file{~/.gnus.el} file:
26424
26425 @lisp
26426 (require 'spam-stat)
26427 (spam-stat-load)
26428 @end lisp
26429
26430 Typical test will involve calls to the following functions:
26431
26432 @smallexample
26433 Reset: (setq spam-stat (make-hash-table :test 'equal))
26434 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
26435 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
26436 Save table: (spam-stat-save)
26437 File size: (nth 7 (file-attributes spam-stat-file))
26438 Number of words: (hash-table-count spam-stat)
26439 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
26440 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
26441 Reduce table size: (spam-stat-reduce-size)
26442 Save table: (spam-stat-save)
26443 File size: (nth 7 (file-attributes spam-stat-file))
26444 Number of words: (hash-table-count spam-stat)
26445 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
26446 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
26447 @end smallexample
26448
26449 Here is how you would create your dictionary:
26450
26451 @smallexample
26452 Reset: (setq spam-stat (make-hash-table :test 'equal))
26453 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
26454 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
26455 Repeat for any other non-spam group you need...
26456 Reduce table size: (spam-stat-reduce-size)
26457 Save table: (spam-stat-save)
26458 @end smallexample
26459
26460 @node Other modes
26461 @section Interaction with other modes
26462
26463 @subsection Dired
26464 @cindex dired
26465
26466 @code{gnus-dired-minor-mode} provides some useful functions for dired
26467 buffers.  It is enabled with
26468 @lisp
26469 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
26470 @end lisp
26471
26472 @table @kbd
26473 @item C-c C-m C-a
26474 @findex gnus-dired-attach
26475 @cindex attachments, selection via dired
26476 Send dired's marked files as an attachment (@code{gnus-dired-attach}).
26477 You will be prompted for a message buffer.
26478
26479 @item C-c C-m C-l
26480 @findex gnus-dired-find-file-mailcap
26481 Visit a file according to the appropriate mailcap entry
26482 (@code{gnus-dired-find-file-mailcap}).  With prefix, open file in a new
26483 buffer.
26484
26485 @item C-c C-m C-p
26486 @findex gnus-dired-print
26487 Print file according to the mailcap entry (@code{gnus-dired-print}).  If
26488 there is no print command, print in a PostScript image.
26489 @end table
26490
26491 @node Various Various
26492 @section Various Various
26493 @cindex mode lines
26494 @cindex highlights
26495
26496 @table @code
26497
26498 @item gnus-home-directory
26499 @vindex gnus-home-directory
26500 All Gnus file and directory variables will be initialized from this
26501 variable, which defaults to @file{~/}.
26502
26503 @item gnus-directory
26504 @vindex gnus-directory
26505 Most Gnus storage file and directory variables will be initialized from
26506 this variable, which defaults to the @env{SAVEDIR} environment
26507 variable, or @file{~/News/} if that variable isn't set.
26508
26509 Note that Gnus is mostly loaded when the @file{~/.gnus.el} file is read.
26510 This means that other directory variables that are initialized from this
26511 variable won't be set properly if you set this variable in
26512 @file{~/.gnus.el}.  Set this variable in @file{.emacs} instead.
26513
26514 @item gnus-default-directory
26515 @vindex gnus-default-directory
26516 Not related to the above variable at all---this variable says what the
26517 default directory of all Gnus buffers should be.  If you issue commands
26518 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
26519 default directory.  If this variable is @code{nil} (which is the
26520 default), the default directory will be the default directory of the
26521 buffer you were in when you started Gnus.
26522
26523 @item gnus-verbose
26524 @vindex gnus-verbose
26525 This variable is an integer between zero and ten.  The higher the value,
26526 the more messages will be displayed.  If this variable is zero, Gnus
26527 will never flash any messages, if it is seven (which is the default),
26528 most important messages will be shown, and if it is ten, Gnus won't ever
26529 shut up, but will flash so many messages it will make your head swim.
26530
26531 @item gnus-verbose-backends
26532 @vindex gnus-verbose-backends
26533 This variable works the same way as @code{gnus-verbose}, but it applies
26534 to the Gnus back ends instead of Gnus proper.
26535
26536 @item gnus-add-timestamp-to-message
26537 @vindex gnus-add-timestamp-to-message
26538 This variable controls whether to add timestamps to messages that are
26539 controlled by @code{gnus-verbose} and @code{gnus-verbose-backends} and
26540 are issued.  The default value is @code{nil} which means never to add
26541 timestamp.  If it is @code{log}, add timestamps to only the messages
26542 that go into the @samp{*Messages*} buffer (in XEmacs, it is the
26543 @w{@samp{ *Message-Log*}} buffer).  If it is neither @code{nil} nor
26544 @code{log}, add timestamps not only to log messages but also to the ones
26545 displayed in the echo area.
26546
26547 @item nnheader-max-head-length
26548 @vindex nnheader-max-head-length
26549 When the back ends read straight heads of articles, they all try to read
26550 as little as possible.  This variable (default 8192) specifies
26551 the absolute max length the back ends will try to read before giving up
26552 on finding a separator line between the head and the body.  If this
26553 variable is @code{nil}, there is no upper read bound.  If it is
26554 @code{t}, the back ends won't try to read the articles piece by piece,
26555 but read the entire articles.  This makes sense with some versions of
26556 @code{ange-ftp} or @code{efs}.
26557
26558 @item nnheader-head-chop-length
26559 @vindex nnheader-head-chop-length
26560 This variable (default 2048) says how big a piece of each article to
26561 read when doing the operation described above.
26562
26563 @item nnheader-file-name-translation-alist
26564 @vindex nnheader-file-name-translation-alist
26565 @cindex file names
26566 @cindex invalid characters in file names
26567 @cindex characters in file names
26568 This is an alist that says how to translate characters in file names.
26569 For instance, if @samp{:} is invalid as a file character in file names
26570 on your system (you OS/2 user you), you could say something like:
26571
26572 @lisp
26573 @group
26574 (setq nnheader-file-name-translation-alist
26575       '((?: . ?_)))
26576 @end group
26577 @end lisp
26578
26579 In fact, this is the default value for this variable on OS/2 and MS
26580 Windows (phooey) systems.
26581
26582 @item gnus-hidden-properties
26583 @vindex gnus-hidden-properties
26584 This is a list of properties to use to hide ``invisible'' text.  It is
26585 @code{(invisible t intangible t)} by default on most systems, which
26586 makes invisible text invisible and intangible.
26587
26588 @item gnus-parse-headers-hook
26589 @vindex gnus-parse-headers-hook
26590 A hook called before parsing headers.  It can be used, for instance, to
26591 gather statistics on the headers fetched, or perhaps you'd like to prune
26592 some headers.  I don't see why you'd want that, though.
26593
26594 @item gnus-shell-command-separator
26595 @vindex gnus-shell-command-separator
26596 String used to separate two shell commands.  The default is @samp{;}.
26597
26598 @item gnus-invalid-group-regexp
26599 @vindex gnus-invalid-group-regexp
26600
26601 Regexp to match ``invalid'' group names when querying user for a group
26602 name.  The default value catches some @strong{really} invalid group
26603 names who could possibly mess up Gnus internally (like allowing
26604 @samp{:} in a group name, which is normally used to delimit method and
26605 group).
26606
26607 @acronym{IMAP} users might want to allow @samp{/} in group names though.
26608
26609
26610 @end table
26611
26612 @node The End
26613 @chapter The End
26614
26615 Well, that's the manual---you can get on with your life now.  Keep in
26616 touch.  Say hello to your cats from me.
26617
26618 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
26619
26620 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
26621
26622 @quotation
26623 @strong{Te Deum}
26624
26625 @sp 1
26626 Not because of victories @*
26627 I sing,@*
26628 having none,@*
26629 but for the common sunshine,@*
26630 the breeze,@*
26631 the largess of the spring.
26632
26633 @sp 1
26634 Not for victory@*
26635 but for the day's work done@*
26636 as well as I was able;@*
26637 not for a seat upon the dais@*
26638 but at the common table.@*
26639 @end quotation
26640
26641
26642 @node Appendices
26643 @chapter Appendices
26644
26645 @menu
26646 * XEmacs::                      Requirements for installing under XEmacs.
26647 * History::                     How Gnus got where it is today.
26648 * On Writing Manuals::          Why this is not a beginner's guide.
26649 * Terminology::                 We use really difficult, like, words here.
26650 * Customization::               Tailoring Gnus to your needs.
26651 * Troubleshooting::             What you might try if things do not work.
26652 * Gnus Reference Guide::        Rilly, rilly technical stuff.
26653 * Emacs for Heathens::          A short introduction to Emacsian terms.
26654 * Frequently Asked Questions::  The Gnus FAQ
26655 @end menu
26656
26657
26658 @node XEmacs
26659 @section XEmacs
26660 @cindex XEmacs
26661 @cindex installing under XEmacs
26662
26663 XEmacs is distributed as a collection of packages.  You should install
26664 whatever packages the Gnus XEmacs package requires.  The current
26665 requirements are @samp{gnus}, @samp{mail-lib}, @samp{xemacs-base},
26666 @samp{eterm}, @samp{sh-script}, @samp{net-utils}, @samp{os-utils},
26667 @samp{dired}, @samp{mh-e}, @samp{sieve}, @samp{ps-print}, @samp{W3},
26668 @samp{pgg}, @samp{mailcrypt}, @samp{ecrypto}, and @samp{sasl}.
26669
26670
26671 @node History
26672 @section History
26673
26674 @cindex history
26675 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
26676 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
26677
26678 If you want to investigate the person responsible for this outrage,
26679 you can point your (feh!) web browser to
26680 @uref{http://quimby.gnus.org/}.  This is also the primary
26681 distribution point for the new and spiffy versions of Gnus, and is
26682 known as The Site That Destroys Newsrcs And Drives People Mad.
26683
26684 During the first extended alpha period of development, the new Gnus was
26685 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
26686 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
26687 (Besides, the ``Gnus'' in this abbreviation should probably be
26688 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
26689 appropriate name, don't you think?)
26690
26691 In any case, after spending all that energy on coming up with a new and
26692 spunky name, we decided that the name was @emph{too} spunky, so we
26693 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
26694 ``@sc{gnus}''.  New vs. old.
26695
26696 @menu
26697 * Gnus Versions::               What Gnus versions have been released.
26698 * Other Gnus Versions::         Other Gnus versions that also have been released.
26699 * Why?::                        What's the point of Gnus?
26700 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
26701 * Conformity::                  Gnus tries to conform to all standards.
26702 * Emacsen::                     Gnus can be run on a few modern Emacsen.
26703 * Gnus Development::            How Gnus is developed.
26704 * Contributors::                Oodles of people.
26705 * New Features::                Pointers to some of the new stuff in Gnus.
26706 @end menu
26707
26708
26709 @node Gnus Versions
26710 @subsection Gnus Versions
26711 @cindex ding Gnus
26712 @cindex September Gnus
26713 @cindex Red Gnus
26714 @cindex Quassia Gnus
26715 @cindex Pterodactyl Gnus
26716 @cindex Oort Gnus
26717 @cindex No Gnus
26718 @cindex Gnus versions
26719
26720 The first ``proper'' release of Gnus 5 was done in November 1995 when it
26721 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
26722 plus 15 Gnus 5.0 releases).
26723
26724 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
26725 releases)) was released under the name ``Gnus 5.2'' (40 releases).
26726
26727 On July 28th 1996 work on Red Gnus was begun, and it was released on
26728 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
26729
26730 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
26731 It was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
26732
26733 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
26734 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
26735 1999.
26736
26737 On the 26th of October 2000, Oort Gnus was begun and was released as
26738 Gnus 5.10 on May 1st 2003 (24 releases).
26739
26740 On the January 4th 2004, No Gnus was begun.
26741
26742 If you happen upon a version of Gnus that has a prefixed name --
26743 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
26744 ``Pterodactyl Gnus'', ``Oort Gnus'', ``No Gnus'' -- don't panic.
26745 Don't let it know that you're frightened.  Back away.  Slowly.  Whatever
26746 you do, don't run.  Walk away, calmly, until you're out of its reach.
26747 Find a proper released version of Gnus and snuggle up to that instead.
26748
26749
26750 @node Other Gnus Versions
26751 @subsection Other Gnus Versions
26752 @cindex Semi-gnus
26753
26754 In addition to the versions of Gnus which have had their releases
26755 coordinated by Lars, one major development has been Semi-gnus from
26756 Japan.  It's based on a library called @acronym{SEMI}, which provides
26757 @acronym{MIME} capabilities.
26758
26759 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
26760 Collectively, they are called ``Semi-gnus'', and different strains are
26761 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
26762 @acronym{MIME} and multilingualization things, especially important for
26763 Japanese users.
26764
26765
26766 @node Why?
26767 @subsection Why?
26768
26769 What's the point of Gnus?
26770
26771 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
26772 newsreader, that lets you do anything you can think of.  That was my
26773 original motivation, but while working on Gnus, it has become clear to
26774 me that this generation of newsreaders really belong in the stone age.
26775 Newsreaders haven't developed much since the infancy of the net.  If the
26776 volume continues to rise with the current rate of increase, all current
26777 newsreaders will be pretty much useless.  How do you deal with
26778 newsgroups that have thousands of new articles each day?  How do you
26779 keep track of millions of people who post?
26780
26781 Gnus offers no real solutions to these questions, but I would very much
26782 like to see Gnus being used as a testing ground for new methods of
26783 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
26784 to separate the newsreader from the back ends, Gnus now offers a simple
26785 interface for anybody who wants to write new back ends for fetching mail
26786 and news from different sources.  I have added hooks for customizations
26787 everywhere I could imagine it being useful.  By doing so, I'm inviting
26788 every one of you to explore and invent.
26789
26790 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
26791 @kbd{C-u 100 M-x all-hail-xemacs}.
26792
26793
26794 @node Compatibility
26795 @subsection Compatibility
26796
26797 @cindex compatibility
26798 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
26799 bindings have been kept.  More key bindings have been added, of course,
26800 but only in one or two obscure cases have old bindings been changed.
26801
26802 Our motto is:
26803 @quotation
26804 @cartouche
26805 @center In a cloud bones of steel.
26806 @end cartouche
26807 @end quotation
26808
26809 All commands have kept their names.  Some internal functions have changed
26810 their names.
26811
26812 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
26813 Articles}.
26814
26815 One major compatibility question is the presence of several summary
26816 buffers.  All variables relevant while reading a group are
26817 buffer-local to the summary buffer they belong in.  Although many
26818 important variables have their values copied into their global
26819 counterparts whenever a command is executed in the summary buffer, this
26820 change might lead to incorrect values being used unless you are careful.
26821
26822 All code that relies on knowledge of @sc{gnus} internals will probably
26823 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
26824 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
26825 maintains a hash table that points to the entries in this alist (which
26826 speeds up many functions), and changing the alist directly will lead to
26827 peculiar results.
26828
26829 @cindex hilit19
26830 @cindex highlighting
26831 Old hilit19 code does not work at all.  In fact, you should probably
26832 remove all hilit code from all Gnus hooks
26833 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
26834 Gnus provides various integrated functions for highlighting.  These are
26835 faster and more accurate.  To make life easier for everybody, Gnus will
26836 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
26837 Away!
26838
26839 Packages like @code{expire-kill} will no longer work.  As a matter of
26840 fact, you should probably remove all old @sc{gnus} packages (and other
26841 code) when you start using Gnus.  More likely than not, Gnus already
26842 does what you have written code to make @sc{gnus} do.  (Snicker.)
26843
26844 Even though old methods of doing things are still supported, only the
26845 new methods are documented in this manual.  If you detect a new method of
26846 doing something while reading this manual, that does not mean you have
26847 to stop doing it the old way.
26848
26849 Gnus understands all @sc{gnus} startup files.
26850
26851 @kindex M-x gnus-bug
26852 @findex gnus-bug
26853 @cindex reporting bugs
26854 @cindex bugs
26855 Overall, a casual user who hasn't written much code that depends on
26856 @sc{gnus} internals should suffer no problems.  If problems occur,
26857 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
26858
26859 @vindex gnus-bug-create-help-buffer
26860 If you are in the habit of sending bug reports @emph{very} often, you
26861 may find the helpful help buffer annoying after a while.  If so, set
26862 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
26863 up at you.
26864
26865
26866 @node Conformity
26867 @subsection Conformity
26868
26869 No rebels without a clue here, ma'am.  We conform to all standards known
26870 to (wo)man.  Except for those standards and/or conventions we disagree
26871 with, of course.
26872
26873 @table @strong
26874
26875 @item RFC (2)822
26876 @cindex RFC 822
26877 @cindex RFC 2822
26878 There are no known breaches of this standard.
26879
26880 @item RFC 1036
26881 @cindex RFC 1036
26882 There are no known breaches of this standard, either.
26883
26884 @item Son-of-RFC 1036
26885 @cindex Son-of-RFC 1036
26886 We do have some breaches to this one.
26887
26888 @table @emph
26889
26890 @item X-Newsreader
26891 @itemx User-Agent
26892 These are considered to be ``vanity headers'', while I consider them
26893 to be consumer information.  After seeing so many badly formatted
26894 articles coming from @code{tin} and @code{Netscape} I know not to use
26895 either of those for posting articles.  I would not have known that if
26896 it wasn't for the @code{X-Newsreader} header.
26897 @end table
26898
26899 @item USEFOR
26900 @cindex USEFOR
26901 USEFOR is an IETF working group writing a successor to RFC 1036, based
26902 on Son-of-RFC 1036.  They have produced a number of drafts proposing
26903 various changes to the format of news articles.  The Gnus towers will
26904 look into implementing the changes when the draft is accepted as an RFC.
26905
26906 @item MIME - RFC 2045-2049 etc
26907 @cindex @acronym{MIME}
26908 All the various @acronym{MIME} RFCs are supported.
26909
26910 @item Disposition Notifications - RFC 2298
26911 Message Mode is able to request notifications from the receiver.
26912
26913 @item PGP - RFC 1991 and RFC 2440
26914 @cindex RFC 1991
26915 @cindex RFC 2440
26916 RFC 1991 is the original @acronym{PGP} message specification,
26917 published as an informational RFC.  RFC 2440 was the follow-up, now
26918 called Open PGP, and put on the Standards Track.  Both document a
26919 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
26920 encoding (signing and encryption) and decoding (verification and
26921 decryption).
26922
26923 @item PGP/MIME - RFC 2015/3156
26924 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
26925 1991) describes the @acronym{MIME}-wrapping around the RFC 1991/2440 format.
26926 Gnus supports both encoding and decoding.
26927
26928 @item S/MIME - RFC 2633
26929 RFC 2633 describes the @acronym{S/MIME} format.
26930
26931 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
26932 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
26933 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
26934 authentication for @acronym{IMAP}.  RFC 2086 describes access control
26935 lists (ACLs) for @acronym{IMAP}.  RFC 2359 describes a @acronym{IMAP}
26936 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
26937 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
26938 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
26939
26940 @end table
26941
26942 If you ever notice Gnus acting non-compliant with regards to the texts
26943 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
26944 know.
26945
26946
26947 @node Emacsen
26948 @subsection Emacsen
26949 @cindex Emacsen
26950 @cindex XEmacs
26951 @cindex Mule
26952 @cindex Emacs
26953
26954 This version of Gnus should work on:
26955
26956 @itemize @bullet
26957
26958 @item
26959 Emacs 21.1 and up.
26960
26961 @item
26962 XEmacs 21.4 and up.
26963
26964 @end itemize
26965
26966 This Gnus version will absolutely not work on any Emacsen older than
26967 that.  Not reliably, at least.  Older versions of Gnus may work on older
26968 Emacs versions.  Particularly, Gnus 5.10.8 should also work on Emacs
26969 20.7 and XEmacs 21.1.
26970
26971 @c No-merge comment: The paragraph added in v5-10 here must not be
26972 @c synced here!
26973
26974 @node Gnus Development
26975 @subsection Gnus Development
26976
26977 Gnus is developed in a two-phased cycle.  The first phase involves much
26978 discussion on the development mailing list @samp{ding@@gnus.org}, where people
26979 propose changes and new features, post patches and new back ends.  This
26980 phase is called the @dfn{alpha} phase, since the Gnusae released in this
26981 phase are @dfn{alpha releases}, or (perhaps more commonly in other
26982 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
26983 unstable and should not be used by casual users.  Gnus alpha releases
26984 have names like ``Oort Gnus'' and ``No Gnus''.  @xref{Gnus Versions}.
26985
26986 After futzing around for 10-100 alpha releases, Gnus is declared
26987 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
26988 and is called things like ``Gnus 5.10.1'' instead.  Normal people are
26989 supposed to be able to use these, and these are mostly discussed on the
26990 @samp{gnu.emacs.gnus} newsgroup.  This newgroup is mirrored to the
26991 mailing list @samp{info-gnus-english@@gnu.org} which is carried on Gmane
26992 as @samp{gmane.emacs.gnus.user}.  These releases are finally integrated
26993 in Emacs.
26994
26995 @cindex Incoming*
26996 @vindex mail-source-delete-incoming
26997 Some variable defaults differ between alpha Gnusae and released Gnusae,
26998 in particular, @code{mail-source-delete-incoming}.  This is to prevent
26999 lossage of mail if an alpha release hiccups while handling the mail.
27000 @xref{Mail Source Customization}.
27001
27002 The division of discussion between the ding mailing list and the Gnus
27003 newsgroup is not purely based on publicity concerns.  It's true that
27004 having people write about the horrible things that an alpha Gnus release
27005 can do (sometimes) in a public forum may scare people off, but more
27006 importantly, talking about new experimental features that have been
27007 introduced may confuse casual users.  New features are frequently
27008 introduced, fiddled with, and judged to be found wanting, and then
27009 either discarded or totally rewritten.  People reading the mailing list
27010 usually keep up with these rapid changes, while people on the newsgroup
27011 can't be assumed to do so.
27012
27013 So if you have problems with or questions about the alpha versions,
27014 direct those to the ding mailing list @samp{ding@@gnus.org}.  This list
27015 is also available on Gmane as @samp{gmane.emacs.gnus.general}.
27016
27017 @cindex Incoming*
27018 @vindex mail-source-delete-incoming
27019 Some variable defaults differ between alpha Gnusae and released Gnusae,
27020 in particular, @code{mail-source-delete-incoming}.  This is to prevent
27021 lossage of mail if an alpha release hiccups while handling the mail.
27022 @xref{Mail Source Customization}.
27023
27024 @node Contributors
27025 @subsection Contributors
27026 @cindex contributors
27027
27028 The new Gnus version couldn't have been done without the help of all the
27029 people on the (ding) mailing list.  Every day for over a year I have
27030 gotten billions of nice bug reports from them, filling me with joy,
27031 every single one of them.  Smooches.  The people on the list have been
27032 tried beyond endurance, what with my ``oh, that's a neat idea <type
27033 type>, yup, I'll release it right away <ship off> no wait, that doesn't
27034 work at all <type type>, yup, I'll ship that one off right away <ship
27035 off> no, wait, that absolutely does not work'' policy for releases.
27036 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
27037 ``worser''? ``much worser''?  ``worsest''?)
27038
27039 I would like to take this opportunity to thank the Academy for@dots{}  oops,
27040 wrong show.
27041
27042 @itemize @bullet
27043
27044 @item
27045 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
27046
27047 @item
27048 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
27049 nnwarchive and many, many other things connected with @acronym{MIME} and
27050 other types of en/decoding, as well as general bug fixing, new
27051 functionality and stuff.
27052
27053 @item
27054 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
27055 well as numerous other things).
27056
27057 @item
27058 Luis Fernandes---design and graphics.
27059
27060 @item
27061 Joe Reiss---creator of the smiley faces.
27062
27063 @item
27064 Justin Sheehy---the @acronym{FAQ} maintainer.
27065
27066 @item
27067 Erik Naggum---help, ideas, support, code and stuff.
27068
27069 @item
27070 Wes Hardaker---@file{gnus-picon.el} and the manual section on
27071 @dfn{picons} (@pxref{Picons}).
27072
27073 @item
27074 Kim-Minh Kaplan---further work on the picon code.
27075
27076 @item
27077 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section.
27078
27079 @item
27080 Sudish Joseph---innumerable bug fixes.
27081
27082 @item
27083 Ilja Weis---@file{gnus-topic.el}.
27084
27085 @item
27086 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
27087
27088 @item
27089 Vladimir Alexiev---the refcard and reference booklets.
27090
27091 @item
27092 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
27093 distribution by Felix Lee and JWZ.
27094
27095 @item
27096 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
27097
27098 @item
27099 Peter Mutsaers---orphan article scoring code.
27100
27101 @item
27102 Ken Raeburn---POP mail support.
27103
27104 @item
27105 Hallvard B Furuseth---various bits and pieces, especially dealing with
27106 .newsrc files.
27107
27108 @item
27109 Brian Edmonds---@file{gnus-bbdb.el}.
27110
27111 @item
27112 David Moore---rewrite of @file{nnvirtual.el} and many other things.
27113
27114 @item
27115 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
27116
27117 @item
27118 Fran@,{c}ois Pinard---many, many interesting and thorough bug reports, as
27119 well as autoconf support.
27120
27121 @end itemize
27122
27123 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
27124 Borges, and Jost Krieger proof-reading parts of the manual.
27125
27126 The following people have contributed many patches and suggestions:
27127
27128 Christopher Davis,
27129 Andrew Eskilsson,
27130 Kai Grossjohann,
27131 Kevin Greiner,
27132 Jesper Harder,
27133 Paul Jarc,
27134 Simon Josefsson,
27135 David K@aa{}gedal,
27136 Richard Pieri,
27137 Fabrice Popineau,
27138 Daniel Quinlan,
27139 Michael Shields,
27140 Reiner Steib,
27141 Jason L. Tibbitts, III,
27142 Jack Vinson,
27143 Katsumi Yamaoka, @c Yamaoka
27144 and
27145 Teodor Zlatanov.
27146
27147 Also thanks to the following for patches and stuff:
27148
27149 Jari Aalto,
27150 Adrian Aichner,
27151 Vladimir Alexiev,
27152 Russ Allbery,
27153 Peter Arius,
27154 Matt Armstrong,
27155 Marc Auslander,
27156 Miles Bader,
27157 Alexei V. Barantsev,
27158 Frank Bennett,
27159 Robert Bihlmeyer,
27160 Chris Bone,
27161 Mark Borges,
27162 Mark Boyns,
27163 Lance A. Brown,
27164 Rob Browning,
27165 Kees de Bruin,
27166 Martin Buchholz,
27167 Joe Buehler,
27168 Kevin Buhr,
27169 Alastair Burt,
27170 Joao Cachopo,
27171 Zlatko Calusic,
27172 Massimo Campostrini,
27173 Castor,
27174 David Charlap,
27175 Dan Christensen,
27176 Kevin Christian,
27177 Jae-you Chung, @c ?
27178 James H. Cloos, Jr.,
27179 Laura Conrad,
27180 Michael R. Cook,
27181 Glenn Coombs,
27182 Andrew J. Cosgriff,
27183 Neil Crellin,
27184 Frank D. Cringle,
27185 Geoffrey T. Dairiki,
27186 Andre Deparade,
27187 Ulrik Dickow,
27188 Dave Disser,
27189 Rui-Tao Dong, @c ?
27190 Joev Dubach,
27191 Michael Welsh Duggan,
27192 Dave Edmondson,
27193 Paul Eggert,
27194 Mark W. Eichin,
27195 Karl Eichwalder,
27196 Enami Tsugutomo, @c Enami
27197 Michael Ernst,
27198 Luc Van Eycken,
27199 Sam Falkner,
27200 Nelson Jose dos Santos Ferreira,
27201 Sigbjorn Finne,
27202 Sven Fischer,
27203 Paul Fisher,
27204 Decklin Foster,
27205 Gary D. Foster,
27206 Paul Franklin,
27207 Guy Geens,
27208 Arne Georg Gleditsch,
27209 David S. Goldberg,
27210 Michelangelo Grigni,
27211 Dale Hagglund,
27212 D. Hall,
27213 Magnus Hammerin,
27214 Kenichi Handa, @c Handa
27215 Raja R. Harinath,
27216 Yoshiki Hayashi, @c Hayashi
27217 P. E. Jareth Hein,
27218 Hisashige Kenji, @c Hisashige
27219 Scott Hofmann,
27220 Tassilo Horn,
27221 Marc Horowitz,
27222 Gunnar Horrigmo,
27223 Richard Hoskins,
27224 Brad Howes,
27225 Miguel de Icaza,
27226 Fran@,{c}ois Felix Ingrand,
27227 Tatsuya Ichikawa, @c Ichikawa
27228 Ishikawa Ichiro, @c Ishikawa
27229 Lee Iverson,
27230 Iwamuro Motonori, @c Iwamuro
27231 Rajappa Iyer,
27232 Andreas Jaeger,
27233 Adam P. Jenkins,
27234 Randell Jesup,
27235 Fred Johansen,
27236 Gareth Jones,
27237 Greg Klanderman,
27238 Karl Kleinpaste,
27239 Michael Klingbeil,
27240 Peter Skov Knudsen,
27241 Shuhei Kobayashi, @c Kobayashi
27242 Petr Konecny,
27243 Koseki Yoshinori, @c Koseki
27244 Thor Kristoffersen,
27245 Jens Lautenbacher,
27246 Martin Larose,
27247 Seokchan Lee, @c Lee
27248 Joerg Lenneis,
27249 Carsten Leonhardt,
27250 James LewisMoss,
27251 Christian Limpach,
27252 Markus Linnala,
27253 Dave Love,
27254 Mike McEwan,
27255 Tonny Madsen,
27256 Shlomo Mahlab,
27257 Nat Makarevitch,
27258 Istvan Marko,
27259 David Martin,
27260 Jason R. Mastaler,
27261 Gordon Matzigkeit,
27262 Timo Metzemakers,
27263 Richard Mlynarik,
27264 Lantz Moore,
27265 Morioka Tomohiko, @c Morioka
27266 Erik Toubro Nielsen,
27267 Hrvoje Niksic,
27268 Andy Norman,
27269 Fred Oberhauser,
27270 C. R. Oldham,
27271 Alexandre Oliva,
27272 Ken Olstad,
27273 Masaharu Onishi, @c Onishi
27274 Hideki Ono, @c Ono
27275 Ettore Perazzoli,
27276 William Perry,
27277 Stephen Peters,
27278 Jens-Ulrik Holger Petersen,
27279 Ulrich Pfeifer,
27280 Matt Pharr,
27281 Andy Piper,
27282 John McClary Prevost,
27283 Bill Pringlemeir,
27284 Mike Pullen,
27285 Jim Radford,
27286 Colin Rafferty,
27287 Lasse Rasinen,
27288 Lars Balker Rasmussen,
27289 Joe Reiss,
27290 Renaud Rioboo,
27291 Roland B. Roberts,
27292 Bart Robinson,
27293 Christian von Roques,
27294 Markus Rost,
27295 Jason Rumney,
27296 Wolfgang Rupprecht,
27297 Jay Sachs,
27298 Dewey M. Sasser,
27299 Conrad Sauerwald,
27300 Loren Schall,
27301 Dan Schmidt,
27302 Ralph Schleicher,
27303 Philippe Schnoebelen,
27304 Andreas Schwab,
27305 Randal L. Schwartz,
27306 Danny Siu,
27307 Matt Simmons,
27308 Paul D. Smith,
27309 Jeff Sparkes,
27310 Toby Speight,
27311 Michael Sperber,
27312 Darren Stalder,
27313 Richard Stallman,
27314 Greg Stark,
27315 Sam Steingold,
27316 Paul Stevenson,
27317 Jonas Steverud,
27318 Paul Stodghill,
27319 Kiyokazu Suto, @c Suto
27320 Kurt Swanson,
27321 Samuel Tardieu,
27322 Teddy,
27323 Chuck Thompson,
27324 Tozawa Akihiko, @c Tozawa
27325 Philippe Troin,
27326 James Troup,
27327 Trung Tran-Duc,
27328 Jack Twilley,
27329 Aaron M. Ucko,
27330 Aki Vehtari,
27331 Didier Verna,
27332 Vladimir Volovich,
27333 Jan Vroonhof,
27334 Stefan Waldherr,
27335 Pete Ware,
27336 Barry A. Warsaw,
27337 Christoph Wedler,
27338 Joe Wells,
27339 Lee Willis,
27340 and
27341 Lloyd Zusman.
27342
27343
27344 For a full overview of what each person has done, the ChangeLogs
27345 included in the Gnus alpha distributions should give ample reading
27346 (550kB and counting).
27347
27348 Apologies to everybody that I've forgotten, of which there are many, I'm
27349 sure.
27350
27351 Gee, that's quite a list of people.  I guess that must mean that there
27352 actually are people who are using Gnus.  Who'd'a thunk it!
27353
27354
27355 @node New Features
27356 @subsection New Features
27357 @cindex new features
27358
27359 @menu
27360 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
27361 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
27362 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
27363 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
27364 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
27365 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10/5.11.
27366 * No Gnus::                     Very punny.
27367 @end menu
27368
27369 These lists are, of course, just @emph{short} overviews of the
27370 @emph{most} important new features.  No, really.  There are tons more.
27371 Yes, we have feeping creaturism in full effect.
27372
27373 @node ding Gnus
27374 @subsubsection (ding) Gnus
27375
27376 New features in Gnus 5.0/5.1:
27377
27378 @itemize @bullet
27379
27380 @item
27381 The look of all buffers can be changed by setting format-like variables
27382 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
27383
27384 @item
27385 Local spool and several @acronym{NNTP} servers can be used at once
27386 (@pxref{Select Methods}).
27387
27388 @item
27389 You can combine groups into virtual groups (@pxref{Virtual Groups}).
27390
27391 @item
27392 You can read a number of different mail formats (@pxref{Getting Mail}).
27393 All the mail back ends implement a convenient mail expiry scheme
27394 (@pxref{Expiring Mail}).
27395
27396 @item
27397 Gnus can use various strategies for gathering threads that have lost
27398 their roots (thereby gathering loose sub-threads into one thread) or it
27399 can go back and retrieve enough headers to build a complete thread
27400 (@pxref{Customizing Threading}).
27401
27402 @item
27403 Killed groups can be displayed in the group buffer, and you can read
27404 them as well (@pxref{Listing Groups}).
27405
27406 @item
27407 Gnus can do partial group updates---you do not have to retrieve the
27408 entire active file just to check for new articles in a few groups
27409 (@pxref{The Active File}).
27410
27411 @item
27412 Gnus implements a sliding scale of subscribedness to groups
27413 (@pxref{Group Levels}).
27414
27415 @item
27416 You can score articles according to any number of criteria
27417 (@pxref{Scoring}).  You can even get Gnus to find out how to score
27418 articles for you (@pxref{Adaptive Scoring}).
27419
27420 @item
27421 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
27422 manner, so it should be difficult to lose much data on what you have
27423 read if your machine should go down (@pxref{Auto Save}).
27424
27425 @item
27426 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
27427 cluttering up the @file{.emacs} file.
27428
27429 @item
27430 You can set the process mark on both groups and articles and perform
27431 operations on all the marked items (@pxref{Process/Prefix}).
27432
27433 @item
27434 You can grep through a subset of groups and create a group from the
27435 results (@pxref{Kibozed Groups}).
27436
27437 @item
27438 You can list subsets of groups according to, well, anything
27439 (@pxref{Listing Groups}).
27440
27441 @item
27442 You can browse foreign servers and subscribe to groups from those
27443 servers (@pxref{Browse Foreign Server}).
27444
27445 @item
27446 Gnus can fetch articles, asynchronously, on a second connection to the
27447 server (@pxref{Asynchronous Fetching}).
27448
27449 @item
27450 You can cache articles locally (@pxref{Article Caching}).
27451
27452 @item
27453 The uudecode functions have been expanded and generalized
27454 (@pxref{Decoding Articles}).
27455
27456 @item
27457 You can still post uuencoded articles, which was a little-known feature
27458 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
27459
27460 @item
27461 Fetching parents (and other articles) now actually works without
27462 glitches (@pxref{Finding the Parent}).
27463
27464 @item
27465 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
27466
27467 @item
27468 Digests (and other files) can be used as the basis for groups
27469 (@pxref{Document Groups}).
27470
27471 @item
27472 Articles can be highlighted and customized (@pxref{Customizing
27473 Articles}).
27474
27475 @item
27476 URLs and other external references can be buttonized (@pxref{Article
27477 Buttons}).
27478
27479 @item
27480 You can do lots of strange stuff with the Gnus window & frame
27481 configuration (@pxref{Window Layout}).
27482
27483 @item
27484 You can click on buttons instead of using the keyboard
27485 (@pxref{Buttons}).
27486
27487 @end itemize
27488
27489
27490 @node September Gnus
27491 @subsubsection September Gnus
27492
27493 @iftex
27494 @iflatex
27495 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
27496 @end iflatex
27497 @end iftex
27498
27499 New features in Gnus 5.2/5.3:
27500
27501 @itemize @bullet
27502
27503 @item
27504 A new message composition mode is used.  All old customization variables
27505 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
27506 now obsolete.
27507
27508 @item
27509 Gnus is now able to generate @dfn{sparse} threads---threads where
27510 missing articles are represented by empty nodes (@pxref{Customizing
27511 Threading}).
27512
27513 @lisp
27514 (setq gnus-build-sparse-threads 'some)
27515 @end lisp
27516
27517 @item
27518 Outgoing articles are stored on a special archive server
27519 (@pxref{Archived Messages}).
27520
27521 @item
27522 Partial thread regeneration now happens when articles are
27523 referred.
27524
27525 @item
27526 Gnus can make use of GroupLens predictions.
27527
27528 @item
27529 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
27530
27531 @item
27532 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
27533
27534 @lisp
27535 (setq gnus-use-trees t)
27536 @end lisp
27537
27538 @item
27539 An @code{nn}-like pick-and-read minor mode is available for the summary
27540 buffers (@pxref{Pick and Read}).
27541
27542 @lisp
27543 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
27544 @end lisp
27545
27546 @item
27547 In binary groups you can use a special binary minor mode (@pxref{Binary
27548 Groups}).
27549
27550 @item
27551 Groups can be grouped in a folding topic hierarchy (@pxref{Group
27552 Topics}).
27553
27554 @lisp
27555 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
27556 @end lisp
27557
27558 @item
27559 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
27560
27561 @item
27562 Groups can now have a score, and bubbling based on entry frequency
27563 is possible (@pxref{Group Score}).
27564
27565 @lisp
27566 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
27567 @end lisp
27568
27569 @item
27570 Groups can be process-marked, and commands can be performed on
27571 groups of groups (@pxref{Marking Groups}).
27572
27573 @item
27574 Caching is possible in virtual groups.
27575
27576 @item
27577 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
27578 news batches, ClariNet briefs collections, and just about everything
27579 else (@pxref{Document Groups}).
27580
27581 @item
27582 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
27583 (@pxref{SOUP}).
27584
27585 @item
27586 The Gnus cache is much faster.
27587
27588 @item
27589 Groups can be sorted according to many criteria (@pxref{Sorting
27590 Groups}).
27591
27592 @item
27593 New group parameters have been introduced to set list-addresses and
27594 expiry times (@pxref{Group Parameters}).
27595
27596 @item
27597 All formatting specs allow specifying faces to be used
27598 (@pxref{Formatting Fonts}).
27599
27600 @item
27601 There are several more commands for setting/removing/acting on process
27602 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
27603
27604 @item
27605 The summary buffer can be limited to show parts of the available
27606 articles based on a wide range of criteria.  These commands have been
27607 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
27608
27609 @item
27610 Articles can be made persistent with the @kbd{*} command
27611 (@pxref{Persistent Articles}).
27612
27613 @item
27614 All functions for hiding article elements are now toggles.
27615
27616 @item
27617 Article headers can be buttonized (@pxref{Article Washing}).
27618
27619 @item
27620 All mail back ends support fetching articles by @code{Message-ID}.
27621
27622 @item
27623 Duplicate mail can now be treated properly (@pxref{Duplicates}).
27624
27625 @item
27626 All summary mode commands are available directly from the article
27627 buffer (@pxref{Article Keymap}).
27628
27629 @item
27630 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
27631 Layout}).
27632
27633 @item
27634 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
27635 @iftex
27636 @iflatex
27637 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
27638 @end iflatex
27639 @end iftex
27640
27641 @item
27642 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
27643
27644 @lisp
27645 (setq gnus-use-nocem t)
27646 @end lisp
27647
27648 @item
27649 Groups can be made permanently visible (@pxref{Listing Groups}).
27650
27651 @lisp
27652 (setq gnus-permanently-visible-groups "^nnml:")
27653 @end lisp
27654
27655 @item
27656 Many new hooks have been introduced to make customizing easier.
27657
27658 @item
27659 Gnus respects the @code{Mail-Copies-To} header.
27660
27661 @item
27662 Threads can be gathered by looking at the @code{References} header
27663 (@pxref{Customizing Threading}).
27664
27665 @lisp
27666 (setq gnus-summary-thread-gathering-function
27667       'gnus-gather-threads-by-references)
27668 @end lisp
27669
27670 @item
27671 Read articles can be stored in a special backlog buffer to avoid
27672 refetching (@pxref{Article Backlog}).
27673
27674 @lisp
27675 (setq gnus-keep-backlog 50)
27676 @end lisp
27677
27678 @item
27679 A clean copy of the current article is always stored in a separate
27680 buffer to allow easier treatment.
27681
27682 @item
27683 Gnus can suggest where to save articles (@pxref{Saving Articles}).
27684
27685 @item
27686 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
27687 Articles}).
27688
27689 @lisp
27690 (setq gnus-prompt-before-saving t)
27691 @end lisp
27692
27693 @item
27694 @code{gnus-uu} can view decoded files asynchronously while fetching
27695 articles (@pxref{Other Decode Variables}).
27696
27697 @lisp
27698 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
27699 @end lisp
27700
27701 @item
27702 Filling in the article buffer now works properly on cited text
27703 (@pxref{Article Washing}).
27704
27705 @item
27706 Hiding cited text adds buttons to toggle hiding, and how much
27707 cited text to hide is now customizable (@pxref{Article Hiding}).
27708
27709 @lisp
27710 (setq gnus-cited-lines-visible 2)
27711 @end lisp
27712
27713 @item
27714 Boring headers can be hidden (@pxref{Article Hiding}).
27715
27716 @item
27717 Default scoring values can now be set from the menu bar.
27718
27719 @item
27720 Further syntax checking of outgoing articles have been added.
27721
27722 @end itemize
27723
27724
27725 @node Red Gnus
27726 @subsubsection Red Gnus
27727
27728 New features in Gnus 5.4/5.5:
27729
27730 @iftex
27731 @iflatex
27732 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
27733 @end iflatex
27734 @end iftex
27735
27736 @itemize @bullet
27737
27738 @item
27739 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
27740
27741 @item
27742 Article prefetching functionality has been moved up into
27743 Gnus (@pxref{Asynchronous Fetching}).
27744
27745 @item
27746 Scoring can now be performed with logical operators like @code{and},
27747 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
27748 Scoring}).
27749
27750 @item
27751 Article washing status can be displayed in the
27752 article mode line (@pxref{Misc Article}).
27753
27754 @item
27755 @file{gnus.el} has been split into many smaller files.
27756
27757 @item
27758 Suppression of duplicate articles based on Message-ID can be done
27759 (@pxref{Duplicate Suppression}).
27760
27761 @lisp
27762 (setq gnus-suppress-duplicates t)
27763 @end lisp
27764
27765 @item
27766 New variables for specifying what score and adapt files are to be
27767 considered home score and adapt files (@pxref{Home Score File}) have
27768 been added.
27769
27770 @item
27771 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
27772 Server Internals}).
27773
27774 @item
27775 Groups can inherit group parameters from parent topics (@pxref{Topic
27776 Parameters}).
27777
27778 @item
27779 Article editing has been revamped and is now actually usable.
27780
27781 @item
27782 Signatures can be recognized in more intelligent fashions
27783 (@pxref{Article Signature}).
27784
27785 @item
27786 Summary pick mode has been made to look more @code{nn}-like.  Line
27787 numbers are displayed and the @kbd{.} command can be used to pick
27788 articles (@code{Pick and Read}).
27789
27790 @item
27791 Commands for moving the @file{.newsrc.eld} from one server to
27792 another have been added (@pxref{Changing Servers}).
27793
27794 @item
27795 There's a way now to specify that ``uninteresting'' fields be suppressed
27796 when generating lines in buffers (@pxref{Advanced Formatting}).
27797
27798 @item
27799 Several commands in the group buffer can be undone with @kbd{C-M-_}
27800 (@pxref{Undo}).
27801
27802 @item
27803 Scoring can be done on words using the new score type @code{w}
27804 (@pxref{Score File Format}).
27805
27806 @item
27807 Adaptive scoring can be done on a Subject word-by-word basis
27808 (@pxref{Adaptive Scoring}).
27809
27810 @lisp
27811 (setq gnus-use-adaptive-scoring '(word))
27812 @end lisp
27813
27814 @item
27815 Scores can be decayed (@pxref{Score Decays}).
27816
27817 @lisp
27818 (setq gnus-decay-scores t)
27819 @end lisp
27820
27821 @item
27822 Scoring can be performed using a regexp on the Date header.  The Date is
27823 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
27824
27825 @item
27826 A new command has been added to remove all data on articles from
27827 the native server (@pxref{Changing Servers}).
27828
27829 @item
27830 A new command for reading collections of documents
27831 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
27832 (@pxref{Really Various Summary Commands}).
27833
27834 @item
27835 Process mark sets can be pushed and popped (@pxref{Setting Process
27836 Marks}).
27837
27838 @item
27839 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
27840 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
27841
27842 @item
27843 A new back end for reading searches from Web search engines
27844 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
27845 (@pxref{Web Searches}).
27846
27847 @item
27848 Groups inside topics can now be sorted using the standard sorting
27849 functions, and each topic can be sorted independently (@pxref{Topic
27850 Sorting}).
27851
27852 @item
27853 Subsets of the groups can be sorted independently (@code{Sorting
27854 Groups}).
27855
27856 @item
27857 Cached articles can be pulled into the groups (@pxref{Summary Generation
27858 Commands}).
27859 @iftex
27860 @iflatex
27861 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
27862 @end iflatex
27863 @end iftex
27864
27865 @item
27866 Score files are now applied in a more reliable order (@pxref{Score
27867 Variables}).
27868
27869 @item
27870 Reports on where mail messages end up can be generated (@pxref{Splitting
27871 Mail}).
27872
27873 @item
27874 More hooks and functions have been added to remove junk from incoming
27875 mail before saving the mail (@pxref{Washing Mail}).
27876
27877 @item
27878 Emphasized text can be properly fontisized:
27879
27880 @end itemize
27881
27882
27883 @node Quassia Gnus
27884 @subsubsection Quassia Gnus
27885
27886 New features in Gnus 5.6:
27887
27888 @itemize @bullet
27889
27890 @item
27891 New functionality for using Gnus as an offline newsreader has been
27892 added.  A plethora of new commands and modes have been added.
27893 @xref{Gnus Unplugged}, for the full story.
27894
27895 @item
27896 The @code{nndraft} back end has returned, but works differently than
27897 before.  All Message buffers are now also articles in the @code{nndraft}
27898 group, which is created automatically.
27899
27900 @item
27901 @code{gnus-alter-header-function} can now be used to alter header
27902 values.
27903
27904 @item
27905 @code{gnus-summary-goto-article} now accept Message-ID's.
27906
27907 @item
27908 A new Message command for deleting text in the body of a message
27909 outside the region: @kbd{C-c C-v}.
27910
27911 @item
27912 You can now post to component group in @code{nnvirtual} groups with
27913 @kbd{C-u C-c C-c}.
27914
27915 @item
27916  @code{nntp-rlogin-program}---new variable to ease customization.
27917
27918 @item
27919 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
27920 re-highlighting of the article buffer.
27921
27922 @item
27923 New element in @code{gnus-boring-article-headers}---@code{long-to}.
27924
27925 @item
27926 @kbd{M-i} symbolic prefix command.  @xref{Symbolic Prefixes}, for
27927 details.
27928
27929 @item
27930 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
27931 @kbd{a} to add the score rule to the @file{all.SCORE} file.
27932
27933 @item
27934 @code{gnus-simplify-subject-functions} variable to allow greater
27935 control over simplification.
27936
27937 @item
27938 @kbd{A T}---new command for fetching the current thread.
27939
27940 @item
27941 @kbd{/ T}---new command for including the current thread in the
27942 limit.
27943
27944 @item
27945 @kbd{M-RET} is a new Message command for breaking cited text.
27946
27947 @item
27948 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
27949
27950 @item
27951 The @code{custom-face-lookup} function has been removed.
27952 If you used this function in your initialization files, you must
27953 rewrite them to use @code{face-spec-set} instead.
27954
27955 @item
27956 Canceling now uses the current select method.  Symbolic prefix
27957 @kbd{a} forces normal posting method.
27958
27959 @item
27960 New command to translate M******** sm*rtq**t*s into proper
27961 text---@kbd{W d}.
27962
27963 @item
27964 For easier debugging of @code{nntp}, you can set
27965 @code{nntp-record-commands} to a non-@code{nil} value.
27966
27967 @item
27968 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
27969 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
27970
27971 @item
27972 A command for editing group parameters from the summary buffer
27973 has been added.
27974
27975 @item
27976 A history of where mails have been split is available.
27977
27978 @item
27979 A new article date command has been added---@code{article-date-iso8601}.
27980
27981 @item
27982 Subjects can be simplified when threading by setting
27983 @code{gnus-score-thread-simplify}.
27984
27985 @item
27986 A new function for citing in Message has been
27987 added---@code{message-cite-original-without-signature}.
27988
27989 @item
27990 @code{article-strip-all-blank-lines}---new article command.
27991
27992 @item
27993 A new Message command to kill to the end of the article has
27994 been added.
27995
27996 @item
27997 A minimum adaptive score can be specified by using the
27998 @code{gnus-adaptive-word-minimum} variable.
27999
28000 @item
28001 The ``lapsed date'' article header can be kept continually
28002 updated by the @code{gnus-start-date-timer} command.
28003
28004 @item
28005 Web listserv archives can be read with the @code{nnlistserv} back end.
28006
28007 @item
28008 Old dejanews archives can now be read by @code{nnweb}.
28009
28010 @end itemize
28011
28012 @node Pterodactyl Gnus
28013 @subsubsection Pterodactyl Gnus
28014
28015 New features in Gnus 5.8:
28016
28017 @itemize @bullet
28018
28019 @item
28020 The mail-fetching functions have changed.  See the manual for the
28021 many details.  In particular, all procmail fetching variables are gone.
28022
28023 If you used procmail like in
28024
28025 @lisp
28026 (setq nnmail-use-procmail t)
28027 (setq nnmail-spool-file 'procmail)
28028 (setq nnmail-procmail-directory "~/mail/incoming/")
28029 (setq nnmail-procmail-suffix "\\.in")
28030 @end lisp
28031
28032 this now has changed to
28033
28034 @lisp
28035 (setq mail-sources
28036       '((directory :path "~/mail/incoming/"
28037                    :suffix ".in")))
28038 @end lisp
28039
28040 @xref{Mail Source Specifiers}.
28041
28042 @item
28043 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
28044 Gnus, and adds a slew of new commands.  See the manual for details.
28045
28046 @item
28047 Gnus has also been multilingualized.  This also affects too
28048 many parts of Gnus to summarize here, and adds many new variables.
28049
28050 @item
28051 @code{gnus-auto-select-first} can now be a function to be
28052 called to position point.
28053
28054 @item
28055 The user can now decide which extra headers should be included in
28056 summary buffers and @acronym{NOV} files.
28057
28058 @item
28059 @code{gnus-article-display-hook} has been removed.  Instead, a number
28060 of variables starting with @code{gnus-treat-} have been added.
28061
28062 @item
28063 The Gnus posting styles have been redone again and now works in a
28064 subtly different manner.
28065
28066 @item
28067 New web-based back ends have been added: @code{nnslashdot},
28068 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
28069 again, to keep up with ever-changing layouts.
28070
28071 @item
28072 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
28073
28074 @end itemize
28075
28076 @node Oort Gnus
28077 @subsubsection Oort Gnus
28078 @cindex Oort Gnus
28079
28080 New features in Gnus 5.10:
28081
28082 @itemize @bullet
28083
28084 @item Installation changes
28085 @c ***********************
28086
28087 @itemize @bullet
28088 @item
28089 Upgrading from previous (stable) version if you have used Oort.
28090
28091 If you have tried Oort (the unstable Gnus branch leading to this
28092 release) but went back to a stable version, be careful when upgrading to
28093 this version.  In particular, you will probably want to remove all
28094 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
28095 read from your @file{.newsrc.eld} instead of from the
28096 @file{.marks}/@file{.mrk} file where this release store flags.  See a
28097 later entry for more information about marks.  Note that downgrading
28098 isn't save in general.
28099
28100 @item
28101 Lisp files are now installed in @file{.../site-lisp/gnus/} by default.
28102 It defaulted to @file{.../site-lisp/} formerly.  In addition to this,
28103 the new installer issues a warning if other Gnus installations which
28104 will shadow the latest one are detected.  You can then remove those
28105 shadows manually or remove them using @code{make
28106 remove-installed-shadows}.
28107
28108 @item
28109 New @file{make.bat} for compiling and installing Gnus under MS Windows
28110
28111 Use @file{make.bat} if you want to install Gnus under MS Windows, the
28112 first argument to the batch-program should be the directory where
28113 @file{xemacs.exe} respectively @file{emacs.exe} is located, if you want
28114 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
28115 the second parameter.
28116
28117 @file{make.bat} has been rewritten from scratch, it now features
28118 automatic recognition of XEmacs and GNU Emacs, generates
28119 @file{gnus-load.el}, checks if errors occur while compilation and
28120 generation of info files and reports them at the end of the build
28121 process.  It now uses @code{makeinfo} if it is available and falls
28122 back to @file{infohack.el} otherwise.  @file{make.bat} should now
28123 install all files which are necessary to run Gnus and be generally a
28124 complete replacement for the @code{configure; make; make install}
28125 cycle used under Unix systems.
28126
28127 The new @file{make.bat} makes @file{make-x.bat} and @file{xemacs.mak}
28128 superfluous, so they have been removed.
28129
28130 @item
28131 @file{~/News/overview/} not used.
28132
28133 As a result of the following change, the @file{~/News/overview/}
28134 directory is not used any more.  You can safely delete the entire
28135 hierarchy.
28136
28137 @c FIXME: `gnus-load' is mentioned in README, which is not included in
28138 @c CVS.  We should find a better place for this item.
28139 @item
28140 @code{(require 'gnus-load)}
28141
28142 If you use a stand-alone Gnus distribution, you'd better add
28143 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
28144 lisp directory into load-path.
28145
28146 File @file{gnus-load.el} contains autoload commands, functions and variables,
28147 some of which may not be included in distributions of Emacsen.
28148
28149 @end itemize
28150
28151 @item New packages and libraries within Gnus
28152 @c *****************************************
28153
28154 @itemize @bullet
28155
28156 @item
28157 The revised Gnus @acronym{FAQ} is included in the manual,
28158 @xref{Frequently Asked Questions}.
28159
28160 @item
28161 @acronym{TLS} wrapper shipped with Gnus
28162
28163 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
28164 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
28165 @acronym{TLS}/@acronym{SSL} support via (external third party)
28166 @file{ssl.el} and OpenSSL still works.
28167
28168 @item
28169 Improved anti-spam features.
28170
28171 Gnus is now able to take out spam from your mail and news streams
28172 using a wide variety of programs and filter rules.  Among the supported
28173 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
28174 for easy use of external packages such as SpamAssassin and Hashcash
28175 are also new.  @ref{Thwarting Email Spam} and @ref{Spam Package}.
28176 @c FIXME: @xref{Spam Package}?.  Should this be under Misc?
28177
28178 @item
28179 Gnus supports server-side mail filtering using Sieve.
28180
28181 Sieve rules can be added as Group Parameters for groups, and the
28182 complete Sieve script is generated using @kbd{D g} from the Group
28183 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
28184 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
28185 manual @ref{Top, , Top, sieve, Emacs Sieve}.
28186
28187 @end itemize
28188
28189 @item Changes in group mode
28190 @c ************************
28191
28192 @itemize @bullet
28193
28194 @item
28195 @code{gnus-group-read-ephemeral-group} can be called interactively,
28196 using @kbd{G M}.
28197
28198 @item
28199 Retrieval of charters and control messages
28200
28201 There are new commands for fetching newsgroup charters (@kbd{H c}) and
28202 control messages (@kbd{H C}).
28203
28204 @item
28205 The new variable @code{gnus-parameters} can be used to set group parameters.
28206
28207 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
28208 the parameters in @file{~/.newsrc.eld}, but via this variable you can
28209 enjoy the powers of customize, and simplified backups since you set the
28210 variable in @file{~/.gnus.el} instead of @file{~/.newsrc.eld}.  The
28211 variable maps regular expressions matching group names to group
28212 parameters, a'la:
28213 @lisp
28214 (setq gnus-parameters
28215       '(("mail\\..*"
28216          (gnus-show-threads nil)
28217          (gnus-use-scoring nil))
28218         ("^nnimap:\\(foo.bar\\)$"
28219          (to-group . "\\1"))))
28220 @end lisp
28221
28222 @item
28223 Unread count correct in nnimap groups.
28224
28225 The estimated number of unread articles in the group buffer should now
28226 be correct for nnimap groups.  This is achieved by calling
28227 @code{nnimap-fixup-unread-after-getting-new-news} from the
28228 @code{gnus-setup-news-hook} (called on startup) and
28229 @code{gnus-after-getting-new-news-hook}. (called after getting new
28230 mail).  If you have modified those variables from the default, you may
28231 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
28232 you were happy with the estimate and want to save some (minimal) time
28233 when getting new mail, remove the function.
28234
28235 @item
28236 Group names are treated as UTF-8 by default.
28237
28238 This is supposedly what USEFOR wanted to migrate to.  See
28239 @code{gnus-group-name-charset-group-alist} and
28240 @code{gnus-group-name-charset-method-alist} for customization.
28241
28242 @item
28243 @code{gnus-group-charset-alist} and
28244 @code{gnus-group-ignored-charsets-alist}.
28245
28246 The regexps in these variables are compared with full group names
28247 instead of real group names in 5.8.  Users who customize these
28248 variables should change those regexps accordingly.  For example:
28249 @lisp
28250 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
28251 @end lisp
28252
28253 @item
28254 Old intermediate incoming mail files (@file{Incoming*}) are deleted
28255 after a couple of days, not immediately.  @xref{Mail Source
28256 Customization}.  (New in Gnus 5.10.10 / Emacs 22.2)
28257
28258 @end itemize
28259
28260 @item Changes in summary and article mode
28261 @c **************************************
28262
28263 @itemize @bullet
28264
28265 @item
28266 @kbd{F} (@code{gnus-article-followup-with-original}) and @kbd{R}
28267 (@code{gnus-article-reply-with-original}) only yank the text in the
28268 region if the region is active.
28269
28270 @item
28271 In draft groups, @kbd{e} is now bound to @code{gnus-draft-edit-message}.
28272 Use @kbd{B w} for @code{gnus-summary-edit-article} instead.
28273
28274 @item
28275 Article Buttons
28276
28277 More buttons for URLs, mail addresses, Message-IDs, Info links, man
28278 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
28279 variables @code{gnus-button-@var{*}-level} can be used to control the
28280 appearance of all article buttons.  @xref{Article Button Levels}.
28281
28282 @item
28283 Single-part yenc encoded attachments can be decoded.
28284
28285 @item
28286 Picons
28287
28288 The picons code has been reimplemented to work in GNU Emacs---some of
28289 the previous options have been removed or renamed.
28290
28291 Picons are small ``personal icons'' representing users, domain and
28292 newsgroups, which can be displayed in the Article buffer.
28293 @xref{Picons}.
28294
28295 @item
28296 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
28297 boundary line is drawn at the end of the headers.
28298
28299 @item
28300 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
28301
28302 @item
28303 The Summary Buffer uses an arrow in the fringe to indicate the current
28304 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
28305
28306 @item
28307 Warn about email replies to news
28308
28309 Do you often find yourself replying to news by email by mistake?  Then
28310 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
28311 you.
28312
28313 @item
28314 If the new option @code{gnus-summary-display-while-building} is
28315 non-@code{nil}, the summary buffer is shown and updated as it's being
28316 built.
28317
28318 @item
28319 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
28320 opposed to old but unread messages).
28321
28322 @item
28323 Gnus supports RFC 2369 mailing list headers, and adds a number of
28324 related commands in mailing list groups.  @xref{Mailing List}.
28325
28326 @item
28327 The Date header can be displayed in a format that can be read aloud
28328 in English.  @xref{Article Date}.
28329
28330 @item
28331 diffs are automatically highlighted in groups matching
28332 @code{mm-uu-diff-groups-regexp}
28333
28334 @item
28335 Better handling of Microsoft citation styles
28336
28337 Gnus now tries to recognize the mangled header block that some Microsoft
28338 mailers use to indicate that the rest of the message is a citation, even
28339 though it is not quoted in any way.  The variable
28340 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
28341 citations.
28342
28343 The new command @kbd{W Y f}
28344 (@code{gnus-article-outlook-deuglify-article}) allows deuglifying broken
28345 Outlook (Express) articles.
28346
28347 @item
28348 @code{gnus-article-skip-boring}
28349
28350 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
28351 not scroll down to show you a page that contains only boring text,
28352 which by default means cited text and signature.  You can customize
28353 what is skippable using @code{gnus-article-boring-faces}.
28354
28355 This feature is especially useful if you read many articles that
28356 consist of a little new content at the top with a long, untrimmed
28357 message cited below.
28358
28359 @item
28360 Smileys (@samp{:-)}, @samp{;-)} etc) are now displayed graphically in
28361 Emacs too.
28362
28363 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.gnus.el} to
28364 disable it.
28365
28366 @item
28367 Face headers handling.  @xref{Face}.
28368
28369 @item
28370 In the summary buffer, the new command @kbd{/ N} inserts new messages
28371 and @kbd{/ o} inserts old messages.
28372
28373 @item
28374 Gnus decodes morse encoded messages if you press @kbd{W m}.
28375
28376 @item
28377 @code{gnus-summary-line-format}
28378
28379 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
28380 %s\n}.  Moreover @code{gnus-extra-headers},
28381 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
28382 changed their default so that the users name will be replaced by the
28383 recipient's name or the group name posting to for @acronym{NNTP}
28384 groups.
28385
28386 @item
28387 Deleting of attachments.
28388
28389 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
28390 on @acronym{MIME} buttons) saves a part and replaces the part with an
28391 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
28392 @acronym{MIME} buttons) removes a part.  It works only on back ends
28393 that support editing.
28394
28395 @item
28396 @code{gnus-default-charset}
28397
28398 The default value is determined from the
28399 @code{current-language-environment} variable, instead of
28400 @code{iso-8859-1}.  Also the @samp{.*} item in
28401 @code{gnus-group-charset-alist} is removed.
28402
28403 @item
28404 Printing capabilities are enhanced.
28405
28406 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
28407 Article buffers.  Also, each individual @acronym{MIME} part can be
28408 printed using @kbd{p} on the @acronym{MIME} button.
28409
28410 @item
28411 Extended format specs.
28412
28413 Format spec @samp{%&user-date;} is added into
28414 @code{gnus-summary-line-format-alist}.  Also, user defined extended
28415 format specs are supported.  The extended format specs look like
28416 @samp{%u&foo;}, which invokes function
28417 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
28418 escape character, old user defined format @samp{%u&} is no longer supported.
28419
28420 @item
28421 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
28422 @c FIXME: Was this a user-visible change?
28423
28424 It was aliased to @kbd{Y c}
28425 (@code{gnus-summary-insert-cached-articles}).  The new function filters
28426 out other articles.
28427
28428 @item
28429 Some limiting commands accept a @kbd{C-u} prefix to negate the match.
28430
28431 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
28432 s}, @kbd{/ a}, and @kbd{/ x}
28433 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
28434 result will be to display all articles that do not match the expression.
28435
28436 @item
28437 Gnus inlines external parts (message/external).
28438
28439 @end itemize
28440
28441 @item Changes in Message mode and related Gnus features
28442 @c ****************************************************
28443
28444 @itemize @bullet
28445
28446 @item
28447 Delayed articles
28448
28449 You can delay the sending of a message with @kbd{C-c C-j} in the Message
28450 buffer.  The messages are delivered at specified time.  This is useful
28451 for sending yourself reminders.  @xref{Delayed Articles}.
28452
28453 @item
28454 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
28455 the nnml back end allows compressed message files.
28456
28457 @item
28458 The new option @code{gnus-gcc-mark-as-read} automatically marks
28459 Gcc articles as read.
28460
28461 @item
28462 Externalizing of attachments
28463
28464 If @code{gnus-gcc-externalize-attachments} or
28465 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
28466 local files as external parts.
28467
28468 @item
28469 The envelope sender address can be customized when using Sendmail.
28470 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
28471
28472 @item
28473 Gnus no longer generate the Sender: header automatically.
28474
28475 Earlier it was generated when the user configurable email address was
28476 different from the Gnus guessed default user address.  As the guessing
28477 algorithm is rarely correct these days, and (more controversially) the
28478 only use of the Sender: header was to check if you are entitled to
28479 cancel/supersede news (which is now solved by Cancel Locks instead,
28480 see another entry), generation of the header has been disabled by
28481 default.  See the variables @code{message-required-headers},
28482 @code{message-required-news-headers}, and
28483 @code{message-required-mail-headers}.
28484
28485 @item
28486 Features from third party @file{message-utils.el} added to @file{message.el}.
28487
28488 Message now asks if you wish to remove @samp{(was: <old subject>)} from
28489 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
28490 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
28491 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
28492 appropriate headers and a note in the body for cross-postings and
28493 followups (see the variables @code{message-cross-post-@var{*}}).
28494
28495 @item
28496 References and X-Draft-From headers are no longer generated when you
28497 start composing messages and @code{message-generate-headers-first} is
28498 @code{nil}.
28499
28500 @item
28501 Easy inclusion of X-Faces headers.  @xref{X-Face}.
28502
28503 @item
28504 Group Carbon Copy (GCC) quoting
28505
28506 To support groups that contains SPC and other weird characters, groups
28507 are quoted before they are placed in the Gcc: header.  This means
28508 variables such as @code{gnus-message-archive-group} should no longer
28509 contain quote characters to make groups containing SPC work.  Also, if
28510 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
28511 into two groups) you must change it to return the list
28512 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
28513 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
28514 was incorrect earlier, it just didn't generate any problems since it
28515 was inserted directly.
28516
28517 @item
28518 @code{message-insinuate-rmail}
28519
28520 Adding @code{(message-insinuate-rmail)} and @code{(setq
28521 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
28522 compose, reply and forward messages in message-mode, where you can
28523 enjoy the power of @acronym{MML}.
28524
28525 @item
28526 @code{message-minibuffer-local-map}
28527
28528 The line below enables BBDB in resending a message:
28529 @lisp
28530 (define-key message-minibuffer-local-map [(tab)]
28531   'bbdb-complete-name)
28532 @end lisp
28533
28534 @item
28535 @code{gnus-posting-styles}
28536
28537 Add a new format of match like
28538 @lisp
28539 ((header "to" "larsi.*org")
28540  (Organization "Somewhere, Inc."))
28541 @end lisp
28542 The old format like the lines below is obsolete, but still accepted.
28543 @lisp
28544 (header "to" "larsi.*org"
28545         (Organization "Somewhere, Inc."))
28546 @end lisp
28547
28548 @item
28549 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
28550
28551 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
28552 added into these two variables.  If you customized those, perhaps you
28553 need add those two headers too.
28554
28555 @item
28556 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
28557 composing messages, it is enabled by @code{use-hard-newlines}.
28558 Decoding format=flowed was present but not documented in earlier
28559 versions.
28560
28561 @item
28562 The option @code{mm-fill-flowed} can be used to disable treatment of
28563 ``format=flowed'' messages.  Also, flowed text is disabled when sending
28564 inline PGP signed messages.  @xref{Flowed text, , Flowed text,
28565 emacs-mime, The Emacs MIME Manual}.  (New in Gnus 5.10.7)
28566 @c This entry is also present in the node "No Gnus".
28567
28568 @item
28569 Gnus supports the generation of RFC 2298 Disposition Notification requests.
28570
28571 This is invoked with the @kbd{C-c M-n} key binding from message mode.
28572
28573 @item
28574 Message supports the Importance: (RFC 2156) header.
28575
28576 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
28577 the valid values.
28578
28579 @item
28580 Gnus supports Cancel Locks in News.
28581
28582 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
28583 used to determine if you wrote an article or not (for canceling and
28584 superseding).  Gnus generates a random password string the first time
28585 you post a message, and saves it in your @file{~/.emacs} using the Custom
28586 system.  While the variable is called @code{canlock-password}, it is not
28587 security sensitive data.  Publishing your canlock string on the web
28588 will not allow anyone to be able to anything she could not already do.
28589 The behavior can be changed by customizing @code{message-insert-canlock}.
28590
28591 @item
28592 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
28593 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
28594
28595 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
28596 additional Lisp libraries.  This add several menu items to the
28597 Attachments menu, and @kbd{C-c RET} key bindings, when composing
28598 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
28599
28600 @item
28601 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
28602 C-m}.
28603
28604 This change was made to avoid conflict with the standard binding of
28605 @code{back-to-indentation}, which is also useful in message mode.
28606
28607 @item
28608 The default for @code{message-forward-show-mml} changed to the symbol
28609 @code{best}.
28610
28611 The behavior for the @code{best} value is to show @acronym{MML} (i.e.,
28612 convert to @acronym{MIME}) when appropriate.  @acronym{MML} will not be
28613 used when forwarding signed or encrypted messages, as the conversion
28614 invalidate the digital signature.
28615
28616 @item
28617 If @code{auto-compression-mode} is enabled, attachments are automatically
28618 decompressed when activated.
28619 @c FIXME: Does this affect article or message mode?
28620
28621 @item
28622 Support for non-@acronym{ASCII} domain names
28623
28624 Message supports non-@acronym{ASCII} domain names in From:, To: and
28625 Cc: and will query you whether to perform encoding when you try to
28626 send a message.  The variable @code{message-use-idna} controls this.
28627 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
28628 and Cc: when you view a message.  The variable @code{gnus-use-idna}
28629 controls this.
28630
28631 @item You can now drag and drop attachments to the Message buffer.
28632 See @code{mml-dnd-protocol-alist} and @code{mml-dnd-attach-options}.
28633 @xref{MIME, ,MIME, message, Message Manual}.
28634 @c New in 5.10.9 / 5.11 (Emacs 22.1)
28635
28636 @item @code{auto-fill-mode} is enabled by default in Message mode.
28637 See @code{message-fill-column}.  @xref{Various Message Variables, ,
28638 Message Headers, message, Message Manual}.
28639 @c New in Gnus 5.10.12 / 5.11 (Emacs 22.3)
28640
28641 @end itemize
28642
28643 @item Changes in back ends
28644 @c ***********************
28645
28646 @itemize @bullet
28647 @item
28648 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
28649
28650 @item
28651 The nndoc back end now supports mailman digests and exim bounces.
28652
28653 @item
28654 Gnus supports Maildir groups.
28655
28656 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
28657
28658 @item
28659 The nnml and nnfolder back ends store marks for each groups.
28660
28661 This makes it possible to take backup of nnml/nnfolder servers/groups
28662 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
28663 makes it possible to share articles and marks between users (without
28664 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
28665 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
28666 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
28667 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
28668 another machine, Gnus will automatically use the @file{.marks} or
28669 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
28670 The new server variables @code{nnml-marks-is-evil} and
28671 @code{nnfolder-marks-is-evil} can be used to disable this feature.
28672
28673 @end itemize
28674
28675 @item Appearance
28676 @c *************
28677
28678 @itemize @bullet
28679
28680 @item
28681 The menu bar item (in Group and Summary buffer) named ``Misc'' has
28682 been renamed to ``Gnus''.
28683
28684 @item
28685 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
28686 renamed to ``Attachments''.  Note that this menu also contains security
28687 related stuff, like signing and encryption (@pxref{Security, Security,,
28688 message, Message Manual}).
28689
28690 @item
28691 The tool bars have been updated to use GNOME icons in Group, Summary and
28692 Message mode.  You can also customize the tool bars: @kbd{M-x
28693 customize-apropos RET -tool-bar$} should get you started.  This is a new
28694 feature in Gnus 5.10.10.  (Only for Emacs, not in XEmacs.)
28695
28696 @item The tool bar icons are now (de)activated correctly
28697 in the group buffer, see the variable @code{gnus-group-update-tool-bar}.
28698 Its default value depends on your Emacs version.  This is a new feature
28699 in Gnus 5.10.9.
28700 @end itemize
28701
28702
28703 @item Miscellaneous changes
28704 @c ************************
28705
28706 @itemize @bullet
28707
28708 @item
28709 @code{gnus-agent}
28710
28711 The Gnus Agent has seen a major updated and is now enabled by default,
28712 and all nntp and nnimap servers from @code{gnus-select-method} and
28713 @code{gnus-secondary-select-method} are agentized by default.  Earlier
28714 only the server in @code{gnus-select-method} was agentized by the
28715 default, and the agent was disabled by default.  When the agent is
28716 enabled, headers are now also retrieved from the Agent cache instead
28717 of the back ends when possible.  Earlier this only happened in the
28718 unplugged state.  You can enroll or remove servers with @kbd{J a} and
28719 @kbd{J r} in the server buffer.  Gnus will not download articles into
28720 the Agent cache, unless you instruct it to do so, though, by using
28721 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
28722 behavior of having the Agent disabled with @code{(setq gnus-agent
28723 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
28724 is not needed any more.
28725
28726 @item
28727 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
28728
28729 If one reads an article while plugged, and the article already exists
28730 in the Agent, it won't get downloaded once more.  @code{(setq
28731 gnus-agent-cache nil)} reverts to the old behavior.
28732
28733 @item
28734 Dired integration
28735
28736 @code{gnus-dired-minor-mode} (see @ref{Other modes}) installs key
28737 bindings in dired buffers to send a file as an attachment, open a file
28738 using the appropriate mailcap entry, and print a file using the mailcap
28739 entry.
28740
28741 @item
28742 The format spec @code{%C} for positioning point has changed to @code{%*}.
28743
28744 @item
28745 @code{gnus-slave-unplugged}
28746
28747 A new command which starts Gnus offline in slave mode.
28748
28749 @end itemize
28750
28751 @end itemize
28752
28753 @node No Gnus
28754 @subsubsection No Gnus
28755 @cindex No Gnus
28756
28757 New features in No Gnus:
28758 @c FIXME: Gnus 5.12?
28759
28760 @include gnus-news.texi
28761
28762 @iftex
28763
28764 @page
28765 @node The Manual
28766 @section The Manual
28767 @cindex colophon
28768 @cindex manual
28769
28770 This manual was generated from a TeXinfo file and then run through
28771 either @code{texi2dvi}
28772 @iflatex
28773 or my own home-brewed TeXinfo to \LaTeX\ transformer,
28774 and then run through @code{latex} and @code{dvips}
28775 @end iflatex
28776 to get what you hold in your hands now.
28777
28778 The following conventions have been used:
28779
28780 @enumerate
28781
28782 @item
28783 This is a @samp{string}
28784
28785 @item
28786 This is a @kbd{keystroke}
28787
28788 @item
28789 This is a @file{file}
28790
28791 @item
28792 This is a @code{symbol}
28793
28794 @end enumerate
28795
28796 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
28797 mean:
28798
28799 @lisp
28800 (setq flargnoze "yes")
28801 @end lisp
28802
28803 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
28804
28805 @lisp
28806 (setq flumphel 'yes)
28807 @end lisp
28808
28809 @samp{yes} and @code{yes} are two @emph{very} different things---don't
28810 ever get them confused.
28811
28812 @iflatex
28813 @c @head
28814 Of course, everything in this manual is of vital interest, so you should
28815 read it all.  Several times.  However, if you feel like skimming the
28816 manual, look for that gnu head you should see in the margin over
28817 there---it means that what's being discussed is of more importance than
28818 the rest of the stuff.  (On the other hand, if everything is infinitely
28819 important, how can anything be more important than that?  Just one more
28820 of the mysteries of this world, I guess.)
28821 @end iflatex
28822
28823 @end iftex
28824
28825
28826 @node On Writing Manuals
28827 @section On Writing Manuals
28828
28829 I guess most manuals are written after-the-fact; documenting a program
28830 that's already there.  This is not how this manual is written.  When
28831 implementing something, I write the manual entry for that something
28832 straight away.  I then see that it's difficult to explain the
28833 functionality, so I write how it's supposed to be, and then I change the
28834 implementation.  Writing the documentation and writing the code go hand
28835 in hand.
28836
28837 This, of course, means that this manual has no, or little, flow.  It
28838 documents absolutely everything in Gnus, but often not where you're
28839 looking for it.  It is a reference manual, and not a guide to how to get
28840 started with Gnus.
28841
28842 That would be a totally different book, that should be written using the
28843 reference manual as source material.  It would look quite different.
28844
28845
28846 @page
28847 @node Terminology
28848 @section Terminology
28849
28850 @cindex terminology
28851 @table @dfn
28852
28853 @item news
28854 @cindex news
28855 This is what you are supposed to use this thing for---reading news.
28856 News is generally fetched from a nearby @acronym{NNTP} server, and is
28857 generally publicly available to everybody.  If you post news, the entire
28858 world is likely to read just what you have written, and they'll all
28859 snigger mischievously.  Behind your back.
28860
28861 @item mail
28862 @cindex mail
28863 Everything that's delivered to you personally is mail.  Some news/mail
28864 readers (like Gnus) blur the distinction between mail and news, but
28865 there is a difference.  Mail is private.  News is public.  Mailing is
28866 not posting, and replying is not following up.
28867
28868 @item reply
28869 @cindex reply
28870 Send a mail to the person who has written what you are reading.
28871
28872 @item follow up
28873 @cindex follow up
28874 Post an article to the current newsgroup responding to the article you
28875 are reading.
28876
28877 @item back end
28878 @cindex back end
28879 Gnus considers mail and news to be mostly the same, really.  The only
28880 difference is how to access the actual articles.  News articles are
28881 commonly fetched via the protocol @acronym{NNTP}, whereas mail
28882 messages could be read from a file on the local disk.  The internal
28883 architecture of Gnus thus comprises a ``front end'' and a number of
28884 ``back ends''.  Internally, when you enter a group (by hitting
28885 @key{RET}, say), you thereby invoke a function in the front end in
28886 Gnus.  The front end then ``talks'' to a back end and says things like
28887 ``Give me the list of articles in the foo group'' or ``Show me article
28888 number 4711''.
28889
28890 So a back end mainly defines either a protocol (the @code{nntp} back
28891 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
28892 accesses mail via @acronym{IMAP}) or a file format and directory
28893 layout (the @code{nnspool} back end accesses news via the common
28894 ``spool directory'' format, the @code{nnml} back end access mail via a
28895 file format and directory layout that's quite similar).
28896
28897 Gnus does not handle the underlying media, so to speak---this is all
28898 done by the back ends.  A back end is a collection of functions to
28899 access the articles.
28900
28901 However, sometimes the term ``back end'' is also used where ``server''
28902 would have been more appropriate.  And then there is the term ``select
28903 method'' which can mean either.  The Gnus terminology can be quite
28904 confusing.
28905
28906 @item native
28907 @cindex native
28908 Gnus will always use one method (and back end) as the @dfn{native}, or
28909 default, way of getting news.
28910
28911 @item foreign
28912 @cindex foreign
28913 You can also have any number of foreign groups active at the same time.
28914 These are groups that use non-native non-secondary back ends for getting
28915 news.
28916
28917 @item secondary
28918 @cindex secondary
28919 Secondary back ends are somewhere half-way between being native and being
28920 foreign, but they mostly act like they are native.
28921
28922 @item article
28923 @cindex article
28924 A message that has been posted as news.
28925
28926 @item mail message
28927 @cindex mail message
28928 A message that has been mailed.
28929
28930 @item message
28931 @cindex message
28932 A mail message or news article
28933
28934 @item head
28935 @cindex head
28936 The top part of a message, where administrative information (etc.) is
28937 put.
28938
28939 @item body
28940 @cindex body
28941 The rest of an article.  Everything not in the head is in the
28942 body.
28943
28944 @item header
28945 @cindex header
28946 A line from the head of an article.
28947
28948 @item headers
28949 @cindex headers
28950 A collection of such lines, or a collection of heads.  Or even a
28951 collection of @acronym{NOV} lines.
28952
28953 @item @acronym{NOV}
28954 @cindex @acronym{NOV}
28955 @acronym{NOV} stands for News OverView, which is a type of news server
28956 header which provide datas containing the condensed header information
28957 of articles.  They are produced by the server itself; in the @code{nntp}
28958 back end Gnus uses the ones that the @acronym{NNTP} server makes, but
28959 Gnus makes them by itself for some backends (in particular, @code{nnml}).
28960
28961 When Gnus enters a group, it asks the back end for the headers of all
28962 unread articles in the group.  Most servers support the News OverView
28963 format, which is more compact and much faster to read and parse than the
28964 normal @sc{head} format.
28965
28966 The @acronym{NOV} data consist of one or more text lines (@pxref{Text
28967 Lines, ,Motion by Text Lines, elisp, The Emacs Lisp Reference Manual})
28968 where each line has the header information of one article.  The header
28969 information is a tab-separated series of the header's contents including
28970 an article number, a subject, an author, a date, a message-id,
28971 references, etc.
28972
28973 Those data enable Gnus to generate summary lines quickly.  However, if
28974 the server does not support @acronym{NOV} or you disable it purposely or
28975 for some reason, Gnus will try to generate the header information by
28976 parsing each article's headers one by one.  It will take time.
28977 Therefore, it is not usually a good idea to set nn*-nov-is-evil
28978 (@pxref{Slow/Expensive Connection}) to a non-@code{nil} value unless you
28979 know that the server makes wrong @acronym{NOV} data.
28980
28981 @item level
28982 @cindex levels
28983 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
28984 that have a lower level are ``more'' subscribed than the groups with a
28985 higher level.  In fact, groups on levels 1-5 are considered
28986 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
28987 are @dfn{killed}.  Commands for listing groups and scanning for new
28988 articles will all use the numeric prefix as @dfn{working level}.
28989
28990 @item killed groups
28991 @cindex killed groups
28992 No information on killed groups is stored or updated, which makes killed
28993 groups much easier to handle than subscribed groups.
28994
28995 @item zombie groups
28996 @cindex zombie groups
28997 Just like killed groups, only slightly less dead.
28998
28999 @item active file
29000 @cindex active file
29001 The news server has to keep track of what articles it carries, and what
29002 groups exist.  All this information in stored in the active file, which
29003 is rather large, as you might surmise.
29004
29005 @item bogus groups
29006 @cindex bogus groups
29007 A group that exists in the @file{.newsrc} file, but isn't known to the
29008 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
29009 This means that the group probably doesn't exist (any more).
29010
29011 @item activating
29012 @cindex activating groups
29013 The act of asking the server for info on a group and computing the
29014 number of unread articles is called @dfn{activating the group}.
29015 Un-activated groups are listed with @samp{*} in the group buffer.
29016
29017 @item spool
29018 @cindex spool
29019 News servers store their articles locally in one fashion or other.
29020 One old-fashioned storage method is to have just one file per
29021 article.  That's called a ``traditional spool''.
29022
29023 @item server
29024 @cindex server
29025 A machine one can connect to and get news (or mail) from.
29026
29027 @item select method
29028 @cindex select method
29029 A structure that specifies the back end, the server and the virtual
29030 server settings.
29031
29032 @item virtual server
29033 @cindex virtual server
29034 A named select method.  Since a select method defines all there is to
29035 know about connecting to a (physical) server, taking the thing as a
29036 whole is a virtual server.
29037
29038 @item washing
29039 @cindex washing
29040 Taking a buffer and running it through a filter of some sort.  The
29041 result will (more often than not) be cleaner and more pleasing than the
29042 original.
29043
29044 @item ephemeral groups
29045 @cindex ephemeral groups
29046 @cindex temporary groups
29047 Most groups store data on what articles you have read.  @dfn{Ephemeral}
29048 groups are groups that will have no data stored---when you exit the
29049 group, it'll disappear into the aether.
29050
29051 @item solid groups
29052 @cindex solid groups
29053 This is the opposite of ephemeral groups.  All groups listed in the
29054 group buffer are solid groups.
29055
29056 @item sparse articles
29057 @cindex sparse articles
29058 These are article placeholders shown in the summary buffer when
29059 @code{gnus-build-sparse-threads} has been switched on.
29060
29061 @item threading
29062 @cindex threading
29063 To put responses to articles directly after the articles they respond
29064 to---in a hierarchical fashion.
29065
29066 @item root
29067 @cindex root
29068 @cindex thread root
29069 The first article in a thread is the root.  It is the ancestor of all
29070 articles in the thread.
29071
29072 @item parent
29073 @cindex parent
29074 An article that has responses.
29075
29076 @item child
29077 @cindex child
29078 An article that responds to a different article---its parent.
29079
29080 @item digest
29081 @cindex digest
29082 A collection of messages in one file.  The most common digest format is
29083 specified by RFC 1153.
29084
29085 @item splitting
29086 @cindex splitting, terminology
29087 @cindex mail sorting
29088 @cindex mail filtering (splitting)
29089 The action of sorting your emails according to certain rules. Sometimes
29090 incorrectly called mail filtering.
29091
29092 @end table
29093
29094
29095 @page
29096 @node Customization
29097 @section Customization
29098 @cindex general customization
29099
29100 All variables are properly documented elsewhere in this manual.  This
29101 section is designed to give general pointers on how to customize Gnus
29102 for some quite common situations.
29103
29104 @menu
29105 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
29106 * Slow Terminal Connection::    You run a remote Emacs.
29107 * Little Disk Space::           You feel that having large setup files is icky.
29108 * Slow Machine::                You feel like buying a faster machine.
29109 @end menu
29110
29111
29112 @node Slow/Expensive Connection
29113 @subsection Slow/Expensive Connection
29114
29115 If you run Emacs on a machine locally, and get your news from a machine
29116 over some very thin strings, you want to cut down on the amount of data
29117 Gnus has to get from the server.
29118
29119 @table @code
29120
29121 @item gnus-read-active-file
29122 Set this to @code{nil}, which will inhibit Gnus from requesting the
29123 entire active file from the server.  This file is often very large.  You
29124 also have to set @code{gnus-check-new-newsgroups} and
29125 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
29126 doesn't suddenly decide to fetch the active file anyway.
29127
29128 @item gnus-nov-is-evil
29129 @vindex gnus-nov-is-evil
29130 Usually this one must @emph{always} be @code{nil} (which is the
29131 default).  If, for example, you wish to not use @acronym{NOV}
29132 (@pxref{Terminology}) with the @code{nntp} back end (@pxref{Crosspost
29133 Handling}), set @code{nntp-nov-is-evil} to a non-@code{nil} value
29134 instead of setting this.  But you normally do not need to set
29135 @code{nntp-nov-is-evil} since Gnus by itself will detect whether the
29136 @acronym{NNTP} server supports @acronym{NOV}.  Anyway, grabbing article
29137 headers from the @acronym{NNTP} server will not be very fast if you tell
29138 Gnus not to use @acronym{NOV}.
29139
29140 As the variables for the other back ends, there are
29141 @code{nndiary-nov-is-evil}, @code{nndir-nov-is-evil},
29142 @code{nnfolder-nov-is-evil}, @code{nnimap-nov-is-evil},
29143 @code{nnml-nov-is-evil}, @code{nnspool-nov-is-evil}, and
29144 @code{nnwarchive-nov-is-evil}.  Note that a non-@code{nil} value for
29145 @code{gnus-nov-is-evil} overrides all those variables.@footnote{Although
29146 the back ends @code{nnkiboze}, @code{nnslashdot}, @code{nnultimate}, and
29147 @code{nnwfm} don't have their own nn*-nov-is-evil.}
29148 @end table
29149
29150
29151 @node Slow Terminal Connection
29152 @subsection Slow Terminal Connection
29153
29154 Let's say you use your home computer for dialing up the system that runs
29155 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
29156 possible) the amount of data sent over the wires.
29157
29158 @table @code
29159
29160 @item gnus-auto-center-summary
29161 Set this to @code{nil} to inhibit Gnus from re-centering the summary
29162 buffer all the time.  If it is @code{vertical}, do only vertical
29163 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
29164 horizontal and vertical recentering.
29165
29166 @item gnus-visible-headers
29167 Cut down on the headers included in the articles to the
29168 minimum.  You can, in fact, make do without them altogether---most of the
29169 useful data is in the summary buffer, anyway.  Set this variable to
29170 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
29171
29172 Use the following to enable all the available hiding features:
29173 @lisp
29174 (setq gnus-treat-hide-headers 'head
29175       gnus-treat-hide-signature t
29176       gnus-treat-hide-citation t)
29177 @end lisp
29178
29179 @item gnus-use-full-window
29180 By setting this to @code{nil}, you can make all the windows smaller.
29181 While this doesn't really cut down much generally, it means that you
29182 have to see smaller portions of articles before deciding that you didn't
29183 want to read them anyway.
29184
29185 @item gnus-thread-hide-subtree
29186 If this is non-@code{nil}, all threads in the summary buffer will be
29187 hidden initially.
29188
29189
29190 @item gnus-updated-mode-lines
29191 If this is @code{nil}, Gnus will not put information in the buffer mode
29192 lines, which might save some time.
29193 @end table
29194
29195
29196 @node Little Disk Space
29197 @subsection Little Disk Space
29198 @cindex disk space
29199
29200 The startup files can get rather large, so you may want to cut their
29201 sizes a bit if you are running out of space.
29202
29203 @table @code
29204
29205 @item gnus-save-newsrc-file
29206 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
29207 only save @file{.newsrc.eld}.  This means that you will not be able to
29208 use any other newsreaders than Gnus.  This variable is @code{t} by
29209 default.
29210
29211 @item gnus-read-newsrc-file
29212 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
29213 only read @file{.newsrc.eld}.  This means that you will not be able to
29214 use any other newsreaders than Gnus.  This variable is @code{t} by
29215 default.
29216
29217 @item gnus-save-killed-list
29218 If this is @code{nil}, Gnus will not save the list of dead groups.  You
29219 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
29220 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
29221 variable to @code{nil}.  This variable is @code{t} by default.
29222
29223 @end table
29224
29225
29226 @node Slow Machine
29227 @subsection Slow Machine
29228 @cindex slow machine
29229
29230 If you have a slow machine, or are just really impatient, there are a
29231 few things you can do to make Gnus run faster.
29232
29233 Set @code{gnus-check-new-newsgroups} and
29234 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
29235
29236 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
29237 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
29238 summary buffer faster.  Also @pxref{Slow/Expensive Connection}.
29239
29240
29241 @page
29242 @node Troubleshooting
29243 @section Troubleshooting
29244 @cindex troubleshooting
29245
29246 Gnus works @emph{so} well straight out of the box---I can't imagine any
29247 problems, really.
29248
29249 Ahem.
29250
29251 @enumerate
29252
29253 @item
29254 Make sure your computer is switched on.
29255
29256 @item
29257 Make sure that you really load the current Gnus version.  If you have
29258 been running @sc{gnus}, you need to exit Emacs and start it up again before
29259 Gnus will work.
29260
29261 @item
29262 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
29263 like @c
29264 @samp{No Gnus v0.10} @c Adjust ../Makefile.in if you change this line!
29265 @c
29266 you have the right files loaded.  Otherwise you have some old @file{.el}
29267 files lying around.  Delete these.
29268
29269 @item
29270 Read the help group (@kbd{G h} in the group buffer) for a
29271 @acronym{FAQ} and a how-to.
29272
29273 @item
29274 @vindex max-lisp-eval-depth
29275 Gnus works on many recursive structures, and in some extreme (and very
29276 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
29277 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
29278 something like that.
29279 @end enumerate
29280
29281 If all else fails, report the problem as a bug.
29282
29283 @cindex bugs
29284 @cindex reporting bugs
29285
29286 @kindex M-x gnus-bug
29287 @findex gnus-bug
29288 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
29289 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
29290 me the backtrace.  I will fix bugs, but I can only fix them if you send
29291 me a precise description as to how to reproduce the bug.
29292
29293 You really can never be too detailed in a bug report.  Always use the
29294 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
29295 a 10Kb mail each time you use it, and even if you have sent me your
29296 environment 500 times before.  I don't care.  I want the full info each
29297 time.
29298
29299 It is also important to remember that I have no memory whatsoever.  If
29300 you send a bug report, and I send you a reply, and then you just send
29301 back ``No, it's not! Moron!'', I will have no idea what you are
29302 insulting me about.  Always over-explain everything.  It's much easier
29303 for all of us---if I don't have all the information I need, I will just
29304 mail you and ask for more info, and everything takes more time.
29305
29306 If the problem you're seeing is very visual, and you can't quite explain
29307 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
29308 it somewhere it can be reached, and include the URL of the picture in
29309 the bug report.
29310
29311 @cindex patches
29312 If you would like to contribute a patch to fix bugs or make
29313 improvements, please produce the patch using @samp{diff -u}.
29314
29315 @cindex edebug
29316 If you want to debug your problem further before reporting, possibly
29317 in order to solve the problem yourself and send a patch, you can use
29318 edebug.  Debugging Lisp code is documented in the Elisp manual
29319 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
29320 Lisp Reference Manual}).  To get you started with edebug, consider if
29321 you discover some weird behavior when pressing @kbd{c}, the first
29322 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
29323 the documentation buffer that leads you to the function definition,
29324 then press @kbd{M-x edebug-defun RET} with point inside that function,
29325 return to Gnus and press @kbd{c} to invoke the code.  You will be
29326 placed in the lisp buffer and can single step using @kbd{SPC} and
29327 evaluate expressions using @kbd{M-:} or inspect variables using
29328 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
29329 @kbd{c} or @kbd{g}.
29330
29331 @cindex elp
29332 @cindex profile
29333 @cindex slow
29334 Sometimes, a problem do not directly generate an elisp error but
29335 manifests itself by causing Gnus to be very slow.  In these cases, you
29336 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
29337 slow, and then try to analyze the backtrace (repeating the procedure
29338 helps isolating the real problem areas).
29339
29340 A fancier approach is to use the elisp profiler, ELP.  The profiler is
29341 (or should be) fully documented elsewhere, but to get you started
29342 there are a few steps that need to be followed.  First, instrument the
29343 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
29344 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
29345 RET message}.  Then perform the operation that is slow and press
29346 @kbd{M-x elp-results}.  You will then see which operations that takes
29347 time, and can debug them further.  If the entire operation takes much
29348 longer than the time spent in the slowest function in the profiler
29349 output, you probably profiled the wrong part of Gnus.  To reset
29350 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
29351 elp-restore-all} is supposed to remove profiling, but given the
29352 complexities and dynamic code generation in Gnus, it might not always
29353 work perfectly.
29354
29355 @cindex gnu.emacs.gnus
29356 @cindex ding mailing list
29357 If you just need help, you are better off asking on
29358 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
29359 @email{ding@@gnus.org, the ding mailing list}.  Write to
29360 @email{ding-request@@gnus.org} to subscribe.
29361
29362
29363 @page
29364 @node Gnus Reference Guide
29365 @section Gnus Reference Guide
29366
29367 It is my hope that other people will figure out smart stuff that Gnus
29368 can do, and that other people will write those smart things as well.  To
29369 facilitate that I thought it would be a good idea to describe the inner
29370 workings of Gnus.  And some of the not-so-inner workings, while I'm at
29371 it.
29372
29373 You can never expect the internals of a program not to change, but I
29374 will be defining (in some details) the interface between Gnus and its
29375 back ends (this is written in stone), the format of the score files
29376 (ditto), data structures (some are less likely to change than others)
29377 and general methods of operation.
29378
29379 @menu
29380 * Gnus Utility Functions::      Common functions and variable to use.
29381 * Back End Interface::          How Gnus communicates with the servers.
29382 * Score File Syntax::           A BNF definition of the score file standard.
29383 * Headers::                     How Gnus stores headers internally.
29384 * Ranges::                      A handy format for storing mucho numbers.
29385 * Group Info::                  The group info format.
29386 * Extended Interactive::        Symbolic prefixes and stuff.
29387 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
29388 * Various File Formats::        Formats of files that Gnus use.
29389 @end menu
29390
29391
29392 @node Gnus Utility Functions
29393 @subsection Gnus Utility Functions
29394 @cindex Gnus utility functions
29395 @cindex utility functions
29396 @cindex functions
29397 @cindex internal variables
29398
29399 When writing small functions to be run from hooks (and stuff), it's
29400 vital to have access to the Gnus internal functions and variables.
29401 Below is a list of the most common ones.
29402
29403 @table @code
29404
29405 @item gnus-newsgroup-name
29406 @vindex gnus-newsgroup-name
29407 This variable holds the name of the current newsgroup.
29408
29409 @item gnus-find-method-for-group
29410 @findex gnus-find-method-for-group
29411 A function that returns the select method for @var{group}.
29412
29413 @item gnus-group-real-name
29414 @findex gnus-group-real-name
29415 Takes a full (prefixed) Gnus group name, and returns the unprefixed
29416 name.
29417
29418 @item gnus-group-prefixed-name
29419 @findex gnus-group-prefixed-name
29420 Takes an unprefixed group name and a select method, and returns the full
29421 (prefixed) Gnus group name.
29422
29423 @item gnus-get-info
29424 @findex gnus-get-info
29425 Returns the group info list for @var{group}.
29426
29427 @item gnus-group-unread
29428 @findex gnus-group-unread
29429 The number of unread articles in @var{group}, or @code{t} if that is
29430 unknown.
29431
29432 @item gnus-active
29433 @findex gnus-active
29434 The active entry for @var{group}.
29435
29436 @item gnus-set-active
29437 @findex gnus-set-active
29438 Set the active entry for @var{group}.
29439
29440 @item gnus-add-current-to-buffer-list
29441 @findex gnus-add-current-to-buffer-list
29442 Adds the current buffer to the list of buffers to be killed on Gnus
29443 exit.
29444
29445 @item gnus-continuum-version
29446 @findex gnus-continuum-version
29447 Takes a Gnus version string as a parameter and returns a floating point
29448 number.  Earlier versions will always get a lower number than later
29449 versions.
29450
29451 @item gnus-group-read-only-p
29452 @findex gnus-group-read-only-p
29453 Says whether @var{group} is read-only or not.
29454
29455 @item gnus-news-group-p
29456 @findex gnus-news-group-p
29457 Says whether @var{group} came from a news back end.
29458
29459 @item gnus-ephemeral-group-p
29460 @findex gnus-ephemeral-group-p
29461 Says whether @var{group} is ephemeral or not.
29462
29463 @item gnus-server-to-method
29464 @findex gnus-server-to-method
29465 Returns the select method corresponding to @var{server}.
29466
29467 @item gnus-server-equal
29468 @findex gnus-server-equal
29469 Says whether two virtual servers are equal.
29470
29471 @item gnus-group-native-p
29472 @findex gnus-group-native-p
29473 Says whether @var{group} is native or not.
29474
29475 @item gnus-group-secondary-p
29476 @findex gnus-group-secondary-p
29477 Says whether @var{group} is secondary or not.
29478
29479 @item gnus-group-foreign-p
29480 @findex gnus-group-foreign-p
29481 Says whether @var{group} is foreign or not.
29482
29483 @item gnus-group-find-parameter
29484 @findex gnus-group-find-parameter
29485 Returns the parameter list of @var{group}.  If given a second parameter,
29486 returns the value of that parameter for @var{group}.
29487
29488 @item gnus-group-set-parameter
29489 @findex gnus-group-set-parameter
29490 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
29491
29492 @item gnus-narrow-to-body
29493 @findex gnus-narrow-to-body
29494 Narrows the current buffer to the body of the article.
29495
29496 @item gnus-check-backend-function
29497 @findex gnus-check-backend-function
29498 Takes two parameters, @var{function} and @var{group}.  If the back end
29499 @var{group} comes from supports @var{function}, return non-@code{nil}.
29500
29501 @lisp
29502 (gnus-check-backend-function "request-scan" "nnml:misc")
29503 @result{} t
29504 @end lisp
29505
29506 @item gnus-read-method
29507 @findex gnus-read-method
29508 Prompts the user for a select method.
29509
29510 @end table
29511
29512
29513 @node Back End Interface
29514 @subsection Back End Interface
29515
29516 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
29517 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
29518 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
29519 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
29520 examples of the latter we have @code{nntp-port-number} and
29521 @code{nnmbox-directory}.
29522
29523 When Gnus asks for information from a back end---say @code{nntp}---on
29524 something, it will normally include a virtual server name in the
29525 function parameters.  (If not, the back end should use the ``current''
29526 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
29527 server as its only (optional) parameter.  If this virtual server hasn't
29528 been opened, the function should fail.
29529
29530 Note that a virtual server name has no relation to some physical server
29531 name.  Take this example:
29532
29533 @lisp
29534 (nntp "odd-one"
29535       (nntp-address "ifi.uio.no")
29536       (nntp-port-number 4324))
29537 @end lisp
29538
29539 Here the virtual server name is @samp{odd-one} while the name of
29540 the physical server is @samp{ifi.uio.no}.
29541
29542 The back ends should be able to switch between several virtual servers.
29543 The standard back ends implement this by keeping an alist of virtual
29544 server environments that they pull down/push up when needed.
29545
29546 There are two groups of interface functions: @dfn{required functions},
29547 which must be present, and @dfn{optional functions}, which Gnus will
29548 always check for presence before attempting to call 'em.
29549
29550 All these functions are expected to return data in the buffer
29551 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
29552 unfortunately named, but we'll have to live with it.  When I talk about
29553 @dfn{resulting data}, I always refer to the data in that buffer.  When I
29554 talk about @dfn{return value}, I talk about the function value returned by
29555 the function call.  Functions that fail should return @code{nil} as the
29556 return value.
29557
29558 Some back ends could be said to be @dfn{server-forming} back ends, and
29559 some might be said not to be.  The latter are back ends that generally
29560 only operate on one group at a time, and have no concept of ``server''
29561 ---they have a group, and they deliver info on that group and nothing
29562 more.
29563
29564 Gnus identifies each message by way of group name and article number.  A
29565 few remarks about these article numbers might be useful.  First of all,
29566 the numbers are positive integers.  Secondly, it is normally not
29567 possible for later articles to ``re-use'' older article numbers without
29568 confusing Gnus.  That is, if a group has ever contained a message
29569 numbered 42, then no other message may get that number, or Gnus will get
29570 mightily confused.@footnote{See the function
29571 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
29572 Third, article numbers must be assigned in order of arrival in the
29573 group; this is not necessarily the same as the date of the message.
29574
29575 The previous paragraph already mentions all the ``hard'' restrictions that
29576 article numbers must fulfill.  But it seems that it might be useful to
29577 assign @emph{consecutive} article numbers, for Gnus gets quite confused
29578 if there are holes in the article numbering sequence.  However, due to
29579 the ``no-reuse'' restriction, holes cannot be avoided altogether.  It's
29580 also useful for the article numbers to start at 1 to avoid running out
29581 of numbers as long as possible.
29582
29583 Note that by convention, back ends are named @code{nnsomething}, but
29584 Gnus also comes with some @code{nnnotbackends}, such as
29585 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
29586
29587 In the examples and definitions I will refer to the imaginary back end
29588 @code{nnchoke}.
29589
29590 @cindex @code{nnchoke}
29591
29592 @menu
29593 * Required Back End Functions::  Functions that must be implemented.
29594 * Optional Back End Functions::  Functions that need not be implemented.
29595 * Error Messaging::             How to get messages and report errors.
29596 * Writing New Back Ends::       Extending old back ends.
29597 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
29598 * Mail-like Back Ends::         Some tips on mail back ends.
29599 @end menu
29600
29601
29602 @node Required Back End Functions
29603 @subsubsection Required Back End Functions
29604
29605 @table @code
29606
29607 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
29608
29609 @var{articles} is either a range of article numbers or a list of
29610 @code{Message-ID}s.  Current back ends do not fully support either---only
29611 sequences (lists) of article numbers, and most back ends do not support
29612 retrieval of @code{Message-ID}s.  But they should try for both.
29613
29614 The result data should either be HEADs or @acronym{NOV} lines, and the result
29615 value should either be @code{headers} or @code{nov} to reflect this.
29616 This might later be expanded to @code{various}, which will be a mixture
29617 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
29618
29619 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
29620 headers'', in some meaning of the word.  This is generally done by
29621 fetching (at most) @var{fetch-old} extra headers less than the smallest
29622 article number in @code{articles}, and filling the gaps as well.  The
29623 presence of this parameter can be ignored if the back end finds it
29624 cumbersome to follow the request.  If this is non-@code{nil} and not a
29625 number, do maximum fetches.
29626
29627 Here's an example HEAD:
29628
29629 @example
29630 221 1056 Article retrieved.
29631 Path: ifi.uio.no!sturles
29632 From: sturles@@ifi.uio.no (Sturle Sunde)
29633 Newsgroups: ifi.discussion
29634 Subject: Re: Something very droll
29635 Date: 27 Oct 1994 14:02:57 +0100
29636 Organization: Dept. of Informatics, University of Oslo, Norway
29637 Lines: 26
29638 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
29639 References: <38jdmq$4qu@@visbur.ifi.uio.no>
29640 NNTP-Posting-Host: holmenkollen.ifi.uio.no
29641 .
29642 @end example
29643
29644 So a @code{headers} return value would imply that there's a number of
29645 these in the data buffer.
29646
29647 Here's a BNF definition of such a buffer:
29648
29649 @example
29650 headers        = *head
29651 head           = error / valid-head
29652 error-message  = [ "4" / "5" ] 2number " " <error message> eol
29653 valid-head     = valid-message *header "." eol
29654 valid-message  = "221 " <number> " Article retrieved." eol
29655 header         = <text> eol
29656 @end example
29657
29658 @cindex BNF
29659 (The version of BNF used here is the one used in RFC822.)
29660
29661 If the return value is @code{nov}, the data buffer should contain
29662 @dfn{network overview database} lines.  These are basically fields
29663 separated by tabs.
29664
29665 @example
29666 nov-buffer = *nov-line
29667 nov-line   = field 7*8[ <TAB> field ] eol
29668 field      = <text except TAB>
29669 @end example
29670
29671 For a closer look at what should be in those fields,
29672 @pxref{Headers}.
29673
29674
29675 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
29676
29677 @var{server} is here the virtual server name.  @var{definitions} is a
29678 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
29679
29680 If the server can't be opened, no error should be signaled.  The back end
29681 may then choose to refuse further attempts at connecting to this
29682 server.  In fact, it should do so.
29683
29684 If the server is opened already, this function should return a
29685 non-@code{nil} value.  There should be no data returned.
29686
29687
29688 @item (nnchoke-close-server &optional SERVER)
29689
29690 Close connection to @var{server} and free all resources connected
29691 to it.  Return @code{nil} if the server couldn't be closed for some
29692 reason.
29693
29694 There should be no data returned.
29695
29696
29697 @item (nnchoke-request-close)
29698
29699 Close connection to all servers and free all resources that the back end
29700 have reserved.  All buffers that have been created by that back end
29701 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
29702 function is generally only called when Gnus is shutting down.
29703
29704 There should be no data returned.
29705
29706
29707 @item (nnchoke-server-opened &optional SERVER)
29708
29709 If @var{server} is the current virtual server, and the connection to the
29710 physical server is alive, then this function should return a
29711 non-@code{nil} value.  This function should under no circumstances
29712 attempt to reconnect to a server we have lost connection to.
29713
29714 There should be no data returned.
29715
29716
29717 @item (nnchoke-status-message &optional SERVER)
29718
29719 This function should return the last error message from @var{server}.
29720
29721 There should be no data returned.
29722
29723
29724 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
29725
29726 The result data from this function should be the article specified by
29727 @var{article}.  This might either be a @code{Message-ID} or a number.
29728 It is optional whether to implement retrieval by @code{Message-ID}, but
29729 it would be nice if that were possible.
29730
29731 If @var{to-buffer} is non-@code{nil}, the result data should be returned
29732 in this buffer instead of the normal data buffer.  This is to make it
29733 possible to avoid copying large amounts of data from one buffer to
29734 another, while Gnus mainly requests articles to be inserted directly
29735 into its article buffer.
29736
29737 If it is at all possible, this function should return a cons cell where
29738 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
29739 the article number.  This will enable Gnus to find out what the real
29740 group and article numbers are when fetching articles by
29741 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
29742 on successful article retrieval.
29743
29744
29745 @item (nnchoke-request-group GROUP &optional SERVER FAST)
29746
29747 Get data on @var{group}.  This function also has the side effect of
29748 making @var{group} the current group.
29749
29750 If @var{fast}, don't bother to return useful data, just make @var{group}
29751 the current group.
29752
29753 Here's an example of some result data and a definition of the same:
29754
29755 @example
29756 211 56 1000 1059 ifi.discussion
29757 @end example
29758
29759 The first number is the status, which should be 211.  Next is the
29760 total number of articles in the group, the lowest article number, the
29761 highest article number, and finally the group name.  Note that the total
29762 number of articles may be less than one might think while just
29763 considering the highest and lowest article numbers, but some articles
29764 may have been canceled.  Gnus just discards the total-number, so
29765 whether one should take the bother to generate it properly (if that is a
29766 problem) is left as an exercise to the reader.  If the group contains no
29767 articles, the lowest article number should be reported as 1 and the
29768 highest as 0.
29769
29770 @example
29771 group-status = [ error / info ] eol
29772 error        = [ "4" / "5" ] 2<number> " " <Error message>
29773 info         = "211 " 3* [ <number> " " ] <string>
29774 @end example
29775
29776
29777 @item (nnchoke-close-group GROUP &optional SERVER)
29778
29779 Close @var{group} and free any resources connected to it.  This will be
29780 a no-op on most back ends.
29781
29782 There should be no data returned.
29783
29784
29785 @item (nnchoke-request-list &optional SERVER)
29786
29787 Return a list of all groups available on @var{server}.  And that means
29788 @emph{all}.
29789
29790 Here's an example from a server that only carries two groups:
29791
29792 @example
29793 ifi.test 0000002200 0000002000 y
29794 ifi.discussion 3324 3300 n
29795 @end example
29796
29797 On each line we have a group name, then the highest article number in
29798 that group, the lowest article number, and finally a flag.  If the group
29799 contains no articles, the lowest article number should be reported as 1
29800 and the highest as 0.
29801
29802 @example
29803 active-file = *active-line
29804 active-line = name " " <number> " " <number> " " flags eol
29805 name        = <string>
29806 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
29807 @end example
29808
29809 The flag says whether the group is read-only (@samp{n}), is moderated
29810 (@samp{m}), is dead (@samp{x}), is aliased to some other group
29811 (@samp{=other-group}) or none of the above (@samp{y}).
29812
29813
29814 @item (nnchoke-request-post &optional SERVER)
29815
29816 This function should post the current buffer.  It might return whether
29817 the posting was successful or not, but that's not required.  If, for
29818 instance, the posting is done asynchronously, it has generally not been
29819 completed by the time this function concludes.  In that case, this
29820 function should set up some kind of sentinel to beep the user loud and
29821 clear if the posting could not be completed.
29822
29823 There should be no result data from this function.
29824
29825 @end table
29826
29827
29828 @node Optional Back End Functions
29829 @subsubsection Optional Back End Functions
29830
29831 @table @code
29832
29833 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
29834
29835 @var{groups} is a list of groups, and this function should request data
29836 on all those groups.  How it does it is of no concern to Gnus, but it
29837 should attempt to do this in a speedy fashion.
29838
29839 The return value of this function can be either @code{active} or
29840 @code{group}, which says what the format of the result data is.  The
29841 former is in the same format as the data from
29842 @code{nnchoke-request-list}, while the latter is a buffer full of lines
29843 in the same format as @code{nnchoke-request-group} gives.
29844
29845 @example
29846 group-buffer = *active-line / *group-status
29847 @end example
29848
29849
29850 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
29851
29852 A Gnus group info (@pxref{Group Info}) is handed to the back end for
29853 alterations.  This comes in handy if the back end really carries all
29854 the information (as is the case with virtual and imap groups).  This
29855 function should destructively alter the info to suit its needs, and
29856 should return a non-@code{nil} value (exceptionally,
29857 @code{nntp-request-update-info} always returns @code{nil} not to waste
29858 the network resources).
29859
29860 There should be no result data from this function.
29861
29862
29863 @item (nnchoke-request-type GROUP &optional ARTICLE)
29864
29865 When the user issues commands for ``sending news'' (@kbd{F} in the
29866 summary buffer, for instance), Gnus has to know whether the article the
29867 user is following up on is news or mail.  This function should return
29868 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
29869 is mail and @code{unknown} if the type can't be decided.  (The
29870 @var{article} parameter is necessary in @code{nnvirtual} groups which
29871 might very well combine mail groups and news groups.)  Both @var{group}
29872 and @var{article} may be @code{nil}.
29873
29874 There should be no result data from this function.
29875
29876
29877 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
29878
29879 Set/remove/add marks on articles.  Normally Gnus handles the article
29880 marks (such as read, ticked, expired etc) internally, and store them in
29881 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
29882 all information about the articles on the server, so Gnus need to
29883 propagate the mark information to the server.
29884
29885 @var{action} is a list of mark setting requests, having this format:
29886
29887 @example
29888 (RANGE ACTION MARK)
29889 @end example
29890
29891 @var{range} is a range of articles you wish to update marks on.
29892 @var{action} is @code{add} or @code{del}, used to add marks or remove
29893 marks (preserving all marks not mentioned).  @var{mark} is a list of
29894 marks; where each mark is a symbol.  Currently used marks are
29895 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
29896 @code{dormant}, @code{save}, @code{download}, @code{unsend},
29897 @code{forward} and @code{recent}, but your back end should, if
29898 possible, not limit itself to these.
29899
29900 Given contradictory actions, the last action in the list should be the
29901 effective one.  That is, if your action contains a request to add the
29902 @code{tick} mark on article 1 and, later in the list, a request to
29903 remove the mark on the same article, the mark should in fact be removed.
29904
29905 An example action list:
29906
29907 @example
29908 (((5 12 30) 'del '(tick))
29909  ((10 . 90) 'add '(read expire))
29910  ((92 94) 'del '(read)))
29911 @end example
29912
29913 The function should return a range of articles it wasn't able to set the
29914 mark on (currently not used for anything).
29915
29916 There should be no result data from this function.
29917
29918 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
29919
29920 If the user tries to set a mark that the back end doesn't like, this
29921 function may change the mark.  Gnus will use whatever this function
29922 returns as the mark for @var{article} instead of the original
29923 @var{mark}.  If the back end doesn't care, it must return the original
29924 @var{mark}, and not @code{nil} or any other type of garbage.
29925
29926 The only use for this I can see is what @code{nnvirtual} does with
29927 it---if a component group is auto-expirable, marking an article as read
29928 in the virtual group should result in the article being marked as
29929 expirable.
29930
29931 There should be no result data from this function.
29932
29933
29934 @item (nnchoke-request-scan &optional GROUP SERVER)
29935
29936 This function may be called at any time (by Gnus or anything else) to
29937 request that the back end check for incoming articles, in one way or
29938 another.  A mail back end will typically read the spool file or query
29939 the @acronym{POP} server when this function is invoked.  The
29940 @var{group} doesn't have to be heeded---if the back end decides that
29941 it is too much work just scanning for a single group, it may do a
29942 total scan of all groups.  It would be nice, however, to keep things
29943 local if that's practical.
29944
29945 There should be no result data from this function.
29946
29947
29948 @item (nnchoke-request-group-description GROUP &optional SERVER)
29949
29950 The result data from this function should be a description of
29951 @var{group}.
29952
29953 @example
29954 description-line = name <TAB> description eol
29955 name             = <string>
29956 description      = <text>
29957 @end example
29958
29959 @item (nnchoke-request-list-newsgroups &optional SERVER)
29960
29961 The result data from this function should be the description of all
29962 groups available on the server.
29963
29964 @example
29965 description-buffer = *description-line
29966 @end example
29967
29968
29969 @item (nnchoke-request-newgroups DATE &optional SERVER)
29970
29971 The result data from this function should be all groups that were
29972 created after @samp{date}, which is in normal human-readable date format
29973 (i.e., the date format used in mail and news headers, and returned by
29974 the function @code{message-make-date} by default).  The data should be
29975 in the active buffer format.
29976
29977 It is okay for this function to return ``too many'' groups; some back ends
29978 might find it cheaper to return the full list of groups, rather than
29979 just the new groups.  But don't do this for back ends with many groups.
29980 Normally, if the user creates the groups herself, there won't be too
29981 many groups, so @code{nnml} and the like are probably safe.  But for
29982 back ends like @code{nntp}, where the groups have been created by the
29983 server, it is quite likely that there can be many groups.
29984
29985
29986 @item (nnchoke-request-create-group GROUP &optional SERVER)
29987
29988 This function should create an empty group with name @var{group}.
29989
29990 There should be no return data.
29991
29992
29993 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
29994
29995 This function should run the expiry process on all articles in the
29996 @var{articles} range (which is currently a simple list of article
29997 numbers.)  It is left up to the back end to decide how old articles
29998 should be before they are removed by this function.  If @var{force} is
29999 non-@code{nil}, all @var{articles} should be deleted, no matter how new
30000 they are.
30001
30002 This function should return a list of articles that it did not/was not
30003 able to delete.
30004
30005 There should be no result data returned.
30006
30007
30008 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
30009
30010 This function should move @var{article} (which is a number) from
30011 @var{group} by calling @var{accept-form}.
30012
30013 This function should ready the article in question for moving by
30014 removing any header lines it has added to the article, and generally
30015 should ``tidy up'' the article.  Then it should @code{eval}
30016 @var{accept-form} in the buffer where the ``tidy'' article is.  This
30017 will do the actual copying.  If this @code{eval} returns a
30018 non-@code{nil} value, the article should be removed.
30019
30020 If @var{last} is @code{nil}, that means that there is a high likelihood
30021 that there will be more requests issued shortly, so that allows some
30022 optimizations.
30023
30024 The function should return a cons where the @code{car} is the group name and
30025 the @code{cdr} is the article number that the article was entered as.
30026
30027 There should be no data returned.
30028
30029
30030 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
30031
30032 This function takes the current buffer and inserts it into @var{group}.
30033 If @var{last} in @code{nil}, that means that there will be more calls to
30034 this function in short order.
30035
30036 The function should return a cons where the @code{car} is the group name and
30037 the @code{cdr} is the article number that the article was entered as.
30038
30039 The group should exist before the back end is asked to accept the
30040 article for that group.
30041
30042 There should be no data returned.
30043
30044
30045 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
30046
30047 This function should remove @var{article} (which is a number) from
30048 @var{group} and insert @var{buffer} there instead.
30049
30050 There should be no data returned.
30051
30052
30053 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
30054
30055 This function should delete @var{group}.  If @var{force}, it should
30056 really delete all the articles in the group, and then delete the group
30057 itself.  (If there is such a thing as ``the group itself''.)
30058
30059 There should be no data returned.
30060
30061
30062 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
30063
30064 This function should rename @var{group} into @var{new-name}.  All
30065 articles in @var{group} should move to @var{new-name}.
30066
30067 There should be no data returned.
30068
30069 @end table
30070
30071
30072 @node Error Messaging
30073 @subsubsection Error Messaging
30074
30075 @findex nnheader-report
30076 @findex nnheader-get-report
30077 The back ends should use the function @code{nnheader-report} to report
30078 error conditions---they should not raise errors when they aren't able to
30079 perform a request.  The first argument to this function is the back end
30080 symbol, and the rest are interpreted as arguments to @code{format} if
30081 there are multiple of them, or just a string if there is one of them.
30082 This function must always returns @code{nil}.
30083
30084 @lisp
30085 (nnheader-report 'nnchoke "You did something totally bogus")
30086
30087 (nnheader-report 'nnchoke "Could not request group %s" group)
30088 @end lisp
30089
30090 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
30091 @code{nil} back from a server, and this function returns the most
30092 recently reported message for the back end in question.  This function
30093 takes one argument---the server symbol.
30094
30095 Internally, these functions access @var{back-end}@code{-status-string},
30096 so the @code{nnchoke} back end will have its error message stored in
30097 @code{nnchoke-status-string}.
30098
30099
30100 @node Writing New Back Ends
30101 @subsubsection Writing New Back Ends
30102
30103 Many back ends are quite similar.  @code{nnml} is just like
30104 @code{nnspool}, but it allows you to edit the articles on the server.
30105 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
30106 and it doesn't maintain overview databases.  @code{nndir} is just like
30107 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
30108 editing articles.
30109
30110 It would make sense if it were possible to ``inherit'' functions from
30111 back ends when writing new back ends.  And, indeed, you can do that if you
30112 want to.  (You don't have to if you don't want to, of course.)
30113
30114 All the back ends declare their public variables and functions by using a
30115 package called @code{nnoo}.
30116
30117 To inherit functions from other back ends (and allow other back ends to
30118 inherit functions from the current back end), you should use the
30119 following macros:
30120
30121 @table @code
30122
30123 @item nnoo-declare
30124 This macro declares the first parameter to be a child of the subsequent
30125 parameters.  For instance:
30126
30127 @lisp
30128 (nnoo-declare nndir
30129   nnml nnmh)
30130 @end lisp
30131
30132 @code{nndir} has declared here that it intends to inherit functions from
30133 both @code{nnml} and @code{nnmh}.
30134
30135 @item defvoo
30136 This macro is equivalent to @code{defvar}, but registers the variable as
30137 a public server variable.  Most state-oriented variables should be
30138 declared with @code{defvoo} instead of @code{defvar}.
30139
30140 In addition to the normal @code{defvar} parameters, it takes a list of
30141 variables in the parent back ends to map the variable to when executing
30142 a function in those back ends.
30143
30144 @lisp
30145 (defvoo nndir-directory nil
30146   "Where nndir will look for groups."
30147   nnml-current-directory nnmh-current-directory)
30148 @end lisp
30149
30150 This means that @code{nnml-current-directory} will be set to
30151 @code{nndir-directory} when an @code{nnml} function is called on behalf
30152 of @code{nndir}.  (The same with @code{nnmh}.)
30153
30154 @item nnoo-define-basics
30155 This macro defines some common functions that almost all back ends should
30156 have.
30157
30158 @lisp
30159 (nnoo-define-basics nndir)
30160 @end lisp
30161
30162 @item deffoo
30163 This macro is just like @code{defun} and takes the same parameters.  In
30164 addition to doing the normal @code{defun} things, it registers the
30165 function as being public so that other back ends can inherit it.
30166
30167 @item nnoo-map-functions
30168 This macro allows mapping of functions from the current back end to
30169 functions from the parent back ends.
30170
30171 @lisp
30172 (nnoo-map-functions nndir
30173   (nnml-retrieve-headers 0 nndir-current-group 0 0)
30174   (nnmh-request-article 0 nndir-current-group 0 0))
30175 @end lisp
30176
30177 This means that when @code{nndir-retrieve-headers} is called, the first,
30178 third, and fourth parameters will be passed on to
30179 @code{nnml-retrieve-headers}, while the second parameter is set to the
30180 value of @code{nndir-current-group}.
30181
30182 @item nnoo-import
30183 This macro allows importing functions from back ends.  It should be the
30184 last thing in the source file, since it will only define functions that
30185 haven't already been defined.
30186
30187 @lisp
30188 (nnoo-import nndir
30189   (nnmh
30190    nnmh-request-list
30191    nnmh-request-newgroups)
30192   (nnml))
30193 @end lisp
30194
30195 This means that calls to @code{nndir-request-list} should just be passed
30196 on to @code{nnmh-request-list}, while all public functions from
30197 @code{nnml} that haven't been defined in @code{nndir} yet should be
30198 defined now.
30199
30200 @end table
30201
30202 Below is a slightly shortened version of the @code{nndir} back end.
30203
30204 @lisp
30205 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
30206 ;; @r{Copyright (C) 1995,96 Free Software Foundation, Inc.}
30207
30208 ;;; @r{Code:}
30209
30210 (require 'nnheader)
30211 (require 'nnmh)
30212 (require 'nnml)
30213 (require 'nnoo)
30214 (eval-when-compile (require 'cl))
30215
30216 (nnoo-declare nndir
30217   nnml nnmh)
30218
30219 (defvoo nndir-directory nil
30220   "Where nndir will look for groups."
30221   nnml-current-directory nnmh-current-directory)
30222
30223 (defvoo nndir-nov-is-evil nil
30224   "*Non-nil means that nndir will never retrieve NOV headers."
30225   nnml-nov-is-evil)
30226
30227 (defvoo nndir-current-group ""
30228   nil
30229   nnml-current-group nnmh-current-group)
30230 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
30231 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
30232
30233 (defvoo nndir-status-string "" nil nnmh-status-string)
30234 (defconst nndir-version "nndir 1.0")
30235
30236 ;;; @r{Interface functions.}
30237
30238 (nnoo-define-basics nndir)
30239
30240 (deffoo nndir-open-server (server &optional defs)
30241   (setq nndir-directory
30242         (or (cadr (assq 'nndir-directory defs))
30243             server))
30244   (unless (assq 'nndir-directory defs)
30245     (push `(nndir-directory ,server) defs))
30246   (push `(nndir-current-group
30247           ,(file-name-nondirectory
30248             (directory-file-name nndir-directory)))
30249         defs)
30250   (push `(nndir-top-directory
30251           ,(file-name-directory (directory-file-name nndir-directory)))
30252         defs)
30253   (nnoo-change-server 'nndir server defs))
30254
30255 (nnoo-map-functions nndir
30256   (nnml-retrieve-headers 0 nndir-current-group 0 0)
30257   (nnmh-request-article 0 nndir-current-group 0 0)
30258   (nnmh-request-group nndir-current-group 0 0)
30259   (nnmh-close-group nndir-current-group 0))
30260
30261 (nnoo-import nndir
30262   (nnmh
30263    nnmh-status-message
30264    nnmh-request-list
30265    nnmh-request-newgroups))
30266
30267 (provide 'nndir)
30268 @end lisp
30269
30270
30271 @node Hooking New Back Ends Into Gnus
30272 @subsubsection Hooking New Back Ends Into Gnus
30273
30274 @vindex gnus-valid-select-methods
30275 @findex gnus-declare-backend
30276 Having Gnus start using your new back end is rather easy---you just
30277 declare it with the @code{gnus-declare-backend} functions.  This will
30278 enter the back end into the @code{gnus-valid-select-methods} variable.
30279
30280 @code{gnus-declare-backend} takes two parameters---the back end name and
30281 an arbitrary number of @dfn{abilities}.
30282
30283 Here's an example:
30284
30285 @lisp
30286 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
30287 @end lisp
30288
30289 The above line would then go in the @file{nnchoke.el} file.
30290
30291 The abilities can be:
30292
30293 @table @code
30294 @item mail
30295 This is a mailish back end---followups should (probably) go via mail.
30296 @item post
30297 This is a newsish back end---followups should (probably) go via news.
30298 @item post-mail
30299 This back end supports both mail and news.
30300 @item none
30301 This is neither a post nor mail back end---it's something completely
30302 different.
30303 @item respool
30304 It supports respooling---or rather, it is able to modify its source
30305 articles and groups.
30306 @item address
30307 The name of the server should be in the virtual server name.  This is
30308 true for almost all back ends.
30309 @item prompt-address
30310 The user should be prompted for an address when doing commands like
30311 @kbd{B} in the group buffer.  This is true for back ends like
30312 @code{nntp}, but not @code{nnmbox}, for instance.
30313 @end table
30314
30315
30316 @node Mail-like Back Ends
30317 @subsubsection Mail-like Back Ends
30318
30319 One of the things that separate the mail back ends from the rest of the
30320 back ends is the heavy dependence by most of the mail back ends on
30321 common functions in @file{nnmail.el}.  For instance, here's the
30322 definition of @code{nnml-request-scan}:
30323
30324 @lisp
30325 (deffoo nnml-request-scan (&optional group server)
30326   (setq nnml-article-file-alist nil)
30327   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
30328 @end lisp
30329
30330 It simply calls @code{nnmail-get-new-mail} with a few parameters,
30331 and @code{nnmail} takes care of all the moving and splitting of the
30332 mail.
30333
30334 This function takes four parameters.
30335
30336 @table @var
30337 @item method
30338 This should be a symbol to designate which back end is responsible for
30339 the call.
30340
30341 @item exit-function
30342 This function should be called after the splitting has been performed.
30343
30344 @item temp-directory
30345 Where the temporary files should be stored.
30346
30347 @item group
30348 This optional argument should be a group name if the splitting is to be
30349 performed for one group only.
30350 @end table
30351
30352 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
30353 save each article.  @var{back-end}@code{-active-number} will be called to
30354 find the article number assigned to this article.
30355
30356 The function also uses the following variables:
30357 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
30358 this back end); and @var{back-end}@code{-group-alist} and
30359 @var{back-end}@code{-active-file} to generate the new active file.
30360 @var{back-end}@code{-group-alist} should be a group-active alist, like
30361 this:
30362
30363 @example
30364 (("a-group" (1 . 10))
30365  ("some-group" (34 . 39)))
30366 @end example
30367
30368
30369 @node Score File Syntax
30370 @subsection Score File Syntax
30371
30372 Score files are meant to be easily parseable, but yet extremely
30373 mallable.  It was decided that something that had the same read syntax
30374 as an Emacs Lisp list would fit that spec.
30375
30376 Here's a typical score file:
30377
30378 @lisp
30379 (("summary"
30380   ("win95" -10000 nil s)
30381   ("Gnus"))
30382  ("from"
30383   ("Lars" -1000))
30384  (mark -100))
30385 @end lisp
30386
30387 BNF definition of a score file:
30388
30389 @example
30390 score-file      = "" / "(" *element ")"
30391 element         = rule / atom
30392 rule            = string-rule / number-rule / date-rule
30393 string-rule     = "(" quote string-header quote space *string-match ")"
30394 number-rule     = "(" quote number-header quote space *number-match ")"
30395 date-rule       = "(" quote date-header quote space *date-match ")"
30396 quote           = <ascii 34>
30397 string-header   = "subject" / "from" / "references" / "message-id" /
30398                   "xref" / "body" / "head" / "all" / "followup"
30399 number-header   = "lines" / "chars"
30400 date-header     = "date"
30401 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
30402                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
30403 score           = "nil" / <integer>
30404 date            = "nil" / <natural number>
30405 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
30406                   "r" / "regex" / "R" / "Regex" /
30407                   "e" / "exact" / "E" / "Exact" /
30408                   "f" / "fuzzy" / "F" / "Fuzzy"
30409 number-match    = "(" <integer> [ "" / [ space score [ "" /
30410                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
30411 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
30412 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
30413                   space date [ "" / [ space date-match-t ] ] ] ] ")"
30414 date-match-t    = "nil" / "at" / "before" / "after"
30415 atom            = "(" [ required-atom / optional-atom ] ")"
30416 required-atom   = mark / expunge / mark-and-expunge / files /
30417                   exclude-files / read-only / touched
30418 optional-atom   = adapt / local / eval
30419 mark            = "mark" space nil-or-number
30420 nil-or-number   = "nil" / <integer>
30421 expunge         = "expunge" space nil-or-number
30422 mark-and-expunge = "mark-and-expunge" space nil-or-number
30423 files           = "files" *[ space <string> ]
30424 exclude-files   = "exclude-files" *[ space <string> ]
30425 read-only       = "read-only" [ space "nil" / space "t" ]
30426 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
30427 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
30428 local           = "local" *[ space "(" <string> space <form> ")" ]
30429 eval            = "eval" space <form>
30430 space           = *[ " " / <TAB> / <NEWLINE> ]
30431 @end example
30432
30433 Any unrecognized elements in a score file should be ignored, but not
30434 discarded.
30435
30436 As you can see, white space is needed, but the type and amount of white
30437 space is irrelevant.  This means that formatting of the score file is
30438 left up to the programmer---if it's simpler to just spew it all out on
30439 one looong line, then that's ok.
30440
30441 The meaning of the various atoms are explained elsewhere in this
30442 manual (@pxref{Score File Format}).
30443
30444
30445 @node Headers
30446 @subsection Headers
30447
30448 Internally Gnus uses a format for storing article headers that
30449 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
30450 almost suspect that the author looked at the @acronym{NOV} specification and
30451 just shamelessly @emph{stole} the entire thing, and one would be right.
30452
30453 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
30454 RFC 1036 to talk about lines in the head of an article (e.g.,
30455 @code{From}).  It is used by many people as a synonym for
30456 ``head''---``the header and the body''.  (That should be avoided, in my
30457 opinion.)  And Gnus uses a format internally that it calls ``header'',
30458 which is what I'm talking about here.  This is a 9-element vector,
30459 basically, with each header (ouch) having one slot.
30460
30461 These slots are, in order: @code{number}, @code{subject}, @code{from},
30462 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
30463 @code{xref}, and @code{extra}.  There are macros for accessing and
30464 setting these slots---they all have predictable names beginning with
30465 @code{mail-header-} and @code{mail-header-set-}, respectively.
30466
30467 All these slots contain strings, except the @code{extra} slot, which
30468 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
30469
30470
30471 @node Ranges
30472 @subsection Ranges
30473
30474 @sc{gnus} introduced a concept that I found so useful that I've started
30475 using it a lot and have elaborated on it greatly.
30476
30477 The question is simple: If you have a large amount of objects that are
30478 identified by numbers (say, articles, to take a @emph{wild} example)
30479 that you want to qualify as being ``included'', a normal sequence isn't
30480 very useful.  (A 200,000 length sequence is a bit long-winded.)
30481
30482 The solution is as simple as the question: You just collapse the
30483 sequence.
30484
30485 @example
30486 (1 2 3 4 5 6 10 11 12)
30487 @end example
30488
30489 is transformed into
30490
30491 @example
30492 ((1 . 6) (10 . 12))
30493 @end example
30494
30495 To avoid having those nasty @samp{(13 . 13)} elements to denote a
30496 lonesome object, a @samp{13} is a valid element:
30497
30498 @example
30499 ((1 . 6) 7 (10 . 12))
30500 @end example
30501
30502 This means that comparing two ranges to find out whether they are equal
30503 is slightly tricky:
30504
30505 @example
30506 ((1 . 5) 7 8 (10 . 12))
30507 @end example
30508
30509 and
30510
30511 @example
30512 ((1 . 5) (7 . 8) (10 . 12))
30513 @end example
30514
30515 are equal.  In fact, any non-descending list is a range:
30516
30517 @example
30518 (1 2 3 4 5)
30519 @end example
30520
30521 is a perfectly valid range, although a pretty long-winded one.  This is
30522 also valid:
30523
30524 @example
30525 (1 . 5)
30526 @end example
30527
30528 and is equal to the previous range.
30529
30530 Here's a BNF definition of ranges.  Of course, one must remember the
30531 semantic requirement that the numbers are non-descending.  (Any number
30532 of repetition of the same number is allowed, but apt to disappear in
30533 range handling.)
30534
30535 @example
30536 range           = simple-range / normal-range
30537 simple-range    = "(" number " . " number ")"
30538 normal-range    = "(" start-contents ")"
30539 contents        = "" / simple-range *[ " " contents ] /
30540                   number *[ " " contents ]
30541 @end example
30542
30543 Gnus currently uses ranges to keep track of read articles and article
30544 marks.  I plan on implementing a number of range operators in C if The
30545 Powers That Be are willing to let me.  (I haven't asked yet, because I
30546 need to do some more thinking on what operators I need to make life
30547 totally range-based without ever having to convert back to normal
30548 sequences.)
30549
30550
30551 @node Group Info
30552 @subsection Group Info
30553
30554 Gnus stores all permanent info on groups in a @dfn{group info} list.
30555 This list is from three to six elements (or more) long and exhaustively
30556 describes the group.
30557
30558 Here are two example group infos; one is a very simple group while the
30559 second is a more complex one:
30560
30561 @example
30562 ("no.group" 5 ((1 . 54324)))
30563
30564 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
30565                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
30566                 (nnml "")
30567                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
30568 @end example
30569
30570 The first element is the @dfn{group name}---as Gnus knows the group,
30571 anyway.  The second element is the @dfn{subscription level}, which
30572 normally is a small integer.  (It can also be the @dfn{rank}, which is a
30573 cons cell where the @code{car} is the level and the @code{cdr} is the
30574 score.)  The third element is a list of ranges of read articles.  The
30575 fourth element is a list of lists of article marks of various kinds.
30576 The fifth element is the select method (or virtual server, if you like).
30577 The sixth element is a list of @dfn{group parameters}, which is what
30578 this section is about.
30579
30580 Any of the last three elements may be missing if they are not required.
30581 In fact, the vast majority of groups will normally only have the first
30582 three elements, which saves quite a lot of cons cells.
30583
30584 Here's a BNF definition of the group info format:
30585
30586 @example
30587 info          = "(" group space ralevel space read
30588                 [ "" / [ space marks-list [ "" / [ space method [ "" /
30589                 space parameters ] ] ] ] ] ")"
30590 group         = quote <string> quote
30591 ralevel       = rank / level
30592 level         = <integer in the range of 1 to inf>
30593 rank          = "(" level "." score ")"
30594 score         = <integer in the range of 1 to inf>
30595 read          = range
30596 marks-lists   = nil / "(" *marks ")"
30597 marks         = "(" <string> range ")"
30598 method        = "(" <string> *elisp-forms ")"
30599 parameters    = "(" *elisp-forms ")"
30600 @end example
30601
30602 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
30603 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
30604 in pseudo-BNF.
30605
30606 If you have a Gnus info and want to access the elements, Gnus offers a
30607 series of macros for getting/setting these elements.
30608
30609 @table @code
30610 @item gnus-info-group
30611 @itemx gnus-info-set-group
30612 @findex gnus-info-group
30613 @findex gnus-info-set-group
30614 Get/set the group name.
30615
30616 @item gnus-info-rank
30617 @itemx gnus-info-set-rank
30618 @findex gnus-info-rank
30619 @findex gnus-info-set-rank
30620 Get/set the group rank (@pxref{Group Score}).
30621
30622 @item gnus-info-level
30623 @itemx gnus-info-set-level
30624 @findex gnus-info-level
30625 @findex gnus-info-set-level
30626 Get/set the group level.
30627
30628 @item gnus-info-score
30629 @itemx gnus-info-set-score
30630 @findex gnus-info-score
30631 @findex gnus-info-set-score
30632 Get/set the group score (@pxref{Group Score}).
30633
30634 @item gnus-info-read
30635 @itemx gnus-info-set-read
30636 @findex gnus-info-read
30637 @findex gnus-info-set-read
30638 Get/set the ranges of read articles.
30639
30640 @item gnus-info-marks
30641 @itemx gnus-info-set-marks
30642 @findex gnus-info-marks
30643 @findex gnus-info-set-marks
30644 Get/set the lists of ranges of marked articles.
30645
30646 @item gnus-info-method
30647 @itemx gnus-info-set-method
30648 @findex gnus-info-method
30649 @findex gnus-info-set-method
30650 Get/set the group select method.
30651
30652 @item gnus-info-params
30653 @itemx gnus-info-set-params
30654 @findex gnus-info-params
30655 @findex gnus-info-set-params
30656 Get/set the group parameters.
30657 @end table
30658
30659 All the getter functions take one parameter---the info list.  The setter
30660 functions take two parameters---the info list and the new value.
30661
30662 The last three elements in the group info aren't mandatory, so it may be
30663 necessary to extend the group info before setting the element.  If this
30664 is necessary, you can just pass on a non-@code{nil} third parameter to
30665 the three final setter functions to have this happen automatically.
30666
30667
30668 @node Extended Interactive
30669 @subsection Extended Interactive
30670 @cindex interactive
30671 @findex gnus-interactive
30672
30673 Gnus extends the standard Emacs @code{interactive} specification
30674 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
30675 Prefixes}).  Here's an example of how this is used:
30676
30677 @lisp
30678 (defun gnus-summary-increase-score (&optional score symp)
30679   (interactive (gnus-interactive "P\ny"))
30680   ...
30681   )
30682 @end lisp
30683
30684 The best thing to do would have been to implement
30685 @code{gnus-interactive} as a macro which would have returned an
30686 @code{interactive} form, but this isn't possible since Emacs checks
30687 whether a function is interactive or not by simply doing an @code{assq}
30688 on the lambda form.  So, instead we have @code{gnus-interactive}
30689 function that takes a string and returns values that are usable to
30690 @code{interactive}.
30691
30692 This function accepts (almost) all normal @code{interactive} specs, but
30693 adds a few more.
30694
30695 @table @samp
30696 @item y
30697 @vindex gnus-current-prefix-symbol
30698 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
30699 variable.
30700
30701 @item Y
30702 @vindex gnus-current-prefix-symbols
30703 A list of the current symbolic prefixes---the
30704 @code{gnus-current-prefix-symbol} variable.
30705
30706 @item A
30707 The current article number---the @code{gnus-summary-article-number}
30708 function.
30709
30710 @item H
30711 The current article header---the @code{gnus-summary-article-header}
30712 function.
30713
30714 @item g
30715 The current group name---the @code{gnus-group-group-name}
30716 function.
30717
30718 @end table
30719
30720
30721 @node Emacs/XEmacs Code
30722 @subsection Emacs/XEmacs Code
30723 @cindex XEmacs
30724 @cindex Emacsen
30725
30726 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
30727 platforms must be the primary one.  I chose Emacs.  Not because I don't
30728 like XEmacs or Mule, but because it comes first alphabetically.
30729
30730 This means that Gnus will byte-compile under Emacs with nary a warning,
30731 while XEmacs will pump out gigabytes of warnings while byte-compiling.
30732 As I use byte-compilation warnings to help me root out trivial errors in
30733 Gnus, that's very useful.
30734
30735 I've also consistently used Emacs function interfaces, but have used
30736 Gnusey aliases for the functions.  To take an example:  Emacs defines a
30737 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
30738 function.  I then define a function called @code{gnus-run-at-time} that
30739 takes the same parameters as the Emacs @code{run-at-time}.  When running
30740 Gnus under Emacs, the former function is just an alias for the latter.
30741 However, when running under XEmacs, the former is an alias for the
30742 following function:
30743
30744 @lisp
30745 (defun gnus-xmas-run-at-time (time repeat function &rest args)
30746   (start-itimer
30747    "gnus-run-at-time"
30748    `(lambda ()
30749       (,function ,@@args))
30750    time repeat))
30751 @end lisp
30752
30753 This sort of thing has been done for bunches of functions.  Gnus does
30754 not redefine any native Emacs functions while running under XEmacs---it
30755 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
30756 all over.
30757
30758 In the cases where the XEmacs function interface was obviously cleaner,
30759 I used it instead.  For example @code{gnus-region-active-p} is an alias
30760 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
30761
30762 Of course, I could have chosen XEmacs as my native platform and done
30763 mapping functions the other way around.  But I didn't.  The performance
30764 hit these indirections impose on Gnus under XEmacs should be slight.
30765
30766
30767 @node Various File Formats
30768 @subsection Various File Formats
30769
30770 @menu
30771 * Active File Format::          Information on articles and groups available.
30772 * Newsgroups File Format::      Group descriptions.
30773 @end menu
30774
30775
30776 @node Active File Format
30777 @subsubsection Active File Format
30778
30779 The active file lists all groups available on the server in
30780 question.  It also lists the highest and lowest current article numbers
30781 in each group.
30782
30783 Here's an excerpt from a typical active file:
30784
30785 @example
30786 soc.motss 296030 293865 y
30787 alt.binaries.pictures.fractals 3922 3913 n
30788 comp.sources.unix 1605 1593 m
30789 comp.binaries.ibm.pc 5097 5089 y
30790 no.general 1000 900 y
30791 @end example
30792
30793 Here's a pseudo-BNF definition of this file:
30794
30795 @example
30796 active      = *group-line
30797 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
30798 group       = <non-white-space string>
30799 spc         = " "
30800 high-number = <non-negative integer>
30801 low-number  = <positive integer>
30802 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
30803 @end example
30804
30805 For a full description of this file, see the manual pages for
30806 @samp{innd}, in particular @samp{active(5)}.
30807
30808
30809 @node Newsgroups File Format
30810 @subsubsection Newsgroups File Format
30811
30812 The newsgroups file lists groups along with their descriptions.  Not all
30813 groups on the server have to be listed,  and not all groups in the file
30814 have to exist on the server.  The file is meant purely as information to
30815 the user.
30816
30817 The format is quite simple; a group name, a tab, and the description.
30818 Here's the definition:
30819
30820 @example
30821 newsgroups    = *line
30822 line          = group tab description <NEWLINE>
30823 group         = <non-white-space string>
30824 tab           = <TAB>
30825 description   = <string>
30826 @end example
30827
30828
30829 @page
30830 @node Emacs for Heathens
30831 @section Emacs for Heathens
30832
30833 Believe it or not, but some people who use Gnus haven't really used
30834 Emacs much before they embarked on their journey on the Gnus Love Boat.
30835 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
30836 region'', and ``set @code{gnus-flargblossen} to an alist where the key
30837 is a regexp that is used for matching on the group name'' are magical
30838 phrases with little or no meaning, then this appendix is for you.  If
30839 you are already familiar with Emacs, just ignore this and go fondle your
30840 cat instead.
30841
30842 @menu
30843 * Keystrokes::                  Entering text and executing commands.
30844 * Emacs Lisp::                  The built-in Emacs programming language.
30845 @end menu
30846
30847
30848 @node Keystrokes
30849 @subsection Keystrokes
30850
30851 @itemize @bullet
30852 @item
30853 Q: What is an experienced Emacs user?
30854
30855 @item
30856 A: A person who wishes that the terminal had pedals.
30857 @end itemize
30858
30859 Yes, when you use Emacs, you are apt to use the control key, the shift
30860 key and the meta key a lot.  This is very annoying to some people
30861 (notably @code{vi}le users), and the rest of us just love the hell out
30862 of it.  Just give up and submit.  Emacs really does stand for
30863 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
30864 may have heard from other disreputable sources (like the Emacs author).
30865
30866 The shift keys are normally located near your pinky fingers, and are
30867 normally used to get capital letters and stuff.  You probably use it all
30868 the time.  The control key is normally marked ``CTRL'' or something like
30869 that.  The meta key is, funnily enough, never marked as such on any
30870 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
30871 which is the meta key on this keyboard.  It's usually located somewhere
30872 to the left hand side of the keyboard, usually on the bottom row.
30873
30874 Now, us Emacs people don't say ``press the meta-control-m key'',
30875 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
30876 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
30877 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
30878 down the control key, and hold it down while you press @kbd{k}''.
30879 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
30880 the control key and then press @kbd{k}''.  Simple, ay?
30881
30882 This is somewhat complicated by the fact that not all keyboards have a
30883 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
30884 means ``press escape, release escape, press @kbd{k}''.  That's much more
30885 work than if you have a meta key, so if that's the case, I respectfully
30886 suggest you get a real keyboard with a meta key.  You can't live without
30887 it.
30888
30889
30890
30891 @node Emacs Lisp
30892 @subsection Emacs Lisp
30893
30894 Emacs is the King of Editors because it's really a Lisp interpreter.
30895 Each and every key you tap runs some Emacs Lisp code snippet, and since
30896 Emacs Lisp is an interpreted language, that means that you can configure
30897 any key to run any arbitrary code.  You just, like, do it.
30898
30899 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
30900 functions.  (These are byte-compiled for speed, but it's still
30901 interpreted.)  If you decide that you don't like the way Gnus does
30902 certain things, it's trivial to have it do something a different way.
30903 (Well, at least if you know how to write Lisp code.)  However, that's
30904 beyond the scope of this manual, so we are simply going to talk about
30905 some common constructs that you normally use in your @file{~/.gnus.el}
30906 file to customize Gnus.  (You can also use the @file{~/.emacs} file, but
30907 in order to set things of Gnus up, it is much better to use the
30908 @file{~/.gnus.el} file, @xref{Startup Files}.)
30909
30910 If you want to set the variable @code{gnus-florgbnize} to four (4), you
30911 write the following:
30912
30913 @lisp
30914 (setq gnus-florgbnize 4)
30915 @end lisp
30916
30917 This function (really ``special form'') @code{setq} is the one that can
30918 set a variable to some value.  This is really all you need to know.  Now
30919 you can go and fill your @file{~/.gnus.el} file with lots of these to
30920 change how Gnus works.
30921
30922 If you have put that thing in your @file{~/.gnus.el} file, it will be
30923 read and @code{eval}ed (which is Lisp-ese for ``run'') the next time you
30924 start Gnus.  If you want to change the variable right away, simply say
30925 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
30926 previous ``form'', which is a simple @code{setq} statement here.
30927
30928 Go ahead---just try it, if you're located at your Emacs.  After you
30929 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
30930 is the return value of the form you @code{eval}ed.
30931
30932 Some pitfalls:
30933
30934 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
30935 that means:
30936
30937 @lisp
30938 (setq gnus-read-active-file 'some)
30939 @end lisp
30940
30941 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
30942 @samp{nntp.ifi.uio.no}'', that means:
30943
30944 @lisp
30945 (setq gnus-nntp-server "nntp.ifi.uio.no")
30946 @end lisp
30947
30948 So be careful not to mix up strings (the latter) with symbols (the
30949 former).  The manual is unambiguous, but it can be confusing.
30950
30951 @page
30952 @include gnus-faq.texi
30953
30954 @node GNU Free Documentation License
30955 @chapter GNU Free Documentation License
30956 @include doclicense.texi
30957
30958 @node Index
30959 @chapter Index
30960 @printindex cp
30961
30962 @node Key Index
30963 @chapter Key Index
30964 @printindex ky
30965
30966 @summarycontents
30967 @contents
30968 @bye
30969
30970 @iftex
30971 @iflatex
30972 \end{document}
30973 @end iflatex
30974 @end iftex
30975
30976 @c Local Variables:
30977 @c mode: texinfo
30978 @c coding: iso-8859-1
30979 @c End:
30980
30981 @ignore
30982    arch-tag: c9fa47e7-78ca-4681-bda9-9fef45d1c819
30983 @end ignore