4f0d2192140d07e82677097ab77bfb9d6a828371
[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, 2002,
13 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 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.3 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 @dircategory Emacs
324 @direntry
325 * Gnus: (gnus).                 The newsreader Gnus.
326 @end direntry
327 @iftex
328 @finalout
329 @end iftex
330
331
332 @titlepage
333 @title Gnus Manual
334
335 @author by Lars Magne Ingebrigtsen
336 @page
337 @vskip 0pt plus 1filll
338 @insertcopying
339 @end titlepage
340
341 @summarycontents
342 @contents
343
344 @node Top
345 @top The Gnus Newsreader
346
347 @ifinfo
348
349 You can read news (and mail) from within Emacs by using Gnus.  The news
350 can be gotten by any nefarious means you can think of---@acronym{NNTP}, local
351 spool or your mbox file.  All at the same time, if you want to push your
352 luck.
353
354 @c Adjust ../Makefile.in if you change the following line:
355 This manual corresponds to No Gnus v0.11.
356
357 @ifnottex
358 @insertcopying
359 @end ifnottex
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 * Babyl::                       Babyl was used by older versions of Rmail.
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 * Ultimate::                    The Ultimate Bulletin Board systems.
699 * Web Archive::                 Reading mailing list archived on web.
700 * RSS::                         Reading RDF site summary.
701 * Customizing W3::              Doing stuff to Emacs/W3 from Gnus.
702
703 @acronym{IMAP}
704
705 * Splitting in IMAP::           Splitting mail with nnimap.
706 * Expiring in IMAP::            Expiring mail with nnimap.
707 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
708 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
709 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
710 * Debugging IMAP::              What to do when things don't work.
711
712 Other Sources
713
714 * Directory Groups::            You can read a directory as if it was a newsgroup.
715 * Anything Groups::             Dired?  Who needs dired?
716 * Document Groups::             Single files can be the basis of a group.
717 * SOUP::                        Reading @sc{soup} packets ``offline''.
718 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
719
720 Document Groups
721
722 * Document Server Internals::   How to add your own document types.
723
724 SOUP
725
726 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
727 * SOUP Groups::                 A back end for reading @sc{soup} packets.
728 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
729
730 Combined Groups
731
732 * Virtual Groups::              Combining articles from many groups.
733 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
734
735 Email Based Diary
736
737 * The NNDiary Back End::        Basic setup and usage.
738 * The Gnus Diary Library::      Utility toolkit on top of nndiary.
739 * Sending or Not Sending::      A final note on sending diary messages.
740
741 The NNDiary Back End
742
743 * Diary Messages::              What makes a message valid for nndiary.
744 * Running NNDiary::             NNDiary has two modes of operation.
745 * Customizing NNDiary::         Bells and whistles.
746
747 The Gnus Diary Library
748
749 * Diary Summary Line Format::           A nicer summary buffer line format.
750 * Diary Articles Sorting::              A nicer way to sort messages.
751 * Diary Headers Generation::            Not doing it manually.
752 * Diary Group Parameters::              Not handling them manually.
753
754 Gnus Unplugged
755
756 * Agent Basics::                How it all is supposed to work.
757 * Agent Categories::            How to tell the Gnus Agent what to download.
758 * Agent Commands::              New commands for all the buffers.
759 * Agent Visuals::               Ways that the agent may effect your summary buffer.
760 * Agent as Cache::              The Agent is a big cache too.
761 * Agent Expiry::                How to make old articles go away.
762 * Agent Regeneration::          How to recover from lost connections and other accidents.
763 * Agent and flags::             How the Agent maintains flags.
764 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
765 * Outgoing Messages::           What happens when you post/mail something?
766 * Agent Variables::             Customizing is fun.
767 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
768 * Batching Agents::             How to fetch news from a @code{cron} job.
769 * Agent Caveats::               What you think it'll do and what it does.
770
771 Agent Categories
772
773 * Category Syntax::             What a category looks like.
774 * Category Buffer::             A buffer for maintaining categories.
775 * Category Variables::          Customize'r'Us.
776
777 Agent Commands
778
779 * Group Agent Commands::        Configure groups and fetch their contents.
780 * Summary Agent Commands::      Manually select then fetch specific articles.
781 * Server Agent Commands::       Select the servers that are supported by the agent.
782
783 Scoring
784
785 * Summary Score Commands::      Adding score entries for the current group.
786 * Group Score Commands::        General score commands.
787 * Score Variables::             Customize your scoring.  (My, what terminology).
788 * Score File Format::           What a score file may contain.
789 * Score File Editing::          You can edit score files by hand as well.
790 * Adaptive Scoring::            Big Sister Gnus knows what you read.
791 * Home Score File::             How to say where new score entries are to go.
792 * Followups To Yourself::       Having Gnus notice when people answer you.
793 * Scoring On Other Headers::    Scoring on non-standard headers.
794 * Scoring Tips::                How to score effectively.
795 * Reverse Scoring::             That problem child of old is not problem.
796 * Global Score Files::          Earth-spanning, ear-splitting score files.
797 * Kill Files::                  They are still here, but they can be ignored.
798 * Converting Kill Files::       Translating kill files to score files.
799 * Advanced Scoring::            Using logical expressions to build score rules.
800 * Score Decays::                It can be useful to let scores wither away.
801
802 Advanced Scoring
803
804 * Advanced Scoring Syntax::     A definition.
805 * Advanced Scoring Examples::   What they look like.
806 * Advanced Scoring Tips::       Getting the most out of it.
807
808 Various
809
810 * Process/Prefix::              A convention used by many treatment commands.
811 * Interactive::                 Making Gnus ask you many questions.
812 * Symbolic Prefixes::           How to supply some Gnus functions with options.
813 * Formatting Variables::        You can specify what buffers should look like.
814 * Window Layout::               Configuring the Gnus buffer windows.
815 * Faces and Fonts::             How to change how faces look.
816 * Compilation::                 How to speed Gnus up.
817 * Mode Lines::                  Displaying information in the mode lines.
818 * Highlighting and Menus::      Making buffers look all nice and cozy.
819 * Buttons::                     Get tendinitis in ten easy steps!
820 * Daemons::                     Gnus can do things behind your back.
821 * NoCeM::                       How to avoid spam and other fatty foods.
822 * Undo::                        Some actions can be undone.
823 * Predicate Specifiers::        Specifying predicates.
824 * Moderation::                  What to do if you're a moderator.
825 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
826 * Fuzzy Matching::              What's the big fuzz?
827 * Thwarting Email Spam::        Simple ways to avoid unsolicited commercial email.
828 * Spam Package::                A package for filtering and processing spam.
829 * The Gnus Registry::           A package for tracking messages by Message-ID.
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 First of all, you should know that there is a special buffer called
999 @code{*Server*} that lists all the servers Gnus knows about.  You can
1000 press @kbd{^} from the Group buffer to see it.  In the Server buffer,
1001 you can press @kbd{RET} on a defined server to see all the groups it
1002 serves (subscribed or not!).  You can also add or delete servers, edit
1003 a foreign server's definition, agentize or de-agentize a server, and
1004 do many other neat things.  @xref{Server Buffer}.  
1005 @xref{Foreign Groups}.  @xref{Agent Basics}.
1006
1007 @vindex gnus-select-method
1008 @c @head
1009 The @code{gnus-select-method} variable says where Gnus should look for
1010 news.  This variable should be a list where the first element says
1011 @dfn{how} and the second element says @dfn{where}.  This method is your
1012 native method.  All groups not fetched with this method are
1013 foreign groups.
1014
1015 For instance, if the @samp{news.somewhere.edu} @acronym{NNTP} server is where
1016 you want to get your daily dosage of news from, you'd say:
1017
1018 @lisp
1019 (setq gnus-select-method '(nntp "news.somewhere.edu"))
1020 @end lisp
1021
1022 If you want to read directly from the local spool, say:
1023
1024 @lisp
1025 (setq gnus-select-method '(nnspool ""))
1026 @end lisp
1027
1028 If you can use a local spool, you probably should, as it will almost
1029 certainly be much faster.  But do not use the local spool if your
1030 server is running Leafnode (which is a simple, standalone private news
1031 server); in this case, use @code{(nntp "localhost")}.
1032
1033 @vindex gnus-nntpserver-file
1034 @cindex NNTPSERVER
1035 @cindex @acronym{NNTP} server
1036 If this variable is not set, Gnus will take a look at the
1037 @env{NNTPSERVER} environment variable.  If that variable isn't set,
1038 Gnus will see whether @code{gnus-nntpserver-file}
1039 (@file{/etc/nntpserver} by default) has any opinions on the matter.
1040 If that fails as well, Gnus will try to use the machine running Emacs
1041 as an @acronym{NNTP} server.  That's a long shot, though.
1042
1043 @vindex gnus-nntp-server
1044 If @code{gnus-nntp-server} is set, this variable will override
1045 @code{gnus-select-method}.  You should therefore set
1046 @code{gnus-nntp-server} to @code{nil}, which is what it is by default.
1047
1048 @vindex gnus-secondary-servers
1049 @vindex gnus-nntp-server
1050 You can also make Gnus prompt you interactively for the name of an
1051 @acronym{NNTP} server.  If you give a non-numerical prefix to @code{gnus}
1052 (i.e., @kbd{C-u M-x gnus}), Gnus will let you choose between the servers
1053 in the @code{gnus-secondary-servers} list (if any).  You can also just
1054 type in the name of any server you feel like visiting.  (Note that this
1055 will set @code{gnus-nntp-server}, which means that if you then @kbd{M-x
1056 gnus} later in the same Emacs session, Gnus will contact the same
1057 server.)
1058
1059 @findex gnus-group-browse-foreign-server
1060 @kindex B (Group)
1061 However, if you use one @acronym{NNTP} server regularly and are just
1062 interested in a couple of groups from a different server, you would be
1063 better served by using the @kbd{B} command in the group buffer.  It will
1064 let you have a look at what groups are available, and you can subscribe
1065 to any of the groups you want to.  This also makes @file{.newsrc}
1066 maintenance much tidier.  @xref{Foreign Groups}.
1067
1068 @vindex gnus-secondary-select-methods
1069 @c @head
1070 A slightly different approach to foreign groups is to set the
1071 @code{gnus-secondary-select-methods} variable.  The select methods
1072 listed in this variable are in many ways just as native as the
1073 @code{gnus-select-method} server.  They will also be queried for active
1074 files during startup (if that's required), and new newsgroups that
1075 appear on these servers will be subscribed (or not) just as native
1076 groups are.
1077
1078 For instance, if you use the @code{nnmbox} back end to read your mail,
1079 you would typically set this variable to
1080
1081 @lisp
1082 (setq gnus-secondary-select-methods '((nnmbox "")))
1083 @end lisp
1084
1085 Note: the @acronym{NNTP} back end stores marks in marks files
1086 (@pxref{NNTP marks}).  This feature makes it easy to share marks between
1087 several Gnus installations, but may slow down things a bit when fetching
1088 new articles.  @xref{NNTP marks}, for more information.
1089
1090
1091 @node The First Time
1092 @section The First Time
1093 @cindex first time usage
1094
1095 If no startup files exist (@pxref{Startup Files}), Gnus will try to
1096 determine what groups should be subscribed by default.
1097
1098 @vindex gnus-default-subscribed-newsgroups
1099 If the variable @code{gnus-default-subscribed-newsgroups} is set, Gnus
1100 will subscribe you to just those groups in that list, leaving the rest
1101 killed.  Your system administrator should have set this variable to
1102 something useful.
1103
1104 Since she hasn't, Gnus will just subscribe you to a few arbitrarily
1105 picked groups (i.e., @samp{*.newusers}).  (@dfn{Arbitrary} is defined
1106 here as @dfn{whatever Lars thinks you should read}.)
1107
1108 You'll also be subscribed to the Gnus documentation group, which should
1109 help you with most common problems.
1110
1111 If @code{gnus-default-subscribed-newsgroups} is @code{t}, Gnus will just
1112 use the normal functions for handling new groups, and not do anything
1113 special.
1114
1115
1116 @node The Server is Down
1117 @section The Server is Down
1118 @cindex server errors
1119
1120 If the default server is down, Gnus will understandably have some
1121 problems starting.  However, if you have some mail groups in addition to
1122 the news groups, you may want to start Gnus anyway.
1123
1124 Gnus, being the trusting sort of program, will ask whether to proceed
1125 without a native select method if that server can't be contacted.  This
1126 will happen whether the server doesn't actually exist (i.e., you have
1127 given the wrong address) or the server has just momentarily taken ill
1128 for some reason or other.  If you decide to continue and have no foreign
1129 groups, you'll find it difficult to actually do anything in the group
1130 buffer.  But, hey, that's your problem.  Blllrph!
1131
1132 @findex gnus-no-server
1133 @kindex M-x gnus-no-server
1134 @c @head
1135 If you know that the server is definitely down, or you just want to read
1136 your mail without bothering with the server at all, you can use the
1137 @code{gnus-no-server} command to start Gnus.  That might come in handy
1138 if you're in a hurry as well.  This command will not attempt to contact
1139 your primary server---instead, it will just activate all groups on level
1140 1 and 2.  (You should preferably keep no native groups on those two
1141 levels.) Also @pxref{Group Levels}.
1142
1143
1144 @node Slave Gnusae
1145 @section Slave Gnusae
1146 @cindex slave
1147
1148 You might want to run more than one Emacs with more than one Gnus at the
1149 same time.  If you are using different @file{.newsrc} files (e.g., if you
1150 are using the two different Gnusae to read from two different servers),
1151 that is no problem whatsoever.  You just do it.
1152
1153 The problem appears when you want to run two Gnusae that use the same
1154 @file{.newsrc} file.
1155
1156 To work around that problem some, we here at the Think-Tank at the Gnus
1157 Towers have come up with a new concept: @dfn{Masters} and
1158 @dfn{slaves}.  (We have applied for a patent on this concept, and have
1159 taken out a copyright on those words.  If you wish to use those words in
1160 conjunction with each other, you have to send $1 per usage instance to
1161 me.  Usage of the patent (@dfn{Master/Slave Relationships In Computer
1162 Applications}) will be much more expensive, of course.)
1163
1164 @findex gnus-slave
1165 Anyway, you start one Gnus up the normal way with @kbd{M-x gnus} (or
1166 however you do it).  Each subsequent slave Gnusae should be started with
1167 @kbd{M-x gnus-slave}.  These slaves won't save normal @file{.newsrc}
1168 files, but instead save @dfn{slave files} that contain information only
1169 on what groups have been read in the slave session.  When a master Gnus
1170 starts, it will read (and delete) these slave files, incorporating all
1171 information from them.  (The slave files will be read in the sequence
1172 they were created, so the latest changes will have precedence.)
1173
1174 Information from the slave files has, of course, precedence over the
1175 information in the normal (i.e., master) @file{.newsrc} file.
1176
1177 If the @file{.newsrc*} files have not been saved in the master when the
1178 slave starts, you may be prompted as to whether to read an auto-save
1179 file.  If you answer ``yes'', the unsaved changes to the master will be
1180 incorporated into the slave.  If you answer ``no'', the slave may see some
1181 messages as unread that have been read in the master.
1182
1183
1184
1185 @node New Groups
1186 @section New Groups
1187 @cindex new groups
1188 @cindex subscription
1189
1190 @vindex gnus-check-new-newsgroups
1191 If you are satisfied that you really never want to see any new groups,
1192 you can set @code{gnus-check-new-newsgroups} to @code{nil}.  This will
1193 also save you some time at startup.  Even if this variable is
1194 @code{nil}, you can always subscribe to the new groups just by pressing
1195 @kbd{U} in the group buffer (@pxref{Group Maintenance}).  This variable
1196 is @code{ask-server} by default.  If you set this variable to
1197 @code{always}, then Gnus will query the back ends for new groups even
1198 when you do the @kbd{g} command (@pxref{Scanning New Messages}).
1199
1200 @menu
1201 * Checking New Groups::         Determining what groups are new.
1202 * Subscription Methods::        What Gnus should do with new groups.
1203 * Filtering New Groups::        Making Gnus ignore certain new groups.
1204 @end menu
1205
1206
1207 @node Checking New Groups
1208 @subsection Checking New Groups
1209
1210 Gnus normally determines whether a group is new or not by comparing the
1211 list of groups from the active file(s) with the lists of subscribed and
1212 dead groups.  This isn't a particularly fast method.  If
1213 @code{gnus-check-new-newsgroups} is @code{ask-server}, Gnus will ask the
1214 server for new groups since the last time.  This is both faster and
1215 cheaper.  This also means that you can get rid of the list of killed
1216 groups altogether, so you may set @code{gnus-save-killed-list} to
1217 @code{nil}, which will save time both at startup, at exit, and all over.
1218 Saves disk space, too.  Why isn't this the default, then?
1219 Unfortunately, not all servers support this command.
1220
1221 I bet I know what you're thinking now: How do I find out whether my
1222 server supports @code{ask-server}?  No?  Good, because I don't have a
1223 fail-safe answer.  I would suggest just setting this variable to
1224 @code{ask-server} and see whether any new groups appear within the next
1225 few days.  If any do, then it works.  If none do, then it doesn't
1226 work.  I could write a function to make Gnus guess whether the server
1227 supports @code{ask-server}, but it would just be a guess.  So I won't.
1228 You could @code{telnet} to the server and say @code{HELP} and see
1229 whether it lists @samp{NEWGROUPS} among the commands it understands.  If
1230 it does, then it might work.  (But there are servers that lists
1231 @samp{NEWGROUPS} without supporting the function properly.)
1232
1233 This variable can also be a list of select methods.  If so, Gnus will
1234 issue an @code{ask-server} command to each of the select methods, and
1235 subscribe them (or not) using the normal methods.  This might be handy
1236 if you are monitoring a few servers for new groups.  A side effect is
1237 that startup will take much longer, so you can meditate while waiting.
1238 Use the mantra ``dingnusdingnusdingnus'' to achieve permanent bliss.
1239
1240
1241 @node Subscription Methods
1242 @subsection Subscription Methods
1243
1244 @vindex gnus-subscribe-newsgroup-method
1245 What Gnus does when it encounters a new group is determined by the
1246 @code{gnus-subscribe-newsgroup-method} variable.
1247
1248 This variable should contain a function.  This function will be called
1249 with the name of the new group as the only parameter.
1250
1251 Some handy pre-fab functions are:
1252
1253 @table @code
1254
1255 @item gnus-subscribe-zombies
1256 @vindex gnus-subscribe-zombies
1257 Make all new groups zombies.  This is the default.  You can browse the
1258 zombies later (with @kbd{A z}) and either kill them all off properly
1259 (with @kbd{S z}), or subscribe to them (with @kbd{u}).
1260
1261 @item gnus-subscribe-randomly
1262 @vindex gnus-subscribe-randomly
1263 Subscribe all new groups in arbitrary order.  This really means that all
1264 new groups will be added at ``the top'' of the group buffer.
1265
1266 @item gnus-subscribe-alphabetically
1267 @vindex gnus-subscribe-alphabetically
1268 Subscribe all new groups in alphabetical order.
1269
1270 @item gnus-subscribe-hierarchically
1271 @vindex gnus-subscribe-hierarchically
1272 Subscribe all new groups hierarchically.  The difference between this
1273 function and @code{gnus-subscribe-alphabetically} is slight.
1274 @code{gnus-subscribe-alphabetically} will subscribe new groups in a strictly
1275 alphabetical fashion, while this function will enter groups into its
1276 hierarchy.  So if you want to have the @samp{rec} hierarchy before the
1277 @samp{comp} hierarchy, this function will not mess that configuration
1278 up.  Or something like that.
1279
1280 @item gnus-subscribe-interactively
1281 @vindex gnus-subscribe-interactively
1282 Subscribe new groups interactively.  This means that Gnus will ask
1283 you about @strong{all} new groups.  The groups you choose to subscribe
1284 to will be subscribed hierarchically.
1285
1286 @item gnus-subscribe-killed
1287 @vindex gnus-subscribe-killed
1288 Kill all new groups.
1289
1290 @item gnus-subscribe-topics
1291 @vindex gnus-subscribe-topics
1292 Put the groups into the topic that has a matching @code{subscribe} topic
1293 parameter (@pxref{Topic Parameters}).  For instance, a @code{subscribe}
1294 topic parameter that looks like
1295
1296 @example
1297 "nnml"
1298 @end example
1299
1300 will mean that all groups that match that regex will be subscribed under
1301 that topic.
1302
1303 If no topics match the groups, the groups will be subscribed in the
1304 top-level topic.
1305
1306 @end table
1307
1308 @vindex gnus-subscribe-hierarchical-interactive
1309 A closely related variable is
1310 @code{gnus-subscribe-hierarchical-interactive}.  (That's quite a
1311 mouthful.)  If this variable is non-@code{nil}, Gnus will ask you in a
1312 hierarchical fashion whether to subscribe to new groups or not.  Gnus
1313 will ask you for each sub-hierarchy whether you want to descend the
1314 hierarchy or not.
1315
1316 One common mistake is to set the variable a few paragraphs above
1317 (@code{gnus-subscribe-newsgroup-method}) to
1318 @code{gnus-subscribe-hierarchical-interactive}.  This is an error.  This
1319 will not work.  This is ga-ga.  So don't do it.
1320
1321
1322 @node Filtering New Groups
1323 @subsection Filtering New Groups
1324
1325 A nice and portable way to control which new newsgroups should be
1326 subscribed (or ignored) is to put an @dfn{options} line at the start of
1327 the @file{.newsrc} file.  Here's an example:
1328
1329 @example
1330 options -n !alt.all !rec.all sci.all
1331 @end example
1332
1333 @vindex gnus-subscribe-options-newsgroup-method
1334 This line obviously belongs to a serious-minded intellectual scientific
1335 person (or she may just be plain old boring), because it says that all
1336 groups that have names beginning with @samp{alt} and @samp{rec} should
1337 be ignored, and all groups with names beginning with @samp{sci} should
1338 be subscribed.  Gnus will not use the normal subscription method for
1339 subscribing these groups.
1340 @code{gnus-subscribe-options-newsgroup-method} is used instead.  This
1341 variable defaults to @code{gnus-subscribe-alphabetically}.
1342
1343 @vindex gnus-options-not-subscribe
1344 @vindex gnus-options-subscribe
1345 If you don't want to mess with your @file{.newsrc} file, you can just
1346 set the two variables @code{gnus-options-subscribe} and
1347 @code{gnus-options-not-subscribe}.  These two variables do exactly the
1348 same as the @file{.newsrc} @samp{options -n} trick.  Both are regexps,
1349 and if the new group matches the former, it will be unconditionally
1350 subscribed, and if it matches the latter, it will be ignored.
1351
1352 @vindex gnus-auto-subscribed-groups
1353 Yet another variable that meddles here is
1354 @code{gnus-auto-subscribed-groups}.  It works exactly like
1355 @code{gnus-options-subscribe}, and is therefore really superfluous,
1356 but I thought it would be nice to have two of these.  This variable is
1357 more meant for setting some ground rules, while the other variable is
1358 used more for user fiddling.  By default this variable makes all new
1359 groups that come from mail back ends (@code{nnml}, @code{nnbabyl},
1360 @code{nnfolder}, @code{nnmbox}, @code{nnmh}, and @code{nnmaildir})
1361 subscribed.  If you don't like that, just set this variable to
1362 @code{nil}.
1363
1364 New groups that match this regexp are subscribed using
1365 @code{gnus-subscribe-options-newsgroup-method}.
1366
1367
1368 @node Changing Servers
1369 @section Changing Servers
1370 @cindex changing servers
1371
1372 Sometimes it is necessary to move from one @acronym{NNTP} server to another.
1373 This happens very rarely, but perhaps you change jobs, or one server is
1374 very flaky and you want to use another.
1375
1376 Changing the server is pretty easy, right?  You just change
1377 @code{gnus-select-method} to point to the new server?
1378
1379 @emph{Wrong!}
1380
1381 Article numbers are not (in any way) kept synchronized between different
1382 @acronym{NNTP} servers, and the only way Gnus keeps track of what articles
1383 you have read is by keeping track of article numbers.  So when you
1384 change @code{gnus-select-method}, your @file{.newsrc} file becomes
1385 worthless.
1386
1387 Gnus provides a few functions to attempt to translate a @file{.newsrc}
1388 file from one server to another.  They all have one thing in
1389 common---they take a looong time to run.  You don't want to use these
1390 functions more than absolutely necessary.
1391
1392 @kindex M-x gnus-change-server
1393 @findex gnus-change-server
1394 If you have access to both servers, Gnus can request the headers for all
1395 the articles you have read and compare @code{Message-ID}s and map the
1396 article numbers of the read articles and article marks.  The @kbd{M-x
1397 gnus-change-server} command will do this for all your native groups.  It
1398 will prompt for the method you want to move to.
1399
1400 @kindex M-x gnus-group-move-group-to-server
1401 @findex gnus-group-move-group-to-server
1402 You can also move individual groups with the @kbd{M-x
1403 gnus-group-move-group-to-server} command.  This is useful if you want to
1404 move a (foreign) group from one server to another.
1405
1406 @kindex M-x gnus-group-clear-data-on-native-groups
1407 @findex gnus-group-clear-data-on-native-groups
1408 If you don't have access to both the old and new server, all your marks
1409 and read ranges have become worthless.  You can use the @kbd{M-x
1410 gnus-group-clear-data-on-native-groups} command to clear out all data
1411 that you have on your native groups.  Use with caution.
1412
1413 @kindex M-x gnus-group-clear-data
1414 @findex gnus-group-clear-data
1415 Clear the data from the current group only---nix out marks and the
1416 list of read articles (@code{gnus-group-clear-data}).
1417
1418 After changing servers, you @strong{must} move the cache hierarchy away,
1419 since the cached articles will have wrong article numbers, which will
1420 affect which articles Gnus thinks are read.
1421 @code{gnus-group-clear-data-on-native-groups} will ask you if you want
1422 to have it done automatically; for @code{gnus-group-clear-data}, you
1423 can use @kbd{M-x gnus-cache-move-cache} (but beware, it will move the
1424 cache for all groups).
1425
1426
1427 @node Startup Files
1428 @section Startup Files
1429 @cindex startup files
1430 @cindex .newsrc
1431 @cindex .newsrc.el
1432 @cindex .newsrc.eld
1433
1434 Most common Unix news readers use a shared startup file called
1435 @file{.newsrc}.  This file contains all the information about what
1436 groups are subscribed, and which articles in these groups have been
1437 read.
1438
1439 Things got a bit more complicated with @sc{gnus}.  In addition to
1440 keeping the @file{.newsrc} file updated, it also used a file called
1441 @file{.newsrc.el} for storing all the information that didn't fit into
1442 the @file{.newsrc} file.  (Actually, it also duplicated everything in
1443 the @file{.newsrc} file.)  @sc{gnus} would read whichever one of these
1444 files was the most recently saved, which enabled people to swap between
1445 @sc{gnus} and other newsreaders.
1446
1447 That was kinda silly, so Gnus went one better: In addition to the
1448 @file{.newsrc} and @file{.newsrc.el} files, Gnus also has a file called
1449 @file{.newsrc.eld}.  It will read whichever of these files that are most
1450 recent, but it will never write a @file{.newsrc.el} file.  You should
1451 never delete the @file{.newsrc.eld} file---it contains much information
1452 not stored in the @file{.newsrc} file.
1453
1454 @vindex gnus-save-newsrc-file
1455 @vindex gnus-read-newsrc-file
1456 You can turn off writing the @file{.newsrc} file by setting
1457 @code{gnus-save-newsrc-file} to @code{nil}, which means you can delete
1458 the file and save some space, as well as exiting from Gnus faster.
1459 However, this will make it impossible to use other newsreaders than
1460 Gnus.  But hey, who would want to, right?  Similarly, setting
1461 @code{gnus-read-newsrc-file} to @code{nil} makes Gnus ignore the
1462 @file{.newsrc} file and any @file{.newsrc-SERVER} files, which can be
1463 convenient if you use a different news reader occasionally, and you
1464 want to read a different subset of the available groups with that
1465 news reader.
1466
1467 @vindex gnus-save-killed-list
1468 If @code{gnus-save-killed-list} (default @code{t}) is @code{nil}, Gnus
1469 will not save the list of killed groups to the startup file.  This will
1470 save both time (when starting and quitting) and space (on disk).  It
1471 will also mean that Gnus has no record of what groups are new or old,
1472 so the automatic new groups subscription methods become meaningless.
1473 You should always set @code{gnus-check-new-newsgroups} to @code{nil} or
1474 @code{ask-server} if you set this variable to @code{nil} (@pxref{New
1475 Groups}).  This variable can also be a regular expression.  If that's
1476 the case, remove all groups that do not match this regexp before
1477 saving.  This can be useful in certain obscure situations that involve
1478 several servers where not all servers support @code{ask-server}.
1479
1480 @vindex gnus-startup-file
1481 @vindex gnus-backup-startup-file
1482 @vindex version-control
1483 The @code{gnus-startup-file} variable says where the startup files are.
1484 The default value is @file{~/.newsrc}, with the Gnus (El Dingo) startup
1485 file being whatever that one is, with a @samp{.eld} appended.
1486 If you want version control for this file, set
1487 @code{gnus-backup-startup-file}.  It respects the same values as the
1488 @code{version-control} variable.
1489
1490 @vindex gnus-save-newsrc-hook
1491 @vindex gnus-save-quick-newsrc-hook
1492 @vindex gnus-save-standard-newsrc-hook
1493 @code{gnus-save-newsrc-hook} is called before saving any of the newsrc
1494 files, while @code{gnus-save-quick-newsrc-hook} is called just before
1495 saving the @file{.newsrc.eld} file, and
1496 @code{gnus-save-standard-newsrc-hook} is called just before saving the
1497 @file{.newsrc} file.  The latter two are commonly used to turn version
1498 control on or off.  Version control is on by default when saving the
1499 startup files.  If you want to turn backup creation off, say something like:
1500
1501 @lisp
1502 (defun turn-off-backup ()
1503   (set (make-local-variable 'backup-inhibited) t))
1504
1505 (add-hook 'gnus-save-quick-newsrc-hook 'turn-off-backup)
1506 (add-hook 'gnus-save-standard-newsrc-hook 'turn-off-backup)
1507 @end lisp
1508
1509 @vindex gnus-init-file
1510 @vindex gnus-site-init-file
1511 When Gnus starts, it will read the @code{gnus-site-init-file}
1512 (@file{.../site-lisp/gnus-init} by default) and @code{gnus-init-file}
1513 (@file{~/.gnus} by default) files.  These are normal Emacs Lisp files
1514 and can be used to avoid cluttering your @file{~/.emacs} and
1515 @file{site-init} files with Gnus stuff.  Gnus will also check for files
1516 with the same names as these, but with @file{.elc} and @file{.el}
1517 suffixes.  In other words, if you have set @code{gnus-init-file} to
1518 @file{~/.gnus}, it will look for @file{~/.gnus.elc}, @file{~/.gnus.el},
1519 and finally @file{~/.gnus} (in this order).  If Emacs was invoked with
1520 the @option{-q} or @option{--no-init-file} options (@pxref{Initial
1521 Options, ,Initial Options, emacs, The Emacs Manual}), Gnus doesn't read
1522 @code{gnus-init-file}.
1523
1524
1525 @node Auto Save
1526 @section Auto Save
1527 @cindex dribble file
1528 @cindex auto-save
1529
1530 Whenever you do something that changes the Gnus data (reading articles,
1531 catching up, killing/subscribing groups), the change is added to a
1532 special @dfn{dribble buffer}.  This buffer is auto-saved the normal
1533 Emacs way.  If your Emacs should crash before you have saved the
1534 @file{.newsrc} files, all changes you have made can be recovered from
1535 this file.
1536
1537 If Gnus detects this file at startup, it will ask the user whether to
1538 read it.  The auto save file is deleted whenever the real startup file is
1539 saved.
1540
1541 @vindex gnus-use-dribble-file
1542 If @code{gnus-use-dribble-file} is @code{nil}, Gnus won't create and
1543 maintain a dribble buffer.  The default is @code{t}.
1544
1545 @vindex gnus-dribble-directory
1546 Gnus will put the dribble file(s) in @code{gnus-dribble-directory}.  If
1547 this variable is @code{nil}, which it is by default, Gnus will dribble
1548 into the directory where the @file{.newsrc} file is located.  (This is
1549 normally the user's home directory.)  The dribble file will get the same
1550 file permissions as the @file{.newsrc} file.
1551
1552 @vindex gnus-always-read-dribble-file
1553 If @code{gnus-always-read-dribble-file} is non-@code{nil}, Gnus will
1554 read the dribble file on startup without querying the user.
1555
1556
1557 @node The Active File
1558 @section The Active File
1559 @cindex active file
1560 @cindex ignored groups
1561
1562 When Gnus starts, or indeed whenever it tries to determine whether new
1563 articles have arrived, it reads the active file.  This is a very large
1564 file that lists all the active groups and articles on the server.
1565
1566 @vindex gnus-ignored-newsgroups
1567 Before examining the active file, Gnus deletes all lines that match the
1568 regexp @code{gnus-ignored-newsgroups}.  This is done primarily to reject
1569 any groups with bogus names, but you can use this variable to make Gnus
1570 ignore hierarchies you aren't ever interested in.  However, this is not
1571 recommended.  In fact, it's highly discouraged.  Instead, @pxref{New
1572 Groups} for an overview of other variables that can be used instead.
1573
1574 @c This variable is
1575 @c @code{nil} by default, and will slow down active file handling somewhat
1576 @c if you set it to anything else.
1577
1578 @vindex gnus-read-active-file
1579 @c @head
1580 The active file can be rather Huge, so if you have a slow network, you
1581 can set @code{gnus-read-active-file} to @code{nil} to prevent Gnus from
1582 reading the active file.  This variable is @code{some} by default.
1583
1584 Gnus will try to make do by getting information just on the groups that
1585 you actually subscribe to.
1586
1587 Note that if you subscribe to lots and lots of groups, setting this
1588 variable to @code{nil} will probably make Gnus slower, not faster.  At
1589 present, having this variable @code{nil} will slow Gnus down
1590 considerably, unless you read news over a 2400 baud modem.
1591
1592 This variable can also have the value @code{some}.  Gnus will then
1593 attempt to read active info only on the subscribed groups.  On some
1594 servers this is quite fast (on sparkling, brand new INN servers that
1595 support the @code{LIST ACTIVE group} command), on others this isn't fast
1596 at all.  In any case, @code{some} should be faster than @code{nil}, and
1597 is certainly faster than @code{t} over slow lines.
1598
1599 Some news servers (old versions of Leafnode and old versions of INN, for
1600 instance) do not support the @code{LIST ACTIVE group}.  For these
1601 servers, @code{nil} is probably the most efficient value for this
1602 variable.
1603
1604 If this variable is @code{nil}, Gnus will ask for group info in total
1605 lock-step, which isn't very fast.  If it is @code{some} and you use an
1606 @acronym{NNTP} server, Gnus will pump out commands as fast as it can, and
1607 read all the replies in one swoop.  This will normally result in better
1608 performance, but if the server does not support the aforementioned
1609 @code{LIST ACTIVE group} command, this isn't very nice to the server.
1610
1611 If you think that starting up Gnus takes too long, try all the three
1612 different values for this variable and see what works best for you.
1613
1614 In any case, if you use @code{some} or @code{nil}, you should definitely
1615 kill all groups that you aren't interested in to speed things up.
1616
1617 Note that this variable also affects active file retrieval from
1618 secondary select methods.
1619
1620
1621 @node Startup Variables
1622 @section Startup Variables
1623
1624 @table @code
1625
1626 @item gnus-load-hook
1627 @vindex gnus-load-hook
1628 A hook run while Gnus is being loaded.  Note that this hook will
1629 normally be run just once in each Emacs session, no matter how many
1630 times you start Gnus.
1631
1632 @item gnus-before-startup-hook
1633 @vindex gnus-before-startup-hook
1634 A hook called as the first thing when Gnus is started.
1635
1636 @item gnus-startup-hook
1637 @vindex gnus-startup-hook
1638 A hook run as the very last thing after starting up Gnus
1639
1640 @item gnus-started-hook
1641 @vindex gnus-started-hook
1642 A hook that is run as the very last thing after starting up Gnus
1643 successfully.
1644
1645 @item gnus-setup-news-hook
1646 @vindex gnus-setup-news-hook
1647 A hook that is run after reading the @file{.newsrc} file(s), but before
1648 generating the group buffer.
1649
1650 @item gnus-check-bogus-newsgroups
1651 @vindex gnus-check-bogus-newsgroups
1652 If non-@code{nil}, Gnus will check for and delete all bogus groups at
1653 startup.  A @dfn{bogus group} is a group that you have in your
1654 @file{.newsrc} file, but doesn't exist on the news server.  Checking for
1655 bogus groups can take quite a while, so to save time and resources it's
1656 best to leave this option off, and do the checking for bogus groups once
1657 in a while from the group buffer instead (@pxref{Group Maintenance}).
1658
1659 @item gnus-inhibit-startup-message
1660 @vindex gnus-inhibit-startup-message
1661 If non-@code{nil}, the startup message won't be displayed.  That way,
1662 your boss might not notice as easily that you are reading news instead
1663 of doing your job.  Note that this variable is used before
1664 @file{~/.gnus.el} is loaded, so it should be set in @file{.emacs} instead.
1665
1666 @item gnus-no-groups-message
1667 @vindex gnus-no-groups-message
1668 Message displayed by Gnus when no groups are available.
1669
1670 @item gnus-play-startup-jingle
1671 @vindex gnus-play-startup-jingle
1672 If non-@code{nil}, play the Gnus jingle at startup.
1673
1674 @item gnus-startup-jingle
1675 @vindex gnus-startup-jingle
1676 Jingle to be played if the above variable is non-@code{nil}.  The
1677 default is @samp{Tuxedomoon.Jingle4.au}.
1678
1679 @end table
1680
1681
1682 @node Group Buffer
1683 @chapter Group Buffer
1684 @cindex group buffer
1685
1686 @c Alex Schroeder suggests to rearrange this as follows:
1687 @c
1688 @c <kensanata> ok, just save it for reference.  I'll go to bed in a minute.
1689 @c   1. Selecting a Group, 2. (new) Finding a Group, 3. Group Levels,
1690 @c   4. Subscription Commands, 5. Group Maneuvering, 6. Group Data,
1691 @c   7. Group Score, 8. Group Buffer Format
1692 @c <kensanata> Group Levels should have more information on levels 5 to 9.  I
1693 @c   suggest to split the 4th paragraph ("Gnus considers groups...") as follows:
1694 @c <kensanata> First, "Gnus considers groups... (default 9)."
1695 @c <kensanata> New, a table summarizing what levels 1 to 9 mean.
1696 @c <kensanata> Third, "Gnus treats subscribed ... reasons of efficiency"
1697 @c <kensanata> Then expand the next paragraph or add some more to it.
1698 @c    This short one sentence explains levels 1 and 2, therefore I understand
1699 @c    that I should keep important news at 3 and boring news at 4.
1700 @c    Say so!  Then go on to explain why I should bother with levels 6 to 9.
1701 @c    Maybe keep those that you don't want to read temporarily at 6,
1702 @c    those that you never want to read at 8, those that offend your
1703 @c    human rights at 9...
1704
1705
1706 The @dfn{group buffer} lists all (or parts) of the available groups.  It
1707 is the first buffer shown when Gnus starts, and will never be killed as
1708 long as Gnus is active.
1709
1710 @iftex
1711 @iflatex
1712 \gnusfigure{The Group Buffer}{320}{
1713 \put(75,50){\epsfig{figure=ps/group,height=9cm}}
1714 \put(120,37){\makebox(0,0)[t]{Buffer name}}
1715 \put(120,38){\vector(1,2){10}}
1716 \put(40,60){\makebox(0,0)[r]{Mode line}}
1717 \put(40,58){\vector(1,0){30}}
1718 \put(200,28){\makebox(0,0)[t]{Native select method}}
1719 \put(200,26){\vector(-1,2){15}}
1720 }
1721 @end iflatex
1722 @end iftex
1723
1724 @menu
1725 * Group Buffer Format::         Information listed and how you can change it.
1726 * Group Maneuvering::           Commands for moving in the group buffer.
1727 * Selecting a Group::           Actually reading news.
1728 * Subscription Commands::       Unsubscribing, killing, subscribing.
1729 * Group Data::                  Changing the info for a group.
1730 * Group Levels::                Levels? What are those, then?
1731 * Group Score::                 A mechanism for finding out what groups you like.
1732 * Marking Groups::              You can mark groups for later processing.
1733 * Foreign Groups::              Creating and editing groups.
1734 * Group Parameters::            Each group may have different parameters set.
1735 * Listing Groups::              Gnus can list various subsets of the groups.
1736 * Sorting Groups::              Re-arrange the group order.
1737 * Group Maintenance::           Maintaining a tidy @file{.newsrc} file.
1738 * Browse Foreign Server::       You can browse a server.  See what it has to offer.
1739 * Exiting Gnus::                Stop reading news and get some work done.
1740 * Group Topics::                A folding group mode divided into topics.
1741 * Non-ASCII Group Names::       Accessing groups of non-English names.
1742 * Searching::                   Mail search engines.
1743 * Misc Group Stuff::            Other stuff that you can to do.
1744 @end menu
1745
1746
1747 @node Group Buffer Format
1748 @section Group Buffer Format
1749
1750 @menu
1751 * Group Line Specification::    Deciding how the group buffer is to look.
1752 * Group Mode Line Specification::  The group buffer mode line.
1753 * Group Highlighting::          Having nice colors in the group buffer.
1754 @end menu
1755
1756 You can customize the Group Mode tool bar, see @kbd{M-x
1757 customize-apropos RET gnus-group-tool-bar}.  This feature is only
1758 available in Emacs.
1759
1760 The tool bar icons are now (de)activated correctly depending on the
1761 cursor position.  Therefore, moving around in the Group Buffer is
1762 slower.  You can disable this via the variable
1763 @code{gnus-group-update-tool-bar}.  Its default value depends on your
1764 Emacs version.
1765
1766 @node Group Line Specification
1767 @subsection Group Line Specification
1768 @cindex group buffer format
1769
1770 The default format of the group buffer is nice and dull, but you can
1771 make it as exciting and ugly as you feel like.
1772
1773 Here's a couple of example group lines:
1774
1775 @example
1776      25: news.announce.newusers
1777  *    0: alt.fan.andrea-dworkin
1778 @end example
1779
1780 Quite simple, huh?
1781
1782 You can see that there are 25 unread articles in
1783 @samp{news.announce.newusers}.  There are no unread articles, but some
1784 ticked articles, in @samp{alt.fan.andrea-dworkin} (see that little
1785 asterisk at the beginning of the line?).
1786
1787 @vindex gnus-group-line-format
1788 You can change that format to whatever you want by fiddling with the
1789 @code{gnus-group-line-format} variable.  This variable works along the
1790 lines of a @code{format} specification, which is pretty much the same as
1791 a @code{printf} specifications, for those of you who use (feh!) C.
1792 @xref{Formatting Variables}.
1793
1794 @samp{%M%S%5y:%B%(%g%)\n} is the value that produced those lines above.
1795
1796 There should always be a colon on the line; the cursor always moves to
1797 the colon after performing an operation.  @xref{Positioning
1798 Point}.  Nothing else is required---not even the group name.  All
1799 displayed text is just window dressing, and is never examined by Gnus.
1800 Gnus stores all real information it needs using text properties.
1801
1802 (Note that if you make a really strange, wonderful, spreadsheet-like
1803 layout, everybody will believe you are hard at work with the accounting
1804 instead of wasting time reading news.)
1805
1806 Here's a list of all available format characters:
1807
1808 @table @samp
1809
1810 @item M
1811 An asterisk if the group only has marked articles.
1812
1813 @item S
1814 Whether the group is subscribed.
1815
1816 @item L
1817 Level of subscribedness.
1818
1819 @item N
1820 Number of unread articles.
1821
1822 @item I
1823 Number of dormant articles.
1824
1825 @item T
1826 Number of ticked articles.
1827
1828 @item R
1829 Number of read articles.
1830
1831 @item U
1832 Number of unseen articles.
1833
1834 @item t
1835 Estimated total number of articles.  (This is really @var{max-number}
1836 minus @var{min-number} plus 1.)
1837
1838 Gnus uses this estimation because the @acronym{NNTP} protocol provides
1839 efficient access to @var{max-number} and @var{min-number} but getting
1840 the true unread message count is not possible efficiently.  For
1841 hysterical raisins, even the mail back ends, where the true number of
1842 unread messages might be available efficiently, use the same limited
1843 interface.  To remove this restriction from Gnus means that the back
1844 end interface has to be changed, which is not an easy job.
1845
1846 The nnml backend (@pxref{Mail Spool}) has a feature called ``group
1847 compaction'' which circumvents this deficiency: the idea is to
1848 renumber all articles from 1, removing all gaps between numbers, hence
1849 getting a correct total count.  Other backends may support this in the
1850 future.  In order to keep your total article count relatively up to
1851 date, you might want to compact your groups (or even directly your
1852 server) from time to time. @xref{Misc Group Stuff}, @xref{Server Commands}.
1853
1854 @item y
1855 Number of unread, unticked, non-dormant articles.
1856
1857 @item i
1858 Number of ticked and dormant articles.
1859
1860 @item g
1861 Full group name.
1862
1863 @item G
1864 Group name.
1865
1866 @item C
1867 Group comment (@pxref{Group Parameters}) or group name if there is no
1868 comment element in the group parameters.
1869
1870 @item D
1871 Newsgroup description.  You need to read the group descriptions
1872 before these will appear, and to do that, you either have to set
1873 @code{gnus-read-active-file} or use the group buffer @kbd{M-d}
1874 command.
1875
1876 @item o
1877 @samp{m} if moderated.
1878
1879 @item O
1880 @samp{(m)} if moderated.
1881
1882 @item s
1883 Select method.
1884
1885 @item B
1886 If the summary buffer for the group is open or not.
1887
1888 @item n
1889 Select from where.
1890
1891 @item z
1892 A string that looks like @samp{<%s:%n>} if a foreign select method is
1893 used.
1894
1895 @item P
1896 Indentation based on the level of the topic (@pxref{Group Topics}).
1897
1898 @item c
1899 @vindex gnus-group-uncollapsed-levels
1900 Short (collapsed) group name.  The @code{gnus-group-uncollapsed-levels}
1901 variable says how many levels to leave at the end of the group name.
1902 The default is 1---this will mean that group names like
1903 @samp{gnu.emacs.gnus} will be shortened to @samp{g.e.gnus}.
1904
1905 @item m
1906 @vindex gnus-new-mail-mark
1907 @cindex %
1908 @samp{%} (@code{gnus-new-mail-mark}) if there has arrived new mail to
1909 the group lately.
1910
1911 @item p
1912 @samp{#} (@code{gnus-process-mark}) if the group is process marked.
1913
1914 @item d
1915 A string that says when you last read the group (@pxref{Group
1916 Timestamp}).
1917
1918 @item F
1919 The disk space used by the articles fetched by both the cache and
1920 agent.  The value is automatically scaled to bytes(B), kilobytes(K),
1921 megabytes(M), or gigabytes(G) to minimize the column width.  A format
1922 of %7F is sufficient for a fixed-width column.
1923
1924 @item u
1925 User defined specifier.  The next character in the format string should
1926 be a letter.  Gnus will call the function
1927 @code{gnus-user-format-function-}@samp{X}, where @samp{X} is the letter
1928 following @samp{%u}.  The function will be passed a single dummy
1929 parameter as argument.  The function should return a string, which will
1930 be inserted into the buffer just like information from any other
1931 specifier.
1932 @end table
1933
1934 @cindex *
1935 All the ``number-of'' specs will be filled with an asterisk (@samp{*})
1936 if no info is available---for instance, if it is a non-activated foreign
1937 group, or a bogus native group.
1938
1939
1940 @node Group Mode Line Specification
1941 @subsection Group Mode Line Specification
1942 @cindex group mode line
1943
1944 @vindex gnus-group-mode-line-format
1945 The mode line can be changed by setting
1946 @code{gnus-group-mode-line-format} (@pxref{Mode Line Formatting}).  It
1947 doesn't understand that many format specifiers:
1948
1949 @table @samp
1950 @item S
1951 The native news server.
1952 @item M
1953 The native select method.
1954 @end table
1955
1956
1957 @node Group Highlighting
1958 @subsection Group Highlighting
1959 @cindex highlighting
1960 @cindex group highlighting
1961
1962 @vindex gnus-group-highlight
1963 Highlighting in the group buffer is controlled by the
1964 @code{gnus-group-highlight} variable.  This is an alist with elements
1965 that look like @code{(@var{form} . @var{face})}.  If @var{form} evaluates to
1966 something non-@code{nil}, the @var{face} will be used on the line.
1967
1968 Here's an example value for this variable that might look nice if the
1969 background is dark:
1970
1971 @lisp
1972 (cond (window-system
1973        (setq custom-background-mode 'light)
1974        (defface my-group-face-1
1975          '((t (:foreground "Red" :bold t))) "First group face")
1976        (defface my-group-face-2
1977          '((t (:foreground "DarkSeaGreen4" :bold t)))
1978          "Second group face")
1979        (defface my-group-face-3
1980          '((t (:foreground "Green4" :bold t))) "Third group face")
1981        (defface my-group-face-4
1982          '((t (:foreground "SteelBlue" :bold t))) "Fourth group face")
1983        (defface my-group-face-5
1984          '((t (:foreground "Blue" :bold t))) "Fifth group face")))
1985
1986 (setq gnus-group-highlight
1987       '(((> unread 200) . my-group-face-1)
1988         ((and (< level 3) (zerop unread)) . my-group-face-2)
1989         ((< level 3) . my-group-face-3)
1990         ((zerop unread) . my-group-face-4)
1991         (t . my-group-face-5)))
1992 @end lisp
1993
1994 Also @pxref{Faces and Fonts}.
1995
1996 Variables that are dynamically bound when the forms are evaluated
1997 include:
1998
1999 @table @code
2000 @item group
2001 The group name.
2002 @item unread
2003 The number of unread articles in the group.
2004 @item method
2005 The select method.
2006 @item mailp
2007 Whether the group is a mail group.
2008 @item level
2009 The level of the group.
2010 @item score
2011 The score of the group.
2012 @item ticked
2013 The number of ticked articles in the group.
2014 @item total
2015 The total number of articles in the group.  Or rather,
2016 @var{max-number} minus @var{min-number} plus one.
2017 @item topic
2018 When using the topic minor mode, this variable is bound to the current
2019 topic being inserted.
2020 @end table
2021
2022 When the forms are @code{eval}ed, point is at the beginning of the line
2023 of the group in question, so you can use many of the normal Gnus
2024 functions for snarfing info on the group.
2025
2026 @vindex gnus-group-update-hook
2027 @findex gnus-group-highlight-line
2028 @code{gnus-group-update-hook} is called when a group line is changed.
2029 It will not be called when @code{gnus-visual} is @code{nil}.  This hook
2030 calls @code{gnus-group-highlight-line} by default.
2031
2032
2033 @node Group Maneuvering
2034 @section Group Maneuvering
2035 @cindex group movement
2036
2037 All movement commands understand the numeric prefix and will behave as
2038 expected, hopefully.
2039
2040 @table @kbd
2041
2042 @item n
2043 @kindex n (Group)
2044 @findex gnus-group-next-unread-group
2045 Go to the next group that has unread articles
2046 (@code{gnus-group-next-unread-group}).
2047
2048 @item p
2049 @itemx DEL
2050 @kindex DEL (Group)
2051 @kindex p (Group)
2052 @findex gnus-group-prev-unread-group
2053 Go to the previous group that has unread articles
2054 (@code{gnus-group-prev-unread-group}).
2055
2056 @item N
2057 @kindex N (Group)
2058 @findex gnus-group-next-group
2059 Go to the next group (@code{gnus-group-next-group}).
2060
2061 @item P
2062 @kindex P (Group)
2063 @findex gnus-group-prev-group
2064 Go to the previous group (@code{gnus-group-prev-group}).
2065
2066 @item M-n
2067 @kindex M-n (Group)
2068 @findex gnus-group-next-unread-group-same-level
2069 Go to the next unread group on the same (or lower) level
2070 (@code{gnus-group-next-unread-group-same-level}).
2071
2072 @item M-p
2073 @kindex M-p (Group)
2074 @findex gnus-group-prev-unread-group-same-level
2075 Go to the previous unread group on the same (or lower) level
2076 (@code{gnus-group-prev-unread-group-same-level}).
2077 @end table
2078
2079 Three commands for jumping to groups:
2080
2081 @table @kbd
2082
2083 @item j
2084 @kindex j (Group)
2085 @findex gnus-group-jump-to-group
2086 Jump to a group (and make it visible if it isn't already)
2087 (@code{gnus-group-jump-to-group}).  Killed groups can be jumped to, just
2088 like living groups.
2089
2090 @item ,
2091 @kindex , (Group)
2092 @findex gnus-group-best-unread-group
2093 Jump to the unread group with the lowest level
2094 (@code{gnus-group-best-unread-group}).
2095
2096 @item .
2097 @kindex . (Group)
2098 @findex gnus-group-first-unread-group
2099 Jump to the first group with unread articles
2100 (@code{gnus-group-first-unread-group}).
2101 @end table
2102
2103 @vindex gnus-group-goto-unread
2104 If @code{gnus-group-goto-unread} is @code{nil}, all the movement
2105 commands will move to the next group, not the next unread group.  Even
2106 the commands that say they move to the next unread group.  The default
2107 is @code{t}.
2108
2109 @vindex gnus-summary-next-group-on-exit
2110 If @code{gnus-summary-next-group-on-exit} is @code{t}, when a summary is
2111 exited, the point in the group buffer is moved to the next unread group.
2112 Otherwise, the point is set to the group just exited.  The default is
2113 @code{t}.
2114
2115 @node Selecting a Group
2116 @section Selecting a Group
2117 @cindex group selection
2118
2119 @table @kbd
2120
2121 @item SPACE
2122 @kindex SPACE (Group)
2123 @findex gnus-group-read-group
2124 Select the current group, switch to the summary buffer and display the
2125 first unread article (@code{gnus-group-read-group}).  If there are no
2126 unread articles in the group, or if you give a non-numerical prefix to
2127 this command, Gnus will offer to fetch all the old articles in this
2128 group from the server.  If you give a numerical prefix @var{n}, @var{n}
2129 determines the number of articles Gnus will fetch.  If @var{n} is
2130 positive, Gnus fetches the @var{n} newest articles, if @var{n} is
2131 negative, Gnus fetches the @code{abs(@var{n})} oldest articles.
2132
2133 Thus, @kbd{SPC} enters the group normally, @kbd{C-u SPC} offers old
2134 articles, @kbd{C-u 4 2 SPC} fetches the 42 newest articles, and @kbd{C-u
2135 - 4 2 SPC} fetches the 42 oldest ones.
2136
2137 When you are in the group (in the Summary buffer), you can type
2138 @kbd{M-g} to fetch new articles, or @kbd{C-u M-g} to also show the old
2139 ones.
2140
2141 @item RET
2142 @kindex RET (Group)
2143 @findex gnus-group-select-group
2144 Select the current group and switch to the summary buffer
2145 (@code{gnus-group-select-group}).  Takes the same arguments as
2146 @code{gnus-group-read-group}---the only difference is that this command
2147 does not display the first unread article automatically upon group
2148 entry.
2149
2150 @item M-RET
2151 @kindex M-RET (Group)
2152 @findex gnus-group-quick-select-group
2153 This does the same as the command above, but tries to do it with the
2154 minimum amount of fuzz (@code{gnus-group-quick-select-group}).  No
2155 scoring/killing will be performed, there will be no highlights and no
2156 expunging.  This might be useful if you're in a real hurry and have to
2157 enter some humongous group.  If you give a 0 prefix to this command
2158 (i.e., @kbd{0 M-RET}), Gnus won't even generate the summary buffer,
2159 which is useful if you want to toggle threading before generating the
2160 summary buffer (@pxref{Summary Generation Commands}).
2161
2162 @item M-SPACE
2163 @kindex M-SPACE (Group)
2164 @findex gnus-group-visible-select-group
2165 This is yet one more command that does the same as the @kbd{RET}
2166 command, but this one does it without expunging and hiding dormants
2167 (@code{gnus-group-visible-select-group}).
2168
2169 @item C-M-RET
2170 @kindex C-M-RET (Group)
2171 @findex gnus-group-select-group-ephemerally
2172 Finally, this command selects the current group ephemerally without
2173 doing any processing of its contents
2174 (@code{gnus-group-select-group-ephemerally}).  Even threading has been
2175 turned off.  Everything you do in the group after selecting it in this
2176 manner will have no permanent effects.
2177
2178 @end table
2179
2180 @vindex gnus-large-newsgroup
2181 The @code{gnus-large-newsgroup} variable says what Gnus should
2182 consider to be a big group.  If it is @code{nil}, no groups are
2183 considered big.  The default value is 200.  If the group has more
2184 (unread and/or ticked) articles than this, Gnus will query the user
2185 before entering the group.  The user can then specify how many
2186 articles should be fetched from the server.  If the user specifies a
2187 negative number (@var{-n}), the @var{n} oldest articles will be
2188 fetched.  If it is positive, the @var{n} articles that have arrived
2189 most recently will be fetched.
2190
2191 @vindex gnus-large-ephemeral-newsgroup
2192 @code{gnus-large-ephemeral-newsgroup} is the same as
2193 @code{gnus-large-newsgroup}, but is only used for ephemeral
2194 newsgroups.
2195
2196 @vindex gnus-newsgroup-maximum-articles
2197 In groups in some news servers, there might be a big gap between a few
2198 very old articles that will never be expired and the recent ones.  In
2199 such a case, the server will return the data like @code{(1 . 30000000)}
2200 for the @code{LIST ACTIVE group} command, for example.  Even if there
2201 are actually only the articles 1-10 and 29999900-30000000, Gnus doesn't
2202 know it at first and prepares for getting 30000000 articles.  However,
2203 it will consume hundreds megabytes of memories and might make Emacs get
2204 stuck as the case may be.  If you use such news servers, set the
2205 variable @code{gnus-newsgroup-maximum-articles} to a positive number.
2206 The value means that Gnus ignores articles other than this number of the
2207 latest ones in every group.  For instance, the value 10000 makes Gnus
2208 get only the articles 29990001-30000000 (if the latest article number is
2209 30000000 in a group).  Note that setting this variable to a number might
2210 prevent you from reading very old articles.  The default value of the
2211 variable @code{gnus-newsgroup-maximum-articles} is @code{nil}, which
2212 means Gnus never ignores old articles.
2213
2214 @vindex gnus-select-group-hook
2215 @vindex gnus-auto-select-first
2216 @vindex gnus-auto-select-subject
2217 If @code{gnus-auto-select-first} is non-@code{nil}, select an article
2218 automatically when entering a group with the @kbd{SPACE} command.
2219 Which article this is controlled by the
2220 @code{gnus-auto-select-subject} variable.  Valid values for this
2221 variable are:
2222
2223 @table @code
2224
2225 @item unread
2226 Place point on the subject line of the first unread article.
2227
2228 @item first
2229 Place point on the subject line of the first article.
2230
2231 @item unseen
2232 Place point on the subject line of the first unseen article.
2233
2234 @item unseen-or-unread
2235 Place point on the subject line of the first unseen article, and if
2236 there is no such article, place point on the subject line of the first
2237 unread article.
2238
2239 @item best
2240 Place point on the subject line of the highest-scored unread article.
2241
2242 @end table
2243
2244 This variable can also be a function.  In that case, that function
2245 will be called to place point on a subject line.
2246
2247 If you want to prevent automatic selection in some group (say, in a
2248 binary group with Huge articles) you can set the
2249 @code{gnus-auto-select-first} variable to @code{nil} in
2250 @code{gnus-select-group-hook}, which is called when a group is
2251 selected.
2252
2253
2254 @node Subscription Commands
2255 @section Subscription Commands
2256 @cindex subscription
2257
2258 @table @kbd
2259
2260 @item S t
2261 @itemx u
2262 @kindex S t (Group)
2263 @kindex u (Group)
2264 @findex gnus-group-unsubscribe-current-group
2265 @c @icon{gnus-group-unsubscribe}
2266 Toggle subscription to the current group
2267 (@code{gnus-group-unsubscribe-current-group}).
2268
2269 @item S s
2270 @itemx U
2271 @kindex S s (Group)
2272 @kindex U (Group)
2273 @findex gnus-group-unsubscribe-group
2274 Prompt for a group to subscribe, and then subscribe it.  If it was
2275 subscribed already, unsubscribe it instead
2276 (@code{gnus-group-unsubscribe-group}).
2277
2278 @item S k
2279 @itemx C-k
2280 @kindex S k (Group)
2281 @kindex C-k (Group)
2282 @findex gnus-group-kill-group
2283 @c @icon{gnus-group-kill-group}
2284 Kill the current group (@code{gnus-group-kill-group}).
2285
2286 @item S y
2287 @itemx C-y
2288 @kindex S y (Group)
2289 @kindex C-y (Group)
2290 @findex gnus-group-yank-group
2291 Yank the last killed group (@code{gnus-group-yank-group}).
2292
2293 @item C-x C-t
2294 @kindex C-x C-t (Group)
2295 @findex gnus-group-transpose-groups
2296 Transpose two groups (@code{gnus-group-transpose-groups}).  This isn't
2297 really a subscription command, but you can use it instead of a
2298 kill-and-yank sequence sometimes.
2299
2300 @item S w
2301 @itemx C-w
2302 @kindex S w (Group)
2303 @kindex C-w (Group)
2304 @findex gnus-group-kill-region
2305 Kill all groups in the region (@code{gnus-group-kill-region}).
2306
2307 @item S z
2308 @kindex S z (Group)
2309 @findex gnus-group-kill-all-zombies
2310 Kill all zombie groups (@code{gnus-group-kill-all-zombies}).
2311
2312 @item S C-k
2313 @kindex S C-k (Group)
2314 @findex gnus-group-kill-level
2315 Kill all groups on a certain level (@code{gnus-group-kill-level}).
2316 These groups can't be yanked back after killing, so this command should
2317 be used with some caution.  The only time where this command comes in
2318 really handy is when you have a @file{.newsrc} with lots of unsubscribed
2319 groups that you want to get rid off.  @kbd{S C-k} on level 7 will
2320 kill off all unsubscribed groups that do not have message numbers in the
2321 @file{.newsrc} file.
2322
2323 @end table
2324
2325 Also @pxref{Group Levels}.
2326
2327
2328 @node Group Data
2329 @section Group Data
2330
2331 @table @kbd
2332
2333 @item c
2334 @kindex c (Group)
2335 @findex gnus-group-catchup-current
2336 @vindex gnus-group-catchup-group-hook
2337 @c @icon{gnus-group-catchup-current}
2338 Mark all unticked articles in this group as read
2339 (@code{gnus-group-catchup-current}).
2340 @code{gnus-group-catchup-group-hook} is called when catching up a group from
2341 the group buffer.
2342
2343 @item C
2344 @kindex C (Group)
2345 @findex gnus-group-catchup-current-all
2346 Mark all articles in this group, even the ticked ones, as read
2347 (@code{gnus-group-catchup-current-all}).
2348
2349 @item M-c
2350 @kindex M-c (Group)
2351 @findex gnus-group-clear-data
2352 Clear the data from the current group---nix out marks and the list of
2353 read articles (@code{gnus-group-clear-data}).
2354
2355 @item M-x gnus-group-clear-data-on-native-groups
2356 @kindex M-x gnus-group-clear-data-on-native-groups
2357 @findex gnus-group-clear-data-on-native-groups
2358 If you have switched from one @acronym{NNTP} server to another, all your marks
2359 and read ranges have become worthless.  You can use this command to
2360 clear out all data that you have on your native groups.  Use with
2361 caution.
2362
2363 @end table
2364
2365
2366 @node Group Levels
2367 @section Group Levels
2368 @cindex group level
2369 @cindex level
2370
2371 All groups have a level of @dfn{subscribedness}.  For instance, if a
2372 group is on level 2, it is more subscribed than a group on level 5.  You
2373 can ask Gnus to just list groups on a given level or lower
2374 (@pxref{Listing Groups}), or to just check for new articles in groups on
2375 a given level or lower (@pxref{Scanning New Messages}).
2376
2377 Remember:  The higher the level of the group, the less important it is.
2378
2379 @table @kbd
2380
2381 @item S l
2382 @kindex S l (Group)
2383 @findex gnus-group-set-current-level
2384 Set the level of the current group.  If a numeric prefix is given, the
2385 next @var{n} groups will have their levels set.  The user will be
2386 prompted for a level.
2387 @end table
2388
2389 @vindex gnus-level-killed
2390 @vindex gnus-level-zombie
2391 @vindex gnus-level-unsubscribed
2392 @vindex gnus-level-subscribed
2393 Gnus considers groups from levels 1 to
2394 @code{gnus-level-subscribed} (inclusive) (default 5) to be subscribed,
2395 @code{gnus-level-subscribed} (exclusive) and
2396 @code{gnus-level-unsubscribed} (inclusive) (default 7) to be
2397 unsubscribed, @code{gnus-level-zombie} to be zombies (walking dead)
2398 (default 8) and @code{gnus-level-killed} to be killed (completely dead)
2399 (default 9).  Gnus treats subscribed and unsubscribed groups exactly the
2400 same, but zombie and killed groups have no information on what articles
2401 you have read, etc, stored.  This distinction between dead and living
2402 groups isn't done because it is nice or clever, it is done purely for
2403 reasons of efficiency.
2404
2405 It is recommended that you keep all your mail groups (if any) on quite
2406 low levels (e.g. 1 or 2).
2407
2408 Maybe the following description of the default behavior of Gnus helps to
2409 understand what these levels are all about.  By default, Gnus shows you
2410 subscribed nonempty groups, but by hitting @kbd{L} you can have it show
2411 empty subscribed groups and unsubscribed groups, too.  Type @kbd{l} to
2412 go back to showing nonempty subscribed groups again.  Thus, unsubscribed
2413 groups are hidden, in a way.
2414
2415 Zombie and killed groups are similar to unsubscribed groups in that they
2416 are hidden by default.  But they are different from subscribed and
2417 unsubscribed groups in that Gnus doesn't ask the news server for
2418 information (number of messages, number of unread messages) on zombie
2419 and killed groups.  Normally, you use @kbd{C-k} to kill the groups you
2420 aren't interested in.  If most groups are killed, Gnus is faster.
2421
2422 Why does Gnus distinguish between zombie and killed groups?  Well, when
2423 a new group arrives on the server, Gnus by default makes it a zombie
2424 group.  This means that you are normally not bothered with new groups,
2425 but you can type @kbd{A z} to get a list of all new groups.  Subscribe
2426 the ones you like and kill the ones you don't want.  (@kbd{A k} shows a
2427 list of killed groups.)
2428
2429 If you want to play with the level variables, you should show some care.
2430 Set them once, and don't touch them ever again.  Better yet, don't touch
2431 them at all unless you know exactly what you're doing.
2432
2433 @vindex gnus-level-default-unsubscribed
2434 @vindex gnus-level-default-subscribed
2435 Two closely related variables are @code{gnus-level-default-subscribed}
2436 (default 3) and @code{gnus-level-default-unsubscribed} (default 6),
2437 which are the levels that new groups will be put on if they are
2438 (un)subscribed.  These two variables should, of course, be inside the
2439 relevant valid ranges.
2440
2441 @vindex gnus-keep-same-level
2442 If @code{gnus-keep-same-level} is non-@code{nil}, some movement commands
2443 will only move to groups of the same level (or lower).  In
2444 particular, going from the last article in one group to the next group
2445 will go to the next group of the same level (or lower).  This might be
2446 handy if you want to read the most important groups before you read the
2447 rest.
2448
2449 If this variable is @code{best}, Gnus will make the next newsgroup the
2450 one with the best level.
2451
2452 @vindex gnus-group-default-list-level
2453 All groups with a level less than or equal to
2454 @code{gnus-group-default-list-level} will be listed in the group buffer
2455 by default.
2456
2457 @vindex gnus-group-list-inactive-groups
2458 If @code{gnus-group-list-inactive-groups} is non-@code{nil}, non-active
2459 groups will be listed along with the unread groups.  This variable is
2460 @code{t} by default.  If it is @code{nil}, inactive groups won't be
2461 listed.
2462
2463 @vindex gnus-group-use-permanent-levels
2464 If @code{gnus-group-use-permanent-levels} is non-@code{nil}, once you
2465 give a level prefix to @kbd{g} or @kbd{l}, all subsequent commands will
2466 use this level as the ``work'' level.
2467
2468 @vindex gnus-activate-level
2469 Gnus will normally just activate (i. e., query the server about) groups
2470 on level @code{gnus-activate-level} or less.  If you don't want to
2471 activate unsubscribed groups, for instance, you might set this variable
2472 to 5.  The default is 6.
2473
2474
2475 @node Group Score
2476 @section Group Score
2477 @cindex group score
2478 @cindex group rank
2479 @cindex rank
2480
2481 You would normally keep important groups on high levels, but that scheme
2482 is somewhat restrictive.  Don't you wish you could have Gnus sort the
2483 group buffer according to how often you read groups, perhaps?  Within
2484 reason?
2485
2486 This is what @dfn{group score} is for.  You can have Gnus assign a score
2487 to each group through the mechanism described below.  You can then sort
2488 the group buffer based on this score.  Alternatively, you can sort on
2489 score and then level.  (Taken together, the level and the score is
2490 called the @dfn{rank} of the group.  A group that is on level 4 and has
2491 a score of 1 has a higher rank than a group on level 5 that has a score
2492 of 300.  (The level is the most significant part and the score is the
2493 least significant part.))
2494
2495 @findex gnus-summary-bubble-group
2496 If you want groups you read often to get higher scores than groups you
2497 read seldom you can add the @code{gnus-summary-bubble-group} function to
2498 the @code{gnus-summary-exit-hook} hook.  This will result (after
2499 sorting) in a bubbling sort of action.  If you want to see that in
2500 action after each summary exit, you can add
2501 @code{gnus-group-sort-groups-by-rank} or
2502 @code{gnus-group-sort-groups-by-score} to the same hook, but that will
2503 slow things down somewhat.
2504
2505
2506 @node Marking Groups
2507 @section Marking Groups
2508 @cindex marking groups
2509
2510 If you want to perform some command on several groups, and they appear
2511 subsequently in the group buffer, you would normally just give a
2512 numerical prefix to the command.  Most group commands will then do your
2513 bidding on those groups.
2514
2515 However, if the groups are not in sequential order, you can still
2516 perform a command on several groups.  You simply mark the groups first
2517 with the process mark and then execute the command.
2518
2519 @table @kbd
2520
2521 @item #
2522 @kindex # (Group)
2523 @itemx M m
2524 @kindex M m (Group)
2525 @findex gnus-group-mark-group
2526 Set the mark on the current group (@code{gnus-group-mark-group}).
2527
2528 @item M-#
2529 @kindex M-# (Group)
2530 @itemx M u
2531 @kindex M u (Group)
2532 @findex gnus-group-unmark-group
2533 Remove the mark from the current group
2534 (@code{gnus-group-unmark-group}).
2535
2536 @item M U
2537 @kindex M U (Group)
2538 @findex gnus-group-unmark-all-groups
2539 Remove the mark from all groups (@code{gnus-group-unmark-all-groups}).
2540
2541 @item M w
2542 @kindex M w (Group)
2543 @findex gnus-group-mark-region
2544 Mark all groups between point and mark (@code{gnus-group-mark-region}).
2545
2546 @item M b
2547 @kindex M b (Group)
2548 @findex gnus-group-mark-buffer
2549 Mark all groups in the buffer (@code{gnus-group-mark-buffer}).
2550
2551 @item M r
2552 @kindex M r (Group)
2553 @findex gnus-group-mark-regexp
2554 Mark all groups that match some regular expression
2555 (@code{gnus-group-mark-regexp}).
2556 @end table
2557
2558 Also @pxref{Process/Prefix}.
2559
2560 @findex gnus-group-universal-argument
2561 If you want to execute some command on all groups that have been marked
2562 with the process mark, you can use the @kbd{M-&}
2563 (@code{gnus-group-universal-argument}) command.  It will prompt you for
2564 the command to be executed.
2565
2566
2567 @node Foreign Groups
2568 @section Foreign Groups
2569 @cindex foreign groups
2570
2571 Below are some group mode commands for making and editing general foreign
2572 groups, as well as commands to ease the creation of a few
2573 special-purpose groups.  All these commands insert the newly created
2574 groups under point---@code{gnus-subscribe-newsgroup-method} is not
2575 consulted.
2576
2577 Changes from the group editing commands are stored in
2578 @file{~/.newsrc.eld} (@code{gnus-startup-file}).  An alternative is the
2579 variable @code{gnus-parameters}, @xref{Group Parameters}.
2580
2581 @table @kbd
2582
2583 @item G m
2584 @kindex G m (Group)
2585 @findex gnus-group-make-group
2586 @cindex making groups
2587 Make a new group (@code{gnus-group-make-group}).  Gnus will prompt you
2588 for a name, a method and possibly an @dfn{address}.  For an easier way
2589 to subscribe to @acronym{NNTP} groups (@pxref{Browse Foreign Server}).
2590
2591 @item G M
2592 @kindex G M (Group)
2593 @findex gnus-group-read-ephemeral-group
2594 Make an ephemeral group (@code{gnus-group-read-ephemeral-group}).  Gnus
2595 will prompt you for a name, a method and an @dfn{address}.
2596
2597 @item G r
2598 @kindex G r (Group)
2599 @findex gnus-group-rename-group
2600 @cindex renaming groups
2601 Rename the current group to something else
2602 (@code{gnus-group-rename-group}).  This is valid only on some
2603 groups---mail groups mostly.  This command might very well be quite slow
2604 on some back ends.
2605
2606 @item G c
2607 @kindex G c (Group)
2608 @cindex customizing
2609 @findex gnus-group-customize
2610 Customize the group parameters (@code{gnus-group-customize}).
2611
2612 @item G e
2613 @kindex G e (Group)
2614 @findex gnus-group-edit-group-method
2615 @cindex renaming groups
2616 Enter a buffer where you can edit the select method of the current
2617 group (@code{gnus-group-edit-group-method}).
2618
2619 @item G p
2620 @kindex G p (Group)
2621 @findex gnus-group-edit-group-parameters
2622 Enter a buffer where you can edit the group parameters
2623 (@code{gnus-group-edit-group-parameters}).
2624
2625 @item G E
2626 @kindex G E (Group)
2627 @findex gnus-group-edit-group
2628 Enter a buffer where you can edit the group info
2629 (@code{gnus-group-edit-group}).
2630
2631 @item G d
2632 @kindex G d (Group)
2633 @findex gnus-group-make-directory-group
2634 @cindex nndir
2635 Make a directory group (@pxref{Directory Groups}).  You will be prompted
2636 for a directory name (@code{gnus-group-make-directory-group}).
2637
2638 @item G h
2639 @kindex G h (Group)
2640 @cindex help group
2641 @findex gnus-group-make-help-group
2642 Make the Gnus help group (@code{gnus-group-make-help-group}).
2643
2644 @item G a
2645 @kindex G a (Group)
2646 @cindex (ding) archive
2647 @cindex archive group
2648 @findex gnus-group-make-archive-group
2649 @vindex gnus-group-archive-directory
2650 @vindex gnus-group-recent-archive-directory
2651 Make a Gnus archive group (@code{gnus-group-make-archive-group}).  By
2652 default a group pointing to the most recent articles will be created
2653 (@code{gnus-group-recent-archive-directory}), but given a prefix, a full
2654 group will be created from @code{gnus-group-archive-directory}.
2655
2656 @item G k
2657 @kindex G k (Group)
2658 @findex gnus-group-make-kiboze-group
2659 @cindex nnkiboze
2660 Make a kiboze group.  You will be prompted for a name, for a regexp to
2661 match groups to be ``included'' in the kiboze group, and a series of
2662 strings to match on headers (@code{gnus-group-make-kiboze-group}).
2663 @xref{Kibozed Groups}.
2664
2665 @item G D
2666 @kindex G D (Group)
2667 @findex gnus-group-enter-directory
2668 @cindex nneething
2669 Read an arbitrary directory as if it were a newsgroup with the
2670 @code{nneething} back end (@code{gnus-group-enter-directory}).
2671 @xref{Anything Groups}.
2672
2673 @item G f
2674 @kindex G f (Group)
2675 @findex gnus-group-make-doc-group
2676 @cindex ClariNet Briefs
2677 @cindex nndoc
2678 Make a group based on some file or other
2679 (@code{gnus-group-make-doc-group}).  If you give a prefix to this
2680 command, you will be prompted for a file name and a file type.
2681 Currently supported types are @code{mbox}, @code{babyl},
2682 @code{digest}, @code{news}, @code{rnews}, @code{mmdf}, @code{forward},
2683 @code{rfc934}, @code{rfc822-forward}, @code{mime-parts},
2684 @code{standard-digest}, @code{slack-digest}, @code{clari-briefs},
2685 @code{nsmail}, @code{outlook}, @code{oe-dbx}, and @code{mailman}.  If
2686 you run this command without a prefix, Gnus will guess at the file
2687 type.  @xref{Document Groups}.
2688
2689 @item G u
2690 @kindex G u (Group)
2691 @vindex gnus-useful-groups
2692 @findex gnus-group-make-useful-group
2693 Create one of the groups mentioned in @code{gnus-useful-groups}
2694 (@code{gnus-group-make-useful-group}).
2695
2696 @item G w
2697 @kindex G w (Group)
2698 @findex gnus-group-make-web-group
2699 @cindex Google
2700 @cindex nnweb
2701 @cindex gmane
2702 Make an ephemeral group based on a web search
2703 (@code{gnus-group-make-web-group}).  If you give a prefix to this
2704 command, make a solid group instead.  You will be prompted for the
2705 search engine type and the search string.  Valid search engine types
2706 include @code{google}, @code{dejanews}, and @code{gmane}.
2707 @xref{Web Searches}.
2708
2709 If you use the @code{google} search engine, you can limit the search
2710 to a particular group by using a match string like
2711 @samp{shaving group:alt.sysadmin.recovery}.
2712
2713 @item G R
2714 @kindex G R (Group)
2715 @findex gnus-group-make-rss-group
2716 Make a group based on an @acronym{RSS} feed
2717 (@code{gnus-group-make-rss-group}).  You will be prompted for an URL.
2718 @xref{RSS}.
2719
2720 @item G DEL
2721 @kindex G DEL (Group)
2722 @findex gnus-group-delete-group
2723 This function will delete the current group
2724 (@code{gnus-group-delete-group}).  If given a prefix, this function will
2725 actually delete all the articles in the group, and forcibly remove the
2726 group itself from the face of the Earth.  Use a prefix only if you are
2727 absolutely sure of what you are doing.  This command can't be used on
2728 read-only groups (like @code{nntp} groups), though.
2729
2730 @item G V
2731 @kindex G V (Group)
2732 @findex gnus-group-make-empty-virtual
2733 Make a new, fresh, empty @code{nnvirtual} group
2734 (@code{gnus-group-make-empty-virtual}).  @xref{Virtual Groups}.
2735
2736 @item G v
2737 @kindex G v (Group)
2738 @findex gnus-group-add-to-virtual
2739 Add the current group to an @code{nnvirtual} group
2740 (@code{gnus-group-add-to-virtual}).  Uses the process/prefix convention.
2741 @end table
2742
2743 @xref{Select Methods}, for more information on the various select
2744 methods.
2745
2746 @vindex gnus-activate-foreign-newsgroups
2747 If @code{gnus-activate-foreign-newsgroups} is a positive number,
2748 Gnus will check all foreign groups with this level or lower at startup.
2749 This might take quite a while, especially if you subscribe to lots of
2750 groups from different @acronym{NNTP} servers.  Also @pxref{Group Levels};
2751 @code{gnus-activate-level} also affects activation of foreign
2752 newsgroups.
2753
2754
2755 The following commands create ephemeral groups.  They can be called not
2756 only from the Group buffer, but in any Gnus buffer.
2757
2758 @table @code
2759 @item gnus-read-ephemeral-gmane-group
2760 @findex gnus-read-ephemeral-gmane-group
2761 @vindex gnus-gmane-group-download-format
2762 Read an ephemeral group on Gmane.org.  The articles are downloaded via
2763 HTTP using the URL specified by @code{gnus-gmane-group-download-format}.
2764 Gnus will prompt you for a group name, the start article number and an
2765 the article range.
2766
2767 @item gnus-read-ephemeral-gmane-group-url
2768 @findex gnus-read-ephemeral-gmane-group-url
2769 This command is similar to @code{gnus-read-ephemeral-gmane-group}, but
2770 the group name and the article number and range are constructed from a
2771 given @acronym{URL}.  Supported @acronym{URL} formats include e.g.
2772 @url{http://thread.gmane.org/gmane.foo.bar/12300/focus=12399},
2773 @url{http://thread.gmane.org/gmane.foo.bar/12345/},
2774 @url{http://article.gmane.org/gmane.foo.bar/12345/},
2775 @url{http://permalink.gmane.org/gmane.foo.bar/12345/}, and
2776 @url{http://news.gmane.org/group/gmane.foo.bar/thread=12345}.
2777
2778 @item gnus-read-ephemeral-emacs-bug-group
2779 @findex gnus-read-ephemeral-emacs-bug-group
2780 Read an Emacs bug report in an ephemeral group.  Gnus will prompt for a
2781 bug number.  The default is the number at point.  The @acronym{URL} is
2782 specified in @code{gnus-bug-group-download-format-alist}.
2783
2784 @item gnus-read-ephemeral-debian-bug-group
2785 @findex gnus-read-ephemeral-debian-bug-group
2786 Read a Debian bug report in an ephemeral group.  Analog to
2787 @code{gnus-read-ephemeral-emacs-bug-group}.
2788 @end table
2789
2790 Some of these command are also useful for article buttons, @xref{Article
2791 Buttons}.
2792
2793 Here is an example:
2794 @lisp
2795 (require 'gnus-art)
2796 (add-to-list
2797  'gnus-button-alist
2798  '("#\\([0-9]+\\)\\>" 1
2799    (string-match "\\<emacs\\>" (or gnus-newsgroup-name ""))
2800    gnus-read-ephemeral-emacs-bug-group 1))
2801 @end lisp
2802
2803
2804 @node Group Parameters
2805 @section Group Parameters
2806 @cindex group parameters
2807
2808 The group parameters store information local to a particular group.
2809
2810 Use the @kbd{G p} or the @kbd{G c} command to edit group parameters of a
2811 group.  (@kbd{G p} presents you with a Lisp-based interface, @kbd{G c}
2812 presents you with a Customize-like interface.  The latter helps avoid
2813 silly Lisp errors.)  You might also be interested in reading about topic
2814 parameters (@pxref{Topic Parameters}).
2815 Additionally, you can set group parameters via the
2816 @code{gnus-parameters} variable, see below.
2817
2818 Here's an example group parameter list:
2819
2820 @example
2821 ((to-address . "ding@@gnus.org")
2822  (auto-expire . t))
2823 @end example
2824
2825 We see that each element consists of a ``dotted pair''---the thing before
2826 the dot is the key, while the thing after the dot is the value.  All the
2827 parameters have this form @emph{except} local variable specs, which are
2828 not dotted pairs, but proper lists.
2829
2830 Some parameters have correspondent customizable variables, each of which
2831 is an alist of regexps and values.
2832
2833 The following group parameters can be used:
2834
2835 @table @code
2836 @item to-address
2837 @cindex to-address
2838 Address used by when doing followups and new posts.
2839
2840 @example
2841 (to-address . "some@@where.com")
2842 @end example
2843
2844 This is primarily useful in mail groups that represent closed mailing
2845 lists---mailing lists where it's expected that everybody that writes to
2846 the mailing list is subscribed to it.  Since using this parameter
2847 ensures that the mail only goes to the mailing list itself, it means
2848 that members won't receive two copies of your followups.
2849
2850 Using @code{to-address} will actually work whether the group is foreign
2851 or not.  Let's say there's a group on the server that is called
2852 @samp{fa.4ad-l}.  This is a real newsgroup, but the server has gotten
2853 the articles from a mail-to-news gateway.  Posting directly to this
2854 group is therefore impossible---you have to send mail to the mailing
2855 list address instead.
2856
2857 See also @code{gnus-parameter-to-address-alist}.
2858
2859 @item to-list
2860 @cindex to-list
2861 Address used when doing @kbd{a} in that group.
2862
2863 @example
2864 (to-list . "some@@where.com")
2865 @end example
2866
2867 It is totally ignored
2868 when doing a followup---except that if it is present in a news group,
2869 you'll get mail group semantics when doing @kbd{f}.
2870
2871 If you do an @kbd{a} command in a mail group and you have neither a
2872 @code{to-list} group parameter nor a @code{to-address} group parameter,
2873 then a @code{to-list} group parameter will be added automatically upon
2874 sending the message if @code{gnus-add-to-list} is set to @code{t}.
2875 @vindex gnus-add-to-list
2876
2877 @findex gnus-mailing-list-mode
2878 @cindex mail list groups
2879 If this variable is set, @code{gnus-mailing-list-mode} is turned on when
2880 entering summary buffer.
2881
2882 See also @code{gnus-parameter-to-list-alist}.
2883
2884 @anchor{subscribed}
2885 @item subscribed
2886 @cindex subscribed
2887 @cindex Mail-Followup-To
2888 @findex gnus-find-subscribed-addresses
2889 If this parameter is set to @code{t}, Gnus will consider the
2890 to-address and to-list parameters for this group as addresses of
2891 mailing lists you are subscribed to.  Giving Gnus this information is
2892 (only) a first step in getting it to generate correct Mail-Followup-To
2893 headers for your posts to these lists.  The second step is to put the
2894 following in your @file{.gnus.el}
2895
2896 @lisp
2897 (setq message-subscribed-address-functions
2898       '(gnus-find-subscribed-addresses))
2899 @end lisp
2900
2901 @xref{Mailing Lists, ,Mailing Lists, message, The Message Manual}, for
2902 a complete treatment of available MFT support.
2903
2904 @item visible
2905 @cindex visible
2906 If the group parameter list has the element @code{(visible . t)},
2907 that group will always be visible in the Group buffer, regardless
2908 of whether it has any unread articles.
2909
2910 This parameter cannot be set via @code{gnus-parameters}. See
2911 @code{gnus-permanently-visible-groups} as an alternative.
2912
2913 @item broken-reply-to
2914 @cindex broken-reply-to
2915 Elements like @code{(broken-reply-to . t)} signals that @code{Reply-To}
2916 headers in this group are to be ignored, and for the header to be hidden
2917 if @code{reply-to} is part of @code{gnus-boring-article-headers}.  This
2918 can be useful if you're reading a mailing list group where the listserv
2919 has inserted @code{Reply-To} headers that point back to the listserv
2920 itself.  That is broken behavior.  So there!
2921
2922 @item to-group
2923 @cindex to-group
2924 Elements like @code{(to-group . "some.group.name")} means that all
2925 posts in that group will be sent to @code{some.group.name}.
2926
2927 @item newsgroup
2928 @cindex newsgroup
2929 If you have @code{(newsgroup . t)} in the group parameter list, Gnus
2930 will treat all responses as if they were responses to news articles.
2931 This can be useful if you have a mail group that's really a mirror of a
2932 news group.
2933
2934 @item gcc-self
2935 @cindex gcc-self
2936 If @code{(gcc-self . t)} is present in the group parameter list, newly
2937 composed messages will be @code{Gcc}'d to the current group.  If
2938 @code{(gcc-self . none)} is present, no @code{Gcc:} header will be
2939 generated, if @code{(gcc-self . "string")} is present, this string will
2940 be inserted literally as a @code{gcc} header.  This parameter takes
2941 precedence over any default @code{Gcc} rules as described later
2942 (@pxref{Archived Messages}).
2943
2944 @strong{Caveat}: Adding @code{(gcc-self . t)} to the parameter list of
2945 @code{nntp} groups (or the like) isn't valid.  An @code{nntp} server
2946 doesn't accept articles.
2947
2948 @item auto-expire
2949 @cindex auto-expire
2950 @cindex expiring mail
2951 If the group parameter has an element that looks like @code{(auto-expire
2952 . t)}, all articles read will be marked as expirable.  For an
2953 alternative approach, @pxref{Expiring Mail}.
2954
2955 See also @code{gnus-auto-expirable-newsgroups}.
2956
2957 @item total-expire
2958 @cindex total-expire
2959 @cindex expiring mail
2960 If the group parameter has an element that looks like
2961 @code{(total-expire . t)}, all read articles will be put through the
2962 expiry process, even if they are not marked as expirable.  Use with
2963 caution.  Unread, ticked and dormant articles are not eligible for
2964 expiry.
2965
2966 See also @code{gnus-total-expirable-newsgroups}.
2967
2968 @item expiry-wait
2969 @cindex expiry-wait
2970 @vindex nnmail-expiry-wait-function
2971 If the group parameter has an element that looks like
2972 @code{(expiry-wait . 10)}, this value will override any
2973 @code{nnmail-expiry-wait} and @code{nnmail-expiry-wait-function}
2974 (@pxref{Expiring Mail}) when expiring expirable messages.  The value
2975 can either be a number of days (not necessarily an integer) or the
2976 symbols @code{never} or @code{immediate}.
2977
2978 @item expiry-target
2979 @cindex expiry-target
2980 Where expired messages end up.  This parameter overrides
2981 @code{nnmail-expiry-target}.
2982
2983 @item score-file
2984 @cindex score file group parameter
2985 Elements that look like @code{(score-file . "file")} will make
2986 @file{file} into the current score file for the group in question.  All
2987 interactive score entries will be put into this file.
2988
2989 @item adapt-file
2990 @cindex adapt file group parameter
2991 Elements that look like @code{(adapt-file . "file")} will make
2992 @file{file} into the current adaptive file for the group in question.
2993 All adaptive score entries will be put into this file.
2994
2995 @item admin-address
2996 @cindex admin-address
2997 When unsubscribing from a mailing list you should never send the
2998 unsubscription notice to the mailing list itself.  Instead, you'd send
2999 messages to the administrative address.  This parameter allows you to
3000 put the admin address somewhere convenient.
3001
3002 @item display
3003 @cindex display
3004 Elements that look like @code{(display . MODE)} say which articles to
3005 display on entering the group.  Valid values are:
3006
3007 @table @code
3008 @item all
3009 Display all articles, both read and unread.
3010
3011 @item an integer
3012 Display the last @var{integer} articles in the group.  This is the same as
3013 entering the group with @kbd{C-u @var{integer}}.
3014
3015 @item default
3016 Display the default visible articles, which normally includes unread and
3017 ticked articles.
3018
3019 @item an array
3020 Display articles that satisfy a predicate.
3021
3022 Here are some examples:
3023
3024 @table @code
3025 @item [unread]
3026 Display only unread articles.
3027
3028 @item [not expire]
3029 Display everything except expirable articles.
3030
3031 @item [and (not reply) (not expire)]
3032 Display everything except expirable and articles you've already
3033 responded to.
3034 @end table
3035
3036 The available operators are @code{not}, @code{and} and @code{or}.
3037 Predicates include @code{tick}, @code{unsend}, @code{undownload},
3038 @code{unread}, @code{dormant}, @code{expire}, @code{reply},
3039 @code{killed}, @code{bookmark}, @code{score}, @code{save},
3040 @code{cache}, @code{forward}, @code{unseen} and @code{recent}.
3041
3042 @end table
3043
3044 The @code{display} parameter works by limiting the summary buffer to
3045 the subset specified.  You can pop the limit by using the @kbd{/ w}
3046 command (@pxref{Limiting}).
3047
3048 @item comment
3049 @cindex comment
3050 Elements that look like @code{(comment . "This is a comment")} are
3051 arbitrary comments on the group.  You can display comments in the
3052 group line (@pxref{Group Line Specification}).
3053
3054 @item charset
3055 @cindex charset
3056 Elements that look like @code{(charset . iso-8859-1)} will make
3057 @code{iso-8859-1} the default charset; that is, the charset that will be
3058 used for all articles that do not specify a charset.
3059
3060 See also @code{gnus-group-charset-alist}.
3061
3062 @item ignored-charsets
3063 @cindex ignored-charset
3064 Elements that look like @code{(ignored-charsets x-unknown iso-8859-1)}
3065 will make @code{iso-8859-1} and @code{x-unknown} ignored; that is, the
3066 default charset will be used for decoding articles.
3067
3068 See also @code{gnus-group-ignored-charsets-alist}.
3069
3070 @item posting-style
3071 @cindex posting-style
3072 You can store additional posting style information for this group
3073 here (@pxref{Posting Styles}).  The format is that of an entry in the
3074 @code{gnus-posting-styles} alist, except that there's no regexp matching
3075 the group name (of course).  Style elements in this group parameter will
3076 take precedence over the ones found in @code{gnus-posting-styles}.
3077
3078 For instance, if you want a funky name and signature in this group only,
3079 instead of hacking @code{gnus-posting-styles}, you could put something
3080 like this in the group parameters:
3081
3082 @example
3083 (posting-style
3084   (name "Funky Name")
3085   ("X-My-Header" "Funky Value")
3086   (signature "Funky Signature"))
3087 @end example
3088
3089 If you're using topics to organize your group buffer
3090 (@pxref{Group Topics}), note that posting styles can also be set in
3091 the topics parameters. Posting styles in topic parameters apply to all
3092 groups in this topic. More precisely, the posting-style settings for a
3093 group result from the hierarchical merging of all posting-style
3094 entries in the parameters of this group and all the topics it belongs
3095 to.
3096
3097
3098 @item post-method
3099 @cindex post-method
3100 If it is set, the value is used as the method for posting message
3101 instead of @code{gnus-post-method}.
3102
3103 @item mail-source
3104 @cindex mail-source
3105 If it is set, and the setting of @code{mail-sources} includes a
3106 @code{group} mail source (@pxref{Mail Sources}), the value is a
3107 mail source for this group.
3108
3109 @item banner
3110 @cindex banner
3111 An item like @code{(banner . @var{regexp})} causes any part of an article
3112 that matches the regular expression @var{regexp} to be stripped.  Instead of
3113 @var{regexp}, you can also use the symbol @code{signature} which strips the
3114 last signature or any of the elements of the alist
3115 @code{gnus-article-banner-alist}.
3116
3117 @item sieve
3118 @cindex sieve
3119 This parameter contains a Sieve test that should match incoming mail
3120 that should be placed in this group.  From this group parameter, a
3121 Sieve @samp{IF} control structure is generated, having the test as the
3122 condition and @samp{fileinto "group.name";} as the body.
3123
3124 For example, if the @samp{INBOX.list.sieve} group has the @code{(sieve
3125 address "sender" "sieve-admin@@extundo.com")} group parameter, when
3126 translating the group parameter into a Sieve script (@pxref{Sieve
3127 Commands}) the following Sieve code is generated:
3128
3129 @example
3130 if address "sender" "sieve-admin@@extundo.com" @{
3131         fileinto "INBOX.list.sieve";
3132 @}
3133 @end example
3134
3135 To generate tests for multiple email-addresses use a group parameter
3136 like @code{(sieve address "sender" ("name@@one.org" else@@two.org"))}.
3137 When generating a sieve script (@pxref{Sieve Commands}) Sieve code
3138 like the following is generated:
3139
3140 @example
3141 if address "sender" ["name@@one.org", "else@@two.org"] @{
3142         fileinto "INBOX.list.sieve";
3143 @}
3144 @end example
3145
3146 See @pxref{Sieve Commands} for commands and variables that might be of
3147 interest in relation to the sieve parameter.
3148
3149 The Sieve language is described in RFC 3028.  @xref{Top, Emacs Sieve,
3150 Top, sieve, Emacs Sieve}.
3151
3152 @item (agent parameters)
3153 If the agent has been enabled, you can set any of the its parameters
3154 to control the behavior of the agent in individual groups. See Agent
3155 Parameters in @ref{Category Syntax}.  Most users will choose to set
3156 agent parameters in either an agent category or group topic to
3157 minimize the configuration effort.
3158
3159 @item (@var{variable} @var{form})
3160 You can use the group parameters to set variables local to the group you
3161 are entering.  If you want to turn threading off in @samp{news.answers},
3162 you could put @code{(gnus-show-threads nil)} in the group parameters of
3163 that group.  @code{gnus-show-threads} will be made into a local variable
3164 in the summary buffer you enter, and the form @code{nil} will be
3165 @code{eval}ed there.
3166
3167 Note that this feature sets the variable locally to the summary buffer
3168 if and only if @var{variable} has been bound as a variable.  Otherwise,
3169 only evaluating the form will take place.  So, you may want to bind the
3170 variable in advance using @code{defvar} or other if the result of the
3171 form needs to be set to it.
3172
3173 But some variables are evaluated in the article buffer, or in the
3174 message buffer (of a reply or followup or otherwise newly created
3175 message).  As a workaround, it might help to add the variable in
3176 question to @code{gnus-newsgroup-variables}.  @xref{Various Summary
3177 Stuff}.  So if you want to set @code{message-from-style} via the group
3178 parameters, then you may need the following statement elsewhere in your
3179 @file{~/.gnus.el} file:
3180
3181 @lisp
3182 (add-to-list 'gnus-newsgroup-variables 'message-from-style)
3183 @end lisp
3184
3185 @vindex gnus-list-identifiers
3186 A use for this feature is to remove a mailing list identifier tag in
3187 the subject fields of articles.  E.g. if the news group
3188
3189 @example
3190 nntp+news.gnus.org:gmane.text.docbook.apps
3191 @end example
3192
3193 has the tag @samp{DOC-BOOK-APPS:} in the subject of all articles, this
3194 tag can be removed from the article subjects in the summary buffer for
3195 the group by putting @code{(gnus-list-identifiers "DOCBOOK-APPS:")}
3196 into the group parameters for the group.
3197
3198 This can also be used as a group-specific hook function.  If you want to
3199 hear a beep when you enter a group, you could put something like
3200 @code{(dummy-variable (ding))} in the parameters of that group.  If
3201 @code{dummy-variable} has been bound (see above), it will be set to the
3202 (meaningless) result of the @code{(ding)} form.
3203
3204 Alternatively, since the VARIABLE becomes local to the group, this
3205 pattern can be used to temporarily change a hook.  For example, if the
3206 following is added to a group parameter
3207
3208 @lisp
3209 (gnus-summary-prepared-hook
3210   '(lambda nil (local-set-key "d" (local-key-binding "n"))))
3211 @end lisp
3212
3213 when the group is entered, the 'd' key will not mark the article as
3214 expired.
3215
3216 @end table
3217
3218 @vindex gnus-parameters
3219 Group parameters can be set via the @code{gnus-parameters} variable too.
3220 But some variables, such as @code{visible}, have no effect (For this
3221 case see @code{gnus-permanently-visible-groups} as an alternative.).
3222 For example:
3223
3224 @lisp
3225 (setq gnus-parameters
3226       '(("mail\\..*"
3227          (gnus-show-threads nil)
3228          (gnus-use-scoring nil)
3229          (gnus-summary-line-format
3230           "%U%R%z%I%(%[%d:%ub%-23,23f%]%) %s\n")
3231          (gcc-self . t)
3232          (display . all))
3233
3234         ("^nnimap:\\(foo.bar\\)$"
3235          (to-group . "\\1"))
3236
3237         ("mail\\.me"
3238          (gnus-use-scoring  t))
3239
3240         ("list\\..*"
3241          (total-expire . t)
3242          (broken-reply-to . t))))
3243 @end lisp
3244
3245 String value of parameters will be subjected to regexp substitution, as
3246 the @code{to-group} example shows.
3247
3248 @vindex gnus-parameters-case-fold-search
3249 By default, whether comparing the group name and one of those regexps
3250 specified in @code{gnus-parameters} is done in a case-sensitive manner
3251 or a case-insensitive manner depends on the value of
3252 @code{case-fold-search} at the time when the comparison is done.  The
3253 value of @code{case-fold-search} is typically @code{t}; it means, for
3254 example, the element @code{("INBOX\\.FOO" (total-expire . t))} might be
3255 applied to both the @samp{INBOX.FOO} group and the @samp{INBOX.foo}
3256 group.  If you want to make those regexps always case-sensitive, set the
3257 value of the @code{gnus-parameters-case-fold-search} variable to
3258 @code{nil}.  Otherwise, set it to @code{t} if you want to compare them
3259 always in a case-insensitive manner.
3260
3261 You can define different sorting to different groups via
3262 @code{gnus-parameters}.  Here is an example to sort an @acronym{NNTP}
3263 group by reverse date to see the latest news at the top and an
3264 @acronym{RSS} group by subject.  In this example, the first group is the
3265 Debian daily news group @code{gmane.linux.debian.user.news} from
3266 news.gmane.org.  The @acronym{RSS} group corresponds to the Debian
3267 weekly news RSS feed
3268 @url{http://packages.debian.org/unstable/newpkg_main.en.rdf},
3269 @xref{RSS}.
3270
3271 @lisp
3272 (setq
3273  gnus-parameters
3274  '(("nntp.*gmane\\.debian\\.user\\.news"
3275     (gnus-show-threads nil)
3276     (gnus-article-sort-functions '((not gnus-article-sort-by-date)))
3277     (gnus-use-adaptive-scoring nil)
3278     (gnus-use-scoring nil))
3279    ("nnrss.*debian"
3280     (gnus-show-threads nil)
3281     (gnus-article-sort-functions 'gnus-article-sort-by-subject)
3282     (gnus-use-adaptive-scoring nil)
3283     (gnus-use-scoring t)
3284     (gnus-score-find-score-files-function 'gnus-score-find-single)
3285     (gnus-summary-line-format "%U%R%z%d %I%(%[ %s %]%)\n"))))
3286 @end lisp
3287
3288
3289 @node Listing Groups
3290 @section Listing Groups
3291 @cindex group listing
3292
3293 These commands all list various slices of the groups available.
3294
3295 @table @kbd
3296
3297 @item l
3298 @itemx A s
3299 @kindex A s (Group)
3300 @kindex l (Group)
3301 @findex gnus-group-list-groups
3302 List all groups that have unread articles
3303 (@code{gnus-group-list-groups}).  If the numeric prefix is used, this
3304 command will list only groups of level ARG and lower.  By default, it
3305 only lists groups of level five (i.e.,
3306 @code{gnus-group-default-list-level}) or lower (i.e., just subscribed
3307 groups).
3308
3309 @item L
3310 @itemx A u
3311 @kindex A u (Group)
3312 @kindex L (Group)
3313 @findex gnus-group-list-all-groups
3314 List all groups, whether they have unread articles or not
3315 (@code{gnus-group-list-all-groups}).  If the numeric prefix is used,
3316 this command will list only groups of level ARG and lower.  By default,
3317 it lists groups of level seven or lower (i.e., just subscribed and
3318 unsubscribed groups).
3319
3320 @item A l
3321 @kindex A l (Group)
3322 @findex gnus-group-list-level
3323 List all unread groups on a specific level
3324 (@code{gnus-group-list-level}).  If given a prefix, also list the groups
3325 with no unread articles.
3326
3327 @item A k
3328 @kindex A k (Group)
3329 @findex gnus-group-list-killed
3330 List all killed groups (@code{gnus-group-list-killed}).  If given a
3331 prefix argument, really list all groups that are available, but aren't
3332 currently (un)subscribed.  This could entail reading the active file
3333 from the server.
3334
3335 @item A z
3336 @kindex A z (Group)
3337 @findex gnus-group-list-zombies
3338 List all zombie groups (@code{gnus-group-list-zombies}).
3339
3340 @item A m
3341 @kindex A m (Group)
3342 @findex gnus-group-list-matching
3343 List all unread, subscribed groups with names that match a regexp
3344 (@code{gnus-group-list-matching}).
3345
3346 @item A M
3347 @kindex A M (Group)
3348 @findex gnus-group-list-all-matching
3349 List groups that match a regexp (@code{gnus-group-list-all-matching}).
3350
3351 @item A A
3352 @kindex A A (Group)
3353 @findex gnus-group-list-active
3354 List absolutely all groups in the active file(s) of the
3355 server(s) you are connected to (@code{gnus-group-list-active}).  This
3356 might very well take quite a while.  It might actually be a better idea
3357 to do a @kbd{A M} to list all matching, and just give @samp{.} as the
3358 thing to match on.  Also note that this command may list groups that
3359 don't exist (yet)---these will be listed as if they were killed groups.
3360 Take the output with some grains of salt.
3361
3362 @item A a
3363 @kindex A a (Group)
3364 @findex gnus-group-apropos
3365 List all groups that have names that match a regexp
3366 (@code{gnus-group-apropos}).
3367
3368 @item A d
3369 @kindex A d (Group)
3370 @findex gnus-group-description-apropos
3371 List all groups that have names or descriptions that match a regexp
3372 (@code{gnus-group-description-apropos}).
3373
3374 @item A c
3375 @kindex A c (Group)
3376 @findex gnus-group-list-cached
3377 List all groups with cached articles (@code{gnus-group-list-cached}).
3378
3379 @item A ?
3380 @kindex A ? (Group)
3381 @findex gnus-group-list-dormant
3382 List all groups with dormant articles (@code{gnus-group-list-dormant}).
3383
3384 @item A /
3385 @kindex A / (Group)
3386 @findex gnus-group-list-limit
3387 List groups limited within the current selection
3388 (@code{gnus-group-list-limit}).
3389
3390 @item A f
3391 @kindex A f (Group)
3392 @findex gnus-group-list-flush
3393 Flush groups from the current selection (@code{gnus-group-list-flush}).
3394
3395 @item A p
3396 @kindex A p (Group)
3397 @findex gnus-group-list-plus
3398 List groups plus the current selection (@code{gnus-group-list-plus}).
3399
3400 @end table
3401
3402 @vindex gnus-permanently-visible-groups
3403 @cindex visible group parameter
3404 Groups that match the @code{gnus-permanently-visible-groups} regexp will
3405 always be shown, whether they have unread articles or not.  You can also
3406 add the @code{visible} element to the group parameters in question to
3407 get the same effect.
3408
3409 @vindex gnus-list-groups-with-ticked-articles
3410 Groups that have just ticked articles in it are normally listed in the
3411 group buffer.  If @code{gnus-list-groups-with-ticked-articles} is
3412 @code{nil}, these groups will be treated just like totally empty
3413 groups.  It is @code{t} by default.
3414
3415
3416 @node Sorting Groups
3417 @section Sorting Groups
3418 @cindex sorting groups
3419
3420 @kindex C-c C-s (Group)
3421 @findex gnus-group-sort-groups
3422 @vindex gnus-group-sort-function
3423 The @kbd{C-c C-s} (@code{gnus-group-sort-groups}) command sorts the
3424 group buffer according to the function(s) given by the
3425 @code{gnus-group-sort-function} variable.  Available sorting functions
3426 include:
3427
3428 @table @code
3429
3430 @item gnus-group-sort-by-alphabet
3431 @findex gnus-group-sort-by-alphabet
3432 Sort the group names alphabetically.  This is the default.
3433
3434 @item gnus-group-sort-by-real-name
3435 @findex gnus-group-sort-by-real-name
3436 Sort the group alphabetically on the real (unprefixed) group names.
3437
3438 @item gnus-group-sort-by-level
3439 @findex gnus-group-sort-by-level
3440 Sort by group level.
3441
3442 @item gnus-group-sort-by-score
3443 @findex gnus-group-sort-by-score
3444 Sort by group score.  @xref{Group Score}.
3445
3446 @item gnus-group-sort-by-rank
3447 @findex gnus-group-sort-by-rank
3448 Sort by group score and then the group level.  The level and the score
3449 are, when taken together, the group's @dfn{rank}.  @xref{Group Score}.
3450
3451 @item gnus-group-sort-by-unread
3452 @findex gnus-group-sort-by-unread
3453 Sort by number of unread articles.
3454
3455 @item gnus-group-sort-by-method
3456 @findex gnus-group-sort-by-method
3457 Sort alphabetically on the select method.
3458
3459 @item gnus-group-sort-by-server
3460 @findex gnus-group-sort-by-server
3461 Sort alphabetically on the Gnus server name.
3462
3463
3464 @end table
3465
3466 @code{gnus-group-sort-function} can also be a list of sorting
3467 functions.  In that case, the most significant sort key function must be
3468 the last one.
3469
3470
3471 There are also a number of commands for sorting directly according to
3472 some sorting criteria:
3473
3474 @table @kbd
3475 @item G S a
3476 @kindex G S a (Group)
3477 @findex gnus-group-sort-groups-by-alphabet
3478 Sort the group buffer alphabetically by group name
3479 (@code{gnus-group-sort-groups-by-alphabet}).
3480
3481 @item G S u
3482 @kindex G S u (Group)
3483 @findex gnus-group-sort-groups-by-unread
3484 Sort the group buffer by the number of unread articles
3485 (@code{gnus-group-sort-groups-by-unread}).
3486
3487 @item G S l
3488 @kindex G S l (Group)
3489 @findex gnus-group-sort-groups-by-level
3490 Sort the group buffer by group level
3491 (@code{gnus-group-sort-groups-by-level}).
3492
3493 @item G S v
3494 @kindex G S v (Group)
3495 @findex gnus-group-sort-groups-by-score
3496 Sort the group buffer by group score
3497 (@code{gnus-group-sort-groups-by-score}).  @xref{Group Score}.
3498
3499 @item G S r
3500 @kindex G S r (Group)
3501 @findex gnus-group-sort-groups-by-rank
3502 Sort the group buffer by group rank
3503 (@code{gnus-group-sort-groups-by-rank}).  @xref{Group Score}.
3504
3505 @item G S m
3506 @kindex G S m (Group)
3507 @findex gnus-group-sort-groups-by-method
3508 Sort the group buffer alphabetically by back end name@*
3509 (@code{gnus-group-sort-groups-by-method}).
3510
3511 @item G S n
3512 @kindex G S n (Group)
3513 @findex gnus-group-sort-groups-by-real-name
3514 Sort the group buffer alphabetically by real (unprefixed) group name
3515 (@code{gnus-group-sort-groups-by-real-name}).
3516
3517 @end table
3518
3519 All the commands below obey the process/prefix convention
3520 (@pxref{Process/Prefix}).
3521
3522 When given a symbolic prefix (@pxref{Symbolic Prefixes}), all these
3523 commands will sort in reverse order.
3524
3525 You can also sort a subset of the groups:
3526
3527 @table @kbd
3528 @item G P a
3529 @kindex G P a (Group)
3530 @findex gnus-group-sort-selected-groups-by-alphabet
3531 Sort the groups alphabetically by group name
3532 (@code{gnus-group-sort-selected-groups-by-alphabet}).
3533
3534 @item G P u
3535 @kindex G P u (Group)
3536 @findex gnus-group-sort-selected-groups-by-unread
3537 Sort the groups by the number of unread articles
3538 (@code{gnus-group-sort-selected-groups-by-unread}).
3539
3540 @item G P l
3541 @kindex G P l (Group)
3542 @findex gnus-group-sort-selected-groups-by-level
3543 Sort the groups by group level
3544 (@code{gnus-group-sort-selected-groups-by-level}).
3545
3546 @item G P v
3547 @kindex G P v (Group)
3548 @findex gnus-group-sort-selected-groups-by-score
3549 Sort the groups by group score
3550 (@code{gnus-group-sort-selected-groups-by-score}).  @xref{Group Score}.
3551
3552 @item G P r
3553 @kindex G P r (Group)
3554 @findex gnus-group-sort-selected-groups-by-rank
3555 Sort the groups by group rank
3556 (@code{gnus-group-sort-selected-groups-by-rank}).  @xref{Group Score}.
3557
3558 @item G P m
3559 @kindex G P m (Group)
3560 @findex gnus-group-sort-selected-groups-by-method
3561 Sort the groups alphabetically by back end name@*
3562 (@code{gnus-group-sort-selected-groups-by-method}).
3563
3564 @item G P n
3565 @kindex G P n (Group)
3566 @findex gnus-group-sort-selected-groups-by-real-name
3567 Sort the groups alphabetically by real (unprefixed) group name
3568 (@code{gnus-group-sort-selected-groups-by-real-name}).
3569
3570 @item G P s
3571 @kindex G P s (Group)
3572 @findex gnus-group-sort-selected-groups
3573 Sort the groups according to @code{gnus-group-sort-function}.
3574
3575 @end table
3576
3577 And finally, note that you can use @kbd{C-k} and @kbd{C-y} to manually
3578 move groups around.
3579
3580
3581 @node Group Maintenance
3582 @section Group Maintenance
3583 @cindex bogus groups
3584
3585 @table @kbd
3586 @item b
3587 @kindex b (Group)
3588 @findex gnus-group-check-bogus-groups
3589 Find bogus groups and delete them
3590 (@code{gnus-group-check-bogus-groups}).
3591
3592 @item F
3593 @kindex F (Group)
3594 @findex gnus-group-find-new-groups
3595 Find new groups and process them (@code{gnus-group-find-new-groups}).
3596 With 1 @kbd{C-u}, use the @code{ask-server} method to query the server
3597 for new groups.  With 2 @kbd{C-u}'s, use most complete method possible
3598 to query the server for new groups, and subscribe the new groups as
3599 zombies.
3600
3601 @item C-c C-x
3602 @kindex C-c C-x (Group)
3603 @findex gnus-group-expire-articles
3604 @cindex expiring mail
3605 Run all expirable articles in the current group through the expiry
3606 process (if any) (@code{gnus-group-expire-articles}).  That is, delete
3607 all expirable articles in the group that have been around for a while.
3608 (@pxref{Expiring Mail}).
3609
3610 @item C-c C-M-x
3611 @kindex C-c C-M-x (Group)
3612 @findex gnus-group-expire-all-groups
3613 @cindex expiring mail
3614 Run all expirable articles in all groups through the expiry process
3615 (@code{gnus-group-expire-all-groups}).
3616
3617 @end table
3618
3619
3620 @node Browse Foreign Server
3621 @section Browse Foreign Server
3622 @cindex foreign servers
3623 @cindex browsing servers
3624
3625 @table @kbd
3626 @item B
3627 @kindex B (Group)
3628 @findex gnus-group-browse-foreign-server
3629 You will be queried for a select method and a server name.  Gnus will
3630 then attempt to contact this server and let you browse the groups there
3631 (@code{gnus-group-browse-foreign-server}).
3632 @end table
3633
3634 @findex gnus-browse-mode
3635 A new buffer with a list of available groups will appear.  This buffer
3636 will use the @code{gnus-browse-mode}.  This buffer looks a bit (well,
3637 a lot) like a normal group buffer.
3638
3639 Here's a list of keystrokes available in the browse mode:
3640
3641 @table @kbd
3642 @item n
3643 @kindex n (Browse)
3644 @findex gnus-group-next-group
3645 Go to the next group (@code{gnus-group-next-group}).
3646
3647 @item p
3648 @kindex p (Browse)
3649 @findex gnus-group-prev-group
3650 Go to the previous group (@code{gnus-group-prev-group}).
3651
3652 @item SPACE
3653 @kindex SPACE (Browse)
3654 @findex gnus-browse-read-group
3655 Enter the current group and display the first article
3656 (@code{gnus-browse-read-group}).
3657
3658 @item RET
3659 @kindex RET (Browse)
3660 @findex gnus-browse-select-group
3661 Enter the current group (@code{gnus-browse-select-group}).
3662
3663 @item u
3664 @kindex u (Browse)
3665 @findex gnus-browse-unsubscribe-current-group
3666 Unsubscribe to the current group, or, as will be the case here,
3667 subscribe to it (@code{gnus-browse-unsubscribe-current-group}).
3668
3669 @item l
3670 @itemx q
3671 @kindex q (Browse)
3672 @kindex l (Browse)
3673 @findex gnus-browse-exit
3674 Exit browse mode (@code{gnus-browse-exit}).
3675
3676 @item d
3677 @kindex d (Browse)
3678 @findex gnus-browse-describe-group
3679 Describe the current group (@code{gnus-browse-describe-group}).
3680
3681 @item ?
3682 @kindex ? (Browse)
3683 @findex gnus-browse-describe-briefly
3684 Describe browse mode briefly (well, there's not much to describe, is
3685 there) (@code{gnus-browse-describe-briefly}).
3686 @end table
3687
3688
3689 @node Exiting Gnus
3690 @section Exiting Gnus
3691 @cindex exiting Gnus
3692
3693 Yes, Gnus is ex(c)iting.
3694
3695 @table @kbd
3696 @item z
3697 @kindex z (Group)
3698 @findex gnus-group-suspend
3699 Suspend Gnus (@code{gnus-group-suspend}).  This doesn't really exit Gnus,
3700 but it kills all buffers except the Group buffer.  I'm not sure why this
3701 is a gain, but then who am I to judge?
3702
3703 @item q
3704 @kindex q (Group)
3705 @findex gnus-group-exit
3706 @c @icon{gnus-group-exit}
3707 Quit Gnus (@code{gnus-group-exit}).
3708
3709 @item Q
3710 @kindex Q (Group)
3711 @findex gnus-group-quit
3712 Quit Gnus without saving the @file{.newsrc} files (@code{gnus-group-quit}).
3713 The dribble file will be saved, though (@pxref{Auto Save}).
3714 @end table
3715
3716 @vindex gnus-exit-gnus-hook
3717 @vindex gnus-suspend-gnus-hook
3718 @vindex gnus-after-exiting-gnus-hook
3719 @code{gnus-suspend-gnus-hook} is called when you suspend Gnus and
3720 @code{gnus-exit-gnus-hook} is called when you quit Gnus, while
3721 @code{gnus-after-exiting-gnus-hook} is called as the final item when
3722 exiting Gnus.
3723
3724 Note:
3725
3726 @quotation
3727 Miss Lisa Cannifax, while sitting in English class, felt her feet go
3728 numbly heavy and herself fall into a hazy trance as the boy sitting
3729 behind her drew repeated lines with his pencil across the back of her
3730 plastic chair.
3731 @end quotation
3732
3733
3734 @node Group Topics
3735 @section Group Topics
3736 @cindex topics
3737
3738 If you read lots and lots of groups, it might be convenient to group
3739 them hierarchically according to topics.  You put your Emacs groups over
3740 here, your sex groups over there, and the rest (what, two groups or so?)
3741 you put in some misc section that you never bother with anyway.  You can
3742 even group the Emacs sex groups as a sub-topic to either the Emacs
3743 groups or the sex groups---or both!  Go wild!
3744
3745 @iftex
3746 @iflatex
3747 \gnusfigure{Group Topics}{400}{
3748 \put(75,50){\epsfig{figure=ps/group-topic,height=9cm}}
3749 }
3750 @end iflatex
3751 @end iftex
3752
3753 Here's an example:
3754
3755 @example
3756 Gnus
3757   Emacs -- I wuw it!
3758      3: comp.emacs
3759      2: alt.religion.emacs
3760     Naughty Emacs
3761      452: alt.sex.emacs
3762        0: comp.talk.emacs.recovery
3763   Misc
3764      8: comp.binaries.fractals
3765     13: comp.sources.unix
3766 @end example
3767
3768 @findex gnus-topic-mode
3769 @kindex t (Group)
3770 To get this @emph{fab} functionality you simply turn on (ooh!) the
3771 @code{gnus-topic} minor mode---type @kbd{t} in the group buffer.  (This
3772 is a toggling command.)
3773
3774 Go ahead, just try it.  I'll still be here when you get back.  La de
3775 dum@dots{} Nice tune, that@dots{} la la la@dots{} What, you're back?
3776 Yes, and now press @kbd{l}.  There.  All your groups are now listed
3777 under @samp{misc}.  Doesn't that make you feel all warm and fuzzy?
3778 Hot and bothered?
3779
3780 If you want this permanently enabled, you should add that minor mode to
3781 the hook for the group mode.  Put the following line in your
3782 @file{~/.gnus.el} file:
3783
3784 @lisp
3785 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
3786 @end lisp
3787
3788 @menu
3789 * Topic Commands::              Interactive E-Z commands.
3790 * Topic Variables::             How to customize the topics the Lisp Way.
3791 * Topic Sorting::               Sorting each topic individually.
3792 * Topic Topology::              A map of the world.
3793 * Topic Parameters::            Parameters that apply to all groups in a topic.
3794 @end menu
3795
3796
3797 @node Topic Commands
3798 @subsection Topic Commands
3799 @cindex topic commands
3800
3801 When the topic minor mode is turned on, a new @kbd{T} submap will be
3802 available.  In addition, a few of the standard keys change their
3803 definitions slightly.
3804
3805 In general, the following kinds of operations are possible on topics.
3806 First of all, you want to create topics.  Secondly, you want to put
3807 groups in topics and to move them around until you have an order you
3808 like.  The third kind of operation is to show/hide parts of the whole
3809 shebang.  You might want to hide a topic including its subtopics and
3810 groups, to get a better overview of the other groups.
3811
3812 Here is a list of the basic keys that you might need to set up topics
3813 the way you like.
3814
3815 @table @kbd
3816
3817 @item T n
3818 @kindex T n (Topic)
3819 @findex gnus-topic-create-topic
3820 Prompt for a new topic name and create it
3821 (@code{gnus-topic-create-topic}).
3822
3823 @item T TAB
3824 @itemx TAB
3825 @kindex T TAB (Topic)
3826 @kindex TAB (Topic)
3827 @findex gnus-topic-indent
3828 ``Indent'' the current topic so that it becomes a sub-topic of the
3829 previous topic (@code{gnus-topic-indent}).  If given a prefix,
3830 ``un-indent'' the topic instead.
3831
3832 @item M-TAB
3833 @kindex M-TAB (Topic)
3834 @findex gnus-topic-unindent
3835 ``Un-indent'' the current topic so that it becomes a sub-topic of the
3836 parent of its current parent (@code{gnus-topic-unindent}).
3837
3838 @end table
3839
3840 The following two keys can be used to move groups and topics around.
3841 They work like the well-known cut and paste.  @kbd{C-k} is like cut and
3842 @kbd{C-y} is like paste.  Of course, this being Emacs, we use the terms
3843 kill and yank rather than cut and paste.
3844
3845 @table @kbd
3846
3847 @item C-k
3848 @kindex C-k (Topic)
3849 @findex gnus-topic-kill-group
3850 Kill a group or topic (@code{gnus-topic-kill-group}).  All groups in the
3851 topic will be removed along with the topic.
3852
3853 @item C-y
3854 @kindex C-y (Topic)
3855 @findex gnus-topic-yank-group
3856 Yank the previously killed group or topic
3857 (@code{gnus-topic-yank-group}).  Note that all topics will be yanked
3858 before all groups.
3859
3860 So, to move a topic to the beginning of the list of topics, just hit
3861 @kbd{C-k} on it.  This is like the ``cut'' part of cut and paste.  Then,
3862 move the cursor to the beginning of the buffer (just below the ``Gnus''
3863 topic) and hit @kbd{C-y}.  This is like the ``paste'' part of cut and
3864 paste.  Like I said -- E-Z.
3865
3866 You can use @kbd{C-k} and @kbd{C-y} on groups as well as on topics.  So
3867 you can move topics around as well as groups.
3868
3869 @end table
3870
3871 After setting up the topics the way you like them, you might wish to
3872 hide a topic, or to show it again.  That's why we have the following
3873 key.
3874
3875 @table @kbd
3876
3877 @item RET
3878 @kindex RET (Topic)
3879 @findex gnus-topic-select-group
3880 @itemx SPACE
3881 Either select a group or fold a topic (@code{gnus-topic-select-group}).
3882 When you perform this command on a group, you'll enter the group, as
3883 usual.  When done on a topic line, the topic will be folded (if it was
3884 visible) or unfolded (if it was folded already).  So it's basically a
3885 toggling command on topics.  In addition, if you give a numerical
3886 prefix, group on that level (and lower) will be displayed.
3887
3888 @end table
3889
3890 Now for a list of other commands, in no particular order.
3891
3892 @table @kbd
3893
3894 @item T m
3895 @kindex T m (Topic)
3896 @findex gnus-topic-move-group
3897 Move the current group to some other topic
3898 (@code{gnus-topic-move-group}).  This command uses the process/prefix
3899 convention (@pxref{Process/Prefix}).
3900
3901 @item T j
3902 @kindex T j (Topic)
3903 @findex gnus-topic-jump-to-topic
3904 Go to a topic (@code{gnus-topic-jump-to-topic}).
3905
3906 @item T c
3907 @kindex T c (Topic)
3908 @findex gnus-topic-copy-group
3909 Copy the current group to some other topic
3910 (@code{gnus-topic-copy-group}).  This command uses the process/prefix
3911 convention (@pxref{Process/Prefix}).
3912
3913 @item T h
3914 @kindex T h (Topic)
3915 @findex gnus-topic-hide-topic
3916 Hide the current topic (@code{gnus-topic-hide-topic}).  If given
3917 a prefix, hide the topic permanently.
3918
3919 @item T s
3920 @kindex T s (Topic)
3921 @findex gnus-topic-show-topic
3922 Show the current topic (@code{gnus-topic-show-topic}).  If given
3923 a prefix, show the topic permanently.
3924
3925 @item T D
3926 @kindex T D (Topic)
3927 @findex gnus-topic-remove-group
3928 Remove a group from the current topic (@code{gnus-topic-remove-group}).
3929 This command is mainly useful if you have the same group in several
3930 topics and wish to remove it from one of the topics.  You may also
3931 remove a group from all topics, but in that case, Gnus will add it to
3932 the root topic the next time you start Gnus.  In fact, all new groups
3933 (which, naturally, don't belong to any topic) will show up in the root
3934 topic.
3935
3936 This command uses the process/prefix convention
3937 (@pxref{Process/Prefix}).
3938
3939 @item T M
3940 @kindex T M (Topic)
3941 @findex gnus-topic-move-matching
3942 Move all groups that match some regular expression to a topic
3943 (@code{gnus-topic-move-matching}).
3944
3945 @item T C
3946 @kindex T C (Topic)
3947 @findex gnus-topic-copy-matching
3948 Copy all groups that match some regular expression to a topic
3949 (@code{gnus-topic-copy-matching}).
3950
3951 @item T H
3952 @kindex T H (Topic)
3953 @findex gnus-topic-toggle-display-empty-topics
3954 Toggle hiding empty topics
3955 (@code{gnus-topic-toggle-display-empty-topics}).
3956
3957 @item T #
3958 @kindex T # (Topic)
3959 @findex gnus-topic-mark-topic
3960 Mark all groups in the current topic with the process mark
3961 (@code{gnus-topic-mark-topic}).  This command works recursively on
3962 sub-topics unless given a prefix.
3963
3964 @item T M-#
3965 @kindex T M-# (Topic)
3966 @findex gnus-topic-unmark-topic
3967 Remove the process mark from all groups in the current topic
3968 (@code{gnus-topic-unmark-topic}).  This command works recursively on
3969 sub-topics unless given a prefix.
3970
3971 @item C-c C-x
3972 @kindex C-c C-x (Topic)
3973 @findex gnus-topic-expire-articles
3974 @cindex expiring mail
3975 Run all expirable articles in the current group or topic through the
3976 expiry process (if any)
3977 (@code{gnus-topic-expire-articles}).  (@pxref{Expiring Mail}).
3978
3979 @item T r
3980 @kindex T r (Topic)
3981 @findex gnus-topic-rename
3982 Rename a topic (@code{gnus-topic-rename}).
3983
3984 @item T DEL
3985 @kindex T DEL (Topic)
3986 @findex gnus-topic-delete
3987 Delete an empty topic (@code{gnus-topic-delete}).
3988
3989 @item A T
3990 @kindex A T (Topic)
3991 @findex gnus-topic-list-active
3992 List all groups that Gnus knows about in a topics-ified way
3993 (@code{gnus-topic-list-active}).
3994
3995 @item T M-n
3996 @kindex T M-n (Topic)
3997 @findex gnus-topic-goto-next-topic
3998 Go to the next topic (@code{gnus-topic-goto-next-topic}).
3999
4000 @item T M-p
4001 @kindex T M-p (Topic)
4002 @findex gnus-topic-goto-previous-topic
4003 Go to the previous topic (@code{gnus-topic-goto-previous-topic}).
4004
4005 @item G p
4006 @kindex G p (Topic)
4007 @findex gnus-topic-edit-parameters
4008 @cindex group parameters
4009 @cindex topic parameters
4010 @cindex parameters
4011 Edit the topic parameters (@code{gnus-topic-edit-parameters}).
4012 @xref{Topic Parameters}.
4013
4014 @end table
4015
4016
4017 @node Topic Variables
4018 @subsection Topic Variables
4019 @cindex topic variables
4020
4021 The previous section told you how to tell Gnus which topics to display.
4022 This section explains how to tell Gnus what to display about each topic.
4023
4024 @vindex gnus-topic-line-format
4025 The topic lines themselves are created according to the
4026 @code{gnus-topic-line-format} variable (@pxref{Formatting Variables}).
4027 Valid elements are:
4028
4029 @table @samp
4030 @item i
4031 Indentation.
4032 @item n
4033 Topic name.
4034 @item v
4035 Visibility.
4036 @item l
4037 Level.
4038 @item g
4039 Number of groups in the topic.
4040 @item a
4041 Number of unread articles in the topic.
4042 @item A
4043 Number of unread articles in the topic and all its subtopics.
4044 @end table
4045
4046 @vindex gnus-topic-indent-level
4047 Each sub-topic (and the groups in the sub-topics) will be indented with
4048 @code{gnus-topic-indent-level} times the topic level number of spaces.
4049 The default is 2.
4050
4051 @vindex gnus-topic-mode-hook
4052 @code{gnus-topic-mode-hook} is called in topic minor mode buffers.
4053
4054 @vindex gnus-topic-display-empty-topics
4055 The @code{gnus-topic-display-empty-topics} says whether to display even
4056 topics that have no unread articles in them.  The default is @code{t}.
4057
4058
4059 @node Topic Sorting
4060 @subsection Topic Sorting
4061 @cindex topic sorting
4062
4063 You can sort the groups in each topic individually with the following
4064 commands:
4065
4066
4067 @table @kbd
4068 @item T S a
4069 @kindex T S a (Topic)
4070 @findex gnus-topic-sort-groups-by-alphabet
4071 Sort the current topic alphabetically by group name
4072 (@code{gnus-topic-sort-groups-by-alphabet}).
4073
4074 @item T S u
4075 @kindex T S u (Topic)
4076 @findex gnus-topic-sort-groups-by-unread
4077 Sort the current topic by the number of unread articles
4078 (@code{gnus-topic-sort-groups-by-unread}).
4079
4080 @item T S l
4081 @kindex T S l (Topic)
4082 @findex gnus-topic-sort-groups-by-level
4083 Sort the current topic by group level
4084 (@code{gnus-topic-sort-groups-by-level}).
4085
4086 @item T S v
4087 @kindex T S v (Topic)
4088 @findex gnus-topic-sort-groups-by-score
4089 Sort the current topic by group score
4090 (@code{gnus-topic-sort-groups-by-score}).  @xref{Group Score}.
4091
4092 @item T S r
4093 @kindex T S r (Topic)
4094 @findex gnus-topic-sort-groups-by-rank
4095 Sort the current topic by group rank
4096 (@code{gnus-topic-sort-groups-by-rank}).  @xref{Group Score}.
4097
4098 @item T S m
4099 @kindex T S m (Topic)
4100 @findex gnus-topic-sort-groups-by-method
4101 Sort the current topic alphabetically by back end name
4102 (@code{gnus-topic-sort-groups-by-method}).
4103
4104 @item T S e
4105 @kindex T S e (Topic)
4106 @findex gnus-topic-sort-groups-by-server
4107 Sort the current topic alphabetically by server name
4108 (@code{gnus-topic-sort-groups-by-server}).
4109
4110 @item T S s
4111 @kindex T S s (Topic)
4112 @findex gnus-topic-sort-groups
4113 Sort the current topic according to the function(s) given by the
4114 @code{gnus-group-sort-function} variable
4115 (@code{gnus-topic-sort-groups}).
4116
4117 @end table
4118
4119 When given a prefix argument, all these commands will sort in reverse
4120 order.  @xref{Sorting Groups}, for more information about group
4121 sorting.
4122
4123
4124 @node Topic Topology
4125 @subsection Topic Topology
4126 @cindex topic topology
4127 @cindex topology
4128
4129 So, let's have a look at an example group buffer:
4130
4131 @example
4132 @group
4133 Gnus
4134   Emacs -- I wuw it!
4135      3: comp.emacs
4136      2: alt.religion.emacs
4137     Naughty Emacs
4138      452: alt.sex.emacs
4139        0: comp.talk.emacs.recovery
4140   Misc
4141      8: comp.binaries.fractals
4142     13: comp.sources.unix
4143 @end group
4144 @end example
4145
4146 So, here we have one top-level topic (@samp{Gnus}), two topics under
4147 that, and one sub-topic under one of the sub-topics.  (There is always
4148 just one (1) top-level topic).  This topology can be expressed as
4149 follows:
4150
4151 @lisp
4152 (("Gnus" visible)
4153  (("Emacs -- I wuw it!" visible)
4154   (("Naughty Emacs" visible)))
4155  (("Misc" visible)))
4156 @end lisp
4157
4158 @vindex gnus-topic-topology
4159 This is in fact how the variable @code{gnus-topic-topology} would look
4160 for the display above.  That variable is saved in the @file{.newsrc.eld}
4161 file, and shouldn't be messed with manually---unless you really want
4162 to.  Since this variable is read from the @file{.newsrc.eld} file,
4163 setting it in any other startup files will have no effect.
4164
4165 This topology shows what topics are sub-topics of what topics (right),
4166 and which topics are visible.  Two settings are currently
4167 allowed---@code{visible} and @code{invisible}.
4168
4169
4170 @node Topic Parameters
4171 @subsection Topic Parameters
4172 @cindex topic parameters
4173
4174 All groups in a topic will inherit group parameters from the parent
4175 (and ancestor) topic parameters.  All valid group parameters are valid
4176 topic parameters (@pxref{Group Parameters}).  When the agent is
4177 enabled, all agent parameters (See Agent Parameters in @ref{Category
4178 Syntax}) are also valid topic parameters.
4179
4180 In addition, the following parameters are only valid as topic
4181 parameters:
4182
4183 @table @code
4184 @item subscribe
4185 When subscribing new groups by topic (@pxref{Subscription Methods}), the
4186 @code{subscribe} topic parameter says what groups go in what topic.  Its
4187 value should be a regexp to match the groups that should go in that
4188 topic.
4189
4190 @item subscribe-level
4191 When subscribing new groups by topic (see the @code{subscribe} parameter),
4192 the group will be subscribed with the level specified in the
4193 @code{subscribe-level} instead of @code{gnus-level-default-subscribed}.
4194
4195 @end table
4196
4197 Group parameters (of course) override topic parameters, and topic
4198 parameters in sub-topics override topic parameters in super-topics.  You
4199 know.  Normal inheritance rules.  (@dfn{Rules} is here a noun, not a
4200 verb, although you may feel free to disagree with me here.)
4201
4202 @example
4203 @group
4204 Gnus
4205   Emacs
4206      3: comp.emacs
4207      2: alt.religion.emacs
4208    452: alt.sex.emacs
4209     Relief
4210      452: alt.sex.emacs
4211        0: comp.talk.emacs.recovery
4212   Misc
4213      8: comp.binaries.fractals
4214     13: comp.sources.unix
4215    452: alt.sex.emacs
4216 @end group
4217 @end example
4218
4219 The @samp{Emacs} topic has the topic parameter @code{(score-file
4220 . "emacs.SCORE")}; the @samp{Relief} topic has the topic parameter
4221 @code{(score-file . "relief.SCORE")}; and the @samp{Misc} topic has the
4222 topic parameter @code{(score-file . "emacs.SCORE")}.  In addition,
4223 @* @samp{alt.religion.emacs} has the group parameter @code{(score-file
4224 . "religion.SCORE")}.
4225
4226 Now, when you enter @samp{alt.sex.emacs} in the @samp{Relief} topic, you
4227 will get the @file{relief.SCORE} home score file.  If you enter the same
4228 group in the @samp{Emacs} topic, you'll get the @file{emacs.SCORE} home
4229 score file.  If you enter the group @samp{alt.religion.emacs}, you'll
4230 get the @file{religion.SCORE} home score file.
4231
4232 This seems rather simple and self-evident, doesn't it?  Well, yes.  But
4233 there are some problems, especially with the @code{total-expiry}
4234 parameter.  Say you have a mail group in two topics; one with
4235 @code{total-expiry} and one without.  What happens when you do @kbd{M-x
4236 gnus-expire-all-expirable-groups}?  Gnus has no way of telling which one
4237 of these topics you mean to expire articles from, so anything may
4238 happen.  In fact, I hereby declare that it is @dfn{undefined} what
4239 happens.  You just have to be careful if you do stuff like that.
4240
4241
4242 @node Non-ASCII Group Names
4243 @section Accessing groups of non-English names
4244 @cindex non-ascii group names
4245
4246 There are some news servers that provide groups of which the names are
4247 expressed with their native languages in the world.  For instance, in a
4248 certain news server there are some newsgroups of which the names are
4249 spelled in Chinese, where people are talking in Chinese.  You can, of
4250 course, subscribe to such news groups using Gnus.  Currently Gnus
4251 supports non-@acronym{ASCII} group names not only with the @code{nntp}
4252 back end but also with the @code{nnml} back end and the @code{nnrss}
4253 back end.
4254
4255 Every such group name is encoded by a certain charset in the server
4256 side (in an @acronym{NNTP} server its administrator determines the
4257 charset, but for groups in the other back ends it is determined by you).
4258 Gnus has to display the decoded ones for you in the group buffer and the
4259 article buffer, and needs to use the encoded ones when communicating
4260 with servers.  However, Gnus doesn't know what charset is used for each
4261 non-@acronym{ASCII} group name.  The following two variables are just
4262 the ones for telling Gnus what charset should be used for each group:
4263
4264 @table @code
4265 @item gnus-group-name-charset-method-alist
4266 @vindex gnus-group-name-charset-method-alist
4267 An alist of select methods and charsets.  The default value is
4268 @code{nil}.  The names of groups in the server specified by that select
4269 method are all supposed to use the corresponding charset.  For example:
4270
4271 @lisp
4272 (setq gnus-group-name-charset-method-alist
4273       '(((nntp "news.com.cn") . cn-gb-2312)))
4274 @end lisp
4275
4276 Charsets specified for groups with this variable are preferred to the
4277 ones specified for the same groups with the
4278 @code{gnus-group-name-charset-group-alist} variable (see below).
4279
4280 A select method can be very long, like:
4281
4282 @lisp
4283 (nntp "gmane"
4284       (nntp-address "news.gmane.org")
4285       (nntp-end-of-line "\n")
4286       (nntp-open-connection-function
4287        nntp-open-via-rlogin-and-telnet)
4288       (nntp-via-rlogin-command "ssh")
4289       (nntp-via-rlogin-command-switches
4290        ("-C" "-t" "-e" "none"))
4291       (nntp-via-address @dots{}))
4292 @end lisp
4293
4294 In that case, you can truncate it into @code{(nntp "gmane")} in this
4295 variable.  That is, it is enough to contain only the back end name and
4296 the server name.
4297
4298 @item gnus-group-name-charset-group-alist
4299 @cindex UTF-8 group names
4300 @vindex gnus-group-name-charset-group-alist
4301 An alist of regexp of group name and the charset for group names.
4302 @code{((".*" . utf-8))} is the default value if UTF-8 is supported,
4303 otherwise the default is @code{nil}.  For example:
4304
4305 @lisp
4306 (setq gnus-group-name-charset-group-alist
4307       '(("\\.com\\.cn:" . cn-gb-2312)
4308         (".*" . utf-8)))
4309 @end lisp
4310
4311 Note that this variable is ignored if the match is made with
4312 @code{gnus-group-name-charset-method-alist}.
4313 @end table
4314
4315 Those two variables are used also to determine the charset for encoding
4316 and decoding non-@acronym{ASCII} group names that are in the back ends
4317 other than @code{nntp}.  It means that it is you who determine it.  If
4318 you do nothing, the charset used for group names in those back ends will
4319 all be @code{utf-8} because of the last element of
4320 @code{gnus-group-name-charset-group-alist}.
4321
4322 There is one more important variable for non-@acronym{ASCII} group
4323 names:
4324
4325 @table @code
4326 @item nnmail-pathname-coding-system
4327 @vindex nnmail-pathname-coding-system
4328 The value of this variable should be a coding system or @code{nil}.  The
4329 default is @code{nil} in Emacs, or is the aliasee of the coding system
4330 named @code{file-name} (a certain coding system of which an alias is
4331 @code{file-name}) in XEmacs.
4332
4333 The @code{nnml} back end, the @code{nnrss} back end, the @acronym{NNTP}
4334 marks feature (@pxref{NNTP marks}), the agent, and the cache use
4335 non-@acronym{ASCII} group names in those files and directories.  This
4336 variable overrides the value of @code{file-name-coding-system} which
4337 specifies the coding system used when encoding and decoding those file
4338 names and directory names.
4339
4340 In XEmacs (with the @code{mule} feature), @code{file-name-coding-system}
4341 is the only means to specify the coding system used to encode and decode
4342 file names.  On the other hand, Emacs uses the value of
4343 @code{default-file-name-coding-system} if @code{file-name-coding-system}
4344 is @code{nil} or it is bound to the value of
4345 @code{nnmail-pathname-coding-system} which is @code{nil}.
4346
4347 Normally the value of @code{default-file-name-coding-system} in Emacs or
4348 @code{nnmail-pathname-coding-system} in XEmacs is initialized according
4349 to the locale, so you will need to do nothing if the value is suitable
4350 to encode and decode non-@acronym{ASCII} group names.
4351
4352 The value of this variable (or @code{default-file-name-coding-system})
4353 does not necessarily need to be the same value that is determined by
4354 @code{gnus-group-name-charset-method-alist} and
4355 @code{gnus-group-name-charset-group-alist}.
4356
4357 If @code{default-file-name-coding-system} or this variable is
4358 initialized by default to @code{iso-latin-1} for example, although you
4359 want to subscribe to the groups spelled in Chinese, that is the most
4360 typical case where you have to customize
4361 @code{nnmail-pathname-coding-system}.  The @code{utf-8} coding system is
4362 a good candidate for it.  Otherwise, you may change the locale in your
4363 system so that @code{default-file-name-coding-system} or this variable
4364 may be initialized to an appropriate value.
4365 @end table
4366
4367 Note that when you copy or move articles from a non-@acronym{ASCII}
4368 group to another group, the charset used to encode and decode group
4369 names should be the same in both groups.  Otherwise the Newsgroups
4370 header will be displayed incorrectly in the article buffer.
4371
4372
4373 @node Searching
4374 @section Searching
4375
4376 @menu
4377 * nnir::                     Searching on IMAP, with swish, namazu, etc.
4378 * nnmairix::                 Searching maildir, MH or mbox with Mairix.
4379 @end menu
4380
4381 @cindex Searching
4382
4383 FIXME: This node is a stub.
4384
4385 FIXME: Add a brief overview of Gnus search capabilities.  A brief
4386 comparison of nnir, nnmairix, contrib/gnus-namazu would be nice
4387 as well.
4388
4389 FIXME: Explain difference to @ref{Searching for Articles}, add reference
4390 and back-reference.
4391
4392 @node nnir
4393 @subsection nnir
4394
4395 FIXME: As a first step, convert the commentary of @file{nnir} to texi.
4396 @cindex nnir
4397
4398 @node nnmairix
4399 @subsection nnmairix
4400
4401 @cindex mairix
4402 @cindex nnmairix
4403 This paragraph describes how to set up mairix and the back end
4404 @code{nnmairix} for indexing and searching your mail from within
4405 Gnus.  Additionally, you can create permanent ``smart'' groups which are
4406 bound to mairix searches and are automatically updated.
4407
4408 @menu
4409 * About mairix::                About the mairix mail search engine
4410 * nnmairix requirements::       What you will need for using nnmairix
4411 * What nnmairix does::          What does nnmairix actually do?
4412 * Setting up mairix::           Set up your mairix installation
4413 * Configuring nnmairix::        Set up the nnmairix back end
4414 * nnmairix keyboard shortcuts:: List of available keyboard shortcuts
4415 * Propagating marks::           How to propagate marks from nnmairix groups
4416 * nnmairix tips and tricks::    Some tips, tricks and examples
4417 * nnmairix caveats::            Some more stuff you might want to know
4418 @end menu
4419
4420 @c FIXME: The markup in this section might need improvement.
4421 @c E.g. adding @samp, @var, @file, @command, etc.
4422 @c Cf. (info "(texinfo)Indicating")
4423
4424 @node About mairix
4425 @subsubsection About mairix
4426
4427 Mairix is a tool for indexing and searching words in locally stored
4428 mail.  It was written by Richard Curnow and is licensed under the
4429 GPL.  Mairix comes with most popular GNU/Linux distributions, but it also
4430 runs under Windows (with cygwin), Mac OS X and Solaris.  The homepage can
4431 be found at
4432 @uref{http://www.rpcurnow.force9.co.uk/mairix/index.html}
4433
4434 Though mairix might not be as flexible as other search tools like
4435 swish++ or namazu, which you can use via the @code{nnir} back end, it
4436 has the prime advantage of being incredibly fast.  On current systems, it
4437 can easily search through headers and message bodies of thousands and
4438 thousands of mails in well under a second.  Building the database
4439 necessary for searching might take a minute or two, but only has to be
4440 done once fully.  Afterwards, the updates are done incrementally and
4441 therefore are really fast, too.  Additionally, mairix is very easy to set
4442 up.
4443
4444 For maximum speed though, mairix should be used with mails stored in
4445 @code{Maildir} or @code{MH} format (this includes the @code{nnml} back
4446 end), although it also works with mbox.  Mairix presents the search
4447 results by populating a @emph{virtual} maildir/MH folder with symlinks
4448 which point to the ``real'' message files (if mbox is used, copies are
4449 made).  Since mairix already presents search results in such a virtual
4450 mail folder, it is very well suited for using it as an external program
4451 for creating @emph{smart} mail folders, which represent certain mail
4452 searches.  This is similar to a Kiboze group (@pxref{Kibozed Groups}),
4453 but much faster.
4454
4455 @node nnmairix requirements
4456 @subsubsection nnmairix requirements
4457
4458 Mairix searches local mail---that means, mairix absolutely must have
4459 direct access to your mail folders.  If your mail resides on another
4460 server (e.g. an @acronym{IMAP} server) and you happen to have shell
4461 access, @code{nnmairix} supports running mairix remotely, e.g. via ssh.
4462
4463 Additionally, @code{nnmairix} only supports the following Gnus back
4464 ends: @code{nnml}, @code{nnmaildir}, and @code{nnimap}.  You must use
4465 one of these back ends for using @code{nnmairix}.  Other back ends, like
4466 @code{nnmbox}, @code{nnfolder} or @code{nnmh}, won't work.
4467
4468 If you absolutely must use mbox and still want to use @code{nnmairix},
4469 you can set up a local @acronym{IMAP} server, which you then access via
4470 @code{nnimap}.  This is a rather massive setup for accessing some mbox
4471 files, so just change to MH or Maildir already...  However, if you're
4472 really, really passionate about using mbox, you might want to look into
4473 the package @file{mairix.el}, which comes with Emacs 23.
4474
4475 @node What nnmairix does
4476 @subsubsection What nnmairix does
4477
4478 The back end @code{nnmairix} enables you to call mairix from within Gnus,
4479 either to query mairix with a search term or to update the
4480 database.  While visiting a message in the summary buffer, you can use
4481 several pre-defined shortcuts for calling mairix, e.g. to quickly
4482 search for all mails from the sender of the current message or to
4483 display the whole thread associated with the message, even if the
4484 mails are in different folders.
4485
4486 Additionally, you can create permanent @code{nnmairix} groups which are bound
4487 to certain mairix searches.  This way, you can easily create a group
4488 containing mails from a certain sender, with a certain subject line or
4489 even for one specific thread based on the Message-ID.  If you check for
4490 new mail in these folders (e.g. by pressing @kbd{g} or @kbd{M-g}), they
4491 automatically update themselves by calling mairix.
4492
4493 You might ask why you need @code{nnmairix} at all, since mairix already
4494 creates the group, populates it with links to the mails so that you can
4495 then access it with Gnus, right?  Well, this @emph{might} work, but often
4496 does not---at least not without problems.  Most probably you will get
4497 strange article counts, and sometimes you might see mails which Gnus
4498 claims have already been canceled and are inaccessible.  This is due to
4499 the fact that Gnus isn't really amused when things are happening behind
4500 its back.  Another problem can be the mail back end itself, e.g. if you
4501 use mairix with an @acronym{IMAP} server (I had Dovecot complaining
4502 about corrupt index files when mairix changed the contents of the search
4503 group).  Using @code{nnmairix} should circumvent these problems.
4504
4505 @code{nnmairix} is not really a mail back end---it's actually more like
4506 a wrapper, sitting between a ``real'' mail back end where mairix stores
4507 the searches and the Gnus front end.  You can choose between three
4508 different mail back ends for the mairix folders: @code{nnml},
4509 @code{nnmaildir} or @code{nnimap}.  @code{nnmairix} will call the mairix
4510 binary so that the search results are stored in folders named
4511 @code{zz_mairix-<NAME>-<NUMBER>} on this mail back end, but it will
4512 present these folders in the Gnus front end only with @code{<NAME>}.
4513 You can use an existing mail back end where you already store your mail,
4514 but if you're uncomfortable with @code{nnmairix} creating new mail
4515 groups alongside your other mail, you can also create e.g. a new
4516 @code{nnmaildir} or @code{nnml} server exclusively for mairix, but then
4517 make sure those servers do not accidentally receive your new mail
4518 (@pxref{nnmairix caveats}).  A special case exists if you want to use
4519 mairix remotely on an IMAP server with @code{nnimap}---here the mairix
4520 folders and your other mail must be on the same @code{nnimap} back end.
4521
4522 @node Setting up mairix
4523 @subsubsection Setting up mairix
4524
4525 First: create a backup of your mail folders (@pxref{nnmairix caveats}).
4526
4527 Setting up mairix is easy: simply create a @file{.mairixrc} file with
4528 (at least) the following entries:
4529
4530 @example
4531 # Your Maildir/MH base folder
4532 base=~/Maildir
4533 @end example
4534
4535 This is the base folder for your mails.  All the following directories
4536 are relative to this base folder.  If you want to use @code{nnmairix}
4537 with @code{nnimap}, this base directory has to point to the mail
4538 directory where the @acronym{IMAP} server stores the mail folders!
4539
4540 @example
4541 maildir= ... your maildir folders which should be indexed ...
4542 mh= ... your nnml/mh folders which should be indexed ...
4543 mbox = ... your mbox files which should be indexed ...
4544 @end example
4545
4546 This specifies all your mail folders and mbox files (relative to the
4547 base directory!) you want to index with mairix.  Note that the
4548 @code{nnml} back end saves mails in MH format, so you have to put those
4549 directories in the @code{mh} line.  See the example at the end of this
4550 section and mairixrc's man-page for further details.
4551
4552 @example
4553 omit=zz_mairix-*
4554 @end example
4555
4556 @vindex nnmairix-group-prefix
4557 This should make sure that you don't accidentally index the mairix
4558 search results.  You can change the prefix of these folders with the
4559 variable @code{nnmairix-group-prefix}.
4560
4561 @example
4562 mformat= ... 'maildir' or 'mh' ...
4563 database= ... location of database file ...
4564 @end example
4565
4566 The @code{format} setting specifies the output format for the mairix
4567 search folder.  Set this to @code{mh} if you want to access search results
4568 with @code{nnml}.  Otherwise choose @code{maildir}.
4569
4570 To summarize, here is my shortened @file{.mairixrc} file as an example:
4571
4572 @example
4573 base=~/Maildir
4574 maildir=.personal:.work:.logcheck:.sent
4575 mh=../Mail/nnml/*...
4576 mbox=../mboxmail/mailarchive_year*
4577 mformat=maildir
4578 omit=zz_mairix-*
4579 database=~/.mairixdatabase
4580 @end example
4581
4582 In this case, the base directory is @file{~/Maildir}, where all my Maildir
4583 folders are stored.  As you can see, the folders are separated by
4584 colons.  If you wonder why every folder begins with a dot: this is
4585 because I use Dovecot as @acronym{IMAP} server, which again uses
4586 @code{Maildir++} folders.  For testing nnmairix, I also have some
4587 @code{nnml} mail, which is saved in @file{~/Mail/nnml}.  Since this has
4588 to be specified relative to the @code{base} directory, the @code{../Mail}
4589 notation is needed.  Note that the line ends in @code{*...}, which means
4590 to recursively scan all files under this directory.  Without the three
4591 dots, the wildcard @code{*} will not work recursively.  I also have some
4592 old mbox files with archived mail lying around in @file{~/mboxmail}.
4593 The other lines should be obvious.
4594
4595 See the man page for @code{mairixrc} for details and further options,
4596 especially regarding wildcard usage, which may be a little different
4597 than you are used to.
4598
4599 Now simply call @code{mairix} to create the index for the first time.
4600 Note that this may take a few minutes, but every following index will do
4601 the updates incrementally and hence is very fast.
4602
4603 @node Configuring nnmairix
4604 @subsubsection Configuring nnmairix
4605
4606 In group mode, type @kbd{G b c}
4607 (@code{nnmairix-create-server-and-default-group}).  This will ask you for all
4608 necessary information and create a @code{nnmairix} server as a foreign
4609 server.  You will have to specify the following:
4610
4611 @itemize @bullet
4612
4613 @item
4614 The @strong{name} of the @code{nnmairix} server---choose whatever you
4615 want.
4616
4617 @item
4618 The name of the @strong{back end server} where mairix should store its
4619 searches.  This must be a full server name, like @code{nnml:mymail}.
4620 Just hit @kbd{TAB} to see the available servers.  Currently, servers
4621 which are accessed through @code{nnmaildir}, @code{nnimap} and
4622 @code{nnml} are supported.  As explained above, for locally stored
4623 mails, this can be an existing server where you store your mails.
4624 However, you can also create e.g. a new @code{nnmaildir} or @code{nnml}
4625 server exclusively for @code{nnmairix} in your secondary select methods
4626 (@pxref{Finding the News}).  If you use a secondary @code{nnml} server
4627 just for mairix, make sure that you explicitly set the server variable
4628 @code{nnml-get-new-mail} to @code{nil}, or you might loose mail
4629 (@pxref{nnmairix caveats}).  If you want to use mairix remotely on an
4630 @acronym{IMAP} server, you have to choose the corresponding
4631 @code{nnimap} server here.
4632
4633 @item
4634 @vindex nnmairix-mairix-search-options
4635 The @strong{command} to call the mairix binary.  This will usually just
4636 be @code{mairix}, but you can also choose something like @code{ssh
4637 SERVER mairix} if you want to call mairix remotely, e.g. on your
4638 @acronym{IMAP} server.  If you want to add some default options to
4639 mairix, you could do this here, but better use the variable
4640 @code{nnmairix-mairix-search-options} instead.
4641
4642 @item
4643 The name of the @strong{default search group}.  This will be the group
4644 where all temporary mairix searches are stored, i.e. all searches which
4645 are not bound to permanent @code{nnmairix} groups.  Choose whatever you
4646 like.
4647
4648 @item
4649 If the mail back end is @code{nnimap} or @code{nnmaildir}, you will be
4650 asked if you work with @strong{Maildir++}, i.e. with hidden maildir
4651 folders (=beginning with a dot).  For example, you have to answer
4652 @samp{yes} here if you work with the Dovecot @acronym{IMAP}
4653 server.  Otherwise, you should answer @samp{no} here.
4654
4655 @end itemize
4656
4657 @node nnmairix keyboard shortcuts
4658 @subsubsection nnmairix keyboard shortcuts
4659
4660 In group mode:
4661
4662 @table @kbd
4663
4664 @item G b c
4665 @kindex G b c (Group)
4666 @findex nnmairix-create-server-and-default-group
4667 Creates @code{nnmairix} server and default search group for this server
4668 (@code{nnmairix-create-server-and-default-group}).  You should have done
4669 this by now (@pxref{Configuring nnmairix}).
4670
4671 @item G b s
4672 @kindex G b s (Group)
4673 @findex nnmairix-search
4674 Prompts for query which is then sent to the mairix binary.  Search
4675 results are put into the default search group which is automatically
4676 displayed (@code{nnmairix-search}).
4677
4678 @item G b m
4679 @kindex G b m (Group)
4680 @findex nnmairix-widget-search
4681 Allows you to create a mairix search or a permanent group more
4682 comfortably using graphical widgets, similar to a customization
4683 group.  Just try it to see how it works (@code{nnmairix-widget-search}).
4684
4685 @item G b i
4686 @kindex G b i (Group)
4687 @findex nnmairix-search-interactive
4688 Another command for creating a mairix query more comfortably, but uses
4689 only the minibuffer (@code{nnmairix-search-interactive}).
4690
4691 @item G b g
4692 @kindex G b g (Group)
4693 @findex nnmairix-create-search-group
4694 Creates a permanent group which is associated with a search query
4695 (@code{nnmairix-create-search-group}).  The @code{nnmairix} back end
4696 automatically calls mairix when you update this group with @kbd{g} or
4697 @kbd{M-g}.
4698
4699 @item G b q
4700 @kindex G b q (Group)
4701 @findex nnmairix-group-change-query-this-group
4702 Changes the search query for the @code{nnmairix} group under cursor
4703 (@code{nnmairix-group-change-query-this-group}).
4704
4705 @item G b t
4706 @kindex G b t (Group)
4707 @findex nnmairix-group-toggle-threads-this-group
4708 Toggles the 'threads' parameter for the @code{nnmairix} group under cursor,
4709 i.e.  if you want see the whole threads of the found messages
4710 (@code{nnmairix-group-toggle-threads-this-group}).
4711
4712 @item G b u
4713 @kindex G b u (Group)
4714 @findex nnmairix-update-database
4715 @vindex nnmairix-mairix-update-options
4716 Calls mairix binary for updating the database
4717 (@code{nnmairix-update-database}).  The default parameters are @code{-F}
4718 and @code{-Q} for making this as fast as possible (see variable
4719 @code{nnmairix-mairix-update-options} for defining these default
4720 options).
4721
4722 @item G b r
4723 @kindex G b r (Group)
4724 @findex nnmairix-group-toggle-readmarks-this-group
4725 Keep articles in this @code{nnmairix} group always read or unread, or leave the
4726 marks unchanged (@code{nnmairix-group-toggle-readmarks-this-group}).
4727
4728 @item G b d
4729 @kindex G b d (Group)
4730 @findex nnmairix-group-delete-recreate-this-group
4731 Recreate @code{nnmairix} group on the ``real'' mail back end
4732 (@code{nnmairix-group-delete-recreate-this-group}).  You can do this if
4733 you always get wrong article counts with a @code{nnmairix} group.
4734
4735 @item G b a
4736 @kindex G b a (Group)
4737 @findex nnmairix-group-toggle-allowfast-this-group
4738 Toggles the @code{allow-fast} parameters for group under cursor
4739 (@code{nnmairix-group-toggle-allowfast-this-group}).  The default
4740 behavior of @code{nnmairix} is to do a mairix search every time you
4741 update or enter the group.  With the @code{allow-fast} parameter set,
4742 mairix will only be called when you explicitly update the group, but not
4743 upon entering.  This makes entering the group faster, but it may also
4744 lead to dangling symlinks if something changed between updating and
4745 entering the group which is not yet in the mairix database.
4746
4747 @item G b p
4748 @kindex G b p (Group)
4749 @findex nnmairix-group-toggle-propmarks-this-group
4750 Toggle marks propagation for this group
4751 (@code{nnmairix-group-toggle-propmarks-this-group}).  (@pxref{Propagating
4752 marks}).
4753
4754 @item G b o
4755 @kindex G b o (Group)
4756 @findex nnmairix-propagate-marks
4757 Manually propagate marks (@code{nnmairix-propagate-marks}); needed only when
4758 @code{nnmairix-propagate-marks-upon-close} is set to @code{nil}.
4759
4760 @end table
4761
4762 In summary mode:
4763
4764 @table @kbd
4765
4766 @item $ m
4767 @kindex $ m (Summary)
4768 @findex nnmairix-widget-search-from-this-article
4769 Allows you to create a mairix query or group based on the current
4770 message using graphical widgets (same as @code{nnmairix-widget-search})
4771 (@code{nnmairix-widget-search-from-this-article}).
4772
4773 @item $ g
4774 @kindex $ g (Summary)
4775 @findex nnmairix-create-search-group-from-message
4776 Interactively creates a new search group with query based on the current
4777 message, but uses the minibuffer instead of graphical widgets
4778 (@code{nnmairix-create-search-group-from-message}).
4779
4780 @item $ t
4781 @kindex $ t (Summary)
4782 @findex nnmairix-search-thread-this-article
4783 Searches thread for the current article
4784 (@code{nnmairix-search-thread-this-article}).  This is effectively a
4785 shortcut for calling @code{nnmairix-search} with @samp{m:msgid} of the
4786 current article and enabled threads.
4787
4788 @item $ f
4789 @kindex $ f (Summary)
4790 @findex nnmairix-search-from-this-article
4791 Searches all messages from sender of the current article
4792 (@code{nnmairix-search-from-this-article}).  This is a shortcut for
4793 calling @code{nnmairix-search} with @samp{f:From}.
4794
4795 @item $ o
4796 @kindex $ o (Summary)
4797 @findex nnmairix-goto-original-article
4798 (Only in @code{nnmairix} groups!) Tries determine the group this article
4799 originally came from and displays the article in this group, so that
4800 e.g. replying to this article the correct posting styles/group
4801 parameters are applied (@code{nnmairix-goto-original-article}).  This
4802 function will use the registry if available, but can also parse the
4803 article file name as a fallback method.
4804
4805 @item $ u
4806 @kindex $ u (Summary)
4807 @findex nnmairix-remove-tick-mark-original-article
4808 Remove possibly existing tick mark from original article
4809 (@code{nnmairix-remove-tick-mark-original-article}).  (@pxref{nnmairix
4810 tips and tricks}).
4811
4812 @end table
4813
4814 @node Propagating marks
4815 @subsubsection Propagating marks
4816
4817 First of: you really need a patched mairix binary for using the marks
4818 propagation feature efficiently. Otherwise, you would have to update
4819 the mairix database all the time. You can get the patch at
4820
4821 @uref{http://www.randomsample.de/mairix-maildir-patch.tar}
4822
4823 You need the mairix v0.21 source code for this patch; everything else
4824 is explained in the accompanied readme file. If you don't want to use
4825 marks propagation, you don't have to apply these patches, but they also
4826 fix some annoyances regarding changing maildir flags, so it might still
4827 be useful to you.
4828
4829 With the patched mairix binary, you can use @code{nnmairix} as an
4830 alternative to mail splitting (@pxref{Fancy Mail Splitting}). For
4831 example, instead of splitting all mails from @samp{david@@foobar.com}
4832 into a group, you can simply create a search group with the query
4833 @samp{f:david@@foobar.com}. This is actually what ``smart folders'' are
4834 all about: simply put everything in one mail folder and dynamically
4835 create searches instead of splitting. This is more flexible, since you
4836 can dynamically change your folders any time you want to. This also
4837 implies that you will usually read your mails in the @code{nnmairix}
4838 groups instead of your ``real'' mail groups.
4839
4840 There is one problem, though: say you got a new mail from
4841 @samp{david@@foobar.com}; it will now show up in two groups, the
4842 ``real'' group (your INBOX, for example) and in the @code{nnmairix}
4843 search group (provided you have updated the mairix database). Now you
4844 enter the @code{nnmairix} group and read the mail. The mail will be
4845 marked as read, but only in the @code{nnmairix} group---in the ``real''
4846 mail group it will be still shown as unread.
4847
4848 You could now catch up the mail group (@pxref{Group Data}), but this is
4849 tedious and error prone, since you may overlook mails you don't have
4850 created @code{nnmairix} groups for. Of course, you could first use
4851 @code{nnmairix-goto-original-article} (@pxref{nnmairix keyboard
4852 shortcuts}) and then read the mail in the original group, but that's
4853 even more cumbersome.
4854
4855 Clearly, the easiest way would be if marks could somehow be
4856 automatically set for the original article. This is exactly what
4857 @emph{marks propagation} is about.
4858
4859 Marks propagation is deactivated by default. You can activate it for a
4860 certain @code{nnmairix} group with
4861 @code{nnmairix-group-toggle-propmarks-this-group} (bound to @kbd{G b
4862 p}). This function will warn you if you try to use it with your default
4863 search group; the reason is that the default search group is used for
4864 temporary searches, and it's easy to accidentally propagate marks from
4865 this group. However, you can ignore this warning if you really want to.
4866
4867 With marks propagation enabled, all the marks you set in a @code{nnmairix}
4868 group should now be propagated to the original article. For example,
4869 you can now tick an article (by default with @kbd{!}) and this mark should
4870 magically be set for the original article, too.
4871
4872 A few more remarks which you may or may not want to know:
4873
4874 @vindex nnmairix-propagate-marks-upon-close
4875 Marks will not be set immediately, but only upon closing a group. This
4876 not only makes marks propagation faster, it also avoids problems with
4877 dangling symlinks when dealing with maildir files (since changing flags
4878 will change the file name). You can also control when to propagate marks
4879 via @code{nnmairix-propagate-marks-upon-close} (see the doc-string for
4880 details).
4881
4882 Obviously, @code{nnmairix} will have to look up the original group for every
4883 article you want to set marks for. If available, @code{nnmairix} will first use
4884 the registry for determining the original group. The registry is very
4885 fast, hence you should really, really enable the registry when using
4886 marks propagation. If you don't have to worry about RAM and disc space,
4887 set @code{gnus-registry-max-entries} to a large enough value; to be on
4888 the safe side, choose roughly the amount of mails you index with mairix.
4889
4890 @vindex nnmairix-only-use-registry
4891 If you don't want to use the registry or the registry hasn't seen the
4892 original article yet, @code{nnmairix} will use an additional mairix
4893 search for determining the file name of the article. This, of course, is
4894 way slower than the registry---if you set hundreds or even thousands of
4895 marks this way, it might take some time. You can avoid this situation by
4896 setting @code{nnmairix-only-use-registry} to t.
4897
4898 Maybe you also want to propagate marks the other way round, i.e. if you
4899 tick an article in a "real" mail group, you'd like to have the same
4900 article in a @code{nnmairix} group ticked, too. For several good
4901 reasons, this can only be done efficiently if you use maildir. To
4902 immediately contradict myself, let me mention that it WON'T work with
4903 @code{nnmaildir}, since @code{nnmaildir} stores the marks externally and
4904 not in the file name. Therefore, propagating marks to @code{nnmairix}
4905 groups will usually only work if you use an IMAP server which uses
4906 maildir as its file format.
4907
4908 @vindex nnmairix-propagate-marks-to-nnmairix-groups
4909 If you work with this setup, just set
4910 @code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t} and see what
4911 happens. If you don't like what you see, just set it to @code{nil} again. One
4912 problem might be that you get a wrong number of unread articles; this
4913 usually happens when you delete or expire articles in the original
4914 groups. When this happens, you can recreate the @code{nnmairix} group on the
4915 back end using @kbd{G b d}.
4916
4917 @node nnmairix tips and tricks
4918 @subsubsection nnmairix tips and tricks
4919
4920 @itemize
4921 @item
4922 Checking Mail
4923
4924 @findex nnmairix-update-groups
4925 I put all my important mail groups at group level 1. The mairix groups
4926 have group level 5, so they do not get checked at start up (@pxref{Group
4927 Levels}).
4928
4929 I use the following to check for mails:
4930
4931 @lisp
4932 (defun my-check-mail-mairix-update (level)
4933   (interactive "P")
4934   ;; if no prefix given, set level=1
4935   (gnus-group-get-new-news (or level 1))
4936   (nnmairix-update-groups "mairixsearch" t t)
4937   (gnus-group-list-groups))
4938
4939 (define-key gnus-group-mode-map "g" 'my-check-mail-mairix-update)
4940 @end lisp
4941
4942 Instead of @samp{"mairixsearch"} use the name of your @code{nnmairix}
4943 server. See the doc string for @code{nnmairix-update-groups} for
4944 details.
4945
4946 @item
4947 Example: search group for ticked articles
4948
4949 For example, you can create a group for all ticked articles, where the
4950 articles always stay unread:
4951
4952 Hit @kbd{G b g}, enter group name (e.g. @samp{important}), use
4953 @samp{F:f} as query and do not include threads.
4954
4955 Now activate marks propagation for this group by using @kbd{G b p}. Then
4956 activate the always-unread feature by using @kbd{G b r} twice.
4957
4958 So far so good---but how do you remove the tick marks in the @code{nnmairix}
4959 group?  There are two options: You may simply use
4960 @code{nnmairix-remove-tick-mark-original-article} (bound to @kbd{$ u}) to remove
4961 tick marks from the original article. The other possibility is to set
4962 @code{nnmairix-propagate-marks-to-nnmairix-groups} to @code{t}, but see the above
4963 comments about this option.  If it works for you, the tick marks should
4964 also exist in the @code{nnmairix} group and you can remove them as usual,
4965 e.g. by marking an article as read.
4966
4967 When you have removed a tick mark from the original article, this
4968 article should vanish from the @code{nnmairix} group after you have updated the
4969 mairix database and updated the group.  Fortunately, there is a function
4970 for doing exactly that: @code{nnmairix-update-groups}. See the previous code
4971 snippet and the doc string for details.
4972
4973 @item
4974 Dealing with auto-subscription of mail groups
4975
4976 As described before, all @code{nnmairix} groups are in fact stored on
4977 the mail back end in the form @samp{zz_mairix-<NAME>-<NUMBER>}. You can
4978 see them when you enter the back end server in the server buffer. You
4979 should not subscribe these groups! Unfortunately, these groups will
4980 usually get @emph{auto-subscribed} when you use @code{nnmaildir} or
4981 @code{nnml}, i.e. you will suddenly see groups of the form
4982 @samp{zz_mairix*} pop up in your group buffer. If this happens to you,
4983 simply kill these groups with C-k.  For avoiding this, turn off
4984 auto-subscription completely by setting the variable
4985 @code{gnus-auto-subscribed-groups} to @code{nil} (@pxref{Filtering New
4986 Groups}), or if you like to keep this feature use the following kludge
4987 for turning it off for all groups beginning with @samp{zz_}:
4988
4989 @lisp
4990 (setq gnus-auto-subscribed-groups
4991       "^\\(nnml\\|nnfolder\\|nnmbox\\|nnmh\\|nnbabyl\\|nnmaildir\\).*:\\([^z]\\|z$\\|\\z[^z]\\|zz$\\|zz[^_]\\|zz_$\\).*")
4992 @end lisp
4993
4994 @end itemize
4995
4996 @node nnmairix caveats
4997 @subsubsection nnmairix caveats
4998
4999 @itemize
5000 @item
5001 You can create a secondary @code{nnml} server just for nnmairix, but then
5002 you have to explicitly set the corresponding server variable
5003 @code{nnml-get-new-mail} to @code{nil}.  Otherwise, new mail might get
5004 put into this secondary server (and would never show up again).  Here's
5005 an example server definition:
5006
5007 @lisp
5008 (nnml "mairix" (nnml-directory "mairix") (nnml-get-new-mail nil))
5009 @end lisp
5010
5011 (The @code{nnmaildir} back end also has a server variabe
5012 @code{get-new-mail}, but its default value is @code{nil}, so you don't
5013 have to explicitly set it if you use a @code{nnmaildir} server just for
5014 mairix.)
5015
5016 @item
5017 If you use the Gnus registry: don't use the registry with
5018 @code{nnmairix} groups (put them in
5019 @code{gnus-registry-unfollowed-groups}).  Be @emph{extra careful} if
5020 you use @code{gnus-registry-split-fancy-with-parent}; mails which are
5021 split into @code{nnmairix} groups are usually gone for good as soon as
5022 you check the group for new mail (yes, it has happened to me...).
5023
5024 @item
5025 Therefore: @emph{Never ever} put ``real'' mails into @code{nnmairix}
5026 groups (you shouldn't be able to, anyway).
5027
5028 @item
5029 If you use the Gnus agent (@pxref{Gnus Unplugged}): don't agentize
5030 @code{nnmairix} groups (though I have no idea what happens if you do).
5031
5032 @item
5033 mairix does only support us-ascii characters.
5034
5035 @item
5036 @code{nnmairix} uses a rather brute force method to force Gnus to
5037 completely reread the group on the mail back end after mairix was
5038 called---it simply deletes and re-creates the group on the mail
5039 back end. So far, this has worked for me without any problems, and I
5040 don't see how @code{nnmairix} could delete other mail groups than its
5041 own, but anyway: you really should have a backup of your mail
5042 folders.
5043
5044 @item
5045 All necessary information is stored in the group parameters
5046 (@pxref{Group Parameters}). This has the advantage that no active file
5047 is needed, but also implies that when you kill a @code{nnmairix} group,
5048 it is gone for good.
5049
5050 @item
5051 @findex nnmairix-purge-old-groups
5052 If you create and kill a lot of @code{nnmairix} groups, the
5053 ``zz_mairix-*'' groups will accumulate on the mail back end server. To
5054 delete old groups which are no longer needed, call
5055 @code{nnmairix-purge-old-groups}. Note that this assumes that you don't
5056 save any ``real'' mail in folders of the form
5057 @code{zz_mairix-<NAME>-<NUMBER>}. You can change the prefix of
5058 @code{nnmairix} groups by changing the variable
5059 @code{nnmairix-group-prefix}.
5060
5061 @item
5062 The following only applies if you @emph{don't} use the mentioned patch
5063 for mairix (@pxref{Propagating marks}):
5064
5065 A problem can occur when using @code{nnmairix} with maildir folders and
5066 comes with the fact that maildir stores mail flags like @samp{Seen} or
5067 @samp{Replied} by appending chars @samp{S} and @samp{R} to the message
5068 file name, respectively. This implies that currently you would have to
5069 update the mairix database not only when new mail arrives, but also when
5070 mail flags are changing. The same applies to new mails which are indexed
5071 while they are still in the @samp{new} folder but then get moved to
5072 @samp{cur} when Gnus has seen the mail. If you don't update the database
5073 after this has happened, a mairix query can lead to symlinks pointing to
5074 non-existing files. In Gnus, these messages will usually appear with
5075 ``(none)'' entries in the header and can't be accessed. If this happens
5076 to you, using @kbd{G b u} and updating the group will usually fix this.
5077
5078 @end itemize
5079
5080 @node Misc Group Stuff
5081 @section Misc Group Stuff
5082
5083 @menu
5084 * Scanning New Messages::       Asking Gnus to see whether new messages have arrived.
5085 * Group Information::           Information and help on groups and Gnus.
5086 * Group Timestamp::             Making Gnus keep track of when you last read a group.
5087 * File Commands::               Reading and writing the Gnus files.
5088 * Sieve Commands::              Managing Sieve scripts.
5089 @end menu
5090
5091 @table @kbd
5092
5093 @item v
5094 @kindex v (Group)
5095 @cindex keys, reserved for users (Group)
5096 The key @kbd{v} is reserved for users.  You can bind it to some
5097 command or better use it as a prefix key.  For example:
5098
5099 @lisp
5100 (define-key gnus-group-mode-map (kbd "v j d")
5101   (lambda ()
5102     (interactive)
5103     (gnus-group-jump-to-group "nndraft:drafts")))
5104 @end lisp
5105
5106 On keys reserved for users in Emacs and on keybindings in general
5107 @xref{Keymaps, Keymaps, , emacs, The Emacs Editor}.
5108
5109 @item ^
5110 @kindex ^ (Group)
5111 @findex gnus-group-enter-server-mode
5112 Enter the server buffer (@code{gnus-group-enter-server-mode}).
5113 @xref{Server Buffer}.
5114
5115 @item a
5116 @kindex a (Group)
5117 @findex gnus-group-post-news
5118 Start composing a message (a news by default)
5119 (@code{gnus-group-post-news}).  If given a prefix, post to the group
5120 under the point.  If the prefix is 1, prompt for a group to post to.
5121 Contrary to what the name of this function suggests, the prepared
5122 article might be a mail instead of a news, if a mail group is specified
5123 with the prefix argument.  @xref{Composing Messages}.
5124
5125 @item m
5126 @kindex m (Group)
5127 @findex gnus-group-mail
5128 Mail a message somewhere (@code{gnus-group-mail}).  If given a prefix,
5129 use the posting style of the group under the point.  If the prefix is 1,
5130 prompt for a group name to find the posting style.
5131 @xref{Composing Messages}.
5132
5133 @item i
5134 @kindex i (Group)
5135 @findex gnus-group-news
5136 Start composing a news (@code{gnus-group-news}).  If given a prefix,
5137 post to the group under the point.  If the prefix is 1, prompt
5138 for group to post to.  @xref{Composing Messages}.
5139
5140 This function actually prepares a news even when using mail groups.
5141 This is useful for ``posting'' messages to mail groups without actually
5142 sending them over the network: they're just saved directly to the group
5143 in question.  The corresponding back end must have a request-post method
5144 for this to work though.
5145
5146 @item G z
5147 @kindex G z (Group)
5148 @findex gnus-group-compact-group
5149
5150 Compact the group under point (@code{gnus-group-compact-group}).
5151 Currently implemented only in nnml (@pxref{Mail Spool}).  This removes
5152 gaps between article numbers, hence getting a correct total article
5153 count.
5154
5155 @end table
5156
5157 Variables for the group buffer:
5158
5159 @table @code
5160
5161 @item gnus-group-mode-hook
5162 @vindex gnus-group-mode-hook
5163 is called after the group buffer has been
5164 created.
5165
5166 @item gnus-group-prepare-hook
5167 @vindex gnus-group-prepare-hook
5168 is called after the group buffer is
5169 generated.  It may be used to modify the buffer in some strange,
5170 unnatural way.
5171
5172 @item gnus-group-prepared-hook
5173 @vindex gnus-group-prepare-hook
5174 is called as the very last thing after the group buffer has been
5175 generated.  It may be used to move point around, for instance.
5176
5177 @item gnus-permanently-visible-groups
5178 @vindex gnus-permanently-visible-groups
5179 Groups matching this regexp will always be listed in the group buffer,
5180 whether they are empty or not.
5181
5182 @end table
5183
5184 @node Scanning New Messages
5185 @subsection Scanning New Messages
5186 @cindex new messages
5187 @cindex scanning new news
5188
5189 @table @kbd
5190
5191 @item g
5192 @kindex g (Group)
5193 @findex gnus-group-get-new-news
5194 @c @icon{gnus-group-get-new-news}
5195 Check the server(s) for new articles.  If the numerical prefix is used,
5196 this command will check only groups of level @var{arg} and lower
5197 (@code{gnus-group-get-new-news}).  If given a non-numerical prefix, this
5198 command will force a total re-reading of the active file(s) from the
5199 back end(s).
5200
5201 @item M-g
5202 @kindex M-g (Group)
5203 @findex gnus-group-get-new-news-this-group
5204 @vindex gnus-goto-next-group-when-activating
5205 @c @icon{gnus-group-get-new-news-this-group}
5206 Check whether new articles have arrived in the current group
5207 (@code{gnus-group-get-new-news-this-group}).
5208 @code{gnus-goto-next-group-when-activating} says whether this command is
5209 to move point to the next group or not.  It is @code{t} by default.
5210
5211 @findex gnus-activate-all-groups
5212 @cindex activating groups
5213 @item C-c M-g
5214 @kindex C-c M-g (Group)
5215 Activate absolutely all groups (@code{gnus-activate-all-groups}).
5216
5217 @item R
5218 @kindex R (Group)
5219 @cindex restarting
5220 @findex gnus-group-restart
5221 Restart Gnus (@code{gnus-group-restart}).  This saves the @file{.newsrc}
5222 file(s), closes the connection to all servers, clears up all run-time
5223 Gnus variables, and then starts Gnus all over again.
5224
5225 @end table
5226
5227 @vindex gnus-get-new-news-hook
5228 @code{gnus-get-new-news-hook} is run just before checking for new news.
5229
5230 @vindex gnus-after-getting-new-news-hook
5231 @code{gnus-after-getting-new-news-hook} is run after checking for new
5232 news.
5233
5234
5235 @node Group Information
5236 @subsection Group Information
5237 @cindex group information
5238 @cindex information on groups
5239
5240 @table @kbd
5241
5242
5243 @item H f
5244 @kindex H f (Group)
5245 @findex gnus-group-fetch-faq
5246 @vindex gnus-group-faq-directory
5247 @cindex FAQ
5248 @cindex ange-ftp
5249 Try to fetch the @acronym{FAQ} for the current group
5250 (@code{gnus-group-fetch-faq}).  Gnus will try to get the @acronym{FAQ}
5251 from @code{gnus-group-faq-directory}, which is usually a directory on
5252 a remote machine.  This variable can also be a list of directories.
5253 In that case, giving a prefix to this command will allow you to choose
5254 between the various sites.  @code{ange-ftp} (or @code{efs}) will be
5255 used for fetching the file.
5256
5257 If fetching from the first site is unsuccessful, Gnus will attempt to go
5258 through @code{gnus-group-faq-directory} and try to open them one by one.
5259
5260 @item H c
5261 @kindex H c (Group)
5262 @findex gnus-group-fetch-charter
5263 @vindex gnus-group-charter-alist
5264 @cindex charter
5265 Try to open the charter for the current group in a web browser
5266 (@code{gnus-group-fetch-charter}).  Query for a group if given a
5267 prefix argument.
5268
5269 Gnus will use @code{gnus-group-charter-alist} to find the location of
5270 the charter.  If no location is known, Gnus will fetch the control
5271 messages for the group, which in some cases includes the charter.
5272
5273 @item H C
5274 @kindex H C (Group)
5275 @findex gnus-group-fetch-control
5276 @vindex gnus-group-fetch-control-use-browse-url
5277 @cindex control message
5278 Fetch the control messages for the group from the archive at
5279 @code{ftp.isc.org} (@code{gnus-group-fetch-control}).  Query for a
5280 group if given a prefix argument.
5281
5282 If @code{gnus-group-fetch-control-use-browse-url} is non-@code{nil},
5283 Gnus will open the control messages in a browser using
5284 @code{browse-url}.  Otherwise they are fetched using @code{ange-ftp}
5285 and displayed in an ephemeral group.
5286
5287 Note that the control messages are compressed.  To use this command
5288 you need to turn on @code{auto-compression-mode} (@pxref{Compressed
5289 Files, ,Compressed Files, emacs, The Emacs Manual}).
5290
5291 @item H d
5292 @itemx C-c C-d
5293 @c @icon{gnus-group-describe-group}
5294 @kindex H d (Group)
5295 @kindex C-c C-d (Group)
5296 @cindex describing groups
5297 @cindex group description
5298 @findex gnus-group-describe-group
5299 Describe the current group (@code{gnus-group-describe-group}).  If given
5300 a prefix, force Gnus to re-read the description from the server.
5301
5302 @item M-d
5303 @kindex M-d (Group)
5304 @findex gnus-group-describe-all-groups
5305 Describe all groups (@code{gnus-group-describe-all-groups}).  If given a
5306 prefix, force Gnus to re-read the description file from the server.
5307
5308 @item H v
5309 @itemx V
5310 @kindex V (Group)
5311 @kindex H v (Group)
5312 @cindex version
5313 @findex gnus-version
5314 Display current Gnus version numbers (@code{gnus-version}).
5315
5316 @item ?
5317 @kindex ? (Group)
5318 @findex gnus-group-describe-briefly
5319 Give a very short help message (@code{gnus-group-describe-briefly}).
5320
5321 @item C-c C-i
5322 @kindex C-c C-i (Group)
5323 @cindex info
5324 @cindex manual
5325 @findex gnus-info-find-node
5326 Go to the Gnus info node (@code{gnus-info-find-node}).
5327 @end table
5328
5329
5330 @node Group Timestamp
5331 @subsection Group Timestamp
5332 @cindex timestamps
5333 @cindex group timestamps
5334
5335 It can be convenient to let Gnus keep track of when you last read a
5336 group.  To set the ball rolling, you should add
5337 @code{gnus-group-set-timestamp} to @code{gnus-select-group-hook}:
5338
5339 @lisp
5340 (add-hook 'gnus-select-group-hook 'gnus-group-set-timestamp)
5341 @end lisp
5342
5343 After doing this, each time you enter a group, it'll be recorded.
5344
5345 This information can be displayed in various ways---the easiest is to
5346 use the @samp{%d} spec in the group line format:
5347
5348 @lisp
5349 (setq gnus-group-line-format
5350       "%M\%S\%p\%P\%5y: %(%-40,40g%) %d\n")
5351 @end lisp
5352
5353 This will result in lines looking like:
5354
5355 @example
5356 *        0: mail.ding                                19961002T012943
5357          0: custom                                   19961002T012713
5358 @end example
5359
5360 As you can see, the date is displayed in compact ISO 8601 format.  This
5361 may be a bit too much, so to just display the date, you could say
5362 something like:
5363
5364 @lisp
5365 (setq gnus-group-line-format
5366       "%M\%S\%p\%P\%5y: %(%-40,40g%) %6,6~(cut 2)d\n")
5367 @end lisp
5368
5369 If you would like greater control of the time format, you can use a
5370 user-defined format spec.  Something like the following should do the
5371 trick:
5372
5373 @lisp
5374 (setq gnus-group-line-format
5375       "%M\%S\%p\%P\%5y: %(%-40,40g%) %ud\n")
5376 (defun gnus-user-format-function-d (headers)
5377   (let ((time (gnus-group-timestamp gnus-tmp-group)))
5378     (if time
5379         (format-time-string "%b %d  %H:%M" time)
5380       "")))
5381 @end lisp
5382
5383
5384 @node File Commands
5385 @subsection File Commands
5386 @cindex file commands
5387
5388 @table @kbd
5389
5390 @item r
5391 @kindex r (Group)
5392 @findex gnus-group-read-init-file
5393 @vindex gnus-init-file
5394 @cindex reading init file
5395 Re-read the init file (@code{gnus-init-file}, which defaults to
5396 @file{~/.gnus.el}) (@code{gnus-group-read-init-file}).
5397
5398 @item s
5399 @kindex s (Group)
5400 @findex gnus-group-save-newsrc
5401 @cindex saving .newsrc
5402 Save the @file{.newsrc.eld} file (and @file{.newsrc} if wanted)
5403 (@code{gnus-group-save-newsrc}).  If given a prefix, force saving the
5404 file(s) whether Gnus thinks it is necessary or not.
5405
5406 @c @item Z
5407 @c @kindex Z (Group)
5408 @c @findex gnus-group-clear-dribble
5409 @c Clear the dribble buffer (@code{gnus-group-clear-dribble}).
5410
5411 @end table
5412
5413
5414 @node Sieve Commands
5415 @subsection Sieve Commands
5416 @cindex group sieve commands
5417
5418 Sieve is a server-side mail filtering language.  In Gnus you can use
5419 the @code{sieve} group parameter (@pxref{Group Parameters}) to specify
5420 sieve rules that should apply to each group.  Gnus provides two
5421 commands to translate all these group parameters into a proper Sieve
5422 script that can be transfered to the server somehow.
5423
5424 @vindex gnus-sieve-file
5425 @vindex gnus-sieve-region-start
5426 @vindex gnus-sieve-region-end
5427 The generated Sieve script is placed in @code{gnus-sieve-file} (by
5428 default @file{~/.sieve}).  The Sieve code that Gnus generate is placed
5429 between two delimiters, @code{gnus-sieve-region-start} and
5430 @code{gnus-sieve-region-end}, so you may write additional Sieve code
5431 outside these delimiters that will not be removed the next time you
5432 regenerate the Sieve script.
5433
5434 @vindex gnus-sieve-crosspost
5435 The variable @code{gnus-sieve-crosspost} controls how the Sieve script
5436 is generated.  If it is non-@code{nil} (the default) articles is
5437 placed in all groups that have matching rules, otherwise the article
5438 is only placed in the group with the first matching rule.  For
5439 example, the group parameter @samp{(sieve address "sender"
5440 "owner-ding@@hpc.uh.edu")} will generate the following piece of Sieve
5441 code if @code{gnus-sieve-crosspost} is @code{nil}.  (When
5442 @code{gnus-sieve-crosspost} is non-@code{nil}, it looks the same
5443 except that the line containing the call to @code{stop} is removed.)
5444
5445 @example
5446 if address "sender" "owner-ding@@hpc.uh.edu" @{
5447         fileinto "INBOX.ding";
5448         stop;
5449 @}
5450 @end example
5451
5452 @xref{Top, Emacs Sieve, Top, sieve, Emacs Sieve}.
5453
5454 @table @kbd
5455
5456 @item D g
5457 @kindex D g (Group)
5458 @findex gnus-sieve-generate
5459 @vindex gnus-sieve-file
5460 @cindex generating sieve script
5461 Regenerate a Sieve script from the @code{sieve} group parameters and
5462 put you into the @code{gnus-sieve-file} without saving it.
5463
5464 @item D u
5465 @kindex D u (Group)
5466 @findex gnus-sieve-update
5467 @vindex gnus-sieve-file
5468 @cindex updating sieve script
5469 Regenerates the Gnus managed part of @code{gnus-sieve-file} using the
5470 @code{sieve} group parameters, save the file and upload it to the
5471 server using the @code{sieveshell} program.
5472
5473 @end table
5474
5475
5476 @node Summary Buffer
5477 @chapter Summary Buffer
5478 @cindex summary buffer
5479
5480 A line for each article is displayed in the summary buffer.  You can
5481 move around, read articles, post articles and reply to articles.
5482
5483 The most common way to a summary buffer is to select a group from the
5484 group buffer (@pxref{Selecting a Group}).
5485
5486 You can have as many summary buffers open as you wish.
5487
5488 You can customize the Summary Mode tool bar, see @kbd{M-x
5489 customize-apropos RET gnus-summary-tool-bar}.  This feature is only
5490 available in Emacs.
5491
5492 @kindex v (Summary)
5493 @cindex keys, reserved for users (Summary)
5494 The key @kbd{v} is reserved for users.  You can bind it to some
5495 command or better use it as a prefix key.  For example:
5496 @lisp
5497 (define-key gnus-summary-mode-map (kbd "v -") "LrS") ;; lower subthread
5498 @end lisp
5499
5500 @menu
5501 * Summary Buffer Format::       Deciding how the summary buffer is to look.
5502 * Summary Maneuvering::         Moving around the summary buffer.
5503 * Choosing Articles::           Reading articles.
5504 * Paging the Article::          Scrolling the current article.
5505 * Reply Followup and Post::     Posting articles.
5506 * Delayed Articles::            Send articles at a later time.
5507 * Marking Articles::            Marking articles as read, expirable, etc.
5508 * Limiting::                    You can limit the summary buffer.
5509 * Threading::                   How threads are made.
5510 * Sorting the Summary Buffer::  How articles and threads are sorted.
5511 * Asynchronous Fetching::       Gnus might be able to pre-fetch articles.
5512 * Article Caching::             You may store articles in a cache.
5513 * Persistent Articles::         Making articles expiry-resistant.
5514 * Sticky Articles::             Article buffers that are not reused.
5515 * Article Backlog::             Having already read articles hang around.
5516 * Saving Articles::             Ways of customizing article saving.
5517 * Decoding Articles::           Gnus can treat series of (uu)encoded articles.
5518 * Article Treatment::           The article buffer can be mangled at will.
5519 * MIME Commands::               Doing MIMEy things with the articles.
5520 * Charsets::                    Character set issues.
5521 * Article Commands::            Doing various things with the article buffer.
5522 * Summary Sorting::             Sorting the summary buffer in various ways.
5523 * Finding the Parent::          No child support? Get the parent.
5524 * Alternative Approaches::      Reading using non-default summaries.
5525 * Tree Display::                A more visual display of threads.
5526 * Mail Group Commands::         Some commands can only be used in mail groups.
5527 * Various Summary Stuff::       What didn't fit anywhere else.
5528 * Exiting the Summary Buffer::  Returning to the Group buffer,
5529                                 or reselecting the current group.
5530 * Crosspost Handling::          How crossposted articles are dealt with.
5531 * Duplicate Suppression::       An alternative when crosspost handling fails.
5532 * Security::                    Decrypt and Verify.
5533 * Mailing List::                Mailing list minor mode.
5534 @end menu
5535
5536
5537 @node Summary Buffer Format
5538 @section Summary Buffer Format
5539 @cindex summary buffer format
5540
5541 @iftex
5542 @iflatex
5543 \gnusfigure{The Summary Buffer}{180}{
5544 \put(0,0){\epsfig{figure=ps/summary,width=7.5cm}}
5545 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-article,width=7.5cm}}}
5546 }
5547 @end iflatex
5548 @end iftex
5549
5550 @menu
5551 * Summary Buffer Lines::        You can specify how summary lines should look.
5552 * To From Newsgroups::          How to not display your own name.
5553 * Summary Buffer Mode Line::    You can say how the mode line should look.
5554 * Summary Highlighting::        Making the summary buffer all pretty and nice.
5555 @end menu
5556
5557 @findex mail-extract-address-components
5558 @findex gnus-extract-address-components
5559 @vindex gnus-extract-address-components
5560 Gnus will use the value of the @code{gnus-extract-address-components}
5561 variable as a function for getting the name and address parts of a
5562 @code{From} header.  Two pre-defined functions exist:
5563 @code{gnus-extract-address-components}, which is the default, quite
5564 fast, and too simplistic solution; and
5565 @code{mail-extract-address-components}, which works very nicely, but is
5566 slower.  The default function will return the wrong answer in 5% of the
5567 cases.  If this is unacceptable to you, use the other function instead:
5568
5569 @lisp
5570 (setq gnus-extract-address-components
5571       'mail-extract-address-components)
5572 @end lisp
5573
5574 @vindex gnus-summary-same-subject
5575 @code{gnus-summary-same-subject} is a string indicating that the current
5576 article has the same subject as the previous.  This string will be used
5577 with those specs that require it.  The default is @code{""}.
5578
5579
5580 @node Summary Buffer Lines
5581 @subsection Summary Buffer Lines
5582
5583 @vindex gnus-summary-line-format
5584 You can change the format of the lines in the summary buffer by changing
5585 the @code{gnus-summary-line-format} variable.  It works along the same
5586 lines as a normal @code{format} string, with some extensions
5587 (@pxref{Formatting Variables}).
5588
5589 There should always be a colon or a point position marker on the line;
5590 the cursor always moves to the point position marker or the colon after
5591 performing an operation.  (Of course, Gnus wouldn't be Gnus if it wasn't
5592 possible to change this.  Just write a new function
5593 @code{gnus-goto-colon} which does whatever you like with the cursor.)
5594 @xref{Positioning Point}.
5595
5596 The default string is @samp{%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n}.
5597
5598 The following format specification characters and extended format
5599 specification(s) are understood:
5600
5601 @table @samp
5602 @item N
5603 Article number.
5604 @item S
5605 Subject string.  List identifiers stripped,
5606 @code{gnus-list-identifiers}.  @xref{Article Hiding}.
5607 @item s
5608 Subject if the article is the root of the thread or the previous article
5609 had a different subject, @code{gnus-summary-same-subject} otherwise.
5610 (@code{gnus-summary-same-subject} defaults to @code{""}.)
5611 @item F
5612 Full @code{From} header.
5613 @item n
5614 The name (from the @code{From} header).
5615 @item f
5616 The name, @code{To} header or the @code{Newsgroups} header (@pxref{To
5617 From Newsgroups}).
5618 @item a
5619 The name (from the @code{From} header).  This differs from the @code{n}
5620 spec in that it uses the function designated by the
5621 @code{gnus-extract-address-components} variable, which is slower, but
5622 may be more thorough.
5623 @item A
5624 The address (from the @code{From} header).  This works the same way as
5625 the @code{a} spec.
5626 @item L
5627 Number of lines in the article.
5628 @item c
5629 Number of characters in the article.  This specifier is not supported
5630 in some methods (like nnfolder).
5631 @item k
5632 Pretty-printed version of the number of characters in the article;
5633 for example, @samp{1.2k} or @samp{0.4M}.
5634 @item I
5635 Indentation based on thread level (@pxref{Customizing Threading}).
5636 @item B
5637 A complex trn-style thread tree, showing response-connecting trace
5638 lines.  A thread could be drawn like this:
5639
5640 @example
5641 >
5642 +->
5643 | +->
5644 | | \->
5645 | |   \->
5646 | \->
5647 +->
5648 \->
5649 @end example
5650
5651 You can customize the appearance with the following options.  Note
5652 that it is possible to make the thread display look really neat by
5653 replacing the default @acronym{ASCII} characters with graphic
5654 line-drawing glyphs.
5655 @table @code
5656 @item gnus-sum-thread-tree-root
5657 @vindex gnus-sum-thread-tree-root
5658 Used for the root of a thread.  If @code{nil}, use subject
5659 instead.  The default is @samp{> }.
5660
5661 @item gnus-sum-thread-tree-false-root
5662 @vindex gnus-sum-thread-tree-false-root
5663 Used for the false root of a thread (@pxref{Loose Threads}).  If
5664 @code{nil}, use subject instead.  The default is @samp{> }.
5665
5666 @item gnus-sum-thread-tree-single-indent
5667 @vindex gnus-sum-thread-tree-single-indent
5668 Used for a thread with just one message.  If @code{nil}, use subject
5669 instead.  The default is @samp{}.
5670
5671 @item gnus-sum-thread-tree-vertical
5672 @vindex gnus-sum-thread-tree-vertical
5673 Used for drawing a vertical line.  The default is @samp{| }.
5674
5675 @item gnus-sum-thread-tree-indent
5676 @vindex gnus-sum-thread-tree-indent
5677 Used for indenting.  The default is @samp{  }.
5678
5679 @item gnus-sum-thread-tree-leaf-with-other
5680 @vindex gnus-sum-thread-tree-leaf-with-other
5681 Used for a leaf with brothers.  The default is @samp{+-> }.
5682
5683 @item gnus-sum-thread-tree-single-leaf
5684 @vindex gnus-sum-thread-tree-single-leaf
5685 Used for a leaf without brothers.  The default is @samp{\-> }
5686
5687 @end table
5688
5689 @item T
5690 Nothing if the article is a root and lots of spaces if it isn't (it
5691 pushes everything after it off the screen).
5692 @item [
5693 Opening bracket, which is normally @samp{[}, but can also be @samp{<}
5694 for adopted articles (@pxref{Customizing Threading}).
5695 @item ]
5696 Closing bracket, which is normally @samp{]}, but can also be @samp{>}
5697 for adopted articles.
5698 @item >
5699 One space for each thread level.
5700 @item <
5701 Twenty minus thread level spaces.
5702 @item U
5703 Unread.  @xref{Read Articles}.
5704
5705 @item R
5706 This misleadingly named specifier is the @dfn{secondary mark}.  This
5707 mark will say whether the article has been replied to, has been cached,
5708 or has been saved.  @xref{Other Marks}.
5709
5710 @item i
5711 Score as a number (@pxref{Scoring}).
5712 @item z
5713 @vindex gnus-summary-zcore-fuzz
5714 Zcore, @samp{+} if above the default level and @samp{-} if below the
5715 default level.  If the difference between
5716 @code{gnus-summary-default-score} and the score is less than
5717 @code{gnus-summary-zcore-fuzz}, this spec will not be used.
5718 @item V
5719 Total thread score.
5720 @item x
5721 @code{Xref}.
5722 @item D
5723 @code{Date}.
5724 @item d
5725 The @code{Date} in @code{DD-MMM} format.
5726 @item o
5727 The @code{Date} in @var{YYYYMMDD}@code{T}@var{HHMMSS} format.
5728 @item M
5729 @code{Message-ID}.
5730 @item r
5731 @code{References}.
5732 @item t
5733 Number of articles in the current sub-thread.  Using this spec will slow
5734 down summary buffer generation somewhat.
5735 @item e
5736 An @samp{=} (@code{gnus-not-empty-thread-mark}) will be displayed if the
5737 article has any children.
5738 @item P
5739 The line number.
5740 @item O
5741 Download mark.
5742 @item *
5743 Desired cursor position (instead of after first colon).
5744 @item &user-date;
5745 Age sensitive date format.  Various date format is defined in
5746 @code{gnus-user-date-format-alist}.
5747 @item u
5748 User defined specifier.  The next character in the format string should
5749 be a letter.  Gnus will call the function
5750 @code{gnus-user-format-function-@var{x}}, where @var{x} is the letter
5751 following @samp{%u}.  The function will be passed the current header as
5752 argument.  The function should return a string, which will be inserted
5753 into the summary just like information from any other summary specifier.
5754 @end table
5755
5756 Text between @samp{%(} and @samp{%)} will be highlighted with
5757 @code{gnus-mouse-face} when the mouse point is placed inside the area.
5758 There can only be one such area.
5759
5760 The @samp{%U} (status), @samp{%R} (replied) and @samp{%z} (zcore) specs
5761 have to be handled with care.  For reasons of efficiency, Gnus will
5762 compute what column these characters will end up in, and ``hard-code''
5763 that.  This means that it is invalid to have these specs after a
5764 variable-length spec.  Well, you might not be arrested, but your summary
5765 buffer will look strange, which is bad enough.
5766
5767 The smart choice is to have these specs as far to the left as possible.
5768 (Isn't that the case with everything, though?  But I digress.)
5769
5770 This restriction may disappear in later versions of Gnus.
5771
5772
5773 @node To From Newsgroups
5774 @subsection To From Newsgroups
5775 @cindex To
5776 @cindex Newsgroups
5777
5778 In some groups (particularly in archive groups), the @code{From} header
5779 isn't very interesting, since all the articles there are written by
5780 you.  To display the information in the @code{To} or @code{Newsgroups}
5781 headers instead, you need to decide three things: What information to
5782 gather; where to display it; and when to display it.
5783
5784 @enumerate
5785 @item
5786 @vindex gnus-extra-headers
5787 The reading of extra header information is controlled by the
5788 @code{gnus-extra-headers}.  This is a list of header symbols.  For
5789 instance:
5790
5791 @lisp
5792 (setq gnus-extra-headers
5793       '(To Newsgroups X-Newsreader))
5794 @end lisp
5795
5796 This will result in Gnus trying to obtain these three headers, and
5797 storing it in header structures for later easy retrieval.
5798
5799 @item
5800 @findex gnus-extra-header
5801 The value of these extra headers can be accessed via the
5802 @code{gnus-extra-header} function.  Here's a format line spec that will
5803 access the @code{X-Newsreader} header:
5804
5805 @example
5806 "%~(form (gnus-extra-header 'X-Newsreader))@@"
5807 @end example
5808
5809 @item
5810 @vindex gnus-ignored-from-addresses
5811 The @code{gnus-ignored-from-addresses} variable says when the @samp{%f}
5812 summary line spec returns the @code{To}, @code{Newsreader} or
5813 @code{From} header.  If this regexp matches the contents of the
5814 @code{From} header, the value of the @code{To} or @code{Newsreader}
5815 headers are used instead.
5816
5817 To distinguish regular articles from those where the @code{From} field
5818 has been swapped, a string is prefixed to the @code{To} or
5819 @code{Newsgroups} header in the summary line.  By default the string is
5820 @samp{-> } for @code{To} and @samp{=> } for @code{Newsgroups}, you can
5821 customize these strings with @code{gnus-summary-to-prefix} and
5822 @code{gnus-summary-newsgroup-prefix}.
5823
5824 @end enumerate
5825
5826 @vindex nnmail-extra-headers
5827 A related variable is @code{nnmail-extra-headers}, which controls when
5828 to include extra headers when generating overview (@acronym{NOV}) files.
5829 If you have old overview files, you should regenerate them after
5830 changing this variable, by entering the server buffer using @kbd{^},
5831 and then @kbd{g} on the appropriate mail server (e.g. nnml) to cause
5832 regeneration.
5833
5834 @vindex gnus-summary-line-format
5835 You also have to instruct Gnus to display the data by changing the
5836 @code{%n} spec to the @code{%f} spec in the
5837 @code{gnus-summary-line-format} variable.
5838
5839 In summary, you'd typically put something like the following in
5840 @file{~/.gnus.el}:
5841
5842 @lisp
5843 (setq gnus-extra-headers
5844       '(To Newsgroups))
5845 (setq nnmail-extra-headers gnus-extra-headers)
5846 (setq gnus-summary-line-format
5847       "%U%R%z%I%(%[%4L: %-23,23f%]%) %s\n")
5848 (setq gnus-ignored-from-addresses
5849       "Your Name Here")
5850 @end lisp
5851
5852 (The values listed above are the default values in Gnus.  Alter them
5853 to fit your needs.)
5854
5855 A note for news server administrators, or for users who wish to try to
5856 convince their news server administrator to provide some additional
5857 support:
5858
5859 The above is mostly useful for mail groups, where you have control over
5860 the @acronym{NOV} files that are created.  However, if you can persuade your
5861 nntp admin to add (in the usual implementation, notably INN):
5862
5863 @example
5864 Newsgroups:full
5865 @end example
5866
5867 to the end of her @file{overview.fmt} file, then you can use that just
5868 as you would the extra headers from the mail groups.
5869
5870
5871 @node Summary Buffer Mode Line
5872 @subsection Summary Buffer Mode Line
5873
5874 @vindex gnus-summary-mode-line-format
5875 You can also change the format of the summary mode bar (@pxref{Mode Line
5876 Formatting}).  Set @code{gnus-summary-mode-line-format} to whatever you
5877 like.  The default is @samp{Gnus: %%b [%A] %Z}.
5878
5879 Here are the elements you can play with:
5880
5881 @table @samp
5882 @item G
5883 Group name.
5884 @item p
5885 Unprefixed group name.
5886 @item A
5887 Current article number.
5888 @item z
5889 Current article score.
5890 @item V
5891 Gnus version.
5892 @item U
5893 Number of unread articles in this group.
5894 @item e
5895 Number of unread articles in this group that aren't displayed in the
5896 summary buffer.
5897 @item Z
5898 A string with the number of unread and unselected articles represented
5899 either as @samp{<%U(+%e) more>} if there are both unread and unselected
5900 articles, and just as @samp{<%U more>} if there are just unread articles
5901 and no unselected ones.
5902 @item g
5903 Shortish group name.  For instance, @samp{rec.arts.anime} will be
5904 shortened to @samp{r.a.anime}.
5905 @item S
5906 Subject of the current article.
5907 @item u
5908 User-defined spec (@pxref{User-Defined Specs}).
5909 @item s
5910 Name of the current score file (@pxref{Scoring}).
5911 @item d
5912 Number of dormant articles (@pxref{Unread Articles}).
5913 @item t
5914 Number of ticked articles (@pxref{Unread Articles}).
5915 @item r
5916 Number of articles that have been marked as read in this session.
5917 @item E
5918 Number of articles expunged by the score files.
5919 @end table
5920
5921
5922 @node Summary Highlighting
5923 @subsection Summary Highlighting
5924
5925 @table @code
5926
5927 @item gnus-visual-mark-article-hook
5928 @vindex gnus-visual-mark-article-hook
5929 This hook is run after selecting an article.  It is meant to be used for
5930 highlighting the article in some way.  It is not run if
5931 @code{gnus-visual} is @code{nil}.
5932
5933 @item gnus-summary-update-hook
5934 @vindex gnus-summary-update-hook
5935 This hook is called when a summary line is changed.  It is not run if
5936 @code{gnus-visual} is @code{nil}.
5937
5938 @item gnus-summary-selected-face
5939 @vindex gnus-summary-selected-face
5940 This is the face (or @dfn{font} as some people call it) used to
5941 highlight the current article in the summary buffer.
5942
5943 @item gnus-summary-highlight
5944 @vindex gnus-summary-highlight
5945 Summary lines are highlighted according to this variable, which is a
5946 list where the elements are of the format @code{(@var{form}
5947 . @var{face})}.  If you would, for instance, like ticked articles to be
5948 italic and high-scored articles to be bold, you could set this variable
5949 to something like
5950 @lisp
5951 (((eq mark gnus-ticked-mark) . italic)
5952  ((> score default) . bold))
5953 @end lisp
5954 As you may have guessed, if @var{form} returns a non-@code{nil} value,
5955 @var{face} will be applied to the line.
5956 @end table
5957
5958
5959 @node Summary Maneuvering
5960 @section Summary Maneuvering
5961 @cindex summary movement
5962
5963 All the straight movement commands understand the numeric prefix and
5964 behave pretty much as you'd expect.
5965
5966 None of these commands select articles.
5967
5968 @table @kbd
5969 @item G M-n
5970 @itemx M-n
5971 @kindex M-n (Summary)
5972 @kindex G M-n (Summary)
5973 @findex gnus-summary-next-unread-subject
5974 Go to the next summary line of an unread article
5975 (@code{gnus-summary-next-unread-subject}).
5976
5977 @item G M-p
5978 @itemx M-p
5979 @kindex M-p (Summary)
5980 @kindex G M-p (Summary)
5981 @findex gnus-summary-prev-unread-subject
5982 Go to the previous summary line of an unread article
5983 (@code{gnus-summary-prev-unread-subject}).
5984
5985 @item G g
5986 @kindex G g (Summary)
5987 @findex gnus-summary-goto-subject
5988 Ask for an article number and then go to the summary line of that article
5989 without displaying the article (@code{gnus-summary-goto-subject}).
5990 @end table
5991
5992 If Gnus asks you to press a key to confirm going to the next group, you
5993 can use the @kbd{C-n} and @kbd{C-p} keys to move around the group
5994 buffer, searching for the next group to read without actually returning
5995 to the group buffer.
5996
5997 Variables related to summary movement:
5998
5999 @table @code
6000
6001 @vindex gnus-auto-select-next
6002 @item gnus-auto-select-next
6003 If you issue one of the movement commands (like @kbd{n}) and there are
6004 no more unread articles after the current one, Gnus will offer to go to
6005 the next group.  If this variable is @code{t} and the next group is
6006 empty, Gnus will exit summary mode and return to the group buffer.  If
6007 this variable is neither @code{t} nor @code{nil}, Gnus will select the
6008 next group with unread articles.  As a special case, if this variable
6009 is @code{quietly}, Gnus will select the next group without asking for
6010 confirmation.  If this variable is @code{almost-quietly}, the same
6011 will happen only if you are located on the last article in the group.
6012 Finally, if this variable is @code{slightly-quietly}, the @kbd{Z n}
6013 command will go to the next group without confirmation.  Also
6014 @pxref{Group Levels}.
6015
6016 @item gnus-auto-select-same
6017 @vindex gnus-auto-select-same
6018 If non-@code{nil}, all the movement commands will try to go to the next
6019 article with the same subject as the current.  (@dfn{Same} here might
6020 mean @dfn{roughly equal}.  See @code{gnus-summary-gather-subject-limit}
6021 for details (@pxref{Customizing Threading}).)  If there are no more
6022 articles with the same subject, go to the first unread article.
6023
6024 This variable is not particularly useful if you use a threaded display.
6025
6026 @item gnus-summary-check-current
6027 @vindex gnus-summary-check-current
6028 If non-@code{nil}, all the ``unread'' movement commands will not proceed
6029 to the next (or previous) article if the current article is unread.
6030 Instead, they will choose the current article.
6031
6032 @item gnus-auto-center-summary
6033 @vindex gnus-auto-center-summary
6034 If non-@code{nil}, Gnus will keep the point in the summary buffer
6035 centered at all times.  This makes things quite tidy, but if you have a
6036 slow network connection, or simply do not like this un-Emacsism, you can
6037 set this variable to @code{nil} to get the normal Emacs scrolling
6038 action.  This will also inhibit horizontal re-centering of the summary
6039 buffer, which might make it more inconvenient to read extremely long
6040 threads.
6041
6042 This variable can also be a number.  In that case, center the window at
6043 the given number of lines from the top.
6044
6045 @item gnus-summary-stop-at-end-of-message
6046 @vindex gnus-summary-stop-at-end-of-message
6047 If non-@code{nil}, don't go to the next article when hitting
6048 @kbd{SPC}, and you're at the end of the article.
6049
6050 @end table
6051
6052
6053 @node Choosing Articles
6054 @section Choosing Articles
6055 @cindex selecting articles
6056
6057 @menu
6058 * Choosing Commands::           Commands for choosing articles.
6059 * Choosing Variables::          Variables that influence these commands.
6060 @end menu
6061
6062
6063 @node Choosing Commands
6064 @subsection Choosing Commands
6065
6066 None of the following movement commands understand the numeric prefix,
6067 and they all select and display an article.
6068
6069 If you want to fetch new articles or redisplay the group, see
6070 @ref{Exiting the Summary Buffer}.
6071
6072 @table @kbd
6073 @item SPACE
6074 @kindex SPACE (Summary)
6075 @findex gnus-summary-next-page
6076 Select the current article, or, if that one's read already, the next
6077 unread article (@code{gnus-summary-next-page}).
6078
6079 If you have an article window open already and you press @kbd{SPACE}
6080 again, the article will be scrolled.  This lets you conveniently
6081 @kbd{SPACE} through an entire newsgroup.  @xref{Paging the Article}.
6082
6083 @item G n
6084 @itemx n
6085 @kindex n (Summary)
6086 @kindex G n (Summary)
6087 @findex gnus-summary-next-unread-article
6088 @c @icon{gnus-summary-next-unread}
6089 Go to next unread article (@code{gnus-summary-next-unread-article}).
6090
6091 @item G p
6092 @itemx p
6093 @kindex p (Summary)
6094 @findex gnus-summary-prev-unread-article
6095 @c @icon{gnus-summary-prev-unread}
6096 Go to previous unread article (@code{gnus-summary-prev-unread-article}).
6097
6098 @item G N
6099 @itemx N
6100 @kindex N (Summary)
6101 @kindex G N (Summary)
6102 @findex gnus-summary-next-article
6103 Go to the next article (@code{gnus-summary-next-article}).
6104
6105 @item G P
6106 @itemx P
6107 @kindex P (Summary)
6108 @kindex G P (Summary)
6109 @findex gnus-summary-prev-article
6110 Go to the previous article (@code{gnus-summary-prev-article}).
6111
6112 @item G C-n
6113 @kindex G C-n (Summary)
6114 @findex gnus-summary-next-same-subject
6115 Go to the next article with the same subject
6116 (@code{gnus-summary-next-same-subject}).
6117
6118 @item G C-p
6119 @kindex G C-p (Summary)
6120 @findex gnus-summary-prev-same-subject
6121 Go to the previous article with the same subject
6122 (@code{gnus-summary-prev-same-subject}).
6123
6124 @item G f
6125 @itemx .
6126 @kindex G f  (Summary)
6127 @kindex .  (Summary)
6128 @findex gnus-summary-first-unread-article
6129 Go to the first unread article
6130 (@code{gnus-summary-first-unread-article}).
6131
6132 @item G b
6133 @itemx ,
6134 @kindex G b (Summary)
6135 @kindex , (Summary)
6136 @findex gnus-summary-best-unread-article
6137 Go to the unread article with the highest score
6138 (@code{gnus-summary-best-unread-article}).  If given a prefix argument,
6139 go to the first unread article that has a score over the default score.
6140
6141 @item G l
6142 @itemx l
6143 @kindex l (Summary)
6144 @kindex G l (Summary)
6145 @findex gnus-summary-goto-last-article
6146 Go to the previous article read (@code{gnus-summary-goto-last-article}).
6147
6148 @item G o
6149 @kindex G o (Summary)
6150 @findex gnus-summary-pop-article
6151 @cindex history
6152 @cindex article history
6153 Pop an article off the summary history and go to this article
6154 (@code{gnus-summary-pop-article}).  This command differs from the
6155 command above in that you can pop as many previous articles off the
6156 history as you like, while @kbd{l} toggles the two last read articles.
6157 For a somewhat related issue (if you use these commands a lot),
6158 @pxref{Article Backlog}.
6159
6160 @item G j
6161 @itemx j
6162 @kindex j (Summary)
6163 @kindex G j (Summary)
6164 @findex gnus-summary-goto-article
6165 Ask for an article number or @code{Message-ID}, and then go to that
6166 article (@code{gnus-summary-goto-article}).
6167
6168 @end table
6169
6170
6171 @node Choosing Variables
6172 @subsection Choosing Variables
6173
6174 Some variables relevant for moving and selecting articles:
6175
6176 @table @code
6177 @item gnus-auto-extend-newsgroup
6178 @vindex gnus-auto-extend-newsgroup
6179 All the movement commands will try to go to the previous (or next)
6180 article, even if that article isn't displayed in the Summary buffer if
6181 this variable is non-@code{nil}.  Gnus will then fetch the article from
6182 the server and display it in the article buffer.
6183
6184 @item gnus-select-article-hook
6185 @vindex gnus-select-article-hook
6186 This hook is called whenever an article is selected.  The default is
6187 @code{nil}.  If you would like each article to be saved in the Agent as
6188 you read it, putting @code{gnus-agent-fetch-selected-article} on this
6189 hook will do so.
6190
6191 @item gnus-mark-article-hook
6192 @vindex gnus-mark-article-hook
6193 @findex gnus-summary-mark-unread-as-read
6194 @findex gnus-summary-mark-read-and-unread-as-read
6195 @findex gnus-unread-mark
6196 This hook is called whenever an article is selected.  It is intended to
6197 be used for marking articles as read.  The default value is
6198 @code{gnus-summary-mark-read-and-unread-as-read}, and will change the
6199 mark of almost any article you read to @code{gnus-read-mark}.  The only
6200 articles not affected by this function are ticked, dormant, and
6201 expirable articles.  If you'd instead like to just have unread articles
6202 marked as read, you can use @code{gnus-summary-mark-unread-as-read}
6203 instead.  It will leave marks like @code{gnus-low-score-mark},
6204 @code{gnus-del-mark} (and so on) alone.
6205
6206 @end table
6207
6208
6209 @node Paging the Article
6210 @section Scrolling the Article
6211 @cindex article scrolling
6212
6213 @table @kbd
6214
6215 @item SPACE
6216 @kindex SPACE (Summary)
6217 @findex gnus-summary-next-page
6218 Pressing @kbd{SPACE} will scroll the current article forward one page,
6219 or, if you have come to the end of the current article, will choose the
6220 next article (@code{gnus-summary-next-page}).
6221
6222 @vindex gnus-article-boring-faces
6223 @vindex gnus-article-skip-boring
6224 If @code{gnus-article-skip-boring} is non-@code{nil} and the rest of
6225 the article consists only of citations and signature, then it will be
6226 skipped; the next article will be shown instead.  You can customize
6227 what is considered uninteresting with
6228 @code{gnus-article-boring-faces}.  You can manually view the article's
6229 pages, no matter how boring, using @kbd{C-M-v}.
6230
6231 @item DEL
6232 @kindex DEL (Summary)
6233 @findex gnus-summary-prev-page
6234 Scroll the current article back one page (@code{gnus-summary-prev-page}).
6235
6236 @item RET
6237 @kindex RET (Summary)
6238 @findex gnus-summary-scroll-up
6239 Scroll the current article one line forward
6240 (@code{gnus-summary-scroll-up}).
6241
6242 @item M-RET
6243 @kindex M-RET (Summary)
6244 @findex gnus-summary-scroll-down
6245 Scroll the current article one line backward
6246 (@code{gnus-summary-scroll-down}).
6247
6248 @item A g
6249 @itemx g
6250 @kindex A g (Summary)
6251 @kindex g (Summary)
6252 @findex gnus-summary-show-article
6253 @vindex gnus-summary-show-article-charset-alist
6254 (Re)fetch the current article (@code{gnus-summary-show-article}).  If
6255 given a prefix, fetch the current article, but don't run any of the
6256 article treatment functions.  This will give you a ``raw'' article, just
6257 the way it came from the server.
6258
6259 @cindex charset, view article with different charset
6260 If given a numerical prefix, you can do semi-manual charset stuff.
6261 @kbd{C-u 0 g cn-gb-2312 RET} will decode the message as if it were
6262 encoded in the @code{cn-gb-2312} charset.  If you have
6263
6264 @lisp
6265 (setq gnus-summary-show-article-charset-alist
6266       '((1 . cn-gb-2312)
6267         (2 . big5)))
6268 @end lisp
6269
6270 then you can say @kbd{C-u 1 g} to get the same effect.
6271
6272 @item A <
6273 @itemx <
6274 @kindex < (Summary)
6275 @kindex A < (Summary)
6276 @findex gnus-summary-beginning-of-article
6277 Scroll to the beginning of the article
6278 (@code{gnus-summary-beginning-of-article}).
6279
6280 @item A >
6281 @itemx >
6282 @kindex > (Summary)
6283 @kindex A > (Summary)
6284 @findex gnus-summary-end-of-article
6285 Scroll to the end of the article (@code{gnus-summary-end-of-article}).
6286
6287 @item A s
6288 @itemx s
6289 @kindex A s (Summary)
6290 @kindex s (Summary)
6291 @findex gnus-summary-isearch-article
6292 Perform an isearch in the article buffer
6293 (@code{gnus-summary-isearch-article}).
6294
6295 @item h
6296 @kindex h (Summary)
6297 @findex gnus-summary-select-article-buffer
6298 Select the article buffer (@code{gnus-summary-select-article-buffer}).
6299
6300 @end table
6301
6302
6303 @node Reply Followup and Post
6304 @section Reply, Followup and Post
6305
6306 @menu
6307 * Summary Mail Commands::       Sending mail.
6308 * Summary Post Commands::       Sending news.
6309 * Summary Message Commands::    Other Message-related commands.
6310 * Canceling and Superseding::
6311 @end menu
6312
6313
6314 @node Summary Mail Commands
6315 @subsection Summary Mail Commands
6316 @cindex mail
6317 @cindex composing mail
6318
6319 Commands for composing a mail message:
6320
6321 @table @kbd
6322
6323 @item S r
6324 @itemx r
6325 @kindex S r (Summary)
6326 @kindex r (Summary)
6327 @findex gnus-summary-reply
6328 @c @icon{gnus-summary-mail-reply}
6329 @c @icon{gnus-summary-reply}
6330 Mail a reply to the author of the current article
6331 (@code{gnus-summary-reply}).
6332
6333 @item S R
6334 @itemx R
6335 @kindex R (Summary)
6336 @kindex S R (Summary)
6337 @findex gnus-summary-reply-with-original
6338 @c @icon{gnus-summary-reply-with-original}
6339 Mail a reply to the author of the current article and include the
6340 original message (@code{gnus-summary-reply-with-original}).  This
6341 command uses the process/prefix convention.
6342
6343 @item S w
6344 @kindex S w (Summary)
6345 @findex gnus-summary-wide-reply
6346 Mail a wide reply to the author of the current article
6347 (@code{gnus-summary-wide-reply}).  A @dfn{wide reply} is a reply that
6348 goes out to all people listed in the @code{To}, @code{From} (or
6349 @code{Reply-to}) and @code{Cc} headers.  If @code{Mail-Followup-To} is
6350 present, that's used instead.
6351
6352 @item S W
6353 @kindex S W (Summary)
6354 @findex gnus-summary-wide-reply-with-original
6355 Mail a wide reply to the current article and include the original
6356 message (@code{gnus-summary-wide-reply-with-original}).  This command uses
6357 the process/prefix convention.
6358
6359 @item S v
6360 @kindex S v (Summary)
6361 @findex gnus-summary-very-wide-reply
6362 Mail a very wide reply to the author of the current article
6363 (@code{gnus-summary-wide-reply}).  A @dfn{very wide reply} is a reply
6364 that goes out to all people listed in the @code{To}, @code{From} (or
6365 @code{Reply-to}) and @code{Cc} headers in all the process/prefixed
6366 articles.  This command uses the process/prefix convention.
6367
6368 @item S V
6369 @kindex S V (Summary)
6370 @findex gnus-summary-very-wide-reply-with-original
6371 Mail a very wide reply to the author of the current article and include the
6372 original message (@code{gnus-summary-very-wide-reply-with-original}).  This
6373 command uses the process/prefix convention.
6374
6375 @item S B r
6376 @kindex S B r (Summary)
6377 @findex gnus-summary-reply-broken-reply-to
6378 Mail a reply to the author of the current article but ignore the
6379 @code{Reply-To} field (@code{gnus-summary-reply-broken-reply-to}).
6380 If you need this because a mailing list incorrectly sets a
6381 @code{Reply-To} header pointing to the list, you probably want to set
6382 the @code{broken-reply-to} group parameter instead, so things will work
6383 correctly.  @xref{Group Parameters}.
6384
6385 @item S B R
6386 @kindex S B R (Summary)
6387 @findex gnus-summary-reply-broken-reply-to-with-original
6388 Mail a reply to the author of the current article and include the
6389 original message but ignore the @code{Reply-To} field
6390 (@code{gnus-summary-reply-broken-reply-to-with-original}).
6391
6392 @item S o m
6393 @itemx C-c C-f
6394 @kindex S o m (Summary)
6395 @kindex C-c C-f (Summary)
6396 @findex gnus-summary-mail-forward
6397 @c @icon{gnus-summary-mail-forward}
6398 Forward the current article to some other person
6399 (@code{gnus-summary-mail-forward}).  If no prefix is given, the message
6400 is forwarded according to the value of (@code{message-forward-as-mime})
6401 and (@code{message-forward-show-mml}); if the prefix is 1, decode the
6402 message and forward directly inline; if the prefix is 2, forward message
6403 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
6404 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
6405 directly inline; otherwise, the message is forwarded as no prefix given
6406 but use the flipped value of (@code{message-forward-as-mime}).  By
6407 default, the message is decoded and forwarded as an rfc822 @acronym{MIME}
6408 section.
6409
6410 @item S m
6411 @itemx m
6412 @kindex m (Summary)
6413 @kindex S m (Summary)
6414 @findex gnus-summary-mail-other-window
6415 @c @icon{gnus-summary-mail-originate}
6416 Prepare a mail (@code{gnus-summary-mail-other-window}).  By default, use
6417 the posting style of the current group.  If given a prefix, disable that.
6418 If the prefix is 1, prompt for a group name to find the posting style.
6419
6420 @item S i
6421 @itemx i
6422 @kindex i (Summary)
6423 @kindex S i (Summary)
6424 @findex gnus-summary-news-other-window
6425 Prepare a news (@code{gnus-summary-news-other-window}).  By default,
6426 post to the current group.  If given a prefix, disable that.  If the
6427 prefix is 1, prompt for a group to post to.
6428
6429 This function actually prepares a news even when using mail groups.
6430 This is useful for ``posting'' messages to mail groups without actually
6431 sending them over the network: they're just saved directly to the group
6432 in question.  The corresponding back end must have a request-post method
6433 for this to work though.
6434
6435 @item S D b
6436 @kindex S D b (Summary)
6437 @findex gnus-summary-resend-bounced-mail
6438 @cindex bouncing mail
6439 If you have sent a mail, but the mail was bounced back to you for some
6440 reason (wrong address, transient failure), you can use this command to
6441 resend that bounced mail (@code{gnus-summary-resend-bounced-mail}).  You
6442 will be popped into a mail buffer where you can edit the headers before
6443 sending the mail off again.  If you give a prefix to this command, and
6444 the bounced mail is a reply to some other mail, Gnus will try to fetch
6445 that mail and display it for easy perusal of its headers.  This might
6446 very well fail, though.
6447
6448 @item S D r
6449 @kindex S D r (Summary)
6450 @findex gnus-summary-resend-message
6451 Not to be confused with the previous command,
6452 @code{gnus-summary-resend-message} will prompt you for an address to
6453 send the current message off to, and then send it to that place.  The
6454 headers of the message won't be altered---but lots of headers that say
6455 @code{Resent-To}, @code{Resent-From} and so on will be added.  This
6456 means that you actually send a mail to someone that has a @code{To}
6457 header that (probably) points to yourself.  This will confuse people.
6458 So, natcherly you'll only do that if you're really eVIl.
6459
6460 This command is mainly used if you have several accounts and want to
6461 ship a mail to a different account of yours.  (If you're both
6462 @code{root} and @code{postmaster} and get a mail for @code{postmaster}
6463 to the @code{root} account, you may want to resend it to
6464 @code{postmaster}.  Ordnung muss sein!
6465
6466 This command understands the process/prefix convention
6467 (@pxref{Process/Prefix}).
6468
6469 @item S D e
6470 @kindex S D e (Summary)
6471 @findex gnus-summary-resend-message-edit
6472
6473 Like the previous command, but will allow you to edit the message as
6474 if it were a new message before resending.
6475
6476 @item S O m
6477 @kindex S O m (Summary)
6478 @findex gnus-uu-digest-mail-forward
6479 Digest the current series (@pxref{Decoding Articles}) and forward the
6480 result using mail (@code{gnus-uu-digest-mail-forward}).  This command
6481 uses the process/prefix convention (@pxref{Process/Prefix}).
6482
6483 @item S M-c
6484 @kindex S M-c (Summary)
6485 @findex gnus-summary-mail-crosspost-complaint
6486 @cindex crossposting
6487 @cindex excessive crossposting
6488 Send a complaint about excessive crossposting to the author of the
6489 current article (@code{gnus-summary-mail-crosspost-complaint}).
6490
6491 @findex gnus-crosspost-complaint
6492 This command is provided as a way to fight back against the current
6493 crossposting pandemic that's sweeping Usenet.  It will compose a reply
6494 using the @code{gnus-crosspost-complaint} variable as a preamble.  This
6495 command understands the process/prefix convention
6496 (@pxref{Process/Prefix}) and will prompt you before sending each mail.
6497
6498 @end table
6499
6500 Also @xref{Header Commands, ,Header Commands, message, The Message
6501 Manual}, for more information.
6502
6503
6504 @node Summary Post Commands
6505 @subsection Summary Post Commands
6506 @cindex post
6507 @cindex composing news
6508
6509 Commands for posting a news article:
6510
6511 @table @kbd
6512 @item S p
6513 @itemx a
6514 @kindex a (Summary)
6515 @kindex S p (Summary)
6516 @findex gnus-summary-post-news
6517 @c @icon{gnus-summary-post-news}
6518 Prepare for posting an article (@code{gnus-summary-post-news}).  By
6519 default, post to the current group.  If given a prefix, disable that.
6520 If the prefix is 1, prompt for another group instead.
6521
6522 @item S f
6523 @itemx f
6524 @kindex f (Summary)
6525 @kindex S f (Summary)
6526 @findex gnus-summary-followup
6527 @c @icon{gnus-summary-followup}
6528 Post a followup to the current article (@code{gnus-summary-followup}).
6529
6530 @item S F
6531 @itemx F
6532 @kindex S F (Summary)
6533 @kindex F (Summary)
6534 @c @icon{gnus-summary-followup-with-original}
6535 @findex gnus-summary-followup-with-original
6536 Post a followup to the current article and include the original message
6537 (@code{gnus-summary-followup-with-original}).  This command uses the
6538 process/prefix convention.
6539
6540 @item S n
6541 @kindex S n (Summary)
6542 @findex gnus-summary-followup-to-mail
6543 Post a followup to the current article via news, even if you got the
6544 message through mail (@code{gnus-summary-followup-to-mail}).
6545
6546 @item S N
6547 @kindex S N (Summary)
6548 @findex gnus-summary-followup-to-mail-with-original
6549 Post a followup to the current article via news, even if you got the
6550 message through mail and include the original message
6551 (@code{gnus-summary-followup-to-mail-with-original}).  This command uses
6552 the process/prefix convention.
6553
6554 @item S o p
6555 @kindex S o p (Summary)
6556 @findex gnus-summary-post-forward
6557 Forward the current article to a newsgroup
6558 (@code{gnus-summary-post-forward}).
6559  If no prefix is given, the message is forwarded according to the value
6560 of (@code{message-forward-as-mime}) and
6561 (@code{message-forward-show-mml}); if the prefix is 1, decode the
6562 message and forward directly inline; if the prefix is 2, forward message
6563 as an rfc822 @acronym{MIME} section; if the prefix is 3, decode message and
6564 forward as an rfc822 @acronym{MIME} section; if the prefix is 4, forward message
6565 directly inline; otherwise, the message is forwarded as no prefix given
6566 but use the flipped value of (@code{message-forward-as-mime}).  By
6567 default, the message is decoded and forwarded as an rfc822 @acronym{MIME} section.
6568
6569 @item S O p
6570 @kindex S O p (Summary)
6571 @findex gnus-uu-digest-post-forward
6572 @cindex digests
6573 @cindex making digests
6574 Digest the current series and forward the result to a newsgroup
6575 (@code{gnus-uu-digest-post-forward}).  This command uses the
6576 process/prefix convention.
6577
6578 @item S u
6579 @kindex S u (Summary)
6580 @findex gnus-uu-post-news
6581 @c @icon{gnus-uu-post-news}
6582 Uuencode a file, split it into parts, and post it as a series
6583 (@code{gnus-uu-post-news}).  (@pxref{Uuencoding and Posting}).
6584 @end table
6585
6586 Also @xref{Header Commands, ,Header Commands, message, The Message
6587 Manual}, for more information.
6588
6589
6590 @node Summary Message Commands
6591 @subsection Summary Message Commands
6592
6593 @table @kbd
6594 @item S y
6595 @kindex S y (Summary)
6596 @findex gnus-summary-yank-message
6597 Yank the current article into an already existing Message composition
6598 buffer (@code{gnus-summary-yank-message}).  This command prompts for
6599 what message buffer you want to yank into, and understands the
6600 process/prefix convention (@pxref{Process/Prefix}).
6601
6602 @end table
6603
6604
6605 @node Canceling and Superseding
6606 @subsection Canceling Articles
6607 @cindex canceling articles
6608 @cindex superseding articles
6609
6610 Have you ever written something, and then decided that you really,
6611 really, really wish you hadn't posted that?
6612
6613 Well, you can't cancel mail, but you can cancel posts.
6614
6615 @findex gnus-summary-cancel-article
6616 @kindex C (Summary)
6617 @c @icon{gnus-summary-cancel-article}
6618 Find the article you wish to cancel (you can only cancel your own
6619 articles, so don't try any funny stuff).  Then press @kbd{C} or @kbd{S
6620 c} (@code{gnus-summary-cancel-article}).  Your article will be
6621 canceled---machines all over the world will be deleting your article.
6622 This command uses the process/prefix convention (@pxref{Process/Prefix}).
6623
6624 Be aware, however, that not all sites honor cancels, so your article may
6625 live on here and there, while most sites will delete the article in
6626 question.
6627
6628 Gnus will use the ``current'' select method when canceling.  If you
6629 want to use the standard posting method, use the @samp{a} symbolic
6630 prefix (@pxref{Symbolic Prefixes}).
6631
6632 Gnus ensures that only you can cancel your own messages using a
6633 @code{Cancel-Lock} header (@pxref{Canceling News, Canceling News, ,
6634 message, Message Manual}).
6635
6636 If you discover that you have made some mistakes and want to do some
6637 corrections, you can post a @dfn{superseding} article that will replace
6638 your original article.
6639
6640 @findex gnus-summary-supersede-article
6641 @kindex S (Summary)
6642 Go to the original article and press @kbd{S s}
6643 (@code{gnus-summary-supersede-article}).  You will be put in a buffer
6644 where you can edit the article all you want before sending it off the
6645 usual way.
6646
6647 The same goes for superseding as for canceling, only more so: Some
6648 sites do not honor superseding.  On those sites, it will appear that you
6649 have posted almost the same article twice.
6650
6651 If you have just posted the article, and change your mind right away,
6652 there is a trick you can use to cancel/supersede the article without
6653 waiting for the article to appear on your site first.  You simply return
6654 to the post buffer (which is called @code{*sent ...*}).  There you will
6655 find the article you just posted, with all the headers intact.  Change
6656 the @code{Message-ID} header to a @code{Cancel} or @code{Supersedes}
6657 header by substituting one of those words for the word
6658 @code{Message-ID}.  Then just press @kbd{C-c C-c} to send the article as
6659 you would do normally.  The previous article will be
6660 canceled/superseded.
6661
6662 Just remember, kids: There is no 'c' in 'supersede'.
6663
6664 @node Delayed Articles
6665 @section Delayed Articles
6666 @cindex delayed sending
6667 @cindex send delayed
6668
6669 Sometimes, you might wish to delay the sending of a message.  For
6670 example, you might wish to arrange for a message to turn up just in time
6671 to remind your about the birthday of your Significant Other.  For this,
6672 there is the @code{gnus-delay} package.  Setup is simple:
6673
6674 @lisp
6675 (gnus-delay-initialize)
6676 @end lisp
6677
6678 @findex gnus-delay-article
6679 Normally, to send a message you use the @kbd{C-c C-c} command from
6680 Message mode.  To delay a message, use @kbd{C-c C-j}
6681 (@code{gnus-delay-article}) instead.  This will ask you for how long the
6682 message should be delayed.  Possible answers are:
6683
6684 @itemize @bullet
6685 @item
6686 A time span.  Consists of an integer and a letter.  For example,
6687 @code{42d} means to delay for 42 days.  Available letters are @code{m}
6688 (minutes), @code{h} (hours), @code{d} (days), @code{w} (weeks), @code{M}
6689 (months) and @code{Y} (years).
6690
6691 @item
6692 A specific date.  Looks like @code{YYYY-MM-DD}.  The message will be
6693 delayed until that day, at a specific time (eight o'clock by default).
6694 See also @code{gnus-delay-default-hour}.
6695
6696 @item
6697 A specific time of day.  Given in @code{hh:mm} format, 24h, no am/pm
6698 stuff.  The deadline will be at that time today, except if that time has
6699 already passed, then it's at the given time tomorrow.  So if it's ten
6700 o'clock in the morning and you specify @code{11:15}, then the deadline
6701 is one hour and fifteen minutes hence.  But if you specify @code{9:20},
6702 that means a time tomorrow.
6703 @end itemize
6704
6705 The action of the @code{gnus-delay-article} command is influenced by a
6706 couple of variables:
6707
6708 @table @code
6709 @item gnus-delay-default-hour
6710 @vindex gnus-delay-default-hour
6711 When you specify a specific date, the message will be due on that hour
6712 on the given date.  Possible values are integers 0 through 23.
6713
6714 @item gnus-delay-default-delay
6715 @vindex gnus-delay-default-delay
6716 This is a string and gives the default delay.  It can be of any of the
6717 formats described above.
6718
6719 @item gnus-delay-group
6720 @vindex gnus-delay-group
6721 Delayed articles will be kept in this group on the drafts server until
6722 they are due.  You probably don't need to change this.  The default
6723 value is @code{"delayed"}.
6724
6725 @item gnus-delay-header
6726 @vindex gnus-delay-header
6727 The deadline for each article will be stored in a header.  This variable
6728 is a string and gives the header name.  You probably don't need to
6729 change this.  The default value is @code{"X-Gnus-Delayed"}.
6730 @end table
6731
6732 The way delaying works is like this: when you use the
6733 @code{gnus-delay-article} command, you give a certain delay.  Gnus
6734 calculates the deadline of the message and stores it in the
6735 @code{X-Gnus-Delayed} header and puts the message in the
6736 @code{nndraft:delayed} group.
6737
6738 @findex gnus-delay-send-queue
6739 And whenever you get new news, Gnus looks through the group for articles
6740 which are due and sends them.  It uses the @code{gnus-delay-send-queue}
6741 function for this.  By default, this function is added to the hook
6742 @code{gnus-get-new-news-hook}.  But of course, you can change this.
6743 Maybe you want to use the demon to send drafts?  Just tell the demon to
6744 execute the @code{gnus-delay-send-queue} function.
6745
6746 @table @code
6747 @item gnus-delay-initialize
6748 @findex gnus-delay-initialize
6749 By default, this function installs @code{gnus-delay-send-queue} in
6750 @code{gnus-get-new-news-hook}.  But it accepts the optional second
6751 argument @code{no-check}.  If it is non-@code{nil},
6752 @code{gnus-get-new-news-hook} is not changed.  The optional first
6753 argument is ignored.
6754
6755 For example, @code{(gnus-delay-initialize nil t)} means to do nothing.
6756 Presumably, you want to use the demon for sending due delayed articles.
6757 Just don't forget to set that up :-)
6758 @end table
6759
6760 When delaying an article with @kbd{C-c C-j}, Message mode will
6761 automatically add a @code{"Date"} header with the current time.  In
6762 many cases you probably want the @code{"Date"} header to reflect the
6763 time the message is sent instead.  To do this, you have to delete
6764 @code{Date} from @code{message-draft-headers}.
6765
6766
6767 @node Marking Articles
6768 @section Marking Articles
6769 @cindex article marking
6770 @cindex article ticking
6771 @cindex marks
6772
6773 There are several marks you can set on an article.
6774
6775 You have marks that decide the @dfn{readedness} (whoo, neato-keano
6776 neologism ohoy!) of the article.  Alphabetic marks generally mean
6777 @dfn{read}, while non-alphabetic characters generally mean @dfn{unread}.
6778
6779 In addition, you also have marks that do not affect readedness.
6780
6781 @ifinfo
6782 There's a plethora of commands for manipulating these marks.
6783 @end ifinfo
6784
6785 @menu
6786 * Unread Articles::             Marks for unread articles.
6787 * Read Articles::               Marks for read articles.
6788 * Other Marks::                 Marks that do not affect readedness.
6789 * Setting Marks::               How to set and remove marks.
6790 * Generic Marking Commands::    How to customize the marking.
6791 * Setting Process Marks::       How to mark articles for later processing.
6792 @end menu
6793
6794
6795 @node Unread Articles
6796 @subsection Unread Articles
6797
6798 The following marks mark articles as (kinda) unread, in one form or
6799 other.
6800
6801 @table @samp
6802 @item !
6803 @vindex gnus-ticked-mark
6804 Marked as ticked (@code{gnus-ticked-mark}).
6805
6806 @dfn{Ticked articles} are articles that will remain visible always.  If
6807 you see an article that you find interesting, or you want to put off
6808 reading it, or replying to it, until sometime later, you'd typically
6809 tick it.  However, articles can be expired (from news servers by the
6810 news server software, Gnus itself never expires ticked messages), so if
6811 you want to keep an article forever, you'll have to make it persistent
6812 (@pxref{Persistent Articles}).
6813
6814 @item ?
6815 @vindex gnus-dormant-mark
6816 Marked as dormant (@code{gnus-dormant-mark}).
6817
6818 @dfn{Dormant articles} will only appear in the summary buffer if there
6819 are followups to it.  If you want to see them even if they don't have
6820 followups, you can use the @kbd{/ D} command (@pxref{Limiting}).
6821 Otherwise (except for the visibility issue), they are just like ticked
6822 messages.
6823
6824 @item SPACE
6825 @vindex gnus-unread-mark
6826 Marked as unread (@code{gnus-unread-mark}).
6827
6828 @dfn{Unread articles} are articles that haven't been read at all yet.
6829 @end table
6830
6831
6832 @node Read Articles
6833 @subsection Read Articles
6834 @cindex expirable mark
6835
6836 All the following marks mark articles as read.
6837
6838 @table @samp
6839
6840 @item r
6841 @vindex gnus-del-mark
6842 These are articles that the user has marked as read with the @kbd{d}
6843 command manually, more or less (@code{gnus-del-mark}).
6844
6845 @item R
6846 @vindex gnus-read-mark
6847 Articles that have actually been read (@code{gnus-read-mark}).
6848
6849 @item O
6850 @vindex gnus-ancient-mark
6851 Articles that were marked as read in previous sessions and are now
6852 @dfn{old} (@code{gnus-ancient-mark}).
6853
6854 @item K
6855 @vindex gnus-killed-mark
6856 Marked as killed (@code{gnus-killed-mark}).
6857
6858 @item X
6859 @vindex gnus-kill-file-mark
6860 Marked as killed by kill files (@code{gnus-kill-file-mark}).
6861
6862 @item Y
6863 @vindex gnus-low-score-mark
6864 Marked as read by having too low a score (@code{gnus-low-score-mark}).
6865
6866 @item C
6867 @vindex gnus-catchup-mark
6868 Marked as read by a catchup (@code{gnus-catchup-mark}).
6869
6870 @item G
6871 @vindex gnus-canceled-mark
6872 Canceled article (@code{gnus-canceled-mark})
6873
6874 @item F
6875 @vindex gnus-souped-mark
6876 @sc{soup}ed article (@code{gnus-souped-mark}).  @xref{SOUP}.
6877
6878 @item Q
6879 @vindex gnus-sparse-mark
6880 Sparsely reffed article (@code{gnus-sparse-mark}).  @xref{Customizing
6881 Threading}.
6882
6883 @item M
6884 @vindex gnus-duplicate-mark
6885 Article marked as read by duplicate suppression
6886 (@code{gnus-duplicate-mark}).  @xref{Duplicate Suppression}.
6887
6888 @end table
6889
6890 All these marks just mean that the article is marked as read, really.
6891 They are interpreted differently when doing adaptive scoring, though.
6892
6893 One more special mark, though:
6894
6895 @table @samp
6896 @item E
6897 @vindex gnus-expirable-mark
6898 Marked as expirable (@code{gnus-expirable-mark}).
6899
6900 Marking articles as @dfn{expirable} (or have them marked as such
6901 automatically) doesn't make much sense in normal groups---a user doesn't
6902 control expiring of news articles, but in mail groups, for instance,
6903 articles marked as @dfn{expirable} can be deleted by Gnus at
6904 any time.
6905 @end table
6906
6907
6908 @node Other Marks
6909 @subsection Other Marks
6910 @cindex process mark
6911 @cindex bookmarks
6912
6913 There are some marks that have nothing to do with whether the article is
6914 read or not.
6915
6916 @itemize @bullet
6917
6918 @item
6919 You can set a bookmark in the current article.  Say you are reading a
6920 long thesis on cats' urinary tracts, and have to go home for dinner
6921 before you've finished reading the thesis.  You can then set a bookmark
6922 in the article, and Gnus will jump to this bookmark the next time it
6923 encounters the article.  @xref{Setting Marks}.
6924
6925 @item
6926 @vindex gnus-replied-mark
6927 All articles that you have replied to or made a followup to (i.e., have
6928 answered) will be marked with an @samp{A} in the second column
6929 (@code{gnus-replied-mark}).
6930
6931 @item
6932 @vindex gnus-forwarded-mark
6933 All articles that you have forwarded will be marked with an @samp{F} in
6934 the second column (@code{gnus-forwarded-mark}).
6935
6936 @item
6937 @vindex gnus-cached-mark
6938 Articles stored in the article cache will be marked with an @samp{*} in
6939 the second column (@code{gnus-cached-mark}).  @xref{Article Caching}.
6940
6941 @item
6942 @vindex gnus-saved-mark
6943 Articles ``saved'' (in some manner or other; not necessarily
6944 religiously) are marked with an @samp{S} in the second column
6945 (@code{gnus-saved-mark}).
6946
6947 @item
6948 @vindex gnus-recent-mark
6949 Articles that according to the server haven't been shown to the user
6950 before are marked with a @samp{N} in the second column
6951 (@code{gnus-recent-mark}).  Note that not all servers support this
6952 mark, in which case it simply never appears.  Compare with
6953 @code{gnus-unseen-mark}.
6954
6955 @item
6956 @vindex gnus-unseen-mark
6957 Articles that haven't been seen before in Gnus by the user are marked
6958 with a @samp{.} in the second column (@code{gnus-unseen-mark}).
6959 Compare with @code{gnus-recent-mark}.
6960
6961 @item
6962 @vindex gnus-downloaded-mark
6963 When using the Gnus agent (@pxref{Agent Basics}), articles may be
6964 downloaded for unplugged (offline) viewing.  If you are using the
6965 @samp{%O} spec, these articles get the @samp{+} mark in that spec.
6966 (The variable @code{gnus-downloaded-mark} controls which character to
6967 use.)
6968
6969 @item
6970 @vindex gnus-undownloaded-mark
6971 When using the Gnus agent (@pxref{Agent Basics}), some articles might
6972 not have been downloaded.  Such articles cannot be viewed while you
6973 are unplugged (offline).  If you are using the @samp{%O} spec, these
6974 articles get the @samp{-} mark in that spec.  (The variable
6975 @code{gnus-undownloaded-mark} controls which character to use.)
6976
6977 @item
6978 @vindex gnus-downloadable-mark
6979 The Gnus agent (@pxref{Agent Basics}) downloads some articles
6980 automatically, but it is also possible to explicitly mark articles for
6981 download, even if they would not be downloaded automatically.  Such
6982 explicitly-marked articles get the @samp{%} mark in the first column.
6983 (The variable @code{gnus-downloadable-mark} controls which character to
6984 use.)
6985
6986 @item
6987 @vindex gnus-not-empty-thread-mark
6988 @vindex gnus-empty-thread-mark
6989 If the @samp{%e} spec is used, the presence of threads or not will be
6990 marked with @code{gnus-not-empty-thread-mark} and
6991 @code{gnus-empty-thread-mark} in the third column, respectively.
6992
6993 @item
6994 @vindex gnus-process-mark
6995 Finally we have the @dfn{process mark} (@code{gnus-process-mark}).  A
6996 variety of commands react to the presence of the process mark.  For
6997 instance, @kbd{X u} (@code{gnus-uu-decode-uu}) will uudecode and view
6998 all articles that have been marked with the process mark.  Articles
6999 marked with the process mark have a @samp{#} in the second column.
7000
7001 @end itemize
7002
7003 You might have noticed that most of these ``non-readedness'' marks
7004 appear in the second column by default.  So if you have a cached, saved,
7005 replied article that you have process-marked, what will that look like?
7006
7007 Nothing much.  The precedence rules go as follows: process -> cache ->
7008 replied -> saved.  So if the article is in the cache and is replied,
7009 you'll only see the cache mark and not the replied mark.
7010
7011
7012 @node Setting Marks
7013 @subsection Setting Marks
7014 @cindex setting marks
7015
7016 All the marking commands understand the numeric prefix.
7017
7018 @table @kbd
7019 @item M c
7020 @itemx M-u
7021 @kindex M c (Summary)
7022 @kindex M-u (Summary)
7023 @findex gnus-summary-clear-mark-forward
7024 @cindex mark as unread
7025 Clear all readedness-marks from the current article
7026 (@code{gnus-summary-clear-mark-forward}).  In other words, mark the
7027 article as unread.
7028
7029 @item M t
7030 @itemx !
7031 @kindex ! (Summary)
7032 @kindex M t (Summary)
7033 @findex gnus-summary-tick-article-forward
7034 Tick the current article (@code{gnus-summary-tick-article-forward}).
7035 @xref{Article Caching}.
7036
7037 @item M ?
7038 @itemx ?
7039 @kindex ? (Summary)
7040 @kindex M ? (Summary)
7041 @findex gnus-summary-mark-as-dormant
7042 Mark the current article as dormant
7043 (@code{gnus-summary-mark-as-dormant}).  @xref{Article Caching}.
7044
7045 @item M d
7046 @itemx d
7047 @kindex M d (Summary)
7048 @kindex d (Summary)
7049 @findex gnus-summary-mark-as-read-forward
7050 Mark the current article as read
7051 (@code{gnus-summary-mark-as-read-forward}).
7052
7053 @item D
7054 @kindex D (Summary)
7055 @findex gnus-summary-mark-as-read-backward
7056 Mark the current article as read and move point to the previous line
7057 (@code{gnus-summary-mark-as-read-backward}).
7058
7059 @item M k
7060 @itemx k
7061 @kindex k (Summary)
7062 @kindex M k (Summary)
7063 @findex gnus-summary-kill-same-subject-and-select
7064 Mark all articles that have the same subject as the current one as read,
7065 and then select the next unread article
7066 (@code{gnus-summary-kill-same-subject-and-select}).
7067
7068 @item M K
7069 @itemx C-k
7070 @kindex M K (Summary)
7071 @kindex C-k (Summary)
7072 @findex gnus-summary-kill-same-subject
7073 Mark all articles that have the same subject as the current one as read
7074 (@code{gnus-summary-kill-same-subject}).
7075
7076 @item M C
7077 @kindex M C (Summary)
7078 @findex gnus-summary-catchup
7079 @c @icon{gnus-summary-catchup}
7080 Mark all unread articles as read (@code{gnus-summary-catchup}).
7081
7082 @item M C-c
7083 @kindex M C-c (Summary)
7084 @findex gnus-summary-catchup-all
7085 Mark all articles in the group as read---even the ticked and dormant
7086 articles (@code{gnus-summary-catchup-all}).
7087
7088 @item M H
7089 @kindex M H (Summary)
7090 @findex gnus-summary-catchup-to-here
7091 Catchup the current group to point (before the point)
7092 (@code{gnus-summary-catchup-to-here}).
7093
7094 @item M h
7095 @kindex M h (Summary)
7096 @findex gnus-summary-catchup-from-here
7097 Catchup the current group from point (after the point)
7098 (@code{gnus-summary-catchup-from-here}).
7099
7100 @item C-w
7101 @kindex C-w (Summary)
7102 @findex gnus-summary-mark-region-as-read
7103 Mark all articles between point and mark as read
7104 (@code{gnus-summary-mark-region-as-read}).
7105
7106 @item M V k
7107 @kindex M V k (Summary)
7108 @findex gnus-summary-kill-below
7109 Kill all articles with scores below the default score (or below the
7110 numeric prefix) (@code{gnus-summary-kill-below}).
7111
7112 @item M e
7113 @itemx E
7114 @kindex M e (Summary)
7115 @kindex E (Summary)
7116 @findex gnus-summary-mark-as-expirable
7117 Mark the current article as expirable
7118 (@code{gnus-summary-mark-as-expirable}).
7119
7120 @item M b
7121 @kindex M b (Summary)
7122 @findex gnus-summary-set-bookmark
7123 Set a bookmark in the current article
7124 (@code{gnus-summary-set-bookmark}).
7125
7126 @item M B
7127 @kindex M B (Summary)
7128 @findex gnus-summary-remove-bookmark
7129 Remove the bookmark from the current article
7130 (@code{gnus-summary-remove-bookmark}).
7131
7132 @item M V c
7133 @kindex M V c (Summary)
7134 @findex gnus-summary-clear-above
7135 Clear all marks from articles with scores over the default score (or
7136 over the numeric prefix) (@code{gnus-summary-clear-above}).
7137
7138 @item M V u
7139 @kindex M V u (Summary)
7140 @findex gnus-summary-tick-above
7141 Tick all articles with scores over the default score (or over the
7142 numeric prefix) (@code{gnus-summary-tick-above}).
7143
7144 @item M V m
7145 @kindex M V m (Summary)
7146 @findex gnus-summary-mark-above
7147 Prompt for a mark, and mark all articles with scores over the default
7148 score (or over the numeric prefix) with this mark
7149 (@code{gnus-summary-clear-above}).
7150 @end table
7151
7152 @vindex gnus-summary-goto-unread
7153 The @code{gnus-summary-goto-unread} variable controls what action should
7154 be taken after setting a mark.  If non-@code{nil}, point will move to
7155 the next/previous unread article.  If @code{nil}, point will just move
7156 one line up or down.  As a special case, if this variable is
7157 @code{never}, all the marking commands as well as other commands (like
7158 @kbd{SPACE}) will move to the next article, whether it is unread or not.
7159 The default is @code{t}.
7160
7161
7162 @node Generic Marking Commands
7163 @subsection Generic Marking Commands
7164
7165 Some people would like the command that ticks an article (@kbd{!}) go to
7166 the next article.  Others would like it to go to the next unread
7167 article.  Yet others would like it to stay on the current article.  And
7168 even though I haven't heard of anybody wanting it to go to the
7169 previous (unread) article, I'm sure there are people that want that as
7170 well.
7171
7172 Multiply these five behaviors with five different marking commands, and
7173 you get a potentially complex set of variable to control what each
7174 command should do.
7175
7176 To sidestep that mess, Gnus provides commands that do all these
7177 different things.  They can be found on the @kbd{M M} map in the summary
7178 buffer.  Type @kbd{M M C-h} to see them all---there are too many of them
7179 to list in this manual.
7180
7181 While you can use these commands directly, most users would prefer
7182 altering the summary mode keymap.  For instance, if you would like the
7183 @kbd{!} command to go to the next article instead of the next unread
7184 article, you could say something like:
7185
7186 @lisp
7187 @group
7188 (add-hook 'gnus-summary-mode-hook 'my-alter-summary-map)
7189 (defun my-alter-summary-map ()
7190   (local-set-key "!" 'gnus-summary-put-mark-as-ticked-next))
7191 @end group
7192 @end lisp
7193
7194 @noindent
7195 or
7196
7197 @lisp
7198 (defun my-alter-summary-map ()
7199   (local-set-key "!" "MM!n"))
7200 @end lisp
7201
7202
7203 @node Setting Process Marks
7204 @subsection Setting Process Marks
7205 @cindex setting process marks
7206
7207 Process marks are displayed as @code{#} in the summary buffer, and are
7208 used for marking articles in such a way that other commands will
7209 process these articles.  For instance, if you process mark four
7210 articles and then use the @kbd{*} command, Gnus will enter these four
7211 articles into the cache.  For more information,
7212 @pxref{Process/Prefix}.
7213
7214 @table @kbd
7215
7216 @item M P p
7217 @itemx #
7218 @kindex # (Summary)
7219 @kindex M P p (Summary)
7220 @findex gnus-summary-mark-as-processable
7221 Mark the current article with the process mark
7222 (@code{gnus-summary-mark-as-processable}).
7223 @findex gnus-summary-unmark-as-processable
7224
7225 @item M P u
7226 @itemx M-#
7227 @kindex M P u (Summary)
7228 @kindex M-# (Summary)
7229 Remove the process mark, if any, from the current article
7230 (@code{gnus-summary-unmark-as-processable}).
7231
7232 @item M P U
7233 @kindex M P U (Summary)
7234 @findex gnus-summary-unmark-all-processable
7235 Remove the process mark from all articles
7236 (@code{gnus-summary-unmark-all-processable}).
7237
7238 @item M P i
7239 @kindex M P i (Summary)
7240 @findex gnus-uu-invert-processable
7241 Invert the list of process marked articles
7242 (@code{gnus-uu-invert-processable}).
7243
7244 @item M P R
7245 @kindex M P R (Summary)
7246 @findex gnus-uu-mark-by-regexp
7247 Mark articles that have a @code{Subject} header that matches a regular
7248 expression (@code{gnus-uu-mark-by-regexp}).
7249
7250 @item M P G
7251 @kindex M P G (Summary)
7252 @findex gnus-uu-unmark-by-regexp
7253 Unmark articles that have a @code{Subject} header that matches a regular
7254 expression (@code{gnus-uu-unmark-by-regexp}).
7255
7256 @item M P r
7257 @kindex M P r (Summary)
7258 @findex gnus-uu-mark-region
7259 Mark articles in region (@code{gnus-uu-mark-region}).
7260
7261 @item M P g
7262 @kindex M P g (Summary)
7263 @findex gnus-uu-unmark-region
7264 Unmark articles in region (@code{gnus-uu-unmark-region}).
7265
7266 @item M P t
7267 @kindex M P t (Summary)
7268 @findex gnus-uu-mark-thread
7269 Mark all articles in the current (sub)thread
7270 (@code{gnus-uu-mark-thread}).
7271
7272 @item M P T
7273 @kindex M P T (Summary)
7274 @findex gnus-uu-unmark-thread
7275 Unmark all articles in the current (sub)thread
7276 (@code{gnus-uu-unmark-thread}).
7277
7278 @item M P v
7279 @kindex M P v (Summary)
7280 @findex gnus-uu-mark-over
7281 Mark all articles that have a score above the prefix argument
7282 (@code{gnus-uu-mark-over}).
7283
7284 @item M P s
7285 @kindex M P s (Summary)
7286 @findex gnus-uu-mark-series
7287 Mark all articles in the current series (@code{gnus-uu-mark-series}).
7288
7289 @item M P S
7290 @kindex M P S (Summary)
7291 @findex gnus-uu-mark-sparse
7292 Mark all series that have already had some articles marked
7293 (@code{gnus-uu-mark-sparse}).
7294
7295 @item M P a
7296 @kindex M P a (Summary)
7297 @findex gnus-uu-mark-all
7298 Mark all articles in series order (@code{gnus-uu-mark-all}).
7299
7300 @item M P b
7301 @kindex M P b (Summary)
7302 @findex gnus-uu-mark-buffer
7303 Mark all articles in the buffer in the order they appear
7304 (@code{gnus-uu-mark-buffer}).
7305
7306 @item M P k
7307 @kindex M P k (Summary)
7308 @findex gnus-summary-kill-process-mark
7309 Push the current process mark set onto the stack and unmark all articles
7310 (@code{gnus-summary-kill-process-mark}).
7311
7312 @item M P y
7313 @kindex M P y (Summary)
7314 @findex gnus-summary-yank-process-mark
7315 Pop the previous process mark set from the stack and restore it
7316 (@code{gnus-summary-yank-process-mark}).
7317
7318 @item M P w
7319 @kindex M P w (Summary)
7320 @findex gnus-summary-save-process-mark
7321 Push the current process mark set onto the stack
7322 (@code{gnus-summary-save-process-mark}).
7323
7324 @end table
7325
7326 Also see the @kbd{&} command in @ref{Searching for Articles}, for how to
7327 set process marks based on article body contents.
7328
7329
7330 @node Limiting
7331 @section Limiting
7332 @cindex limiting
7333
7334 It can be convenient to limit the summary buffer to just show some
7335 subset of the articles currently in the group.  The effect most limit
7336 commands have is to remove a few (or many) articles from the summary
7337 buffer.
7338
7339 Limiting commands work on subsets of the articles already fetched from
7340 the servers.  These commands don't query the server for additional
7341 articles.
7342
7343 @table @kbd
7344
7345 @item / /
7346 @itemx / s
7347 @kindex / / (Summary)
7348 @findex gnus-summary-limit-to-subject
7349 Limit the summary buffer to articles that match some subject
7350 (@code{gnus-summary-limit-to-subject}).  If given a prefix, exclude
7351 matching articles.
7352
7353 @item / a
7354 @kindex / a (Summary)
7355 @findex gnus-summary-limit-to-author
7356 Limit the summary buffer to articles that match some author
7357 (@code{gnus-summary-limit-to-author}).  If given a prefix, exclude
7358 matching articles.
7359
7360 @item / R
7361 @kindex / R (Summary)
7362 @findex gnus-summary-limit-to-recipient
7363 Limit the summary buffer to articles that match some recipient
7364 (@code{gnus-summary-limit-to-recipient}).  If given a prefix, exclude
7365 matching articles.
7366
7367 @item / A
7368 @kindex / A (Summary)
7369 @findex gnus-summary-limit-to-address
7370 Limit the summary buffer to articles in which contents of From, To or Cc
7371 header match a given address (@code{gnus-summary-limit-to-address}).  If
7372 given a prefix, exclude matching articles.
7373
7374 @item / S
7375 @kindex / S (Summary)
7376 @findex gnus-summary-limit-to-singletons
7377 Limit the summary buffer to articles that aren't part of any displayed
7378 threads (@code{gnus-summary-limit-to-singletons}).  If given a prefix,
7379 limit to articles that are part of displayed threads.
7380
7381 @item / x
7382 @kindex / x (Summary)
7383 @findex gnus-summary-limit-to-extra
7384 Limit the summary buffer to articles that match one of the ``extra''
7385 headers (@pxref{To From Newsgroups})
7386 (@code{gnus-summary-limit-to-extra}).  If given a prefix, exclude
7387 matching articles.
7388
7389 @item / u
7390 @itemx x
7391 @kindex / u (Summary)
7392 @kindex x (Summary)
7393 @findex gnus-summary-limit-to-unread
7394 Limit the summary buffer to articles not marked as read
7395 (@code{gnus-summary-limit-to-unread}).  If given a prefix, limit the
7396 buffer to articles strictly unread.  This means that ticked and
7397 dormant articles will also be excluded.
7398
7399 @item / m
7400 @kindex / m (Summary)
7401 @findex gnus-summary-limit-to-marks
7402 Ask for a mark and then limit to all articles that have been marked
7403 with that mark (@code{gnus-summary-limit-to-marks}).
7404
7405 @item / t
7406 @kindex / t (Summary)
7407 @findex gnus-summary-limit-to-age
7408 Ask for a number and then limit the summary buffer to articles older than (or equal to) that number of days
7409 (@code{gnus-summary-limit-to-age}).  If given a prefix, limit to
7410 articles younger than that number of days.
7411
7412 @item / n
7413 @kindex / n (Summary)
7414 @findex gnus-summary-limit-to-articles
7415 With prefix @samp{n}, limit the summary buffer to the next @samp{n}
7416 articles.  If not given a prefix, use the process marked articles
7417 instead.  (@code{gnus-summary-limit-to-articles}).
7418
7419 @item / w
7420 @kindex / w (Summary)
7421 @findex gnus-summary-pop-limit
7422 Pop the previous limit off the stack and restore it
7423 (@code{gnus-summary-pop-limit}).  If given a prefix, pop all limits off
7424 the stack.
7425
7426 @item / .
7427 @kindex / . (Summary)
7428 @findex gnus-summary-limit-to-unseen
7429 Limit the summary buffer to the unseen articles
7430 (@code{gnus-summary-limit-to-unseen}).
7431
7432 @item / v
7433 @kindex / v (Summary)
7434 @findex gnus-summary-limit-to-score
7435 Limit the summary buffer to articles that have a score at or above some
7436 score (@code{gnus-summary-limit-to-score}).
7437
7438 @item / p
7439 @kindex / p (Summary)
7440 @findex gnus-summary-limit-to-display-predicate
7441 Limit the summary buffer to articles that satisfy the @code{display}
7442 group parameter predicate
7443 (@code{gnus-summary-limit-to-display-predicate}).  @xref{Group
7444 Parameters}, for more on this predicate.
7445
7446 @item / r
7447 @kindex / r (Summary)
7448 @findex gnus-summary-limit-to-replied
7449 Limit the summary buffer to replied articles
7450 (@code{gnus-summary-limit-to-replied}).  If given a prefix, exclude
7451 replied articles.
7452
7453 @item / E
7454 @itemx M S
7455 @kindex M S (Summary)
7456 @kindex / E (Summary)
7457 @findex gnus-summary-limit-include-expunged
7458 Include all expunged articles in the limit
7459 (@code{gnus-summary-limit-include-expunged}).
7460
7461 @item / D
7462 @kindex / D (Summary)
7463 @findex gnus-summary-limit-include-dormant
7464 Include all dormant articles in the limit
7465 (@code{gnus-summary-limit-include-dormant}).
7466
7467 @item / *
7468 @kindex / * (Summary)
7469 @findex gnus-summary-limit-include-cached
7470 Include all cached articles in the limit
7471 (@code{gnus-summary-limit-include-cached}).
7472
7473 @item / d
7474 @kindex / d (Summary)
7475 @findex gnus-summary-limit-exclude-dormant
7476 Exclude all dormant articles from the limit
7477 (@code{gnus-summary-limit-exclude-dormant}).
7478
7479 @item / M
7480 @kindex / M (Summary)
7481 @findex gnus-summary-limit-exclude-marks
7482 Exclude all marked articles (@code{gnus-summary-limit-exclude-marks}).
7483
7484 @item / T
7485 @kindex / T (Summary)
7486 @findex gnus-summary-limit-include-thread
7487 Include all the articles in the current thread in the limit.
7488
7489 @item / c
7490 @kindex / c (Summary)
7491 @findex gnus-summary-limit-exclude-childless-dormant
7492 Exclude all dormant articles that have no children from the limit@*
7493 (@code{gnus-summary-limit-exclude-childless-dormant}).
7494
7495 @item / C
7496 @kindex / C (Summary)
7497 @findex gnus-summary-limit-mark-excluded-as-read
7498 Mark all excluded unread articles as read
7499 (@code{gnus-summary-limit-mark-excluded-as-read}).  If given a prefix,
7500 also mark excluded ticked and dormant articles as read.
7501
7502 @item / b
7503 @kindex / b (Summary)
7504 @findex gnus-summary-limit-to-bodies
7505 Limit the summary buffer to articles that have bodies that match a
7506 certain regexp (@code{gnus-summary-limit-to-bodies}).  If given a
7507 prefix, reverse the limit.  This command is quite slow since it
7508 requires selecting each article to find the matches.
7509
7510 @item / h
7511 @kindex / h (Summary)
7512 @findex gnus-summary-limit-to-headers
7513 Like the previous command, only limit to headers instead
7514 (@code{gnus-summary-limit-to-headers}).
7515
7516 @end table
7517
7518
7519 The following commands aren't limiting commands, but use the @kbd{/}
7520 prefix as well.
7521
7522 @table @kbd
7523 @item / N
7524 @kindex / N (Summary)
7525 @findex gnus-summary-insert-new-articles
7526 Insert all new articles in the summary buffer.  It scans for new emails
7527 if @var{back-end}@code{-get-new-mail} is non-@code{nil}.
7528
7529 @item / o
7530 @kindex / o (Summary)
7531 @findex gnus-summary-insert-old-articles
7532 Insert all old articles in the summary buffer.  If given a numbered
7533 prefix, fetch this number of articles.
7534
7535 @end table
7536
7537
7538 @node Threading
7539 @section Threading
7540 @cindex threading
7541 @cindex article threading
7542
7543 Gnus threads articles by default.  @dfn{To thread} is to put responses
7544 to articles directly after the articles they respond to---in a
7545 hierarchical fashion.
7546
7547 Threading is done by looking at the @code{References} headers of the
7548 articles.  In a perfect world, this would be enough to build pretty
7549 trees, but unfortunately, the @code{References} header is often broken
7550 or simply missing.  Weird news propagation exacerbates the problem,
7551 so one has to employ other heuristics to get pleasing results.  A
7552 plethora of approaches exists, as detailed in horrible detail in
7553 @ref{Customizing Threading}.
7554
7555 First, a quick overview of the concepts:
7556
7557 @table @dfn
7558 @item root
7559 The top-most article in a thread; the first article in the thread.
7560
7561 @item thread
7562 A tree-like article structure.
7563
7564 @item sub-thread
7565 A small(er) section of this tree-like structure.
7566
7567 @item loose threads
7568 Threads often lose their roots due to article expiry, or due to the root
7569 already having been read in a previous session, and not displayed in the
7570 summary buffer.  We then typically have many sub-threads that really
7571 belong to one thread, but are without connecting roots.  These are
7572 called loose threads.
7573
7574 @item thread gathering
7575 An attempt to gather loose threads into bigger threads.
7576
7577 @item sparse threads
7578 A thread where the missing articles have been ``guessed'' at, and are
7579 displayed as empty lines in the summary buffer.
7580
7581 @end table
7582
7583
7584 @menu
7585 * Customizing Threading::       Variables you can change to affect the threading.
7586 * Thread Commands::             Thread based commands in the summary buffer.
7587 @end menu
7588
7589
7590 @node Customizing Threading
7591 @subsection Customizing Threading
7592 @cindex customizing threading
7593
7594 @menu
7595 * Loose Threads::               How Gnus gathers loose threads into bigger threads.
7596 * Filling In Threads::          Making the threads displayed look fuller.
7597 * More Threading::              Even more variables for fiddling with threads.
7598 * Low-Level Threading::         You thought it was over@dots{} but you were wrong!
7599 @end menu
7600
7601
7602 @node Loose Threads
7603 @subsubsection Loose Threads
7604 @cindex <
7605 @cindex >
7606 @cindex loose threads
7607
7608 @table @code
7609 @item gnus-summary-make-false-root
7610 @vindex gnus-summary-make-false-root
7611 If non-@code{nil}, Gnus will gather all loose subtrees into one big tree
7612 and create a dummy root at the top.  (Wait a minute.  Root at the top?
7613 Yup.)  Loose subtrees occur when the real root has expired, or you've
7614 read or killed the root in a previous session.
7615
7616 When there is no real root of a thread, Gnus will have to fudge
7617 something.  This variable says what fudging method Gnus should use.
7618 There are four possible values:
7619
7620 @iftex
7621 @iflatex
7622 \gnusfigure{The Summary Buffer}{390}{
7623 \put(0,0){\epsfig{figure=ps/summary-adopt,width=7.5cm}}
7624 \put(445,0){\makebox(0,0)[br]{\epsfig{figure=ps/summary-empty,width=7.5cm}}}
7625 \put(0,400){\makebox(0,0)[tl]{\epsfig{figure=ps/summary-none,width=7.5cm}}}
7626 \put(445,400){\makebox(0,0)[tr]{\epsfig{figure=ps/summary-dummy,width=7.5cm}}}
7627 }
7628 @end iflatex
7629 @end iftex
7630
7631 @cindex adopting articles
7632
7633 @table @code
7634
7635 @item adopt
7636 Gnus will make the first of the orphaned articles the parent.  This
7637 parent will adopt all the other articles.  The adopted articles will be
7638 marked as such by pointy brackets (@samp{<>}) instead of the standard
7639 square brackets (@samp{[]}).  This is the default method.
7640
7641 @item dummy
7642 @vindex gnus-summary-dummy-line-format
7643 @vindex gnus-summary-make-false-root-always
7644 Gnus will create a dummy summary line that will pretend to be the
7645 parent.  This dummy line does not correspond to any real article, so
7646 selecting it will just select the first real article after the dummy
7647 article.  @code{gnus-summary-dummy-line-format} is used to specify the
7648 format of the dummy roots.  It accepts only one format spec:  @samp{S},
7649 which is the subject of the article.  @xref{Formatting Variables}.
7650 If you want all threads to have a dummy root, even the non-gathered
7651 ones, set @code{gnus-summary-make-false-root-always} to @code{t}.
7652
7653 @item empty
7654 Gnus won't actually make any article the parent, but simply leave the
7655 subject field of all orphans except the first empty.  (Actually, it will
7656 use @code{gnus-summary-same-subject} as the subject (@pxref{Summary
7657 Buffer Format}).)
7658
7659 @item none
7660 Don't make any article parent at all.  Just gather the threads and
7661 display them after one another.
7662
7663 @item nil
7664 Don't gather loose threads.
7665 @end table
7666
7667 @item gnus-summary-gather-subject-limit
7668 @vindex gnus-summary-gather-subject-limit
7669 Loose threads are gathered by comparing subjects of articles.  If this
7670 variable is @code{nil}, Gnus requires an exact match between the
7671 subjects of the loose threads before gathering them into one big
7672 super-thread.  This might be too strict a requirement, what with the
7673 presence of stupid newsreaders that chop off long subject lines.  If
7674 you think so, set this variable to, say, 20 to require that only the
7675 first 20 characters of the subjects have to match.  If you set this
7676 variable to a really low number, you'll find that Gnus will gather
7677 everything in sight into one thread, which isn't very helpful.
7678
7679 @cindex fuzzy article gathering
7680 If you set this variable to the special value @code{fuzzy}, Gnus will
7681 use a fuzzy string comparison algorithm on the subjects (@pxref{Fuzzy
7682 Matching}).
7683
7684 @item gnus-simplify-subject-fuzzy-regexp
7685 @vindex gnus-simplify-subject-fuzzy-regexp
7686 This can either be a regular expression or list of regular expressions
7687 that match strings that will be removed from subjects if fuzzy subject
7688 simplification is used.
7689
7690 @item gnus-simplify-ignored-prefixes
7691 @vindex gnus-simplify-ignored-prefixes
7692 If you set @code{gnus-summary-gather-subject-limit} to something as low
7693 as 10, you might consider setting this variable to something sensible:
7694
7695 @c Written by Michael Ernst <mernst@cs.rice.edu>
7696 @lisp
7697 (setq gnus-simplify-ignored-prefixes
7698       (concat
7699        "\\`\\[?\\("
7700        (mapconcat
7701         'identity
7702         '("looking"
7703           "wanted" "followup" "summary\\( of\\)?"
7704           "help" "query" "problem" "question"
7705           "answer" "reference" "announce"
7706           "How can I" "How to" "Comparison of"
7707           ;; ...
7708           )
7709         "\\|")
7710        "\\)\\s *\\("
7711        (mapconcat 'identity
7712                   '("for" "for reference" "with" "about")
7713                   "\\|")
7714        "\\)?\\]?:?[ \t]*"))
7715 @end lisp
7716
7717 All words that match this regexp will be removed before comparing two
7718 subjects.
7719
7720 @item gnus-simplify-subject-functions
7721 @vindex gnus-simplify-subject-functions
7722 If non-@code{nil}, this variable overrides
7723 @code{gnus-summary-gather-subject-limit}.  This variable should be a
7724 list of functions to apply to the @code{Subject} string iteratively to
7725 arrive at the simplified version of the string.
7726
7727 Useful functions to put in this list include:
7728
7729 @table @code
7730 @item gnus-simplify-subject-re
7731 @findex gnus-simplify-subject-re
7732 Strip the leading @samp{Re:}.
7733
7734 @item gnus-simplify-subject-fuzzy
7735 @findex gnus-simplify-subject-fuzzy
7736 Simplify fuzzily.
7737
7738 @item gnus-simplify-whitespace
7739 @findex gnus-simplify-whitespace
7740 Remove excessive whitespace.
7741
7742 @item gnus-simplify-all-whitespace
7743 @findex gnus-simplify-all-whitespace
7744 Remove all whitespace.
7745 @end table
7746
7747 You may also write your own functions, of course.
7748
7749
7750 @item gnus-summary-gather-exclude-subject
7751 @vindex gnus-summary-gather-exclude-subject
7752 Since loose thread gathering is done on subjects only, that might lead
7753 to many false hits, especially with certain common subjects like
7754 @samp{} and @samp{(none)}.  To make the situation slightly better,
7755 you can use the regexp @code{gnus-summary-gather-exclude-subject} to say
7756 what subjects should be excluded from the gathering process.@*
7757 The default is @samp{^ *$\\|^(none)$}.
7758
7759 @item gnus-summary-thread-gathering-function
7760 @vindex gnus-summary-thread-gathering-function
7761 Gnus gathers threads by looking at @code{Subject} headers.  This means
7762 that totally unrelated articles may end up in the same ``thread'', which
7763 is confusing.  An alternate approach is to look at all the
7764 @code{Message-ID}s in all the @code{References} headers to find matches.
7765 This will ensure that no gathered threads ever include unrelated
7766 articles, but it also means that people who have posted with broken
7767 newsreaders won't be gathered properly.  The choice is yours---plague or
7768 cholera:
7769
7770 @table @code
7771 @item gnus-gather-threads-by-subject
7772 @findex gnus-gather-threads-by-subject
7773 This function is the default gathering function and looks at
7774 @code{Subject}s exclusively.
7775
7776 @item gnus-gather-threads-by-references
7777 @findex gnus-gather-threads-by-references
7778 This function looks at @code{References} headers exclusively.
7779 @end table
7780
7781 If you want to test gathering by @code{References}, you could say
7782 something like:
7783
7784 @lisp
7785 (setq gnus-summary-thread-gathering-function
7786       'gnus-gather-threads-by-references)
7787 @end lisp
7788
7789 @end table
7790
7791
7792 @node Filling In Threads
7793 @subsubsection Filling In Threads
7794
7795 @table @code
7796 @item gnus-fetch-old-headers
7797 @vindex gnus-fetch-old-headers
7798 If non-@code{nil}, Gnus will attempt to build old threads by fetching
7799 more old headers---headers to articles marked as read.  If you would
7800 like to display as few summary lines as possible, but still connect as
7801 many loose threads as possible, you should set this variable to
7802 @code{some} or a number.  If you set it to a number, no more than that
7803 number of extra old headers will be fetched.  In either case, fetching
7804 old headers only works if the back end you are using carries overview
7805 files---this would normally be @code{nntp}, @code{nnspool},
7806 @code{nnml}, and @code{nnmaildir}.  Also remember that if the root of
7807 the thread has been expired by the server, there's not much Gnus can
7808 do about that.
7809
7810 This variable can also be set to @code{invisible}.  This won't have any
7811 visible effects, but is useful if you use the @kbd{A T} command a lot
7812 (@pxref{Finding the Parent}).
7813
7814 The server has to support @acronym{NOV} for any of this to work.
7815
7816 @cindex Gmane, gnus-fetch-old-headers
7817 This feature can seriously impact performance it ignores all locally
7818 cached header entries.  Setting it to @code{t} for groups for a server
7819 that doesn't expire articles (such as news.gmane.org), leads to very
7820 slow summary generation.
7821
7822 @item gnus-fetch-old-ephemeral-headers
7823 @vindex gnus-fetch-old-ephemeral-headers
7824 Same as @code{gnus-fetch-old-headers}, but only used for ephemeral
7825 newsgroups.
7826
7827 @item gnus-build-sparse-threads
7828 @vindex gnus-build-sparse-threads
7829 Fetching old headers can be slow.  A low-rent similar effect can be
7830 gotten by setting this variable to @code{some}.  Gnus will then look at
7831 the complete @code{References} headers of all articles and try to string
7832 together articles that belong in the same thread.  This will leave
7833 @dfn{gaps} in the threading display where Gnus guesses that an article
7834 is missing from the thread.  (These gaps appear like normal summary
7835 lines.  If you select a gap, Gnus will try to fetch the article in
7836 question.)  If this variable is @code{t}, Gnus will display all these
7837 ``gaps'' without regard for whether they are useful for completing the
7838 thread or not.  Finally, if this variable is @code{more}, Gnus won't cut
7839 off sparse leaf nodes that don't lead anywhere.  This variable is
7840 @code{nil} by default.
7841
7842 @item gnus-read-all-available-headers
7843 @vindex gnus-read-all-available-headers
7844 This is a rather obscure variable that few will find useful.  It's
7845 intended for those non-news newsgroups where the back end has to fetch
7846 quite a lot to present the summary buffer, and where it's impossible to
7847 go back to parents of articles.  This is mostly the case in the
7848 web-based groups, like the @code{nnultimate} groups.
7849
7850 If you don't use those, then it's safe to leave this as the default
7851 @code{nil}.  If you want to use this variable, it should be a regexp
7852 that matches the group name, or @code{t} for all groups.
7853
7854 @end table
7855
7856
7857 @node More Threading
7858 @subsubsection More Threading
7859
7860 @table @code
7861 @item gnus-show-threads
7862 @vindex gnus-show-threads
7863 If this variable is @code{nil}, no threading will be done, and all of
7864 the rest of the variables here will have no effect.  Turning threading
7865 off will speed group selection up a bit, but it is sure to make reading
7866 slower and more awkward.
7867
7868 @item gnus-thread-hide-subtree
7869 @vindex gnus-thread-hide-subtree
7870 If non-@code{nil}, all threads will be hidden when the summary buffer is
7871 generated.
7872
7873 This can also be a predicate specifier (@pxref{Predicate Specifiers}).
7874 Available predicates are @code{gnus-article-unread-p} and
7875 @code{gnus-article-unseen-p}.
7876
7877 Here's an example:
7878
7879 @lisp
7880 (setq gnus-thread-hide-subtree
7881       '(or gnus-article-unread-p
7882            gnus-article-unseen-p))
7883 @end lisp
7884
7885 (It's a pretty nonsensical example, since all unseen articles are also
7886 unread, but you get my drift.)
7887
7888
7889 @item gnus-thread-expunge-below
7890 @vindex gnus-thread-expunge-below
7891 All threads that have a total score (as defined by
7892 @code{gnus-thread-score-function}) less than this number will be
7893 expunged.  This variable is @code{nil} by default, which means that no
7894 threads are expunged.
7895
7896 @item gnus-thread-hide-killed
7897 @vindex gnus-thread-hide-killed
7898 if you kill a thread and this variable is non-@code{nil}, the subtree
7899 will be hidden.
7900
7901 @item gnus-thread-ignore-subject
7902 @vindex gnus-thread-ignore-subject
7903 Sometimes somebody changes the subject in the middle of a thread.  If
7904 this variable is non-@code{nil}, which is the default, the subject
7905 change is ignored.  If it is @code{nil}, a change in the subject will
7906 result in a new thread.
7907
7908 @item gnus-thread-indent-level
7909 @vindex gnus-thread-indent-level
7910 This is a number that says how much each sub-thread should be indented.
7911 The default is 4.
7912
7913 @item gnus-sort-gathered-threads-function
7914 @vindex gnus-sort-gathered-threads-function
7915 Sometimes, particularly with mailing lists, the order in which mails
7916 arrive locally is not necessarily the same as the order in which they
7917 arrived on the mailing list.  Consequently, when sorting sub-threads
7918 using the default @code{gnus-thread-sort-by-number}, responses can end
7919 up appearing before the article to which they are responding to.
7920 Setting this variable to an alternate value
7921 (e.g. @code{gnus-thread-sort-by-date}), in a group's parameters or in an
7922 appropriate hook (e.g. @code{gnus-summary-generate-hook}) can produce a
7923 more logical sub-thread ordering in such instances.
7924
7925 @end table
7926
7927
7928 @node Low-Level Threading
7929 @subsubsection Low-Level Threading
7930
7931 @table @code
7932
7933 @item gnus-parse-headers-hook
7934 @vindex gnus-parse-headers-hook
7935 Hook run before parsing any headers.
7936
7937 @item gnus-alter-header-function
7938 @vindex gnus-alter-header-function
7939 If non-@code{nil}, this function will be called to allow alteration of
7940 article header structures.  The function is called with one parameter,
7941 the article header vector, which it may alter in any way.  For instance,
7942 if you have a mail-to-news gateway which alters the @code{Message-ID}s
7943 in systematic ways (by adding prefixes and such), you can use this
7944 variable to un-scramble the @code{Message-ID}s so that they are more
7945 meaningful.  Here's one example:
7946
7947 @lisp
7948 (setq gnus-alter-header-function 'my-alter-message-id)
7949
7950 (defun my-alter-message-id (header)
7951   (let ((id (mail-header-id header)))
7952     (when (string-match
7953            "\\(<[^<>@@]*\\)\\.?cygnus\\..*@@\\([^<>@@]*>\\)" id)
7954       (mail-header-set-id
7955        (concat (match-string 1 id) "@@" (match-string 2 id))
7956        header))))
7957 @end lisp
7958
7959 @end table
7960
7961
7962 @node Thread Commands
7963 @subsection Thread Commands
7964 @cindex thread commands
7965
7966 @table @kbd
7967
7968 @item T k
7969 @itemx C-M-k
7970 @kindex T k (Summary)
7971 @kindex C-M-k (Summary)
7972 @findex gnus-summary-kill-thread
7973 Mark all articles in the current (sub-)thread as read
7974 (@code{gnus-summary-kill-thread}).  If the prefix argument is positive,
7975 remove all marks instead.  If the prefix argument is negative, tick
7976 articles instead.
7977
7978 @item T l
7979 @itemx C-M-l
7980 @kindex T l (Summary)
7981 @kindex C-M-l (Summary)
7982 @findex gnus-summary-lower-thread
7983 Lower the score of the current (sub-)thread
7984 (@code{gnus-summary-lower-thread}).
7985
7986 @item T i
7987 @kindex T i (Summary)
7988 @findex gnus-summary-raise-thread
7989 Increase the score of the current (sub-)thread
7990 (@code{gnus-summary-raise-thread}).
7991
7992 @item T #
7993 @kindex T # (Summary)
7994 @findex gnus-uu-mark-thread
7995 Set the process mark on the current (sub-)thread
7996 (@code{gnus-uu-mark-thread}).
7997
7998 @item T M-#
7999 @kindex T M-# (Summary)
8000 @findex gnus-uu-unmark-thread
8001 Remove the process mark from the current (sub-)thread
8002 (@code{gnus-uu-unmark-thread}).
8003
8004 @item T T
8005 @kindex T T (Summary)
8006 @findex gnus-summary-toggle-threads
8007 Toggle threading (@code{gnus-summary-toggle-threads}).
8008
8009 @item T s
8010 @kindex T s (Summary)
8011 @findex gnus-summary-show-thread
8012 Expose the (sub-)thread hidden under the current article, if any@*
8013 (@code{gnus-summary-show-thread}).
8014
8015 @item T h
8016 @kindex T h (Summary)
8017 @findex gnus-summary-hide-thread
8018 Hide the current (sub-)thread (@code{gnus-summary-hide-thread}).
8019
8020 @item T S
8021 @kindex T S (Summary)
8022 @findex gnus-summary-show-all-threads
8023 Expose all hidden threads (@code{gnus-summary-show-all-threads}).
8024
8025 @item T H
8026 @kindex T H (Summary)
8027 @findex gnus-summary-hide-all-threads
8028 Hide all threads (@code{gnus-summary-hide-all-threads}).
8029
8030 @item T t
8031 @kindex T t (Summary)
8032 @findex gnus-summary-rethread-current
8033 Re-thread the current article's thread
8034 (@code{gnus-summary-rethread-current}).  This works even when the
8035 summary buffer is otherwise unthreaded.
8036
8037 @item T ^
8038 @kindex T ^ (Summary)
8039 @findex gnus-summary-reparent-thread
8040 Make the current article the child of the marked (or previous) article
8041 (@code{gnus-summary-reparent-thread}).
8042
8043 @item T M-^
8044 @kindex T M-^ (Summary)
8045 @findex gnus-summary-reparent-children
8046 Make the current article the parent of the marked articles
8047 (@code{gnus-summary-reparent-children}).
8048
8049 @end table
8050
8051 The following commands are thread movement commands.  They all
8052 understand the numeric prefix.
8053
8054 @table @kbd
8055
8056 @item T n
8057 @kindex T n (Summary)
8058 @itemx C-M-f
8059 @kindex C-M-n (Summary)
8060 @itemx M-down
8061 @kindex M-down (Summary)
8062 @findex gnus-summary-next-thread
8063 Go to the next thread (@code{gnus-summary-next-thread}).
8064
8065 @item T p
8066 @kindex T p (Summary)
8067 @itemx C-M-b
8068 @kindex C-M-p (Summary)
8069 @itemx M-up
8070 @kindex M-up (Summary)
8071 @findex gnus-summary-prev-thread
8072 Go to the previous thread (@code{gnus-summary-prev-thread}).
8073
8074 @item T d
8075 @kindex T d (Summary)
8076 @findex gnus-summary-down-thread
8077 Descend the thread (@code{gnus-summary-down-thread}).
8078
8079 @item T u
8080 @kindex T u (Summary)
8081 @findex gnus-summary-up-thread
8082 Ascend the thread (@code{gnus-summary-up-thread}).
8083
8084 @item T o
8085 @kindex T o (Summary)
8086 @findex gnus-summary-top-thread
8087 Go to the top of the thread (@code{gnus-summary-top-thread}).
8088 @end table
8089
8090 @vindex gnus-thread-operation-ignore-subject
8091 If you ignore subject while threading, you'll naturally end up with
8092 threads that have several different subjects in them.  If you then issue
8093 a command like @kbd{T k} (@code{gnus-summary-kill-thread}) you might not
8094 wish to kill the entire thread, but just those parts of the thread that
8095 have the same subject as the current article.  If you like this idea,
8096 you can fiddle with @code{gnus-thread-operation-ignore-subject}.  If it
8097 is non-@code{nil} (which it is by default), subjects will be ignored
8098 when doing thread commands.  If this variable is @code{nil}, articles in
8099 the same thread with different subjects will not be included in the
8100 operation in question.  If this variable is @code{fuzzy}, only articles
8101 that have subjects fuzzily equal will be included (@pxref{Fuzzy
8102 Matching}).
8103
8104
8105 @node Sorting the Summary Buffer
8106 @section Sorting the Summary Buffer
8107
8108 @findex gnus-thread-sort-by-total-score
8109 @findex gnus-thread-sort-by-date
8110 @findex gnus-thread-sort-by-score
8111 @findex gnus-thread-sort-by-subject
8112 @findex gnus-thread-sort-by-author
8113 @findex gnus-thread-sort-by-recipient
8114 @findex gnus-thread-sort-by-number
8115 @findex gnus-thread-sort-by-random
8116 @vindex gnus-thread-sort-functions
8117 @findex gnus-thread-sort-by-most-recent-number
8118 @findex gnus-thread-sort-by-most-recent-date
8119 If you are using a threaded summary display, you can sort the threads by
8120 setting @code{gnus-thread-sort-functions}, which can be either a single
8121 function, a list of functions, or a list containing functions and
8122 @code{(not some-function)} elements.
8123
8124 By default, sorting is done on article numbers.  Ready-made sorting
8125 predicate functions include @code{gnus-thread-sort-by-number},
8126 @code{gnus-thread-sort-by-author}, @code{gnus-thread-sort-by-recipient},
8127 @code{gnus-thread-sort-by-subject},
8128 @code{gnus-thread-sort-by-date},
8129 @code{gnus-thread-sort-by-score},
8130 @code{gnus-thread-sort-by-most-recent-number},
8131 @code{gnus-thread-sort-by-most-recent-date},
8132 @code{gnus-thread-sort-by-random} and
8133 @code{gnus-thread-sort-by-total-score}.
8134
8135 Each function takes two threads and returns non-@code{nil} if the first
8136 thread should be sorted before the other.  Note that sorting really is
8137 normally done by looking only at the roots of each thread.
8138
8139 If you use more than one function, the primary sort key should be the
8140 last function in the list.  You should probably always include
8141 @code{gnus-thread-sort-by-number} in the list of sorting
8142 functions---preferably first.  This will ensure that threads that are
8143 equal with respect to the other sort criteria will be displayed in
8144 ascending article order.
8145
8146 If you would like to sort by reverse score, then by subject, and finally
8147 by number, you could do something like:
8148
8149 @lisp
8150 (setq gnus-thread-sort-functions
8151       '(gnus-thread-sort-by-number
8152         gnus-thread-sort-by-subject
8153         (not gnus-thread-sort-by-total-score)))
8154 @end lisp
8155
8156 The threads that have highest score will be displayed first in the
8157 summary buffer.  When threads have the same score, they will be sorted
8158 alphabetically.  The threads that have the same score and the same
8159 subject will be sorted by number, which is (normally) the sequence in
8160 which the articles arrived.
8161
8162 If you want to sort by score and then reverse arrival order, you could
8163 say something like:
8164
8165 @lisp
8166 (setq gnus-thread-sort-functions
8167       '((not gnus-thread-sort-by-number)
8168         gnus-thread-sort-by-score))
8169 @end lisp
8170
8171 @vindex gnus-thread-score-function
8172 The function in the @code{gnus-thread-score-function} variable (default
8173 @code{+}) is used for calculating the total score of a thread.  Useful
8174 functions might be @code{max}, @code{min}, or squared means, or whatever
8175 tickles your fancy.
8176
8177 @findex gnus-article-sort-functions
8178 @findex gnus-article-sort-by-date
8179 @findex gnus-article-sort-by-most-recent-date
8180 @findex gnus-article-sort-by-score
8181 @findex gnus-article-sort-by-subject
8182 @findex gnus-article-sort-by-author
8183 @findex gnus-article-sort-by-random
8184 @findex gnus-article-sort-by-number
8185 @findex gnus-article-sort-by-most-recent-number
8186 If you are using an unthreaded display for some strange reason or
8187 other, you have to fiddle with the @code{gnus-article-sort-functions}
8188 variable.  It is very similar to the
8189 @code{gnus-thread-sort-functions}, except that it uses slightly
8190 different functions for article comparison.  Available sorting
8191 predicate functions are @code{gnus-article-sort-by-number},
8192 @code{gnus-article-sort-by-author},
8193 @code{gnus-article-sort-by-subject}, @code{gnus-article-sort-by-date},
8194 @code{gnus-article-sort-by-random}, and
8195 @code{gnus-article-sort-by-score}.
8196
8197 If you want to sort an unthreaded summary display by subject, you could
8198 say something like:
8199
8200 @lisp
8201 (setq gnus-article-sort-functions
8202       '(gnus-article-sort-by-number
8203         gnus-article-sort-by-subject))
8204 @end lisp
8205
8206 You can define group specific sorting via @code{gnus-parameters},
8207 @xref{Group Parameters}.
8208
8209
8210 @node Asynchronous Fetching
8211 @section Asynchronous Article Fetching
8212 @cindex asynchronous article fetching
8213 @cindex article pre-fetch
8214 @cindex pre-fetch
8215
8216 If you read your news from an @acronym{NNTP} server that's far away, the
8217 network latencies may make reading articles a chore.  You have to wait
8218 for a while after pressing @kbd{n} to go to the next article before the
8219 article appears.  Why can't Gnus just go ahead and fetch the article
8220 while you are reading the previous one?  Why not, indeed.
8221
8222 First, some caveats.  There are some pitfalls to using asynchronous
8223 article fetching, especially the way Gnus does it.
8224
8225 Let's say you are reading article 1, which is short, and article 2 is
8226 quite long, and you are not interested in reading that.  Gnus does not
8227 know this, so it goes ahead and fetches article 2.  You decide to read
8228 article 3, but since Gnus is in the process of fetching article 2, the
8229 connection is blocked.
8230
8231 To avoid these situations, Gnus will open two (count 'em two)
8232 connections to the server.  Some people may think this isn't a very nice
8233 thing to do, but I don't see any real alternatives.  Setting up that
8234 extra connection takes some time, so Gnus startup will be slower.
8235
8236 Gnus will fetch more articles than you will read.  This will mean that
8237 the link between your machine and the @acronym{NNTP} server will become more
8238 loaded than if you didn't use article pre-fetch.  The server itself will
8239 also become more loaded---both with the extra article requests, and the
8240 extra connection.
8241
8242 Ok, so now you know that you shouldn't really use this thing@dots{} unless
8243 you really want to.
8244
8245 @vindex gnus-asynchronous
8246 Here's how:  Set @code{gnus-asynchronous} to @code{t}.  The rest should
8247 happen automatically.
8248
8249 @vindex gnus-use-article-prefetch
8250 You can control how many articles are to be pre-fetched by setting
8251 @code{gnus-use-article-prefetch}.  This is 30 by default, which means
8252 that when you read an article in the group, the back end will pre-fetch
8253 the next 30 articles.  If this variable is @code{t}, the back end will
8254 pre-fetch all the articles it can without bound.  If it is
8255 @code{nil}, no pre-fetching will be done.
8256
8257 @vindex gnus-async-prefetch-article-p
8258 @findex gnus-async-unread-p
8259 There are probably some articles that you don't want to pre-fetch---read
8260 articles, for instance.  The @code{gnus-async-prefetch-article-p}
8261 variable controls whether an article is to be pre-fetched.  This
8262 function should return non-@code{nil} when the article in question is
8263 to be pre-fetched.  The default is @code{gnus-async-unread-p}, which
8264 returns @code{nil} on read articles.  The function is called with an
8265 article data structure as the only parameter.
8266
8267 If, for instance, you wish to pre-fetch only unread articles shorter
8268 than 100 lines, you could say something like:
8269
8270 @lisp
8271 (defun my-async-short-unread-p (data)
8272   "Return non-nil for short, unread articles."
8273   (and (gnus-data-unread-p data)
8274        (< (mail-header-lines (gnus-data-header data))
8275           100)))
8276
8277 (setq gnus-async-prefetch-article-p 'my-async-short-unread-p)
8278 @end lisp
8279
8280 These functions will be called many, many times, so they should
8281 preferably be short and sweet to avoid slowing down Gnus too much.
8282 It's probably a good idea to byte-compile things like this.
8283
8284 @vindex gnus-async-post-fetch-function
8285 @findex gnus-html-prefetch-images
8286 After an article has been prefetched, this
8287 @code{gnus-async-post-fetch-function} will be called.  The buffer will
8288 be narrowed to the region of the article that was fetched.  A useful
8289 value would be @code{gnus-html-prefetch-images}, which will prefetch
8290 and store images referenced in the article, so that you don't have to
8291 wait for them to be fetched when you read the article.  This is useful
8292 for @acronym{HTML} messages that have external images.
8293
8294 @vindex gnus-prefetched-article-deletion-strategy
8295 Articles have to be removed from the asynch buffer sooner or later.  The
8296 @code{gnus-prefetched-article-deletion-strategy} says when to remove
8297 articles.  This is a list that may contain the following elements:
8298
8299 @table @code
8300 @item read
8301 Remove articles when they are read.
8302
8303 @item exit
8304 Remove articles when exiting the group.
8305 @end table
8306
8307 The default value is @code{(read exit)}.
8308
8309 @c @vindex gnus-use-header-prefetch
8310 @c If @code{gnus-use-header-prefetch} is non-@code{nil}, prefetch articles
8311 @c from the next group.
8312
8313
8314 @node Article Caching
8315 @section Article Caching
8316 @cindex article caching
8317 @cindex caching
8318
8319 If you have an @emph{extremely} slow @acronym{NNTP} connection, you may
8320 consider turning article caching on.  Each article will then be stored
8321 locally under your home directory.  As you may surmise, this could
8322 potentially use @emph{huge} amounts of disk space, as well as eat up all
8323 your inodes so fast it will make your head swim.  In vodka.
8324
8325 Used carefully, though, it could be just an easier way to save articles.
8326
8327 @vindex gnus-use-long-file-name
8328 @vindex gnus-cache-directory
8329 @vindex gnus-use-cache
8330 To turn caching on, set @code{gnus-use-cache} to @code{t}.  By default,
8331 all articles ticked or marked as dormant will then be copied
8332 over to your local cache (@code{gnus-cache-directory}).  Whether this
8333 cache is flat or hierarchical is controlled by the
8334 @code{gnus-use-long-file-name} variable, as usual.
8335
8336 When re-selecting a ticked or dormant article, it will be fetched from the
8337 cache instead of from the server.  As articles in your cache will never
8338 expire, this might serve as a method of saving articles while still
8339 keeping them where they belong.  Just mark all articles you want to save
8340 as dormant, and don't worry.
8341
8342 When an article is marked as read, is it removed from the cache.
8343
8344 @vindex gnus-cache-remove-articles
8345 @vindex gnus-cache-enter-articles
8346 The entering/removal of articles from the cache is controlled by the
8347 @code{gnus-cache-enter-articles} and @code{gnus-cache-remove-articles}
8348 variables.  Both are lists of symbols.  The first is @code{(ticked
8349 dormant)} by default, meaning that ticked and dormant articles will be
8350 put in the cache.  The latter is @code{(read)} by default, meaning that
8351 articles marked as read are removed from the cache.  Possibly
8352 symbols in these two lists are @code{ticked}, @code{dormant},
8353 @code{unread} and @code{read}.
8354
8355 @findex gnus-jog-cache
8356 So where does the massive article-fetching and storing come into the
8357 picture?  The @code{gnus-jog-cache} command will go through all
8358 subscribed newsgroups, request all unread articles, score them, and
8359 store them in the cache.  You should only ever, ever ever ever, use this
8360 command if 1) your connection to the @acronym{NNTP} server is really, really,
8361 really slow and 2) you have a really, really, really huge disk.
8362 Seriously.  One way to cut down on the number of articles downloaded is
8363 to score unwanted articles down and have them marked as read.  They will
8364 not then be downloaded by this command.
8365
8366 @vindex gnus-uncacheable-groups
8367 @vindex gnus-cacheable-groups
8368 It is likely that you do not want caching on all groups.  For instance,
8369 if your @code{nnml} mail is located under your home directory, it makes no
8370 sense to cache it somewhere else under your home directory.  Unless you
8371 feel that it's neat to use twice as much space.
8372
8373 To limit the caching, you could set @code{gnus-cacheable-groups} to a
8374 regexp of groups to cache, @samp{^nntp} for instance, or set the
8375 @code{gnus-uncacheable-groups} regexp to @samp{^nnml}, for instance.
8376 Both variables are @code{nil} by default.  If a group matches both
8377 variables, the group is not cached.
8378
8379 @findex gnus-cache-generate-nov-databases
8380 @findex gnus-cache-generate-active
8381 @vindex gnus-cache-active-file
8382 The cache stores information on what articles it contains in its active
8383 file (@code{gnus-cache-active-file}).  If this file (or any other parts
8384 of the cache) becomes all messed up for some reason or other, Gnus
8385 offers two functions that will try to set things right.  @kbd{M-x
8386 gnus-cache-generate-nov-databases} will (re)build all the @acronym{NOV}
8387 files, and @kbd{gnus-cache-generate-active} will (re)generate the active
8388 file.
8389
8390 @findex gnus-cache-move-cache
8391 @code{gnus-cache-move-cache} will move your whole
8392 @code{gnus-cache-directory} to some other location.  You get asked to
8393 where, isn't that cool?
8394
8395 @node Persistent Articles
8396 @section Persistent Articles
8397 @cindex persistent articles
8398
8399 Closely related to article caching, we have @dfn{persistent articles}.
8400 In fact, it's just a different way of looking at caching, and much more
8401 useful in my opinion.
8402
8403 Say you're reading a newsgroup, and you happen on to some valuable gem
8404 that you want to keep and treasure forever.  You'd normally just save it
8405 (using one of the many saving commands) in some file.  The problem with
8406 that is that it's just, well, yucky.  Ideally you'd prefer just having
8407 the article remain in the group where you found it forever; untouched by
8408 the expiry going on at the news server.
8409
8410 This is what a @dfn{persistent article} is---an article that just won't
8411 be deleted.  It's implemented using the normal cache functions, but
8412 you use two explicit commands for managing persistent articles:
8413
8414 @table @kbd
8415
8416 @item *
8417 @kindex * (Summary)
8418 @findex gnus-cache-enter-article
8419 Make the current article persistent (@code{gnus-cache-enter-article}).
8420
8421 @item M-*
8422 @kindex M-* (Summary)
8423 @findex gnus-cache-remove-article
8424 Remove the current article from the persistent articles
8425 (@code{gnus-cache-remove-article}).  This will normally delete the
8426 article.
8427 @end table
8428
8429 Both these commands understand the process/prefix convention.
8430
8431 To avoid having all ticked articles (and stuff) entered into the cache,
8432 you should set @code{gnus-use-cache} to @code{passive} if you're just
8433 interested in persistent articles:
8434
8435 @lisp
8436 (setq gnus-use-cache 'passive)
8437 @end lisp
8438
8439 @node Sticky Articles
8440 @section Sticky Articles
8441 @cindex sticky articles
8442
8443 When you select an article the current article buffer will be reused
8444 according to the value of the variable
8445 @code{gnus-single-article-buffer}.  If its value is non-@code{nil} (the
8446 default) all articles reuse the same article buffer.  Else each group
8447 has its own article buffer.
8448
8449 This implies that it's not possible to have more than one article buffer
8450 in a group at a time.  But sometimes you might want to display all the
8451 latest emails from your mother, your father, your aunt, your uncle and
8452 your 17 cousins to coordinate the next christmas party.
8453
8454 That's where sticky articles come in handy.  A sticky article buffer
8455 basically is a normal article buffer, but it won't be reused when you
8456 select another article.  You can make an article sticky with:
8457
8458 @table @kbd
8459 @item A S
8460 @kindex A S (Summary)
8461 @findex gnus-sticky-article
8462 Make the current article sticky.  If a prefix arg is given, ask for a
8463 name for this sticky article buffer.
8464 @end table
8465
8466 To close a sticky article buffer you can use these commands:
8467
8468 @table @kbd
8469 @item q
8470 @kindex q (Article)
8471 @findex bury-buffer
8472 Puts this sticky article buffer at the end of the list of all buffers.
8473
8474 @item k
8475 @kindex k (Article)
8476 @findex gnus-kill-sticky-article-buffer
8477 Kills this sticky article buffer.
8478 @end table
8479
8480 To kill all sticky article buffers you can use:
8481
8482 @defun gnus-kill-sticky-article-buffers ARG
8483 Kill all sticky article buffers.
8484 If a prefix ARG is given, ask for confirmation.
8485 @end defun
8486
8487 @node Article Backlog
8488 @section Article Backlog
8489 @cindex backlog
8490 @cindex article backlog
8491
8492 If you have a slow connection, but the idea of using caching seems
8493 unappealing to you (and it is, really), you can help the situation some
8494 by switching on the @dfn{backlog}.  This is where Gnus will buffer
8495 already read articles so that it doesn't have to re-fetch articles
8496 you've already read.  This only helps if you are in the habit of
8497 re-selecting articles you've recently read, of course.  If you never do
8498 that, turning the backlog on will slow Gnus down a little bit, and
8499 increase memory usage some.
8500
8501 @vindex gnus-keep-backlog
8502 If you set @code{gnus-keep-backlog} to a number @var{n}, Gnus will store
8503 at most @var{n} old articles in a buffer for later re-fetching.  If this
8504 variable is non-@code{nil} and is not a number, Gnus will store
8505 @emph{all} read articles, which means that your Emacs will grow without
8506 bound before exploding and taking your machine down with you.  I put
8507 that in there just to keep y'all on your toes.
8508
8509 The default value is 20.
8510
8511
8512 @node Saving Articles
8513 @section Saving Articles
8514 @cindex saving articles
8515
8516 Gnus can save articles in a number of ways.  Below is the documentation
8517 for saving articles in a fairly straight-forward fashion (i.e., little
8518 processing of the article is done before it is saved).  For a different
8519 approach (uudecoding, unsharing) you should use @code{gnus-uu}
8520 (@pxref{Decoding Articles}).
8521
8522 For the commands listed here, the target is a file.  If you want to
8523 save to a group, see the @kbd{B c} (@code{gnus-summary-copy-article})
8524 command (@pxref{Mail Group Commands}).
8525
8526 @vindex gnus-save-all-headers
8527 If @code{gnus-save-all-headers} is non-@code{nil}, Gnus will not delete
8528 unwanted headers before saving the article.
8529
8530 @vindex gnus-saved-headers
8531 If the preceding variable is @code{nil}, all headers that match the
8532 @code{gnus-saved-headers} regexp will be kept, while the rest will be
8533 deleted before saving.
8534
8535 @table @kbd
8536
8537 @item O o
8538 @itemx o
8539 @kindex O o (Summary)
8540 @kindex o (Summary)
8541 @findex gnus-summary-save-article
8542 @c @icon{gnus-summary-save-article}
8543 Save the current article using the default article saver
8544 (@code{gnus-summary-save-article}).
8545
8546 @item O m
8547 @kindex O m (Summary)
8548 @findex gnus-summary-save-article-mail
8549 Save the current article in a Unix mail box (mbox) file
8550 (@code{gnus-summary-save-article-mail}).
8551
8552 @item O r
8553 @kindex O r (Summary)
8554 @findex gnus-summary-save-article-rmail
8555 Save the current article in Rmail format
8556 (@code{gnus-summary-save-article-rmail}).  This is mbox since Emacs 23,
8557 Babyl in older versions.
8558
8559 @item O f
8560 @kindex O f (Summary)
8561 @findex gnus-summary-save-article-file
8562 @c @icon{gnus-summary-save-article-file}
8563 Save the current article in plain file format
8564 (@code{gnus-summary-save-article-file}).
8565
8566 @item O F
8567 @kindex O F (Summary)
8568 @findex gnus-summary-write-article-file
8569 Write the current article in plain file format, overwriting any previous
8570 file contents (@code{gnus-summary-write-article-file}).
8571
8572 @item O b
8573 @kindex O b (Summary)
8574 @findex gnus-summary-save-article-body-file
8575 Save the current article body in plain file format
8576 (@code{gnus-summary-save-article-body-file}).
8577
8578 @item O h
8579 @kindex O h (Summary)
8580 @findex gnus-summary-save-article-folder
8581 Save the current article in mh folder format
8582 (@code{gnus-summary-save-article-folder}).
8583
8584 @item O v
8585 @kindex O v (Summary)
8586 @findex gnus-summary-save-article-vm
8587 Save the current article in a VM folder
8588 (@code{gnus-summary-save-article-vm}).
8589
8590 @item O p
8591 @itemx |
8592 @kindex O p (Summary)
8593 @kindex | (Summary)
8594 @findex gnus-summary-pipe-output
8595 @vindex gnus-summary-pipe-output-default-command
8596 Save the current article in a pipe.  Uhm, like, what I mean is---Pipe
8597 the current article to a process (@code{gnus-summary-pipe-output}).
8598 If given a symbolic prefix (@pxref{Symbolic Prefixes}), include the
8599 complete headers in the piped output.  The symbolic prefix @code{r} is
8600 special; it lets this command pipe a raw article including all headers.
8601 The @code{gnus-summary-pipe-output-default-command} variable can be set
8602 to a string containing the default command and options (default
8603 @code{nil}).
8604
8605 @item O P
8606 @kindex O P (Summary)
8607 @findex gnus-summary-muttprint
8608 @vindex gnus-summary-muttprint-program
8609 Save the current article into muttprint.  That is, print it using the
8610 external program @uref{http://muttprint.sourceforge.net/,
8611 Muttprint}.  The program name and options to use is controlled by the
8612 variable @code{gnus-summary-muttprint-program}.
8613 (@code{gnus-summary-muttprint}).
8614
8615 @end table
8616
8617 @vindex gnus-prompt-before-saving
8618 All these commands use the process/prefix convention
8619 (@pxref{Process/Prefix}).  If you save bunches of articles using these
8620 functions, you might get tired of being prompted for files to save each
8621 and every article in.  The prompting action is controlled by
8622 the @code{gnus-prompt-before-saving} variable, which is @code{always} by
8623 default, giving you that excessive prompting action you know and
8624 loathe.  If you set this variable to @code{t} instead, you'll be prompted
8625 just once for each series of articles you save.  If you like to really
8626 have Gnus do all your thinking for you, you can even set this variable
8627 to @code{nil}, which means that you will never be prompted for files to
8628 save articles in.  Gnus will simply save all the articles in the default
8629 files.
8630
8631
8632 @vindex gnus-default-article-saver
8633 You can customize the @code{gnus-default-article-saver} variable to make
8634 Gnus do what you want it to.  You can use any of the eight ready-made
8635 functions below, or you can create your own.
8636
8637 @table @code
8638
8639 @item gnus-summary-save-in-rmail
8640 @findex gnus-summary-save-in-rmail
8641 @vindex gnus-rmail-save-name
8642 @findex gnus-plain-save-name
8643 This is the default format, that used by the Rmail package.  Since Emacs
8644 23, Rmail uses standard mbox format.  Before this, it used the
8645 @dfn{Babyl} format.  Accordingly, this command writes mbox format since
8646 Emacs 23, unless appending to an existing Babyl file.  In older versions
8647 of Emacs, it always uses Babyl format.  Uses the function in the
8648 @code{gnus-rmail-save-name} variable to get a file name to save the
8649 article in.  The default is @code{gnus-plain-save-name}.
8650
8651 @item gnus-summary-save-in-mail
8652 @findex gnus-summary-save-in-mail
8653 @vindex gnus-mail-save-name
8654 Save in a Unix mail (mbox) file.  Uses the function in the
8655 @code{gnus-mail-save-name} variable to get a file name to save the
8656 article in.  The default is @code{gnus-plain-save-name}.
8657
8658 @item gnus-summary-save-in-file
8659 @findex gnus-summary-save-in-file
8660 @vindex gnus-file-save-name
8661 @findex gnus-numeric-save-name
8662 Append the article straight to an ordinary file.  Uses the function in
8663 the @code{gnus-file-save-name} variable to get a file name to save the
8664 article in.  The default is @code{gnus-numeric-save-name}.
8665
8666 @item gnus-summary-write-to-file
8667 @findex gnus-summary-write-to-file
8668 Write the article straight to an ordinary file.  The file is
8669 overwritten if it exists.  Uses the function in the
8670 @code{gnus-file-save-name} variable to get a file name to save the
8671 article in.  The default is @code{gnus-numeric-save-name}.
8672
8673 @item gnus-summary-save-body-in-file
8674 @findex gnus-summary-save-body-in-file
8675 Append the article body to an ordinary file.  Uses the function in the
8676 @code{gnus-file-save-name} variable to get a file name to save the
8677 article in.  The default is @code{gnus-numeric-save-name}.
8678
8679 @item gnus-summary-write-body-to-file
8680 @findex gnus-summary-write-body-to-file
8681 Write the article body straight to an ordinary file.  The file is
8682 overwritten if it exists.  Uses the function in the
8683 @code{gnus-file-save-name} variable to get a file name to save the
8684 article in.  The default is @code{gnus-numeric-save-name}.
8685
8686 @item gnus-summary-save-in-folder
8687 @findex gnus-summary-save-in-folder
8688 @findex gnus-folder-save-name
8689 @findex gnus-Folder-save-name
8690 @vindex gnus-folder-save-name
8691 @cindex rcvstore
8692 @cindex MH folders
8693 Save the article to an MH folder using @code{rcvstore} from the MH
8694 library.  Uses the function in the @code{gnus-folder-save-name} variable
8695 to get a file name to save the article in.  The default is
8696 @code{gnus-folder-save-name}, but you can also use
8697 @code{gnus-Folder-save-name}, which creates capitalized names.
8698
8699 @item gnus-summary-save-in-vm
8700 @findex gnus-summary-save-in-vm
8701 Save the article in a VM folder.  You have to have the VM mail
8702 reader to use this setting.
8703
8704 @item gnus-summary-save-in-pipe
8705 @findex gnus-summary-save-in-pipe
8706 Pipe the article to a shell command.  This function takes optional two
8707 arguments COMMAND and RAW.  Valid values for COMMAND include:
8708
8709 @itemize @bullet
8710 @item a string@*
8711 The executable command name and possibly arguments.
8712 @item @code{nil}@*
8713 You will be prompted for the command in the minibuffer.
8714 @item the symbol @code{default}@*
8715 It will be replaced with the command which the variable
8716 @code{gnus-summary-pipe-output-default-command} holds or the command
8717 last used for saving.
8718 @end itemize
8719
8720 Non-@code{nil} value for RAW overrides @code{:decode} and
8721 @code{:headers} properties (see below) and the raw article including all
8722 headers will be piped.
8723 @end table
8724
8725 The symbol of each function may have the following properties:
8726
8727 @table @code
8728 @item :decode
8729 The value non-@code{nil} means save decoded articles.  This is
8730 meaningful only with @code{gnus-summary-save-in-file},
8731 @code{gnus-summary-save-body-in-file},
8732 @code{gnus-summary-write-to-file},
8733 @code{gnus-summary-write-body-to-file}, and
8734 @code{gnus-summary-save-in-pipe}.
8735
8736 @item :function
8737 The value specifies an alternative function which appends, not
8738 overwrites, articles to a file.  This implies that when saving many
8739 articles at a time, @code{gnus-prompt-before-saving} is bound to
8740 @code{t} and all articles are saved in a single file.  This is
8741 meaningful only with @code{gnus-summary-write-to-file} and
8742 @code{gnus-summary-write-body-to-file}.
8743
8744 @item :headers
8745 The value specifies the symbol of a variable of which the value
8746 specifies headers to be saved.  If it is omitted,
8747 @code{gnus-save-all-headers} and @code{gnus-saved-headers} control what
8748 headers should be saved.
8749 @end table
8750
8751 @vindex gnus-article-save-directory
8752 All of these functions, except for the last one, will save the article
8753 in the @code{gnus-article-save-directory}, which is initialized from the
8754 @env{SAVEDIR} environment variable.  This is @file{~/News/} by
8755 default.
8756
8757 As you can see above, the functions use different functions to find a
8758 suitable name of a file to save the article in.  Below is a list of
8759 available functions that generate names:
8760
8761 @table @code
8762
8763 @item gnus-Numeric-save-name
8764 @findex gnus-Numeric-save-name
8765 File names like @file{~/News/Alt.andrea-dworkin/45}.
8766
8767 @item gnus-numeric-save-name
8768 @findex gnus-numeric-save-name
8769 File names like @file{~/News/alt.andrea-dworkin/45}.
8770
8771 @item gnus-Plain-save-name
8772 @findex gnus-Plain-save-name
8773 File names like @file{~/News/Alt.andrea-dworkin}.
8774
8775 @item gnus-plain-save-name
8776 @findex gnus-plain-save-name
8777 File names like @file{~/News/alt.andrea-dworkin}.
8778
8779 @item gnus-sender-save-name
8780 @findex gnus-sender-save-name
8781 File names like @file{~/News/larsi}.
8782 @end table
8783
8784 @vindex gnus-split-methods
8785 You can have Gnus suggest where to save articles by plonking a regexp into
8786 the @code{gnus-split-methods} alist.  For instance, if you would like to
8787 save articles related to Gnus in the file @file{gnus-stuff}, and articles
8788 related to VM in @file{vm-stuff}, you could set this variable to something
8789 like:
8790
8791 @lisp
8792 (("^Subject:.*gnus\\|^Newsgroups:.*gnus" "gnus-stuff")
8793  ("^Subject:.*vm\\|^Xref:.*vm" "vm-stuff")
8794  (my-choosing-function "../other-dir/my-stuff")
8795  ((equal gnus-newsgroup-name "mail.misc") "mail-stuff"))
8796 @end lisp
8797
8798 We see that this is a list where each element is a list that has two
8799 elements---the @dfn{match} and the @dfn{file}.  The match can either be
8800 a string (in which case it is used as a regexp to match on the article
8801 head); it can be a symbol (which will be called as a function with the
8802 group name as a parameter); or it can be a list (which will be
8803 @code{eval}ed).  If any of these actions have a non-@code{nil} result,
8804 the @dfn{file} will be used as a default prompt.  In addition, the
8805 result of the operation itself will be used if the function or form
8806 called returns a string or a list of strings.
8807
8808 You basically end up with a list of file names that might be used when
8809 saving the current article.  (All ``matches'' will be used.)  You will
8810 then be prompted for what you really want to use as a name, with file
8811 name completion over the results from applying this variable.
8812
8813 This variable is @code{((gnus-article-archive-name))} by default, which
8814 means that Gnus will look at the articles it saves for an
8815 @code{Archive-name} line and use that as a suggestion for the file
8816 name.
8817
8818 Here's an example function to clean up file names somewhat.  If you have
8819 lots of mail groups called things like
8820 @samp{nnml:mail.whatever}, you may want to chop off the beginning of
8821 these group names before creating the file name to save to.  The
8822 following will do just that:
8823
8824 @lisp
8825 (defun my-save-name (group)
8826   (when (string-match "^nnml:mail." group)
8827     (substring group (match-end 0))))
8828
8829 (setq gnus-split-methods
8830       '((gnus-article-archive-name)
8831         (my-save-name)))
8832 @end lisp
8833
8834
8835 @vindex gnus-use-long-file-name
8836 Finally, you have the @code{gnus-use-long-file-name} variable.  If it is
8837 @code{nil}, all the preceding functions will replace all periods
8838 (@samp{.}) in the group names with slashes (@samp{/})---which means that
8839 the functions will generate hierarchies of directories instead of having
8840 all the files in the top level directory
8841 (@file{~/News/alt/andrea-dworkin} instead of
8842 @file{~/News/alt.andrea-dworkin}.)  This variable is @code{t} by default
8843 on most systems.  However, for historical reasons, this is @code{nil} on
8844 Xenix and usg-unix-v machines by default.
8845
8846 This function also affects kill and score file names.  If this variable
8847 is a list, and the list contains the element @code{not-score}, long file
8848 names will not be used for score files, if it contains the element
8849 @code{not-save}, long file names will not be used for saving, and if it
8850 contains the element @code{not-kill}, long file names will not be used
8851 for kill files.
8852
8853 If you'd like to save articles in a hierarchy that looks something like
8854 a spool, you could
8855
8856 @lisp
8857 (setq gnus-use-long-file-name '(not-save)) ; @r{to get a hierarchy}
8858 (setq gnus-default-article-saver
8859       'gnus-summary-save-in-file)          ; @r{no encoding}
8860 @end lisp
8861
8862 Then just save with @kbd{o}.  You'd then read this hierarchy with
8863 ephemeral @code{nneething} groups---@kbd{G D} in the group buffer, and
8864 the top level directory as the argument (@file{~/News/}).  Then just walk
8865 around to the groups/directories with @code{nneething}.
8866
8867
8868 @node Decoding Articles
8869 @section Decoding Articles
8870 @cindex decoding articles
8871
8872 Sometime users post articles (or series of articles) that have been
8873 encoded in some way or other.  Gnus can decode them for you.
8874
8875 @menu
8876 * Uuencoded Articles::          Uudecode articles.
8877 * Shell Archives::              Unshar articles.
8878 * PostScript Files::            Split PostScript.
8879 * Other Files::                 Plain save and binhex.
8880 * Decoding Variables::          Variables for a happy decoding.
8881 * Viewing Files::               You want to look at the result of the decoding?
8882 @end menu
8883
8884 @cindex series
8885 @cindex article series
8886 All these functions use the process/prefix convention
8887 (@pxref{Process/Prefix}) for finding out what articles to work on, with
8888 the extension that a ``single article'' means ``a single series''.  Gnus
8889 can find out by itself what articles belong to a series, decode all the
8890 articles and unpack/view/save the resulting file(s).
8891
8892 Gnus guesses what articles are in the series according to the following
8893 simplish rule: The subjects must be (nearly) identical, except for the
8894 last two numbers of the line.  (Spaces are largely ignored, however.)
8895
8896 For example: If you choose a subject called @samp{cat.gif (2/3)}, Gnus
8897 will find all the articles that match the regexp @samp{^cat.gif
8898 ([0-9]+/[0-9]+).*$}.
8899
8900 Subjects that are non-standard, like @samp{cat.gif (2/3) Part 6 of a
8901 series}, will not be properly recognized by any of the automatic viewing
8902 commands, and you have to mark the articles manually with @kbd{#}.
8903
8904
8905 @node Uuencoded Articles
8906 @subsection Uuencoded Articles
8907 @cindex uudecode
8908 @cindex uuencoded articles
8909
8910 @table @kbd
8911
8912 @item X u
8913 @kindex X u (Summary)
8914 @findex gnus-uu-decode-uu
8915 @c @icon{gnus-uu-decode-uu}
8916 Uudecodes the current series (@code{gnus-uu-decode-uu}).
8917
8918 @item X U
8919 @kindex X U (Summary)
8920 @findex gnus-uu-decode-uu-and-save
8921 Uudecodes and saves the current series
8922 (@code{gnus-uu-decode-uu-and-save}).
8923
8924 @item X v u
8925 @kindex X v u (Summary)
8926 @findex gnus-uu-decode-uu-view
8927 Uudecodes and views the current series (@code{gnus-uu-decode-uu-view}).
8928
8929 @item X v U
8930 @kindex X v U (Summary)
8931 @findex gnus-uu-decode-uu-and-save-view
8932 Uudecodes, views and saves the current series
8933 (@code{gnus-uu-decode-uu-and-save-view}).
8934
8935 @end table
8936
8937 Remember that these all react to the presence of articles marked with
8938 the process mark.  If, for instance, you'd like to decode and save an
8939 entire newsgroup, you'd typically do @kbd{M P a}
8940 (@code{gnus-uu-mark-all}) and then @kbd{X U}
8941 (@code{gnus-uu-decode-uu-and-save}).
8942
8943 All this is very much different from how @code{gnus-uu} worked with
8944 @sc{gnus 4.1}, where you had explicit keystrokes for everything under
8945 the sun.  This version of @code{gnus-uu} generally assumes that you mark
8946 articles in some way (@pxref{Setting Process Marks}) and then press
8947 @kbd{X u}.
8948
8949 @vindex gnus-uu-notify-files
8950 Note: When trying to decode articles that have names matching
8951 @code{gnus-uu-notify-files}, which is hard-coded to
8952 @samp{[Cc][Ii][Nn][Dd][Yy][0-9]+.\\(gif\\|jpg\\)}, @code{gnus-uu} will
8953 automatically post an article on @samp{comp.unix.wizards} saying that
8954 you have just viewed the file in question.  This feature can't be turned
8955 off.
8956
8957
8958 @node Shell Archives
8959 @subsection Shell Archives
8960 @cindex unshar
8961 @cindex shell archives
8962 @cindex shared articles
8963
8964 Shell archives (``shar files'') used to be a popular way to distribute
8965 sources, but it isn't used all that much today.  In any case, we have
8966 some commands to deal with these:
8967
8968 @table @kbd
8969
8970 @item X s
8971 @kindex X s (Summary)
8972 @findex gnus-uu-decode-unshar
8973 Unshars the current series (@code{gnus-uu-decode-unshar}).
8974
8975 @item X S
8976 @kindex X S (Summary)
8977 @findex gnus-uu-decode-unshar-and-save
8978 Unshars and saves the current series (@code{gnus-uu-decode-unshar-and-save}).
8979
8980 @item X v s
8981 @kindex X v s (Summary)
8982 @findex gnus-uu-decode-unshar-view
8983 Unshars and views the current series (@code{gnus-uu-decode-unshar-view}).
8984
8985 @item X v S
8986 @kindex X v S (Summary)
8987 @findex gnus-uu-decode-unshar-and-save-view
8988 Unshars, views and saves the current series
8989 (@code{gnus-uu-decode-unshar-and-save-view}).
8990 @end table
8991
8992
8993 @node PostScript Files
8994 @subsection PostScript Files
8995 @cindex PostScript
8996
8997 @table @kbd
8998
8999 @item X p
9000 @kindex X p (Summary)
9001 @findex gnus-uu-decode-postscript
9002 Unpack the current PostScript series (@code{gnus-uu-decode-postscript}).
9003
9004 @item X P
9005 @kindex X P (Summary)
9006 @findex gnus-uu-decode-postscript-and-save
9007 Unpack and save the current PostScript series
9008 (@code{gnus-uu-decode-postscript-and-save}).
9009
9010 @item X v p
9011 @kindex X v p (Summary)
9012 @findex gnus-uu-decode-postscript-view
9013 View the current PostScript series
9014 (@code{gnus-uu-decode-postscript-view}).
9015
9016 @item X v P
9017 @kindex X v P (Summary)
9018 @findex gnus-uu-decode-postscript-and-save-view
9019 View and save the current PostScript series
9020 (@code{gnus-uu-decode-postscript-and-save-view}).
9021 @end table
9022
9023
9024 @node Other Files
9025 @subsection Other Files
9026
9027 @table @kbd
9028 @item X o
9029 @kindex X o (Summary)
9030 @findex gnus-uu-decode-save
9031 Save the current series
9032 (@code{gnus-uu-decode-save}).
9033
9034 @item X b
9035 @kindex X b (Summary)
9036 @findex gnus-uu-decode-binhex
9037 Unbinhex the current series (@code{gnus-uu-decode-binhex}).  This
9038 doesn't really work yet.
9039
9040 @item X Y
9041 @kindex X Y (Summary)
9042 @findex gnus-uu-decode-yenc
9043 yEnc-decode the current series and save it (@code{gnus-uu-decode-yenc}).
9044 @end table
9045
9046
9047 @node Decoding Variables
9048 @subsection Decoding Variables
9049
9050 Adjective, not verb.
9051
9052 @menu
9053 * Rule Variables::              Variables that say how a file is to be viewed.
9054 * Other Decode Variables::      Other decode variables.
9055 * Uuencoding and Posting::      Variables for customizing uuencoding.
9056 @end menu
9057
9058
9059 @node Rule Variables
9060 @subsubsection Rule Variables
9061 @cindex rule variables
9062
9063 Gnus uses @dfn{rule variables} to decide how to view a file.  All these
9064 variables are of the form
9065
9066 @lisp
9067       (list '(regexp1 command2)
9068             '(regexp2 command2)
9069             ...)
9070 @end lisp
9071
9072 @table @code
9073
9074 @item gnus-uu-user-view-rules
9075 @vindex gnus-uu-user-view-rules
9076 @cindex sox
9077 This variable is consulted first when viewing files.  If you wish to use,
9078 for instance, @code{sox} to convert an @file{.au} sound file, you could
9079 say something like:
9080 @lisp
9081 (setq gnus-uu-user-view-rules
9082       (list '("\\\\.au$" "sox %s -t .aiff > /dev/audio")))
9083 @end lisp
9084
9085 @item gnus-uu-user-view-rules-end
9086 @vindex gnus-uu-user-view-rules-end
9087 This variable is consulted if Gnus couldn't make any matches from the
9088 user and default view rules.
9089
9090 @item gnus-uu-user-archive-rules
9091 @vindex gnus-uu-user-archive-rules
9092 This variable can be used to say what commands should be used to unpack
9093 archives.
9094 @end table
9095
9096
9097 @node Other Decode Variables
9098 @subsubsection Other Decode Variables
9099
9100 @table @code
9101 @vindex gnus-uu-grabbed-file-functions
9102
9103 @item gnus-uu-grabbed-file-functions
9104 All functions in this list will be called right after each file has been
9105 successfully decoded---so that you can move or view files right away,
9106 and don't have to wait for all files to be decoded before you can do
9107 anything.  Ready-made functions you can put in this list are:
9108
9109 @table @code
9110
9111 @item gnus-uu-grab-view
9112 @findex gnus-uu-grab-view
9113 View the file.
9114
9115 @item gnus-uu-grab-move
9116 @findex gnus-uu-grab-move
9117 Move the file (if you're using a saving function.)
9118 @end table
9119
9120 @item gnus-uu-be-dangerous
9121 @vindex gnus-uu-be-dangerous
9122 Specifies what to do if unusual situations arise during decoding.  If
9123 @code{nil}, be as conservative as possible.  If @code{t}, ignore things
9124 that didn't work, and overwrite existing files.  Otherwise, ask each
9125 time.
9126
9127 @item gnus-uu-ignore-files-by-name
9128 @vindex gnus-uu-ignore-files-by-name
9129 Files with name matching this regular expression won't be viewed.
9130
9131 @item gnus-uu-ignore-files-by-type
9132 @vindex gnus-uu-ignore-files-by-type
9133 Files with a @acronym{MIME} type matching this variable won't be viewed.
9134 Note that Gnus tries to guess what type the file is based on the name.
9135 @code{gnus-uu} is not a @acronym{MIME} package (yet), so this is slightly
9136 kludgey.
9137
9138 @item gnus-uu-tmp-dir
9139 @vindex gnus-uu-tmp-dir
9140 Where @code{gnus-uu} does its work.
9141
9142 @item gnus-uu-do-not-unpack-archives
9143 @vindex gnus-uu-do-not-unpack-archives
9144 Non-@code{nil} means that @code{gnus-uu} won't peek inside archives
9145 looking for files to display.
9146
9147 @item gnus-uu-view-and-save
9148 @vindex gnus-uu-view-and-save
9149 Non-@code{nil} means that the user will always be asked to save a file
9150 after viewing it.
9151
9152 @item gnus-uu-ignore-default-view-rules
9153 @vindex gnus-uu-ignore-default-view-rules
9154 Non-@code{nil} means that @code{gnus-uu} will ignore the default viewing
9155 rules.
9156
9157 @item gnus-uu-ignore-default-archive-rules
9158 @vindex gnus-uu-ignore-default-archive-rules
9159 Non-@code{nil} means that @code{gnus-uu} will ignore the default archive
9160 unpacking commands.
9161
9162 @item gnus-uu-kill-carriage-return
9163 @vindex gnus-uu-kill-carriage-return
9164 Non-@code{nil} means that @code{gnus-uu} will strip all carriage returns
9165 from articles.
9166
9167 @item gnus-uu-unmark-articles-not-decoded
9168 @vindex gnus-uu-unmark-articles-not-decoded
9169 Non-@code{nil} means that @code{gnus-uu} will mark unsuccessfully
9170 decoded articles as unread.
9171
9172 @item gnus-uu-correct-stripped-uucode
9173 @vindex gnus-uu-correct-stripped-uucode
9174 Non-@code{nil} means that @code{gnus-uu} will @emph{try} to fix
9175 uuencoded files that have had trailing spaces deleted.
9176
9177 @item gnus-uu-pre-uudecode-hook
9178 @vindex gnus-uu-pre-uudecode-hook
9179 Hook run before sending a message to @code{uudecode}.
9180
9181 @item gnus-uu-view-with-metamail
9182 @vindex gnus-uu-view-with-metamail
9183 @cindex metamail
9184 Non-@code{nil} means that @code{gnus-uu} will ignore the viewing
9185 commands defined by the rule variables and just fudge a @acronym{MIME}
9186 content type based on the file name.  The result will be fed to
9187 @code{metamail} for viewing.
9188
9189 @item gnus-uu-save-in-digest
9190 @vindex gnus-uu-save-in-digest
9191 Non-@code{nil} means that @code{gnus-uu}, when asked to save without
9192 decoding, will save in digests.  If this variable is @code{nil},
9193 @code{gnus-uu} will just save everything in a file without any
9194 embellishments.  The digesting almost conforms to RFC 1153---no easy way
9195 to specify any meaningful volume and issue numbers were found, so I
9196 simply dropped them.
9197
9198 @end table
9199
9200
9201 @node Uuencoding and Posting
9202 @subsubsection Uuencoding and Posting
9203
9204 @table @code
9205
9206 @item gnus-uu-post-include-before-composing
9207 @vindex gnus-uu-post-include-before-composing
9208 Non-@code{nil} means that @code{gnus-uu} will ask for a file to encode
9209 before you compose the article.  If this variable is @code{t}, you can
9210 either include an encoded file with @kbd{C-c C-i} or have one included
9211 for you when you post the article.
9212
9213 @item gnus-uu-post-length
9214 @vindex gnus-uu-post-length
9215 Maximum length of an article.  The encoded file will be split into how
9216 many articles it takes to post the entire file.
9217
9218 @item gnus-uu-post-threaded
9219 @vindex gnus-uu-post-threaded
9220 Non-@code{nil} means that @code{gnus-uu} will post the encoded file in a
9221 thread.  This may not be smart, as no other decoder I have seen is able
9222 to follow threads when collecting uuencoded articles.  (Well, I have
9223 seen one package that does that---@code{gnus-uu}, but somehow, I don't
9224 think that counts@dots{}) Default is @code{nil}.
9225
9226 @item gnus-uu-post-separate-description
9227 @vindex gnus-uu-post-separate-description
9228 Non-@code{nil} means that the description will be posted in a separate
9229 article.  The first article will typically be numbered (0/x).  If this
9230 variable is @code{nil}, the description the user enters will be included
9231 at the beginning of the first article, which will be numbered (1/x).
9232 Default is @code{t}.
9233
9234 @end table
9235
9236
9237 @node Viewing Files
9238 @subsection Viewing Files
9239 @cindex viewing files
9240 @cindex pseudo-articles
9241
9242 After decoding, if the file is some sort of archive, Gnus will attempt
9243 to unpack the archive and see if any of the files in the archive can be
9244 viewed.  For instance, if you have a gzipped tar file @file{pics.tar.gz}
9245 containing the files @file{pic1.jpg} and @file{pic2.gif}, Gnus will
9246 uncompress and de-tar the main file, and then view the two pictures.
9247 This unpacking process is recursive, so if the archive contains archives
9248 of archives, it'll all be unpacked.
9249
9250 Finally, Gnus will normally insert a @dfn{pseudo-article} for each
9251 extracted file into the summary buffer.  If you go to these
9252 ``articles'', you will be prompted for a command to run (usually Gnus
9253 will make a suggestion), and then the command will be run.
9254
9255 @vindex gnus-view-pseudo-asynchronously
9256 If @code{gnus-view-pseudo-asynchronously} is @code{nil}, Emacs will wait
9257 until the viewing is done before proceeding.
9258
9259 @vindex gnus-view-pseudos
9260 If @code{gnus-view-pseudos} is @code{automatic}, Gnus will not insert
9261 the pseudo-articles into the summary buffer, but view them
9262 immediately.  If this variable is @code{not-confirm}, the user won't even
9263 be asked for a confirmation before viewing is done.
9264
9265 @vindex gnus-view-pseudos-separately
9266 If @code{gnus-view-pseudos-separately} is non-@code{nil}, one
9267 pseudo-article will be created for each file to be viewed.  If
9268 @code{nil}, all files that use the same viewing command will be given as
9269 a list of parameters to that command.
9270
9271 @vindex gnus-insert-pseudo-articles
9272 If @code{gnus-insert-pseudo-articles} is non-@code{nil}, insert
9273 pseudo-articles when decoding.  It is @code{t} by default.
9274
9275 So; there you are, reading your @emph{pseudo-articles} in your
9276 @emph{virtual newsgroup} from the @emph{virtual server}; and you think:
9277 Why isn't anything real anymore? How did we get here?
9278
9279
9280 @node Article Treatment
9281 @section Article Treatment
9282
9283 Reading through this huge manual, you may have quite forgotten that the
9284 object of newsreaders is to actually, like, read what people have
9285 written.  Reading articles.  Unfortunately, people are quite bad at
9286 writing, so there are tons of functions and variables to make reading
9287 these articles easier.
9288
9289 @menu
9290 * Article Highlighting::        You want to make the article look like fruit salad.
9291 * Article Fontisizing::         Making emphasized text look nice.
9292 * Article Hiding::              You also want to make certain info go away.
9293 * Article Washing::             Lots of way-neat functions to make life better.
9294 * Article Header::              Doing various header transformations.
9295 * Article Buttons::             Click on URLs, Message-IDs, addresses and the like.
9296 * Article Button Levels::       Controlling appearance of buttons.
9297 * Article Date::                Grumble, UT!
9298 * Article Display::             Display various stuff---X-Face, Picons, Smileys
9299 * Article Signature::           What is a signature?
9300 * Article Miscellanea::         Various other stuff.
9301 @end menu
9302
9303
9304 @node Article Highlighting
9305 @subsection Article Highlighting
9306 @cindex highlighting
9307
9308 Not only do you want your article buffer to look like fruit salad, but
9309 you want it to look like technicolor fruit salad.
9310
9311 @table @kbd
9312
9313 @item W H a
9314 @kindex W H a (Summary)
9315 @findex gnus-article-highlight
9316 @findex gnus-article-maybe-highlight
9317 Do much highlighting of the current article
9318 (@code{gnus-article-highlight}).  This function highlights header, cited
9319 text, the signature, and adds buttons to the body and the head.
9320
9321 @item W H h
9322 @kindex W H h (Summary)
9323 @findex gnus-article-highlight-headers
9324 @vindex gnus-header-face-alist
9325 Highlight the headers (@code{gnus-article-highlight-headers}).  The
9326 highlighting will be done according to the @code{gnus-header-face-alist}
9327 variable, which is a list where each element has the form
9328 @code{(@var{regexp} @var{name} @var{content})}.
9329 @var{regexp} is a regular expression for matching the
9330 header, @var{name} is the face used for highlighting the header name
9331 (@pxref{Faces and Fonts}) and @var{content} is the face for highlighting
9332 the header value.  The first match made will be used.  Note that
9333 @var{regexp} shouldn't have @samp{^} prepended---Gnus will add one.
9334
9335 @item W H c
9336 @kindex W H c (Summary)
9337 @findex gnus-article-highlight-citation
9338 Highlight cited text (@code{gnus-article-highlight-citation}).
9339
9340 Some variables to customize the citation highlights:
9341
9342 @table @code
9343 @vindex gnus-cite-parse-max-size
9344
9345 @item gnus-cite-parse-max-size
9346 If the article size in bytes is bigger than this variable (which is
9347 25000 by default), no citation highlighting will be performed.
9348
9349 @item gnus-cite-max-prefix
9350 @vindex gnus-cite-max-prefix
9351 Maximum possible length for a citation prefix (default 20).
9352
9353 @item gnus-cite-face-list
9354 @vindex gnus-cite-face-list
9355 List of faces used for highlighting citations (@pxref{Faces and Fonts}).
9356 When there are citations from multiple articles in the same message,
9357 Gnus will try to give each citation from each article its own face.
9358 This should make it easier to see who wrote what.
9359
9360 @item gnus-supercite-regexp
9361 @vindex gnus-supercite-regexp
9362 Regexp matching normal Supercite attribution lines.
9363
9364 @item gnus-supercite-secondary-regexp
9365 @vindex gnus-supercite-secondary-regexp
9366 Regexp matching mangled Supercite attribution lines.
9367
9368 @item gnus-cite-minimum-match-count
9369 @vindex gnus-cite-minimum-match-count
9370 Minimum number of identical prefixes we have to see before we believe
9371 that it's a citation.
9372
9373 @item gnus-cite-attribution-prefix
9374 @vindex gnus-cite-attribution-prefix
9375 Regexp matching the beginning of an attribution line.
9376
9377 @item gnus-cite-attribution-suffix
9378 @vindex gnus-cite-attribution-suffix
9379 Regexp matching the end of an attribution line.
9380
9381 @item gnus-cite-attribution-face
9382 @vindex gnus-cite-attribution-face
9383 Face used for attribution lines.  It is merged with the face for the
9384 cited text belonging to the attribution.
9385
9386 @item gnus-cite-ignore-quoted-from
9387 @vindex gnus-cite-ignore-quoted-from
9388 If non-@code{nil}, no citation highlighting will be performed on lines
9389 beginning with @samp{>From }.  Those lines may have been quoted by MTAs
9390 in order not to mix up with the envelope From line.  The default value
9391 is @code{t}.
9392
9393 @end table
9394
9395
9396 @item W H s
9397 @kindex W H s (Summary)
9398 @vindex gnus-signature-separator
9399 @vindex gnus-signature-face
9400 @findex gnus-article-highlight-signature
9401 Highlight the signature (@code{gnus-article-highlight-signature}).
9402 Everything after @code{gnus-signature-separator} (@pxref{Article
9403 Signature}) in an article will be considered a signature and will be
9404 highlighted with @code{gnus-signature-face}, which is @code{italic} by
9405 default.
9406
9407 @end table
9408
9409 @xref{Customizing Articles}, for how to highlight articles automatically.
9410
9411
9412 @node Article Fontisizing
9413 @subsection Article Fontisizing
9414 @cindex emphasis
9415 @cindex article emphasis
9416
9417 @findex gnus-article-emphasize
9418 @kindex W e (Summary)
9419 People commonly add emphasis to words in news articles by writing things
9420 like @samp{_this_} or @samp{*this*} or @samp{/this/}.  Gnus can make
9421 this look nicer by running the article through the @kbd{W e}
9422 (@code{gnus-article-emphasize}) command.
9423
9424 @vindex gnus-emphasis-alist
9425 How the emphasis is computed is controlled by the
9426 @code{gnus-emphasis-alist} variable.  This is an alist where the first
9427 element is a regular expression to be matched.  The second is a number
9428 that says what regular expression grouping is used to find the entire
9429 emphasized word.  The third is a number that says what regexp grouping
9430 should be displayed and highlighted.  (The text between these two
9431 groupings will be hidden.)  The fourth is the face used for
9432 highlighting.
9433
9434 @lisp
9435 (setq gnus-emphasis-alist
9436       '(("_\\(\\w+\\)_" 0 1 gnus-emphasis-underline)
9437         ("\\*\\(\\w+\\)\\*" 0 1 gnus-emphasis-bold)))
9438 @end lisp
9439
9440 @cindex slash
9441 @cindex asterisk
9442 @cindex underline
9443 @cindex /
9444 @cindex *
9445
9446 @vindex gnus-emphasis-underline
9447 @vindex gnus-emphasis-bold
9448 @vindex gnus-emphasis-italic
9449 @vindex gnus-emphasis-underline-bold
9450 @vindex gnus-emphasis-underline-italic
9451 @vindex gnus-emphasis-bold-italic
9452 @vindex gnus-emphasis-underline-bold-italic
9453 By default, there are seven rules, and they use the following faces:
9454 @code{gnus-emphasis-bold}, @code{gnus-emphasis-italic},
9455 @code{gnus-emphasis-underline}, @code{gnus-emphasis-bold-italic},
9456 @code{gnus-emphasis-underline-italic},
9457 @code{gnus-emphasis-underline-bold}, and
9458 @code{gnus-emphasis-underline-bold-italic}.
9459
9460 If you want to change these faces, you can either use @kbd{M-x
9461 customize}, or you can use @code{copy-face}.  For instance, if you want
9462 to make @code{gnus-emphasis-italic} use a red face instead, you could
9463 say something like:
9464
9465 @lisp
9466 (copy-face 'red 'gnus-emphasis-italic)
9467 @end lisp
9468
9469 @vindex gnus-group-highlight-words-alist
9470
9471 If you want to highlight arbitrary words, you can use the
9472 @code{gnus-group-highlight-words-alist} variable, which uses the same
9473 syntax as @code{gnus-emphasis-alist}.  The @code{highlight-words} group
9474 parameter (@pxref{Group Parameters}) can also be used.
9475
9476 @xref{Customizing Articles}, for how to fontize articles automatically.
9477
9478
9479 @node Article Hiding
9480 @subsection Article Hiding
9481 @cindex article hiding
9482
9483 Or rather, hiding certain things in each article.  There usually is much
9484 too much cruft in most articles.
9485
9486 @table @kbd
9487
9488 @item W W a
9489 @kindex W W a (Summary)
9490 @findex gnus-article-hide
9491 Do quite a lot of hiding on the article buffer
9492 (@kbd{gnus-article-hide}).  In particular, this function will hide
9493 headers, @acronym{PGP}, cited text and the signature.
9494
9495 @item W W h
9496 @kindex W W h (Summary)
9497 @findex gnus-article-hide-headers
9498 Hide headers (@code{gnus-article-hide-headers}).  @xref{Hiding
9499 Headers}.
9500
9501 @item W W b
9502 @kindex W W b (Summary)
9503 @findex gnus-article-hide-boring-headers
9504 Hide headers that aren't particularly interesting
9505 (@code{gnus-article-hide-boring-headers}).  @xref{Hiding Headers}.
9506
9507 @item W W s
9508 @kindex W W s (Summary)
9509 @findex gnus-article-hide-signature
9510 Hide signature (@code{gnus-article-hide-signature}).  @xref{Article
9511 Signature}.
9512
9513 @item W W l
9514 @kindex W W l (Summary)
9515 @findex gnus-article-hide-list-identifiers
9516 @vindex gnus-list-identifiers
9517 Strip list identifiers specified in @code{gnus-list-identifiers}.  These
9518 are strings some mailing list servers add to the beginning of all
9519 @code{Subject} headers---for example, @samp{[zebra 4711]}.  Any leading
9520 @samp{Re: } is skipped before stripping.  @code{gnus-list-identifiers}
9521 may not contain @code{\\(..\\)}.
9522
9523 @table @code
9524
9525 @item gnus-list-identifiers
9526 @vindex gnus-list-identifiers
9527 A regular expression that matches list identifiers to be removed from
9528 subject.  This can also be a list of regular expressions.
9529
9530 @end table
9531
9532 @item W W P
9533 @kindex W W P (Summary)
9534 @findex gnus-article-hide-pem
9535 Hide @acronym{PEM} (privacy enhanced messages) cruft
9536 (@code{gnus-article-hide-pem}).
9537
9538 @item W W B
9539 @kindex W W B (Summary)
9540 @findex gnus-article-strip-banner
9541 @vindex gnus-article-banner-alist
9542 @vindex gnus-article-address-banner-alist
9543 @cindex banner
9544 @cindex OneList
9545 @cindex stripping advertisements
9546 @cindex advertisements
9547 Strip the banner specified by the @code{banner} group parameter
9548 (@code{gnus-article-strip-banner}).  This is mainly used to hide those
9549 annoying banners and/or signatures that some mailing lists and moderated
9550 groups adds to all the messages.  The way to use this function is to add
9551 the @code{banner} group parameter (@pxref{Group Parameters}) to the
9552 group you want banners stripped from.  The parameter either be a string,
9553 which will be interpreted as a regular expression matching text to be
9554 removed, or the symbol @code{signature}, meaning that the (last)
9555 signature should be removed, or other symbol, meaning that the
9556 corresponding regular expression in @code{gnus-article-banner-alist} is
9557 used.
9558
9559 Regardless of a group, you can hide things like advertisements only when
9560 the sender of an article has a certain mail address specified in
9561 @code{gnus-article-address-banner-alist}.
9562
9563 @table @code
9564
9565 @item gnus-article-address-banner-alist
9566 @vindex gnus-article-address-banner-alist
9567 Alist of mail addresses and banners.  Each element has the form
9568 @code{(@var{address} . @var{banner})}, where @var{address} is a regexp
9569 matching a mail address in the From header, @var{banner} is one of a
9570 symbol @code{signature}, an item in @code{gnus-article-banner-alist},
9571 a regexp and @code{nil}.  If @var{address} matches author's mail
9572 address, it will remove things like advertisements.  For example, if a
9573 sender has the mail address @samp{hail@@yoo-hoo.co.jp} and there is a
9574 banner something like @samp{Do You Yoo-hoo!?} in all articles he
9575 sends, you can use the following element to remove them:
9576
9577 @lisp
9578 ("@@yoo-hoo\\.co\\.jp\\'" .
9579  "\n_+\nDo You Yoo-hoo!\\?\n.*\n.*\n")
9580 @end lisp
9581
9582 @end table
9583
9584 @item W W c
9585 @kindex W W c (Summary)
9586 @findex gnus-article-hide-citation
9587 Hide citation (@code{gnus-article-hide-citation}).  Some variables for
9588 customizing the hiding:
9589
9590 @table @code
9591
9592 @item gnus-cited-opened-text-button-line-format
9593 @itemx gnus-cited-closed-text-button-line-format
9594 @vindex gnus-cited-closed-text-button-line-format
9595 @vindex gnus-cited-opened-text-button-line-format
9596 Gnus adds buttons to show where the cited text has been hidden, and to
9597 allow toggle hiding the text.  The format of the variable is specified
9598 by these format-like variable (@pxref{Formatting Variables}).  These
9599 specs are valid:
9600
9601 @table @samp
9602 @item b
9603 Starting point of the hidden text.
9604 @item e
9605 Ending point of the hidden text.
9606 @item l
9607 Number of characters in the hidden region.
9608 @item n
9609 Number of lines of hidden text.
9610 @end table
9611
9612 @item gnus-cited-lines-visible
9613 @vindex gnus-cited-lines-visible
9614 The number of lines at the beginning of the cited text to leave
9615 shown.  This can also be a cons cell with the number of lines at the top
9616 and bottom of the text, respectively, to remain visible.
9617
9618 @end table
9619
9620 @item W W C-c
9621 @kindex W W C-c (Summary)
9622 @findex gnus-article-hide-citation-maybe
9623
9624 Hide citation (@code{gnus-article-hide-citation-maybe}) depending on the
9625 following two variables:
9626
9627 @table @code
9628 @item gnus-cite-hide-percentage
9629 @vindex gnus-cite-hide-percentage
9630 If the cited text is of a bigger percentage than this variable (default
9631 50), hide the cited text.
9632
9633 @item gnus-cite-hide-absolute
9634 @vindex gnus-cite-hide-absolute
9635 The cited text must have at least this length (default 10) before it
9636 is hidden.
9637 @end table
9638
9639 @item W W C
9640 @kindex W W C (Summary)
9641 @findex gnus-article-hide-citation-in-followups
9642 Hide cited text in articles that aren't roots
9643 (@code{gnus-article-hide-citation-in-followups}).  This isn't very
9644 useful as an interactive command, but might be a handy function to stick
9645 have happen automatically (@pxref{Customizing Articles}).
9646
9647 @end table
9648
9649 All these ``hiding'' commands are toggles, but if you give a negative
9650 prefix to these commands, they will show what they have previously
9651 hidden.  If you give a positive prefix, they will always hide.
9652
9653 Also @pxref{Article Highlighting} for further variables for
9654 citation customization.
9655
9656 @xref{Customizing Articles}, for how to hide article elements
9657 automatically.
9658
9659
9660 @node Article Washing
9661 @subsection Article Washing
9662 @cindex washing
9663 @cindex article washing
9664
9665 We call this ``article washing'' for a really good reason.  Namely, the
9666 @kbd{A} key was taken, so we had to use the @kbd{W} key instead.
9667
9668 @dfn{Washing} is defined by us as ``changing something from something to
9669 something else'', but normally results in something looking better.
9670 Cleaner, perhaps.
9671
9672 @xref{Customizing Articles}, if you want to change how Gnus displays
9673 articles by default.
9674
9675 @table @kbd
9676
9677 @item C-u g
9678 This is not really washing, it's sort of the opposite of washing.  If
9679 you type this, you see the article exactly as it exists on disk or on
9680 the server.
9681
9682 @item g
9683 Force redisplaying of the current article
9684 (@code{gnus-summary-show-article}).  This is also not really washing.
9685 If you type this, you see the article without any previously applied
9686 interactive Washing functions but with all default treatments
9687 (@pxref{Customizing Articles}).
9688
9689 @item W l
9690 @kindex W l (Summary)
9691 @findex gnus-summary-stop-page-breaking
9692 Remove page breaks from the current article
9693 (@code{gnus-summary-stop-page-breaking}).  @xref{Misc Article}, for page
9694 delimiters.
9695
9696 @item W r
9697 @kindex W r (Summary)
9698 @findex gnus-summary-caesar-message
9699 @c @icon{gnus-summary-caesar-message}
9700 Do a Caesar rotate (rot13) on the article buffer
9701 (@code{gnus-summary-caesar-message}).
9702 Unreadable articles that tell you to read them with Caesar rotate or rot13.
9703 (Typically offensive jokes and such.)
9704
9705 It's commonly called ``rot13'' because each letter is rotated 13
9706 positions in the alphabet, e. g. @samp{B} (letter #2) -> @samp{O} (letter
9707 #15).  It is sometimes referred to as ``Caesar rotate'' because Caesar
9708 is rumored to have employed this form of, uh, somewhat weak encryption.
9709
9710 @item W m
9711 @kindex W m (Summary)
9712 @findex gnus-summary-morse-message
9713 Morse decode the article buffer (@code{gnus-summary-morse-message}).
9714
9715 @item W i
9716 @kindex W i (Summary)
9717 @findex gnus-summary-idna-message
9718 Decode IDNA encoded domain names in the current articles.  IDNA
9719 encoded domain names looks like @samp{xn--bar}.  If a string remain
9720 unencoded after running invoking this, it is likely an invalid IDNA
9721 string (@samp{xn--bar} is invalid).  You must have GNU Libidn
9722 (@url{http://www.gnu.org/software/libidn/}) installed for this command
9723 to work.
9724
9725 @item W t
9726 @item t
9727 @kindex W t (Summary)
9728 @kindex t (Summary)
9729 @findex gnus-summary-toggle-header
9730 Toggle whether to display all headers in the article buffer
9731 (@code{gnus-summary-toggle-header}).
9732
9733 @item W v
9734 @kindex W v (Summary)
9735 @findex gnus-summary-verbose-headers
9736 Toggle whether to display all headers in the article buffer permanently
9737 (@code{gnus-summary-verbose-headers}).
9738
9739 @item W o
9740 @kindex W o (Summary)
9741 @findex gnus-article-treat-overstrike
9742 Treat overstrike (@code{gnus-article-treat-overstrike}).
9743
9744 @item W d
9745 @kindex W d (Summary)
9746 @findex gnus-article-treat-dumbquotes
9747 @vindex gnus-article-dumbquotes-map
9748 @cindex Smartquotes
9749 @cindex M****s*** sm*rtq**t*s
9750 @cindex Latin 1
9751 Treat M****s*** sm*rtq**t*s according to
9752 @code{gnus-article-dumbquotes-map}
9753 (@code{gnus-article-treat-dumbquotes}).  Note that this function guesses
9754 whether a character is a sm*rtq**t* or not, so it should only be used
9755 interactively.
9756
9757 Sm*rtq**t*s are M****s***'s unilateral extension to the character map in
9758 an attempt to provide more quoting characters.  If you see something
9759 like @code{\222} or @code{\264} where you're expecting some kind of
9760 apostrophe or quotation mark, then try this wash.
9761
9762 @item W Y f
9763 @kindex W Y f (Summary)
9764 @findex gnus-article-outlook-deuglify-article
9765 @cindex Outlook Express
9766 Full deuglify of broken Outlook (Express) articles: Treat dumbquotes,
9767 unwrap lines, repair attribution and rearrange citation.
9768 (@code{gnus-article-outlook-deuglify-article}).
9769
9770 @item W Y u
9771 @kindex W Y u (Summary)
9772 @findex gnus-article-outlook-unwrap-lines
9773 @vindex gnus-outlook-deuglify-unwrap-min
9774 @vindex gnus-outlook-deuglify-unwrap-max
9775 Unwrap lines that appear to be wrapped citation lines.  You can control
9776 what lines will be unwrapped by frobbing
9777 @code{gnus-outlook-deuglify-unwrap-min} and
9778 @code{gnus-outlook-deuglify-unwrap-max}, indicating the minimum and
9779 maximum length of an unwrapped citation line.
9780 (@code{gnus-article-outlook-unwrap-lines}).
9781
9782 @item W Y a
9783 @kindex W Y a (Summary)
9784 @findex gnus-article-outlook-repair-attribution
9785 Repair a broken attribution line.@*
9786 (@code{gnus-article-outlook-repair-attribution}).
9787
9788 @item W Y c
9789 @kindex W Y c (Summary)
9790 @findex gnus-article-outlook-rearrange-citation
9791 Repair broken citations by rearranging the text.
9792 (@code{gnus-article-outlook-rearrange-citation}).
9793
9794 @item W w
9795 @kindex W w (Summary)
9796 @findex gnus-article-fill-cited-article
9797 Do word wrap (@code{gnus-article-fill-cited-article}).
9798
9799 You can give the command a numerical prefix to specify the width to use
9800 when filling.
9801
9802 @item W Q
9803 @kindex W Q (Summary)
9804 @findex gnus-article-fill-long-lines
9805 Fill long lines (@code{gnus-article-fill-long-lines}).
9806
9807 @item W C
9808 @kindex W C (Summary)
9809 @findex gnus-article-capitalize-sentences
9810 Capitalize the first word in each sentence
9811 (@code{gnus-article-capitalize-sentences}).
9812
9813 @item W c
9814 @kindex W c (Summary)
9815 @findex gnus-article-remove-cr
9816 Translate CRLF pairs (i. e., @samp{^M}s on the end of the lines) into LF
9817 (this takes care of DOS line endings), and then translate any remaining
9818 CRs into LF (this takes care of Mac line endings)
9819 (@code{gnus-article-remove-cr}).
9820
9821 @item W q
9822 @kindex W q (Summary)
9823 @findex gnus-article-de-quoted-unreadable
9824 Treat quoted-printable (@code{gnus-article-de-quoted-unreadable}).
9825 Quoted-Printable is one common @acronym{MIME} encoding employed when
9826 sending non-@acronym{ASCII} (i.e., 8-bit) articles.  It typically
9827 makes strings like @samp{d@'ej@`a vu} look like @samp{d=E9j=E0 vu},
9828 which doesn't look very readable to me.  Note that this is usually
9829 done automatically by Gnus if the message in question has a
9830 @code{Content-Transfer-Encoding} header that says that this encoding
9831 has been done.  If a prefix is given, a charset will be asked for.
9832
9833 @item W 6
9834 @kindex W 6 (Summary)
9835 @findex gnus-article-de-base64-unreadable
9836 Treat base64 (@code{gnus-article-de-base64-unreadable}).  Base64 is
9837 one common @acronym{MIME} encoding employed when sending
9838 non-@acronym{ASCII} (i.e., 8-bit) articles.  Note that this is
9839 usually done automatically by Gnus if the message in question has a
9840 @code{Content-Transfer-Encoding} header that says that this encoding
9841 has been done.  If a prefix is given, a charset will be asked for.
9842
9843 @item W Z
9844 @kindex W Z (Summary)
9845 @findex gnus-article-decode-HZ
9846 Treat HZ or HZP (@code{gnus-article-decode-HZ}).  HZ (or HZP) is one
9847 common encoding employed when sending Chinese articles.  It typically
9848 makes strings look like @samp{~@{<:Ky2;S@{#,NpJ)l6HK!#~@}}.
9849
9850 @item W A
9851 @kindex W A (Summary)
9852 @findex gnus-article-treat-ansi-sequences
9853 @cindex @acronym{ANSI} control sequences
9854 Translate @acronym{ANSI} SGR control sequences into overlays or
9855 extents (@code{gnus-article-treat-ansi-sequences}).  @acronym{ANSI}
9856 sequences are used in some Chinese hierarchies for highlighting.
9857
9858 @item W u
9859 @kindex W u (Summary)
9860 @findex gnus-article-unsplit-urls
9861 Remove newlines from within URLs.  Some mailers insert newlines into
9862 outgoing email messages to keep lines short.  This reformatting can
9863 split long URLs onto multiple lines.  Repair those URLs by removing
9864 the newlines (@code{gnus-article-unsplit-urls}).
9865
9866 @item W h
9867 @kindex W h (Summary)
9868 @findex gnus-article-wash-html
9869 Treat @acronym{HTML} (@code{gnus-article-wash-html}).  Note that this is
9870 usually done automatically by Gnus if the message in question has a
9871 @code{Content-Type} header that says that the message is @acronym{HTML}.
9872
9873 If a prefix is given, a charset will be asked for.  If it is a number,
9874 the charset defined in @code{gnus-summary-show-article-charset-alist}
9875 (@pxref{Paging the Article}) will be used.
9876
9877 @vindex gnus-article-wash-function
9878 The default is to use the function specified by
9879 @code{mm-text-html-renderer} (@pxref{Display Customization, ,Display
9880 Customization, emacs-mime, The Emacs MIME Manual}) to convert the
9881 @acronym{HTML}, but this is controlled by the
9882 @code{gnus-article-wash-function} variable.  Pre-defined functions you
9883 can use include:
9884
9885 @table @code
9886 @item w3
9887 Use Emacs/W3.
9888
9889 @item w3m
9890 Use @uref{http://emacs-w3m.namazu.org/, emacs-w3m}.
9891
9892 @item w3m-standalone
9893 Use @uref{http://w3m.sourceforge.net/, w3m}.
9894
9895 @item links
9896 Use @uref{http://links.sf.net/, Links}.
9897
9898 @item lynx
9899 Use @uref{http://lynx.isc.org/, Lynx}.
9900
9901 @item html2text
9902 Use html2text---a simple @acronym{HTML} converter included with Gnus.
9903
9904 @end table
9905
9906 @item W b
9907 @kindex W b (Summary)
9908 @findex gnus-article-add-buttons
9909 Add clickable buttons to the article (@code{gnus-article-add-buttons}).
9910 @xref{Article Buttons}.
9911
9912 @item W B
9913 @kindex W B (Summary)
9914 @findex gnus-article-add-buttons-to-head
9915 Add clickable buttons to the article headers
9916 (@code{gnus-article-add-buttons-to-head}).
9917
9918 @item W p
9919 @kindex W p (Summary)
9920 @findex gnus-article-verify-x-pgp-sig
9921 Verify a signed control message
9922 (@code{gnus-article-verify-x-pgp-sig}).  Control messages such as
9923 @code{newgroup} and @code{checkgroups} are usually signed by the
9924 hierarchy maintainer.  You need to add the @acronym{PGP} public key of
9925 the maintainer to your keyring to verify the
9926 message.@footnote{@acronym{PGP} keys for many hierarchies are
9927 available at @uref{ftp://ftp.isc.org/pub/pgpcontrol/README.html}}
9928
9929 @item W s
9930 @kindex W s (Summary)
9931 @findex gnus-summary-force-verify-and-decrypt
9932 Verify a signed (@acronym{PGP}, @acronym{PGP/MIME} or
9933 @acronym{S/MIME}) message
9934 (@code{gnus-summary-force-verify-and-decrypt}). @xref{Security}.
9935
9936 @item W a
9937 @kindex W a (Summary)
9938 @findex gnus-article-strip-headers-in-body
9939 Strip headers like the @code{X-No-Archive} header from the beginning of
9940 article bodies (@code{gnus-article-strip-headers-in-body}).
9941
9942 @item W E l
9943 @kindex W E l (Summary)
9944 @findex gnus-article-strip-leading-blank-lines
9945 Remove all blank lines from the beginning of the article
9946 (@code{gnus-article-strip-leading-blank-lines}).
9947
9948 @item W E m
9949 @kindex W E m (Summary)
9950 @findex gnus-article-strip-multiple-blank-lines
9951 Replace all blank lines with empty lines and then all multiple empty
9952 lines with a single empty line.
9953 (@code{gnus-article-strip-multiple-blank-lines}).
9954
9955 @item W E t
9956 @kindex W E t (Summary)
9957 @findex gnus-article-remove-trailing-blank-lines
9958 Remove all blank lines at the end of the article
9959 (@code{gnus-article-remove-trailing-blank-lines}).
9960
9961 @item W E a
9962 @kindex W E a (Summary)
9963 @findex gnus-article-strip-blank-lines
9964 Do all the three commands above
9965 (@code{gnus-article-strip-blank-lines}).
9966
9967 @item W E A
9968 @kindex W E A (Summary)
9969 @findex gnus-article-strip-all-blank-lines
9970 Remove all blank lines
9971 (@code{gnus-article-strip-all-blank-lines}).
9972
9973 @item W E s
9974 @kindex W E s (Summary)
9975 @findex gnus-article-strip-leading-space
9976 Remove all white space from the beginning of all lines of the article
9977 body (@code{gnus-article-strip-leading-space}).
9978
9979 @item W E e
9980 @kindex W E e (Summary)
9981 @findex gnus-article-strip-trailing-space
9982 Remove all white space from the end of all lines of the article
9983 body (@code{gnus-article-strip-trailing-space}).
9984
9985 @end table
9986
9987 @xref{Customizing Articles}, for how to wash articles automatically.
9988
9989
9990 @node Article Header
9991 @subsection Article Header
9992
9993 These commands perform various transformations of article header.
9994
9995 @table @kbd
9996
9997 @item W G u
9998 @kindex W G u (Summary)
9999 @findex gnus-article-treat-unfold-headers
10000 Unfold folded header lines (@code{gnus-article-treat-unfold-headers}).
10001
10002 @item W G n
10003 @kindex W G n (Summary)
10004 @findex gnus-article-treat-fold-newsgroups
10005 Fold the @code{Newsgroups} and @code{Followup-To} headers
10006 (@code{gnus-article-treat-fold-newsgroups}).
10007
10008 @item W G f
10009 @kindex W G f (Summary)
10010 @findex gnus-article-treat-fold-headers
10011 Fold all the message headers
10012 (@code{gnus-article-treat-fold-headers}).
10013
10014 @item W E w
10015 @kindex W E w (Summary)
10016 @findex gnus-article-remove-leading-whitespace
10017 Remove excessive whitespace from all headers
10018 (@code{gnus-article-remove-leading-whitespace}).
10019
10020 @end table
10021
10022
10023 @node Article Buttons
10024 @subsection Article Buttons
10025 @cindex buttons
10026
10027 People often include references to other stuff in articles, and it would
10028 be nice if Gnus could just fetch whatever it is that people talk about
10029 with the minimum of fuzz when you hit @kbd{RET} or use the middle mouse
10030 button on these references.
10031
10032 @vindex gnus-button-man-handler
10033 Gnus adds @dfn{buttons} to certain standard references by default:
10034 Well-formed URLs, mail addresses, Message-IDs, Info links, man pages and
10035 Emacs or Gnus related references.  This is controlled by two variables,
10036 one that handles article bodies and one that handles article heads:
10037
10038 @table @code
10039
10040 @item gnus-button-alist
10041 @vindex gnus-button-alist
10042 This is an alist where each entry has this form:
10043
10044 @lisp
10045 (@var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
10046 @end lisp
10047
10048 @table @var
10049
10050 @item regexp
10051 All text that match this regular expression (case insensitive) will be
10052 considered an external reference.  Here's a typical regexp that matches
10053 embedded URLs: @samp{<URL:\\([^\n\r>]*\\)>}.  This can also be a
10054 variable containing a regexp, useful variables to use include
10055 @code{gnus-button-url-regexp} and @code{gnus-button-mid-or-mail-regexp}.
10056
10057 @item button-par
10058 Gnus has to know which parts of the matches is to be highlighted.  This
10059 is a number that says what sub-expression of the regexp is to be
10060 highlighted.  If you want it all highlighted, you use 0 here.
10061
10062 @item use-p
10063 This form will be @code{eval}ed, and if the result is non-@code{nil},
10064 this is considered a match.  This is useful if you want extra sifting to
10065 avoid false matches.  Often variables named
10066 @code{gnus-button-@var{*}-level} are used here, @xref{Article Button
10067 Levels}, but any other form may be used too.
10068
10069 @c @code{use-p} is @code{eval}ed only if @code{regexp} matches.
10070
10071 @item function
10072 This function will be called when you click on this button.
10073
10074 @item data-par
10075 As with @var{button-par}, this is a sub-expression number, but this one
10076 says which part of the match is to be sent as data to @var{function}.
10077
10078 @end table
10079
10080 So the full entry for buttonizing URLs is then
10081
10082 @lisp
10083 ("<URL:\\([^\n\r>]*\\)>" 0 t gnus-button-url 1)
10084 @end lisp
10085
10086 @item gnus-header-button-alist
10087 @vindex gnus-header-button-alist
10088 This is just like the other alist, except that it is applied to the
10089 article head only, and that each entry has an additional element that is
10090 used to say what headers to apply the buttonize coding to:
10091
10092 @lisp
10093 (@var{header} @var{regexp} @var{button-par} @var{use-p} @var{function} @var{data-par})
10094 @end lisp
10095
10096 @var{header} is a regular expression.
10097 @end table
10098
10099 @subsubsection Related variables and functions
10100
10101 @table @code
10102 @item gnus-button-@var{*}-level
10103 @xref{Article Button Levels}.
10104
10105 @c Stuff related to gnus-button-browse-level
10106
10107 @item gnus-button-url-regexp
10108 @vindex gnus-button-url-regexp
10109 A regular expression that matches embedded URLs.  It is used in the
10110 default values of the variables above.
10111
10112 @c Stuff related to gnus-button-man-level
10113
10114 @item gnus-button-man-handler
10115 @vindex gnus-button-man-handler
10116 The function to use for displaying man pages.  It must take at least one
10117 argument with a string naming the man page.
10118
10119 @c Stuff related to gnus-button-message-level
10120
10121 @item gnus-button-mid-or-mail-regexp
10122 @vindex gnus-button-mid-or-mail-regexp
10123 Regular expression that matches a message ID or a mail address.
10124
10125 @item gnus-button-prefer-mid-or-mail
10126 @vindex gnus-button-prefer-mid-or-mail
10127 This variable determines what to do when the button on a string as
10128 @samp{foo123@@bar.invalid} is pushed.  Strings like this can be either a
10129 message ID or a mail address.  If it is one of the symbols @code{mid} or
10130 @code{mail}, Gnus will always assume that the string is a message ID or
10131 a mail address, respectively.  If this variable is set to the symbol
10132 @code{ask}, always query the user what to do.  If it is a function, this
10133 function will be called with the string as its only argument.  The
10134 function must return @code{mid}, @code{mail}, @code{invalid} or
10135 @code{ask}.  The default value is the function
10136 @code{gnus-button-mid-or-mail-heuristic}.
10137
10138 @item gnus-button-mid-or-mail-heuristic
10139 @findex gnus-button-mid-or-mail-heuristic
10140 Function that guesses whether its argument is a message ID or a mail
10141 address.  Returns @code{mid} if it's a message IDs, @code{mail} if
10142 it's a mail address, @code{ask} if unsure and @code{invalid} if the
10143 string is invalid.
10144
10145 @item gnus-button-mid-or-mail-heuristic-alist
10146 @vindex gnus-button-mid-or-mail-heuristic-alist
10147 An alist of @code{(RATE . REGEXP)} pairs used by the function
10148 @code{gnus-button-mid-or-mail-heuristic}.
10149
10150 @c Stuff related to gnus-button-tex-level
10151
10152 @item gnus-button-ctan-handler
10153 @findex gnus-button-ctan-handler
10154 The function to use for displaying CTAN links.  It must take one
10155 argument, the string naming the URL.
10156
10157 @item gnus-ctan-url
10158 @vindex gnus-ctan-url
10159 Top directory of a CTAN (Comprehensive TeX Archive Network) archive used
10160 by @code{gnus-button-ctan-handler}.
10161
10162 @c Misc stuff
10163
10164 @item gnus-article-button-face
10165 @vindex gnus-article-button-face
10166 Face used on buttons.
10167
10168 @item gnus-article-mouse-face
10169 @vindex gnus-article-mouse-face
10170 Face used when the mouse cursor is over a button.
10171
10172 @end table
10173
10174 @xref{Customizing Articles}, for how to buttonize articles automatically.
10175
10176
10177 @node Article Button Levels
10178 @subsection Article button levels
10179 @cindex button levels
10180 The higher the value of the variables @code{gnus-button-@var{*}-level},
10181 the more buttons will appear.  If the level is zero, no corresponding
10182 buttons are displayed.  With the default value (which is 5) you should
10183 already see quite a lot of buttons.  With higher levels, you will see
10184 more buttons, but you may also get more false positives.  To avoid them,
10185 you can set the variables @code{gnus-button-@var{*}-level} local to
10186 specific groups (@pxref{Group Parameters}).  Here's an example for the
10187 variable @code{gnus-parameters}:
10188
10189 @lisp
10190 ;; @r{increase @code{gnus-button-*-level} in some groups:}
10191 (setq gnus-parameters
10192       '(("\\<\\(emacs\\|gnus\\)\\>" (gnus-button-emacs-level 10))
10193         ("\\<unix\\>"               (gnus-button-man-level 10))
10194         ("\\<tex\\>"                (gnus-button-tex-level 10))))
10195 @end lisp
10196
10197 @table @code
10198
10199 @item gnus-button-browse-level
10200 @vindex gnus-button-browse-level
10201 Controls the display of references to message IDs, mail addresses and
10202 news URLs.  Related variables and functions include
10203 @code{gnus-button-url-regexp}, @code{browse-url}, and
10204 @code{browse-url-browser-function}.
10205
10206 @item gnus-button-emacs-level
10207 @vindex gnus-button-emacs-level
10208 Controls the display of Emacs or Gnus references.  Related functions are
10209 @code{gnus-button-handle-custom},
10210 @code{gnus-button-handle-describe-function},
10211 @code{gnus-button-handle-describe-variable},
10212 @code{gnus-button-handle-symbol},
10213 @code{gnus-button-handle-describe-key},
10214 @code{gnus-button-handle-apropos},
10215 @code{gnus-button-handle-apropos-command},
10216 @code{gnus-button-handle-apropos-variable},
10217 @code{gnus-button-handle-apropos-documentation}, and
10218 @code{gnus-button-handle-library}.
10219
10220 @item gnus-button-man-level
10221 @vindex gnus-button-man-level
10222 Controls the display of references to (Unix) man pages.
10223 See @code{gnus-button-man-handler}.
10224
10225 @item gnus-button-message-level
10226 @vindex gnus-button-message-level
10227 Controls the display of message IDs, mail addresses and news URLs.
10228 Related variables and functions include
10229 @code{gnus-button-mid-or-mail-regexp},
10230 @code{gnus-button-prefer-mid-or-mail},
10231 @code{gnus-button-mid-or-mail-heuristic}, and
10232 @code{gnus-button-mid-or-mail-heuristic-alist}.
10233
10234 @item gnus-button-tex-level
10235 @vindex gnus-button-tex-level
10236 Controls the display of references to @TeX{} or LaTeX stuff, e.g. for CTAN
10237 URLs.  See the variables @code{gnus-ctan-url},
10238 @code{gnus-button-ctan-handler},
10239 @code{gnus-button-ctan-directory-regexp}, and
10240 @code{gnus-button-handle-ctan-bogus-regexp}.
10241
10242 @end table
10243
10244
10245 @node Article Date
10246 @subsection Article Date
10247
10248 The date is most likely generated in some obscure timezone you've never
10249 heard of, so it's quite nice to be able to find out what the time was
10250 when the article was sent.
10251
10252 @table @kbd
10253
10254 @item W T u
10255 @kindex W T u (Summary)
10256 @findex gnus-article-date-ut
10257 Display the date in UT (aka. GMT, aka ZULU)
10258 (@code{gnus-article-date-ut}).
10259
10260 @item W T i
10261 @kindex W T i (Summary)
10262 @findex gnus-article-date-iso8601
10263 @cindex ISO 8601
10264 Display the date in international format, aka. ISO 8601
10265 (@code{gnus-article-date-iso8601}).
10266
10267 @item W T l
10268 @kindex W T l (Summary)
10269 @findex gnus-article-date-local
10270 Display the date in the local timezone (@code{gnus-article-date-local}).
10271
10272 @item W T p
10273 @kindex W T p (Summary)
10274 @findex gnus-article-date-english
10275 Display the date in a format that's easily pronounceable in English
10276 (@code{gnus-article-date-english}).
10277
10278 @item W T s
10279 @kindex W T s (Summary)
10280 @vindex gnus-article-time-format
10281 @findex gnus-article-date-user
10282 @findex format-time-string
10283 Display the date using a user-defined format
10284 (@code{gnus-article-date-user}).  The format is specified by the
10285 @code{gnus-article-time-format} variable, and is a string that's passed
10286 to @code{format-time-string}.  See the documentation of that variable
10287 for a list of possible format specs.
10288
10289 @item W T e
10290 @kindex W T e (Summary)
10291 @findex gnus-article-date-lapsed
10292 @findex gnus-start-date-timer
10293 @findex gnus-stop-date-timer
10294 Say how much time has elapsed between the article was posted and now
10295 (@code{gnus-article-date-lapsed}).  It looks something like:
10296
10297 @example
10298 X-Sent: 6 weeks, 4 days, 1 hour, 3 minutes, 8 seconds ago
10299 @end example
10300
10301 @vindex gnus-article-date-lapsed-new-header
10302 The value of @code{gnus-article-date-lapsed-new-header} determines
10303 whether this header will just be added below the old Date one, or will
10304 replace it.
10305
10306 An advantage of using Gnus to read mail is that it converts simple bugs
10307 into wonderful absurdities.
10308
10309 If you want to have this line updated continually, you can put
10310
10311 @lisp
10312 (gnus-start-date-timer)
10313 @end lisp
10314
10315 in your @file{~/.gnus.el} file, or you can run it off of some hook.  If
10316 you want to stop the timer, you can use the @code{gnus-stop-date-timer}
10317 command.
10318
10319 @item W T o
10320 @kindex W T o (Summary)
10321 @findex gnus-article-date-original
10322 Display the original date (@code{gnus-article-date-original}).  This can
10323 be useful if you normally use some other conversion function and are
10324 worried that it might be doing something totally wrong.  Say, claiming
10325 that the article was posted in 1854.  Although something like that is
10326 @emph{totally} impossible.  Don't you trust me? *titter*
10327
10328 @end table
10329
10330 @xref{Customizing Articles}, for how to display the date in your
10331 preferred format automatically.
10332
10333
10334 @node Article Display
10335 @subsection Article Display
10336 @cindex picons
10337 @cindex x-face
10338 @cindex smileys
10339
10340 These commands add various frivolous display gimmicks to the article
10341 buffer in Emacs versions that support them.
10342
10343 @code{X-Face} headers are small black-and-white images supplied by the
10344 message headers (@pxref{X-Face}).
10345
10346 @code{Face} headers are small colored images supplied by the message
10347 headers (@pxref{Face}).
10348
10349 Smileys are those little @samp{:-)} symbols that people like to litter
10350 their messages with (@pxref{Smileys}).
10351
10352 Picons, on the other hand, reside on your own system, and Gnus will
10353 try to match the headers to what you have (@pxref{Picons}).
10354
10355 All these functions are toggles---if the elements already exist,
10356 they'll be removed.
10357
10358 @table @kbd
10359 @item W D x
10360 @kindex W D x (Summary)
10361 @findex gnus-article-display-x-face
10362 Display an @code{X-Face} in the @code{From} header.
10363 (@code{gnus-article-display-x-face}).
10364
10365 @item W D d
10366 @kindex W D d (Summary)
10367 @findex gnus-article-display-face
10368 Display a @code{Face} in the @code{From} header.
10369 (@code{gnus-article-display-face}).
10370
10371 @item W D s
10372 @kindex W D s (Summary)
10373 @findex gnus-treat-smiley
10374 Display smileys (@code{gnus-treat-smiley}).
10375
10376 @item W D f
10377 @kindex W D f (Summary)
10378 @findex gnus-treat-from-picon
10379 Piconify the @code{From} header (@code{gnus-treat-from-picon}).
10380
10381 @item W D m
10382 @kindex W D m (Summary)
10383 @findex gnus-treat-mail-picon
10384 Piconify all mail headers (i. e., @code{Cc}, @code{To})
10385 (@code{gnus-treat-mail-picon}).
10386
10387 @item W D n
10388 @kindex W D n (Summary)
10389 @findex gnus-treat-newsgroups-picon
10390 Piconify all news headers (i. e., @code{Newsgroups} and
10391 @code{Followup-To}) (@code{gnus-treat-newsgroups-picon}).
10392
10393 @item W D D
10394 @kindex W D D (Summary)
10395 @findex gnus-article-remove-images
10396 Remove all images from the article buffer
10397 (@code{gnus-article-remove-images}).
10398
10399 @end table
10400
10401
10402
10403 @node Article Signature
10404 @subsection Article Signature
10405 @cindex signatures
10406 @cindex article signature
10407
10408 @vindex gnus-signature-separator
10409 Each article is divided into two parts---the head and the body.  The
10410 body can be divided into a signature part and a text part.  The variable
10411 that says what is to be considered a signature is
10412 @code{gnus-signature-separator}.  This is normally the standard
10413 @samp{^-- $} as mandated by son-of-RFC 1036.  However, many people use
10414 non-standard signature separators, so this variable can also be a list
10415 of regular expressions to be tested, one by one.  (Searches are done
10416 from the end of the body towards the beginning.)  One likely value is:
10417
10418 @lisp
10419 (setq gnus-signature-separator
10420       '("^-- $"         ; @r{The standard}
10421         "^-- *$"        ; @r{A common mangling}
10422         "^-------*$"    ; @r{Many people just use a looong}
10423                         ; @r{line of dashes.  Shame!}
10424         "^ *--------*$" ; @r{Double-shame!}
10425         "^________*$"   ; @r{Underscores are also popular}
10426         "^========*$")) ; @r{Pervert!}
10427 @end lisp
10428
10429 The more permissive you are, the more likely it is that you'll get false
10430 positives.
10431
10432 @vindex gnus-signature-limit
10433 @code{gnus-signature-limit} provides a limit to what is considered a
10434 signature when displaying articles.
10435
10436 @enumerate
10437 @item
10438 If it is an integer, no signature may be longer (in characters) than
10439 that integer.
10440 @item
10441 If it is a floating point number, no signature may be longer (in lines)
10442 than that number.
10443 @item
10444 If it is a function, the function will be called without any parameters,
10445 and if it returns @code{nil}, there is no signature in the buffer.
10446 @item
10447 If it is a string, it will be used as a regexp.  If it matches, the text
10448 in question is not a signature.
10449 @end enumerate
10450
10451 This variable can also be a list where the elements may be of the types
10452 listed above.  Here's an example:
10453
10454 @lisp
10455 (setq gnus-signature-limit
10456       '(200.0 "^---*Forwarded article"))
10457 @end lisp
10458
10459 This means that if there are more than 200 lines after the signature
10460 separator, or the text after the signature separator is matched by
10461 the regular expression @samp{^---*Forwarded article}, then it isn't a
10462 signature after all.
10463
10464
10465 @node Article Miscellanea
10466 @subsection Article Miscellanea
10467
10468 @table @kbd
10469 @item A t
10470 @kindex A t (Summary)
10471 @findex gnus-article-babel
10472 Translate the article from one language to another
10473 (@code{gnus-article-babel}).
10474
10475 @end table
10476
10477
10478 @node MIME Commands
10479 @section MIME Commands
10480 @cindex MIME decoding
10481 @cindex attachments
10482 @cindex viewing attachments
10483
10484 The following commands all understand the numerical prefix.  For
10485 instance, @kbd{3 K v} means ``view the third @acronym{MIME} part''.
10486
10487 @table @kbd
10488 @item b
10489 @itemx K v
10490 @kindex b (Summary)
10491 @kindex K v (Summary)
10492 View the @acronym{MIME} part.
10493
10494 @item K o
10495 @kindex K o (Summary)
10496 Save the @acronym{MIME} part.
10497
10498 @item K O
10499 @kindex K O (Summary)
10500 Prompt for a file name, then save the @acronym{MIME} part and strip it
10501 from the article.  The stripped @acronym{MIME} object will be referred
10502 via the message/external-body @acronym{MIME} type.
10503
10504 @item K r
10505 @kindex K r (Summary)
10506 Replace the @acronym{MIME} part with an external body.
10507
10508 @item K d
10509 @kindex K d (Summary)
10510 Delete the @acronym{MIME} part and add some information about the
10511 removed part.
10512
10513 @item K c
10514 @kindex K c (Summary)
10515 Copy the @acronym{MIME} part.
10516
10517 @item K e
10518 @kindex K e (Summary)
10519 View the @acronym{MIME} part externally.
10520
10521 @item K i
10522 @kindex K i (Summary)
10523 View the @acronym{MIME} part internally.
10524
10525 @item K |
10526 @kindex K | (Summary)
10527 Pipe the @acronym{MIME} part to an external command.
10528 @end table
10529
10530 The rest of these @acronym{MIME} commands do not use the numerical prefix in
10531 the same manner:
10532
10533 @table @kbd
10534 @item K H
10535 @kindex K H (Summary)
10536 @findex gnus-article-browse-html-article
10537 View @samp{text/html} parts of the current article with a WWW browser.
10538 Inline images embedded in a message using the @code{cid} scheme, as they
10539 are generally considered to be safe, will be processed properly.  The
10540 message header is added to the beginning of every @acronym{HTML} part
10541 unless the prefix argument is given.
10542
10543 Warning: Spammers use links to images (using the @code{http} scheme) in
10544 @acronym{HTML} articles to verify whether you have read the message.  As
10545 this command passes the @acronym{HTML} content to the browser without
10546 eliminating these ``web bugs'' you should only use it for mails from
10547 trusted senders.
10548
10549 If you always want to display @acronym{HTML} parts in the browser, set
10550 @code{mm-text-html-renderer} to @code{nil}.
10551
10552 This command creates temporary files to pass @acronym{HTML} contents
10553 including images if any to the browser, and deletes them when exiting
10554 the group (if you want).
10555
10556 @item K b
10557 @kindex K b (Summary)
10558 Make all the @acronym{MIME} parts have buttons in front of them.  This is
10559 mostly useful if you wish to save (or perform other actions) on inlined
10560 parts.
10561
10562 @item K m
10563 @kindex K m (Summary)
10564 @findex gnus-summary-repair-multipart
10565 Some multipart messages are transmitted with missing or faulty headers.
10566 This command will attempt to ``repair'' these messages so that they can
10567 be viewed in a more pleasant manner
10568 (@code{gnus-summary-repair-multipart}).
10569
10570 @item X m
10571 @kindex X m (Summary)
10572 @findex gnus-summary-save-parts
10573 Save all parts matching a @acronym{MIME} type to a directory
10574 (@code{gnus-summary-save-parts}).  Understands the process/prefix
10575 convention (@pxref{Process/Prefix}).
10576
10577 @item M-t
10578 @kindex M-t (Summary)
10579 @findex gnus-summary-toggle-display-buttonized
10580 Toggle the buttonized display of the article buffer
10581 (@code{gnus-summary-toggle-display-buttonized}).
10582
10583 @item W M w
10584 @kindex W M w (Summary)
10585 @findex gnus-article-decode-mime-words
10586 Decode RFC 2047-encoded words in the article headers
10587 (@code{gnus-article-decode-mime-words}).
10588
10589 @item W M c
10590 @kindex W M c (Summary)
10591 @findex gnus-article-decode-charset
10592 Decode encoded article bodies as well as charsets
10593 (@code{gnus-article-decode-charset}).
10594
10595 This command looks in the @code{Content-Type} header to determine the
10596 charset.  If there is no such header in the article, you can give it a
10597 prefix, which will prompt for the charset to decode as.  In regional
10598 groups where people post using some common encoding (but do not
10599 include @acronym{MIME} headers), you can set the @code{charset} group/topic
10600 parameter to the required charset (@pxref{Group Parameters}).
10601
10602 @item W M v
10603 @kindex W M v (Summary)
10604 @findex gnus-mime-view-all-parts
10605 View all the @acronym{MIME} parts in the current article
10606 (@code{gnus-mime-view-all-parts}).
10607
10608 @end table
10609
10610 Relevant variables:
10611
10612 @table @code
10613 @item gnus-ignored-mime-types
10614 @vindex gnus-ignored-mime-types
10615 This is a list of regexps.  @acronym{MIME} types that match a regexp from
10616 this list will be completely ignored by Gnus.  The default value is
10617 @code{nil}.
10618
10619 To have all Vcards be ignored, you'd say something like this:
10620
10621 @lisp
10622 (setq gnus-ignored-mime-types
10623       '("text/x-vcard"))
10624 @end lisp
10625
10626 @item gnus-article-loose-mime
10627 @vindex gnus-article-loose-mime
10628 If non-@code{nil}, Gnus won't require the @samp{MIME-Version} header
10629 before interpreting the message as a @acronym{MIME} message.  This helps
10630 when reading messages from certain broken mail user agents.  The
10631 default is @code{t}.
10632
10633 @item gnus-article-emulate-mime
10634 @vindex gnus-article-emulate-mime
10635 @cindex uuencode
10636 @cindex yEnc
10637 There are other, non-@acronym{MIME} encoding methods used.  The most common
10638 is @samp{uuencode}, but yEncode is also getting to be popular.  If
10639 this variable is non-@code{nil}, Gnus will look in message bodies to
10640 see if it finds these encodings, and if so, it'll run them through the
10641 Gnus @acronym{MIME} machinery.  The default is @code{t}.  Only
10642 single-part yEnc encoded attachments can be decoded.  There's no support
10643 for encoding in Gnus.
10644
10645 @item gnus-unbuttonized-mime-types
10646 @vindex gnus-unbuttonized-mime-types
10647 This is a list of regexps.  @acronym{MIME} types that match a regexp from
10648 this list won't have @acronym{MIME} buttons inserted unless they aren't
10649 displayed or this variable is overridden by
10650 @code{gnus-buttonized-mime-types}.  The default value is
10651 @code{(".*/.*")}.  This variable is only used when
10652 @code{gnus-inhibit-mime-unbuttonizing} is @code{nil}.
10653
10654 @item gnus-buttonized-mime-types
10655 @vindex gnus-buttonized-mime-types
10656 This is a list of regexps.  @acronym{MIME} types that match a regexp from
10657 this list will have @acronym{MIME} buttons inserted unless they aren't
10658 displayed.  This variable overrides
10659 @code{gnus-unbuttonized-mime-types}.  The default value is @code{nil}.
10660 This variable is only used when @code{gnus-inhibit-mime-unbuttonizing}
10661 is @code{nil}.
10662
10663 To see e.g. security buttons but no other buttons, you could set this
10664 variable to @code{("multipart/signed")} and leave
10665 @code{gnus-unbuttonized-mime-types} at the default value.
10666
10667 You could also add @code{"multipart/alternative"} to this list to
10668 display radio buttons that allow you to choose one of two media types
10669 those mails include.  See also @code{mm-discouraged-alternatives}
10670 (@pxref{Display Customization, ,Display Customization, emacs-mime, The
10671 Emacs MIME Manual}).
10672
10673 @item gnus-inhibit-mime-unbuttonizing
10674 @vindex gnus-inhibit-mime-unbuttonizing
10675 If this is non-@code{nil}, then all @acronym{MIME} parts get buttons.  The
10676 default value is @code{nil}.
10677
10678 @item gnus-article-mime-part-function
10679 @vindex gnus-article-mime-part-function
10680 For each @acronym{MIME} part, this function will be called with the @acronym{MIME}
10681 handle as the parameter.  The function is meant to be used to allow
10682 users to gather information from the article (e. g., add Vcard info to
10683 the bbdb database) or to do actions based on parts (e. g., automatically
10684 save all jpegs into some directory).
10685
10686 Here's an example function the does the latter:
10687
10688 @lisp
10689 (defun my-save-all-jpeg-parts (handle)
10690   (when (equal (car (mm-handle-type handle)) "image/jpeg")
10691     (with-temp-buffer
10692       (insert (mm-get-part handle))
10693       (write-region (point-min) (point-max)
10694                     (read-file-name "Save jpeg to: ")))))
10695 (setq gnus-article-mime-part-function
10696       'my-save-all-jpeg-parts)
10697 @end lisp
10698
10699 @vindex gnus-mime-multipart-functions
10700 @item gnus-mime-multipart-functions
10701 Alist of @acronym{MIME} multipart types and functions to handle them.
10702
10703 @vindex gnus-mime-display-multipart-alternative-as-mixed
10704 @item gnus-mime-display-multipart-alternative-as-mixed
10705 Display "multipart/alternative" parts as "multipart/mixed".
10706
10707 @vindex gnus-mime-display-multipart-related-as-mixed
10708 @item gnus-mime-display-multipart-related-as-mixed
10709 Display "multipart/related" parts as "multipart/mixed".
10710
10711 If displaying @samp{text/html} is discouraged, see
10712 @code{mm-discouraged-alternatives}, images or other material inside a
10713 "multipart/related" part might be overlooked when this variable is
10714 @code{nil}.  @ref{Display Customization, Display Customization, ,
10715 emacs-mime, Emacs-Mime Manual}.
10716
10717 @vindex gnus-mime-display-multipart-as-mixed
10718 @item gnus-mime-display-multipart-as-mixed
10719 Display "multipart" parts as "multipart/mixed".  If @code{t}, it
10720 overrides @code{nil} values of
10721 @code{gnus-mime-display-multipart-alternative-as-mixed} and
10722 @code{gnus-mime-display-multipart-related-as-mixed}.
10723
10724 @vindex mm-file-name-rewrite-functions
10725 @item mm-file-name-rewrite-functions
10726 List of functions used for rewriting file names of @acronym{MIME} parts.
10727 Each function takes a file name as input and returns a file name.
10728
10729 Ready-made functions include@*
10730 @code{mm-file-name-delete-whitespace},
10731 @code{mm-file-name-trim-whitespace},
10732 @code{mm-file-name-collapse-whitespace}, and
10733 @code{mm-file-name-replace-whitespace}.  The later uses the value of
10734 the variable @code{mm-file-name-replace-whitespace} to replace each
10735 whitespace character in a file name with that string; default value
10736 is @code{"_"} (a single underscore).
10737 @findex mm-file-name-delete-whitespace
10738 @findex mm-file-name-trim-whitespace
10739 @findex mm-file-name-collapse-whitespace
10740 @findex mm-file-name-replace-whitespace
10741 @vindex mm-file-name-replace-whitespace
10742
10743 The standard functions @code{capitalize}, @code{downcase},
10744 @code{upcase}, and @code{upcase-initials} may be useful, too.
10745
10746 Everybody knows that whitespace characters in file names are evil,
10747 except those who don't know.  If you receive lots of attachments from
10748 such unenlightened users, you can make live easier by adding
10749
10750 @lisp
10751 (setq mm-file-name-rewrite-functions
10752       '(mm-file-name-trim-whitespace
10753         mm-file-name-collapse-whitespace
10754         mm-file-name-replace-whitespace))
10755 @end lisp
10756
10757 @noindent
10758 to your @file{~/.gnus.el} file.
10759
10760 @end table
10761
10762
10763 @node Charsets
10764 @section Charsets
10765 @cindex charsets
10766
10767 People use different charsets, and we have @acronym{MIME} to let us know what
10768 charsets they use.  Or rather, we wish we had.  Many people use
10769 newsreaders and mailers that do not understand or use @acronym{MIME}, and
10770 just send out messages without saying what character sets they use.  To
10771 help a bit with this, some local news hierarchies have policies that say
10772 what character set is the default.  For instance, the @samp{fj}
10773 hierarchy uses @code{iso-2022-jp}.
10774
10775 @vindex gnus-group-charset-alist
10776 This knowledge is encoded in the @code{gnus-group-charset-alist}
10777 variable, which is an alist of regexps (use the first item to match full
10778 group names) and default charsets to be used when reading these groups.
10779
10780 @vindex gnus-newsgroup-ignored-charsets
10781 In addition, some people do use soi-disant @acronym{MIME}-aware agents that
10782 aren't.  These blithely mark messages as being in @code{iso-8859-1}
10783 even if they really are in @code{koi-8}.  To help here, the
10784 @code{gnus-newsgroup-ignored-charsets} variable can be used.  The
10785 charsets that are listed here will be ignored.  The variable can be
10786 set on a group-by-group basis using the group parameters (@pxref{Group
10787 Parameters}).  The default value is @code{(unknown-8bit x-unknown)},
10788 which includes values some agents insist on having in there.
10789
10790 @vindex gnus-group-posting-charset-alist
10791 When posting, @code{gnus-group-posting-charset-alist} is used to
10792 determine which charsets should not be encoded using the @acronym{MIME}
10793 encodings.  For instance, some hierarchies discourage using
10794 quoted-printable header encoding.
10795
10796 This variable is an alist of regexps and permitted unencoded charsets
10797 for posting.  Each element of the alist has the form @code{(}@var{test
10798 header body-list}@code{)}, where:
10799
10800 @table @var
10801 @item test
10802 is either a regular expression matching the newsgroup header or a
10803 variable to query,
10804 @item header
10805 is the charset which may be left unencoded in the header (@code{nil}
10806 means encode all charsets),
10807 @item body-list
10808 is a list of charsets which may be encoded using 8bit content-transfer
10809 encoding in the body, or one of the special values @code{nil} (always
10810 encode using quoted-printable) or @code{t} (always use 8bit).
10811 @end table
10812
10813 @cindex Russian
10814 @cindex koi8-r
10815 @cindex koi8-u
10816 @cindex iso-8859-5
10817 @cindex coding system aliases
10818 @cindex preferred charset
10819
10820 @xref{Encoding Customization, , Encoding Customization, emacs-mime,
10821 The Emacs MIME Manual}, for additional variables that control which
10822 MIME charsets are used when sending messages.
10823
10824 Other charset tricks that may be useful, although not Gnus-specific:
10825
10826 If there are several @acronym{MIME} charsets that encode the same Emacs
10827 charset, you can choose what charset to use by saying the following:
10828
10829 @lisp
10830 (put-charset-property 'cyrillic-iso8859-5
10831                       'preferred-coding-system 'koi8-r)
10832 @end lisp
10833
10834 This means that Russian will be encoded using @code{koi8-r} instead of
10835 the default @code{iso-8859-5} @acronym{MIME} charset.
10836
10837 If you want to read messages in @code{koi8-u}, you can cheat and say
10838
10839 @lisp
10840 (define-coding-system-alias 'koi8-u 'koi8-r)
10841 @end lisp
10842
10843 This will almost do the right thing.
10844
10845 And finally, to read charsets like @code{windows-1251}, you can say
10846 something like
10847
10848 @lisp
10849 (codepage-setup 1251)
10850 (define-coding-system-alias 'windows-1251 'cp1251)
10851 @end lisp
10852
10853
10854 @node Article Commands
10855 @section Article Commands
10856
10857 @table @kbd
10858
10859 @item A P
10860 @cindex PostScript
10861 @cindex printing
10862 @kindex A P (Summary)
10863 @vindex gnus-ps-print-hook
10864 @findex gnus-summary-print-article
10865 Generate and print a PostScript image of the article buffer
10866 (@code{gnus-summary-print-article}).  @code{gnus-ps-print-hook} will
10867 be run just before printing the buffer.  An alternative way to print
10868 article is to use Muttprint (@pxref{Saving Articles}).
10869
10870 @end table
10871
10872
10873 @node Summary Sorting
10874 @section Summary Sorting
10875 @cindex summary sorting
10876
10877 You can have the summary buffer sorted in various ways, even though I
10878 can't really see why you'd want that.
10879
10880 @table @kbd
10881
10882 @item C-c C-s C-n
10883 @kindex C-c C-s C-n (Summary)
10884 @findex gnus-summary-sort-by-number
10885 Sort by article number (@code{gnus-summary-sort-by-number}).
10886
10887 @item C-c C-s C-m C-n
10888 @kindex C-c C-s C-n (Summary)
10889 @findex gnus-summary-sort-by-most-recent-number
10890 Sort by most recent article number
10891 (@code{gnus-summary-sort-by-most-recent-number}).
10892
10893 @item C-c C-s C-a
10894 @kindex C-c C-s C-a (Summary)
10895 @findex gnus-summary-sort-by-author
10896 Sort by author (@code{gnus-summary-sort-by-author}).
10897
10898 @item C-c C-s C-t
10899 @kindex C-c C-s C-t (Summary)
10900 @findex gnus-summary-sort-by-recipient
10901 Sort by recipient (@code{gnus-summary-sort-by-recipient}).
10902
10903 @item C-c C-s C-s
10904 @kindex C-c C-s C-s (Summary)
10905 @findex gnus-summary-sort-by-subject
10906 Sort by subject (@code{gnus-summary-sort-by-subject}).
10907
10908 @item C-c C-s C-d
10909 @kindex C-c C-s C-d (Summary)
10910 @findex gnus-summary-sort-by-date
10911 Sort by date (@code{gnus-summary-sort-by-date}).
10912
10913 @item C-c C-s C-m C-d
10914 @kindex C-c C-s C-m C-d (Summary)
10915 @findex gnus-summary-sort-by-most-recent-date
10916 Sort by most recent date (@code{gnus-summary-sort-by-most-recent-date}).
10917
10918 @item C-c C-s C-l
10919 @kindex C-c C-s C-l (Summary)
10920 @findex gnus-summary-sort-by-lines
10921 Sort by lines (@code{gnus-summary-sort-by-lines}).
10922
10923 @item C-c C-s C-c
10924 @kindex C-c C-s C-c (Summary)
10925 @findex gnus-summary-sort-by-chars
10926 Sort by article length (@code{gnus-summary-sort-by-chars}).
10927
10928 @item C-c C-s C-i
10929 @kindex C-c C-s C-i (Summary)
10930 @findex gnus-summary-sort-by-score
10931 Sort by score (@code{gnus-summary-sort-by-score}).
10932
10933 @item C-c C-s C-r
10934 @kindex C-c C-s C-r (Summary)
10935 @findex gnus-summary-sort-by-random
10936 Randomize (@code{gnus-summary-sort-by-random}).
10937
10938 @item C-c C-s C-o
10939 @kindex C-c C-s C-o (Summary)
10940 @findex gnus-summary-sort-by-original
10941 Sort using the default sorting method
10942 (@code{gnus-summary-sort-by-original}).
10943 @end table
10944
10945 These functions will work both when you use threading and when you don't
10946 use threading.  In the latter case, all summary lines will be sorted,
10947 line by line.  In the former case, sorting will be done on a
10948 root-by-root basis, which might not be what you were looking for.  To
10949 toggle whether to use threading, type @kbd{T T} (@pxref{Thread
10950 Commands}).
10951
10952 If a prefix argument if given, the sort order is reversed.
10953
10954
10955 @node Finding the Parent
10956 @section Finding the Parent
10957 @cindex parent articles
10958 @cindex referring articles
10959
10960 @table @kbd
10961 @item ^
10962 @kindex ^ (Summary)
10963 @findex gnus-summary-refer-parent-article
10964 If you'd like to read the parent of the current article, and it is not
10965 displayed in the summary buffer, you might still be able to.  That is,
10966 if the current group is fetched by @acronym{NNTP}, the parent hasn't expired
10967 and the @code{References} in the current article are not mangled, you
10968 can just press @kbd{^} or @kbd{A r}
10969 (@code{gnus-summary-refer-parent-article}).  If everything goes well,
10970 you'll get the parent.  If the parent is already displayed in the
10971 summary buffer, point will just move to this article.
10972
10973 If given a positive numerical prefix, fetch that many articles back into
10974 the ancestry.  If given a negative numerical prefix, fetch just that
10975 ancestor.  So if you say @kbd{3 ^}, Gnus will fetch the parent, the
10976 grandparent and the grandgrandparent of the current article.  If you say
10977 @kbd{-3 ^}, Gnus will only fetch the grandgrandparent of the current
10978 article.
10979
10980 @item A R (Summary)
10981 @findex gnus-summary-refer-references
10982 @kindex A R (Summary)
10983 Fetch all articles mentioned in the @code{References} header of the
10984 article (@code{gnus-summary-refer-references}).
10985
10986 @item A T (Summary)
10987 @findex gnus-summary-refer-thread
10988 @kindex A T (Summary)
10989 Display the full thread where the current article appears
10990 (@code{gnus-summary-refer-thread}).  This command has to fetch all the
10991 headers in the current group to work, so it usually takes a while.  If
10992 you do it often, you may consider setting @code{gnus-fetch-old-headers}
10993 to @code{invisible} (@pxref{Filling In Threads}).  This won't have any
10994 visible effects normally, but it'll make this command work a whole lot
10995 faster.  Of course, it'll make group entry somewhat slow.
10996
10997 @vindex gnus-refer-thread-limit
10998 The @code{gnus-refer-thread-limit} variable says how many old (i. e.,
10999 articles before the first displayed in the current group) headers to
11000 fetch when doing this command.  The default is 200.  If @code{t}, all
11001 the available headers will be fetched.  This variable can be overridden
11002 by giving the @kbd{A T} command a numerical prefix.
11003
11004 @item M-^ (Summary)
11005 @findex gnus-summary-refer-article
11006 @kindex M-^ (Summary)
11007 @cindex Message-ID
11008 @cindex fetching by Message-ID
11009 You can also ask Gnus for an arbitrary article, no matter what group it
11010 belongs to.  @kbd{M-^} (@code{gnus-summary-refer-article}) will ask you
11011 for a @code{Message-ID}, which is one of those long, hard-to-read
11012 thingies that look something like @samp{<38o6up$6f2@@hymir.ifi.uio.no>}.
11013 You have to get it all exactly right.  No fuzzy searches, I'm afraid.
11014
11015 Gnus looks for the @code{Message-ID} in the headers that have already
11016 been fetched, but also tries all the select methods specified by
11017 @code{gnus-refer-article-method} if it is not found.
11018 @end table
11019
11020 @vindex gnus-refer-article-method
11021 If the group you are reading is located on a back end that does not
11022 support fetching by @code{Message-ID} very well (like @code{nnspool}),
11023 you can set @code{gnus-refer-article-method} to an @acronym{NNTP} method.  It
11024 would, perhaps, be best if the @acronym{NNTP} server you consult is the one
11025 updating the spool you are reading from, but that's not really
11026 necessary.
11027
11028 It can also be a list of select methods, as well as the special symbol
11029 @code{current}, which means to use the current select method.  If it
11030 is a list, Gnus will try all the methods in the list until it finds a
11031 match.
11032
11033 Here's an example setting that will first try the current method, and
11034 then ask Google if that fails:
11035
11036 @lisp
11037 (setq gnus-refer-article-method
11038       '(current
11039         (nnweb "google" (nnweb-type google))))
11040 @end lisp
11041
11042 Most of the mail back ends support fetching by @code{Message-ID}, but
11043 do not do a particularly excellent job at it.  That is, @code{nnmbox},
11044 @code{nnbabyl}, @code{nnmaildir}, @code{nnml}, are able to locate
11045 articles from any groups, while @code{nnfolder}, and @code{nnimap} are
11046 only able to locate articles that have been posted to the current
11047 group.  (Anything else would be too time consuming.)  @code{nnmh} does
11048 not support this at all.
11049
11050
11051 @node Alternative Approaches
11052 @section Alternative Approaches
11053
11054 Different people like to read news using different methods.  This being
11055 Gnus, we offer a small selection of minor modes for the summary buffers.
11056
11057 @menu
11058 * Pick and Read::               First mark articles and then read them.
11059 * Binary Groups::               Auto-decode all articles.
11060 @end menu
11061
11062
11063 @node Pick and Read
11064 @subsection Pick and Read
11065 @cindex pick and read
11066
11067 Some newsreaders (like @code{nn} and, uhm, @code{Netnews} on VM/CMS) use
11068 a two-phased reading interface.  The user first marks in a summary
11069 buffer the articles she wants to read.  Then she starts reading the
11070 articles with just an article buffer displayed.
11071
11072 @findex gnus-pick-mode
11073 @kindex M-x gnus-pick-mode
11074 Gnus provides a summary buffer minor mode that allows
11075 this---@code{gnus-pick-mode}.  This basically means that a few process
11076 mark commands become one-keystroke commands to allow easy marking, and
11077 it provides one additional command for switching to the summary buffer.
11078
11079 Here are the available keystrokes when using pick mode:
11080
11081 @table @kbd
11082 @item .
11083 @kindex . (Pick)
11084 @findex gnus-pick-article-or-thread
11085 Pick the article or thread on the current line
11086 (@code{gnus-pick-article-or-thread}).  If the variable
11087 @code{gnus-thread-hide-subtree} is true, then this key selects the
11088 entire thread when used at the first article of the thread.  Otherwise,
11089 it selects just the article.  If given a numerical prefix, go to that
11090 thread or article and pick it.  (The line number is normally displayed
11091 at the beginning of the summary pick lines.)
11092
11093 @item SPACE
11094 @kindex SPACE (Pick)
11095 @findex gnus-pick-next-page
11096 Scroll the summary buffer up one page (@code{gnus-pick-next-page}).  If
11097 at the end of the buffer, start reading the picked articles.
11098
11099 @item u
11100 @kindex u (Pick)
11101 @findex gnus-pick-unmark-article-or-thread.
11102 Unpick the thread or article
11103 (@code{gnus-pick-unmark-article-or-thread}).  If the variable
11104 @code{gnus-thread-hide-subtree} is true, then this key unpicks the
11105 thread if used at the first article of the thread.  Otherwise it unpicks
11106 just the article.  You can give this key a numerical prefix to unpick
11107 the thread or article at that line.
11108
11109 @item RET
11110 @kindex RET (Pick)
11111 @findex gnus-pick-start-reading
11112 @vindex gnus-pick-display-summary
11113 Start reading the picked articles (@code{gnus-pick-start-reading}).  If
11114 given a prefix, mark all unpicked articles as read first.  If
11115 @code{gnus-pick-display-summary} is non-@code{nil}, the summary buffer
11116 will still be visible when you are reading.
11117
11118 @end table
11119
11120 All the normal summary mode commands are still available in the
11121 pick-mode, with the exception of @kbd{u}.  However @kbd{!} is available
11122 which is mapped to the same function
11123 @code{gnus-summary-tick-article-forward}.
11124
11125 If this sounds like a good idea to you, you could say:
11126
11127 @lisp
11128 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
11129 @end lisp
11130
11131 @vindex gnus-pick-mode-hook
11132 @code{gnus-pick-mode-hook} is run in pick minor mode buffers.
11133
11134 @vindex gnus-mark-unpicked-articles-as-read
11135 If @code{gnus-mark-unpicked-articles-as-read} is non-@code{nil}, mark
11136 all unpicked articles as read.  The default is @code{nil}.
11137
11138 @vindex gnus-summary-pick-line-format
11139 The summary line format in pick mode is slightly different from the
11140 standard format.  At the beginning of each line the line number is
11141 displayed.  The pick mode line format is controlled by the
11142 @code{gnus-summary-pick-line-format} variable (@pxref{Formatting
11143 Variables}).  It accepts the same format specs that
11144 @code{gnus-summary-line-format} does (@pxref{Summary Buffer Lines}).
11145
11146
11147 @node Binary Groups
11148 @subsection Binary Groups
11149 @cindex binary groups
11150
11151 @findex gnus-binary-mode
11152 @kindex M-x gnus-binary-mode
11153 If you spend much time in binary groups, you may grow tired of hitting
11154 @kbd{X u}, @kbd{n}, @kbd{RET} all the time.  @kbd{M-x gnus-binary-mode}
11155 is a minor mode for summary buffers that makes all ordinary Gnus article
11156 selection functions uudecode series of articles and display the result
11157 instead of just displaying the articles the normal way.
11158
11159 @kindex g (Binary)
11160 @findex gnus-binary-show-article
11161 The only way, in fact, to see the actual articles is the @kbd{g}
11162 command, when you have turned on this mode
11163 (@code{gnus-binary-show-article}).
11164
11165 @vindex gnus-binary-mode-hook
11166 @code{gnus-binary-mode-hook} is called in binary minor mode buffers.
11167
11168
11169 @node Tree Display
11170 @section Tree Display
11171 @cindex trees
11172
11173 @vindex gnus-use-trees
11174 If you don't like the normal Gnus summary display, you might try setting
11175 @code{gnus-use-trees} to @code{t}.  This will create (by default) an
11176 additional @dfn{tree buffer}.  You can execute all summary mode commands
11177 in the tree buffer.
11178
11179 There are a few variables to customize the tree display, of course:
11180
11181 @table @code
11182 @item gnus-tree-mode-hook
11183 @vindex gnus-tree-mode-hook
11184 A hook called in all tree mode buffers.
11185
11186 @item gnus-tree-mode-line-format
11187 @vindex gnus-tree-mode-line-format
11188 A format string for the mode bar in the tree mode buffers (@pxref{Mode
11189 Line Formatting}).  The default is @samp{Gnus: %%b %S %Z}.  For a list
11190 of valid specs, @pxref{Summary Buffer Mode Line}.
11191
11192 @item gnus-selected-tree-face
11193 @vindex gnus-selected-tree-face
11194 Face used for highlighting the selected article in the tree buffer.  The
11195 default is @code{modeline}.
11196
11197 @item gnus-tree-line-format
11198 @vindex gnus-tree-line-format
11199 A format string for the tree nodes.  The name is a bit of a misnomer,
11200 though---it doesn't define a line, but just the node.  The default value
11201 is @samp{%(%[%3,3n%]%)}, which displays the first three characters of
11202 the name of the poster.  It is vital that all nodes are of the same
11203 length, so you @emph{must} use @samp{%4,4n}-like specifiers.
11204
11205 Valid specs are:
11206
11207 @table @samp
11208 @item n
11209 The name of the poster.
11210 @item f
11211 The @code{From} header.
11212 @item N
11213 The number of the article.
11214 @item [
11215 The opening bracket.
11216 @item ]
11217 The closing bracket.
11218 @item s
11219 The subject.
11220 @end table
11221
11222 @xref{Formatting Variables}.
11223
11224 Variables related to the display are:
11225
11226 @table @code
11227 @item gnus-tree-brackets
11228 @vindex gnus-tree-brackets
11229 This is used for differentiating between ``real'' articles and
11230 ``sparse'' articles.  The format is
11231 @example
11232 ((@var{real-open} . @var{real-close})
11233  (@var{sparse-open} . @var{sparse-close})
11234  (@var{dummy-open} . @var{dummy-close}))
11235 @end example
11236 and the default is @code{((?[ . ?]) (?( . ?)) (?@{ . ?@}) (?< . ?>))}.
11237
11238 @item gnus-tree-parent-child-edges
11239 @vindex gnus-tree-parent-child-edges
11240 This is a list that contains the characters used for connecting parent
11241 nodes to their children.  The default is @code{(?- ?\\ ?|)}.
11242
11243 @end table
11244
11245 @item gnus-tree-minimize-window
11246 @vindex gnus-tree-minimize-window
11247 If this variable is non-@code{nil}, Gnus will try to keep the tree
11248 buffer as small as possible to allow more room for the other Gnus
11249 windows.  If this variable is a number, the tree buffer will never be
11250 higher than that number.  The default is @code{t}.  Note that if you
11251 have several windows displayed side-by-side in a frame and the tree
11252 buffer is one of these, minimizing the tree window will also resize all
11253 other windows displayed next to it.
11254
11255 You may also wish to add the following hook to keep the window minimized
11256 at all times:
11257
11258 @lisp
11259 (add-hook 'gnus-configure-windows-hook
11260           'gnus-tree-perhaps-minimize)
11261 @end lisp
11262
11263 @item gnus-generate-tree-function
11264 @vindex gnus-generate-tree-function
11265 @findex gnus-generate-horizontal-tree
11266 @findex gnus-generate-vertical-tree
11267 The function that actually generates the thread tree.  Two predefined
11268 functions are available: @code{gnus-generate-horizontal-tree} and
11269 @code{gnus-generate-vertical-tree} (which is the default).
11270
11271 @end table
11272
11273 Here's an example from a horizontal tree buffer:
11274
11275 @example
11276 @{***@}-(***)-[odd]-[Gun]
11277      |      \[Jan]
11278      |      \[odd]-[Eri]
11279      |      \(***)-[Eri]
11280      |            \[odd]-[Paa]
11281      \[Bjo]
11282      \[Gun]
11283      \[Gun]-[Jor]
11284 @end example
11285
11286 Here's the same thread displayed in a vertical tree buffer:
11287
11288 @example
11289 @group
11290 @{***@}
11291   |--------------------------\-----\-----\
11292 (***)                         [Bjo] [Gun] [Gun]
11293   |--\-----\-----\                          |
11294 [odd] [Jan] [odd] (***)                   [Jor]
11295   |           |     |--\
11296 [Gun]       [Eri] [Eri] [odd]
11297                           |
11298                         [Paa]
11299 @end group
11300 @end example
11301
11302 If you're using horizontal trees, it might be nice to display the trees
11303 side-by-side with the summary buffer.  You could add something like the
11304 following to your @file{~/.gnus.el} file:
11305
11306 @lisp
11307 (setq gnus-use-trees t
11308       gnus-generate-tree-function 'gnus-generate-horizontal-tree
11309       gnus-tree-minimize-window nil)
11310 (gnus-add-configuration
11311  '(article
11312    (vertical 1.0
11313              (horizontal 0.25
11314                          (summary 0.75 point)
11315                          (tree 1.0))
11316              (article 1.0))))
11317 @end lisp
11318
11319 @xref{Window Layout}.
11320
11321
11322 @node Mail Group Commands
11323 @section Mail Group Commands
11324 @cindex mail group commands
11325
11326 Some commands only make sense in mail groups.  If these commands are
11327 invalid in the current group, they will raise a hell and let you know.
11328
11329 All these commands (except the expiry and edit commands) use the
11330 process/prefix convention (@pxref{Process/Prefix}).
11331
11332 @table @kbd
11333
11334 @item B e
11335 @kindex B e (Summary)
11336 @findex gnus-summary-expire-articles
11337 @cindex expiring mail
11338 Run all expirable articles in the current group through the expiry
11339 process (@code{gnus-summary-expire-articles}).  That is, delete all
11340 expirable articles in the group that have been around for a while.
11341 (@pxref{Expiring Mail}).
11342
11343 @item B C-M-e
11344 @kindex B C-M-e (Summary)
11345 @findex gnus-summary-expire-articles-now
11346 @cindex expiring mail
11347 Delete all the expirable articles in the group
11348 (@code{gnus-summary-expire-articles-now}).  This means that @strong{all}
11349 articles eligible for expiry in the current group will
11350 disappear forever into that big @file{/dev/null} in the sky.
11351
11352 @item B DEL
11353 @kindex B DEL (Summary)
11354 @cindex deleting mail
11355 @findex gnus-summary-delete-article
11356 @c @icon{gnus-summary-mail-delete}
11357 Delete the mail article.  This is ``delete'' as in ``delete it from your
11358 disk forever and ever, never to return again.'' Use with caution.
11359 (@code{gnus-summary-delete-article}).
11360
11361 @item B m
11362 @kindex B m (Summary)
11363 @cindex move mail
11364 @findex gnus-summary-move-article
11365 @vindex gnus-preserve-marks
11366 Move the article from one mail group to another
11367 (@code{gnus-summary-move-article}).  Marks will be preserved if
11368 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
11369
11370 @item B c
11371 @kindex B c (Summary)
11372 @cindex copy mail
11373 @findex gnus-summary-copy-article
11374 @c @icon{gnus-summary-mail-copy}
11375 Copy the article from one group (mail group or not) to a mail group
11376 (@code{gnus-summary-copy-article}).  Marks will be preserved if
11377 @code{gnus-preserve-marks} is non-@code{nil} (which is the default).
11378
11379 @item B B
11380 @kindex B B (Summary)
11381 @cindex crosspost mail
11382 @findex gnus-summary-crosspost-article
11383 Crosspost the current article to some other group
11384 (@code{gnus-summary-crosspost-article}).  This will create a new copy of
11385 the article in the other group, and the Xref headers of the article will
11386 be properly updated.
11387
11388 @item B i
11389 @kindex B i (Summary)
11390 @findex gnus-summary-import-article
11391 Import an arbitrary file into the current mail newsgroup
11392 (@code{gnus-summary-import-article}).  You will be prompted for a file
11393 name, a @code{From} header and a @code{Subject} header.
11394
11395 @item B I
11396 @kindex B I (Summary)
11397 @findex gnus-summary-create-article
11398 Create an empty article in the current mail newsgroups
11399 (@code{gnus-summary-create-article}).  You will be prompted for a
11400 @code{From} header and a @code{Subject} header.
11401
11402 @item B r
11403 @kindex B r (Summary)
11404 @findex gnus-summary-respool-article
11405 @vindex gnus-summary-respool-default-method
11406 Respool the mail article (@code{gnus-summary-respool-article}).
11407 @code{gnus-summary-respool-default-method} will be used as the default
11408 select method when respooling.  This variable is @code{nil} by default,
11409 which means that the current group select method will be used instead.
11410 Marks will be preserved if @code{gnus-preserve-marks} is non-@code{nil}
11411 (which is the default).
11412
11413 @item B w
11414 @itemx e
11415 @kindex B w (Summary)
11416 @kindex e (Summary)
11417 @findex gnus-summary-edit-article
11418 @kindex C-c C-c (Article)
11419 @findex gnus-summary-edit-article-done
11420 Edit the current article (@code{gnus-summary-edit-article}).  To finish
11421 editing and make the changes permanent, type @kbd{C-c C-c}
11422 (@code{gnus-summary-edit-article-done}).  If you give a prefix to the
11423 @kbd{C-c C-c} command, Gnus won't re-highlight the article.
11424
11425 @item B q
11426 @kindex B q (Summary)
11427 @findex gnus-summary-respool-query
11428 If you want to re-spool an article, you might be curious as to what group
11429 the article will end up in before you do the re-spooling.  This command
11430 will tell you (@code{gnus-summary-respool-query}).
11431
11432 @item B t
11433 @kindex B t (Summary)
11434 @findex gnus-summary-respool-trace
11435 Similarly, this command will display all fancy splitting patterns used
11436 when respooling, if any (@code{gnus-summary-respool-trace}).
11437
11438 @item B p
11439 @kindex B p (Summary)
11440 @findex gnus-summary-article-posted-p
11441 Some people have a tendency to send you ``courtesy'' copies when they
11442 follow up to articles you have posted.  These usually have a
11443 @code{Newsgroups} header in them, but not always.  This command
11444 (@code{gnus-summary-article-posted-p}) will try to fetch the current
11445 article from your news server (or rather, from
11446 @code{gnus-refer-article-method} or @code{gnus-select-method}) and will
11447 report back whether it found the article or not.  Even if it says that
11448 it didn't find the article, it may have been posted anyway---mail
11449 propagation is much faster than news propagation, and the news copy may
11450 just not have arrived yet.
11451
11452 @item K E
11453 @kindex K E (Summary)
11454 @findex gnus-article-encrypt-body
11455 @vindex gnus-article-encrypt-protocol
11456 Encrypt the body of an article (@code{gnus-article-encrypt-body}).
11457 The body is encrypted with the encryption protocol specified by the
11458 variable @code{gnus-article-encrypt-protocol}.
11459
11460 @end table
11461
11462 @vindex gnus-move-split-methods
11463 @cindex moving articles
11464 If you move (or copy) articles regularly, you might wish to have Gnus
11465 suggest where to put the articles.  @code{gnus-move-split-methods} is a
11466 variable that uses the same syntax as @code{gnus-split-methods}
11467 (@pxref{Saving Articles}).  You may customize that variable to create
11468 suggestions you find reasonable.  (Note that
11469 @code{gnus-move-split-methods} uses group names where
11470 @code{gnus-split-methods} uses file names.)
11471
11472 @lisp
11473 (setq gnus-move-split-methods
11474       '(("^From:.*Lars Magne" "nnml:junk")
11475         ("^Subject:.*gnus" "nnfolder:important")
11476         (".*" "nnml:misc")))
11477 @end lisp
11478
11479
11480 @node Various Summary Stuff
11481 @section Various Summary Stuff
11482
11483 @menu
11484 * Summary Group Information::   Information oriented commands.
11485 * Searching for Articles::      Multiple article commands.
11486 * Summary Generation Commands::
11487 * Really Various Summary Commands::  Those pesky non-conformant commands.
11488 @end menu
11489
11490 @table @code
11491 @vindex gnus-summary-display-while-building
11492 @item gnus-summary-display-while-building
11493 If non-@code{nil}, show and update the summary buffer as it's being
11494 built.  If @code{t}, update the buffer after every line is inserted.
11495 If the value is an integer, @var{n}, update the display every @var{n}
11496 lines.  The default is @code{nil}.
11497
11498 @vindex gnus-summary-display-arrow
11499 @item gnus-summary-display-arrow
11500 If non-@code{nil}, display an arrow in the fringe to indicate the
11501 current article.
11502
11503 @vindex gnus-summary-mode-hook
11504 @item gnus-summary-mode-hook
11505 This hook is called when creating a summary mode buffer.
11506
11507 @vindex gnus-summary-generate-hook
11508 @item gnus-summary-generate-hook
11509 This is called as the last thing before doing the threading and the
11510 generation of the summary buffer.  It's quite convenient for customizing
11511 the threading variables based on what data the newsgroup has.  This hook
11512 is called from the summary buffer after most summary buffer variables
11513 have been set.
11514
11515 @vindex gnus-summary-prepare-hook
11516 @item gnus-summary-prepare-hook
11517 It is called after the summary buffer has been generated.  You might use
11518 it to, for instance, highlight lines or modify the look of the buffer in
11519 some other ungodly manner.  I don't care.
11520
11521 @vindex gnus-summary-prepared-hook
11522 @item gnus-summary-prepared-hook
11523 A hook called as the very last thing after the summary buffer has been
11524 generated.
11525
11526 @vindex gnus-summary-ignore-duplicates
11527 @item gnus-summary-ignore-duplicates
11528 When Gnus discovers two articles that have the same @code{Message-ID},
11529 it has to do something drastic.  No articles are allowed to have the
11530 same @code{Message-ID}, but this may happen when reading mail from some
11531 sources.  Gnus allows you to customize what happens with this variable.
11532 If it is @code{nil} (which is the default), Gnus will rename the
11533 @code{Message-ID} (for display purposes only) and display the article as
11534 any other article.  If this variable is @code{t}, it won't display the
11535 article---it'll be as if it never existed.
11536
11537 @vindex gnus-alter-articles-to-read-function
11538 @item gnus-alter-articles-to-read-function
11539 This function, which takes two parameters (the group name and the list
11540 of articles to be selected), is called to allow the user to alter the
11541 list of articles to be selected.
11542
11543 For instance, the following function adds the list of cached articles to
11544 the list in one particular group:
11545
11546 @lisp
11547 (defun my-add-cached-articles (group articles)
11548   (if (string= group "some.group")
11549       (append gnus-newsgroup-cached articles)
11550     articles))
11551 @end lisp
11552
11553 @vindex gnus-newsgroup-variables
11554 @item gnus-newsgroup-variables
11555 A list of newsgroup (summary buffer) local variables, or cons of
11556 variables and their default expressions to be evalled (when the default
11557 values are not @code{nil}), that should be made global while the summary
11558 buffer is active.
11559
11560 Note: The default expressions will be evaluated (using function
11561 @code{eval}) before assignment to the local variable rather than just
11562 assigned to it.  If the default expression is the symbol @code{global},
11563 that symbol will not be evaluated but the global value of the local
11564 variable will be used instead.
11565
11566 These variables can be used to set variables in the group parameters
11567 while still allowing them to affect operations done in other
11568 buffers.  For example:
11569
11570 @lisp
11571 (setq gnus-newsgroup-variables
11572       '(message-use-followup-to
11573         (gnus-visible-headers .
11574  "^From:\\|^Newsgroups:\\|^Subject:\\|^Date:\\|^To:")))
11575 @end lisp
11576
11577 Also @pxref{Group Parameters}.
11578
11579 @vindex gnus-propagate-marks
11580 @item gnus-propagate-marks
11581 If non-@code{nil}, propagate marks to the backends for possible
11582 storing.  @xref{NNTP marks}, and friends, for a more fine-grained
11583 sieve.
11584
11585 @end table
11586
11587
11588 @node Summary Group Information
11589 @subsection Summary Group Information
11590
11591 @table @kbd
11592
11593 @item H f
11594 @kindex H f (Summary)
11595 @findex gnus-summary-fetch-faq
11596 @vindex gnus-group-faq-directory
11597 Try to fetch the @acronym{FAQ} (list of frequently asked questions)
11598 for the current group (@code{gnus-summary-fetch-faq}).  Gnus will try
11599 to get the @acronym{FAQ} from @code{gnus-group-faq-directory}, which
11600 is usually a directory on a remote machine.  This variable can also be
11601 a list of directories.  In that case, giving a prefix to this command
11602 will allow you to choose between the various sites.  @code{ange-ftp}
11603 or @code{efs} will probably be used for fetching the file.
11604
11605 @item H d
11606 @kindex H d (Summary)
11607 @findex gnus-summary-describe-group
11608 Give a brief description of the current group
11609 (@code{gnus-summary-describe-group}).  If given a prefix, force
11610 rereading the description from the server.
11611
11612 @item H h
11613 @kindex H h (Summary)
11614 @findex gnus-summary-describe-briefly
11615 Give an extremely brief description of the most important summary
11616 keystrokes (@code{gnus-summary-describe-briefly}).
11617
11618 @item H i
11619 @kindex H i (Summary)
11620 @findex gnus-info-find-node
11621 Go to the Gnus info node (@code{gnus-info-find-node}).
11622 @end table
11623
11624
11625 @node Searching for Articles
11626 @subsection Searching for Articles
11627
11628 @table @kbd
11629
11630 @item M-s
11631 @kindex M-s (Summary)
11632 @findex gnus-summary-search-article-forward
11633 Search through all subsequent (raw) articles for a regexp
11634 (@code{gnus-summary-search-article-forward}).
11635
11636 @item M-r
11637 @kindex M-r (Summary)
11638 @findex gnus-summary-search-article-backward
11639 Search through all previous (raw) articles for a regexp
11640 (@code{gnus-summary-search-article-backward}).
11641
11642 @item M-S
11643 @kindex M-S (Summary)
11644 @findex gnus-summary-repeat-search-article-forward
11645 Repeat the previous search forwards
11646 (@code{gnus-summary-repeat-search-article-forward}).
11647
11648 @item M-R
11649 @kindex M-R (Summary)
11650 @findex gnus-summary-repeat-search-article-backward
11651 Repeat the previous search backwards
11652 (@code{gnus-summary-repeat-search-article-backward}).
11653
11654 @item &
11655 @kindex & (Summary)
11656 @findex gnus-summary-execute-command
11657 This command will prompt you for a header, a regular expression to match
11658 on this field, and a command to be executed if the match is made
11659 (@code{gnus-summary-execute-command}).  If the header is an empty
11660 string, the match is done on the entire article.  If given a prefix,
11661 search backward instead.
11662
11663 For instance, @kbd{& RET some.*string RET #} will put the process mark on
11664 all articles that have heads or bodies that match @samp{some.*string}.
11665
11666 @item M-&
11667 @kindex M-& (Summary)
11668 @findex gnus-summary-universal-argument
11669 Perform any operation on all articles that have been marked with
11670 the process mark (@code{gnus-summary-universal-argument}).
11671 @end table
11672
11673 @node Summary Generation Commands
11674 @subsection Summary Generation Commands
11675
11676 @table @kbd
11677
11678 @item Y g
11679 @kindex Y g (Summary)
11680 @findex gnus-summary-prepare
11681 Regenerate the current summary buffer (@code{gnus-summary-prepare}).
11682
11683 @item Y c
11684 @kindex Y c (Summary)
11685 @findex gnus-summary-insert-cached-articles
11686 Pull all cached articles (for the current group) into the summary buffer
11687 (@code{gnus-summary-insert-cached-articles}).
11688
11689 @item Y d
11690 @kindex Y d (Summary)
11691 @findex gnus-summary-insert-dormant-articles
11692 Pull all dormant articles (for the current group) into the summary buffer
11693 (@code{gnus-summary-insert-dormant-articles}).
11694
11695 @item Y t
11696 @kindex Y t (Summary)
11697 @findex gnus-summary-insert-ticked-articles
11698 Pull all ticked articles (for the current group) into the summary buffer
11699 (@code{gnus-summary-insert-ticked-articles}).
11700
11701 @end table
11702
11703
11704 @node Really Various Summary Commands
11705 @subsection Really Various Summary Commands
11706
11707 @table @kbd
11708
11709 @item A D
11710 @itemx C-d
11711 @kindex C-d (Summary)
11712 @kindex A D (Summary)
11713 @findex gnus-summary-enter-digest-group
11714 If the current article is a collection of other articles (for instance,
11715 a digest), you might use this command to enter a group based on the that
11716 article (@code{gnus-summary-enter-digest-group}).  Gnus will try to
11717 guess what article type is currently displayed unless you give a prefix
11718 to this command, which forces a ``digest'' interpretation.  Basically,
11719 whenever you see a message that is a collection of other messages of
11720 some format, you @kbd{C-d} and read these messages in a more convenient
11721 fashion.
11722
11723 @vindex gnus-auto-select-on-ephemeral-exit
11724 The variable @code{gnus-auto-select-on-ephemeral-exit} controls what
11725 article should be selected after exiting a digest group.  Valid values
11726 include:
11727
11728 @table @code
11729 @item next
11730 Select the next article.
11731
11732 @item next-unread
11733 Select the next unread article.
11734
11735 @item next-noselect
11736 Move the cursor to the next article.  This is the default.
11737
11738 @item next-unread-noselect
11739 Move the cursor to the next unread article.
11740 @end table
11741
11742 If it has any other value or there is no next (unread) article, the
11743 article selected before entering to the digest group will appear.
11744
11745 @item C-M-d
11746 @kindex C-M-d (Summary)
11747 @findex gnus-summary-read-document
11748 This command is very similar to the one above, but lets you gather
11749 several documents into one biiig group
11750 (@code{gnus-summary-read-document}).  It does this by opening several
11751 @code{nndoc} groups for each document, and then opening an
11752 @code{nnvirtual} group on top of these @code{nndoc} groups.  This
11753 command understands the process/prefix convention
11754 (@pxref{Process/Prefix}).
11755
11756 @item C-t
11757 @kindex C-t (Summary)
11758 @findex gnus-summary-toggle-truncation
11759 Toggle truncation of summary lines
11760 (@code{gnus-summary-toggle-truncation}).  This will probably confuse the
11761 line centering function in the summary buffer, so it's not a good idea
11762 to have truncation switched off while reading articles.
11763
11764 @item =
11765 @kindex = (Summary)
11766 @findex gnus-summary-expand-window
11767 Expand the summary buffer window (@code{gnus-summary-expand-window}).
11768 If given a prefix, force an @code{article} window configuration.
11769
11770 @item C-M-e
11771 @kindex C-M-e (Summary)
11772 @findex gnus-summary-edit-parameters
11773 Edit the group parameters (@pxref{Group Parameters}) of the current
11774 group (@code{gnus-summary-edit-parameters}).
11775
11776 @item C-M-a
11777 @kindex C-M-a (Summary)
11778 @findex gnus-summary-customize-parameters
11779 Customize the group parameters (@pxref{Group Parameters}) of the current
11780 group (@code{gnus-summary-customize-parameters}).
11781
11782 @end table
11783
11784
11785 @node Exiting the Summary Buffer
11786 @section Exiting the Summary Buffer
11787 @cindex summary exit
11788 @cindex exiting groups
11789
11790 Exiting from the summary buffer will normally update all info on the
11791 group and return you to the group buffer.
11792
11793 @table @kbd
11794
11795 @item Z Z
11796 @itemx Z Q
11797 @itemx q
11798 @kindex Z Z (Summary)
11799 @kindex Z Q (Summary)
11800 @kindex q (Summary)
11801 @findex gnus-summary-exit
11802 @vindex gnus-summary-exit-hook
11803 @vindex gnus-summary-prepare-exit-hook
11804 @vindex gnus-group-no-more-groups-hook
11805 @c @icon{gnus-summary-exit}
11806 Exit the current group and update all information on the group
11807 (@code{gnus-summary-exit}).  @code{gnus-summary-prepare-exit-hook} is
11808 called before doing much of the exiting, which calls
11809 @code{gnus-summary-expire-articles} by default.
11810 @code{gnus-summary-exit-hook} is called after finishing the exit
11811 process.  @code{gnus-group-no-more-groups-hook} is run when returning to
11812 group mode having no more (unread) groups.
11813
11814 @item Z E
11815 @itemx Q
11816 @kindex Z E (Summary)
11817 @kindex Q (Summary)
11818 @findex gnus-summary-exit-no-update
11819 Exit the current group without updating any information on the group
11820 (@code{gnus-summary-exit-no-update}).
11821
11822 @item Z c
11823 @itemx c
11824 @kindex Z c (Summary)
11825 @kindex c (Summary)
11826 @findex gnus-summary-catchup-and-exit
11827 @c @icon{gnus-summary-catchup-and-exit}
11828 Mark all unticked articles in the group as read and then exit
11829 (@code{gnus-summary-catchup-and-exit}).
11830
11831 @item Z C
11832 @kindex Z C (Summary)
11833 @findex gnus-summary-catchup-all-and-exit
11834 Mark all articles, even the ticked ones, as read and then exit
11835 (@code{gnus-summary-catchup-all-and-exit}).
11836
11837 @item Z n
11838 @kindex Z n (Summary)
11839 @findex gnus-summary-catchup-and-goto-next-group
11840 Mark all articles as read and go to the next group
11841 (@code{gnus-summary-catchup-and-goto-next-group}).
11842
11843 @item Z p
11844 @kindex Z p (Summary)
11845 @findex gnus-summary-catchup-and-goto-prev-group
11846 Mark all articles as read and go to the previous group
11847 (@code{gnus-summary-catchup-and-goto-prev-group}).
11848
11849 @item Z R
11850 @itemx C-x C-s
11851 @kindex Z R (Summary)
11852 @kindex C-x C-s (Summary)
11853 @findex gnus-summary-reselect-current-group
11854 Exit this group, and then enter it again
11855 (@code{gnus-summary-reselect-current-group}).  If given a prefix, select
11856 all articles, both read and unread.
11857
11858 @item Z G
11859 @itemx M-g
11860 @kindex Z G (Summary)
11861 @kindex M-g (Summary)
11862 @findex gnus-summary-rescan-group
11863 @c @icon{gnus-summary-mail-get}
11864 Exit the group, check for new articles in the group, and select the
11865 group (@code{gnus-summary-rescan-group}).  If given a prefix, select all
11866 articles, both read and unread.
11867
11868 @item Z N
11869 @kindex Z N (Summary)
11870 @findex gnus-summary-next-group
11871 Exit the group and go to the next group
11872 (@code{gnus-summary-next-group}).
11873
11874 @item Z P
11875 @kindex Z P (Summary)
11876 @findex gnus-summary-prev-group
11877 Exit the group and go to the previous group
11878 (@code{gnus-summary-prev-group}).
11879
11880 @item Z s
11881 @kindex Z s (Summary)
11882 @findex gnus-summary-save-newsrc
11883 Save the current number of read/marked articles in the dribble buffer
11884 and then save the dribble buffer (@code{gnus-summary-save-newsrc}).  If
11885 given a prefix, also save the @file{.newsrc} file(s).  Using this
11886 command will make exit without updating (the @kbd{Q} command) worthless.
11887 @end table
11888
11889 @vindex gnus-exit-group-hook
11890 @code{gnus-exit-group-hook} is called when you exit the current group
11891 with an ``updating'' exit.  For instance @kbd{Q}
11892 (@code{gnus-summary-exit-no-update}) does not call this hook.
11893
11894 @findex gnus-summary-wake-up-the-dead
11895 @findex gnus-dead-summary-mode
11896 @vindex gnus-kill-summary-on-exit
11897 If you're in the habit of exiting groups, and then changing your mind
11898 about it, you might set @code{gnus-kill-summary-on-exit} to @code{nil}.
11899 If you do that, Gnus won't kill the summary buffer when you exit it.
11900 (Quelle surprise!)  Instead it will change the name of the buffer to
11901 something like @samp{*Dead Summary ... *} and install a minor mode
11902 called @code{gnus-dead-summary-mode}.  Now, if you switch back to this
11903 buffer, you'll find that all keys are mapped to a function called
11904 @code{gnus-summary-wake-up-the-dead}.  So tapping any keys in a dead
11905 summary buffer will result in a live, normal summary buffer.
11906
11907 There will never be more than one dead summary buffer at any one time.
11908
11909 @vindex gnus-use-cross-reference
11910 The data on the current group will be updated (which articles you have
11911 read, which articles you have replied to, etc.) when you exit the
11912 summary buffer.  If the @code{gnus-use-cross-reference} variable is
11913 @code{t} (which is the default), articles that are cross-referenced to
11914 this group and are marked as read, will also be marked as read in the
11915 other subscribed groups they were cross-posted to.  If this variable is
11916 neither @code{nil} nor @code{t}, the article will be marked as read in
11917 both subscribed and unsubscribed groups (@pxref{Crosspost Handling}).
11918
11919
11920 @node Crosspost Handling
11921 @section Crosspost Handling
11922
11923 @cindex velveeta
11924 @cindex spamming
11925 Marking cross-posted articles as read ensures that you'll never have to
11926 read the same article more than once.  Unless, of course, somebody has
11927 posted it to several groups separately.  Posting the same article to
11928 several groups (not cross-posting) is called @dfn{spamming}, and you are
11929 by law required to send nasty-grams to anyone who perpetrates such a
11930 heinous crime.  You may want to try NoCeM handling to filter out spam
11931 (@pxref{NoCeM}).
11932
11933 Remember: Cross-posting is kinda ok, but posting the same article
11934 separately to several groups is not.  Massive cross-posting (aka.
11935 @dfn{velveeta}) is to be avoided at all costs, and you can even use the
11936 @code{gnus-summary-mail-crosspost-complaint} command to complain about
11937 excessive crossposting (@pxref{Summary Mail Commands}).
11938
11939 @cindex cross-posting
11940 @cindex Xref
11941 @cindex @acronym{NOV}
11942 One thing that may cause Gnus to not do the cross-posting thing
11943 correctly is if you use an @acronym{NNTP} server that supports @sc{xover}
11944 (which is very nice, because it speeds things up considerably) which
11945 does not include the @code{Xref} header in its @acronym{NOV} lines.  This is
11946 Evil, but all too common, alas, alack.  Gnus tries to Do The Right Thing
11947 even with @sc{xover} by registering the @code{Xref} lines of all
11948 articles you actually read, but if you kill the articles, or just mark
11949 them as read without reading them, Gnus will not get a chance to snoop
11950 the @code{Xref} lines out of these articles, and will be unable to use
11951 the cross reference mechanism.
11952
11953 @cindex LIST overview.fmt
11954 @cindex overview.fmt
11955 To check whether your @acronym{NNTP} server includes the @code{Xref} header
11956 in its overview files, try @samp{telnet your.nntp.server nntp},
11957 @samp{MODE READER} on @code{inn} servers, and then say @samp{LIST
11958 overview.fmt}.  This may not work, but if it does, and the last line you
11959 get does not read @samp{Xref:full}, then you should shout and whine at
11960 your news admin until she includes the @code{Xref} header in the
11961 overview files.
11962
11963 If you want Gnus to get the @code{Xref}s right all the time, you have to
11964 set @code{nntp-nov-is-evil} to @code{t}, which slows things down
11965 considerably.  Also @pxref{Slow/Expensive Connection}.
11966
11967 C'est la vie.
11968
11969 For an alternative approach, @pxref{Duplicate Suppression}.
11970
11971
11972 @node Duplicate Suppression
11973 @section Duplicate Suppression
11974
11975 By default, Gnus tries to make sure that you don't have to read the same
11976 article more than once by utilizing the crossposting mechanism
11977 (@pxref{Crosspost Handling}).  However, that simple and efficient
11978 approach may not work satisfactory for some users for various
11979 reasons.
11980
11981 @enumerate
11982 @item
11983 The @acronym{NNTP} server may fail to generate the @code{Xref} header.  This
11984 is evil and not very common.
11985
11986 @item
11987 The @acronym{NNTP} server may fail to include the @code{Xref} header in the
11988 @file{.overview} data bases.  This is evil and all too common, alas.
11989
11990 @item
11991 You may be reading the same group (or several related groups) from
11992 different @acronym{NNTP} servers.
11993
11994 @item
11995 You may be getting mail that duplicates articles posted to groups.
11996 @end enumerate
11997
11998 I'm sure there are other situations where @code{Xref} handling fails as
11999 well, but these four are the most common situations.
12000
12001 If, and only if, @code{Xref} handling fails for you, then you may
12002 consider switching on @dfn{duplicate suppression}.  If you do so, Gnus
12003 will remember the @code{Message-ID}s of all articles you have read or
12004 otherwise marked as read, and then, as if by magic, mark them as read
12005 all subsequent times you see them---in @emph{all} groups.  Using this
12006 mechanism is quite likely to be somewhat inefficient, but not overly
12007 so.  It's certainly preferable to reading the same articles more than
12008 once.
12009
12010 Duplicate suppression is not a very subtle instrument.  It's more like a
12011 sledge hammer than anything else.  It works in a very simple
12012 fashion---if you have marked an article as read, it adds this Message-ID
12013 to a cache.  The next time it sees this Message-ID, it will mark the
12014 article as read with the @samp{M} mark.  It doesn't care what group it
12015 saw the article in.
12016
12017 @table @code
12018 @item gnus-suppress-duplicates
12019 @vindex gnus-suppress-duplicates
12020 If non-@code{nil}, suppress duplicates.
12021
12022 @item gnus-save-duplicate-list
12023 @vindex gnus-save-duplicate-list
12024 If non-@code{nil}, save the list of duplicates to a file.  This will
12025 make startup and shutdown take longer, so the default is @code{nil}.
12026 However, this means that only duplicate articles read in a single Gnus
12027 session are suppressed.
12028
12029 @item gnus-duplicate-list-length
12030 @vindex gnus-duplicate-list-length
12031 This variable says how many @code{Message-ID}s to keep in the duplicate
12032 suppression list.  The default is 10000.
12033
12034 @item gnus-duplicate-file
12035 @vindex gnus-duplicate-file
12036 The name of the file to store the duplicate suppression list in.  The
12037 default is @file{~/News/suppression}.
12038 @end table
12039
12040 If you have a tendency to stop and start Gnus often, setting
12041 @code{gnus-save-duplicate-list} to @code{t} is probably a good idea.  If
12042 you leave Gnus running for weeks on end, you may have it @code{nil}.  On
12043 the other hand, saving the list makes startup and shutdown much slower,
12044 so that means that if you stop and start Gnus often, you should set
12045 @code{gnus-save-duplicate-list} to @code{nil}.  Uhm.  I'll leave this up
12046 to you to figure out, I think.
12047
12048 @node Security
12049 @section Security
12050
12051 Gnus is able to verify signed messages or decrypt encrypted messages.
12052 The formats that are supported are @acronym{PGP}, @acronym{PGP/MIME}
12053 and @acronym{S/MIME}, however you need some external programs to get
12054 things to work:
12055
12056 @enumerate
12057 @item
12058 To handle @acronym{PGP} and @acronym{PGP/MIME} messages, you have to
12059 install an OpenPGP implementation such as GnuPG.  The Lisp interface
12060 to GnuPG included with Emacs is called EasyPG (@pxref{Top, ,EasyPG,
12061 epa, EasyPG Assistant user's manual}), but PGG (@pxref{Top, ,PGG, pgg,
12062 PGG Manual}), Mailcrypt, and gpg.el are also supported.
12063
12064 @item
12065 To handle @acronym{S/MIME} message, you need to install OpenSSL.  OpenSSL 0.9.6
12066 or newer is recommended.
12067
12068 @end enumerate
12069
12070 The variables that control security functionality on reading/composing
12071 messages include:
12072
12073 @table @code
12074 @item mm-verify-option
12075 @vindex mm-verify-option
12076 Option of verifying signed parts.  @code{never}, not verify;
12077 @code{always}, always verify; @code{known}, only verify known
12078 protocols.  Otherwise, ask user.
12079
12080 @item mm-decrypt-option
12081 @vindex mm-decrypt-option
12082 Option of decrypting encrypted parts.  @code{never}, no decryption;
12083 @code{always}, always decrypt; @code{known}, only decrypt known
12084 protocols.  Otherwise, ask user.
12085
12086 @item mm-sign-option
12087 @vindex mm-sign-option
12088 Option of creating signed parts.  @code{nil}, use default signing
12089 keys; @code{guided}, ask user to select signing keys from the menu.
12090
12091 @item mm-encrypt-option
12092 @vindex mm-encrypt-option
12093 Option of creating encrypted parts.  @code{nil}, use the first
12094 public-key matching the @samp{From:} header as the recipient;
12095 @code{guided}, ask user to select recipient keys from the menu.
12096
12097 @item mml1991-use
12098 @vindex mml1991-use
12099 Symbol indicating elisp interface to OpenPGP implementation for
12100 @acronym{PGP} messages.  The default is @code{epg}, but @code{pgg},
12101 @code{mailcrypt}, and @code{gpg} are also supported although
12102 deprecated.  By default, Gnus uses the first available interface in
12103 this order.
12104
12105 @item mml2015-use
12106 @vindex mml2015-use
12107 Symbol indicating elisp interface to OpenPGP implementation for
12108 @acronym{PGP/MIME} messages.  The default is @code{epg}, but
12109 @code{pgg}, @code{mailcrypt}, and @code{gpg} are also supported
12110 although deprecated.  By default, Gnus uses the first available
12111 interface in this order.
12112
12113 @end table
12114
12115 By default the buttons that display security information are not
12116 shown, because they clutter reading the actual e-mail.  You can type
12117 @kbd{K b} manually to display the information.  Use the
12118 @code{gnus-buttonized-mime-types} and
12119 @code{gnus-unbuttonized-mime-types} variables to control this
12120 permanently.  @ref{MIME Commands} for further details, and hints on
12121 how to customize these variables to always display security
12122 information.
12123
12124 @cindex snarfing keys
12125 @cindex importing PGP keys
12126 @cindex PGP key ring import
12127 Snarfing OpenPGP keys (i.e., importing keys from articles into your
12128 key ring) is not supported explicitly through a menu item or command,
12129 rather Gnus do detect and label keys as @samp{application/pgp-keys},
12130 allowing you to specify whatever action you think is appropriate
12131 through the usual @acronym{MIME} infrastructure.  You can use a
12132 @file{~/.mailcap} entry (@pxref{mailcap, , mailcap, emacs-mime, The
12133 Emacs MIME Manual}) such as the following to import keys using GNU
12134 Privacy Guard when you click on the @acronym{MIME} button
12135 (@pxref{Using MIME}).
12136
12137 @example
12138 application/pgp-keys; gpg --import --interactive --verbose; needsterminal
12139 @end example
12140 @noindent
12141 This happens to also be the default action defined in
12142 @code{mailcap-mime-data}.
12143
12144 More information on how to set things for sending outgoing signed and
12145 encrypted messages up can be found in the message manual
12146 (@pxref{Security, ,Security, message, Message Manual}).
12147
12148 @node Mailing List
12149 @section Mailing List
12150 @cindex mailing list
12151 @cindex RFC 2396
12152
12153 @kindex A M (summary)
12154 @findex gnus-mailing-list-insinuate
12155 Gnus understands some mailing list fields of RFC 2369.  To enable it,
12156 add a @code{to-list} group parameter (@pxref{Group Parameters}),
12157 possibly using @kbd{A M} (@code{gnus-mailing-list-insinuate}) in the
12158 summary buffer.
12159
12160 That enables the following commands to the summary buffer:
12161
12162 @table @kbd
12163
12164 @item C-c C-n h
12165 @kindex C-c C-n h (Summary)
12166 @findex gnus-mailing-list-help
12167 Send a message to fetch mailing list help, if List-Help field exists.
12168
12169 @item C-c C-n s
12170 @kindex C-c C-n s (Summary)
12171 @findex gnus-mailing-list-subscribe
12172 Send a message to subscribe the mailing list, if List-Subscribe field exists.
12173
12174 @item C-c C-n u
12175 @kindex C-c C-n u (Summary)
12176 @findex gnus-mailing-list-unsubscribe
12177 Send a message to unsubscribe the mailing list, if List-Unsubscribe
12178 field exists.
12179
12180 @item C-c C-n p
12181 @kindex C-c C-n p (Summary)
12182 @findex gnus-mailing-list-post
12183 Post to the mailing list, if List-Post field exists.
12184
12185 @item C-c C-n o
12186 @kindex C-c C-n o (Summary)
12187 @findex gnus-mailing-list-owner
12188 Send a message to the mailing list owner, if List-Owner field exists.
12189
12190 @item C-c C-n a
12191 @kindex C-c C-n a (Summary)
12192 @findex gnus-mailing-list-archive
12193 Browse the mailing list archive, if List-Archive field exists.
12194
12195 @end table
12196
12197
12198 @node Article Buffer
12199 @chapter Article Buffer
12200 @cindex article buffer
12201
12202 The articles are displayed in the article buffer, of which there is only
12203 one.  All the summary buffers share the same article buffer unless you
12204 tell Gnus otherwise.
12205
12206 @menu
12207 * Hiding Headers::              Deciding what headers should be displayed.
12208 * Using MIME::                  Pushing articles through @acronym{MIME} before reading them.
12209 * HTML::                        Reading @acronym{HTML} messages.
12210 * Customizing Articles::        Tailoring the look of the articles.
12211 * Article Keymap::              Keystrokes available in the article buffer.
12212 * Misc Article::                Other stuff.
12213 @end menu
12214
12215
12216 @node Hiding Headers
12217 @section Hiding Headers
12218 @cindex hiding headers
12219 @cindex deleting headers
12220
12221 The top section of each article is the @dfn{head}.  (The rest is the
12222 @dfn{body}, but you may have guessed that already.)
12223
12224 @vindex gnus-show-all-headers
12225 There is a lot of useful information in the head: the name of the person
12226 who wrote the article, the date it was written and the subject of the
12227 article.  That's well and nice, but there's also lots of information
12228 most people do not want to see---what systems the article has passed
12229 through before reaching you, the @code{Message-ID}, the
12230 @code{References}, etc. ad nauseam---and you'll probably want to get rid
12231 of some of those lines.  If you want to keep all those lines in the
12232 article buffer, you can set @code{gnus-show-all-headers} to @code{t}.
12233
12234 Gnus provides you with two variables for sifting headers:
12235
12236 @table @code
12237
12238 @item gnus-visible-headers
12239 @vindex gnus-visible-headers
12240 If this variable is non-@code{nil}, it should be a regular expression
12241 that says what headers you wish to keep in the article buffer.  All
12242 headers that do not match this variable will be hidden.
12243
12244 For instance, if you only want to see the name of the person who wrote
12245 the article and the subject, you'd say:
12246
12247 @lisp
12248 (setq gnus-visible-headers "^From:\\|^Subject:")
12249 @end lisp
12250
12251 This variable can also be a list of regexps to match headers to
12252 remain visible.
12253
12254 @item gnus-ignored-headers
12255 @vindex gnus-ignored-headers
12256 This variable is the reverse of @code{gnus-visible-headers}.  If this
12257 variable is set (and @code{gnus-visible-headers} is @code{nil}), it
12258 should be a regular expression that matches all lines that you want to
12259 hide.  All lines that do not match this variable will remain visible.
12260
12261 For instance, if you just want to get rid of the @code{References} line
12262 and the @code{Xref} line, you might say:
12263
12264 @lisp
12265 (setq gnus-ignored-headers "^References:\\|^Xref:")
12266 @end lisp
12267
12268 This variable can also be a list of regexps to match headers to
12269 be removed.
12270
12271 Note that if @code{gnus-visible-headers} is non-@code{nil}, this
12272 variable will have no effect.
12273
12274 @end table
12275
12276 @vindex gnus-sorted-header-list
12277 Gnus can also sort the headers for you.  (It does this by default.)  You
12278 can control the sorting by setting the @code{gnus-sorted-header-list}
12279 variable.  It is a list of regular expressions that says in what order
12280 the headers are to be displayed.
12281
12282 For instance, if you want the name of the author of the article first,
12283 and then the subject, you might say something like:
12284
12285 @lisp
12286 (setq gnus-sorted-header-list '("^From:" "^Subject:"))
12287 @end lisp
12288
12289 Any headers that are to remain visible, but are not listed in this
12290 variable, will be displayed in random order after all the headers listed in this variable.
12291
12292 @findex gnus-article-hide-boring-headers
12293 @vindex gnus-boring-article-headers
12294 You can hide further boring headers by setting
12295 @code{gnus-treat-hide-boring-headers} to @code{head}.  What this function
12296 does depends on the @code{gnus-boring-article-headers} variable.  It's a
12297 list, but this list doesn't actually contain header names.  Instead it
12298 lists various @dfn{boring conditions} that Gnus can check and remove
12299 from sight.
12300
12301 These conditions are:
12302 @table @code
12303 @item empty
12304 Remove all empty headers.
12305 @item followup-to
12306 Remove the @code{Followup-To} header if it is identical to the
12307 @code{Newsgroups} header.
12308 @item reply-to
12309 Remove the @code{Reply-To} header if it lists the same addresses as
12310 the @code{From} header, or if the @code{broken-reply-to} group
12311 parameter is set.
12312 @item newsgroups
12313 Remove the @code{Newsgroups} header if it only contains the current group
12314 name.
12315 @item to-address
12316 Remove the @code{To} header if it only contains the address identical to
12317 the current group's @code{to-address} parameter.
12318 @item to-list
12319 Remove the @code{To} header if it only contains the address identical to
12320 the current group's @code{to-list} parameter.
12321 @item cc-list
12322 Remove the @code{Cc} header if it only contains the address identical to
12323 the current group's @code{to-list} parameter.
12324 @item date
12325 Remove the @code{Date} header if the article is less than three days
12326 old.
12327 @item long-to
12328 Remove the @code{To} and/or @code{Cc} header if it is very long.
12329 @item many-to
12330 Remove all @code{To} and/or @code{Cc} headers if there are more than one.
12331 @end table
12332
12333 To include these three elements, you could say something like:
12334
12335 @lisp
12336 (setq gnus-boring-article-headers
12337       '(empty followup-to reply-to))
12338 @end lisp
12339
12340 This is also the default value for this variable.
12341
12342
12343 @node Using MIME
12344 @section Using MIME
12345 @cindex @acronym{MIME}
12346
12347 Mime is a standard for waving your hands through the air, aimlessly,
12348 while people stand around yawning.
12349
12350 @acronym{MIME}, however, is a standard for encoding your articles, aimlessly,
12351 while all newsreaders die of fear.
12352
12353 @acronym{MIME} may specify what character set the article uses, the encoding
12354 of the characters, and it also makes it possible to embed pictures and
12355 other naughty stuff in innocent-looking articles.
12356
12357 @vindex gnus-display-mime-function
12358 @findex gnus-display-mime
12359 Gnus pushes @acronym{MIME} articles through @code{gnus-display-mime-function}
12360 to display the @acronym{MIME} parts.  This is @code{gnus-display-mime} by
12361 default, which creates a bundle of clickable buttons that can be used to
12362 display, save and manipulate the @acronym{MIME} objects.
12363
12364 The following commands are available when you have placed point over a
12365 @acronym{MIME} button:
12366
12367 @table @kbd
12368 @findex gnus-article-press-button
12369 @item RET (Article)
12370 @kindex RET (Article)
12371 @itemx BUTTON-2 (Article)
12372 Toggle displaying of the @acronym{MIME} object
12373 (@code{gnus-article-press-button}).  If built-in viewers can not display
12374 the object, Gnus resorts to external viewers in the @file{mailcap}
12375 files.  If a viewer has the @samp{copiousoutput} specification, the
12376 object is displayed inline.
12377
12378 @findex gnus-mime-view-part
12379 @item M-RET (Article)
12380 @kindex M-RET (Article)
12381 @itemx v (Article)
12382 Prompt for a method, and then view the @acronym{MIME} object using this
12383 method (@code{gnus-mime-view-part}).
12384
12385 @findex gnus-mime-view-part-as-type
12386 @item t (Article)
12387 @kindex t (Article)
12388 View the @acronym{MIME} object as if it were a different @acronym{MIME} media type
12389 (@code{gnus-mime-view-part-as-type}).
12390
12391 @findex gnus-mime-view-part-as-charset
12392 @item C (Article)
12393 @kindex C (Article)
12394 Prompt for a charset, and then view the @acronym{MIME} object using this
12395 charset (@code{gnus-mime-view-part-as-charset}).
12396
12397 @findex gnus-mime-save-part
12398 @item o (Article)
12399 @kindex o (Article)
12400 Prompt for a file name, and then save the @acronym{MIME} object
12401 (@code{gnus-mime-save-part}).
12402
12403 @findex gnus-mime-save-part-and-strip
12404 @item C-o (Article)
12405 @kindex C-o (Article)
12406 Prompt for a file name, then save the @acronym{MIME} object and strip it from
12407 the article.  Then proceed to article editing, where a reasonable
12408 suggestion is being made on how the altered article should look
12409 like.  The stripped @acronym{MIME} object will be referred via the
12410 message/external-body @acronym{MIME} type.
12411 (@code{gnus-mime-save-part-and-strip}).
12412
12413 @findex gnus-mime-replace-part
12414 @item r (Article)
12415 @kindex r (Article)
12416 Prompt for a file name, replace the @acronym{MIME} object with an
12417 external body refering to the file via the message/external-body
12418 @acronym{MIME} type.  (@code{gnus-mime-replace-part}).
12419
12420 @findex gnus-mime-delete-part
12421 @item d (Article)
12422 @kindex d (Article)
12423 Delete the @acronym{MIME} object from the article and replace it with some
12424 information about the removed @acronym{MIME} object
12425 (@code{gnus-mime-delete-part}).
12426
12427 @c FIXME: gnus-auto-select-part should be documented here
12428
12429 @findex gnus-mime-copy-part
12430 @item c (Article)
12431 @kindex c (Article)
12432 Copy the @acronym{MIME} object to a fresh buffer and display this buffer
12433 (@code{gnus-mime-copy-part}).  If given a prefix, copy the raw contents
12434 without decoding.  If given a numerical prefix, you can do semi-manual
12435 charset stuff (see @code{gnus-summary-show-article-charset-alist} in
12436 @ref{Paging the Article}).  Compressed files like @file{.gz} and
12437 @file{.bz2} are automatically decompressed if
12438 @code{auto-compression-mode} is enabled (@pxref{Compressed Files,,
12439 Accessing Compressed Files, emacs, The Emacs Editor}).
12440
12441 @findex gnus-mime-print-part
12442 @item p (Article)
12443 @kindex p (Article)
12444 Print the @acronym{MIME} object (@code{gnus-mime-print-part}).  This
12445 command respects the @samp{print=} specifications in the
12446 @file{.mailcap} file.
12447
12448 @findex gnus-mime-inline-part
12449 @item i (Article)
12450 @kindex i (Article)
12451 Insert the contents of the @acronym{MIME} object into the buffer
12452 (@code{gnus-mime-inline-part}) as @samp{text/plain}.  If given a prefix, insert
12453 the raw contents without decoding.  If given a numerical prefix, you can
12454 do semi-manual charset stuff (see
12455 @code{gnus-summary-show-article-charset-alist} in @ref{Paging the
12456 Article}).  Compressed files like @file{.gz} and @file{.bz2} are
12457 automatically decompressed depending on @code{jka-compr} regardless of
12458 @code{auto-compression-mode} (@pxref{Compressed Files,, Accessing
12459 Compressed Files, emacs, The Emacs Editor}).
12460
12461 @findex gnus-mime-view-part-internally
12462 @item E (Article)
12463 @kindex E (Article)
12464 View the @acronym{MIME} object with an internal viewer.  If no internal
12465 viewer is available, use an external viewer
12466 (@code{gnus-mime-view-part-internally}).
12467
12468 @findex gnus-mime-view-part-externally
12469 @item e (Article)
12470 @kindex e (Article)
12471 View the @acronym{MIME} object with an external viewer.
12472 (@code{gnus-mime-view-part-externally}).
12473
12474 @findex gnus-mime-pipe-part
12475 @item | (Article)
12476 @kindex | (Article)
12477 Output the @acronym{MIME} object to a process (@code{gnus-mime-pipe-part}).
12478
12479 @findex gnus-mime-action-on-part
12480 @item . (Article)
12481 @kindex . (Article)
12482 Interactively run an action on the @acronym{MIME} object
12483 (@code{gnus-mime-action-on-part}).
12484
12485 @end table
12486
12487 Gnus will display some @acronym{MIME} objects automatically.  The way Gnus
12488 determines which parts to do this with is described in the Emacs
12489 @acronym{MIME} manual.
12490
12491 It might be best to just use the toggling functions from the article
12492 buffer to avoid getting nasty surprises.  (For instance, you enter the
12493 group @samp{alt.sing-a-long} and, before you know it, @acronym{MIME} has
12494 decoded the sound file in the article and some horrible sing-a-long song
12495 comes screaming out your speakers, and you can't find the volume button,
12496 because there isn't one, and people are starting to look at you, and you
12497 try to stop the program, but you can't, and you can't find the program
12498 to control the volume, and everybody else in the room suddenly decides
12499 to look at you disdainfully, and you'll feel rather stupid.)
12500
12501 Any similarity to real events and people is purely coincidental.  Ahem.
12502
12503 Also @pxref{MIME Commands}.
12504
12505
12506 @node HTML
12507 @section @acronym{HTML}
12508 @cindex @acronym{HTML}
12509
12510 If you have @code{w3m} installed on your system, Gnus can display
12511 @acronym{HTML} articles in the article buffer.  There are many Gnus
12512 add-ons for doing this, using various approaches, but there's one
12513 (sort of) built-in method that's used by default.
12514
12515 For a complete overview, consult @xref{Display Customization,
12516 ,Display Customization, emacs-mime, The Emacs MIME Manual}.  This
12517 section only describes the default method.
12518
12519 @table @code
12520 @item mm-text-html-renderer
12521 @vindex mm-text-html-renderer
12522 If set to @code{gnus-article-html}, Gnus will use the built-in method,
12523 that's based on @code{curl} and @code{w3m}.
12524
12525 @item gnus-html-cache-directory
12526 @vindex gnus-html-cache-directory
12527 Gnus will download and cache images according to how
12528 @code{mm-w3m-safe-url-regexp} is set.  These images will be stored in
12529 this directory.
12530
12531 @item gnus-html-cache-size
12532 @vindex gnus-html-cache-size
12533 When @code{gnus-html-cache-size} bytes have been used in that
12534 directory, the oldest files will be deleted.  The default is 500MB.
12535
12536 @item gnus-html-frame-width
12537 @vindex gnus-html-frame-width
12538 The width to use when rendering HTML.  The default is 70.
12539
12540 @end table
12541
12542 To use this, make sure that you have @code{w3m} and @code{curl}
12543 installed.  If you have, then Gnus should display @acronym{HTML}
12544 automatically. 
12545
12546
12547
12548 @node Customizing Articles
12549 @section Customizing Articles
12550 @cindex article customization
12551
12552 A slew of functions for customizing how the articles are to look like
12553 exist.  You can call these functions interactively
12554 (@pxref{Article Washing}), or you can have them
12555 called automatically when you select the articles.
12556
12557 To have them called automatically, you should set the corresponding
12558 ``treatment'' variable.  For instance, to have headers hidden, you'd set
12559 @code{gnus-treat-hide-headers}.  Below is a list of variables that can
12560 be set, but first we discuss the values these variables can have.
12561
12562 Note: Some values, while valid, make little sense.  Check the list below
12563 for sensible values.
12564
12565 @enumerate
12566 @item
12567 @code{nil}: Don't do this treatment.
12568
12569 @item
12570 @code{t}: Do this treatment on all body parts.
12571
12572 @item
12573 @code{head}: Do the treatment on the headers.
12574
12575 @item
12576 @code{first}: Do this treatment on the first body part.
12577
12578 @item
12579 @code{last}: Do this treatment on the last body part.
12580
12581 @item
12582 An integer: Do this treatment on all body parts that have a length less
12583 than this number.
12584
12585 @item
12586 A list of strings: Do this treatment on all body parts that are in
12587 articles that are read in groups that have names that match one of the
12588 regexps in the list.
12589
12590 @item
12591 A list where the first element is not a string:
12592
12593 The list is evaluated recursively.  The first element of the list is a
12594 predicate.  The following predicates are recognized: @code{or},
12595 @code{and}, @code{not} and @code{typep}.  Here's an example:
12596
12597 @lisp
12598 (or last
12599     (typep "text/x-vcard"))
12600 @end lisp
12601
12602 @end enumerate
12603
12604 You may have noticed that the word @dfn{part} is used here.  This refers
12605 to the fact that some messages are @acronym{MIME} multipart articles that may
12606 be divided into several parts.  Articles that are not multiparts are
12607 considered to contain just a single part.
12608
12609 @vindex gnus-article-treat-types
12610 Are the treatments applied to all sorts of multipart parts?  Yes, if you
12611 want to, but by default, only @samp{text/plain} parts are given the
12612 treatment.  This is controlled by the @code{gnus-article-treat-types}
12613 variable, which is a list of regular expressions that are matched to the
12614 type of the part.  This variable is ignored if the value of the
12615 controlling variable is a predicate list, as described above.
12616
12617 @ifinfo
12618 @c Avoid sort of redundant entries in the same section for the printed
12619 @c manual, but add them in info to allow `i gnus-treat-foo-bar RET' or
12620 @c `i foo-bar'.
12621 @vindex gnus-treat-buttonize
12622 @vindex gnus-treat-buttonize-head
12623 @vindex gnus-treat-capitalize-sentences
12624 @vindex gnus-treat-overstrike
12625 @vindex gnus-treat-strip-cr
12626 @vindex gnus-treat-strip-headers-in-body
12627 @vindex gnus-treat-strip-leading-blank-lines
12628 @vindex gnus-treat-strip-multiple-blank-lines
12629 @vindex gnus-treat-strip-pem
12630 @vindex gnus-treat-strip-trailing-blank-lines
12631 @vindex gnus-treat-unsplit-urls
12632 @vindex gnus-treat-wash-html
12633 @vindex gnus-treat-date-english
12634 @vindex gnus-treat-date-iso8601
12635 @vindex gnus-treat-date-lapsed
12636 @vindex gnus-treat-date-local
12637 @vindex gnus-treat-date-original
12638 @vindex gnus-treat-date-user-defined
12639 @vindex gnus-treat-date-ut
12640 @vindex gnus-treat-from-picon
12641 @vindex gnus-treat-mail-picon
12642 @vindex gnus-treat-newsgroups-picon
12643 @vindex gnus-treat-display-smileys
12644 @vindex gnus-treat-body-boundary
12645 @vindex gnus-treat-display-x-face
12646 @vindex gnus-treat-display-face
12647 @vindex gnus-treat-emphasize
12648 @vindex gnus-treat-fill-article
12649 @vindex gnus-treat-fill-long-lines
12650 @vindex gnus-treat-hide-boring-headers
12651 @vindex gnus-treat-hide-citation
12652 @vindex gnus-treat-hide-citation-maybe
12653 @vindex gnus-treat-hide-headers
12654 @vindex gnus-treat-hide-signature
12655 @vindex gnus-treat-strip-banner
12656 @vindex gnus-treat-strip-list-identifiers
12657 @vindex gnus-treat-highlight-citation
12658 @vindex gnus-treat-highlight-headers
12659 @vindex gnus-treat-highlight-signature
12660 @vindex gnus-treat-play-sounds
12661 @vindex gnus-treat-translate
12662 @vindex gnus-treat-x-pgp-sig
12663 @vindex gnus-treat-unfold-headers
12664 @vindex gnus-treat-fold-headers
12665 @vindex gnus-treat-fold-newsgroups
12666 @vindex gnus-treat-leading-whitespace
12667 @end ifinfo
12668
12669 The following treatment options are available.  The easiest way to
12670 customize this is to examine the @code{gnus-article-treat} customization
12671 group.  Values in parenthesis are suggested sensible values.  Others are
12672 possible but those listed are probably sufficient for most people.
12673
12674 @table @code
12675 @item gnus-treat-buttonize (t, integer)
12676 @item gnus-treat-buttonize-head (head)
12677
12678 @xref{Article Buttons}.
12679
12680 @item gnus-treat-capitalize-sentences (t, integer)
12681 @item gnus-treat-overstrike (t, integer)
12682 @item gnus-treat-strip-cr (t, integer)
12683 @item gnus-treat-strip-headers-in-body (t, integer)
12684 @item gnus-treat-strip-leading-blank-lines (t, first, integer)
12685 @item gnus-treat-strip-multiple-blank-lines (t, integer)
12686 @item gnus-treat-strip-pem (t, last, integer)
12687 @item gnus-treat-strip-trailing-blank-lines (t, last, integer)
12688 @item gnus-treat-unsplit-urls (t, integer)
12689 @item gnus-treat-wash-html (t, integer)
12690
12691 @xref{Article Washing}.
12692
12693 @item gnus-treat-date-english (head)
12694 @item gnus-treat-date-iso8601 (head)
12695 @item gnus-treat-date-lapsed (head)
12696 @item gnus-treat-date-local (head)
12697 @item gnus-treat-date-original (head)
12698 @item gnus-treat-date-user-defined (head)
12699 @item gnus-treat-date-ut (head)
12700
12701 @xref{Article Date}.
12702
12703 @item gnus-treat-from-picon (head)
12704 @item gnus-treat-mail-picon (head)
12705 @item gnus-treat-newsgroups-picon (head)
12706
12707 @xref{Picons}.
12708
12709 @item gnus-treat-display-smileys (t, integer)
12710
12711 @item gnus-treat-body-boundary (head)
12712
12713 @vindex gnus-body-boundary-delimiter
12714 Adds a delimiter between header and body, the string used as delimiter
12715 is controlled by @code{gnus-body-boundary-delimiter}.
12716
12717 @xref{Smileys}.
12718
12719 @vindex gnus-treat-display-x-face
12720 @item gnus-treat-display-x-face (head)
12721
12722 @xref{X-Face}.
12723
12724 @vindex gnus-treat-display-face
12725 @item gnus-treat-display-face (head)
12726
12727 @xref{Face}.
12728
12729 @vindex gnus-treat-emphasize
12730 @item gnus-treat-emphasize (t, head, integer)
12731 @vindex gnus-treat-fill-article
12732 @item gnus-treat-fill-article (t, integer)
12733 @vindex gnus-treat-fill-long-lines
12734 @item gnus-treat-fill-long-lines (t, integer)
12735 @vindex gnus-treat-hide-boring-headers
12736 @item gnus-treat-hide-boring-headers (head)
12737 @vindex gnus-treat-hide-citation
12738 @item gnus-treat-hide-citation (t, integer)
12739 @vindex gnus-treat-hide-citation-maybe
12740 @item gnus-treat-hide-citation-maybe (t, integer)
12741 @vindex gnus-treat-hide-headers
12742 @item gnus-treat-hide-headers (head)
12743 @vindex gnus-treat-hide-signature
12744 @item gnus-treat-hide-signature (t, last)
12745 @vindex gnus-treat-strip-banner
12746 @item gnus-treat-strip-banner (t, last)
12747 @vindex gnus-treat-strip-list-identifiers
12748 @item gnus-treat-strip-list-identifiers (head)
12749
12750 @xref{Article Hiding}.
12751
12752 @vindex gnus-treat-highlight-citation
12753 @item gnus-treat-highlight-citation (t, integer)
12754 @vindex gnus-treat-highlight-headers
12755 @item gnus-treat-highlight-headers (head)
12756 @vindex gnus-treat-highlight-signature
12757 @item gnus-treat-highlight-signature (t, last, integer)
12758
12759 @xref{Article Highlighting}.
12760
12761 @vindex gnus-treat-play-sounds
12762 @item gnus-treat-play-sounds
12763 @vindex gnus-treat-translate
12764 @item gnus-treat-translate
12765 @item gnus-treat-ansi-sequences (t)
12766 @vindex gnus-treat-x-pgp-sig
12767 @item gnus-treat-x-pgp-sig (head)
12768
12769 @vindex gnus-treat-unfold-headers
12770 @item gnus-treat-unfold-headers (head)
12771 @vindex gnus-treat-fold-headers
12772 @item gnus-treat-fold-headers (head)
12773 @vindex gnus-treat-fold-newsgroups
12774 @item gnus-treat-fold-newsgroups (head)
12775 @vindex gnus-treat-leading-whitespace
12776 @item gnus-treat-leading-whitespace (head)
12777
12778 @xref{Article Header}.
12779
12780
12781 @end table
12782
12783 @vindex gnus-part-display-hook
12784 You can, of course, write your own functions to be called from
12785 @code{gnus-part-display-hook}.  The functions are called narrowed to the
12786 part, and you can do anything you like, pretty much.  There is no
12787 information that you have to keep in the buffer---you can change
12788 everything.
12789
12790
12791 @node Article Keymap
12792 @section Article Keymap
12793
12794 Most of the keystrokes in the summary buffer can also be used in the
12795 article buffer.  They should behave as if you typed them in the summary
12796 buffer, which means that you don't actually have to have a summary
12797 buffer displayed while reading.  You can do it all from the article
12798 buffer.
12799
12800 @kindex v (Article)
12801 @cindex keys, reserved for users (Article)
12802 The key @kbd{v} is reserved for users.  You can bind it to some
12803 command or better use it as a prefix key.
12804
12805 A few additional keystrokes are available:
12806
12807 @table @kbd
12808
12809 @item SPACE
12810 @kindex SPACE (Article)
12811 @findex gnus-article-next-page
12812 Scroll forwards one page (@code{gnus-article-next-page}).
12813 This is exactly the same as @kbd{h SPACE h}.
12814
12815 @item DEL
12816 @kindex DEL (Article)
12817 @findex gnus-article-prev-page
12818 Scroll backwards one page (@code{gnus-article-prev-page}).
12819 This is exactly the same as @kbd{h DEL h}.
12820
12821 @item C-c ^
12822 @kindex C-c ^ (Article)
12823 @findex gnus-article-refer-article
12824 If point is in the neighborhood of a @code{Message-ID} and you press
12825 @kbd{C-c ^}, Gnus will try to get that article from the server
12826 (@code{gnus-article-refer-article}).
12827
12828 @item C-c C-m
12829 @kindex C-c C-m (Article)
12830 @findex gnus-article-mail
12831 Send a reply to the address near point (@code{gnus-article-mail}).  If
12832 given a prefix, include the mail.
12833
12834 @item s
12835 @kindex s (Article)
12836 @findex gnus-article-show-summary
12837 Reconfigure the buffers so that the summary buffer becomes visible
12838 (@code{gnus-article-show-summary}).
12839
12840 @item ?
12841 @kindex ? (Article)
12842 @findex gnus-article-describe-briefly
12843 Give a very brief description of the available keystrokes
12844 (@code{gnus-article-describe-briefly}).
12845
12846 @item TAB
12847 @kindex TAB (Article)
12848 @findex gnus-article-next-button
12849 Go to the next button, if any (@code{gnus-article-next-button}).  This
12850 only makes sense if you have buttonizing turned on.
12851
12852 @item M-TAB
12853 @kindex M-TAB (Article)
12854 @findex gnus-article-prev-button
12855 Go to the previous button, if any (@code{gnus-article-prev-button}).
12856
12857 @item R
12858 @kindex R (Article)
12859 @findex gnus-article-reply-with-original
12860 Send a reply to the current article and yank the current article
12861 (@code{gnus-article-reply-with-original}).  If the region is active,
12862 only yank the text in the region.
12863
12864 @item S W
12865 @kindex S W (Article)
12866 @findex gnus-article-wide-reply-with-original
12867 Send a wide reply to the current article and yank the current article
12868 (@code{gnus-article-wide-reply-with-original}).  If the region is
12869 active, only yank the text in the region.
12870
12871 @item F
12872 @kindex F (Article)
12873 @findex gnus-article-followup-with-original
12874 Send a followup to the current article and yank the current article
12875 (@code{gnus-article-followup-with-original}).  If the region is active,
12876 only yank the text in the region.
12877
12878
12879 @end table
12880
12881
12882 @node Misc Article
12883 @section Misc Article
12884
12885 @table @code
12886
12887 @item gnus-single-article-buffer
12888 @vindex gnus-single-article-buffer
12889 @cindex article buffers, several
12890 If non-@code{nil}, use the same article buffer for all the groups.
12891 (This is the default.)  If @code{nil}, each group will have its own
12892 article buffer.
12893
12894 @vindex gnus-article-decode-hook
12895 @item gnus-article-decode-hook
12896 @cindex @acronym{MIME}
12897 Hook used to decode @acronym{MIME} articles.  The default value is
12898 @code{(article-decode-charset article-decode-encoded-words)}
12899
12900 @vindex gnus-article-prepare-hook
12901 @item gnus-article-prepare-hook
12902 This hook is called right after the article has been inserted into the
12903 article buffer.  It is mainly intended for functions that do something
12904 depending on the contents; it should probably not be used for changing
12905 the contents of the article buffer.
12906
12907 @item gnus-article-mode-hook
12908 @vindex gnus-article-mode-hook
12909 Hook called in article mode buffers.
12910
12911 @item gnus-article-mode-syntax-table
12912 @vindex gnus-article-mode-syntax-table
12913 Syntax table used in article buffers.  It is initialized from
12914 @code{text-mode-syntax-table}.
12915
12916 @vindex gnus-article-over-scroll
12917 @item gnus-article-over-scroll
12918 If non-@code{nil}, allow scrolling the article buffer even when there
12919 no more new text to scroll in.  The default is @code{nil}.
12920
12921 @vindex gnus-article-mode-line-format
12922 @item gnus-article-mode-line-format
12923 This variable is a format string along the same lines as
12924 @code{gnus-summary-mode-line-format} (@pxref{Summary Buffer Mode
12925 Line}).  It accepts the same format specifications as that variable,
12926 with two extensions:
12927
12928 @table @samp
12929
12930 @item w
12931 The @dfn{wash status} of the article.  This is a short string with one
12932 character for each possible article wash operation that may have been
12933 performed.  The characters and their meaning:
12934
12935 @table @samp
12936
12937 @item c
12938 Displayed when cited text may be hidden in the article buffer.
12939
12940 @item h
12941 Displayed when headers are hidden in the article buffer.
12942
12943 @item p
12944 Displayed when article is digitally signed or encrypted, and Gnus has
12945 hidden the security headers.  (N.B. does not tell anything about
12946 security status, i.e. good or bad signature.)
12947
12948 @item s
12949 Displayed when the signature has been hidden in the Article buffer.
12950
12951 @item o
12952 Displayed when Gnus has treated overstrike characters in the article buffer.
12953
12954 @item e
12955 Displayed when Gnus has treated emphasized strings in the article buffer.
12956
12957 @end table
12958
12959 @item m
12960 The number of @acronym{MIME} parts in the article.
12961
12962 @end table
12963
12964 @vindex gnus-break-pages
12965
12966 @item gnus-break-pages
12967 Controls whether @dfn{page breaking} is to take place.  If this variable
12968 is non-@code{nil}, the articles will be divided into pages whenever a
12969 page delimiter appears in the article.  If this variable is @code{nil},
12970 paging will not be done.
12971
12972 @item gnus-page-delimiter
12973 @vindex gnus-page-delimiter
12974 This is the delimiter mentioned above.  By default, it is @samp{^L}
12975 (formfeed).
12976
12977 @cindex IDNA
12978 @cindex internationalized domain names
12979 @vindex gnus-use-idna
12980 @item gnus-use-idna
12981 This variable controls whether Gnus performs IDNA decoding of
12982 internationalized domain names inside @samp{From}, @samp{To} and
12983 @samp{Cc} headers.  @xref{IDNA, ,IDNA,message, The Message Manual},
12984 for how to compose such messages.  This requires
12985 @uref{http://www.gnu.org/software/libidn/, GNU Libidn}, and this
12986 variable is only enabled if you have installed it.
12987
12988 @end table
12989
12990
12991 @node Composing Messages
12992 @chapter Composing Messages
12993 @cindex composing messages
12994 @cindex messages
12995 @cindex mail
12996 @cindex sending mail
12997 @cindex reply
12998 @cindex followup
12999 @cindex post
13000 @cindex using gpg
13001 @cindex using s/mime
13002 @cindex using smime
13003
13004 @kindex C-c C-c (Post)
13005 All commands for posting and mailing will put you in a message buffer
13006 where you can edit the article all you like, before you send the
13007 article by pressing @kbd{C-c C-c}.  @xref{Top, , Overview, message,
13008 Message Manual}.  Where the message will be posted/mailed to depends
13009 on your setup (@pxref{Posting Server}).
13010
13011 @menu
13012 * Mail::                        Mailing and replying.
13013 * Posting Server::              What server should you post and mail via?
13014 * POP before SMTP::             You cannot send a mail unless you read a mail.
13015 * Mail and Post::               Mailing and posting at the same time.
13016 * Archived Messages::           Where Gnus stores the messages you've sent.
13017 * Posting Styles::              An easier way to specify who you are.
13018 * Drafts::                      Postponing messages and rejected messages.
13019 * Rejected Articles::           What happens if the server doesn't like your article?
13020 * Signing and encrypting::      How to compose secure messages.
13021 @end menu
13022
13023 Also @pxref{Canceling and Superseding} for information on how to
13024 remove articles you shouldn't have posted.
13025
13026
13027 @node Mail
13028 @section Mail
13029
13030 Variables for customizing outgoing mail:
13031
13032 @table @code
13033 @item gnus-uu-digest-headers
13034 @vindex gnus-uu-digest-headers
13035 List of regexps to match headers included in digested messages.  The
13036 headers will be included in the sequence they are matched.  If
13037 @code{nil} include all headers.
13038
13039 @item gnus-add-to-list
13040 @vindex gnus-add-to-list
13041 If non-@code{nil}, add a @code{to-list} group parameter to mail groups
13042 that have none when you do a @kbd{a}.
13043
13044 @item gnus-confirm-mail-reply-to-news
13045 @vindex gnus-confirm-mail-reply-to-news
13046 If non-@code{nil}, Gnus will ask you for a confirmation when you are
13047 about to reply to news articles by mail.  If it is @code{nil}, nothing
13048 interferes in what you want to do.  This can also be a function
13049 receiving the group name as the only parameter which should return
13050 non-@code{nil} if a confirmation is needed, or a regular expression
13051 matching group names, where confirmation should be asked for.
13052
13053 If you find yourself never wanting to reply to mail, but occasionally
13054 press @kbd{R} anyway, this variable might be for you.
13055
13056 @item gnus-confirm-treat-mail-like-news
13057 @vindex gnus-confirm-treat-mail-like-news
13058 If non-@code{nil}, Gnus also requests confirmation according to
13059 @code{gnus-confirm-mail-reply-to-news} when replying to mail.  This is
13060 useful for treating mailing lists like newsgroups.
13061
13062 @end table
13063
13064
13065 @node Posting Server
13066 @section Posting Server
13067
13068 When you press those magical @kbd{C-c C-c} keys to ship off your latest
13069 (extremely intelligent, of course) article, where does it go?
13070
13071 Thank you for asking.  I hate you.
13072
13073 It can be quite complicated.
13074
13075 @vindex gnus-post-method
13076 When posting news, Message usually invokes @code{message-send-news}
13077 (@pxref{News Variables, , News Variables, message, Message Manual}).
13078 Normally, Gnus will post using the same select method as you're
13079 reading from (which might be convenient if you're reading lots of
13080 groups from different private servers).  However.  If the server
13081 you're reading from doesn't allow posting, just reading, you probably
13082 want to use some other server to post your (extremely intelligent and
13083 fabulously interesting) articles.  You can then set the
13084 @code{gnus-post-method} to some other method:
13085
13086 @lisp
13087 (setq gnus-post-method '(nnspool ""))
13088 @end lisp
13089
13090 Now, if you've done this, and then this server rejects your article, or
13091 this server is down, what do you do then?  To override this variable you
13092 can use a non-zero prefix to the @kbd{C-c C-c} command to force using
13093 the ``current'' server, to get back the default behavior, for posting.
13094
13095 If you give a zero prefix (i.e., @kbd{C-u 0 C-c C-c}) to that command,
13096 Gnus will prompt you for what method to use for posting.
13097
13098 You can also set @code{gnus-post-method} to a list of select methods.
13099 If that's the case, Gnus will always prompt you for what method to use
13100 for posting.
13101
13102 Finally, if you want to always post using the native select method,
13103 you can set this variable to @code{native}.
13104
13105 @vindex message-send-mail-function
13106 When sending mail, Message invokes the function specified by the
13107 variable @code{message-send-mail-function}.  Gnus tries to set it to a
13108 value suitable for your system.
13109 @xref{Mail Variables, ,Mail Variables,message,Message manual}, for more
13110 information.
13111
13112 @node POP before SMTP
13113 @section POP before SMTP
13114 @cindex pop before smtp
13115 @findex message-smtpmail-send-it
13116 @findex mail-source-touch-pop
13117
13118 Does your @acronym{ISP} require the @acronym{POP}-before-@acronym{SMTP}
13119 authentication?  It is whether you need to connect to the @acronym{POP}
13120 mail server within a certain time before sending mails.  If so, there is
13121 a convenient way.  To do that, put the following lines in your
13122 @file{~/.gnus.el} file:
13123
13124 @lisp
13125 (setq message-send-mail-function 'message-smtpmail-send-it)
13126 (add-hook 'message-send-mail-hook 'mail-source-touch-pop)
13127 @end lisp
13128
13129 @noindent
13130 It means to let Gnus connect to the @acronym{POP} mail server in advance
13131 whenever you send a mail.  The @code{mail-source-touch-pop} function
13132 does only a @acronym{POP} authentication according to the value of
13133 @code{mail-sources} without fetching mails, just before sending a mail.
13134 Note that you have to use @code{message-smtpmail-send-it} which runs
13135 @code{message-send-mail-hook} rather than @code{smtpmail-send-it} and
13136 set the value of @code{mail-sources} for a @acronym{POP} connection
13137 correctly.  @xref{Mail Sources}.
13138
13139 If you have two or more @acronym{POP} mail servers set in
13140 @code{mail-sources}, you may want to specify one of them to
13141 @code{mail-source-primary-source} as the @acronym{POP} mail server to be
13142 used for the @acronym{POP}-before-@acronym{SMTP} authentication.  If it
13143 is your primary @acronym{POP} mail server (i.e., you are fetching mails
13144 mainly from that server), you can set it permanently as follows:
13145
13146 @lisp
13147 (setq mail-source-primary-source
13148       '(pop :server "pop3.mail.server"
13149             :password "secret"))
13150 @end lisp
13151
13152 @noindent
13153 Otherwise, bind it dynamically only when performing the
13154 @acronym{POP}-before-@acronym{SMTP} authentication as follows:
13155
13156 @lisp
13157 (add-hook 'message-send-mail-hook
13158           (lambda ()
13159             (let ((mail-source-primary-source
13160                    '(pop :server "pop3.mail.server"
13161                          :password "secret")))
13162               (mail-source-touch-pop))))
13163 @end lisp
13164
13165 @node Mail and Post
13166 @section Mail and Post
13167
13168 Here's a list of variables relevant to both mailing and
13169 posting:
13170
13171 @table @code
13172 @item gnus-mailing-list-groups
13173 @findex gnus-mailing-list-groups
13174 @cindex mailing lists
13175
13176 If your news server offers groups that are really mailing lists
13177 gatewayed to the @acronym{NNTP} server, you can read those groups without
13178 problems, but you can't post/followup to them without some difficulty.
13179 One solution is to add a @code{to-address} to the group parameters
13180 (@pxref{Group Parameters}).  An easier thing to do is set the
13181 @code{gnus-mailing-list-groups} to a regexp that matches the groups that
13182 really are mailing lists.  Then, at least, followups to the mailing
13183 lists will work most of the time.  Posting to these groups (@kbd{a}) is
13184 still a pain, though.
13185
13186 @item gnus-user-agent
13187 @vindex gnus-user-agent
13188 @cindex User-Agent
13189
13190 This variable controls which information should be exposed in the
13191 User-Agent header.  It can be a list of symbols or a string.  Valid
13192 symbols are @code{gnus} (show Gnus version) and @code{emacs} (show Emacs
13193 version).  In addition to the Emacs version, you can add @code{codename}
13194 (show (S)XEmacs codename) or either @code{config} (show system
13195 configuration) or @code{type} (show system type).  If you set it to a
13196 string, be sure to use a valid format, see RFC 2616.
13197
13198 @end table
13199
13200 You may want to do spell-checking on messages that you send out.  Or, if
13201 you don't want to spell-check by hand, you could add automatic
13202 spell-checking via the @code{ispell} package:
13203
13204 @cindex ispell
13205 @findex ispell-message
13206 @lisp
13207 (add-hook 'message-send-hook 'ispell-message)
13208 @end lisp
13209
13210 If you want to change the @code{ispell} dictionary based on what group
13211 you're in, you could say something like the following:
13212
13213 @lisp
13214 (add-hook 'gnus-select-group-hook
13215           (lambda ()
13216             (cond
13217              ((string-match
13218                "^de\\." (gnus-group-real-name gnus-newsgroup-name))
13219               (ispell-change-dictionary "deutsch"))
13220              (t
13221               (ispell-change-dictionary "english")))))
13222 @end lisp
13223
13224 Modify to suit your needs.
13225
13226 @vindex gnus-message-highlight-citation
13227 If @code{gnus-message-highlight-citation} is t, different levels of
13228 citations are highlighted like in Gnus article buffers also in message
13229 mode buffers.
13230
13231 @node Archived Messages
13232 @section Archived Messages
13233 @cindex archived messages
13234 @cindex sent messages
13235
13236 Gnus provides a few different methods for storing the mail and news you
13237 send.  The default method is to use the @dfn{archive virtual server} to
13238 store the messages.  If you want to disable this completely, the
13239 @code{gnus-message-archive-group} variable should be @code{nil}, which
13240 is the default.
13241
13242 For archiving interesting messages in a group you read, see the
13243 @kbd{B c} (@code{gnus-summary-copy-article}) command (@pxref{Mail
13244 Group Commands}).
13245
13246 @vindex gnus-message-archive-method
13247 @code{gnus-message-archive-method} says what virtual server Gnus is to
13248 use to store sent messages.  The default is @code{"archive"}, and when
13249 actually being used it is expanded into:
13250
13251 @lisp
13252 (nnfolder "archive"
13253           (nnfolder-directory   "~/Mail/archive")
13254           (nnfolder-active-file "~/Mail/archive/active")
13255           (nnfolder-get-new-mail nil)
13256           (nnfolder-inhibit-expiry t))
13257 @end lisp
13258
13259 @quotation
13260 @vindex gnus-update-message-archive-method
13261 Note: a server like this is saved in the @file{~/.newsrc.eld} file first
13262 so that it may be used as a real method of the server which is named
13263 @code{"archive"} (that is, for the case where
13264 @code{gnus-message-archive-method} is set to @code{"archive"}) ever
13265 since.  If it once has been saved, it will never be updated by default
13266 even if you change the value of @code{gnus-message-archive-method}
13267 afterward.  Therefore, the server @code{"archive"} doesn't necessarily
13268 mean the @code{nnfolder} server like this at all times.  If you want the
13269 saved method to reflect always the value of
13270 @code{gnus-message-archive-method}, set the
13271 @code{gnus-update-message-archive-method} variable to a non-@code{nil}
13272 value.  The default value of this variable is @code{nil}.
13273 @end quotation
13274
13275 You can, however, use any mail select method (@code{nnml},
13276 @code{nnmbox}, etc.).  @code{nnfolder} is a quite likable select method
13277 for doing this sort of thing, though.  If you don't like the default
13278 directory chosen, you could say something like:
13279
13280 @lisp
13281 (setq gnus-message-archive-method
13282       '(nnfolder "archive"
13283                  (nnfolder-inhibit-expiry t)
13284                  (nnfolder-active-file "~/News/sent-mail/active")
13285                  (nnfolder-directory "~/News/sent-mail/")))
13286 @end lisp
13287
13288 @vindex gnus-message-archive-group
13289 @cindex Gcc
13290 Gnus will insert @code{Gcc} headers in all outgoing messages that point
13291 to one or more group(s) on that server.  Which group to use is
13292 determined by the @code{gnus-message-archive-group} variable.
13293
13294 This variable can be used to do the following:
13295
13296 @table @asis
13297 @item a string
13298 Messages will be saved in that group.
13299
13300 Note that you can include a select method in the group name, then the
13301 message will not be stored in the select method given by
13302 @code{gnus-message-archive-method}, but in the select method specified
13303 by the group name, instead.  Suppose @code{gnus-message-archive-method}
13304 has the default value shown above.  Then setting
13305 @code{gnus-message-archive-group} to @code{"foo"} means that outgoing
13306 messages are stored in @samp{nnfolder+archive:foo}, but if you use the
13307 value @code{"nnml:foo"}, then outgoing messages will be stored in
13308 @samp{nnml:foo}.
13309
13310 @item a list of strings
13311 Messages will be saved in all those groups.
13312
13313 @item an alist of regexps, functions and forms
13314 When a key ``matches'', the result is used.
13315
13316 @item @code{nil}
13317 No message archiving will take place.  This is the default.
13318 @end table
13319
13320 Let's illustrate:
13321
13322 Just saving to a single group called @samp{MisK}:
13323 @lisp
13324 (setq gnus-message-archive-group "MisK")
13325 @end lisp
13326
13327 Saving to two groups, @samp{MisK} and @samp{safe}:
13328 @lisp
13329 (setq gnus-message-archive-group '("MisK" "safe"))
13330 @end lisp
13331
13332 Save to different groups based on what group you are in:
13333 @lisp
13334 (setq gnus-message-archive-group
13335       '(("^alt" "sent-to-alt")
13336         ("mail" "sent-to-mail")
13337         (".*" "sent-to-misc")))
13338 @end lisp
13339
13340 More complex stuff:
13341 @lisp
13342 (setq gnus-message-archive-group
13343       '((if (message-news-p)
13344             "misc-news"
13345           "misc-mail")))
13346 @end lisp
13347
13348 How about storing all news messages in one file, but storing all mail
13349 messages in one file per month:
13350
13351 @lisp
13352 (setq gnus-message-archive-group
13353       '((if (message-news-p)
13354             "misc-news"
13355           (concat "mail." (format-time-string "%Y-%m")))))
13356 @end lisp
13357
13358 @c (XEmacs 19.13 doesn't have @code{format-time-string}, so you'll have to
13359 @c use a different value for @code{gnus-message-archive-group} there.)
13360
13361 Now, when you send a message off, it will be stored in the appropriate
13362 group.  (If you want to disable storing for just one particular message,
13363 you can just remove the @code{Gcc} header that has been inserted.)  The
13364 archive group will appear in the group buffer the next time you start
13365 Gnus, or the next time you press @kbd{F} in the group buffer.  You can
13366 enter it and read the articles in it just like you'd read any other
13367 group.  If the group gets really big and annoying, you can simply rename
13368 if (using @kbd{G r} in the group buffer) to something
13369 nice---@samp{misc-mail-september-1995}, or whatever.  New messages will
13370 continue to be stored in the old (now empty) group.
13371
13372 That's the default method of archiving sent messages.  Gnus offers a
13373 different way for the people who don't like the default method.  In that
13374 case you should set @code{gnus-message-archive-group} to @code{nil};
13375 this will disable archiving.
13376
13377 @table @code
13378 @item gnus-outgoing-message-group
13379 @vindex gnus-outgoing-message-group
13380 All outgoing messages will be put in this group.  If you want to store
13381 all your outgoing mail and articles in the group @samp{nnml:archive},
13382 you set this variable to that value.  This variable can also be a list of
13383 group names.
13384
13385 If you want to have greater control over what group to put each
13386 message in, you can set this variable to a function that checks the
13387 current newsgroup name and then returns a suitable group name (or list
13388 of names).
13389
13390 This variable can be used instead of @code{gnus-message-archive-group},
13391 but the latter is the preferred method.
13392
13393 @item gnus-gcc-mark-as-read
13394 @vindex gnus-gcc-mark-as-read
13395 If non-@code{nil}, automatically mark @code{Gcc} articles as read.
13396
13397 @item gnus-gcc-externalize-attachments
13398 @vindex gnus-gcc-externalize-attachments
13399 If @code{nil}, attach files as normal parts in Gcc copies; if a regexp
13400 and matches the Gcc group name, attach files as external parts; if it is
13401 @code{all}, attach local files as external parts; if it is other
13402 non-@code{nil}, the behavior is the same as @code{all}, but it may be
13403 changed in the future.
13404
13405 @end table
13406
13407
13408 @node Posting Styles
13409 @section Posting Styles
13410 @cindex posting styles
13411 @cindex styles
13412
13413 All them variables, they make my head swim.
13414
13415 So what if you want a different @code{Organization} and signature based
13416 on what groups you post to?  And you post both from your home machine
13417 and your work machine, and you want different @code{From} lines, and so
13418 on?
13419
13420 @vindex gnus-posting-styles
13421 One way to do stuff like that is to write clever hooks that change the
13422 variables you need to have changed.  That's a bit boring, so somebody
13423 came up with the bright idea of letting the user specify these things in
13424 a handy alist.  Here's an example of a @code{gnus-posting-styles}
13425 variable:
13426
13427 @lisp
13428 ((".*"
13429   (signature "Peace and happiness")
13430   (organization "What me?"))
13431  ("^comp"
13432   (signature "Death to everybody"))
13433  ("comp.emacs.i-love-it"
13434   (organization "Emacs is it")))
13435 @end lisp
13436
13437 As you might surmise from this example, this alist consists of several
13438 @dfn{styles}.  Each style will be applicable if the first element
13439 ``matches'', in some form or other.  The entire alist will be iterated
13440 over, from the beginning towards the end, and each match will be
13441 applied, which means that attributes in later styles that match override
13442 the same attributes in earlier matching styles.  So
13443 @samp{comp.programming.literate} will have the @samp{Death to everybody}
13444 signature and the @samp{What me?} @code{Organization} header.
13445
13446 The first element in each style is called the @code{match}.  If it's a
13447 string, then Gnus will try to regexp match it against the group name.
13448 If it is the form @code{(header @var{match} @var{regexp})}, then Gnus
13449 will look in the original article for a header whose name is
13450 @var{match} and compare that @var{regexp}.  @var{match} and
13451 @var{regexp} are strings.  (The original article is the one you are
13452 replying or following up to.  If you are not composing a reply or a
13453 followup, then there is nothing to match against.)  If the
13454 @code{match} is a function symbol, that function will be called with
13455 no arguments.  If it's a variable symbol, then the variable will be
13456 referenced.  If it's a list, then that list will be @code{eval}ed.  In
13457 any case, if this returns a non-@code{nil} value, then the style is
13458 said to @dfn{match}.
13459
13460 Each style may contain an arbitrary amount of @dfn{attributes}.  Each
13461 attribute consists of a @code{(@var{name} @var{value})} pair.  In
13462 addition, you can also use the @code{(@var{name} :file @var{value})}
13463 form or the @code{(@var{name} :value @var{value})} form.  Where
13464 @code{:file} signifies @var{value} represents a file name and its
13465 contents should be used as the attribute value, @code{:value} signifies
13466 @var{value} does not represent a file name explicitly.  The attribute
13467 name can be one of:
13468
13469 @itemize @bullet
13470 @item @code{signature}
13471 @item @code{signature-file}
13472 @item @code{x-face-file}
13473 @item @code{address}, overriding @code{user-mail-address}
13474 @item @code{name}, overriding @code{(user-full-name)}
13475 @item @code{body}
13476 @end itemize
13477
13478 Note that the @code{signature-file} attribute honors the variable
13479 @code{message-signature-directory}.
13480
13481 The attribute name can also be a string or a symbol.  In that case,
13482 this will be used as a header name, and the value will be inserted in
13483 the headers of the article; if the value is @code{nil}, the header
13484 name will be removed.  If the attribute name is @code{eval}, the form
13485 is evaluated, and the result is thrown away.
13486
13487 The attribute value can be a string (used verbatim), a function with
13488 zero arguments (the return value will be used), a variable (its value
13489 will be used) or a list (it will be @code{eval}ed and the return value
13490 will be used).  The functions and sexps are called/@code{eval}ed in the
13491 message buffer that is being set up.  The headers of the current article
13492 are available through the @code{message-reply-headers} variable, which
13493 is a vector of the following headers: number subject from date id
13494 references chars lines xref extra.
13495
13496 @vindex message-reply-headers
13497
13498 If you wish to check whether the message you are about to compose is
13499 meant to be a news article or a mail message, you can check the values
13500 of the @code{message-news-p} and @code{message-mail-p} functions.
13501
13502 @findex message-mail-p
13503 @findex message-news-p
13504
13505 So here's a new example:
13506
13507 @lisp
13508 (setq gnus-posting-styles
13509       '((".*"
13510          (signature-file "~/.signature")
13511          (name "User Name")
13512          (x-face-file "~/.xface")
13513          (x-url (getenv "WWW_HOME"))
13514          (organization "People's Front Against MWM"))
13515         ("^rec.humor"
13516          (signature my-funny-signature-randomizer))
13517         ((equal (system-name) "gnarly")  ;; @r{A form}
13518          (signature my-quote-randomizer))
13519         (message-news-p        ;; @r{A function symbol}
13520          (signature my-news-signature))
13521         (window-system         ;; @r{A value symbol}
13522          ("X-Window-System" (format "%s" window-system)))
13523         ;; @r{If I'm replying to Larsi, set the Organization header.}
13524         ((header "from" "larsi.*org")
13525          (Organization "Somewhere, Inc."))
13526         ((posting-from-work-p) ;; @r{A user defined function}
13527          (signature-file "~/.work-signature")
13528          (address "user@@bar.foo")
13529          (body "You are fired.\n\nSincerely, your boss.")
13530          (organization "Important Work, Inc"))
13531         ("nnml:.*"
13532          (From (with-current-buffer gnus-article-buffer
13533                  (message-fetch-field "to"))))
13534         ("^nn.+:"
13535          (signature-file "~/.mail-signature"))))
13536 @end lisp
13537
13538 The @samp{nnml:.*} rule means that you use the @code{To} address as the
13539 @code{From} address in all your outgoing replies, which might be handy
13540 if you fill many roles.
13541 You may also use @code{message-alternative-emails} instead.
13542 @xref{Message Headers, ,Message Headers, message, Message Manual}.
13543
13544 @node Drafts
13545 @section Drafts
13546 @cindex drafts
13547
13548 If you are writing a message (mail or news) and suddenly remember that
13549 you have a steak in the oven (or some pesto in the food processor, you
13550 craaazy vegetarians), you'll probably wish there was a method to save
13551 the message you are writing so that you can continue editing it some
13552 other day, and send it when you feel its finished.
13553
13554 Well, don't worry about it.  Whenever you start composing a message of
13555 some sort using the Gnus mail and post commands, the buffer you get will
13556 automatically associate to an article in a special @dfn{draft} group.
13557 If you save the buffer the normal way (@kbd{C-x C-s}, for instance), the
13558 article will be saved there.  (Auto-save files also go to the draft
13559 group.)
13560
13561 @cindex nndraft
13562 @vindex nndraft-directory
13563 The draft group is a special group (which is implemented as an
13564 @code{nndraft} group, if you absolutely have to know) called
13565 @samp{nndraft:drafts}.  The variable @code{nndraft-directory} says where
13566 @code{nndraft} is to store its files.  What makes this group special is
13567 that you can't tick any articles in it or mark any articles as
13568 read---all articles in the group are permanently unread.
13569
13570 If the group doesn't exist, it will be created and you'll be subscribed
13571 to it.  The only way to make it disappear from the Group buffer is to
13572 unsubscribe it.  The special properties of the draft group comes from
13573 a group property (@pxref{Group Parameters}), and if lost the group
13574 behaves like any other group.  This means the commands below will not
13575 be available.  To restore the special properties of the group, the
13576 simplest way is to kill the group, using @kbd{C-k}, and restart
13577 Gnus.  The group is automatically created again with the
13578 correct parameters.  The content of the group is not lost.
13579
13580 @c @findex gnus-dissociate-buffer-from-draft
13581 @c @kindex C-c M-d (Mail)
13582 @c @kindex C-c M-d (Post)
13583 @c @findex gnus-associate-buffer-with-draft
13584 @c @kindex C-c C-d (Mail)
13585 @c @kindex C-c C-d (Post)
13586 @c If you're writing some super-secret message that you later want to
13587 @c encode with PGP before sending, you may wish to turn the auto-saving
13588 @c (and association with the draft group) off.  You never know who might be
13589 @c interested in reading all your extremely valuable and terribly horrible
13590 @c and interesting secrets.  The @kbd{C-c M-d}
13591 @c (@code{gnus-dissociate-buffer-from-draft}) command does that for you.
13592 @c If you change your mind and want to turn the auto-saving back on again,
13593 @c @kbd{C-c C-d} (@code{gnus-associate-buffer-with-draft} does that.
13594 @c
13595 @c @vindex gnus-use-draft
13596 @c To leave association with the draft group off by default, set
13597 @c @code{gnus-use-draft} to @code{nil}.  It is @code{t} by default.
13598
13599 @findex gnus-draft-edit-message
13600 @kindex D e (Draft)
13601 When you want to continue editing the article, you simply enter the
13602 draft group and push @kbd{D e} (@code{gnus-draft-edit-message}) to do
13603 that.  You will be placed in a buffer where you left off.
13604
13605 Rejected articles will also be put in this draft group (@pxref{Rejected
13606 Articles}).
13607
13608 @findex gnus-draft-send-all-messages
13609 @kindex D s (Draft)
13610 @findex gnus-draft-send-message
13611 @kindex D S (Draft)
13612 If you have lots of rejected messages you want to post (or mail) without
13613 doing further editing, you can use the @kbd{D s} command
13614 (@code{gnus-draft-send-message}).  This command understands the
13615 process/prefix convention (@pxref{Process/Prefix}).  The @kbd{D S}
13616 command (@code{gnus-draft-send-all-messages}) will ship off all messages
13617 in the buffer.
13618
13619 @findex gnus-draft-toggle-sending
13620 @kindex D t (Draft)
13621 If you have some messages that you wish not to send, you can use the
13622 @kbd{D t} (@code{gnus-draft-toggle-sending}) command to mark the message
13623 as unsendable.  This is a toggling command.
13624
13625 Finally, if you want to delete a draft, use the normal @kbd{B DEL}
13626 command (@pxref{Mail Group Commands}).
13627
13628
13629 @node Rejected Articles
13630 @section Rejected Articles
13631 @cindex rejected articles
13632
13633 Sometimes a news server will reject an article.  Perhaps the server
13634 doesn't like your face.  Perhaps it just feels miserable.  Perhaps
13635 @emph{there be demons}.  Perhaps you have included too much cited text.
13636 Perhaps the disk is full.  Perhaps the server is down.
13637
13638 These situations are, of course, totally beyond the control of Gnus.
13639 (Gnus, of course, loves the way you look, always feels great, has angels
13640 fluttering around inside of it, doesn't care about how much cited text
13641 you include, never runs full and never goes down.)  So Gnus saves these
13642 articles until some later time when the server feels better.
13643
13644 The rejected articles will automatically be put in a special draft group
13645 (@pxref{Drafts}).  When the server comes back up again, you'd then
13646 typically enter that group and send all the articles off.
13647
13648 @node Signing and encrypting
13649 @section Signing and encrypting
13650 @cindex using gpg
13651 @cindex using s/mime
13652 @cindex using smime
13653
13654 Gnus can digitally sign and encrypt your messages, using vanilla
13655 @acronym{PGP} format or @acronym{PGP/MIME} or @acronym{S/MIME}.  For
13656 decoding such messages, see the @code{mm-verify-option} and
13657 @code{mm-decrypt-option} options (@pxref{Security}).
13658
13659 @vindex gnus-message-replysign
13660 @vindex gnus-message-replyencrypt
13661 @vindex gnus-message-replysignencrypted
13662 Often, you would like to sign replies to people who send you signed
13663 messages.  Even more often, you might want to encrypt messages which
13664 are in reply to encrypted messages.  Gnus offers
13665 @code{gnus-message-replysign} to enable the former, and
13666 @code{gnus-message-replyencrypt} for the latter.  In addition, setting
13667 @code{gnus-message-replysignencrypted} (on by default) will sign
13668 automatically encrypted messages.
13669
13670 Instructing @acronym{MML} to perform security operations on a
13671 @acronym{MIME} part is done using the @kbd{C-c C-m s} key map for
13672 signing and the @kbd{C-c C-m c} key map for encryption, as follows.
13673
13674 @table @kbd
13675
13676 @item C-c C-m s s
13677 @kindex C-c C-m s s (Message)
13678 @findex mml-secure-message-sign-smime
13679
13680 Digitally sign current message using @acronym{S/MIME}.
13681
13682 @item C-c C-m s o
13683 @kindex C-c C-m s o (Message)
13684 @findex mml-secure-message-sign-pgp
13685
13686 Digitally sign current message using @acronym{PGP}.
13687
13688 @item C-c C-m s p
13689 @kindex C-c C-m s p (Message)
13690 @findex mml-secure-message-sign-pgp
13691
13692 Digitally sign current message using @acronym{PGP/MIME}.
13693
13694 @item C-c C-m c s
13695 @kindex C-c C-m c s (Message)
13696 @findex mml-secure-message-encrypt-smime
13697
13698 Digitally encrypt current message using @acronym{S/MIME}.
13699
13700 @item C-c C-m c o
13701 @kindex C-c C-m c o (Message)
13702 @findex mml-secure-message-encrypt-pgp
13703
13704 Digitally encrypt current message using @acronym{PGP}.
13705
13706 @item C-c C-m c p
13707 @kindex C-c C-m c p (Message)
13708 @findex mml-secure-message-encrypt-pgpmime
13709
13710 Digitally encrypt current message using @acronym{PGP/MIME}.
13711
13712 @item C-c C-m C-n
13713 @kindex C-c C-m C-n (Message)
13714 @findex mml-unsecure-message
13715 Remove security related @acronym{MML} tags from message.
13716
13717 @end table
13718
13719 @xref{Security, ,Security, message, Message Manual}, for more information.
13720
13721 @node Select Methods
13722 @chapter Select Methods
13723 @cindex foreign groups
13724 @cindex select methods
13725
13726 A @dfn{foreign group} is a group not read by the usual (or
13727 default) means.  It could be, for instance, a group from a different
13728 @acronym{NNTP} server, it could be a virtual group, or it could be your own
13729 personal mail group.
13730
13731 A foreign group (or any group, really) is specified by a @dfn{name} and
13732 a @dfn{select method}.  To take the latter first, a select method is a
13733 list where the first element says what back end to use (e.g. @code{nntp},
13734 @code{nnspool}, @code{nnml}) and the second element is the @dfn{server
13735 name}.  There may be additional elements in the select method, where the
13736 value may have special meaning for the back end in question.
13737
13738 One could say that a select method defines a @dfn{virtual server}---so
13739 we do just that (@pxref{Server Buffer}).
13740
13741 The @dfn{name} of the group is the name the back end will recognize the
13742 group as.
13743
13744 For instance, the group @samp{soc.motss} on the @acronym{NNTP} server
13745 @samp{some.where.edu} will have the name @samp{soc.motss} and select
13746 method @code{(nntp "some.where.edu")}.  Gnus will call this group
13747 @samp{nntp+some.where.edu:soc.motss}, even though the @code{nntp}
13748 back end just knows this group as @samp{soc.motss}.
13749
13750 The different methods all have their peculiarities, of course.
13751
13752 @menu
13753 * Server Buffer::               Making and editing virtual servers.
13754 * Getting News::                Reading USENET news with Gnus.
13755 * Getting Mail::                Reading your personal mail with Gnus.
13756 * Browsing the Web::            Getting messages from a plethora of Web sources.
13757 * IMAP::                        Using Gnus as a @acronym{IMAP} client.
13758 * Other Sources::               Reading directories, files, SOUP packets.
13759 * Combined Groups::             Combining groups into one group.
13760 * Email Based Diary::           Using mails to manage diary events in Gnus.
13761 * Gnus Unplugged::              Reading news and mail offline.
13762 @end menu
13763
13764
13765 @node Server Buffer
13766 @section Server Buffer
13767
13768 Traditionally, a @dfn{server} is a machine or a piece of software that
13769 one connects to, and then requests information from.  Gnus does not
13770 connect directly to any real servers, but does all transactions through
13771 one back end or other.  But that's just putting one layer more between
13772 the actual media and Gnus, so we might just as well say that each
13773 back end represents a virtual server.
13774
13775 For instance, the @code{nntp} back end may be used to connect to several
13776 different actual @acronym{NNTP} servers, or, perhaps, to many different ports
13777 on the same actual @acronym{NNTP} server.  You tell Gnus which back end to
13778 use, and what parameters to set by specifying a @dfn{select method}.
13779
13780 These select method specifications can sometimes become quite
13781 complicated---say, for instance, that you want to read from the
13782 @acronym{NNTP} server @samp{news.funet.fi} on port number 13, which
13783 hangs if queried for @acronym{NOV} headers and has a buggy select.  Ahem.
13784 Anyway, if you had to specify that for each group that used this
13785 server, that would be too much work, so Gnus offers a way of naming
13786 select methods, which is what you do in the server buffer.
13787
13788 To enter the server buffer, use the @kbd{^}
13789 (@code{gnus-group-enter-server-mode}) command in the group buffer.
13790
13791 @menu
13792 * Server Buffer Format::        You can customize the look of this buffer.
13793 * Server Commands::             Commands to manipulate servers.
13794 * Example Methods::             Examples server specifications.
13795 * Creating a Virtual Server::   An example session.
13796 * Server Variables::            Which variables to set.
13797 * Servers and Methods::         You can use server names as select methods.
13798 * Unavailable Servers::         Some servers you try to contact may be down.
13799 @end menu
13800
13801 @vindex gnus-server-mode-hook
13802 @code{gnus-server-mode-hook} is run when creating the server buffer.
13803
13804
13805 @node Server Buffer Format
13806 @subsection Server Buffer Format
13807 @cindex server buffer format
13808
13809 @vindex gnus-server-line-format
13810 You can change the look of the server buffer lines by changing the
13811 @code{gnus-server-line-format} variable.  This is a @code{format}-like
13812 variable, with some simple extensions:
13813
13814 @table @samp
13815
13816 @item h
13817 How the news is fetched---the back end name.
13818
13819 @item n
13820 The name of this server.
13821
13822 @item w
13823 Where the news is to be fetched from---the address.
13824
13825 @item s
13826 The opened/closed/denied status of the server.
13827
13828 @item a
13829 Whether this server is agentized.
13830 @end table
13831
13832 @vindex gnus-server-mode-line-format
13833 The mode line can also be customized by using the
13834 @code{gnus-server-mode-line-format} variable (@pxref{Mode Line
13835 Formatting}).  The following specs are understood:
13836
13837 @table @samp
13838 @item S
13839 Server name.
13840
13841 @item M
13842 Server method.
13843 @end table
13844
13845 Also @pxref{Formatting Variables}.
13846
13847
13848 @node Server Commands
13849 @subsection Server Commands
13850 @cindex server commands
13851
13852 @table @kbd
13853
13854 @item v
13855 @kindex v (Server)
13856 @cindex keys, reserved for users (Server)
13857 The key @kbd{v} is reserved for users.  You can bind it to some
13858 command or better use it as a prefix key.
13859
13860 @item a
13861 @kindex a (Server)
13862 @findex gnus-server-add-server
13863 Add a new server (@code{gnus-server-add-server}).
13864
13865 @item e
13866 @kindex e (Server)
13867 @findex gnus-server-edit-server
13868 Edit a server (@code{gnus-server-edit-server}).
13869
13870 @item SPACE
13871 @kindex SPACE (Server)
13872 @findex gnus-server-read-server
13873 Browse the current server (@code{gnus-server-read-server}).
13874
13875 @item q
13876 @kindex q (Server)
13877 @findex gnus-server-exit
13878 Return to the group buffer (@code{gnus-server-exit}).
13879
13880 @item k
13881 @kindex k (Server)
13882 @findex gnus-server-kill-server
13883 Kill the current server (@code{gnus-server-kill-server}).
13884
13885 @item y
13886 @kindex y (Server)
13887 @findex gnus-server-yank-server
13888 Yank the previously killed server (@code{gnus-server-yank-server}).
13889
13890 @item c
13891 @kindex c (Server)
13892 @findex gnus-server-copy-server
13893 Copy the current server (@code{gnus-server-copy-server}).
13894
13895 @item l
13896 @kindex l (Server)
13897 @findex gnus-server-list-servers
13898 List all servers (@code{gnus-server-list-servers}).
13899
13900 @item s
13901 @kindex s (Server)
13902 @findex gnus-server-scan-server
13903 Request that the server scan its sources for new articles
13904 (@code{gnus-server-scan-server}).  This is mainly sensible with mail
13905 servers.
13906
13907 @item g
13908 @kindex g (Server)
13909 @findex gnus-server-regenerate-server
13910 Request that the server regenerate all its data structures
13911 (@code{gnus-server-regenerate-server}).  This can be useful if you have
13912 a mail back end that has gotten out of sync.
13913
13914 @item z
13915 @kindex z (Server)
13916 @findex gnus-server-compact-server
13917
13918 Compact all groups in the server under point
13919 (@code{gnus-server-compact-server}).  Currently implemented only in
13920 nnml (@pxref{Mail Spool}).  This removes gaps between article numbers,
13921 hence getting a correct total article count.
13922
13923 @end table
13924
13925
13926 @node Example Methods
13927 @subsection Example Methods
13928
13929 Most select methods are pretty simple and self-explanatory:
13930
13931 @lisp
13932 (nntp "news.funet.fi")
13933 @end lisp
13934
13935 Reading directly from the spool is even simpler:
13936
13937 @lisp
13938 (nnspool "")
13939 @end lisp
13940
13941 As you can see, the first element in a select method is the name of the
13942 back end, and the second is the @dfn{address}, or @dfn{name}, if you
13943 will.
13944
13945 After these two elements, there may be an arbitrary number of
13946 @code{(@var{variable} @var{form})} pairs.
13947
13948 To go back to the first example---imagine that you want to read from
13949 port 15 on that machine.  This is what the select method should
13950 look like then:
13951
13952 @lisp
13953 (nntp "news.funet.fi" (nntp-port-number 15))
13954 @end lisp
13955
13956 You should read the documentation to each back end to find out what
13957 variables are relevant, but here's an @code{nnmh} example:
13958
13959 @code{nnmh} is a mail back end that reads a spool-like structure.  Say
13960 you have two structures that you wish to access: One is your private
13961 mail spool, and the other is a public one.  Here's the possible spec for
13962 your private mail:
13963
13964 @lisp
13965 (nnmh "private" (nnmh-directory "~/private/mail/"))
13966 @end lisp
13967
13968 (This server is then called @samp{private}, but you may have guessed
13969 that.)
13970
13971 Here's the method for a public spool:
13972
13973 @lisp
13974 (nnmh "public"
13975       (nnmh-directory "/usr/information/spool/")
13976       (nnmh-get-new-mail nil))
13977 @end lisp
13978
13979 @cindex proxy
13980 @cindex firewall
13981
13982 If you are behind a firewall and only have access to the @acronym{NNTP}
13983 server from the firewall machine, you can instruct Gnus to @code{rlogin}
13984 on the firewall machine and connect with
13985 @uref{http://netcat.sourceforge.net/, netcat} from there to the
13986 @acronym{NNTP} server.
13987 Doing this can be rather fiddly, but your virtual server definition
13988 should probably look something like this:
13989
13990 @lisp
13991 (nntp "firewall"
13992       (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)
13993       (nntp-via-address "the.firewall.machine")
13994       (nntp-address "the.real.nntp.host"))
13995 @end lisp
13996
13997 If you want to use the wonderful @code{ssh} program to provide a
13998 compressed connection over the modem line, you could add the following
13999 configuration to the example above:
14000
14001 @lisp
14002       (nntp-via-rlogin-command "ssh")
14003 @end lisp
14004
14005 See also @code{nntp-via-rlogin-command-switches}.  Here's an example for
14006 an indirect connection:
14007
14008 @lisp
14009 (setq gnus-select-method
14010       '(nntp "indirect"
14011              (nntp-address "news.server.example")
14012              (nntp-via-user-name "intermediate_user_name")
14013              (nntp-via-address "intermediate.host.example")
14014              (nntp-via-rlogin-command "ssh")
14015              (nntp-via-rlogin-command-switches ("-C"))
14016              (nntp-open-connection-function nntp-open-via-rlogin-and-netcat)))
14017 @end lisp
14018
14019 This means that you have to have set up @code{ssh-agent} correctly to
14020 provide automatic authorization, of course.
14021
14022 If you're behind a firewall, but have direct access to the outside world
14023 through a wrapper command like "runsocks", you could open a socksified
14024 netcat connection to the news server as follows:
14025
14026 @lisp
14027 (nntp "outside"
14028       (nntp-pre-command "runsocks")
14029       (nntp-open-connection-function nntp-open-netcat-stream)
14030       (nntp-address "the.news.server"))
14031 @end lisp
14032
14033
14034 @node Creating a Virtual Server
14035 @subsection Creating a Virtual Server
14036
14037 If you're saving lots of articles in the cache by using persistent
14038 articles, you may want to create a virtual server to read the cache.
14039
14040 First you need to add a new server.  The @kbd{a} command does that.  It
14041 would probably be best to use @code{nnml} to read the cache.  You
14042 could also use @code{nnspool} or @code{nnmh}, though.
14043
14044 Type @kbd{a nnml RET cache RET}.
14045
14046 You should now have a brand new @code{nnml} virtual server called
14047 @samp{cache}.  You now need to edit it to have the right definitions.
14048 Type @kbd{e} to edit the server.  You'll be entered into a buffer that
14049 will contain the following:
14050
14051 @lisp
14052 (nnml "cache")
14053 @end lisp
14054
14055 Change that to:
14056
14057 @lisp
14058 (nnml "cache"
14059          (nnml-directory "~/News/cache/")
14060          (nnml-active-file "~/News/cache/active"))
14061 @end lisp
14062
14063 Type @kbd{C-c C-c} to return to the server buffer.  If you now press
14064 @kbd{RET} over this virtual server, you should be entered into a browse
14065 buffer, and you should be able to enter any of the groups displayed.
14066
14067
14068 @node Server Variables
14069 @subsection Server Variables
14070 @cindex server variables
14071 @cindex server parameters
14072
14073 One sticky point when defining variables (both on back ends and in Emacs
14074 in general) is that some variables are typically initialized from other
14075 variables when the definition of the variables is being loaded.  If you
14076 change the ``base'' variable after the variables have been loaded, you
14077 won't change the ``derived'' variables.
14078
14079 This typically affects directory and file variables.  For instance,
14080 @code{nnml-directory} is @file{~/Mail/} by default, and all @code{nnml}
14081 directory variables are initialized from that variable, so
14082 @code{nnml-active-file} will be @file{~/Mail/active}.  If you define a
14083 new virtual @code{nnml} server, it will @emph{not} suffice to set just
14084 @code{nnml-directory}---you have to explicitly set all the file
14085 variables to be what you want them to be.  For a complete list of
14086 variables for each back end, see each back end's section later in this
14087 manual, but here's an example @code{nnml} definition:
14088
14089 @lisp
14090 (nnml "public"
14091       (nnml-directory "~/my-mail/")
14092       (nnml-active-file "~/my-mail/active")
14093       (nnml-newsgroups-file "~/my-mail/newsgroups"))
14094 @end lisp
14095
14096 Server variables are often called @dfn{server parameters}.
14097
14098 @node Servers and Methods
14099 @subsection Servers and Methods
14100
14101 Wherever you would normally use a select method
14102 (e.g. @code{gnus-secondary-select-method}, in the group select method,
14103 when browsing a foreign server) you can use a virtual server name
14104 instead.  This could potentially save lots of typing.  And it's nice all
14105 over.
14106
14107
14108 @node Unavailable Servers
14109 @subsection Unavailable Servers
14110
14111 If a server seems to be unreachable, Gnus will mark that server as
14112 @code{denied}.  That means that any subsequent attempt to make contact
14113 with that server will just be ignored.  ``It can't be opened,'' Gnus
14114 will tell you, without making the least effort to see whether that is
14115 actually the case or not.
14116
14117 That might seem quite naughty, but it does make sense most of the time.
14118 Let's say you have 10 groups subscribed to on server
14119 @samp{nephelococcygia.com}.  This server is located somewhere quite far
14120 away from you and the machine is quite slow, so it takes 1 minute just
14121 to find out that it refuses connection to you today.  If Gnus were to
14122 attempt to do that 10 times, you'd be quite annoyed, so Gnus won't
14123 attempt to do that.  Once it has gotten a single ``connection refused'',
14124 it will regard that server as ``down''.
14125
14126 So, what happens if the machine was only feeling unwell temporarily?
14127 How do you test to see whether the machine has come up again?
14128
14129 You jump to the server buffer (@pxref{Server Buffer}) and poke it
14130 with the following commands:
14131
14132 @table @kbd
14133
14134 @item O
14135 @kindex O (Server)
14136 @findex gnus-server-open-server
14137 Try to establish connection to the server on the current line
14138 (@code{gnus-server-open-server}).
14139
14140 @item C
14141 @kindex C (Server)
14142 @findex gnus-server-close-server
14143 Close the connection (if any) to the server
14144 (@code{gnus-server-close-server}).
14145
14146 @item D
14147 @kindex D (Server)
14148 @findex gnus-server-deny-server
14149 Mark the current server as unreachable
14150 (@code{gnus-server-deny-server}).
14151
14152 @item M-o
14153 @kindex M-o (Server)
14154 @findex gnus-server-open-all-servers
14155 Open the connections to all servers in the buffer
14156 (@code{gnus-server-open-all-servers}).
14157
14158 @item M-c
14159 @kindex M-c (Server)
14160 @findex gnus-server-close-all-servers
14161 Close the connections to all servers in the buffer
14162 (@code{gnus-server-close-all-servers}).
14163
14164 @item R
14165 @kindex R (Server)
14166 @findex gnus-server-remove-denials
14167 Remove all marks to whether Gnus was denied connection from any servers
14168 (@code{gnus-server-remove-denials}).
14169
14170 @item L
14171 @kindex L (Server)
14172 @findex gnus-server-offline-server
14173 Set server status to offline (@code{gnus-server-offline-server}).
14174
14175 @end table
14176
14177
14178 @node Getting News
14179 @section Getting News
14180 @cindex reading news
14181 @cindex news back ends
14182
14183 A newsreader is normally used for reading news.  Gnus currently provides
14184 only two methods of getting news---it can read from an @acronym{NNTP} server,
14185 or it can read from a local spool.
14186
14187 @menu
14188 * NNTP::                        Reading news from an @acronym{NNTP} server.
14189 * News Spool::                  Reading news from the local spool.
14190 @end menu
14191
14192
14193 @node NNTP
14194 @subsection NNTP
14195 @cindex nntp
14196
14197 Subscribing to a foreign group from an @acronym{NNTP} server is rather easy.
14198 You just specify @code{nntp} as method and the address of the @acronym{NNTP}
14199 server as the, uhm, address.
14200
14201 If the @acronym{NNTP} server is located at a non-standard port, setting the
14202 third element of the select method to this port number should allow you
14203 to connect to the right port.  You'll have to edit the group info for
14204 that (@pxref{Foreign Groups}).
14205
14206 The name of the foreign group can be the same as a native group.  In
14207 fact, you can subscribe to the same group from as many different servers
14208 you feel like.  There will be no name collisions.
14209
14210 The following variables can be used to create a virtual @code{nntp}
14211 server:
14212
14213 @table @code
14214
14215 @item nntp-server-opened-hook
14216 @vindex nntp-server-opened-hook
14217 @cindex @sc{mode reader}
14218 @cindex authinfo
14219 @cindex authentication
14220 @cindex nntp authentication
14221 @findex nntp-send-authinfo
14222 @findex nntp-send-mode-reader
14223 is run after a connection has been made.  It can be used to send
14224 commands to the @acronym{NNTP} server after it has been contacted.  By
14225 default it sends the command @code{MODE READER} to the server with the
14226 @code{nntp-send-mode-reader} function.  This function should always be
14227 present in this hook.
14228
14229 @item nntp-authinfo-function
14230 @vindex nntp-authinfo-function
14231 @findex nntp-send-authinfo
14232 @vindex nntp-authinfo-file
14233 This function will be used to send @samp{AUTHINFO} to the @acronym{NNTP}
14234 server.  The default function is @code{nntp-send-authinfo}, which looks
14235 through your @file{~/.authinfo} (or whatever you've set the
14236 @code{nntp-authinfo-file} variable to) for applicable entries.  If none
14237 are found, it will prompt you for a login name and a password.  The
14238 format of the @file{~/.authinfo} file is (almost) the same as the
14239 @code{ftp} @file{~/.netrc} file, which is defined in the @code{ftp}
14240 manual page, but here are the salient facts:
14241
14242 @enumerate
14243 @item
14244 The file contains one or more line, each of which define one server.
14245
14246 @item
14247 Each line may contain an arbitrary number of token/value pairs.
14248
14249 The valid tokens include @samp{machine}, @samp{login}, @samp{password},
14250 @samp{default}.  In addition Gnus introduces two new tokens, not present
14251 in the original @file{.netrc}/@code{ftp} syntax, namely @samp{port} and
14252 @samp{force}.  (This is the only way the @file{.authinfo} file format
14253 deviates from the @file{.netrc} file format.)  @samp{port} is used to
14254 indicate what port on the server the credentials apply to and
14255 @samp{force} is explained below.
14256
14257 @end enumerate
14258
14259 Here's an example file:
14260
14261 @example
14262 machine news.uio.no login larsi password geheimnis
14263 machine nntp.ifi.uio.no login larsi force yes
14264 @end example
14265
14266 The token/value pairs may appear in any order; @samp{machine} doesn't
14267 have to be first, for instance.
14268
14269 In this example, both login name and password have been supplied for the
14270 former server, while the latter has only the login name listed, and the
14271 user will be prompted for the password.  The latter also has the
14272 @samp{force} tag, which means that the authinfo will be sent to the
14273 @var{nntp} server upon connection; the default (i.e., when there is not
14274 @samp{force} tag) is to not send authinfo to the @var{nntp} server
14275 until the @var{nntp} server asks for it.
14276
14277 You can also add @samp{default} lines that will apply to all servers
14278 that don't have matching @samp{machine} lines.
14279
14280 @example
14281 default force yes
14282 @end example
14283
14284 This will force sending @samp{AUTHINFO} commands to all servers not
14285 previously mentioned.
14286
14287 Remember to not leave the @file{~/.authinfo} file world-readable.
14288
14289 @item nntp-server-action-alist
14290 @vindex nntp-server-action-alist
14291 This is a list of regexps to match on server types and actions to be
14292 taken when matches are made.  For instance, if you want Gnus to beep
14293 every time you connect to innd, you could say something like:
14294
14295 @lisp
14296 (setq nntp-server-action-alist
14297       '(("innd" (ding))))
14298 @end lisp
14299
14300 You probably don't want to do that, though.
14301
14302 The default value is
14303
14304 @lisp
14305 '(("nntpd 1\\.5\\.11t"
14306    (remove-hook 'nntp-server-opened-hook
14307                 'nntp-send-mode-reader)))
14308 @end lisp
14309
14310 This ensures that Gnus doesn't send the @code{MODE READER} command to
14311 nntpd 1.5.11t, since that command chokes that server, I've been told.
14312
14313 @item nntp-maximum-request
14314 @vindex nntp-maximum-request
14315 If the @acronym{NNTP} server doesn't support @acronym{NOV} headers, this back end
14316 will collect headers by sending a series of @code{head} commands.  To
14317 speed things up, the back end sends lots of these commands without
14318 waiting for reply, and then reads all the replies.  This is controlled
14319 by the @code{nntp-maximum-request} variable, and is 400 by default.  If
14320 your network is buggy, you should set this to 1.
14321
14322 @item nntp-connection-timeout
14323 @vindex nntp-connection-timeout
14324 If you have lots of foreign @code{nntp} groups that you connect to
14325 regularly, you're sure to have problems with @acronym{NNTP} servers not
14326 responding properly, or being too loaded to reply within reasonable
14327 time.  This is can lead to awkward problems, which can be helped
14328 somewhat by setting @code{nntp-connection-timeout}.  This is an integer
14329 that says how many seconds the @code{nntp} back end should wait for a
14330 connection before giving up.  If it is @code{nil}, which is the default,
14331 no timeouts are done.
14332
14333 @item nntp-nov-is-evil
14334 @vindex nntp-nov-is-evil
14335 If the @acronym{NNTP} server does not support @acronym{NOV}, you could set this
14336 variable to @code{t}, but @code{nntp} usually checks automatically whether @acronym{NOV}
14337 can be used.
14338
14339 @item nntp-xover-commands
14340 @vindex nntp-xover-commands
14341 @cindex @acronym{NOV}
14342 @cindex XOVER
14343 List of strings used as commands to fetch @acronym{NOV} lines from a
14344 server.  The default value of this variable is @code{("XOVER"
14345 "XOVERVIEW")}.
14346
14347 @item nntp-nov-gap
14348 @vindex nntp-nov-gap
14349 @code{nntp} normally sends just one big request for @acronym{NOV} lines to
14350 the server.  The server responds with one huge list of lines.  However,
14351 if you have read articles 2-5000 in the group, and only want to read
14352 article 1 and 5001, that means that @code{nntp} will fetch 4999 @acronym{NOV}
14353 lines that you will not need.  This variable says how
14354 big a gap between two consecutive articles is allowed to be before the
14355 @code{XOVER} request is split into several request.  Note that if your
14356 network is fast, setting this variable to a really small number means
14357 that fetching will probably be slower.  If this variable is @code{nil},
14358 @code{nntp} will never split requests.  The default is 5.
14359
14360 @item nntp-xref-number-is-evil
14361 @vindex nntp-xref-number-is-evil
14362 When Gnus refers to an article having the @code{Message-ID} that a user
14363 specifies or having the @code{Message-ID} of the parent article of the
14364 current one (@pxref{Finding the Parent}), Gnus sends a @code{HEAD}
14365 command to the @acronym{NNTP} server to know where it is, and the server
14366 returns the data containing the pairs of a group and an article number
14367 in the @code{Xref} header.  Gnus normally uses the article number to
14368 refer to the article if the data shows that that article is in the
14369 current group, while it uses the @code{Message-ID} otherwise.  However,
14370 some news servers, e.g., ones running Diablo, run multiple engines
14371 having the same articles but article numbers are not kept synchronized
14372 between them.  In that case, the article number that appears in the
14373 @code{Xref} header varies by which engine is chosen, so you cannot refer
14374 to the parent article that is in the current group, for instance.  If
14375 you connect to such a server, set this variable to a non-@code{nil}
14376 value, and Gnus never uses article numbers.  For example:
14377
14378 @lisp
14379 (setq gnus-select-method
14380       '(nntp "newszilla"
14381              (nntp-address "newszilla.example.com")
14382              (nntp-xref-number-is-evil t)
14383              @dots{}))
14384 @end lisp
14385
14386 The default value of this server variable is @code{nil}.
14387
14388 @item nntp-prepare-server-hook
14389 @vindex nntp-prepare-server-hook
14390 A hook run before attempting to connect to an @acronym{NNTP} server.
14391
14392 @item nntp-record-commands
14393 @vindex nntp-record-commands
14394 If non-@code{nil}, @code{nntp} will log all commands it sends to the
14395 @acronym{NNTP} server (along with a timestamp) in the @samp{*nntp-log*}
14396 buffer.  This is useful if you are debugging a Gnus/@acronym{NNTP} connection
14397 that doesn't seem to work.
14398
14399 @item nntp-open-connection-function
14400 @vindex nntp-open-connection-function
14401 It is possible to customize how the connection to the nntp server will
14402 be opened.  If you specify an @code{nntp-open-connection-function}
14403 parameter, Gnus will use that function to establish the connection.
14404 Seven pre-made functions are supplied.  These functions can be grouped
14405 in two categories: direct connection functions (four pre-made), and
14406 indirect ones (three pre-made).
14407
14408 @item nntp-never-echoes-commands
14409 @vindex nntp-never-echoes-commands
14410 Non-@code{nil} means the nntp server never echoes commands.  It is
14411 reported that some nntps server doesn't echo commands.  So, you may want
14412 to set this to non-@code{nil} in the method for such a server setting
14413 @code{nntp-open-connection-function} to @code{nntp-open-ssl-stream} for
14414 example.  The default value is @code{nil}.  Note that the
14415 @code{nntp-open-connection-functions-never-echo-commands} variable
14416 overrides the @code{nil} value of this variable.
14417
14418 @item nntp-open-connection-functions-never-echo-commands
14419 @vindex nntp-open-connection-functions-never-echo-commands
14420 List of functions that never echo commands.  Add or set a function which
14421 you set to @code{nntp-open-connection-function} to this list if it does
14422 not echo commands.  Note that a non-@code{nil} value of the
14423 @code{nntp-never-echoes-commands} variable overrides this variable.  The
14424 default value is @code{(nntp-open-network-stream)}.
14425
14426 @item nntp-prepare-post-hook
14427 @vindex nntp-prepare-post-hook
14428 A hook run just before posting an article.  If there is no
14429 @code{Message-ID} header in the article and the news server provides the
14430 recommended ID, it will be added to the article before running this
14431 hook.  It is useful to make @code{Cancel-Lock} headers even if you
14432 inhibit Gnus to add a @code{Message-ID} header, you could say:
14433
14434 @lisp
14435 (add-hook 'nntp-prepare-post-hook 'canlock-insert-header)
14436 @end lisp
14437
14438 Note that not all servers support the recommended ID.  This works for
14439 INN versions 2.3.0 and later, for instance.
14440
14441 @end table
14442
14443 @menu
14444 * Direct Functions::            Connecting directly to the server.
14445 * Indirect Functions::          Connecting indirectly to the server.
14446 * Common Variables::            Understood by several connection functions.
14447 * NNTP marks::                  Storing marks for @acronym{NNTP} servers.
14448 @end menu
14449
14450
14451 @node Direct Functions
14452 @subsubsection Direct Functions
14453 @cindex direct connection functions
14454
14455 These functions are called direct because they open a direct connection
14456 between your machine and the @acronym{NNTP} server.  The behavior of these
14457 functions is also affected by commonly understood variables
14458 (@pxref{Common Variables}).
14459
14460 @table @code
14461 @findex nntp-open-network-stream
14462 @item nntp-open-network-stream
14463 This is the default, and simply connects to some port or other on the
14464 remote system.
14465
14466 @findex nntp-open-tls-stream
14467 @item nntp-open-tls-stream
14468 Opens a connection to a server over a @dfn{secure} channel.  To use
14469 this you must have @uref{http://www.gnu.org/software/gnutls/, GNUTLS}
14470 installed.  You then define a server as follows:
14471
14472 @lisp
14473 ;; @r{"nntps" is port 563 and is predefined in our @file{/etc/services}}
14474 ;; @r{however, @samp{gnutls-cli -p} doesn't like named ports.}
14475 ;;
14476 (nntp "snews.bar.com"
14477       (nntp-open-connection-function nntp-open-tls-stream)
14478       (nntp-port-number 563)
14479       (nntp-address "snews.bar.com"))
14480 @end lisp
14481
14482 @findex nntp-open-ssl-stream
14483 @item nntp-open-ssl-stream
14484 Opens a connection to a server over a @dfn{secure} channel.  To use
14485 this you must have @uref{http://www.openssl.org, OpenSSL} or
14486 @uref{ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL, SSLeay} installed.  You
14487 then define a server as follows:
14488
14489 @lisp
14490 ;; @r{"snews" is port 563 and is predefined in our @file{/etc/services}}
14491 ;; @r{however, @samp{openssl s_client -port} doesn't like named ports.}
14492 ;;
14493 (nntp "snews.bar.com"
14494       (nntp-open-connection-function nntp-open-ssl-stream)
14495       (nntp-port-number 563)
14496       (nntp-address "snews.bar.com"))
14497 @end lisp
14498
14499 @findex nntp-open-netcat-stream
14500 @item nntp-open-netcat-stream
14501 Opens a connection to an @acronym{NNTP} server using the @code{netcat}
14502 program.  You might wonder why this function exists, since we have
14503 the default @code{nntp-open-network-stream} which would do the job.  (One
14504 of) the reason(s) is that if you are behind a firewall but have direct
14505 connections to the outside world thanks to a command wrapper like
14506 @code{runsocks}, you can use it like this:
14507
14508 @lisp
14509 (nntp "socksified"
14510       (nntp-pre-command "runsocks")
14511       (nntp-open-connection-function nntp-open-netcat-stream)
14512       (nntp-address "the.news.server"))
14513 @end lisp
14514
14515 With the default method, you would need to wrap your whole Emacs
14516 session, which is not a good idea.
14517
14518 @findex nntp-open-telnet-stream
14519 @item nntp-open-telnet-stream
14520 Like @code{nntp-open-netcat-stream}, but uses @code{telnet} rather than
14521 @code{netcat}.  @code{telnet} is a bit less robust because of things
14522 like line-end-conversion, but sometimes netcat is simply
14523 not available.  The previous example would turn into:
14524
14525 @lisp
14526 (nntp "socksified"
14527       (nntp-pre-command "runsocks")
14528       (nntp-open-connection-function nntp-open-telnet-stream)
14529       (nntp-address "the.news.server")
14530       (nntp-end-of-line "\n"))
14531 @end lisp
14532 @end table
14533
14534
14535 @node Indirect Functions
14536 @subsubsection Indirect Functions
14537 @cindex indirect connection functions
14538
14539 These functions are called indirect because they connect to an
14540 intermediate host before actually connecting to the @acronym{NNTP} server.
14541 All of these functions and related variables are also said to belong to
14542 the ``via'' family of connection: they're all prefixed with ``via'' to make
14543 things cleaner.  The behavior of these functions is also affected by
14544 commonly understood variables (@pxref{Common Variables}).
14545
14546 @table @code
14547 @item nntp-open-via-rlogin-and-netcat
14548 @findex nntp-open-via-rlogin-and-netcat
14549 Does an @samp{rlogin} on a remote system, and then uses @code{netcat} to connect
14550 to the real @acronym{NNTP} server from there.  This is useful for instance if
14551 you need to connect to a firewall machine first.
14552
14553 @code{nntp-open-via-rlogin-and-netcat}-specific variables:
14554
14555 @table @code
14556 @item nntp-via-rlogin-command
14557 @vindex nntp-via-rlogin-command
14558 Command used to log in on the intermediate host.  The default is
14559 @samp{rsh}, but @samp{ssh} is a popular alternative.
14560
14561 @item nntp-via-rlogin-command-switches
14562 @vindex nntp-via-rlogin-command-switches
14563 List of strings to be used as the switches to
14564 @code{nntp-via-rlogin-command}.  The default is @code{nil}.  If you use
14565 @samp{ssh} for @code{nntp-via-rlogin-command}, you may set this to
14566 @samp{("-C")} in order to compress all data connections.
14567 @end table
14568
14569 @item nntp-open-via-rlogin-and-telnet
14570 @findex nntp-open-via-rlogin-and-telnet
14571 Does essentially the same, but uses @code{telnet} instead of @samp{netcat}
14572 to connect to the real @acronym{NNTP} server from the intermediate host.
14573 @code{telnet} is a bit less robust because of things like
14574 line-end-conversion, but sometimes @code{netcat} is simply not available.
14575
14576 @code{nntp-open-via-rlogin-and-telnet}-specific variables:
14577
14578 @table @code
14579 @item nntp-telnet-command
14580 @vindex nntp-telnet-command
14581 Command used to connect to the real @acronym{NNTP} server from the
14582 intermediate host.  The default is @samp{telnet}.
14583
14584 @item nntp-telnet-switches
14585 @vindex nntp-telnet-switches
14586 List of strings to be used as the switches to the
14587 @code{nntp-telnet-command} command.  The default is @code{("-8")}.
14588
14589 @item nntp-via-rlogin-command
14590 @vindex nntp-via-rlogin-command
14591 Command used to log in on the intermediate host.  The default is
14592 @samp{rsh}, but @samp{ssh} is a popular alternative.
14593
14594 @item nntp-via-rlogin-command-switches
14595 @vindex nntp-via-rlogin-command-switches
14596 List of strings to be used as the switches to
14597 @code{nntp-via-rlogin-command}.  If you use @samp{ssh},  you may need to set
14598 this to @samp{("-t" "-e" "none")} or @samp{("-C" "-t" "-e" "none")} if
14599 the telnet command requires a pseudo-tty allocation on an intermediate
14600 host.  The default is @code{nil}.
14601 @end table
14602
14603 Note that you may want to change the value for @code{nntp-end-of-line}
14604 to @samp{\n} (@pxref{Common Variables}).
14605
14606 @item nntp-open-via-telnet-and-telnet
14607 @findex nntp-open-via-telnet-and-telnet
14608 Does essentially the same, but uses @samp{telnet} instead of
14609 @samp{rlogin} to connect to the intermediate host.
14610
14611 @code{nntp-open-via-telnet-and-telnet}-specific variables:
14612
14613 @table @code
14614 @item nntp-via-telnet-command
14615 @vindex nntp-via-telnet-command
14616 Command used to @code{telnet} the intermediate host.  The default is
14617 @samp{telnet}.
14618
14619 @item nntp-via-telnet-switches
14620 @vindex nntp-via-telnet-switches
14621 List of strings to be used as the switches to the
14622 @code{nntp-via-telnet-command} command.  The default is @samp{("-8")}.
14623
14624 @item nntp-via-user-password
14625 @vindex nntp-via-user-password
14626 Password to use when logging in on the intermediate host.
14627
14628 @item nntp-via-envuser
14629 @vindex nntp-via-envuser
14630 If non-@code{nil}, the intermediate @code{telnet} session (client and
14631 server both) will support the @code{ENVIRON} option and not prompt for
14632 login name.  This works for Solaris @code{telnet}, for instance.
14633
14634 @item nntp-via-shell-prompt
14635 @vindex nntp-via-shell-prompt
14636 Regexp matching the shell prompt on the intermediate host.  The default
14637 is @samp{bash\\|\$ *\r?$\\|> *\r?}.
14638
14639 @end table
14640
14641 Note that you may want to change the value for @code{nntp-end-of-line}
14642 to @samp{\n} (@pxref{Common Variables}).
14643 @end table
14644
14645
14646 Here are some additional variables that are understood by all the above
14647 functions:
14648
14649 @table @code
14650
14651 @item nntp-via-user-name
14652 @vindex nntp-via-user-name
14653 User name to use when connecting to the intermediate host.
14654
14655 @item nntp-via-address
14656 @vindex nntp-via-address
14657 Address of the intermediate host to connect to.
14658
14659 @end table
14660
14661
14662 @node Common Variables
14663 @subsubsection Common Variables
14664
14665 The following variables affect the behavior of all, or several of the
14666 pre-made connection functions.  When not specified, all functions are
14667 affected (the values of the following variables will be used as the
14668 default if each virtual @code{nntp} server doesn't specify those server
14669 variables individually).
14670
14671 @table @code
14672
14673 @item nntp-pre-command
14674 @vindex nntp-pre-command
14675 A command wrapper to use when connecting through a non native
14676 connection function (all except @code{nntp-open-network-stream},
14677 @code{nntp-open-tls-stream}, and @code{nntp-open-ssl-stream}).  This is
14678 where you would put a @samp{SOCKS} wrapper for instance.
14679
14680 @item nntp-address
14681 @vindex nntp-address
14682 The address of the @acronym{NNTP} server.
14683
14684 @item nntp-port-number
14685 @vindex nntp-port-number
14686 Port number to connect to the @acronym{NNTP} server.  The default is
14687 @samp{nntp}.  If you use @acronym{NNTP} over
14688 @acronym{TLS}/@acronym{SSL}, you may want to use integer ports rather
14689 than named ports (i.e, use @samp{563} instead of @samp{snews} or
14690 @samp{nntps}), because external @acronym{TLS}/@acronym{SSL} tools may
14691 not work with named ports.
14692
14693 @item nntp-end-of-line
14694 @vindex nntp-end-of-line
14695 String to use as end-of-line marker when talking to the @acronym{NNTP}
14696 server.  This is @samp{\r\n} by default, but should be @samp{\n} when
14697 using a non native telnet connection function.
14698
14699 @item nntp-netcat-command
14700 @vindex nntp-netcat-command
14701 Command to use when connecting to the @acronym{NNTP} server through
14702 @samp{netcat}.  This is @emph{not} for an intermediate host.  This is
14703 just for the real @acronym{NNTP} server.  The default is
14704 @samp{nc}.
14705
14706 @item nntp-netcat-switches
14707 @vindex nntp-netcat-switches
14708 A list of switches to pass to @code{nntp-netcat-command}.  The default
14709 is @samp{()}.
14710
14711 @end table
14712
14713 @node NNTP marks
14714 @subsubsection NNTP marks
14715 @cindex storing NNTP marks
14716
14717 Gnus stores marks (@pxref{Marking Articles}) for @acronym{NNTP}
14718 servers in marks files.  A marks file records what marks you have set
14719 in a group and each file is specific to the corresponding server.
14720 Marks files are stored in @file{~/News/marks}
14721 (@code{nntp-marks-directory}) under a classic hierarchy resembling
14722 that of a news server, for example marks for the group
14723 @samp{gmane.discuss} on the news.gmane.org server will be stored in
14724 the file @file{~/News/marks/news.gmane.org/gmane/discuss/.marks}.
14725
14726 Marks files are useful because you can copy the @file{~/News/marks}
14727 directory (using rsync, scp or whatever) to another Gnus installation,
14728 and it will realize what articles you have read and marked.  The data
14729 in @file{~/News/marks} has priority over the same data in
14730 @file{~/.newsrc.eld}.
14731
14732 Note that marks files are very much server-specific: Gnus remembers
14733 the article numbers so if you don't use the same servers on both
14734 installations things are most likely to break (most @acronym{NNTP}
14735 servers do not use the same article numbers as any other server).
14736 However, if you use servers A, B, C on one installation and servers A,
14737 D, E on the other, you can sync the marks files for A and then you'll
14738 get synchronization for that server between the two installations.
14739
14740 Using @acronym{NNTP} marks can possibly incur a performance penalty so
14741 if Gnus feels sluggish, try setting the @code{nntp-marks-is-evil}
14742 variable to @code{t}.  Marks will then be stored in @file{~/.newsrc.eld}.
14743
14744 Related variables:
14745
14746 @table @code
14747
14748 @item nntp-marks-is-evil
14749 @vindex nntp-marks-is-evil
14750 If non-@code{nil}, this back end will ignore any marks files.  The
14751 default is @code{nil}.
14752
14753 @item nntp-marks-directory
14754 @vindex nntp-marks-directory
14755 The directory where marks for nntp groups will be stored.
14756
14757 @end table
14758
14759
14760 @node News Spool
14761 @subsection News Spool
14762 @cindex nnspool
14763 @cindex news spool
14764
14765 Subscribing to a foreign group from the local spool is extremely easy,
14766 and might be useful, for instance, to speed up reading groups that
14767 contain very big articles---@samp{alt.binaries.pictures.furniture}, for
14768 instance.
14769
14770 Anyway, you just specify @code{nnspool} as the method and @code{""} (or
14771 anything else) as the address.
14772
14773 If you have access to a local spool, you should probably use that as the
14774 native select method (@pxref{Finding the News}).  It is normally faster
14775 than using an @code{nntp} select method, but might not be.  It depends.
14776 You just have to try to find out what's best at your site.
14777
14778 @table @code
14779
14780 @item nnspool-inews-program
14781 @vindex nnspool-inews-program
14782 Program used to post an article.
14783
14784 @item nnspool-inews-switches
14785 @vindex nnspool-inews-switches
14786 Parameters given to the inews program when posting an article.
14787
14788 @item nnspool-spool-directory
14789 @vindex nnspool-spool-directory
14790 Where @code{nnspool} looks for the articles.  This is normally
14791 @file{/usr/spool/news/}.
14792
14793 @item nnspool-nov-directory
14794 @vindex nnspool-nov-directory
14795 Where @code{nnspool} will look for @acronym{NOV} files.  This is normally@*
14796 @file{/usr/spool/news/over.view/}.
14797
14798 @item nnspool-lib-dir
14799 @vindex nnspool-lib-dir
14800 Where the news lib dir is (@file{/usr/lib/news/} by default).
14801
14802 @item nnspool-active-file
14803 @vindex nnspool-active-file
14804 The name of the active file.
14805
14806 @item nnspool-newsgroups-file
14807 @vindex nnspool-newsgroups-file
14808 The name of the group descriptions file.
14809
14810 @item nnspool-history-file
14811 @vindex nnspool-history-file
14812 The name of the news history file.
14813
14814 @item nnspool-active-times-file
14815 @vindex nnspool-active-times-file
14816 The name of the active date file.
14817
14818 @item nnspool-nov-is-evil
14819 @vindex nnspool-nov-is-evil
14820 If non-@code{nil}, @code{nnspool} won't try to use any @acronym{NOV} files
14821 that it finds.
14822
14823 @item nnspool-sift-nov-with-sed
14824 @vindex nnspool-sift-nov-with-sed
14825 @cindex sed
14826 If non-@code{nil}, which is the default, use @code{sed} to get the
14827 relevant portion from the overview file.  If @code{nil},
14828 @code{nnspool} will load the entire file into a buffer and process it
14829 there.
14830
14831 @end table
14832
14833
14834 @node Getting Mail
14835 @section Getting Mail
14836 @cindex reading mail
14837 @cindex mail
14838
14839 Reading mail with a newsreader---isn't that just plain WeIrD? But of
14840 course.
14841
14842 @menu
14843 * Mail in a Newsreader::        Important introductory notes.
14844 * Getting Started Reading Mail::  A simple cookbook example.
14845 * Splitting Mail::              How to create mail groups.
14846 * Mail Sources::                How to tell Gnus where to get mail from.
14847 * Mail Back End Variables::     Variables for customizing mail handling.
14848 * Fancy Mail Splitting::        Gnus can do hairy splitting of incoming mail.
14849 * Group Mail Splitting::        Use group customize to drive mail splitting.
14850 * Incorporating Old Mail::      What about the old mail you have?
14851 * Expiring Mail::               Getting rid of unwanted mail.
14852 * Washing Mail::                Removing cruft from the mail you get.
14853 * Duplicates::                  Dealing with duplicated mail.
14854 * Not Reading Mail::            Using mail back ends for reading other files.
14855 * Choosing a Mail Back End::    Gnus can read a variety of mail formats.
14856 @end menu
14857
14858
14859 @node Mail in a Newsreader
14860 @subsection Mail in a Newsreader
14861
14862 If you are used to traditional mail readers, but have decided to switch
14863 to reading mail with Gnus, you may find yourself experiencing something
14864 of a culture shock.
14865
14866 Gnus does not behave like traditional mail readers.  If you want to make
14867 it behave that way, you can, but it's an uphill battle.
14868
14869 Gnus, by default, handles all its groups using the same approach.  This
14870 approach is very newsreaderly---you enter a group, see the new/unread
14871 messages, and when you read the messages, they get marked as read, and
14872 you don't see them any more.  (Unless you explicitly ask for them.)
14873
14874 In particular, you do not do anything explicitly to delete messages.
14875
14876 Does this mean that all the messages that have been marked as read are
14877 deleted?  How awful!
14878
14879 But, no, it means that old messages are @dfn{expired} according to some
14880 scheme or other.  For news messages, the expire process is controlled by
14881 the news administrator; for mail, the expire process is controlled by
14882 you.  The expire process for mail is covered in depth in @ref{Expiring
14883 Mail}.
14884
14885 What many Gnus users find, after using it a while for both news and
14886 mail, is that the transport mechanism has very little to do with how
14887 they want to treat a message.
14888
14889 Many people subscribe to several mailing lists.  These are transported
14890 via @acronym{SMTP}, and are therefore mail.  But we might go for weeks without
14891 answering, or even reading these messages very carefully.  We may not
14892 need to save them because if we should need to read one again, they are
14893 archived somewhere else.
14894
14895 Some people have local news groups which have only a handful of readers.
14896 These are transported via @acronym{NNTP}, and are therefore news.  But we may need
14897 to read and answer a large fraction of the messages very carefully in
14898 order to do our work.  And there may not be an archive, so we may need
14899 to save the interesting messages the same way we would personal mail.
14900
14901 The important distinction turns out to be not the transport mechanism,
14902 but other factors such as how interested we are in the subject matter,
14903 or how easy it is to retrieve the message if we need to read it again.
14904
14905 Gnus provides many options for sorting mail into ``groups'' which behave
14906 like newsgroups, and for treating each group (whether mail or news)
14907 differently.
14908
14909 Some users never get comfortable using the Gnus (ahem) paradigm and wish
14910 that Gnus should grow up and be a male, er, mail reader.  It is possible
14911 to whip Gnus into a more mailreaderly being, but, as said before, it's
14912 not easy.  People who prefer proper mail readers should try @sc{vm}
14913 instead, which is an excellent, and proper, mail reader.
14914
14915 I don't mean to scare anybody off, but I want to make it clear that you
14916 may be required to learn a new way of thinking about messages.  After
14917 you've been subjected to The Gnus Way, you will come to love it.  I can
14918 guarantee it.  (At least the guy who sold me the Emacs Subliminal
14919 Brain-Washing Functions that I've put into Gnus did guarantee it.  You
14920 Will Be Assimilated.  You Love Gnus.  You Love The Gnus Mail Way.
14921 You Do.)
14922
14923
14924 @node Getting Started Reading Mail
14925 @subsection Getting Started Reading Mail
14926
14927 It's quite easy to use Gnus to read your new mail.  You just plonk the
14928 mail back end of your choice into @code{gnus-secondary-select-methods},
14929 and things will happen automatically.
14930
14931 For instance, if you want to use @code{nnml} (which is a ``one file per
14932 mail'' back end), you could put the following in your @file{~/.gnus.el} file:
14933
14934 @lisp
14935 (setq gnus-secondary-select-methods '((nnml "")))
14936 @end lisp
14937
14938 Now, the next time you start Gnus, this back end will be queried for new
14939 articles, and it will move all the messages in your spool file to its
14940 directory, which is @file{~/Mail/} by default.  The new group that will
14941 be created (@samp{mail.misc}) will be subscribed, and you can read it
14942 like any other group.
14943
14944 You will probably want to split the mail into several groups, though:
14945
14946 @lisp
14947 (setq nnmail-split-methods
14948       '(("junk" "^From:.*Lars Ingebrigtsen")
14949         ("crazy" "^Subject:.*die\\|^Organization:.*flabby")
14950         ("other" "")))
14951 @end lisp
14952
14953 This will result in three new @code{nnml} mail groups being created:
14954 @samp{nnml:junk}, @samp{nnml:crazy}, and @samp{nnml:other}.  All the
14955 mail that doesn't fit into the first two groups will be placed in the
14956 last group.
14957
14958 This should be sufficient for reading mail with Gnus.  You might want to
14959 give the other sections in this part of the manual a perusal, though.
14960 Especially @pxref{Choosing a Mail Back End} and @pxref{Expiring Mail}.
14961
14962
14963 @node Splitting Mail
14964 @subsection Splitting Mail
14965 @cindex splitting mail
14966 @cindex mail splitting
14967 @cindex mail filtering (splitting)
14968
14969 @vindex nnmail-split-methods
14970 The @code{nnmail-split-methods} variable says how the incoming mail is
14971 to be split into groups.
14972
14973 @lisp
14974 (setq nnmail-split-methods
14975   '(("mail.junk" "^From:.*Lars Ingebrigtsen")
14976     ("mail.crazy" "^Subject:.*die\\|^Organization:.*flabby")
14977     ("mail.other" "")))
14978 @end lisp
14979
14980 This variable is a list of lists, where the first element of each of
14981 these lists is the name of the mail group (they do not have to be called
14982 something beginning with @samp{mail}, by the way), and the second
14983 element is a regular expression used on the header of each mail to
14984 determine if it belongs in this mail group.  The first string may
14985 contain @samp{\\1} forms, like the ones used by @code{replace-match} to
14986 insert sub-expressions from the matched text.  For instance:
14987
14988 @lisp
14989 ("list.\\1" "From:.* \\(.*\\)-list@@majordomo.com")
14990 @end lisp
14991
14992 @noindent
14993 In that case, @code{nnmail-split-lowercase-expanded} controls whether
14994 the inserted text should be made lowercase.  @xref{Fancy Mail Splitting}.
14995
14996 The second element can also be a function.  In that case, it will be
14997 called narrowed to the headers with the first element of the rule as the
14998 argument.  It should return a non-@code{nil} value if it thinks that the
14999 mail belongs in that group.
15000
15001 @cindex @samp{bogus} group
15002 The last of these groups should always be a general one, and the regular
15003 expression should @emph{always} be @samp{""} so that it matches any mails
15004 that haven't been matched by any of the other regexps.  (These rules are
15005 processed from the beginning of the alist toward the end.  The first rule
15006 to make a match will ``win'', unless you have crossposting enabled.  In
15007 that case, all matching rules will ``win''.)  If no rule matched, the mail
15008 will end up in the @samp{bogus} group.  When new groups are created by
15009 splitting mail, you may want to run @code{gnus-group-find-new-groups} to
15010 see the new groups.  This also applies to the @samp{bogus} group.
15011
15012 If you like to tinker with this yourself, you can set this variable to a
15013 function of your choice.  This function will be called without any
15014 arguments in a buffer narrowed to the headers of an incoming mail
15015 message.  The function should return a list of group names that it
15016 thinks should carry this mail message.
15017
15018 Note that the mail back ends are free to maul the poor, innocent,
15019 incoming headers all they want to.  They all add @code{Lines} headers;
15020 some add @code{X-Gnus-Group} headers; most rename the Unix mbox
15021 @code{From<SPACE>} line to something else.
15022
15023 @vindex nnmail-crosspost
15024 The mail back ends all support cross-posting.  If several regexps match,
15025 the mail will be ``cross-posted'' to all those groups.
15026 @code{nnmail-crosspost} says whether to use this mechanism or not.  Note
15027 that no articles are crossposted to the general (@samp{""}) group.
15028
15029 @vindex nnmail-crosspost-link-function
15030 @cindex crosspost
15031 @cindex links
15032 @code{nnmh} and @code{nnml} makes crossposts by creating hard links to
15033 the crossposted articles.  However, not all file systems support hard
15034 links.  If that's the case for you, set
15035 @code{nnmail-crosspost-link-function} to @code{copy-file}.  (This
15036 variable is @code{add-name-to-file} by default.)
15037
15038 @kindex M-x nnmail-split-history
15039 @findex nnmail-split-history
15040 If you wish to see where the previous mail split put the messages, you
15041 can use the @kbd{M-x nnmail-split-history} command.  If you wish to see
15042 where re-spooling messages would put the messages, you can use
15043 @code{gnus-summary-respool-trace} and related commands (@pxref{Mail
15044 Group Commands}).
15045
15046 @vindex nnmail-split-header-length-limit
15047 Header lines longer than the value of
15048 @code{nnmail-split-header-length-limit} are excluded from the split
15049 function.
15050
15051 @vindex nnmail-mail-splitting-decodes
15052 @vindex nnmail-mail-splitting-charset
15053 By default, splitting does not decode headers, so you can not match on
15054 non-@acronym{ASCII} strings.  But it is useful if you want to match
15055 articles based on the raw header data.  To enable it, set the
15056 @code{nnmail-mail-splitting-decodes} variable to a non-@code{nil} value.
15057 In addition, the value of the @code{nnmail-mail-splitting-charset}
15058 variable is used for decoding non-@acronym{MIME} encoded string when
15059 @code{nnmail-mail-splitting-decodes} is non-@code{nil}.  The default
15060 value is @code{nil} which means not to decode non-@acronym{MIME} encoded
15061 string.  A suitable value for you will be @code{undecided} or be the
15062 charset used normally in mails you are interested in.
15063
15064 @vindex nnmail-resplit-incoming
15065 By default, splitting is performed on all incoming messages.  If you
15066 specify a @code{directory} entry for the variable @code{mail-sources}
15067 (@pxref{Mail Source Specifiers}), however, then splitting does
15068 @emph{not} happen by default.  You can set the variable
15069 @code{nnmail-resplit-incoming} to a non-@code{nil} value to make
15070 splitting happen even in this case.  (This variable has no effect on
15071 other kinds of entries.)
15072
15073 Gnus gives you all the opportunity you could possibly want for shooting
15074 yourself in the foot.  Let's say you create a group that will contain
15075 all the mail you get from your boss.  And then you accidentally
15076 unsubscribe from the group.  Gnus will still put all the mail from your
15077 boss in the unsubscribed group, and so, when your boss mails you ``Have
15078 that report ready by Monday or you're fired!'', you'll never see it and,
15079 come Tuesday, you'll still believe that you're gainfully employed while
15080 you really should be out collecting empty bottles to save up for next
15081 month's rent money.
15082
15083
15084 @node Mail Sources
15085 @subsection Mail Sources
15086
15087 Mail can be gotten from many different sources---the mail spool, from
15088 a @acronym{POP} mail server, from a procmail directory, or from a
15089 maildir, for instance.
15090
15091 @menu
15092 * Mail Source Specifiers::      How to specify what a mail source is.
15093 * Mail Source Customization::   Some variables that influence things.
15094 * Fetching Mail::               Using the mail source specifiers.
15095 @end menu
15096
15097
15098 @node Mail Source Specifiers
15099 @subsubsection Mail Source Specifiers
15100 @cindex POP
15101 @cindex mail server
15102 @cindex procmail
15103 @cindex mail spool
15104 @cindex mail source
15105
15106 You tell Gnus how to fetch mail by setting @code{mail-sources}
15107 (@pxref{Fetching Mail}) to a @dfn{mail source specifier}.
15108
15109 Here's an example:
15110
15111 @lisp
15112 (pop :server "pop3.mailserver.com" :user "myname")
15113 @end lisp
15114
15115 As can be observed, a mail source specifier is a list where the first
15116 element is a @dfn{mail source type}, followed by an arbitrary number of
15117 @dfn{keywords}.  Keywords that are not explicitly specified are given
15118 default values.
15119
15120 The @code{mail-sources} is global for all mail groups.  You can specify
15121 an additional mail source for a particular group by including the
15122 @code{group} mail specifier in @code{mail-sources}, and setting a
15123 @code{mail-source} group parameter (@pxref{Group Parameters}) specifying
15124 a single mail source.  When this is used, @code{mail-sources} is
15125 typically just @code{(group)}; the @code{mail-source} parameter for a
15126 group might look like this:
15127
15128 @lisp
15129 (mail-source . (file :path "home/user/spools/foo.spool"))
15130 @end lisp
15131
15132 This means that the group's (and only this group's) messages will be
15133 fetched from the spool file @samp{/user/spools/foo.spool}.
15134
15135 The following mail source types are available:
15136
15137 @table @code
15138 @item file
15139 Get mail from a single file; typically from the mail spool.
15140
15141 Keywords:
15142
15143 @table @code
15144 @item :path
15145 The file name.  Defaults to the value of the @env{MAIL}
15146 environment variable or the value of @code{rmail-spool-directory}
15147 (usually something like @file{/usr/mail/spool/user-name}).
15148
15149 @item :prescript
15150 @itemx :postscript
15151 Script run before/after fetching mail.
15152 @end table
15153
15154 An example file mail source:
15155
15156 @lisp
15157 (file :path "/usr/spool/mail/user-name")
15158 @end lisp
15159
15160 Or using the default file name:
15161
15162 @lisp
15163 (file)
15164 @end lisp
15165
15166 If the mail spool file is not located on the local machine, it's best
15167 to use @acronym{POP} or @acronym{IMAP} or the like to fetch the mail.
15168 You can not use ange-ftp file names here---it has no way to lock the
15169 mail spool while moving the mail.
15170
15171 If it's impossible to set up a proper server, you can use ssh instead.
15172
15173 @lisp
15174 (setq mail-sources
15175       '((file :prescript "ssh host bin/getmail >%t")))
15176 @end lisp
15177
15178 The @samp{getmail} script would look something like the following:
15179
15180 @example
15181 #!/bin/sh
15182 #  getmail - move mail from spool to stdout
15183 #  flu@@iki.fi
15184
15185 MOVEMAIL=/usr/lib/emacs/20.3/i386-redhat-linux/movemail
15186 TMP=$HOME/Mail/tmp
15187 rm -f $TMP; $MOVEMAIL $MAIL $TMP >/dev/null && cat $TMP
15188 @end example
15189
15190 Alter this script to fit the @samp{movemail} and temporary
15191 file you want to use.
15192
15193
15194 @item directory
15195 @vindex nnmail-scan-directory-mail-source-once
15196 Get mail from several files in a directory.  This is typically used
15197 when you have procmail split the incoming mail into several files.
15198 That is, there is a one-to-one correspondence between files in that
15199 directory and groups, so that mail from the file @file{foo.bar.spool}
15200 will be put in the group @code{foo.bar}.  (You can change the suffix
15201 to be used instead of @code{.spool}.)  Setting
15202 @code{nnmail-scan-directory-mail-source-once} to non-@code{nil} forces
15203 Gnus to scan the mail source only once.  This is particularly useful
15204 if you want to scan mail groups at a specified level.
15205
15206 @vindex nnmail-resplit-incoming
15207 There is also the variable @code{nnmail-resplit-incoming}, if you set
15208 that to a non-@code{nil} value, then the normal splitting process is
15209 applied to all the files from the directory, @ref{Splitting Mail}.
15210
15211 Keywords:
15212
15213 @table @code
15214 @item :path
15215 The name of the directory where the files are.  There is no default
15216 value.
15217
15218 @item :suffix
15219 Only files ending with this suffix are used.  The default is
15220 @samp{.spool}.
15221
15222 @item :predicate
15223 Only files that have this predicate return non-@code{nil} are returned.
15224 The default is @code{identity}.  This is used as an additional
15225 filter---only files that have the right suffix @emph{and} satisfy this
15226 predicate are considered.
15227
15228 @item :prescript
15229 @itemx :postscript
15230 Script run before/after fetching mail.
15231
15232 @end table
15233
15234 An example directory mail source:
15235
15236 @lisp
15237 (directory :path "/home/user-name/procmail-dir/"
15238            :suffix ".prcml")
15239 @end lisp
15240
15241 @item pop
15242 Get mail from a @acronym{POP} server.
15243
15244 Keywords:
15245
15246 @table @code
15247 @item :server
15248 The name of the @acronym{POP} server.  The default is taken from the
15249 @env{MAILHOST} environment variable.
15250
15251 @item :port
15252 The port number of the @acronym{POP} server.  This can be a number (eg,
15253 @samp{:port 1234}) or a string (eg, @samp{:port "pop3"}).  If it is a
15254 string, it should be a service name as listed in @file{/etc/services} on
15255 Unix systems.  The default is @samp{"pop3"}.  On some systems you might
15256 need to specify it as @samp{"pop-3"} instead.
15257
15258 @item :user
15259 The user name to give to the @acronym{POP} server.  The default is the login
15260 name.
15261
15262 @item :password
15263 The password to give to the @acronym{POP} server.  If not specified,
15264 the user is prompted.
15265
15266 @item :program
15267 The program to use to fetch mail from the @acronym{POP} server.  This
15268 should be a @code{format}-like string.  Here's an example:
15269
15270 @example
15271 fetchmail %u@@%s -P %p %t
15272 @end example
15273
15274 The valid format specifier characters are:
15275
15276 @table @samp
15277 @item t
15278 The name of the file the mail is to be moved to.  This must always be
15279 included in this string.
15280
15281 @item s
15282 The name of the server.
15283
15284 @item P
15285 The port number of the server.
15286
15287 @item u
15288 The user name to use.
15289
15290 @item p
15291 The password to use.
15292 @end table
15293
15294 The values used for these specs are taken from the values you give the
15295 corresponding keywords.
15296
15297 @item :prescript
15298 A script to be run before fetching the mail.  The syntax is the same as
15299 the @code{:program} keyword.  This can also be a function to be run.
15300
15301 @item :postscript
15302 A script to be run after fetching the mail.  The syntax is the same as
15303 the @code{:program} keyword.  This can also be a function to be run.
15304
15305 @item :function
15306 The function to use to fetch mail from the @acronym{POP} server.  The
15307 function is called with one parameter---the name of the file where the
15308 mail should be moved to.
15309
15310 @item :authentication
15311 This can be either the symbol @code{password} or the symbol @code{apop}
15312 and says what authentication scheme to use.  The default is
15313 @code{password}.
15314
15315 @end table
15316
15317 @vindex pop3-movemail
15318 @vindex pop3-leave-mail-on-server
15319 If the @code{:program} and @code{:function} keywords aren't specified,
15320 @code{pop3-movemail} will be used.  If @code{pop3-leave-mail-on-server}
15321 is non-@code{nil} the mail is to be left on the @acronym{POP} server
15322 after fetching when using @code{pop3-movemail}.  Note that POP servers
15323 maintain no state information between sessions, so what the client
15324 believes is there and what is actually there may not match up.  If they
15325 do not, then you may get duplicate mails or the whole thing can fall
15326 apart and leave you with a corrupt mailbox.
15327
15328 Here are some examples for getting mail from a @acronym{POP} server.
15329 Fetch from the default @acronym{POP} server, using the default user
15330 name, and default fetcher:
15331
15332 @lisp
15333 (pop)
15334 @end lisp
15335
15336 Fetch from a named server with a named user and password:
15337
15338 @lisp
15339 (pop :server "my.pop.server"
15340      :user "user-name" :password "secret")
15341 @end lisp
15342
15343 Use @samp{movemail} to move the mail:
15344
15345 @lisp
15346 (pop :program "movemail po:%u %t %p")
15347 @end lisp
15348
15349 @item maildir
15350 Get mail from a maildir.  This is a type of mailbox that is supported by
15351 at least qmail and postfix, where each file in a special directory
15352 contains exactly one mail.
15353
15354 Keywords:
15355
15356 @table @code
15357 @item :path
15358 The name of the directory where the mails are stored.  The default is
15359 taken from the @env{MAILDIR} environment variable or
15360 @file{~/Maildir/}.
15361 @item :subdirs
15362 The subdirectories of the Maildir.  The default is
15363 @samp{("new" "cur")}.
15364
15365 @c If you sometimes look at your mail through a pop3 daemon before fetching
15366 @c them with Gnus, you may also have to fetch your mails from the
15367 @c @code{cur} directory inside the maildir, like in the first example
15368 @c below.
15369
15370 You can also get mails from remote hosts (because maildirs don't suffer
15371 from locking problems).
15372
15373 @end table
15374
15375 Two example maildir mail sources:
15376
15377 @lisp
15378 (maildir :path "/home/user-name/Maildir/"
15379          :subdirs ("cur" "new"))
15380 @end lisp
15381
15382 @lisp
15383 (maildir :path "/user@@remotehost.org:~/Maildir/"
15384          :subdirs ("new"))
15385 @end lisp
15386
15387 @item imap
15388 Get mail from a @acronym{IMAP} server.  If you don't want to use
15389 @acronym{IMAP} as intended, as a network mail reading protocol (ie
15390 with nnimap), for some reason or other, Gnus let you treat it similar
15391 to a @acronym{POP} server and fetches articles from a given
15392 @acronym{IMAP} mailbox.  @xref{IMAP}, for more information.
15393
15394 Note that for the Kerberos, GSSAPI, @acronym{TLS}/@acronym{SSL} and STARTTLS support you
15395 may need external programs and libraries, @xref{IMAP}.
15396
15397 Keywords:
15398
15399 @table @code
15400 @item :server
15401 The name of the @acronym{IMAP} server.  The default is taken from the
15402 @env{MAILHOST} environment variable.
15403
15404 @item :port
15405 The port number of the @acronym{IMAP} server.  The default is @samp{143}, or
15406 @samp{993} for @acronym{TLS}/@acronym{SSL} connections.
15407
15408 @item :user
15409 The user name to give to the @acronym{IMAP} server.  The default is the login
15410 name.
15411
15412 @item :password
15413 The password to give to the @acronym{IMAP} server.  If not specified, the user is
15414 prompted.
15415
15416 @item :stream
15417 What stream to use for connecting to the server, this is one of the
15418 symbols in @code{imap-stream-alist}.  Right now, this means
15419 @samp{gssapi}, @samp{kerberos4}, @samp{starttls}, @samp{tls},
15420 @samp{ssl}, @samp{shell} or the default @samp{network}.
15421
15422 @item :authentication
15423 Which authenticator to use for authenticating to the server, this is
15424 one of the symbols in @code{imap-authenticator-alist}.  Right now,
15425 this means @samp{gssapi}, @samp{kerberos4}, @samp{digest-md5},
15426 @samp{cram-md5}, @samp{anonymous} or the default @samp{login}.
15427
15428 @item :program
15429 When using the `shell' :stream, the contents of this variable is
15430 mapped into the @code{imap-shell-program} variable.  This should be a
15431 @code{format}-like string (or list of strings).  Here's an example:
15432
15433 @example
15434 ssh %s imapd
15435 @end example
15436
15437 Make sure nothing is interfering with the output of the program, e.g.,
15438 don't forget to redirect the error output to the void.  The valid format
15439 specifier characters are:
15440
15441 @table @samp
15442 @item s
15443 The name of the server.
15444
15445 @item l
15446 User name from @code{imap-default-user}.
15447
15448 @item p
15449 The port number of the server.
15450 @end table
15451
15452 The values used for these specs are taken from the values you give the
15453 corresponding keywords.
15454
15455 @item :mailbox
15456 The name of the mailbox to get mail from.  The default is @samp{INBOX}
15457 which normally is the mailbox which receives incoming mail.
15458
15459 @item :predicate
15460 The predicate used to find articles to fetch.  The default, @samp{UNSEEN
15461 UNDELETED}, is probably the best choice for most people, but if you
15462 sometimes peek in your mailbox with a @acronym{IMAP} client and mark some
15463 articles as read (or; SEEN) you might want to set this to @samp{1:*}.
15464 Then all articles in the mailbox is fetched, no matter what.  For a
15465 complete list of predicates, see RFC 2060 section 6.4.4.
15466
15467 @item :fetchflag
15468 How to flag fetched articles on the server, the default @samp{\Deleted}
15469 will mark them as deleted, an alternative would be @samp{\Seen} which
15470 would simply mark them as read.  These are the two most likely choices,
15471 but more flags are defined in RFC 2060 section 2.3.2.
15472
15473 @item :dontexpunge
15474 If non-@code{nil}, don't remove all articles marked as deleted in the
15475 mailbox after finishing the fetch.
15476
15477 @end table
15478
15479 An example @acronym{IMAP} mail source:
15480
15481 @lisp
15482 (imap :server "mail.mycorp.com"
15483       :stream kerberos4
15484       :fetchflag "\\Seen")
15485 @end lisp
15486
15487 @item webmail
15488 Get mail from a webmail server, such as @uref{http://www.hotmail.com/},
15489 @uref{http://webmail.netscape.com/}, @uref{http://www.netaddress.com/},
15490 @uref{http://mail.yahoo.com/}.
15491
15492 NOTE: Webmail largely depends on cookies.  A "one-line-cookie" patch is
15493 required for url "4.0pre.46".
15494
15495 WARNING: Mails may be lost.  NO WARRANTY.
15496
15497 Keywords:
15498
15499 @table @code
15500 @item :subtype
15501 The type of the webmail server.  The default is @code{hotmail}.  The
15502 alternatives are @code{netscape}, @code{netaddress}, @code{my-deja}.
15503
15504 @item :user
15505 The user name to give to the webmail server.  The default is the login
15506 name.
15507
15508 @item :password
15509 The password to give to the webmail server.  If not specified, the user is
15510 prompted.
15511
15512 @item :dontexpunge
15513 If non-@code{nil}, only fetch unread articles and don't move them to
15514 trash folder after finishing the fetch.
15515
15516 @end table
15517
15518 An example webmail source:
15519
15520 @lisp
15521 (webmail :subtype 'hotmail
15522          :user "user-name"
15523          :password "secret")
15524 @end lisp
15525
15526 @item group
15527 Get the actual mail source from the @code{mail-source} group parameter,
15528 @xref{Group Parameters}.
15529
15530 @end table
15531
15532 @table @dfn
15533 @item Common Keywords
15534 Common keywords can be used in any type of mail source.
15535
15536 Keywords:
15537
15538 @table @code
15539 @item :plugged
15540 If non-@code{nil}, fetch the mail even when Gnus is unplugged.  If you
15541 use directory source to get mail, you can specify it as in this
15542 example:
15543
15544 @lisp
15545 (setq mail-sources
15546       '((directory :path "/home/pavel/.Spool/"
15547                    :suffix ""
15548                    :plugged t)))
15549 @end lisp
15550
15551 Gnus will then fetch your mail even when you are unplugged.  This is
15552 useful when you use local mail and news.
15553
15554 @end table
15555 @end table
15556
15557 @subsubsection Function Interface
15558
15559 Some of the above keywords specify a Lisp function to be executed.
15560 For each keyword @code{:foo}, the Lisp variable @code{foo} is bound to
15561 the value of the keyword while the function is executing.  For example,
15562 consider the following mail-source setting:
15563
15564 @lisp
15565 (setq mail-sources '((pop :user "jrl"
15566                           :server "pophost" :function fetchfunc)))
15567 @end lisp
15568
15569 While the function @code{fetchfunc} is executing, the symbol @code{user}
15570 is bound to @code{"jrl"}, and the symbol @code{server} is bound to
15571 @code{"pophost"}.  The symbols @code{port}, @code{password},
15572 @code{program}, @code{prescript}, @code{postscript}, @code{function},
15573 and @code{authentication} are also bound (to their default values).
15574
15575 See above for a list of keywords for each type of mail source.
15576
15577
15578 @node Mail Source Customization
15579 @subsubsection Mail Source Customization
15580
15581 The following is a list of variables that influence how the mail is
15582 fetched.  You would normally not need to set or change any of these
15583 variables.
15584
15585 @table @code
15586 @item mail-source-crash-box
15587 @vindex mail-source-crash-box
15588 File where mail will be stored while processing it.  The default is@*
15589 @file{~/.emacs-mail-crash-box}.
15590
15591 @cindex Incoming*
15592 @item mail-source-delete-incoming
15593 @vindex mail-source-delete-incoming
15594 If non-@code{nil}, delete incoming files after handling them.  If
15595 @code{t}, delete the files immediately, if @code{nil}, never delete any
15596 files.  If a positive number, delete files older than number of days
15597 (the deletion will only happen when receiving new mail).  You may also
15598 set @code{mail-source-delete-incoming} to @code{nil} and call
15599 @code{mail-source-delete-old-incoming} from a hook or interactively.
15600 @code{mail-source-delete-incoming} defaults to @code{10} in alpha Gnusae
15601 and @code{2} in released Gnusae.  @xref{Gnus Development}.
15602
15603 @item mail-source-delete-old-incoming-confirm
15604 @vindex mail-source-delete-old-incoming-confirm
15605 If non-@code{nil}, ask for confirmation before deleting old incoming
15606 files.  This variable only applies when
15607 @code{mail-source-delete-incoming} is a positive number.
15608
15609 @item mail-source-ignore-errors
15610 @vindex mail-source-ignore-errors
15611 If non-@code{nil}, ignore errors when reading mail from a mail source.
15612
15613 @item mail-source-directory
15614 @vindex mail-source-directory
15615 Directory where incoming mail source files (if any) will be stored.  The
15616 default is @file{~/Mail/}.  At present, the only thing this is used for
15617 is to say where the incoming files will be stored if the variable
15618 @code{mail-source-delete-incoming} is @code{nil} or a number.
15619
15620 @item mail-source-incoming-file-prefix
15621 @vindex mail-source-incoming-file-prefix
15622 Prefix for file name for storing incoming mail.  The default is
15623 @file{Incoming}, in which case files will end up with names like
15624 @file{Incoming30630D_} or @file{Incoming298602ZD}.  This is really only
15625 relevant if @code{mail-source-delete-incoming} is @code{nil} or a
15626 number.
15627
15628 @item mail-source-default-file-modes
15629 @vindex mail-source-default-file-modes
15630 All new mail files will get this file mode.  The default is 384.
15631
15632 @item mail-source-movemail-program
15633 @vindex mail-source-movemail-program
15634 If non-@code{nil}, name of program for fetching new mail.  If
15635 @code{nil}, @code{movemail} in @var{exec-directory}.
15636
15637 @end table
15638
15639
15640 @node Fetching Mail
15641 @subsubsection Fetching Mail
15642
15643 @vindex mail-sources
15644 The way to actually tell Gnus where to get new mail from is to set
15645 @code{mail-sources} to a list of mail source specifiers
15646 (@pxref{Mail Source Specifiers}).
15647
15648 If this variable is @code{nil}, the mail back ends will never attempt to
15649 fetch mail by themselves.
15650
15651 If you want to fetch mail both from your local spool as well as a
15652 @acronym{POP} mail server, you'd say something like:
15653
15654 @lisp
15655 (setq mail-sources
15656       '((file)
15657         (pop :server "pop3.mail.server"
15658              :password "secret")))
15659 @end lisp
15660
15661 Or, if you don't want to use any of the keyword defaults:
15662
15663 @lisp
15664 (setq mail-sources
15665       '((file :path "/var/spool/mail/user-name")
15666         (pop :server "pop3.mail.server"
15667              :user "user-name"
15668              :port "pop3"
15669              :password "secret")))
15670 @end lisp
15671
15672
15673 When you use a mail back end, Gnus will slurp all your mail from your
15674 inbox and plonk it down in your home directory.  Gnus doesn't move any
15675 mail if you're not using a mail back end---you have to do a lot of magic
15676 invocations first.  At the time when you have finished drawing the
15677 pentagram, lightened the candles, and sacrificed the goat, you really
15678 shouldn't be too surprised when Gnus moves your mail.
15679
15680
15681
15682 @node Mail Back End Variables
15683 @subsection Mail Back End Variables
15684
15685 These variables are (for the most part) pertinent to all the various
15686 mail back ends.
15687
15688 @table @code
15689 @vindex nnmail-read-incoming-hook
15690 @item nnmail-read-incoming-hook
15691 The mail back ends all call this hook after reading new mail.  You can
15692 use this hook to notify any mail watch programs, if you want to.
15693
15694 @vindex nnmail-split-hook
15695 @item nnmail-split-hook
15696 @findex gnus-article-decode-encoded-words
15697 @cindex RFC 1522 decoding
15698 @cindex RFC 2047 decoding
15699 Hook run in the buffer where the mail headers of each message is kept
15700 just before the splitting based on these headers is done.  The hook is
15701 free to modify the buffer contents in any way it sees fit---the buffer
15702 is discarded after the splitting has been done, and no changes performed
15703 in the buffer will show up in any files.
15704 @code{gnus-article-decode-encoded-words} is one likely function to add
15705 to this hook.
15706
15707 @vindex nnmail-pre-get-new-mail-hook
15708 @vindex nnmail-post-get-new-mail-hook
15709 @item nnmail-pre-get-new-mail-hook
15710 @itemx nnmail-post-get-new-mail-hook
15711 These are two useful hooks executed when treating new incoming
15712 mail---@code{nnmail-pre-get-new-mail-hook} (is called just before
15713 starting to handle the new mail) and
15714 @code{nnmail-post-get-new-mail-hook} (is called when the mail handling
15715 is done).  Here's and example of using these two hooks to change the
15716 default file modes the new mail files get:
15717
15718 @lisp
15719 (add-hook 'nnmail-pre-get-new-mail-hook
15720           (lambda () (set-default-file-modes 511)))
15721
15722 (add-hook 'nnmail-post-get-new-mail-hook
15723           (lambda () (set-default-file-modes 551)))
15724 @end lisp
15725
15726 @item nnmail-use-long-file-names
15727 @vindex nnmail-use-long-file-names
15728 If non-@code{nil}, the mail back ends will use long file and directory
15729 names.  Groups like @samp{mail.misc} will end up in directories
15730 (assuming use of @code{nnml} back end) or files (assuming use of
15731 @code{nnfolder} back end) like @file{mail.misc}.  If it is @code{nil},
15732 the same group will end up in @file{mail/misc}.
15733
15734 @item nnmail-delete-file-function
15735 @vindex nnmail-delete-file-function
15736 @findex delete-file
15737 Function called to delete files.  It is @code{delete-file} by default.
15738
15739 @item nnmail-cache-accepted-message-ids
15740 @vindex nnmail-cache-accepted-message-ids
15741 If non-@code{nil}, put the @code{Message-ID}s of articles imported into
15742 the back end (via @code{Gcc}, for instance) into the mail duplication
15743 discovery cache.  The default is @code{nil}.
15744
15745 @item nnmail-cache-ignore-groups
15746 @vindex nnmail-cache-ignore-groups
15747 This can be a regular expression or a list of regular expressions.
15748 Group names that match any of the regular expressions will never be
15749 recorded in the @code{Message-ID} cache.
15750
15751 This can be useful, for example, when using Fancy Splitting
15752 (@pxref{Fancy Mail Splitting}) together with the function
15753 @code{nnmail-split-fancy-with-parent}.
15754
15755 @end table
15756
15757
15758 @node Fancy Mail Splitting
15759 @subsection Fancy Mail Splitting
15760 @cindex mail splitting
15761 @cindex fancy mail splitting
15762
15763 @vindex nnmail-split-fancy
15764 @findex nnmail-split-fancy
15765 If the rather simple, standard method for specifying how to split mail
15766 doesn't allow you to do what you want, you can set
15767 @code{nnmail-split-methods} to @code{nnmail-split-fancy}.  Then you can
15768 play with the @code{nnmail-split-fancy} variable.
15769
15770 Let's look at an example value of this variable first:
15771
15772 @lisp
15773 ;; @r{Messages from the mailer daemon are not crossposted to any of}
15774 ;; @r{the ordinary groups.  Warnings are put in a separate group}
15775 ;; @r{from real errors.}
15776 (| ("from" mail (| ("subject" "warn.*" "mail.warning")
15777                    "mail.misc"))
15778    ;; @r{Non-error messages are crossposted to all relevant}
15779    ;; @r{groups, but we don't crosspost between the group for the}
15780    ;; @r{(ding) list and the group for other (ding) related mail.}
15781    (& (| (any "ding@@ifi\\.uio\\.no" "ding.list")
15782          ("subject" "ding" "ding.misc"))
15783       ;; @r{Other mailing lists@dots{}}
15784       (any "procmail@@informatik\\.rwth-aachen\\.de" "procmail.list")
15785       (any "SmartList@@informatik\\.rwth-aachen\\.de" "SmartList.list")
15786       ;; @r{Both lists below have the same suffix, so prevent}
15787       ;; @r{cross-posting to mkpkg.list of messages posted only to}
15788       ;; @r{the bugs- list, but allow cross-posting when the}
15789       ;; @r{message was really cross-posted.}
15790       (any "bugs-mypackage@@somewhere" "mypkg.bugs")
15791       (any "mypackage@@somewhere" - "bugs-mypackage" "mypkg.list")
15792       ;; @r{People@dots{}}
15793       (any "larsi@@ifi\\.uio\\.no" "people.Lars_Magne_Ingebrigtsen"))
15794    ;; @r{Unmatched mail goes to the catch all group.}
15795    "misc.misc")
15796 @end lisp
15797
15798 This variable has the format of a @dfn{split}.  A split is a
15799 (possibly) recursive structure where each split may contain other
15800 splits.  Here are the possible split syntaxes:
15801
15802 @table @code
15803
15804 @item group
15805 If the split is a string, that will be taken as a group name.  Normal
15806 regexp match expansion will be done.  See below for examples.
15807
15808 @c Don't fold this line.
15809 @item (@var{field} @var{value} [- @var{restrict} [@dots{}] ] @var{split} [@var{invert-partial}])
15810 The split can be a list containing at least three elements.  If the
15811 first element @var{field} (a regexp matching a header) contains
15812 @var{value} (also a regexp) then store the message as specified by
15813 @var{split}.
15814
15815 If @var{restrict} (yet another regexp) matches some string after
15816 @var{field} and before the end of the matched @var{value}, the
15817 @var{split} is ignored.  If none of the @var{restrict} clauses match,
15818 @var{split} is processed.
15819
15820 The last element @var{invert-partial} is optional.  If it is
15821 non-@code{nil}, the match-partial-words behavior controlled by the
15822 variable @code{nnmail-split-fancy-match-partial-words} (see below) is
15823 be inverted.  (New in Gnus 5.10.7)
15824
15825 @item (| @var{split} @dots{})
15826 If the split is a list, and the first element is @code{|} (vertical
15827 bar), then process each @var{split} until one of them matches.  A
15828 @var{split} is said to match if it will cause the mail message to be
15829 stored in one or more groups.
15830
15831 @item (& @var{split} @dots{})
15832 If the split is a list, and the first element is @code{&}, then
15833 process all @var{split}s in the list.
15834
15835 @item junk
15836 If the split is the symbol @code{junk}, then don't save (i.e., delete)
15837 this message.  Use with extreme caution.
15838
15839 @item (: @var{function} @var{arg1} @var{arg2} @dots{})
15840 If the split is a list, and the first element is @samp{:}, then the
15841 second element will be called as a function with @var{args} given as
15842 arguments.  The function should return a @var{split}.
15843
15844 @cindex body split
15845 For instance, the following function could be used to split based on the
15846 body of the messages:
15847
15848 @lisp
15849 (defun split-on-body ()
15850   (save-excursion
15851     (save-restriction
15852       (widen)
15853       (goto-char (point-min))
15854       (when (re-search-forward "Some.*string" nil t)
15855         "string.group"))))
15856 @end lisp
15857
15858 The buffer is narrowed to the header of the message in question when
15859 @var{function} is run.  That's why @code{(widen)} needs to be called
15860 after @code{save-excursion} and @code{save-restriction} in the example
15861 above.  Also note that with the nnimap backend, message bodies will
15862 not be downloaded by default.  You need to set
15863 @code{nnimap-split-download-body} to @code{t} to do that
15864 (@pxref{Splitting in IMAP}).
15865
15866 @item (! @var{func} @var{split})
15867 If the split is a list, and the first element is @code{!}, then
15868 @var{split} will be processed, and @var{func} will be called as a
15869 function with the result of @var{split} as argument.  @var{func}
15870 should return a split.
15871
15872 @item nil
15873 If the split is @code{nil}, it is ignored.
15874
15875 @end table
15876
15877 In these splits, @var{field} must match a complete field name.
15878
15879 Normally, @var{value} in these splits must match a complete @emph{word}
15880 according to the fundamental mode syntax table.  In other words, all
15881 @var{value}'s will be implicitly surrounded by @code{\<...\>} markers,
15882 which are word delimiters.  Therefore, if you use the following split,
15883 for example,
15884
15885 @example
15886 (any "joe" "joemail")
15887 @end example
15888
15889 @noindent
15890 messages sent from @samp{joedavis@@foo.org} will normally not be filed
15891 in @samp{joemail}.  If you want to alter this behavior, you can use any
15892 of the following three ways:
15893
15894 @enumerate
15895 @item
15896 @vindex nnmail-split-fancy-match-partial-words
15897 You can set the @code{nnmail-split-fancy-match-partial-words} variable
15898 to non-@code{nil} in order to ignore word boundaries and instead the
15899 match becomes more like a grep.  This variable controls whether partial
15900 words are matched during fancy splitting.  The default value is
15901 @code{nil}.
15902
15903 Note that it influences all @var{value}'s in your split rules.
15904
15905 @item
15906 @var{value} beginning with @code{.*} ignores word boundaries in front of
15907 a word.  Similarly, if @var{value} ends with @code{.*}, word boundaries
15908 in the rear of a word will be ignored.  For example, the @var{value}
15909 @code{"@@example\\.com"} does not match @samp{foo@@example.com} but
15910 @code{".*@@example\\.com"} does.
15911
15912 @item
15913 You can set the @var{invert-partial} flag in your split rules of the
15914 @samp{(@var{field} @var{value} @dots{})} types, aforementioned in this
15915 section.  If the flag is set, word boundaries on both sides of a word
15916 are ignored even if @code{nnmail-split-fancy-match-partial-words} is
15917 @code{nil}.  Contrarily, if the flag is set, word boundaries are not
15918 ignored even if @code{nnmail-split-fancy-match-partial-words} is
15919 non-@code{nil}.  (New in Gnus 5.10.7)
15920 @end enumerate
15921
15922 @vindex nnmail-split-abbrev-alist
15923 @var{field} and @var{value} can also be Lisp symbols, in that case
15924 they are expanded as specified by the variable
15925 @code{nnmail-split-abbrev-alist}.  This is an alist of cons cells,
15926 where the @sc{car} of a cell contains the key, and the @sc{cdr}
15927 contains the associated value.  Predefined entries in
15928 @code{nnmail-split-abbrev-alist} include:
15929
15930 @table @code
15931 @item from
15932 Matches the @samp{From}, @samp{Sender} and @samp{Resent-From} fields.
15933 @item to
15934 Matches the @samp{To}, @samp{Cc}, @samp{Apparently-To},
15935 @samp{Resent-To} and @samp{Resent-Cc} fields.
15936 @item any
15937 Is the union of the @code{from} and @code{to} entries.
15938 @end table
15939
15940 @vindex nnmail-split-fancy-syntax-table
15941 @code{nnmail-split-fancy-syntax-table} is the syntax table in effect
15942 when all this splitting is performed.
15943
15944 If you want to have Gnus create groups dynamically based on some
15945 information in the headers (i.e., do @code{replace-match}-like
15946 substitutions in the group names), you can say things like:
15947
15948 @example
15949 (any "debian-\\b\\(\\w+\\)@@lists.debian.org" "mail.debian.\\1")
15950 @end example
15951
15952 In this example, messages sent to @samp{debian-foo@@lists.debian.org}
15953 will be filed in @samp{mail.debian.foo}.
15954
15955 If the string contains the element @samp{\&}, then the previously
15956 matched string will be substituted.  Similarly, the elements @samp{\\1}
15957 up to @samp{\\9} will be substituted with the text matched by the
15958 groupings 1 through 9.
15959
15960 @vindex nnmail-split-lowercase-expanded
15961 Where @code{nnmail-split-lowercase-expanded} controls whether the
15962 lowercase of the matched string should be used for the substitution.
15963 Setting it as non-@code{nil} is useful to avoid the creation of multiple
15964 groups when users send to an address using different case
15965 (i.e. mailing-list@@domain vs Mailing-List@@Domain).  The default value
15966 is @code{t}.
15967
15968 @findex nnmail-split-fancy-with-parent
15969 @code{nnmail-split-fancy-with-parent} is a function which allows you to
15970 split followups into the same groups their parents are in.  Sometimes
15971 you can't make splitting rules for all your mail.  For example, your
15972 boss might send you personal mail regarding different projects you are
15973 working on, and as you can't tell your boss to put a distinguishing
15974 string into the subject line, you have to resort to manually moving the
15975 messages into the right group.  With this function, you only have to do
15976 it once per thread.
15977
15978 To use this feature, you have to set @code{nnmail-treat-duplicates}
15979 and @code{nnmail-cache-accepted-message-ids} to a non-@code{nil}
15980 value.  And then you can include @code{nnmail-split-fancy-with-parent}
15981 using the colon feature, like so:
15982 @lisp
15983 (setq nnmail-treat-duplicates 'warn     ; @r{or @code{delete}}
15984       nnmail-cache-accepted-message-ids t
15985       nnmail-split-fancy
15986       '(| (: nnmail-split-fancy-with-parent)
15987           ;; @r{other splits go here}
15988         ))
15989 @end lisp
15990
15991 This feature works as follows: when @code{nnmail-treat-duplicates} is
15992 non-@code{nil}, Gnus records the message id of every message it sees
15993 in the file specified by the variable
15994 @code{nnmail-message-id-cache-file}, together with the group it is in
15995 (the group is omitted for non-mail messages).  When mail splitting is
15996 invoked, the function @code{nnmail-split-fancy-with-parent} then looks
15997 at the References (and In-Reply-To) header of each message to split
15998 and searches the file specified by @code{nnmail-message-id-cache-file}
15999 for the message ids.  When it has found a parent, it returns the
16000 corresponding group name unless the group name matches the regexp
16001 @code{nnmail-split-fancy-with-parent-ignore-groups}.  It is
16002 recommended that you set @code{nnmail-message-id-cache-length} to a
16003 somewhat higher number than the default so that the message ids are
16004 still in the cache.  (A value of 5000 appears to create a file some
16005 300 kBytes in size.)
16006 @vindex nnmail-cache-accepted-message-ids
16007 When @code{nnmail-cache-accepted-message-ids} is non-@code{nil}, Gnus
16008 also records the message ids of moved articles, so that the followup
16009 messages goes into the new group.
16010
16011 Also see the variable @code{nnmail-cache-ignore-groups} if you don't
16012 want certain groups to be recorded in the cache.  For example, if all
16013 outgoing messages are written to an ``outgoing'' group, you could set
16014 @code{nnmail-cache-ignore-groups} to match that group name.
16015 Otherwise, answers to all your messages would end up in the
16016 ``outgoing'' group.
16017
16018
16019 @node Group Mail Splitting
16020 @subsection Group Mail Splitting
16021 @cindex mail splitting
16022 @cindex group mail splitting
16023
16024 @findex gnus-group-split
16025 If you subscribe to dozens of mailing lists but you don't want to
16026 maintain mail splitting rules manually, group mail splitting is for you.
16027 You just have to set @code{to-list} and/or @code{to-address} in group
16028 parameters or group customization and set @code{nnmail-split-methods} to
16029 @code{gnus-group-split}.  This splitting function will scan all groups
16030 for those parameters and split mail accordingly, i.e., messages posted
16031 from or to the addresses specified in the parameters @code{to-list} or
16032 @code{to-address} of a mail group will be stored in that group.
16033
16034 Sometimes, mailing lists have multiple addresses, and you may want mail
16035 splitting to recognize them all: just set the @code{extra-aliases} group
16036 parameter to the list of additional addresses and it's done.  If you'd
16037 rather use a regular expression, set @code{split-regexp}.
16038
16039 All these parameters in a group will be used to create an
16040 @code{nnmail-split-fancy} split, in which the @var{field} is @samp{any},
16041 the @var{value} is a single regular expression that matches
16042 @code{to-list}, @code{to-address}, all of @code{extra-aliases} and all
16043 matches of @code{split-regexp}, and the @var{split} is the name of the
16044 group.  @var{restrict}s are also supported: just set the
16045 @code{split-exclude} parameter to a list of regular expressions.
16046
16047 If you can't get the right split to be generated using all these
16048 parameters, or you just need something fancier, you can set the
16049 parameter @code{split-spec} to an @code{nnmail-split-fancy} split.  In
16050 this case, all other aforementioned parameters will be ignored by
16051 @code{gnus-group-split}.  In particular, @code{split-spec} may be set to
16052 @code{nil}, in which case the group will be ignored by
16053 @code{gnus-group-split}.
16054
16055 @vindex gnus-group-split-default-catch-all-group
16056 @code{gnus-group-split} will do cross-posting on all groups that match,
16057 by defining a single @code{&} fancy split containing one split for each
16058 group.  If a message doesn't match any split, it will be stored in the
16059 group named in @code{gnus-group-split-default-catch-all-group}, unless
16060 some group has @code{split-spec} set to @code{catch-all}, in which case
16061 that group is used as the catch-all group.  Even though this variable is
16062 often used just to name a group, it may also be set to an arbitrarily
16063 complex fancy split (after all, a group name is a fancy split), and this
16064 may be useful to split mail that doesn't go to any mailing list to
16065 personal mail folders.  Note that this fancy split is added as the last
16066 element of a @code{|} split list that also contains a @code{&} split
16067 with the rules extracted from group parameters.
16068
16069 It's time for an example.  Assume the following group parameters have
16070 been defined:
16071
16072 @example
16073 nnml:mail.bar:
16074 ((to-address . "bar@@femail.com")
16075  (split-regexp . ".*@@femail\\.com"))
16076 nnml:mail.foo:
16077 ((to-list . "foo@@nowhere.gov")
16078  (extra-aliases "foo@@localhost" "foo-redist@@home")
16079  (split-exclude "bugs-foo" "rambling-foo")
16080  (admin-address . "foo-request@@nowhere.gov"))
16081 nnml:mail.others:
16082 ((split-spec . catch-all))
16083 @end example
16084
16085 Setting @code{nnmail-split-methods} to @code{gnus-group-split} will
16086 behave as if @code{nnmail-split-fancy} had been selected and variable
16087 @code{nnmail-split-fancy} had been set as follows:
16088
16089 @lisp
16090 (| (& (any "\\(bar@@femail\\.com\\|.*@@femail\\.com\\)" "mail.bar")
16091       (any "\\(foo@@nowhere\\.gov\\|foo@@localhost\\|foo-redist@@home\\)"
16092            - "bugs-foo" - "rambling-foo" "mail.foo"))
16093    "mail.others")
16094 @end lisp
16095
16096 @findex gnus-group-split-fancy
16097 If you'd rather not use group splitting for all your mail groups, you
16098 may use it for only some of them, by using @code{nnmail-split-fancy}
16099 splits like this:
16100
16101 @lisp
16102 (: gnus-group-split-fancy @var{groups} @var{no-crosspost} @var{catch-all})
16103 @end lisp
16104
16105 @var{groups} may be a regular expression or a list of group names whose
16106 parameters will be scanned to generate the output split.
16107 @var{no-crosspost} can be used to disable cross-posting; in this case, a
16108 single @code{|} split will be output.  @var{catch-all} is the fall back
16109 fancy split, used like @code{gnus-group-split-default-catch-all-group}.
16110 If @var{catch-all} is @code{nil}, or if @code{split-regexp} matches the
16111 empty string in any selected group, no catch-all split will be issued.
16112 Otherwise, if some group has @code{split-spec} set to @code{catch-all},
16113 this group will override the value of the @var{catch-all} argument.
16114
16115 @findex gnus-group-split-setup
16116 Unfortunately, scanning all groups and their parameters can be quite
16117 slow, especially considering that it has to be done for every message.
16118 But don't despair!  The function @code{gnus-group-split-setup} can be
16119 used to enable @code{gnus-group-split} in a much more efficient way.  It
16120 sets @code{nnmail-split-methods} to @code{nnmail-split-fancy} and sets
16121 @code{nnmail-split-fancy} to the split produced by
16122 @code{gnus-group-split-fancy}.  Thus, the group parameters are only
16123 scanned once, no matter how many messages are split.
16124
16125 @findex gnus-group-split-update
16126 However, if you change group parameters, you'd have to update
16127 @code{nnmail-split-fancy} manually.  You can do it by running
16128 @code{gnus-group-split-update}.  If you'd rather have it updated
16129 automatically, just tell @code{gnus-group-split-setup} to do it for
16130 you.  For example, add to your @file{~/.gnus.el}:
16131
16132 @lisp
16133 (gnus-group-split-setup @var{auto-update} @var{catch-all})
16134 @end lisp
16135
16136 If @var{auto-update} is non-@code{nil}, @code{gnus-group-split-update}
16137 will be added to @code{nnmail-pre-get-new-mail-hook}, so you won't ever
16138 have to worry about updating @code{nnmail-split-fancy} again.  If you
16139 don't omit @var{catch-all} (it's optional, equivalent to @code{nil}),
16140 @code{gnus-group-split-default-catch-all-group} will be set to its
16141 value.
16142
16143 @vindex gnus-group-split-updated-hook
16144 Because you may want to change @code{nnmail-split-fancy} after it is set
16145 by @code{gnus-group-split-update}, this function will run
16146 @code{gnus-group-split-updated-hook} just before finishing.
16147
16148 @node Incorporating Old Mail
16149 @subsection Incorporating Old Mail
16150 @cindex incorporating old mail
16151 @cindex import old mail
16152
16153 Most people have lots of old mail stored in various file formats.  If
16154 you have set up Gnus to read mail using one of the spiffy Gnus mail
16155 back ends, you'll probably wish to have that old mail incorporated into
16156 your mail groups.
16157
16158 Doing so can be quite easy.
16159
16160 To take an example: You're reading mail using @code{nnml}
16161 (@pxref{Mail Spool}), and have set @code{nnmail-split-methods} to a
16162 satisfactory value (@pxref{Splitting Mail}).  You have an old Unix mbox
16163 file filled with important, but old, mail.  You want to move it into
16164 your @code{nnml} groups.
16165
16166 Here's how:
16167
16168 @enumerate
16169 @item
16170 Go to the group buffer.
16171
16172 @item
16173 Type @kbd{G f} and give the file name to the mbox file when prompted to create an
16174 @code{nndoc} group from the mbox file (@pxref{Foreign Groups}).
16175
16176 @item
16177 Type @kbd{SPACE} to enter the newly created group.
16178
16179 @item
16180 Type @kbd{M P b} to process-mark all articles in this group's buffer
16181 (@pxref{Setting Process Marks}).
16182
16183 @item
16184 Type @kbd{B r} to respool all the process-marked articles, and answer
16185 @samp{nnml} when prompted (@pxref{Mail Group Commands}).
16186 @end enumerate
16187
16188 All the mail messages in the mbox file will now also be spread out over
16189 all your @code{nnml} groups.  Try entering them and check whether things
16190 have gone without a glitch.  If things look ok, you may consider
16191 deleting the mbox file, but I wouldn't do that unless I was absolutely
16192 sure that all the mail has ended up where it should be.
16193
16194 Respooling is also a handy thing to do if you're switching from one mail
16195 back end to another.  Just respool all the mail in the old mail groups
16196 using the new mail back end.
16197
16198
16199 @node Expiring Mail
16200 @subsection Expiring Mail
16201 @cindex article expiry
16202 @cindex expiring mail
16203
16204 Traditional mail readers have a tendency to remove mail articles when
16205 you mark them as read, in some way.  Gnus takes a fundamentally
16206 different approach to mail reading.
16207
16208 Gnus basically considers mail just to be news that has been received in
16209 a rather peculiar manner.  It does not think that it has the power to
16210 actually change the mail, or delete any mail messages.  If you enter a
16211 mail group, and mark articles as ``read'', or kill them in some other
16212 fashion, the mail articles will still exist on the system.  I repeat:
16213 Gnus will not delete your old, read mail.  Unless you ask it to, of
16214 course.
16215
16216 To make Gnus get rid of your unwanted mail, you have to mark the
16217 articles as @dfn{expirable}.  (With the default key bindings, this means
16218 that you have to type @kbd{E}.)  This does not mean that the articles
16219 will disappear right away, however.  In general, a mail article will be
16220 deleted from your system if, 1) it is marked as expirable, AND 2) it is
16221 more than one week old.  If you do not mark an article as expirable, it
16222 will remain on your system until hell freezes over.  This bears
16223 repeating one more time, with some spurious capitalizations: IF you do
16224 NOT mark articles as EXPIRABLE, Gnus will NEVER delete those ARTICLES.
16225
16226 You do not have to mark articles as expirable by hand.  Gnus provides
16227 two features, called ``auto-expire'' and ``total-expire'', that can help you
16228 with this.  In a nutshell, ``auto-expire'' means that Gnus hits @kbd{E}
16229 for you when you select an article.  And ``total-expire'' means that Gnus
16230 considers all articles as expirable that are read.  So, in addition to
16231 the articles marked @samp{E}, also the articles marked @samp{r},
16232 @samp{R}, @samp{O}, @samp{K}, @samp{Y} and so on are considered
16233 expirable.
16234
16235 When should either auto-expire or total-expire be used?  Most people
16236 who are subscribed to mailing lists split each list into its own group
16237 and then turn on auto-expire or total-expire for those groups.
16238 (@xref{Splitting Mail}, for more information on splitting each list
16239 into its own group.)
16240
16241 Which one is better, auto-expire or total-expire?  It's not easy to
16242 answer.  Generally speaking, auto-expire is probably faster.  Another
16243 advantage of auto-expire is that you get more marks to work with: for
16244 the articles that are supposed to stick around, you can still choose
16245 between tick and dormant and read marks.  But with total-expire, you
16246 only have dormant and ticked to choose from.  The advantage of
16247 total-expire is that it works well with adaptive scoring (@pxref{Adaptive
16248 Scoring}).  Auto-expire works with normal scoring but not with adaptive
16249 scoring.
16250
16251 @vindex gnus-auto-expirable-newsgroups
16252 Groups that match the regular expression
16253 @code{gnus-auto-expirable-newsgroups} will have all articles that you
16254 read marked as expirable automatically.  All articles marked as
16255 expirable have an @samp{E} in the first column in the summary buffer.
16256
16257 By default, if you have auto expiry switched on, Gnus will mark all the
16258 articles you read as expirable, no matter if they were read or unread
16259 before.  To avoid having articles marked as read marked as expirable
16260 automatically, you can put something like the following in your
16261 @file{~/.gnus.el} file:
16262
16263 @vindex gnus-mark-article-hook
16264 @lisp
16265 (remove-hook 'gnus-mark-article-hook
16266              'gnus-summary-mark-read-and-unread-as-read)
16267 (add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
16268 @end lisp
16269
16270 Note that making a group auto-expirable doesn't mean that all read
16271 articles are expired---only the articles marked as expirable
16272 will be expired.  Also note that using the @kbd{d} command won't make
16273 articles expirable---only semi-automatic marking of articles as read will
16274 mark the articles as expirable in auto-expirable groups.
16275
16276 Let's say you subscribe to a couple of mailing lists, and you want the
16277 articles you have read to disappear after a while:
16278
16279 @lisp
16280 (setq gnus-auto-expirable-newsgroups
16281       "mail.nonsense-list\\|mail.nice-list")
16282 @end lisp
16283
16284 Another way to have auto-expiry happen is to have the element
16285 @code{auto-expire} in the group parameters of the group.
16286
16287 If you use adaptive scoring (@pxref{Adaptive Scoring}) and
16288 auto-expiring, you'll have problems.  Auto-expiring and adaptive scoring
16289 don't really mix very well.
16290
16291 @vindex nnmail-expiry-wait
16292 The @code{nnmail-expiry-wait} variable supplies the default time an
16293 expirable article has to live.  Gnus starts counting days from when the
16294 message @emph{arrived}, not from when it was sent.  The default is seven
16295 days.
16296
16297 Gnus also supplies a function that lets you fine-tune how long articles
16298 are to live, based on what group they are in.  Let's say you want to
16299 have one month expiry period in the @samp{mail.private} group, a one day
16300 expiry period in the @samp{mail.junk} group, and a six day expiry period
16301 everywhere else:
16302
16303 @vindex nnmail-expiry-wait-function
16304 @lisp
16305 (setq nnmail-expiry-wait-function
16306       (lambda (group)
16307        (cond ((string= group "mail.private")
16308                31)
16309              ((string= group "mail.junk")
16310                1)
16311              ((string= group "important")
16312                'never)
16313              (t
16314                6))))
16315 @end lisp
16316
16317 The group names this function is fed are ``unadorned'' group
16318 names---no @samp{nnml:} prefixes and the like.
16319
16320 The @code{nnmail-expiry-wait} variable and
16321 @code{nnmail-expiry-wait-function} function can either be a number (not
16322 necessarily an integer) or one of the symbols @code{immediate} or
16323 @code{never}.
16324
16325 You can also use the @code{expiry-wait} group parameter to selectively
16326 change the expiry period (@pxref{Group Parameters}).
16327
16328 @vindex nnmail-expiry-target
16329 The normal action taken when expiring articles is to delete them.
16330 However, in some circumstances it might make more sense to move them
16331 to other groups instead of deleting them.  The variable
16332 @code{nnmail-expiry-target} (and the @code{expiry-target} group
16333 parameter) controls this.  The variable supplies a default value for
16334 all groups, which can be overridden for specific groups by the group
16335 parameter.  default value is @code{delete}, but this can also be a
16336 string (which should be the name of the group the message should be
16337 moved to), or a function (which will be called in a buffer narrowed to
16338 the message in question, and with the name of the group being moved
16339 from as its parameter) which should return a target---either a group
16340 name or @code{delete}.
16341
16342 Here's an example for specifying a group name:
16343 @lisp
16344 (setq nnmail-expiry-target "nnml:expired")
16345 @end lisp
16346
16347 @findex nnmail-fancy-expiry-target
16348 @vindex nnmail-fancy-expiry-targets
16349 Gnus provides a function @code{nnmail-fancy-expiry-target} which will
16350 expire mail to groups according to the variable
16351 @code{nnmail-fancy-expiry-targets}.  Here's an example:
16352
16353 @lisp
16354  (setq nnmail-expiry-target 'nnmail-fancy-expiry-target
16355        nnmail-fancy-expiry-targets
16356        '((to-from "boss" "nnfolder:Work")
16357          ("subject" "IMPORTANT" "nnfolder:IMPORTANT.%Y.%b")
16358          ("from" ".*" "nnfolder:Archive-%Y")))
16359 @end lisp
16360
16361 With this setup, any mail that has @code{IMPORTANT} in its Subject
16362 header and was sent in the year @code{YYYY} and month @code{MMM}, will
16363 get expired to the group @code{nnfolder:IMPORTANT.YYYY.MMM}.  If its
16364 From or To header contains the string @code{boss}, it will get expired
16365 to @code{nnfolder:Work}.  All other mail will get expired to
16366 @code{nnfolder:Archive-YYYY}.
16367
16368 @vindex nnmail-keep-last-article
16369 If @code{nnmail-keep-last-article} is non-@code{nil}, Gnus will never
16370 expire the final article in a mail newsgroup.  This is to make life
16371 easier for procmail users.
16372
16373 @vindex gnus-total-expirable-newsgroups
16374 By the way: That line up there, about Gnus never expiring non-expirable
16375 articles, is a lie.  If you put @code{total-expire} in the group
16376 parameters, articles will not be marked as expirable, but all read
16377 articles will be put through the expiry process.  Use with extreme
16378 caution.  Even more dangerous is the
16379 @code{gnus-total-expirable-newsgroups} variable.  All groups that match
16380 this regexp will have all read articles put through the expiry process,
16381 which means that @emph{all} old mail articles in the groups in question
16382 will be deleted after a while.  Use with extreme caution, and don't come
16383 crying to me when you discover that the regexp you used matched the
16384 wrong group and all your important mail has disappeared.  Be a
16385 @emph{man}!  Or a @emph{woman}!  Whatever you feel more comfortable
16386 with!  So there!
16387
16388 Most people make most of their mail groups total-expirable, though.
16389
16390 @vindex gnus-inhibit-user-auto-expire
16391 If @code{gnus-inhibit-user-auto-expire} is non-@code{nil}, user marking
16392 commands will not mark an article as expirable, even if the group has
16393 auto-expire turned on.
16394
16395 @vindex gnus-mark-copied-or-moved-articles-as-expirable
16396 The expirable marks of articles will be removed when copying or moving
16397 them to a group in which auto-expire is not turned on.  This is for
16398 preventing articles from being expired unintentionally.  On the other
16399 hand, to a group that has turned auto-expire on, the expirable marks of
16400 articles that are copied or moved will not be changed by default.  I.e.,
16401 when copying or moving to such a group, articles that were expirable
16402 will be left expirable and ones that were not expirable will not be
16403 marked as expirable.  So, even though in auto-expire groups, some
16404 articles will never get expired (unless you read them again).  If you
16405 don't side with that behavior that unexpirable articles may be mixed
16406 into auto-expire groups, you can set
16407 @code{gnus-mark-copied-or-moved-articles-as-expirable} to a
16408 non-@code{nil} value.  In that case, articles that have been read will
16409 be marked as expirable automatically when being copied or moved to a
16410 group that has auto-expire turned on.  The default value is @code{nil}.
16411
16412
16413 @node Washing Mail
16414 @subsection Washing Mail
16415 @cindex mail washing
16416 @cindex list server brain damage
16417 @cindex incoming mail treatment
16418
16419 Mailers and list servers are notorious for doing all sorts of really,
16420 really stupid things with mail.  ``Hey, RFC 822 doesn't explicitly
16421 prohibit us from adding the string @code{wE aRe ElItE!!!!!1!!} to the
16422 end of all lines passing through our server, so let's do that!!!!1!''
16423 Yes, but RFC 822 wasn't designed to be read by morons.  Things that were
16424 considered to be self-evident were not discussed.  So.  Here we are.
16425
16426 Case in point:  The German version of Microsoft Exchange adds @samp{AW:
16427 } to the subjects of replies instead of @samp{Re: }.  I could pretend to
16428 be shocked and dismayed by this, but I haven't got the energy.  It is to
16429 laugh.
16430
16431 Gnus provides a plethora of functions for washing articles while
16432 displaying them, but it might be nicer to do the filtering before
16433 storing the mail to disk.  For that purpose, we have three hooks and
16434 various functions that can be put in these hooks.
16435
16436 @table @code
16437 @item nnmail-prepare-incoming-hook
16438 @vindex nnmail-prepare-incoming-hook
16439 This hook is called before doing anything with the mail and is meant for
16440 grand, sweeping gestures.  It is called in a buffer that contains all
16441 the new, incoming mail.  Functions to be used include:
16442
16443 @table @code
16444 @item nnheader-ms-strip-cr
16445 @findex nnheader-ms-strip-cr
16446 Remove trailing carriage returns from each line.  This is default on
16447 Emacs running on MS machines.
16448
16449 @end table
16450
16451 @item nnmail-prepare-incoming-header-hook
16452 @vindex nnmail-prepare-incoming-header-hook
16453 This hook is called narrowed to each header.  It can be used when
16454 cleaning up the headers.  Functions that can be used include:
16455
16456 @table @code
16457 @item nnmail-remove-leading-whitespace
16458 @findex nnmail-remove-leading-whitespace
16459 Clear leading white space that ``helpful'' listservs have added to the
16460 headers to make them look nice.  Aaah.
16461
16462 (Note that this function works on both the header on the body of all
16463 messages, so it is a potentially dangerous function to use (if a body
16464 of a message contains something that looks like a header line).  So
16465 rather than fix the bug, it is of course the right solution to make it
16466 into a feature by documenting it.)
16467
16468 @item nnmail-remove-list-identifiers
16469 @findex nnmail-remove-list-identifiers
16470 Some list servers add an identifier---for example, @samp{(idm)}---to the
16471 beginning of all @code{Subject} headers.  I'm sure that's nice for
16472 people who use stone age mail readers.  This function will remove
16473 strings that match the @code{nnmail-list-identifiers} regexp, which can
16474 also be a list of regexp.  @code{nnmail-list-identifiers} may not contain
16475 @code{\\(..\\)}.
16476
16477 For instance, if you want to remove the @samp{(idm)} and the
16478 @samp{nagnagnag} identifiers:
16479
16480 @lisp
16481 (setq nnmail-list-identifiers
16482       '("(idm)" "nagnagnag"))
16483 @end lisp
16484
16485 This can also be done non-destructively with
16486 @code{gnus-list-identifiers}, @xref{Article Hiding}.
16487
16488 @item nnmail-remove-tabs
16489 @findex nnmail-remove-tabs
16490 Translate all @samp{TAB} characters into @samp{SPACE} characters.
16491
16492 @item nnmail-ignore-broken-references
16493 @findex nnmail-ignore-broken-references
16494 @c @findex nnmail-fix-eudora-headers
16495 @cindex Eudora
16496 @cindex Pegasus
16497 Some mail user agents (e.g. Eudora and Pegasus) produce broken
16498 @code{References} headers, but correct @code{In-Reply-To} headers.  This
16499 function will get rid of the @code{References} header if the headers
16500 contain a line matching the regular expression
16501 @code{nnmail-broken-references-mailers}.
16502
16503 @end table
16504
16505 @item nnmail-prepare-incoming-message-hook
16506 @vindex nnmail-prepare-incoming-message-hook
16507 This hook is called narrowed to each message.  Functions to be used
16508 include:
16509
16510 @table @code
16511 @item article-de-quoted-unreadable
16512 @findex article-de-quoted-unreadable
16513 Decode Quoted Readable encoding.
16514
16515 @end table
16516 @end table
16517
16518
16519 @node Duplicates
16520 @subsection Duplicates
16521
16522 @vindex nnmail-treat-duplicates
16523 @vindex nnmail-message-id-cache-length
16524 @vindex nnmail-message-id-cache-file
16525 @cindex duplicate mails
16526 If you are a member of a couple of mailing lists, you will sometimes
16527 receive two copies of the same mail.  This can be quite annoying, so
16528 @code{nnmail} checks for and treats any duplicates it might find.  To do
16529 this, it keeps a cache of old @code{Message-ID}s---
16530 @code{nnmail-message-id-cache-file}, which is @file{~/.nnmail-cache} by
16531 default.  The approximate maximum number of @code{Message-ID}s stored
16532 there is controlled by the @code{nnmail-message-id-cache-length}
16533 variable, which is 1000 by default.  (So 1000 @code{Message-ID}s will be
16534 stored.) If all this sounds scary to you, you can set
16535 @code{nnmail-treat-duplicates} to @code{warn} (which is what it is by
16536 default), and @code{nnmail} won't delete duplicate mails.  Instead it
16537 will insert a warning into the head of the mail saying that it thinks
16538 that this is a duplicate of a different message.
16539
16540 This variable can also be a function.  If that's the case, the function
16541 will be called from a buffer narrowed to the message in question with
16542 the @code{Message-ID} as a parameter.  The function must return either
16543 @code{nil}, @code{warn}, or @code{delete}.
16544
16545 You can turn this feature off completely by setting the variable to
16546 @code{nil}.
16547
16548 If you want all the duplicate mails to be put into a special
16549 @dfn{duplicates} group, you could do that using the normal mail split
16550 methods:
16551
16552 @lisp
16553 (setq nnmail-split-fancy
16554       '(| ;; @r{Messages duplicates go to a separate group.}
16555         ("gnus-warning" "duplicat\\(e\\|ion\\) of message" "duplicate")
16556         ;; @r{Message from daemons, postmaster, and the like to another.}
16557         (any mail "mail.misc")
16558         ;; @r{Other rules.}
16559         [...] ))
16560 @end lisp
16561 @noindent
16562 Or something like:
16563 @lisp
16564 (setq nnmail-split-methods
16565       '(("duplicates" "^Gnus-Warning:.*duplicate")
16566         ;; @r{Other rules.}
16567         [...]))
16568 @end lisp
16569
16570 Here's a neat feature: If you know that the recipient reads her mail
16571 with Gnus, and that she has @code{nnmail-treat-duplicates} set to
16572 @code{delete}, you can send her as many insults as you like, just by
16573 using a @code{Message-ID} of a mail that you know that she's already
16574 received.  Think of all the fun!  She'll never see any of it!  Whee!
16575
16576
16577 @node Not Reading Mail
16578 @subsection Not Reading Mail
16579
16580 If you start using any of the mail back ends, they have the annoying
16581 habit of assuming that you want to read mail with them.  This might not
16582 be unreasonable, but it might not be what you want.
16583
16584 If you set @code{mail-sources} and @code{nnmail-spool-file} to
16585 @code{nil}, none of the back ends will ever attempt to read incoming
16586 mail, which should help.
16587
16588 @vindex nnbabyl-get-new-mail
16589 @vindex nnmbox-get-new-mail
16590 @vindex nnml-get-new-mail
16591 @vindex nnmh-get-new-mail
16592 @vindex nnfolder-get-new-mail
16593 This might be too much, if, for instance, you are reading mail quite
16594 happily with @code{nnml} and just want to peek at some old (pre-Emacs
16595 23) Rmail file you have stashed away with @code{nnbabyl}.  All back ends have
16596 variables called back-end-@code{get-new-mail}.  If you want to disable
16597 the @code{nnbabyl} mail reading, you edit the virtual server for the
16598 group to have a setting where @code{nnbabyl-get-new-mail} to @code{nil}.
16599
16600 All the mail back ends will call @code{nn}*@code{-prepare-save-mail-hook}
16601 narrowed to the article to be saved before saving it when reading
16602 incoming mail.
16603
16604
16605 @node Choosing a Mail Back End
16606 @subsection Choosing a Mail Back End
16607
16608 Gnus will read the mail spool when you activate a mail group.  The mail
16609 file is first copied to your home directory.  What happens after that
16610 depends on what format you want to store your mail in.
16611
16612 There are six different mail back ends in the standard Gnus, and more
16613 back ends are available separately.  The mail back end most people use
16614 (because it is possibly the fastest) is @code{nnml} (@pxref{Mail
16615 Spool}).
16616
16617 @menu
16618 * Unix Mail Box::               Using the (quite) standard Un*x mbox.
16619 * Babyl::                       Babyl was used by older versions of Rmail.
16620 * Mail Spool::                  Store your mail in a private spool?
16621 * MH Spool::                    An mhspool-like back end.
16622 * Maildir::                     Another one-file-per-message format.
16623 * Mail Folders::                Having one file for each group.
16624 * Comparing Mail Back Ends::    An in-depth looks at pros and cons.
16625 @end menu
16626
16627
16628 @node Unix Mail Box
16629 @subsubsection Unix Mail Box
16630 @cindex nnmbox
16631 @cindex unix mail box
16632
16633 @vindex nnmbox-active-file
16634 @vindex nnmbox-mbox-file
16635 The @dfn{nnmbox} back end will use the standard Un*x mbox file to store
16636 mail.  @code{nnmbox} will add extra headers to each mail article to say
16637 which group it belongs in.
16638
16639 Virtual server settings:
16640
16641 @table @code
16642 @item nnmbox-mbox-file
16643 @vindex nnmbox-mbox-file
16644 The name of the mail box in the user's home directory.  Default is
16645 @file{~/mbox}.
16646
16647 @item nnmbox-active-file
16648 @vindex nnmbox-active-file
16649 The name of the active file for the mail box.  Default is
16650 @file{~/.mbox-active}.
16651
16652 @item nnmbox-get-new-mail
16653 @vindex nnmbox-get-new-mail
16654 If non-@code{nil}, @code{nnmbox} will read incoming mail and split it
16655 into groups.  Default is @code{t}.
16656 @end table
16657
16658
16659 @node Babyl
16660 @subsubsection Babyl
16661 @cindex nnbabyl
16662
16663 @vindex nnbabyl-active-file
16664 @vindex nnbabyl-mbox-file
16665 The @dfn{nnbabyl} back end will use a Babyl mail box to store mail.
16666 @code{nnbabyl} will add extra headers to each mail article to say which
16667 group it belongs in.
16668
16669 Virtual server settings:
16670
16671 @table @code
16672 @item nnbabyl-mbox-file
16673 @vindex nnbabyl-mbox-file
16674 The name of the Babyl file.  The default is @file{~/RMAIL}
16675
16676 @item nnbabyl-active-file
16677 @vindex nnbabyl-active-file
16678 The name of the active file for the Babyl file.  The default is
16679 @file{~/.rmail-active}
16680
16681 @item nnbabyl-get-new-mail
16682 @vindex nnbabyl-get-new-mail
16683 If non-@code{nil}, @code{nnbabyl} will read incoming mail.  Default is
16684 @code{t}
16685 @end table
16686
16687
16688 @node Mail Spool
16689 @subsubsection Mail Spool
16690 @cindex nnml
16691 @cindex mail @acronym{NOV} spool
16692
16693 The @dfn{nnml} spool mail format isn't compatible with any other known
16694 format.  It should be used with some caution.
16695
16696 @vindex nnml-directory
16697 If you use this back end, Gnus will split all incoming mail into files,
16698 one file for each mail, and put the articles into the corresponding
16699 directories under the directory specified by the @code{nnml-directory}
16700 variable.  The default value is @file{~/Mail/}.
16701
16702 You do not have to create any directories beforehand; Gnus will take
16703 care of all that.
16704
16705 If you have a strict limit as to how many files you are allowed to store
16706 in your account, you should not use this back end.  As each mail gets its
16707 own file, you might very well occupy thousands of inodes within a few
16708 weeks.  If this is no problem for you, and it isn't a problem for you
16709 having your friendly systems administrator walking around, madly,
16710 shouting ``Who is eating all my inodes?! Who? Who!?!'', then you should
16711 know that this is probably the fastest format to use.  You do not have
16712 to trudge through a big mbox file just to read your new mail.
16713
16714 @code{nnml} is probably the slowest back end when it comes to article
16715 splitting.  It has to create lots of files, and it also generates
16716 @acronym{NOV} databases for the incoming mails.  This makes it possibly the
16717 fastest back end when it comes to reading mail.
16718
16719 @cindex self contained nnml servers
16720 @cindex marks
16721 When the marks file is used (which it is by default), @code{nnml}
16722 servers have the property that you may backup them using @code{tar} or
16723 similar, and later be able to restore them into Gnus (by adding the
16724 proper @code{nnml} server) and have all your marks be preserved.  Marks
16725 for a group are usually stored in the @code{.marks} file (but see
16726 @code{nnml-marks-file-name}) within each @code{nnml} group's directory.
16727 Individual @code{nnml} groups are also possible to backup, use @kbd{G m}
16728 to restore the group (after restoring the backup into the nnml
16729 directory).
16730
16731 If for some reason you believe your @file{.marks} files are screwed
16732 up, you can just delete them all.  Gnus will then correctly regenerate
16733 them next time it starts.
16734
16735 Virtual server settings:
16736
16737 @table @code
16738 @item nnml-directory
16739 @vindex nnml-directory
16740 All @code{nnml} directories will be placed under this directory.  The
16741 default is the value of @code{message-directory} (whose default value
16742 is @file{~/Mail}).
16743
16744 @item nnml-active-file
16745 @vindex nnml-active-file
16746 The active file for the @code{nnml} server.  The default is
16747 @file{~/Mail/active}.
16748
16749 @item nnml-newsgroups-file
16750 @vindex nnml-newsgroups-file
16751 The @code{nnml} group descriptions file.  @xref{Newsgroups File
16752 Format}.  The default is @file{~/Mail/newsgroups}.
16753
16754 @item nnml-get-new-mail
16755 @vindex nnml-get-new-mail
16756 If non-@code{nil}, @code{nnml} will read incoming mail.  The default is
16757 @code{t}.
16758
16759 @item nnml-nov-is-evil
16760 @vindex nnml-nov-is-evil
16761 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
16762 default is @code{nil}.
16763
16764 @item nnml-nov-file-name
16765 @vindex nnml-nov-file-name
16766 The name of the @acronym{NOV} files.  The default is @file{.overview}.
16767
16768 @item nnml-prepare-save-mail-hook
16769 @vindex nnml-prepare-save-mail-hook
16770 Hook run narrowed to an article before saving.
16771
16772 @item nnml-marks-is-evil
16773 @vindex nnml-marks-is-evil
16774 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
16775 default is @code{nil}.
16776
16777 @item nnml-marks-file-name
16778 @vindex nnml-marks-file-name
16779 The name of the @dfn{marks} files.  The default is @file{.marks}.
16780
16781 @item nnml-use-compressed-files
16782 @vindex nnml-use-compressed-files
16783 If non-@code{nil}, @code{nnml} will allow using compressed message
16784 files.  This requires @code{auto-compression-mode} to be enabled
16785 (@pxref{Compressed Files, ,Compressed Files, emacs, The Emacs Manual}).
16786 If the value of @code{nnml-use-compressed-files} is a string, it is used
16787 as the file extension specifying the compression program.  You can set it
16788 to @samp{.bz2} if your Emacs supports it.  A value of @code{t} is
16789 equivalent to @samp{.gz}.
16790
16791 @item nnml-compressed-files-size-threshold
16792 @vindex nnml-compressed-files-size-threshold
16793 Default size threshold for compressed message files.  Message files with
16794 bodies larger than that many characters will be automatically compressed
16795 if @code{nnml-use-compressed-files} is non-@code{nil}.
16796
16797 @end table
16798
16799 @findex nnml-generate-nov-databases
16800 If your @code{nnml} groups and @acronym{NOV} files get totally out of
16801 whack, you can do a complete update by typing @kbd{M-x
16802 nnml-generate-nov-databases}.  This command will trawl through the
16803 entire @code{nnml} hierarchy, looking at each and every article, so it
16804 might take a while to complete.  A better interface to this
16805 functionality can be found in the server buffer (@pxref{Server
16806 Commands}).
16807
16808
16809 @node MH Spool
16810 @subsubsection MH Spool
16811 @cindex nnmh
16812 @cindex mh-e mail spool
16813
16814 @code{nnmh} is just like @code{nnml}, except that is doesn't generate
16815 @acronym{NOV} databases and it doesn't keep an active file or marks
16816 file.  This makes @code{nnmh} a @emph{much} slower back end than
16817 @code{nnml}, but it also makes it easier to write procmail scripts
16818 for.
16819
16820 Virtual server settings:
16821
16822 @table @code
16823 @item nnmh-directory
16824 @vindex nnmh-directory
16825 All @code{nnmh} directories will be located under this directory.  The
16826 default is the value of @code{message-directory} (whose default is
16827 @file{~/Mail})
16828
16829 @item nnmh-get-new-mail
16830 @vindex nnmh-get-new-mail
16831 If non-@code{nil}, @code{nnmh} will read incoming mail.  The default is
16832 @code{t}.
16833
16834 @item nnmh-be-safe
16835 @vindex nnmh-be-safe
16836 If non-@code{nil}, @code{nnmh} will go to ridiculous lengths to make
16837 sure that the articles in the folder are actually what Gnus thinks
16838 they are.  It will check date stamps and stat everything in sight, so
16839 setting this to @code{t} will mean a serious slow-down.  If you never
16840 use anything but Gnus to read the @code{nnmh} articles, you do not
16841 have to set this variable to @code{t}.  The default is @code{nil}.
16842 @end table
16843
16844
16845 @node Maildir
16846 @subsubsection Maildir
16847 @cindex nnmaildir
16848 @cindex maildir
16849
16850 @code{nnmaildir} stores mail in the maildir format, with each maildir
16851 corresponding to a group in Gnus.  This format is documented here:
16852 @uref{http://cr.yp.to/proto/maildir.html} and here:
16853 @uref{http://www.qmail.org/man/man5/maildir.html}.  @code{nnmaildir}
16854 also stores extra information in the @file{.nnmaildir/} directory
16855 within a maildir.
16856
16857 Maildir format was designed to allow concurrent deliveries and
16858 reading, without needing locks.  With other back ends, you would have
16859 your mail delivered to a spool of some kind, and then you would
16860 configure Gnus to split mail from that spool into your groups.  You
16861 can still do that with @code{nnmaildir}, but the more common
16862 configuration is to have your mail delivered directly to the maildirs
16863 that appear as group in Gnus.
16864
16865 @code{nnmaildir} is designed to be perfectly reliable: @kbd{C-g} will
16866 never corrupt its data in memory, and @code{SIGKILL} will never
16867 corrupt its data in the filesystem.
16868
16869 @code{nnmaildir} stores article marks and @acronym{NOV} data in each
16870 maildir.  So you can copy a whole maildir from one Gnus setup to
16871 another, and you will keep your marks.
16872
16873 Virtual server settings:
16874
16875 @table @code
16876 @item directory
16877 For each of your @code{nnmaildir} servers (it's very unlikely that
16878 you'd need more than one), you need to create a directory and populate
16879 it with maildirs or symlinks to maildirs (and nothing else; do not
16880 choose a directory already used for other purposes).  Each maildir
16881 will be represented in Gnus as a newsgroup on that server; the
16882 filename of the symlink will be the name of the group.  Any filenames
16883 in the directory starting with @samp{.} are ignored.  The directory is
16884 scanned when you first start Gnus, and each time you type @kbd{g} in
16885 the group buffer; if any maildirs have been removed or added,
16886 @code{nnmaildir} notices at these times.
16887
16888 The value of the @code{directory} parameter should be a Lisp form
16889 which is processed by @code{eval} and @code{expand-file-name} to get
16890 the path of the directory for this server.  The form is @code{eval}ed
16891 only when the server is opened; the resulting string is used until the
16892 server is closed.  (If you don't know about forms and @code{eval},
16893 don't worry---a simple string will work.)  This parameter is not
16894 optional; you must specify it.  I don't recommend using
16895 @code{"~/Mail"} or a subdirectory of it; several other parts of Gnus
16896 use that directory by default for various things, and may get confused
16897 if @code{nnmaildir} uses it too.  @code{"~/.nnmaildir"} is a typical
16898 value.
16899
16900 @item target-prefix
16901 This should be a Lisp form which is processed by @code{eval} and
16902 @code{expand-file-name}.  The form is @code{eval}ed only when the
16903 server is opened; the resulting string is used until the server is
16904 closed.
16905
16906 When you create a group on an @code{nnmaildir} server, the maildir is
16907 created with @code{target-prefix} prepended to its name, and a symlink
16908 pointing to that maildir is created, named with the plain group name.
16909 So if @code{directory} is @code{"~/.nnmaildir"} and
16910 @code{target-prefix} is @code{"../maildirs/"}, then when you create
16911 the group @code{foo}, @code{nnmaildir} will create
16912 @file{~/.nnmaildir/../maildirs/foo} as a maildir, and will create
16913 @file{~/.nnmaildir/foo} as a symlink pointing to
16914 @file{../maildirs/foo}.
16915
16916 You can set @code{target-prefix} to a string without any slashes to
16917 create both maildirs and symlinks in the same @code{directory}; in
16918 this case, any maildirs found in @code{directory} whose names start
16919 with @code{target-prefix} will not be listed as groups (but the
16920 symlinks pointing to them will be).
16921
16922 As a special case, if @code{target-prefix} is @code{""} (the default),
16923 then when you create a group, the maildir will be created in
16924 @code{directory} without a corresponding symlink.  Beware that you
16925 cannot use @code{gnus-group-delete-group} on such groups without the
16926 @code{force} argument.
16927
16928 @item directory-files
16929 This should be a function with the same interface as
16930 @code{directory-files} (such as @code{directory-files} itself).  It is
16931 used to scan the server's @code{directory} for maildirs.  This
16932 parameter is optional; the default is
16933 @code{nnheader-directory-files-safe} if
16934 @code{nnheader-directory-files-is-safe} is @code{nil}, and
16935 @code{directory-files} otherwise.
16936 (@code{nnheader-directory-files-is-safe} is checked only once when the
16937 server is opened; if you want to check it each time the directory is
16938 scanned, you'll have to provide your own function that does that.)
16939
16940 @item get-new-mail
16941 If non-@code{nil}, then after scanning for new mail in the group
16942 maildirs themselves as usual, this server will also incorporate mail
16943 the conventional Gnus way, from @code{mail-sources} according to
16944 @code{nnmail-split-methods} or @code{nnmail-split-fancy}.  The default
16945 value is @code{nil}.
16946
16947 Do @emph{not} use the same maildir both in @code{mail-sources} and as
16948 an @code{nnmaildir} group.  The results might happen to be useful, but
16949 that would be by chance, not by design, and the results might be
16950 different in the future.  If your split rules create new groups,
16951 remember to supply a @code{create-directory} server parameter.
16952 @end table
16953
16954 @subsubsection Group parameters
16955
16956 @code{nnmaildir} uses several group parameters.  It's safe to ignore
16957 all this; the default behavior for @code{nnmaildir} is the same as the
16958 default behavior for other mail back ends: articles are deleted after
16959 one week, etc.  Except for the expiry parameters, all this
16960 functionality is unique to @code{nnmaildir}, so you can ignore it if
16961 you're just trying to duplicate the behavior you already have with
16962 another back end.
16963
16964 If the value of any of these parameters is a vector, the first element
16965 is evaluated as a Lisp form and the result is used, rather than the
16966 original value.  If the value is not a vector, the value itself is
16967 evaluated as a Lisp form.  (This is why these parameters use names
16968 different from those of other, similar parameters supported by other
16969 back ends: they have different, though similar, meanings.)  (For
16970 numbers, strings, @code{nil}, and @code{t}, you can ignore the
16971 @code{eval} business again; for other values, remember to use an extra
16972 quote and wrap the value in a vector when appropriate.)
16973
16974 @table @code
16975 @item expire-age
16976 An integer specifying the minimum age, in seconds, of an article
16977 before it will be expired, or the symbol @code{never} to specify that
16978 articles should never be expired.  If this parameter is not set,
16979 @code{nnmaildir} falls back to the usual
16980 @code{nnmail-expiry-wait}(@code{-function}) variables (the
16981 @code{expiry-wait} group parameter overrides @code{nnmail-expiry-wait}
16982 and makes @code{nnmail-expiry-wait-function} ineffective).  If you
16983 wanted a value of 3 days, you could use something like @code{[(* 3 24
16984 60 60)]}; @code{nnmaildir} will evaluate the form and use the result.
16985 An article's age is measured starting from the article file's
16986 modification time.  Normally, this is the same as the article's
16987 delivery time, but editing an article makes it younger.  Moving an
16988 article (other than via expiry) may also make an article younger.
16989
16990 @item expire-group
16991 If this is set to a string such as a full Gnus group name, like
16992 @example
16993 "backend+server.address.string:group.name"
16994 @end example
16995 and if it is not the name of the same group that the parameter belongs
16996 to, then articles will be moved to the specified group during expiry
16997 before being deleted.  @emph{If this is set to an @code{nnmaildir}
16998 group, the article will be just as old in the destination group as it
16999 was in the source group.}  So be careful with @code{expire-age} in the
17000 destination group.  If this is set to the name of the same group that
17001 the parameter belongs to, then the article is not expired at all.  If
17002 you use the vector form, the first element is evaluated once for each
17003 article.  So that form can refer to
17004 @code{nnmaildir-article-file-name}, etc., to decide where to put the
17005 article.  @emph{Even if this parameter is not set, @code{nnmaildir}
17006 does not fall back to the @code{expiry-target} group parameter or the
17007 @code{nnmail-expiry-target} variable.}
17008
17009 @item read-only
17010 If this is set to @code{t}, @code{nnmaildir} will treat the articles
17011 in this maildir as read-only.  This means: articles are not renamed
17012 from @file{new/} into @file{cur/}; articles are only found in
17013 @file{new/}, not @file{cur/}; articles are never deleted; articles
17014 cannot be edited.  @file{new/} is expected to be a symlink to the
17015 @file{new/} directory of another maildir---e.g., a system-wide mailbox
17016 containing a mailing list of common interest.  Everything in the
17017 maildir outside @file{new/} is @emph{not} treated as read-only, so for
17018 a shared mailbox, you do still need to set up your own maildir (or
17019 have write permission to the shared mailbox); your maildir just won't
17020 contain extra copies of the articles.
17021
17022 @item directory-files
17023 A function with the same interface as @code{directory-files}.  It is
17024 used to scan the directories in the maildir corresponding to this
17025 group to find articles.  The default is the function specified by the
17026 server's @code{directory-files} parameter.
17027
17028 @item distrust-Lines:
17029 If non-@code{nil}, @code{nnmaildir} will always count the lines of an
17030 article, rather than use the @code{Lines:} header field.  If
17031 @code{nil}, the header field will be used if present.
17032
17033 @item always-marks
17034 A list of mark symbols, such as @code{['(read expire)]}.  Whenever
17035 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
17036 say that all articles have these marks, regardless of whether the
17037 marks stored in the filesystem say so.  This is a proof-of-concept
17038 feature that will probably be removed eventually; it ought to be done
17039 in Gnus proper, or abandoned if it's not worthwhile.
17040
17041 @item never-marks
17042 A list of mark symbols, such as @code{['(tick expire)]}.  Whenever
17043 Gnus asks @code{nnmaildir} for article marks, @code{nnmaildir} will
17044 say that no articles have these marks, regardless of whether the marks
17045 stored in the filesystem say so.  @code{never-marks} overrides
17046 @code{always-marks}.  This is a proof-of-concept feature that will
17047 probably be removed eventually; it ought to be done in Gnus proper, or
17048 abandoned if it's not worthwhile.
17049
17050 @item nov-cache-size
17051 An integer specifying the size of the @acronym{NOV} memory cache.  To
17052 speed things up, @code{nnmaildir} keeps @acronym{NOV} data in memory
17053 for a limited number of articles in each group.  (This is probably not
17054 worthwhile, and will probably be removed in the future.)  This
17055 parameter's value is noticed only the first time a group is seen after
17056 the server is opened---i.e., when you first start Gnus, typically.
17057 The @acronym{NOV} cache is never resized until the server is closed
17058 and reopened.  The default is an estimate of the number of articles
17059 that would be displayed in the summary buffer: a count of articles
17060 that are either marked with @code{tick} or not marked with
17061 @code{read}, plus a little extra.
17062 @end table
17063
17064 @subsubsection Article identification
17065 Articles are stored in the @file{cur/} subdirectory of each maildir.
17066 Each article file is named like @code{uniq:info}, where @code{uniq}
17067 contains no colons.  @code{nnmaildir} ignores, but preserves, the
17068 @code{:info} part.  (Other maildir readers typically use this part of
17069 the filename to store marks.)  The @code{uniq} part uniquely
17070 identifies the article, and is used in various places in the
17071 @file{.nnmaildir/} subdirectory of the maildir to store information
17072 about the corresponding article.  The full pathname of an article is
17073 available in the variable @code{nnmaildir-article-file-name} after you
17074 request the article in the summary buffer.
17075
17076 @subsubsection NOV data
17077 An article identified by @code{uniq} has its @acronym{NOV} data (used
17078 to generate lines in the summary buffer) stored in
17079 @code{.nnmaildir/nov/uniq}.  There is no
17080 @code{nnmaildir-generate-nov-databases} function.  (There isn't much
17081 need for it---an article's @acronym{NOV} data is updated automatically
17082 when the article or @code{nnmail-extra-headers} has changed.)  You can
17083 force @code{nnmaildir} to regenerate the @acronym{NOV} data for a
17084 single article simply by deleting the corresponding @acronym{NOV}
17085 file, but @emph{beware}: this will also cause @code{nnmaildir} to
17086 assign a new article number for this article, which may cause trouble
17087 with @code{seen} marks, the Agent, and the cache.
17088
17089 @subsubsection Article marks
17090 An article identified by @code{uniq} is considered to have the mark
17091 @code{flag} when the file @file{.nnmaildir/marks/flag/uniq} exists.
17092 When Gnus asks @code{nnmaildir} for a group's marks, @code{nnmaildir}
17093 looks for such files and reports the set of marks it finds.  When Gnus
17094 asks @code{nnmaildir} to store a new set of marks, @code{nnmaildir}
17095 creates and deletes the corresponding files as needed.  (Actually,
17096 rather than create a new file for each mark, it just creates hard
17097 links to @file{.nnmaildir/markfile}, to save inodes.)
17098
17099 You can invent new marks by creating a new directory in
17100 @file{.nnmaildir/marks/}.  You can tar up a maildir and remove it from
17101 your server, untar it later, and keep your marks.  You can add and
17102 remove marks yourself by creating and deleting mark files.  If you do
17103 this while Gnus is running and your @code{nnmaildir} server is open,
17104 it's best to exit all summary buffers for @code{nnmaildir} groups and
17105 type @kbd{s} in the group buffer first, and to type @kbd{g} or
17106 @kbd{M-g} in the group buffer afterwards.  Otherwise, Gnus might not
17107 pick up the changes, and might undo them.
17108
17109
17110 @node Mail Folders
17111 @subsubsection Mail Folders
17112 @cindex nnfolder
17113 @cindex mbox folders
17114 @cindex mail folders
17115
17116 @code{nnfolder} is a back end for storing each mail group in a
17117 separate file.  Each file is in the standard Un*x mbox format.
17118 @code{nnfolder} will add extra headers to keep track of article
17119 numbers and arrival dates.
17120
17121 @cindex self contained nnfolder servers
17122 @cindex marks
17123 When the marks file is used (which it is by default), @code{nnfolder}
17124 servers have the property that you may backup them using @code{tar} or
17125 similar, and later be able to restore them into Gnus (by adding the
17126 proper @code{nnfolder} server) and have all your marks be preserved.
17127 Marks for a group are usually stored in a file named as the mbox file
17128 with @code{.mrk} concatenated to it (but see
17129 @code{nnfolder-marks-file-suffix}) within the @code{nnfolder}
17130 directory.  Individual @code{nnfolder} groups are also possible to
17131 backup, use @kbd{G m} to restore the group (after restoring the backup
17132 into the @code{nnfolder} directory).
17133
17134 Virtual server settings:
17135
17136 @table @code
17137 @item nnfolder-directory
17138 @vindex nnfolder-directory
17139 All the @code{nnfolder} mail boxes will be stored under this
17140 directory.  The default is the value of @code{message-directory}
17141 (whose default is @file{~/Mail})
17142
17143 @item nnfolder-active-file
17144 @vindex nnfolder-active-file
17145 The name of the active file.  The default is @file{~/Mail/active}.
17146
17147 @item nnfolder-newsgroups-file
17148 @vindex nnfolder-newsgroups-file
17149 The name of the group descriptions file.  @xref{Newsgroups File
17150 Format}.  The default is @file{~/Mail/newsgroups}
17151
17152 @item nnfolder-get-new-mail
17153 @vindex nnfolder-get-new-mail
17154 If non-@code{nil}, @code{nnfolder} will read incoming mail.  The
17155 default is @code{t}
17156
17157 @item nnfolder-save-buffer-hook
17158 @vindex nnfolder-save-buffer-hook
17159 @cindex backup files
17160 Hook run before saving the folders.  Note that Emacs does the normal
17161 backup renaming of files even with the @code{nnfolder} buffers.  If
17162 you wish to switch this off, you could say something like the
17163 following in your @file{.emacs} file:
17164
17165 @lisp
17166 (defun turn-off-backup ()
17167   (set (make-local-variable 'backup-inhibited) t))
17168
17169 (add-hook 'nnfolder-save-buffer-hook 'turn-off-backup)
17170 @end lisp
17171
17172 @item nnfolder-delete-mail-hook
17173 @vindex nnfolder-delete-mail-hook
17174 Hook run in a buffer narrowed to the message that is to be deleted.
17175 This function can be used to copy the message to somewhere else, or to
17176 extract some information from it before removing it.
17177
17178 @item nnfolder-nov-is-evil
17179 @vindex nnfolder-nov-is-evil
17180 If non-@code{nil}, this back end will ignore any @acronym{NOV} files.  The
17181 default is @code{nil}.
17182
17183 @item nnfolder-nov-file-suffix
17184 @vindex nnfolder-nov-file-suffix
17185 The extension for @acronym{NOV} files.  The default is @file{.nov}.
17186
17187 @item nnfolder-nov-directory
17188 @vindex nnfolder-nov-directory
17189 The directory where the @acronym{NOV} files should be stored.  If
17190 @code{nil}, @code{nnfolder-directory} is used.
17191
17192 @item nnfolder-marks-is-evil
17193 @vindex nnfolder-marks-is-evil
17194 If non-@code{nil}, this back end will ignore any @sc{marks} files.  The
17195 default is @code{nil}.
17196
17197 @item nnfolder-marks-file-suffix
17198 @vindex nnfolder-marks-file-suffix
17199 The extension for @sc{marks} files.  The default is @file{.mrk}.
17200
17201 @item nnfolder-marks-directory
17202 @vindex nnfolder-marks-directory
17203 The directory where the @sc{marks} files should be stored.  If
17204 @code{nil}, @code{nnfolder-directory} is used.
17205
17206 @end table
17207
17208
17209 @findex nnfolder-generate-active-file
17210 @kindex M-x nnfolder-generate-active-file
17211 If you have lots of @code{nnfolder}-like files you'd like to read with
17212 @code{nnfolder}, you can use the @kbd{M-x nnfolder-generate-active-file}
17213 command to make @code{nnfolder} aware of all likely files in
17214 @code{nnfolder-directory}.  This only works if you use long file names,
17215 though.
17216
17217 @node Comparing Mail Back Ends
17218 @subsubsection Comparing Mail Back Ends
17219
17220 First, just for terminology, the @dfn{back end} is the common word for a
17221 low-level access method---a transport, if you will, by which something
17222 is acquired.  The sense is that one's mail has to come from somewhere,
17223 and so selection of a suitable back end is required in order to get that
17224 mail within spitting distance of Gnus.
17225
17226 The same concept exists for Usenet itself: Though access to articles is
17227 typically done by @acronym{NNTP} these days, once upon a midnight dreary, everyone
17228 in the world got at Usenet by running a reader on the machine where the
17229 articles lay (the machine which today we call an @acronym{NNTP} server), and
17230 access was by the reader stepping into the articles' directory spool
17231 area directly.  One can still select between either the @code{nntp} or
17232 @code{nnspool} back ends, to select between these methods, if one happens
17233 actually to live on the server (or can see its spool directly, anyway,
17234 via NFS).
17235
17236 The goal in selecting a mail back end is to pick one which
17237 simultaneously represents a suitable way of dealing with the original
17238 format plus leaving mail in a form that is convenient to use in the
17239 future.  Here are some high and low points on each:
17240
17241 @table @code
17242 @item nnmbox
17243
17244 UNIX systems have historically had a single, very common, and well-
17245 defined format.  All messages arrive in a single @dfn{spool file}, and
17246 they are delineated by a line whose regular expression matches
17247 @samp{^From_}.  (My notational use of @samp{_} is to indicate a space,
17248 to make it clear in this instance that this is not the RFC-specified
17249 @samp{From:} header.)  Because Emacs and therefore Gnus emanate
17250 historically from the Unix environment, it is simplest if one does not
17251 mess a great deal with the original mailbox format, so if one chooses
17252 this back end, Gnus' primary activity in getting mail from the real spool
17253 area to Gnus' preferred directory is simply to copy it, with no
17254 (appreciable) format change in the process.  It is the ``dumbest'' way
17255 to move mail into availability in the Gnus environment.  This makes it
17256 fast to move into place, but slow to parse, when Gnus has to look at
17257 what's where.
17258
17259 @item nnbabyl
17260
17261 Once upon a time, there was the DEC-10 and DEC-20, running operating
17262 systems called TOPS and related things, and the usual (only?) mail
17263 reading environment was a thing called Babyl.  I don't know what format
17264 was used for mail landing on the system, but Babyl had its own internal
17265 format to which mail was converted, primarily involving creating a
17266 spool-file-like entity with a scheme for inserting Babyl-specific
17267 headers and status bits above the top of each message in the file.
17268 Rmail was Emacs' first mail reader, it was written by Richard Stallman,
17269 and Stallman came out of that TOPS/Babyl environment, so he wrote Rmail
17270 to understand the mail files folks already had in existence.  Gnus (and
17271 VM, for that matter) continue to support this format because it's
17272 perceived as having some good qualities in those mailer-specific
17273 headers/status bits stuff.  Rmail itself still exists as well, of
17274 course, and is still maintained within Emacs.  Since Emacs 23, it
17275 uses standard mbox format rather than Babyl.
17276
17277 Both of the above forms leave your mail in a single file on your
17278 file system, and they must parse that entire file each time you take a
17279 look at your mail.
17280
17281 @item nnml
17282
17283 @code{nnml} is the back end which smells the most as though you were
17284 actually operating with an @code{nnspool}-accessed Usenet system.  (In
17285 fact, I believe @code{nnml} actually derived from @code{nnspool} code,
17286 lo these years ago.)  One's mail is taken from the original spool file,
17287 and is then cut up into individual message files, 1:1.  It maintains a
17288 Usenet-style active file (analogous to what one finds in an INN- or
17289 CNews-based news system in (for instance) @file{/var/lib/news/active},
17290 or what is returned via the @samp{NNTP LIST} verb) and also creates
17291 @dfn{overview} files for efficient group entry, as has been defined for
17292 @acronym{NNTP} servers for some years now.  It is slower in mail-splitting,
17293 due to the creation of lots of files, updates to the @code{nnml} active
17294 file, and additions to overview files on a per-message basis, but it is
17295 extremely fast on access because of what amounts to the indexing support
17296 provided by the active file and overviews.
17297
17298 @code{nnml} costs @dfn{inodes} in a big way; that is, it soaks up the
17299 resource which defines available places in the file system to put new
17300 files.  Sysadmins take a dim view of heavy inode occupation within
17301 tight, shared file systems.  But if you live on a personal machine where
17302 the file system is your own and space is not at a premium, @code{nnml}
17303 wins big.
17304
17305 It is also problematic using this back end if you are living in a
17306 FAT16-based Windows world, since much space will be wasted on all these
17307 tiny files.
17308
17309 @item nnmh
17310
17311 The Rand MH mail-reading system has been around UNIX systems for a very
17312 long time; it operates by splitting one's spool file of messages into
17313 individual files, but with little or no indexing support---@code{nnmh}
17314 is considered to be semantically equivalent to ``@code{nnml} without
17315 active file or overviews''.  This is arguably the worst choice, because
17316 one gets the slowness of individual file creation married to the
17317 slowness of access parsing when learning what's new in one's groups.
17318
17319 @item nnfolder
17320
17321 Basically the effect of @code{nnfolder} is @code{nnmbox} (the first
17322 method described above) on a per-group basis.  That is, @code{nnmbox}
17323 itself puts @emph{all} one's mail in one file; @code{nnfolder} provides a
17324 little bit of optimization to this so that each of one's mail groups has
17325 a Unix mail box file.  It's faster than @code{nnmbox} because each group
17326 can be parsed separately, and still provides the simple Unix mail box
17327 format requiring minimal effort in moving the mail around.  In addition,
17328 it maintains an ``active'' file making it much faster for Gnus to figure
17329 out how many messages there are in each separate group.
17330
17331 If you have groups that are expected to have a massive amount of
17332 messages, @code{nnfolder} is not the best choice, but if you receive
17333 only a moderate amount of mail, @code{nnfolder} is probably the most
17334 friendly mail back end all over.
17335
17336 @item nnmaildir
17337
17338 For configuring expiry and other things, @code{nnmaildir} uses
17339 incompatible group parameters, slightly different from those of other
17340 mail back ends.
17341
17342 @code{nnmaildir} is largely similar to @code{nnml}, with some notable
17343 differences.  Each message is stored in a separate file, but the
17344 filename is unrelated to the article number in Gnus.  @code{nnmaildir}
17345 also stores the equivalent of @code{nnml}'s overview files in one file
17346 per article, so it uses about twice as many inodes as @code{nnml}.  (Use
17347 @code{df -i} to see how plentiful your inode supply is.)  If this slows
17348 you down or takes up very much space, consider switching to
17349 @uref{http://www.namesys.com/, ReiserFS} or another non-block-structured
17350 file system.
17351
17352 Since maildirs don't require locking for delivery, the maildirs you use
17353 as groups can also be the maildirs your mail is directly delivered to.
17354 This means you can skip Gnus' mail splitting if your mail is already
17355 organized into different mailboxes during delivery.  A @code{directory}
17356 entry in @code{mail-sources} would have a similar effect, but would
17357 require one set of mailboxes for spooling deliveries (in mbox format,
17358 thus damaging message bodies), and another set to be used as groups (in
17359 whatever format you like).  A maildir has a built-in spool, in the
17360 @code{new/} subdirectory.  Beware that currently, mail moved from
17361 @code{new/} to @code{cur/} instead of via mail splitting will not
17362 undergo treatment such as duplicate checking.
17363
17364 @code{nnmaildir} stores article marks for a given group in the
17365 corresponding maildir, in a way designed so that it's easy to manipulate
17366 them from outside Gnus.  You can tar up a maildir, unpack it somewhere
17367 else, and still have your marks.  @code{nnml} also stores marks, but
17368 it's not as easy to work with them from outside Gnus as with
17369 @code{nnmaildir}.
17370
17371 @code{nnmaildir} uses a significant amount of memory to speed things up.
17372 (It keeps in memory some of the things that @code{nnml} stores in files
17373 and that @code{nnmh} repeatedly parses out of message files.)  If this
17374 is a problem for you, you can set the @code{nov-cache-size} group
17375 parameter to something small (0 would probably not work, but 1 probably
17376 would) to make it use less memory.  This caching will probably be
17377 removed in the future.
17378
17379 Startup is likely to be slower with @code{nnmaildir} than with other
17380 back ends.  Everything else is likely to be faster, depending in part
17381 on your file system.
17382
17383 @code{nnmaildir} does not use @code{nnoo}, so you cannot use @code{nnoo}
17384 to write an @code{nnmaildir}-derived back end.
17385
17386 @end table
17387
17388
17389 @node Browsing the Web
17390 @section Browsing the Web
17391 @cindex web
17392 @cindex browsing the web
17393 @cindex www
17394 @cindex http
17395
17396 Web-based discussion forums are getting more and more popular.  On many
17397 subjects, the web-based forums have become the most important forums,
17398 eclipsing the importance of mailing lists and news groups.  The reason
17399 is easy to understand---they are friendly to new users; you just point
17400 and click, and there's the discussion.  With mailing lists, you have to
17401 go through a cumbersome subscription procedure, and most people don't
17402 even know what a news group is.
17403
17404 The problem with this scenario is that web browsers are not very good at
17405 being newsreaders.  They do not keep track of what articles you've read;
17406 they do not allow you to score on subjects you're interested in; they do
17407 not allow off-line browsing; they require you to click around and drive
17408 you mad in the end.
17409
17410 So---if web browsers suck at reading discussion forums, why not use Gnus
17411 to do it instead?
17412
17413 Gnus has been getting a bit of a collection of back ends for providing
17414 interfaces to these sources.
17415
17416 @menu
17417 * Archiving Mail::
17418 * Web Searches::                Creating groups from articles that match a string.
17419 * Ultimate::                    The Ultimate Bulletin Board systems.
17420 * Web Archive::                 Reading mailing list archived on web.
17421 * RSS::                         Reading RDF site summary.
17422 * Customizing W3::              Doing stuff to Emacs/W3 from Gnus.
17423 @end menu
17424
17425 All the web sources require Emacs/W3 and the url library or those
17426 alternatives to work.
17427
17428 The main caveat with all these web sources is that they probably won't
17429 work for a very long time.  Gleaning information from the @acronym{HTML} data
17430 is guesswork at best, and when the layout is altered, the Gnus back end
17431 will fail.  If you have reasonably new versions of these back ends,
17432 though, you should be ok.
17433
17434 One thing all these Web methods have in common is that the Web sources
17435 are often down, unavailable or just plain too slow to be fun.  In those
17436 cases, it makes a lot of sense to let the Gnus Agent (@pxref{Gnus
17437 Unplugged}) handle downloading articles, and then you can read them at
17438 leisure from your local disk.  No more World Wide Wait for you.
17439
17440 @node Archiving Mail
17441 @subsection Archiving Mail
17442 @cindex archiving mail
17443 @cindex backup of mail
17444
17445 Some of the back ends, notably @code{nnml}, @code{nnfolder}, and
17446 @code{nnmaildir}, now actually store the article marks with each group.
17447 For these servers, archiving and restoring a group while preserving
17448 marks is fairly simple.
17449
17450 (Preserving the group level and group parameters as well still
17451 requires ritual dancing and sacrifices to the @file{.newsrc.eld} deity
17452 though.)
17453
17454 To archive an entire @code{nnml}, @code{nnfolder}, or @code{nnmaildir}
17455 server, take a recursive copy of the server directory.  There is no need
17456 to shut down Gnus, so archiving may be invoked by @code{cron} or
17457 similar.  You restore the data by restoring the directory tree, and
17458 adding a server definition pointing to that directory in Gnus.  The
17459 @ref{Article Backlog}, @ref{Asynchronous Fetching} and other things
17460 might interfere with overwriting data, so you may want to shut down Gnus
17461 before you restore the data.
17462
17463 It is also possible to archive individual @code{nnml},
17464 @code{nnfolder}, or @code{nnmaildir} groups, while preserving marks.
17465 For @code{nnml} or @code{nnmaildir}, you copy all files in the group's
17466 directory.  For @code{nnfolder} you need to copy both the base folder
17467 file itself (@file{FOO}, say), and the marks file (@file{FOO.mrk} in
17468 this example).  Restoring the group is done with @kbd{G m} from the Group
17469 buffer.  The last step makes Gnus notice the new directory.
17470 @code{nnmaildir} notices the new directory automatically, so @kbd{G m}
17471 is unnecessary in that case.
17472
17473 @node Web Searches
17474 @subsection Web Searches
17475 @cindex nnweb
17476 @cindex Google
17477 @cindex dejanews
17478 @cindex gmane
17479 @cindex Usenet searches
17480 @cindex searching the Usenet
17481
17482 It's, like, too neat to search the Usenet for articles that match a
17483 string, but it, like, totally @emph{sucks}, like, totally, to use one of
17484 those, like, Web browsers, and you, like, have to, rilly, like, look at
17485 the commercials, so, like, with Gnus you can do @emph{rad}, rilly,
17486 searches without having to use a browser.
17487
17488 The @code{nnweb} back end allows an easy interface to the mighty search
17489 engine.  You create an @code{nnweb} group, enter a search pattern, and
17490 then enter the group and read the articles like you would any normal
17491 group.  The @kbd{G w} command in the group buffer (@pxref{Foreign
17492 Groups}) will do this in an easy-to-use fashion.
17493
17494 @code{nnweb} groups don't really lend themselves to being solid
17495 groups---they have a very fleeting idea of article numbers.  In fact,
17496 each time you enter an @code{nnweb} group (not even changing the search
17497 pattern), you are likely to get the articles ordered in a different
17498 manner.  Not even using duplicate suppression (@pxref{Duplicate
17499 Suppression}) will help, since @code{nnweb} doesn't even know the
17500 @code{Message-ID} of the articles before reading them using some search
17501 engines (Google, for instance).  The only possible way to keep track
17502 of which articles you've read is by scoring on the @code{Date}
17503 header---mark all articles posted before the last date you read the
17504 group as read.
17505
17506 If the search engine changes its output substantially, @code{nnweb}
17507 won't be able to parse it and will fail.  One could hardly fault the Web
17508 providers if they were to do this---their @emph{raison d'@^etre} is to
17509 make money off of advertisements, not to provide services to the
17510 community.  Since @code{nnweb} washes the ads off all the articles, one
17511 might think that the providers might be somewhat miffed.  We'll see.
17512
17513 You must have the @code{url} and @code{W3} package or those alternatives
17514 (try @code{customize-group} on the @samp{mm-url} variable group)
17515 installed to be able to use @code{nnweb}.
17516
17517 Virtual server variables:
17518
17519 @table @code
17520 @item nnweb-type
17521 @vindex nnweb-type
17522 What search engine type is being used.  The currently supported types
17523 are @code{google}, @code{dejanews}, and @code{gmane}.  Note that
17524 @code{dejanews} is an alias to @code{google}.
17525
17526 @item nnweb-search
17527 @vindex nnweb-search
17528 The search string to feed to the search engine.
17529
17530 @item nnweb-max-hits
17531 @vindex nnweb-max-hits
17532 Advisory maximum number of hits per search to display.  The default is
17533 999.
17534
17535 @item nnweb-type-definition
17536 @vindex nnweb-type-definition
17537 Type-to-definition alist.  This alist says what @code{nnweb} should do
17538 with the various search engine types.  The following elements must be
17539 present:
17540
17541 @table @code
17542 @item article
17543 Function to decode the article and provide something that Gnus
17544 understands.
17545
17546 @item map
17547 Function to create an article number to message header and URL alist.
17548
17549 @item search
17550 Function to send the search string to the search engine.
17551
17552 @item address
17553 The address the aforementioned function should send the search string
17554 to.
17555
17556 @item id
17557 Format string URL to fetch an article by @code{Message-ID}.
17558 @end table
17559
17560 @end table
17561
17562
17563 @node Ultimate
17564 @subsection Ultimate
17565 @cindex nnultimate
17566 @cindex Ultimate Bulletin Board
17567
17568 @uref{http://www.ultimatebb.com/, The Ultimate Bulletin Board} is
17569 probably the most popular Web bulletin board system used.  It has a
17570 quite regular and nice interface, and it's possible to get the
17571 information Gnus needs to keep groups updated.
17572
17573 The easiest way to get started with @code{nnultimate} is to say
17574 something like the following in the group buffer:  @kbd{B nnultimate RET
17575 http://www.tcj.com/messboard/ubbcgi/ RET}.  (Substitute the @acronym{URL}
17576 (not including @samp{Ultimate.cgi} or the like at the end) for a forum
17577 you're interested in; there's quite a list of them on the Ultimate web
17578 site.)  Then subscribe to the groups you're interested in from the
17579 server buffer, and read them from the group buffer.
17580
17581 The following @code{nnultimate} variables can be altered:
17582
17583 @table @code
17584 @item nnultimate-directory
17585 @vindex nnultimate-directory
17586 The directory where @code{nnultimate} stores its files.  The default is@*
17587 @file{~/News/ultimate/}.
17588 @end table
17589
17590
17591 @node Web Archive
17592 @subsection Web Archive
17593 @cindex nnwarchive
17594 @cindex Web Archive
17595
17596 Some mailing lists only have archives on Web servers, such as
17597 @uref{http://www.egroups.com/} and
17598 @uref{http://www.mail-archive.com/}.  It has a quite regular and nice
17599 interface, and it's possible to get the information Gnus needs to keep
17600 groups updated.
17601
17602 @findex gnus-group-make-warchive-group
17603 The easiest way to get started with @code{nnwarchive} is to say
17604 something like the following in the group buffer: @kbd{M-x
17605 gnus-group-make-warchive-group RET @var{an_egroup} RET egroups RET
17606 www.egroups.com RET @var{your@@email.address} RET}.  (Substitute the
17607 @var{an_egroup} with the mailing list you subscribed, the
17608 @var{your@@email.address} with your email address.), or to browse the
17609 back end by @kbd{B nnwarchive RET mail-archive RET}.
17610
17611 The following @code{nnwarchive} variables can be altered:
17612
17613 @table @code
17614 @item nnwarchive-directory
17615 @vindex nnwarchive-directory
17616 The directory where @code{nnwarchive} stores its files.  The default is@*
17617 @file{~/News/warchive/}.
17618
17619 @item nnwarchive-login
17620 @vindex nnwarchive-login
17621 The account name on the web server.
17622
17623 @item nnwarchive-passwd
17624 @vindex nnwarchive-passwd
17625 The password for your account on the web server.
17626 @end table
17627
17628 @node RSS
17629 @subsection RSS
17630 @cindex nnrss
17631 @cindex RSS
17632
17633 Some web sites have an RDF Site Summary (@acronym{RSS}).
17634 @acronym{RSS} is a format for summarizing headlines from news related
17635 sites (such as BBC or CNN).  But basically anything list-like can be
17636 presented as an @acronym{RSS} feed: weblogs, changelogs or recent
17637 changes to a wiki (e.g. @url{http://cliki.net/recent-changes.rdf}).
17638
17639 @acronym{RSS} has a quite regular and nice interface, and it's
17640 possible to get the information Gnus needs to keep groups updated.
17641
17642 Note: you had better use Emacs which supports the @code{utf-8} coding
17643 system because @acronym{RSS} uses UTF-8 for encoding non-@acronym{ASCII}
17644 text by default.  It is also used by default for non-@acronym{ASCII}
17645 group names.
17646
17647 @kindex G R (Group)
17648 Use @kbd{G R} from the group buffer to subscribe to a feed---you will be
17649 prompted for the location, the title and the description of the feed.
17650 The title, which allows any characters, will be used for the group name
17651 and the name of the group data file.  The description can be omitted.
17652
17653 An easy way to get started with @code{nnrss} is to say something like
17654 the following in the group buffer: @kbd{B nnrss RET RET y}, then
17655 subscribe to groups.
17656
17657 The @code{nnrss} back end saves the group data file in
17658 @code{nnrss-directory} (see below) for each @code{nnrss} group.  File
17659 names containing non-@acronym{ASCII} characters will be encoded by the
17660 coding system specified with the @code{nnmail-pathname-coding-system}
17661 variable or other.  Also @xref{Non-ASCII Group Names}, for more
17662 information.
17663
17664 The @code{nnrss} back end generates @samp{multipart/alternative}
17665 @acronym{MIME} articles in which each contains a @samp{text/plain} part
17666 and a @samp{text/html} part.
17667
17668 @cindex OPML
17669 You can also use the following commands to import and export your
17670 subscriptions from a file in @acronym{OPML} format (Outline Processor
17671 Markup Language).
17672
17673 @defun nnrss-opml-import file
17674 Prompt for an @acronym{OPML} file, and subscribe to each feed in the
17675 file.
17676 @end defun
17677
17678 @defun nnrss-opml-export
17679 Write your current @acronym{RSS} subscriptions to a buffer in
17680 @acronym{OPML} format.
17681 @end defun
17682
17683 The following @code{nnrss} variables can be altered:
17684
17685 @table @code
17686 @item nnrss-directory
17687 @vindex nnrss-directory
17688 The directory where @code{nnrss} stores its files.  The default is
17689 @file{~/News/rss/}.
17690
17691 @item nnrss-file-coding-system
17692 @vindex nnrss-file-coding-system
17693 The coding system used when reading and writing the @code{nnrss} groups
17694 data files.  The default is the value of
17695 @code{mm-universal-coding-system} (which defaults to @code{emacs-mule}
17696 in Emacs or @code{escape-quoted} in XEmacs).
17697
17698 @item nnrss-ignore-article-fields
17699 @vindex nnrss-ignore-article-fields
17700 Some feeds update constantly article fields during their publications,
17701 e.g. to indicate the number of comments.  However, if there is
17702 a difference between the local article and the distant one, the latter
17703 is considered to be new.  To avoid this and discard some fields, set this
17704 variable to the list of fields to be ignored.  The default is
17705 @code{'(slash:comments)}.
17706
17707 @item nnrss-use-local
17708 @vindex nnrss-use-local
17709 @findex nnrss-generate-download-script
17710 If you set @code{nnrss-use-local} to @code{t}, @code{nnrss} will read
17711 the feeds from local files in @code{nnrss-directory}.  You can use
17712 the command @code{nnrss-generate-download-script} to generate a
17713 download script using @command{wget}.
17714
17715 @item nnrss-wash-html-in-text-plain-parts
17716 Non-@code{nil} means that @code{nnrss} renders text in @samp{text/plain}
17717 parts as @acronym{HTML}.  The function specified by the
17718 @code{mm-text-html-renderer} variable (@pxref{Display Customization,
17719 ,Display Customization, emacs-mime, The Emacs MIME Manual}) will be used
17720 to render text.  If it is @code{nil}, which is the default, text will
17721 simply be folded.  Leave it @code{nil} if you prefer to see
17722 @samp{text/html} parts.
17723 @end table
17724
17725 The following code may be helpful, if you want to show the description in
17726 the summary buffer.
17727
17728 @lisp
17729 (add-to-list 'nnmail-extra-headers nnrss-description-field)
17730 (setq gnus-summary-line-format "%U%R%z%I%(%[%4L: %-15,15f%]%) %s%uX\n")
17731
17732 (defun gnus-user-format-function-X (header)
17733   (let ((descr
17734          (assq nnrss-description-field (mail-header-extra header))))
17735     (if descr (concat "\n\t" (cdr descr)) "")))
17736 @end lisp
17737
17738 The following code may be useful to open an nnrss url directly from the
17739 summary buffer.
17740
17741 @lisp
17742 (require 'browse-url)
17743
17744 (defun browse-nnrss-url (arg)
17745   (interactive "p")
17746   (let ((url (assq nnrss-url-field
17747                    (mail-header-extra
17748                     (gnus-data-header
17749                      (assq (gnus-summary-article-number)
17750                            gnus-newsgroup-data))))))
17751     (if url
17752         (progn
17753           (browse-url (cdr url))
17754           (gnus-summary-mark-as-read-forward 1))
17755       (gnus-summary-scroll-up arg))))
17756
17757 (eval-after-load "gnus"
17758   #'(define-key gnus-summary-mode-map
17759       (kbd "<RET>") 'browse-nnrss-url))
17760 (add-to-list 'nnmail-extra-headers nnrss-url-field)
17761 @end lisp
17762
17763 Even if you have added @samp{text/html} to the
17764 @code{mm-discouraged-alternatives} variable (@pxref{Display
17765 Customization, ,Display Customization, emacs-mime, The Emacs MIME
17766 Manual}) since you don't want to see @acronym{HTML} parts, it might be
17767 more useful especially in @code{nnrss} groups to display
17768 @samp{text/html} parts.  Here's an example of setting
17769 @code{mm-discouraged-alternatives} as a group parameter (@pxref{Group
17770 Parameters}) in order to display @samp{text/html} parts only in
17771 @code{nnrss} groups:
17772
17773 @lisp
17774 ;; @r{Set the default value of @code{mm-discouraged-alternatives}.}
17775 (eval-after-load "gnus-sum"
17776   '(add-to-list
17777     'gnus-newsgroup-variables
17778     '(mm-discouraged-alternatives
17779       . '("text/html" "image/.*"))))
17780
17781 ;; @r{Display @samp{text/html} parts in @code{nnrss} groups.}
17782 (add-to-list
17783  'gnus-parameters
17784  '("\\`nnrss:" (mm-discouraged-alternatives nil)))
17785 @end lisp
17786
17787
17788 @node Customizing W3
17789 @subsection Customizing W3
17790 @cindex W3
17791 @cindex html
17792 @cindex url
17793 @cindex Netscape
17794
17795 Gnus uses the url library to fetch web pages and Emacs/W3 (or those
17796 alternatives) to display web pages.  Emacs/W3 is documented in its own
17797 manual, but there are some things that may be more relevant for Gnus
17798 users.
17799
17800 For instance, a common question is how to make Emacs/W3 follow links
17801 using the @code{browse-url} functions (which will call some external web
17802 browser like Netscape).  Here's one way:
17803
17804 @lisp
17805 (eval-after-load "w3"
17806   '(progn
17807     (fset 'w3-fetch-orig (symbol-function 'w3-fetch))
17808     (defun w3-fetch (&optional url target)
17809       (interactive (list (w3-read-url-with-default)))
17810       (if (eq major-mode 'gnus-article-mode)
17811           (browse-url url)
17812         (w3-fetch-orig url target)))))
17813 @end lisp
17814
17815 Put that in your @file{.emacs} file, and hitting links in W3-rendered
17816 @acronym{HTML} in the Gnus article buffers will use @code{browse-url} to
17817 follow the link.
17818
17819
17820 @node IMAP
17821 @section IMAP
17822 @cindex nnimap
17823 @cindex @acronym{IMAP}
17824
17825 @acronym{IMAP} is a network protocol for reading mail (or news, or @dots{}),
17826 think of it as a modernized @acronym{NNTP}.  Connecting to a @acronym{IMAP}
17827 server is much similar to connecting to a news server, you just
17828 specify the network address of the server.
17829
17830 @acronym{IMAP} has two properties.  First, @acronym{IMAP} can do
17831 everything that @acronym{POP} can, it can hence be viewed as a
17832 @acronym{POP++}.  Secondly, @acronym{IMAP} is a mail storage protocol,
17833 similar to @acronym{NNTP} being a news storage protocol---however,
17834 @acronym{IMAP} offers more features than @acronym{NNTP} because news
17835 is more or less read-only whereas mail is read-write.
17836
17837 If you want to use @acronym{IMAP} as a @acronym{POP++}, use an imap
17838 entry in @code{mail-sources}.  With this, Gnus will fetch mails from
17839 the @acronym{IMAP} server and store them on the local disk.  This is
17840 not the usage described in this section---@xref{Mail Sources}.
17841
17842 If you want to use @acronym{IMAP} as a mail storage protocol, use an nnimap
17843 entry in @code{gnus-secondary-select-methods}.  With this, Gnus will
17844 manipulate mails stored on the @acronym{IMAP} server.  This is the kind of
17845 usage explained in this section.
17846
17847 A server configuration in @file{~/.gnus.el} with a few @acronym{IMAP}
17848 servers might look something like the following.  (Note that for
17849 @acronym{TLS}/@acronym{SSL}, you need external programs and libraries,
17850 see below.)
17851
17852 @lisp
17853 (setq gnus-secondary-select-methods
17854       '((nnimap "simpleserver") ; @r{no special configuration}
17855         ; @r{perhaps a ssh port forwarded server:}
17856         (nnimap "dolk"
17857                 (nnimap-address "localhost")
17858                 (nnimap-server-port 1430))
17859         ; @r{a UW server running on localhost}
17860         (nnimap "barbar"
17861                 (nnimap-server-port 143)
17862                 (nnimap-address "localhost")
17863                 (nnimap-list-pattern ("INBOX" "mail/*")))
17864         ; @r{anonymous public cyrus server:}
17865         (nnimap "cyrus.andrew.cmu.edu"
17866                 (nnimap-authenticator anonymous)
17867                 (nnimap-list-pattern "archive.*")
17868                 (nnimap-stream network))
17869         ; @r{a ssl server on a non-standard port:}
17870         (nnimap "vic20"
17871                 (nnimap-address "vic20.somewhere.com")
17872                 (nnimap-server-port 9930)
17873                 (nnimap-stream ssl))))
17874 @end lisp
17875
17876 After defining the new server, you can subscribe to groups on the
17877 server using normal Gnus commands such as @kbd{U} in the Group Buffer
17878 (@pxref{Subscription Commands}) or via the Server Buffer
17879 (@pxref{Server Buffer}).
17880
17881 The following variables can be used to create a virtual @code{nnimap}
17882 server:
17883
17884 @table @code
17885
17886 @item nnimap-address
17887 @vindex nnimap-address
17888
17889 The address of the remote @acronym{IMAP} server.  Defaults to the virtual
17890 server name if not specified.
17891
17892 @item nnimap-server-port
17893 @vindex nnimap-server-port
17894 Port on server to contact.  Defaults to port 143, or 993 for @acronym{TLS}/@acronym{SSL}.
17895
17896 Note that this should be an integer, example server specification:
17897
17898 @lisp
17899 (nnimap "mail.server.com"
17900         (nnimap-server-port 4711))
17901 @end lisp
17902
17903 @item nnimap-list-pattern
17904 @vindex nnimap-list-pattern
17905 String or list of strings of mailboxes to limit available groups to.
17906 This is used when the server has very many mailboxes and you're only
17907 interested in a few---some servers export your home directory via
17908 @acronym{IMAP}, you'll probably want to limit the mailboxes to those in
17909 @file{~/Mail/*} then.
17910
17911 The string can also be a cons of REFERENCE and the string as above, what
17912 REFERENCE is used for is server specific, but on the University of
17913 Washington server it's a directory that will be concatenated with the
17914 mailbox.
17915
17916 Example server specification:
17917
17918 @lisp
17919 (nnimap "mail.server.com"
17920         (nnimap-list-pattern ("INBOX" "Mail/*" "alt.sex.*"
17921                                ("~friend/Mail/" . "list/*"))))
17922 @end lisp
17923
17924 @item nnimap-stream
17925 @vindex nnimap-stream
17926 The type of stream used to connect to your server.  By default, nnimap
17927 will detect and automatically use all of the below, with the exception
17928 of @acronym{TLS}/@acronym{SSL}.  (@acronym{IMAP} over
17929 @acronym{TLS}/@acronym{SSL} is being replaced by STARTTLS, which can
17930 be automatically detected, but it's not widely deployed yet.)
17931
17932 Example server specification:
17933
17934 @lisp
17935 (nnimap "mail.server.com"
17936         (nnimap-stream ssl))
17937 @end lisp
17938
17939 Please note that the value of @code{nnimap-stream} is a symbol!
17940
17941 @itemize @bullet
17942 @item
17943 @dfn{gssapi:} Connect with GSSAPI (usually Kerberos 5).  Requires the
17944 @samp{gsasl} or @samp{imtest} program.
17945 @item
17946 @dfn{kerberos4:} Connect with Kerberos 4.  Requires the @samp{imtest} program.
17947 @item
17948 @dfn{starttls:} Connect via the STARTTLS extension (similar to
17949 @acronym{TLS}/@acronym{SSL}).  Requires the external library @samp{starttls.el} and program
17950 @samp{starttls}.
17951 @item
17952 @dfn{tls:} Connect through @acronym{TLS}.  Requires GNUTLS (the program
17953 @samp{gnutls-cli}).
17954 @item
17955 @dfn{ssl:} Connect through @acronym{SSL}.  Requires OpenSSL (the program
17956 @samp{openssl}) or SSLeay (@samp{s_client}).
17957 @item
17958 @dfn{shell:} Use a shell command to start @acronym{IMAP} connection.
17959 @item
17960 @dfn{network:} Plain, TCP/IP network connection.
17961 @end itemize
17962
17963 @vindex imap-kerberos4-program
17964 The @samp{imtest} program is shipped with Cyrus IMAPD.  If you're
17965 using @samp{imtest} from Cyrus IMAPD < 2.0.14 (which includes version
17966 1.5.x and 1.6.x) you need to frob @code{imap-process-connection-type}
17967 to make @code{imap.el} use a pty instead of a pipe when communicating
17968 with @samp{imtest}.  You will then suffer from a line length
17969 restrictions on @acronym{IMAP} commands, which might make Gnus seem to hang
17970 indefinitely if you have many articles in a mailbox.  The variable
17971 @code{imap-kerberos4-program} contain parameters to pass to the imtest
17972 program.
17973
17974 For @acronym{TLS} connection, the @code{gnutls-cli} program from GNUTLS is
17975 needed.  It is available from
17976 @uref{http://www.gnu.org/software/gnutls/}.
17977
17978 @vindex imap-gssapi-program
17979 This parameter specifies a list of command lines that invoke a GSSAPI
17980 authenticated @acronym{IMAP} stream in a subshell.  They are tried
17981 sequentially until a connection is made, or the list has been
17982 exhausted.  By default, @samp{gsasl} from GNU SASL, available from
17983 @uref{http://www.gnu.org/software/gsasl/}, and the @samp{imtest}
17984 program from Cyrus IMAPD (see @code{imap-kerberos4-program}), are
17985 tried.
17986
17987 @vindex imap-ssl-program
17988 For @acronym{SSL} connections, the OpenSSL program is available from
17989 @uref{http://www.openssl.org/}.  OpenSSL was formerly known as SSLeay,
17990 and nnimap support it too---although the most recent versions of
17991 SSLeay, 0.9.x, are known to have serious bugs making it
17992 useless.  Earlier versions, especially 0.8.x, of SSLeay are known to
17993 work.  The variable @code{imap-ssl-program} contain parameters to pass
17994 to OpenSSL/SSLeay.
17995
17996 @vindex imap-shell-program
17997 @vindex imap-shell-host
17998 For @acronym{IMAP} connections using the @code{shell} stream, the
17999 variable @code{imap-shell-program} specify what program to call.  Make
18000 sure nothing is interfering with the output of the program, e.g., don't
18001 forget to redirect the error output to the void.
18002
18003 @item nnimap-authenticator
18004 @vindex nnimap-authenticator
18005
18006 The authenticator used to connect to the server.  By default, nnimap
18007 will use the most secure authenticator your server is capable of.
18008
18009 Example server specification:
18010
18011 @lisp
18012 (nnimap "mail.server.com"
18013         (nnimap-authenticator anonymous))
18014 @end lisp
18015
18016 Please note that the value of @code{nnimap-authenticator} is a symbol!
18017
18018 @itemize @bullet
18019 @item
18020 @dfn{gssapi:} GSSAPI (usually kerberos 5) authentication.  Requires
18021 external program @code{gsasl} or @code{imtest}.
18022 @item
18023 @dfn{kerberos4:} Kerberos 4 authentication.  Requires external program
18024 @code{imtest}.
18025 @item
18026 @dfn{digest-md5:} Encrypted username/password via DIGEST-MD5.  Requires
18027 external library @code{digest-md5.el}.
18028 @item
18029 @dfn{cram-md5:} Encrypted username/password via CRAM-MD5.
18030 @item
18031 @dfn{login:} Plain-text username/password via LOGIN.
18032 @item
18033 @dfn{anonymous:} Login as ``anonymous'', supplying your email address as password.
18034 @end itemize
18035
18036 @item nnimap-expunge-on-close
18037 @cindex expunging
18038 @vindex nnimap-expunge-on-close
18039 Unlike Parmenides the @acronym{IMAP} designers have decided things that
18040 don't exist actually do exist.  More specifically, @acronym{IMAP} has
18041 this concept of marking articles @code{Deleted} which doesn't actually
18042 delete them, and this (marking them @code{Deleted}, that is) is what
18043 nnimap does when you delete an article in Gnus (with @kbd{B DEL} or
18044 similar).
18045
18046 Since the articles aren't really removed when we mark them with the
18047 @code{Deleted} flag we'll need a way to actually delete them.  Feel like
18048 running in circles yet?
18049
18050 Traditionally, nnimap has removed all articles marked as @code{Deleted}
18051 when closing a mailbox but this is now configurable by this server
18052 variable.
18053
18054 The possible options are:
18055
18056 @table @code
18057
18058 @item always
18059 The default behavior, delete all articles marked as ``Deleted'' when
18060 closing a mailbox.
18061 @item never
18062 Never actually delete articles.  Currently there is no way of showing
18063 the articles marked for deletion in nnimap, but other @acronym{IMAP} clients
18064 may allow you to do this.  If you ever want to run the EXPUNGE command
18065 manually, @xref{Expunging mailboxes}.
18066 @item ask
18067 When closing mailboxes, nnimap will ask if you wish to expunge deleted
18068 articles or not.
18069
18070 @end table
18071
18072 @item nnimap-importantize-dormant
18073 @vindex nnimap-importantize-dormant
18074
18075 If non-@code{nil} (the default), marks dormant articles as ticked (as
18076 well), for other @acronym{IMAP} clients.  Within Gnus, dormant articles will
18077 naturally still (only) be marked as dormant.  This is to make dormant
18078 articles stand out, just like ticked articles, in other @acronym{IMAP}
18079 clients.  (In other words, Gnus has two ``Tick'' marks and @acronym{IMAP}
18080 has only one.)
18081
18082 Probably the only reason for frobbing this would be if you're trying
18083 enable per-user persistent dormant flags, using something like:
18084
18085 @lisp
18086 (setcdr (assq 'dormant nnimap-mark-to-flag-alist)
18087         (format "gnus-dormant-%s" (user-login-name)))
18088 (setcdr (assq 'dormant nnimap-mark-to-predicate-alist)
18089         (format "KEYWORD gnus-dormant-%s" (user-login-name)))
18090 @end lisp
18091
18092 In this case, you would not want the per-user dormant flag showing up
18093 as ticked for other users.
18094
18095 @item nnimap-expunge-search-string
18096 @cindex expunging
18097 @vindex nnimap-expunge-search-string
18098 @cindex expiring @acronym{IMAP} mail
18099
18100 This variable contain the @acronym{IMAP} search command sent to server when
18101 searching for articles eligible for expiring.  The default is
18102 @code{"UID %s NOT SINCE %s"}, where the first @code{%s} is replaced by
18103 UID set and the second @code{%s} is replaced by a date.
18104
18105 Probably the only useful value to change this to is
18106 @code{"UID %s NOT SENTSINCE %s"}, which makes nnimap use the Date: in
18107 messages instead of the internal article date.  See section 6.4.4 of
18108 RFC 2060 for more information on valid strings.
18109
18110 However, if @code{nnimap-search-uids-not-since-is-evil}
18111 is true, this variable has no effect since the search logic
18112 is reversed, as described below.
18113
18114 @item nnimap-authinfo-file
18115 @vindex nnimap-authinfo-file
18116
18117 A file containing credentials used to log in on servers.  The format is
18118 (almost) the same as the @code{ftp} @file{~/.netrc} file.  See the
18119 variable @code{nntp-authinfo-file} for exact syntax; also see
18120 @ref{NNTP}.  An example of an .authinfo line for an IMAP server, is:
18121
18122 @example
18123 machine students.uio.no login larsi password geheimnis port imap
18124 @end example
18125
18126 Note that it should be @code{port imap}, or @code{port 143}, if you
18127 use a @code{nnimap-stream} of @code{tls} or @code{ssl}, even if the
18128 actual port number used is port 993 for secured IMAP.  For
18129 convenience, Gnus will accept @code{port imaps} as a synonym of
18130 @code{port imap}.
18131
18132 @item nnimap-need-unselect-to-notice-new-mail
18133 @vindex nnimap-need-unselect-to-notice-new-mail
18134
18135 Unselect mailboxes before looking for new mail in them.  Some servers
18136 seem to need this under some circumstances; it was reported that
18137 Courier 1.7.1 did.
18138
18139 @item nnimap-nov-is-evil
18140 @vindex nnimap-nov-is-evil
18141 @cindex Courier @acronym{IMAP} server
18142 @cindex @acronym{NOV}
18143
18144 Never generate or use a local @acronym{NOV} database. Defaults to the
18145 value of @code{gnus-agent}.
18146
18147 Using a @acronym{NOV} database usually makes header fetching much
18148 faster, but it uses the @code{UID SEARCH UID} command, which is very
18149 slow on some servers (notably some versions of Courier). Since the Gnus
18150 Agent caches the information in the @acronym{NOV} database without using
18151 the slow command, this variable defaults to true if the Agent is in use,
18152 and false otherwise.
18153
18154 @item nnimap-search-uids-not-since-is-evil
18155 @vindex nnimap-search-uids-not-since-is-evil
18156 @cindex Courier @acronym{IMAP} server
18157 @cindex expiring @acronym{IMAP} mail
18158
18159 Avoid the @code{UID SEARCH UID @var{message numbers} NOT SINCE
18160 @var{date}} command, which is slow on some @acronym{IMAP} servers
18161 (notably, some versions of Courier). Instead, use @code{UID SEARCH SINCE
18162 @var{date}} and prune the list of expirable articles within Gnus.
18163
18164 When Gnus expires your mail (@pxref{Expiring Mail}), it starts with a
18165 list of expirable articles and asks the IMAP server questions like ``Of
18166 these articles, which ones are older than a week?'' While this seems
18167 like a perfectly reasonable question, some IMAP servers take a long time
18168 to answer it, since they seemingly go looking into every old article to
18169 see if it is one of the expirable ones. Curiously, the question ``Of
18170 @emph{all} articles, which ones are newer than a week?'' seems to be
18171 much faster to answer, so setting this variable causes Gnus to ask this
18172 question and figure out the answer to the real question itself.
18173
18174 This problem can really sneak up on you: when you first configure Gnus,
18175 everything works fine, but once you accumulate a couple thousand
18176 messages, you start cursing Gnus for being so slow. On the other hand,
18177 if you get a lot of email within a week, setting this variable will
18178 cause a lot of network traffic between Gnus and the IMAP server.
18179
18180 @item nnimap-logout-timeout
18181 @vindex nnimap-logout-timeout
18182
18183 There is a case where a connection to a @acronym{IMAP} server is unable
18184 to close, when connecting to the server via a certain kind of network,
18185 e.g. @acronym{VPN}.  In that case, it will be observed that a connection
18186 between Emacs and the local network looks alive even if the server has
18187 closed a connection for some reason (typically, a timeout).
18188 Consequently, Emacs continues waiting for a response from the server for
18189 the @code{LOGOUT} command that Emacs sent, or hangs in other words.  If
18190 you are in such a network, setting this variable to a number of seconds
18191 will be helpful.  If it is set, a hung connection will be closed
18192 forcibly, after this number of seconds from the time Emacs sends the
18193 @code{LOGOUT} command.  It should not be too small value but too large
18194 value will be inconvenient too.  Perhaps the value 1.0 will be a good
18195 candidate but it might be worth trying some other values.
18196
18197 Example server specification:
18198
18199 @lisp
18200 (nnimap "mail.server.com"
18201         (nnimap-logout-timeout 1.0))
18202 @end lisp
18203
18204 @end table
18205
18206 @menu
18207 * Splitting in IMAP::           Splitting mail with nnimap.
18208 * Expiring in IMAP::            Expiring mail with nnimap.
18209 * Editing IMAP ACLs::           Limiting/enabling other users access to a mailbox.
18210 * Expunging mailboxes::         Equivalent of a ``compress mailbox'' button.
18211 * A note on namespaces::        How to (not) use @acronym{IMAP} namespace in Gnus.
18212 * Debugging IMAP::              What to do when things don't work.
18213 @end menu
18214
18215
18216
18217 @node Splitting in IMAP
18218 @subsection Splitting in IMAP
18219 @cindex splitting imap mail
18220
18221 Splitting is something Gnus users have loved and used for years, and now
18222 the rest of the world is catching up.  Yeah, dream on, not many
18223 @acronym{IMAP} servers have server side splitting and those that have
18224 splitting seem to use some non-standard protocol.  This means that
18225 @acronym{IMAP} support for Gnus has to do its own splitting.
18226
18227 And it does.
18228
18229 (Incidentally, people seem to have been dreaming on, and Sieve has
18230 gaining a market share and is supported by several IMAP servers.
18231 Fortunately, Gnus support it too, @xref{Sieve Commands}.)
18232
18233 Here are the variables of interest:
18234
18235 @table @code
18236
18237 @item nnimap-split-crosspost
18238 @cindex splitting, crosspost
18239 @cindex crosspost
18240 @vindex nnimap-split-crosspost
18241
18242 If non-@code{nil}, do crossposting if several split methods match the
18243 mail.  If @code{nil}, the first match in @code{nnimap-split-rule}
18244 found will be used.
18245
18246 Nnmail equivalent: @code{nnmail-crosspost}.
18247
18248 @item nnimap-split-inbox
18249 @cindex splitting, inbox
18250 @cindex inbox
18251 @vindex nnimap-split-inbox
18252
18253 A string or a list of strings that gives the name(s) of @acronym{IMAP}
18254 mailboxes to split from.  Defaults to @code{nil}, which means that
18255 splitting is disabled!
18256
18257 @lisp
18258 (setq nnimap-split-inbox
18259       '("INBOX" ("~/friend/Mail" . "lists/*") "lists.imap"))
18260 @end lisp
18261
18262 No nnmail equivalent.
18263
18264 @item nnimap-split-rule
18265 @cindex splitting, rules
18266 @vindex nnimap-split-rule
18267
18268 New mail found in @code{nnimap-split-inbox} will be split according to
18269 this variable.
18270
18271 This variable contains a list of lists, where the first element in the
18272 sublist gives the name of the @acronym{IMAP} mailbox to move articles
18273 matching the regexp in the second element in the sublist.  Got that?
18274 Neither did I, we need examples.
18275
18276 @lisp
18277 (setq nnimap-split-rule
18278       '(("INBOX.nnimap"
18279          "^Sender: owner-nnimap@@vic20.globalcom.se")
18280         ("INBOX.junk"    "^Subject:.*MAKE MONEY")
18281         ("INBOX.private" "")))
18282 @end lisp
18283
18284 This will put all articles from the nnimap mailing list into mailbox
18285 INBOX.nnimap, all articles containing MAKE MONEY in the Subject: line
18286 into INBOX.junk and everything else in INBOX.private.
18287
18288 The first string may contain @samp{\\1} forms, like the ones used by
18289 replace-match to insert sub-expressions from the matched text.  For
18290 instance:
18291
18292 @lisp
18293 ("INBOX.lists.\\1"     "^Sender: owner-\\([a-z-]+\\)@@")
18294 @end lisp
18295
18296 The first element can also be the symbol @code{junk} to indicate that
18297 matching messages should simply be deleted.  Use with care.
18298
18299 The second element can also be a function.  In that case, it will be
18300 called with the first element of the rule as the argument, in a buffer
18301 containing the headers of the article.  It should return a
18302 non-@code{nil} value if it thinks that the mail belongs in that group.
18303
18304 Nnmail users might recollect that the last regexp had to be empty to
18305 match all articles (like in the example above).  This is not required in
18306 nnimap.  Articles not matching any of the regexps will not be moved out
18307 of your inbox.  (This might affect performance if you keep lots of
18308 unread articles in your inbox, since the splitting code would go over
18309 them every time you fetch new mail.)
18310
18311 These rules are processed from the beginning of the alist toward the
18312 end.  The first rule to make a match will ``win'', unless you have
18313 crossposting enabled.  In that case, all matching rules will ``win''.
18314
18315 This variable can also have a function as its value, the function will
18316 be called with the headers narrowed and should return a group where it
18317 thinks the article should be split to.  See @code{nnimap-split-fancy}.
18318
18319 The splitting code tries to create mailboxes if it needs to.
18320
18321 To allow for different split rules on different virtual servers, and
18322 even different split rules in different inboxes on the same server,
18323 the syntax of this variable have been extended along the lines of:
18324
18325 @lisp
18326 (setq nnimap-split-rule
18327       '(("my1server"    (".*" (("ding"    "ding@@gnus.org")
18328                                ("junk"    "From:.*Simon"))))
18329         ("my2server"    ("INBOX" nnimap-split-fancy))
18330         ("my[34]server" (".*" (("private" "To:.*Simon")
18331                                ("junk"    my-junk-func))))))
18332 @end lisp
18333
18334 The virtual server name is in fact a regexp, so that the same rules
18335 may apply to several servers.  In the example, the servers
18336 @code{my3server} and @code{my4server} both use the same rules.
18337 Similarly, the inbox string is also a regexp.  The actual splitting
18338 rules are as before, either a function, or a list with group/regexp or
18339 group/function elements.
18340
18341 Nnmail equivalent: @code{nnmail-split-methods}.
18342
18343 @item nnimap-split-predicate
18344 @cindex splitting
18345 @vindex nnimap-split-predicate
18346
18347 Mail matching this predicate in @code{nnimap-split-inbox} will be
18348 split, it is a string and the default is @samp{UNSEEN UNDELETED}.
18349
18350 This might be useful if you use another @acronym{IMAP} client to read mail in
18351 your inbox but would like Gnus to split all articles in the inbox
18352 regardless of readedness.  Then you might change this to
18353 @samp{UNDELETED}.
18354
18355 @item nnimap-split-fancy
18356 @cindex splitting, fancy
18357 @findex nnimap-split-fancy
18358 @vindex nnimap-split-fancy
18359
18360 It's possible to set @code{nnimap-split-rule} to
18361 @code{nnmail-split-fancy} if you want to use fancy
18362 splitting.  @xref{Fancy Mail Splitting}.
18363
18364 However, to be able to have different fancy split rules for nnmail and
18365 nnimap back ends you can set @code{nnimap-split-rule} to
18366 @code{nnimap-split-fancy} and define the nnimap specific fancy split
18367 rule in @code{nnimap-split-fancy}.
18368
18369 Example:
18370
18371 @lisp
18372 (setq nnimap-split-rule 'nnimap-split-fancy
18373       nnimap-split-fancy ...)
18374 @end lisp
18375
18376 Nnmail equivalent: @code{nnmail-split-fancy}.
18377
18378 @item nnimap-split-download-body
18379 @findex nnimap-split-download-body
18380 @vindex nnimap-split-download-body
18381
18382 Set to non-@code{nil} to download entire articles during splitting.
18383 This is generally not required, and will slow things down
18384 considerably.  You may need it if you want to use an advanced
18385 splitting function that analyzes the body to split the article.
18386
18387 @end table
18388
18389 @node Expiring in IMAP
18390 @subsection Expiring in IMAP
18391 @cindex expiring @acronym{IMAP} mail
18392
18393 Even though @code{nnimap} is not a proper @code{nnmail} derived back
18394 end, it supports most features in regular expiring (@pxref{Expiring
18395 Mail}).  Unlike splitting in @acronym{IMAP} (@pxref{Splitting in
18396 IMAP}) it does not clone the @code{nnmail} variables (i.e., creating
18397 @var{nnimap-expiry-wait}) but reuse the @code{nnmail} variables.  What
18398 follows below are the variables used by the @code{nnimap} expiry
18399 process.
18400
18401 A note on how the expire mark is stored on the @acronym{IMAP} server is
18402 appropriate here as well.  The expire mark is translated into a
18403 @code{imap} client specific mark, @code{gnus-expire}, and stored on the
18404 message.  This means that likely only Gnus will understand and treat
18405 the @code{gnus-expire} mark properly, although other clients may allow
18406 you to view client specific flags on the message.  It also means that
18407 your server must support permanent storage of client specific flags on
18408 messages.  Most do, fortunately.
18409
18410 If expiring @acronym{IMAP} mail seems very slow, try setting the server
18411 variable @code{nnimap-search-uids-not-since-is-evil}.
18412
18413 @table @code
18414
18415 @item nnmail-expiry-wait
18416 @item nnmail-expiry-wait-function
18417
18418 These variables are fully supported.  The expire value can be a
18419 number, the symbol @code{immediate} or @code{never}.
18420
18421 @item nnmail-expiry-target
18422
18423 This variable is supported, and internally implemented by calling the
18424 @code{nnmail} functions that handle this.  It contains an optimization
18425 that if the destination is a @acronym{IMAP} group on the same server, the
18426 article is copied instead of appended (that is, uploaded again).
18427
18428 @end table
18429
18430 @node Editing IMAP ACLs
18431 @subsection Editing IMAP ACLs
18432 @cindex editing imap acls
18433 @cindex Access Control Lists
18434 @cindex Editing @acronym{IMAP} ACLs
18435 @kindex G l (Group)
18436 @findex gnus-group-nnimap-edit-acl
18437
18438 ACL stands for Access Control List.  ACLs are used in @acronym{IMAP} for
18439 limiting (or enabling) other users access to your mail boxes.  Not all
18440 @acronym{IMAP} servers support this, this function will give an error if it
18441 doesn't.
18442
18443 To edit an ACL for a mailbox, type @kbd{G l}
18444 (@code{gnus-group-edit-nnimap-acl}) and you'll be presented with an ACL
18445 editing window with detailed instructions.
18446
18447 Some possible uses:
18448
18449 @itemize @bullet
18450 @item
18451 Giving ``anyone'' the ``lrs'' rights (lookup, read, keep seen/unseen flags)
18452 on your mailing list mailboxes enables other users on the same server to
18453 follow the list without subscribing to it.
18454 @item
18455 At least with the Cyrus server, you are required to give the user
18456 ``anyone'' posting ("p") capabilities to have ``plussing'' work (that is,
18457 mail sent to user+mailbox@@domain ending up in the @acronym{IMAP} mailbox
18458 INBOX.mailbox).
18459 @end itemize
18460
18461 @node Expunging mailboxes
18462 @subsection Expunging mailboxes
18463 @cindex expunging
18464
18465 @cindex expunge
18466 @cindex manual expunging
18467 @kindex G x (Group)
18468 @findex gnus-group-nnimap-expunge
18469
18470 If you're using the @code{never} setting of @code{nnimap-expunge-on-close},
18471 you may want the option of expunging all deleted articles in a mailbox
18472 manually.  This is exactly what @kbd{G x} does.
18473
18474 Currently there is no way of showing deleted articles, you can just
18475 delete them.
18476
18477 @node A note on namespaces
18478 @subsection A note on namespaces
18479 @cindex IMAP namespace
18480 @cindex namespaces
18481
18482 The @acronym{IMAP} protocol has a concept called namespaces, described
18483 by the following text in the RFC2060:
18484
18485 @display
18486 5.1.2.  Mailbox Namespace Naming Convention
18487
18488    By convention, the first hierarchical element of any mailbox name
18489    which begins with "#" identifies the "namespace" of the remainder of
18490    the name.  This makes it possible to disambiguate between different
18491    types of mailbox stores, each of which have their own namespaces.
18492
18493       For example, implementations which offer access to USENET
18494       newsgroups MAY use the "#news" namespace to partition the USENET
18495       newsgroup namespace from that of other mailboxes.  Thus, the
18496       comp.mail.misc newsgroup would have an mailbox name of
18497       "#news.comp.mail.misc", and the name "comp.mail.misc" could refer
18498       to a different object (e.g. a user's private mailbox).
18499 @end display
18500
18501 While there is nothing in this text that warrants concern for the
18502 @acronym{IMAP} implementation in Gnus, some servers use namespace
18503 prefixes in a way that does not work with how Gnus uses mailbox names.
18504
18505 Specifically, University of Washington's @acronym{IMAP} server uses
18506 mailbox names like @code{#driver.mbx/read-mail} which are valid only
18507 in the @sc{create} and @sc{append} commands.  After the mailbox is
18508 created (or a messages is appended to a mailbox), it must be accessed
18509 without the namespace prefix, i.e. @code{read-mail}.  Since Gnus do
18510 not make it possible for the user to guarantee that user entered
18511 mailbox names will only be used with the CREATE and APPEND commands,
18512 you should simply not use the namespace prefixed mailbox names in
18513 Gnus.
18514
18515 See the UoW IMAPD documentation for the @code{#driver.*/} prefix
18516 for more information on how to use the prefixes.  They are a power
18517 tool and should be used only if you are sure what the effects are.
18518
18519 @node Debugging IMAP
18520 @subsection Debugging IMAP
18521 @cindex IMAP debugging
18522 @cindex protocol dump (IMAP)
18523
18524 @acronym{IMAP} is a complex protocol, more so than @acronym{NNTP} or
18525 @acronym{POP3}.  Implementation bugs are not unlikely, and we do our
18526 best to fix them right away.  If you encounter odd behavior, chances
18527 are that either the server or Gnus is buggy.
18528
18529 If you are familiar with network protocols in general, you will
18530 probably be able to extract some clues from the protocol dump of the
18531 exchanges between Gnus and the server.  Even if you are not familiar
18532 with network protocols, when you include the protocol dump in
18533 @acronym{IMAP}-related bug reports you are helping us with data
18534 critical to solving the problem.  Therefore, we strongly encourage you
18535 to include the protocol dump when reporting IMAP bugs in Gnus.
18536
18537
18538 @vindex imap-log
18539 Because the protocol dump, when enabled, generates lots of data, it is
18540 disabled by default.  You can enable it by setting @code{imap-log} as
18541 follows:
18542
18543 @lisp
18544 (setq imap-log t)
18545 @end lisp
18546
18547 This instructs the @code{imap.el} package to log any exchanges with
18548 the server.  The log is stored in the buffer @samp{*imap-log*}.  Look
18549 for error messages, which sometimes are tagged with the keyword
18550 @code{BAD}---but when submitting a bug, make sure to include all the
18551 data.
18552
18553 @node Other Sources
18554 @section Other Sources
18555
18556 Gnus can do more than just read news or mail.  The methods described
18557 below allow Gnus to view directories and files as if they were
18558 newsgroups.
18559
18560 @menu
18561 * Directory Groups::            You can read a directory as if it was a newsgroup.
18562 * Anything Groups::             Dired?  Who needs dired?
18563 * Document Groups::             Single files can be the basis of a group.
18564 * SOUP::                        Reading @sc{soup} packets ``offline''.
18565 * Mail-To-News Gateways::       Posting articles via mail-to-news gateways.
18566 @end menu
18567
18568
18569 @node Directory Groups
18570 @subsection Directory Groups
18571 @cindex nndir
18572 @cindex directory groups
18573
18574 If you have a directory that has lots of articles in separate files in
18575 it, you might treat it as a newsgroup.  The files have to have numerical
18576 names, of course.
18577
18578 This might be an opportune moment to mention @code{ange-ftp} (and its
18579 successor @code{efs}), that most wonderful of all wonderful Emacs
18580 packages.  When I wrote @code{nndir}, I didn't think much about it---a
18581 back end to read directories.  Big deal.
18582
18583 @code{ange-ftp} changes that picture dramatically.  For instance, if you
18584 enter the @code{ange-ftp} file name
18585 @file{/ftp.hpc.uh.edu:/pub/emacs/ding-list/} as the directory name,
18586 @code{ange-ftp} or @code{efs} will actually allow you to read this
18587 directory over at @samp{sina} as a newsgroup.  Distributed news ahoy!
18588
18589 @code{nndir} will use @acronym{NOV} files if they are present.
18590
18591 @code{nndir} is a ``read-only'' back end---you can't delete or expire
18592 articles with this method.  You can use @code{nnmh} or @code{nnml} for
18593 whatever you use @code{nndir} for, so you could switch to any of those
18594 methods if you feel the need to have a non-read-only @code{nndir}.
18595
18596
18597 @node Anything Groups
18598 @subsection Anything Groups
18599 @cindex nneething
18600
18601 From the @code{nndir} back end (which reads a single spool-like
18602 directory), it's just a hop and a skip to @code{nneething}, which
18603 pretends that any arbitrary directory is a newsgroup.  Strange, but
18604 true.
18605
18606 When @code{nneething} is presented with a directory, it will scan this
18607 directory and assign article numbers to each file.  When you enter such
18608 a group, @code{nneething} must create ``headers'' that Gnus can use.
18609 After all, Gnus is a newsreader, in case you're forgetting.
18610 @code{nneething} does this in a two-step process.  First, it snoops each
18611 file in question.  If the file looks like an article (i.e., the first
18612 few lines look like headers), it will use this as the head.  If this is
18613 just some arbitrary file without a head (e.g. a C source file),
18614 @code{nneething} will cobble up a header out of thin air.  It will use
18615 file ownership, name and date and do whatever it can with these
18616 elements.
18617
18618 All this should happen automatically for you, and you will be presented
18619 with something that looks very much like a newsgroup.  Totally like a
18620 newsgroup, to be precise.  If you select an article, it will be displayed
18621 in the article buffer, just as usual.
18622
18623 If you select a line that represents a directory, Gnus will pop you into
18624 a new summary buffer for this @code{nneething} group.  And so on.  You can
18625 traverse the entire disk this way, if you feel like, but remember that
18626 Gnus is not dired, really, and does not intend to be, either.
18627
18628 There are two overall modes to this action---ephemeral or solid.  When
18629 doing the ephemeral thing (i.e., @kbd{G D} from the group buffer), Gnus
18630 will not store information on what files you have read, and what files
18631 are new, and so on.  If you create a solid @code{nneething} group the
18632 normal way with @kbd{G m}, Gnus will store a mapping table between
18633 article numbers and file names, and you can treat this group like any
18634 other groups.  When you activate a solid @code{nneething} group, you will
18635 be told how many unread articles it contains, etc., etc.
18636
18637 Some variables:
18638
18639 @table @code
18640 @item nneething-map-file-directory
18641 @vindex nneething-map-file-directory
18642 All the mapping files for solid @code{nneething} groups will be stored
18643 in this directory, which defaults to @file{~/.nneething/}.
18644
18645 @item nneething-exclude-files
18646 @vindex nneething-exclude-files
18647 All files that match this regexp will be ignored.  Nice to use to exclude
18648 auto-save files and the like, which is what it does by default.
18649
18650 @item nneething-include-files
18651 @vindex nneething-include-files
18652 Regexp saying what files to include in the group.  If this variable is
18653 non-@code{nil}, only files matching this regexp will be included.
18654
18655 @item nneething-map-file
18656 @vindex nneething-map-file
18657 Name of the map files.
18658 @end table
18659
18660
18661 @node Document Groups
18662 @subsection Document Groups
18663 @cindex nndoc
18664 @cindex documentation group
18665 @cindex help group
18666
18667 @code{nndoc} is a cute little thing that will let you read a single file
18668 as a newsgroup.  Several files types are supported:
18669
18670 @table @code
18671 @cindex Babyl
18672 @item babyl
18673 The Babyl format.
18674
18675 @cindex mbox
18676 @cindex Unix mbox
18677 @item mbox
18678 The standard Unix mbox file.
18679
18680 @cindex MMDF mail box
18681 @item mmdf
18682 The MMDF mail box format.
18683
18684 @item news
18685 Several news articles appended into a file.
18686
18687 @cindex rnews batch files
18688 @item rnews
18689 The rnews batch transport format.
18690
18691 @item nsmail
18692 Netscape mail boxes.
18693
18694 @item mime-parts
18695 @acronym{MIME} multipart messages.
18696
18697 @item standard-digest
18698 The standard (RFC 1153) digest format.
18699
18700 @item mime-digest
18701 A @acronym{MIME} digest of messages.
18702
18703 @item lanl-gov-announce
18704 Announcement messages from LANL Gov Announce.
18705
18706 @cindex forwarded messages
18707 @item rfc822-forward
18708 A message forwarded according to RFC822.
18709
18710 @item outlook
18711 The Outlook mail box.
18712
18713 @item oe-dbx
18714 The Outlook Express dbx mail box.
18715
18716 @item exim-bounce
18717 A bounce message from the Exim MTA.
18718
18719 @item forward
18720 A message forwarded according to informal rules.
18721
18722 @item rfc934
18723 An RFC934-forwarded message.
18724
18725 @item mailman
18726 A mailman digest.
18727
18728 @item clari-briefs
18729 A digest of Clarinet brief news items.
18730
18731 @item slack-digest
18732 Non-standard digest format---matches most things, but does it badly.
18733
18734 @item mail-in-mail
18735 The last resort.
18736 @end table
18737
18738 You can also use the special ``file type'' @code{guess}, which means
18739 that @code{nndoc} will try to guess what file type it is looking at.
18740 @code{digest} means that @code{nndoc} should guess what digest type the
18741 file is.
18742
18743 @code{nndoc} will not try to change the file or insert any extra headers into
18744 it---it will simply, like, let you use the file as the basis for a
18745 group.  And that's it.
18746
18747 If you have some old archived articles that you want to insert into your
18748 new & spiffy Gnus mail back end, @code{nndoc} can probably help you with
18749 that.  Say you have an old @file{RMAIL} file with mail that you now want
18750 to split into your new @code{nnml} groups.  You look at that file using
18751 @code{nndoc} (using the @kbd{G f} command in the group buffer
18752 (@pxref{Foreign Groups})), set the process mark on all the articles in
18753 the buffer (@kbd{M P b}, for instance), and then re-spool (@kbd{B r})
18754 using @code{nnml}.  If all goes well, all the mail in the @file{RMAIL}
18755 file is now also stored in lots of @code{nnml} directories, and you can
18756 delete that pesky @file{RMAIL} file.  If you have the guts!
18757
18758 Virtual server variables:
18759
18760 @table @code
18761 @item nndoc-article-type
18762 @vindex nndoc-article-type
18763 This should be one of @code{mbox}, @code{babyl}, @code{digest},
18764 @code{news}, @code{rnews}, @code{mmdf}, @code{forward}, @code{rfc934},
18765 @code{rfc822-forward}, @code{mime-parts}, @code{standard-digest},
18766 @code{slack-digest}, @code{clari-briefs}, @code{nsmail}, @code{outlook},
18767 @code{oe-dbx}, @code{mailman}, and @code{mail-in-mail} or @code{guess}.
18768
18769 @item nndoc-post-type
18770 @vindex nndoc-post-type
18771 This variable says whether Gnus is to consider the group a news group or
18772 a mail group.  There are two valid values:  @code{mail} (the default)
18773 and @code{news}.
18774 @end table
18775
18776 @menu
18777 * Document Server Internals::   How to add your own document types.
18778 @end menu
18779
18780
18781 @node Document Server Internals
18782 @subsubsection Document Server Internals
18783
18784 Adding new document types to be recognized by @code{nndoc} isn't
18785 difficult.  You just have to whip up a definition of what the document
18786 looks like, write a predicate function to recognize that document type,
18787 and then hook into @code{nndoc}.
18788
18789 First, here's an example document type definition:
18790
18791 @example
18792 (mmdf
18793  (article-begin .  "^\^A\^A\^A\^A\n")
18794  (body-end .  "^\^A\^A\^A\^A\n"))
18795 @end example
18796
18797 The definition is simply a unique @dfn{name} followed by a series of
18798 regexp pseudo-variable settings.  Below are the possible
18799 variables---don't be daunted by the number of variables; most document
18800 types can be defined with very few settings:
18801
18802 @table @code
18803 @item first-article
18804 If present, @code{nndoc} will skip past all text until it finds
18805 something that match this regexp.  All text before this will be
18806 totally ignored.
18807
18808 @item article-begin
18809 This setting has to be present in all document type definitions.  It
18810 says what the beginning of each article looks like.  To do more
18811 complicated things that cannot be dealt with a simple regexp, you can
18812 use @code{article-begin-function} instead of this.
18813
18814 @item article-begin-function
18815 If present, this should be a function that moves point to the beginning
18816 of each article.  This setting overrides @code{article-begin}.
18817
18818 @item head-begin
18819 If present, this should be a regexp that matches the head of the
18820 article.  To do more complicated things that cannot be dealt with a
18821 simple regexp, you can use @code{head-begin-function} instead of this.
18822
18823 @item head-begin-function
18824 If present, this should be a function that moves point to the head of
18825 the article.  This setting overrides @code{head-begin}.
18826
18827 @item head-end
18828 This should match the end of the head of the article.  It defaults to
18829 @samp{^$}---the empty line.
18830
18831 @item body-begin
18832 This should match the beginning of the body of the article.  It defaults
18833 to @samp{^\n}.  To do more complicated things that cannot be dealt with
18834 a simple regexp, you can use @code{body-begin-function} instead of this.
18835
18836 @item body-begin-function
18837 If present, this function should move point to the beginning of the body
18838 of the article.  This setting overrides @code{body-begin}.
18839
18840 @item body-end
18841 If present, this should match the end of the body of the article.  To do
18842 more complicated things that cannot be dealt with a simple regexp, you
18843 can use @code{body-end-function} instead of this.
18844
18845 @item body-end-function
18846 If present, this function should move point to the end of the body of
18847 the article.  This setting overrides @code{body-end}.
18848
18849 @item file-begin
18850 If present, this should match the beginning of the file.  All text
18851 before this regexp will be totally ignored.
18852
18853 @item file-end
18854 If present, this should match the end of the file.  All text after this
18855 regexp will be totally ignored.
18856
18857 @end table
18858
18859 So, using these variables @code{nndoc} is able to dissect a document
18860 file into a series of articles, each with a head and a body.  However, a
18861 few more variables are needed since not all document types are all that
18862 news-like---variables needed to transform the head or the body into
18863 something that's palatable for Gnus:
18864
18865 @table @code
18866 @item prepare-body-function
18867 If present, this function will be called when requesting an article.  It
18868 will be called with point at the start of the body, and is useful if the
18869 document has encoded some parts of its contents.
18870
18871 @item article-transform-function
18872 If present, this function is called when requesting an article.  It's
18873 meant to be used for more wide-ranging transformation of both head and
18874 body of the article.
18875
18876 @item generate-head-function
18877 If present, this function is called to generate a head that Gnus can
18878 understand.  It is called with the article number as a parameter, and is
18879 expected to generate a nice head for the article in question.  It is
18880 called when requesting the headers of all articles.
18881
18882 @item generate-article-function
18883 If present, this function is called to generate an entire article that
18884 Gnus can understand.  It is called with the article number as a
18885 parameter when requesting all articles.
18886
18887 @item dissection-function
18888 If present, this function is called to dissect a document by itself,
18889 overriding @code{first-article}, @code{article-begin},
18890 @code{article-begin-function}, @code{head-begin},
18891 @code{head-begin-function}, @code{head-end}, @code{body-begin},
18892 @code{body-begin-function}, @code{body-end}, @code{body-end-function},
18893 @code{file-begin}, and @code{file-end}.
18894
18895 @end table
18896
18897 Let's look at the most complicated example I can come up with---standard
18898 digests:
18899
18900 @example
18901 (standard-digest
18902  (first-article . ,(concat "^" (make-string 70 ?-) "\n\n+"))
18903  (article-begin . ,(concat "\n\n" (make-string 30 ?-) "\n\n+"))
18904  (prepare-body-function . nndoc-unquote-dashes)
18905  (body-end-function . nndoc-digest-body-end)
18906  (head-end . "^ ?$")
18907  (body-begin . "^ ?\n")
18908  (file-end . "^End of .*digest.*[0-9].*\n\\*\\*\\|^End of.*Digest *$")
18909  (subtype digest guess))
18910 @end example
18911
18912 We see that all text before a 70-width line of dashes is ignored; all
18913 text after a line that starts with that @samp{^End of} is also ignored;
18914 each article begins with a 30-width line of dashes; the line separating
18915 the head from the body may contain a single space; and that the body is
18916 run through @code{nndoc-unquote-dashes} before being delivered.
18917
18918 To hook your own document definition into @code{nndoc}, use the
18919 @code{nndoc-add-type} function.  It takes two parameters---the first
18920 is the definition itself and the second (optional) parameter says
18921 where in the document type definition alist to put this definition.
18922 The alist is traversed sequentially, and
18923 @code{nndoc-@var{type}-type-p} is called for a given type @var{type}.
18924 So @code{nndoc-mmdf-type-p} is called to see whether a document is of
18925 @code{mmdf} type, and so on.  These type predicates should return
18926 @code{nil} if the document is not of the correct type; @code{t} if it
18927 is of the correct type; and a number if the document might be of the
18928 correct type.  A high number means high probability; a low number
18929 means low probability with @samp{0} being the lowest valid number.
18930
18931
18932 @node SOUP
18933 @subsection SOUP
18934 @cindex SOUP
18935 @cindex offline
18936
18937 In the PC world people often talk about ``offline'' newsreaders.  These
18938 are thingies that are combined reader/news transport monstrosities.
18939 With built-in modem programs.  Yecchh!
18940
18941 Of course, us Unix Weenie types of human beans use things like
18942 @code{uucp} and, like, @code{nntpd} and set up proper news and mail
18943 transport things like Ghod intended.  And then we just use normal
18944 newsreaders.
18945
18946 However, it can sometimes be convenient to do something that's a bit
18947 easier on the brain if you have a very slow modem, and you're not really
18948 that interested in doing things properly.
18949
18950 A file format called @sc{soup} has been developed for transporting news
18951 and mail from servers to home machines and back again.  It can be a bit
18952 fiddly.
18953
18954 First some terminology:
18955
18956 @table @dfn
18957
18958 @item server
18959 This is the machine that is connected to the outside world and where you
18960 get news and/or mail from.
18961
18962 @item home machine
18963 This is the machine that you want to do the actual reading and responding
18964 on.  It is typically not connected to the rest of the world in any way.
18965
18966 @item packet
18967 Something that contains messages and/or commands.  There are two kinds
18968 of packets:
18969
18970 @table @dfn
18971 @item message packets
18972 These are packets made at the server, and typically contain lots of
18973 messages for you to read.  These are called @file{SoupoutX.tgz} by
18974 default, where @var{x} is a number.
18975
18976 @item response packets
18977 These are packets made at the home machine, and typically contains
18978 replies that you've written.  These are called @file{SoupinX.tgz} by
18979 default, where @var{x} is a number.
18980
18981 @end table
18982
18983 @end table
18984
18985
18986 @enumerate
18987
18988 @item
18989 You log in on the server and create a @sc{soup} packet.  You can either
18990 use a dedicated @sc{soup} thingie (like the @code{awk} program), or you
18991 can use Gnus to create the packet with its @sc{soup} commands (@kbd{O
18992 s} and/or @kbd{G s b}; and then @kbd{G s p}) (@pxref{SOUP Commands}).
18993
18994 @item
18995 You transfer the packet home.  Rail, boat, car or modem will do fine.
18996
18997 @item
18998 You put the packet in your home directory.
18999
19000 @item
19001 You fire up Gnus on your home machine using the @code{nnsoup} back end as
19002 the native or secondary server.
19003
19004 @item
19005 You read articles and mail and answer and followup to the things you
19006 want (@pxref{SOUP Replies}).
19007
19008 @item
19009 You do the @kbd{G s r} command to pack these replies into a @sc{soup}
19010 packet.
19011
19012 @item
19013 You transfer this packet to the server.
19014
19015 @item
19016 You use Gnus to mail this packet out with the @kbd{G s s} command.
19017
19018 @item
19019 You then repeat until you die.
19020
19021 @end enumerate
19022
19023 So you basically have a bipartite system---you use @code{nnsoup} for
19024 reading and Gnus for packing/sending these @sc{soup} packets.
19025
19026 @menu
19027 * SOUP Commands::               Commands for creating and sending @sc{soup} packets
19028 * SOUP Groups::                 A back end for reading @sc{soup} packets.
19029 * SOUP Replies::                How to enable @code{nnsoup} to take over mail and news.
19030 @end menu
19031
19032
19033 @node SOUP Commands
19034 @subsubsection SOUP Commands
19035
19036 These are commands for creating and manipulating @sc{soup} packets.
19037
19038 @table @kbd
19039 @item G s b
19040 @kindex G s b (Group)
19041 @findex gnus-group-brew-soup
19042 Pack all unread articles in the current group
19043 (@code{gnus-group-brew-soup}).  This command understands the
19044 process/prefix convention.
19045
19046 @item G s w
19047 @kindex G s w (Group)
19048 @findex gnus-soup-save-areas
19049 Save all @sc{soup} data files (@code{gnus-soup-save-areas}).
19050
19051 @item G s s
19052 @kindex G s s (Group)
19053 @findex gnus-soup-send-replies
19054 Send all replies from the replies packet
19055 (@code{gnus-soup-send-replies}).
19056
19057 @item G s p
19058 @kindex G s p (Group)
19059 @findex gnus-soup-pack-packet
19060 Pack all files into a @sc{soup} packet (@code{gnus-soup-pack-packet}).
19061
19062 @item G s r
19063 @kindex G s r (Group)
19064 @findex nnsoup-pack-replies
19065 Pack all replies into a replies packet (@code{nnsoup-pack-replies}).
19066
19067 @item O s
19068 @kindex O s (Summary)
19069 @findex gnus-soup-add-article
19070 This summary-mode command adds the current article to a @sc{soup} packet
19071 (@code{gnus-soup-add-article}).  It understands the process/prefix
19072 convention (@pxref{Process/Prefix}).
19073
19074 @end table
19075
19076
19077 There are a few variables to customize where Gnus will put all these
19078 thingies:
19079
19080 @table @code
19081
19082 @item gnus-soup-directory
19083 @vindex gnus-soup-directory
19084 Directory where Gnus will save intermediate files while composing
19085 @sc{soup} packets.  The default is @file{~/SoupBrew/}.
19086
19087 @item gnus-soup-replies-directory
19088 @vindex gnus-soup-replies-directory
19089 This is what Gnus will use as a temporary directory while sending our
19090 reply packets.  @file{~/SoupBrew/SoupReplies/} is the default.
19091
19092 @item gnus-soup-prefix-file
19093 @vindex gnus-soup-prefix-file
19094 Name of the file where Gnus stores the last used prefix.  The default is
19095 @samp{gnus-prefix}.
19096
19097 @item gnus-soup-packer
19098 @vindex gnus-soup-packer
19099 A format string command for packing a @sc{soup} packet.  The default is
19100 @samp{tar cf - %s | gzip > $HOME/Soupout%d.tgz}.
19101
19102 @item gnus-soup-unpacker
19103 @vindex gnus-soup-unpacker
19104 Format string command for unpacking a @sc{soup} packet.  The default is
19105 @samp{gunzip -c %s | tar xvf -}.
19106
19107 @item gnus-soup-packet-directory
19108 @vindex gnus-soup-packet-directory
19109 Where Gnus will look for reply packets.  The default is @file{~/}.
19110
19111 @item gnus-soup-packet-regexp
19112 @vindex gnus-soup-packet-regexp
19113 Regular expression matching @sc{soup} reply packets in
19114 @code{gnus-soup-packet-directory}.
19115
19116 @end table
19117
19118
19119 @node SOUP Groups
19120 @subsubsection SOUP Groups
19121 @cindex nnsoup
19122
19123 @code{nnsoup} is the back end for reading @sc{soup} packets.  It will
19124 read incoming packets, unpack them, and put them in a directory where
19125 you can read them at leisure.
19126
19127 These are the variables you can use to customize its behavior:
19128
19129 @table @code
19130
19131 @item nnsoup-tmp-directory
19132 @vindex nnsoup-tmp-directory
19133 When @code{nnsoup} unpacks a @sc{soup} packet, it does it in this
19134 directory.  (@file{/tmp/} by default.)
19135
19136 @item nnsoup-directory
19137 @vindex nnsoup-directory
19138 @code{nnsoup} then moves each message and index file to this directory.
19139 The default is @file{~/SOUP/}.
19140
19141 @item nnsoup-replies-directory
19142 @vindex nnsoup-replies-directory
19143 All replies will be stored in this directory before being packed into a
19144 reply packet.  The default is @file{~/SOUP/replies/}.
19145
19146 @item nnsoup-replies-format-type
19147 @vindex nnsoup-replies-format-type
19148 The @sc{soup} format of the replies packets.  The default is @samp{?n}
19149 (rnews), and I don't think you should touch that variable.  I probably
19150 shouldn't even have documented it.  Drats!  Too late!
19151
19152 @item nnsoup-replies-index-type
19153 @vindex nnsoup-replies-index-type
19154 The index type of the replies packet.  The default is @samp{?n}, which
19155 means ``none''.  Don't fiddle with this one either!
19156
19157 @item nnsoup-active-file
19158 @vindex nnsoup-active-file
19159 Where @code{nnsoup} stores lots of information.  This is not an ``active
19160 file'' in the @code{nntp} sense; it's an Emacs Lisp file.  If you lose
19161 this file or mess it up in any way, you're dead.  The default is
19162 @file{~/SOUP/active}.
19163
19164 @item nnsoup-packer
19165 @vindex nnsoup-packer
19166 Format string command for packing a reply @sc{soup} packet.  The default
19167 is @samp{tar cf - %s | gzip > $HOME/Soupin%d.tgz}.
19168
19169 @item nnsoup-unpacker
19170 @vindex nnsoup-unpacker
19171 Format string command for unpacking incoming @sc{soup} packets.  The
19172 default is @samp{gunzip -c %s | tar xvf -}.
19173
19174 @item nnsoup-packet-directory
19175 @vindex nnsoup-packet-directory
19176 Where @code{nnsoup} will look for incoming packets.  The default is
19177 @file{~/}.
19178
19179 @item nnsoup-packet-regexp
19180 @vindex nnsoup-packet-regexp
19181 Regular expression matching incoming @sc{soup} packets.  The default is
19182 @samp{Soupout}.
19183
19184 @item nnsoup-always-save
19185 @vindex nnsoup-always-save
19186 If non-@code{nil}, save the replies buffer after each posted message.
19187
19188 @end table
19189
19190
19191 @node SOUP Replies
19192 @subsubsection SOUP Replies
19193
19194 Just using @code{nnsoup} won't mean that your postings and mailings end
19195 up in @sc{soup} reply packets automagically.  You have to work a bit
19196 more for that to happen.
19197
19198 @findex nnsoup-set-variables
19199 The @code{nnsoup-set-variables} command will set the appropriate
19200 variables to ensure that all your followups and replies end up in the
19201 @sc{soup} system.
19202
19203 In specific, this is what it does:
19204
19205 @lisp
19206 (setq message-send-news-function 'nnsoup-request-post)
19207 (setq message-send-mail-function 'nnsoup-request-mail)
19208 @end lisp
19209
19210 And that's it, really.  If you only want news to go into the @sc{soup}
19211 system you just use the first line.  If you only want mail to be
19212 @sc{soup}ed you use the second.
19213
19214
19215 @node Mail-To-News Gateways
19216 @subsection Mail-To-News Gateways
19217 @cindex mail-to-news gateways
19218 @cindex gateways
19219
19220 If your local @code{nntp} server doesn't allow posting, for some reason
19221 or other, you can post using one of the numerous mail-to-news gateways.
19222 The @code{nngateway} back end provides the interface.
19223
19224 Note that you can't read anything from this back end---it can only be
19225 used to post with.
19226
19227 Server variables:
19228
19229 @table @code
19230 @item nngateway-address
19231 @vindex nngateway-address
19232 This is the address of the mail-to-news gateway.
19233
19234 @item nngateway-header-transformation
19235 @vindex nngateway-header-transformation
19236 News headers often have to be transformed in some odd way or other
19237 for the mail-to-news gateway to accept it.  This variable says what
19238 transformation should be called, and defaults to
19239 @code{nngateway-simple-header-transformation}.  The function is called
19240 narrowed to the headers to be transformed and with one parameter---the
19241 gateway address.
19242
19243 This default function just inserts a new @code{To} header based on the
19244 @code{Newsgroups} header and the gateway address.
19245 For instance, an article with this @code{Newsgroups} header:
19246
19247 @example
19248 Newsgroups: alt.religion.emacs
19249 @end example
19250
19251 will get this @code{To} header inserted:
19252
19253 @example
19254 To: alt-religion-emacs@@GATEWAY
19255 @end example
19256
19257 The following pre-defined functions exist:
19258
19259 @findex nngateway-simple-header-transformation
19260 @table @code
19261
19262 @item nngateway-simple-header-transformation
19263 Creates a @code{To} header that looks like
19264 @var{newsgroup}@@@code{nngateway-address}.
19265
19266 @findex nngateway-mail2news-header-transformation
19267
19268 @item nngateway-mail2news-header-transformation
19269 Creates a @code{To} header that looks like
19270 @code{nngateway-address}.
19271 @end table
19272
19273 @end table
19274
19275 Here's an example:
19276
19277 @lisp
19278 (setq gnus-post-method
19279       '(nngateway
19280         "mail2news@@replay.com"
19281         (nngateway-header-transformation
19282          nngateway-mail2news-header-transformation)))
19283 @end lisp
19284
19285 So, to use this, simply say something like:
19286
19287 @lisp
19288 (setq gnus-post-method '(nngateway "GATEWAY.ADDRESS"))
19289 @end lisp
19290
19291
19292
19293 @node Combined Groups
19294 @section Combined Groups
19295
19296 Gnus allows combining a mixture of all the other group types into bigger
19297 groups.
19298
19299 @menu
19300 * Virtual Groups::              Combining articles from many groups.
19301 * Kibozed Groups::              Looking through parts of the newsfeed for articles.
19302 @end menu
19303
19304
19305 @node Virtual Groups
19306 @subsection Virtual Groups
19307 @cindex nnvirtual
19308 @cindex virtual groups
19309 @cindex merging groups
19310
19311 An @dfn{nnvirtual group} is really nothing more than a collection of
19312 other groups.
19313
19314 For instance, if you are tired of reading many small groups, you can
19315 put them all in one big group, and then grow tired of reading one
19316 big, unwieldy group.  The joys of computing!
19317
19318 You specify @code{nnvirtual} as the method.  The address should be a
19319 regexp to match component groups.
19320
19321 All marks in the virtual group will stick to the articles in the
19322 component groups.  So if you tick an article in a virtual group, the
19323 article will also be ticked in the component group from whence it
19324 came.  (And vice versa---marks from the component groups will also be
19325 shown in the virtual group.).  To create an empty virtual group, run
19326 @kbd{G V} (@code{gnus-group-make-empty-virtual}) in the group buffer
19327 and edit the method regexp with @kbd{M-e}
19328 (@code{gnus-group-edit-group-method})
19329
19330 Here's an example @code{nnvirtual} method that collects all Andrea Dworkin
19331 newsgroups into one, big, happy newsgroup:
19332
19333 @lisp
19334 (nnvirtual "^alt\\.fan\\.andrea-dworkin$\\|^rec\\.dworkin.*")
19335 @end lisp
19336
19337 The component groups can be native or foreign; everything should work
19338 smoothly, but if your computer explodes, it was probably my fault.
19339
19340 Collecting the same group from several servers might actually be a good
19341 idea if users have set the Distribution header to limit distribution.
19342 If you would like to read @samp{soc.motss} both from a server in Japan
19343 and a server in Norway, you could use the following as the group regexp:
19344
19345 @example
19346 "^nntp\\+server\\.jp:soc\\.motss$\\|^nntp\\+server\\.no:soc\\.motss$"
19347 @end example
19348
19349 (Remember, though, that if you're creating the group with @kbd{G m}, you
19350 shouldn't double the backslashes, and you should leave off the quote
19351 characters at the beginning and the end of the string.)
19352
19353 This should work kinda smoothly---all articles from both groups should
19354 end up in this one, and there should be no duplicates.  Threading (and
19355 the rest) will still work as usual, but there might be problems with the
19356 sequence of articles.  Sorting on date might be an option here
19357 (@pxref{Selecting a Group}).
19358
19359 One limitation, however---all groups included in a virtual
19360 group have to be alive (i.e., subscribed or unsubscribed).  Killed or
19361 zombie groups can't be component groups for @code{nnvirtual} groups.
19362
19363 @vindex nnvirtual-always-rescan
19364 If the @code{nnvirtual-always-rescan} variable is non-@code{nil} (which
19365 is the default), @code{nnvirtual} will always scan groups for unread
19366 articles when entering a virtual group.  If this variable is @code{nil}
19367 and you read articles in a component group after the virtual group has
19368 been activated, the read articles from the component group will show up
19369 when you enter the virtual group.  You'll also see this effect if you
19370 have two virtual groups that have a component group in common.  If
19371 that's the case, you should set this variable to @code{t}.  Or you can
19372 just tap @code{M-g} on the virtual group every time before you enter
19373 it---it'll have much the same effect.
19374
19375 @code{nnvirtual} can have both mail and news groups as component groups.
19376 When responding to articles in @code{nnvirtual} groups, @code{nnvirtual}
19377 has to ask the back end of the component group the article comes from
19378 whether it is a news or mail back end.  However, when you do a @kbd{^},
19379 there is typically no sure way for the component back end to know this,
19380 and in that case @code{nnvirtual} tells Gnus that the article came from a
19381 not-news back end.  (Just to be on the safe side.)
19382
19383 @kbd{C-c C-n} in the message buffer will insert the @code{Newsgroups}
19384 line from the article you respond to in these cases.
19385
19386 @code{nnvirtual} groups do not inherit anything but articles and marks
19387 from component groups---group parameters, for instance, are not
19388 inherited.
19389
19390
19391 @node Kibozed Groups
19392 @subsection Kibozed Groups
19393 @cindex nnkiboze
19394 @cindex kibozing
19395
19396 @dfn{Kibozing} is defined by the @acronym{OED} as ``grepping through
19397 (parts of) the news feed''.  @code{nnkiboze} is a back end that will
19398 do this for you.  Oh joy!  Now you can grind any @acronym{NNTP} server
19399 down to a halt with useless requests!  Oh happiness!
19400
19401 @kindex G k (Group)
19402 To create a kibozed group, use the @kbd{G k} command in the group
19403 buffer.
19404
19405 The address field of the @code{nnkiboze} method is, as with
19406 @code{nnvirtual}, a regexp to match groups to be ``included'' in the
19407 @code{nnkiboze} group.  That's where most similarities between
19408 @code{nnkiboze} and @code{nnvirtual} end.
19409
19410 In addition to this regexp detailing component groups, an
19411 @code{nnkiboze} group must have a score file to say what articles are
19412 to be included in the group (@pxref{Scoring}).
19413
19414 @kindex M-x nnkiboze-generate-groups
19415 @findex nnkiboze-generate-groups
19416 You must run @kbd{M-x nnkiboze-generate-groups} after creating the
19417 @code{nnkiboze} groups you want to have.  This command will take time.
19418 Lots of time.  Oodles and oodles of time.  Gnus has to fetch the
19419 headers from all the articles in all the component groups and run them
19420 through the scoring process to determine if there are any articles in
19421 the groups that are to be part of the @code{nnkiboze} groups.
19422
19423 Please limit the number of component groups by using restrictive
19424 regexps.  Otherwise your sysadmin may become annoyed with you, and the
19425 @acronym{NNTP} site may throw you off and never let you back in again.
19426 Stranger things have happened.
19427
19428 @code{nnkiboze} component groups do not have to be alive---they can be dead,
19429 and they can be foreign.  No restrictions.
19430
19431 @vindex nnkiboze-directory
19432 The generation of an @code{nnkiboze} group means writing two files in
19433 @code{nnkiboze-directory}, which is @file{~/News/kiboze/} by default.
19434 One contains the @acronym{NOV} header lines for all the articles in
19435 the group, and the other is an additional @file{.newsrc} file to store
19436 information on what groups have been searched through to find
19437 component articles.
19438
19439 Articles marked as read in the @code{nnkiboze} group will have
19440 their @acronym{NOV} lines removed from the @acronym{NOV} file.
19441
19442
19443 @node Email Based Diary
19444 @section Email Based Diary
19445 @cindex diary
19446 @cindex email based diary
19447 @cindex calendar
19448
19449 This section describes a special mail back end called @code{nndiary},
19450 and its companion library @code{gnus-diary}.  It is ``special'' in the
19451 sense that it is not meant to be one of the standard alternatives for
19452 reading mail with Gnus.  See @ref{Choosing a Mail Back End} for that.
19453 Instead, it is used to treat @emph{some} of your mails in a special way,
19454 namely, as event reminders.
19455
19456 Here is a typical scenario:
19457
19458 @itemize @bullet
19459 @item
19460 You've got a date with Andy Mc Dowell or Bruce Willis (select according
19461 to your sexual preference) in one month.  You don't want to forget it.
19462 @item
19463 So you send a ``reminder'' message (actually, a diary one) to yourself.
19464 @item
19465 You forget all about it and keep on getting and reading new mail, as usual.
19466 @item
19467 From time to time, as you type `g' in the group buffer and as the date
19468 is getting closer, the message will pop up again to remind you of your
19469 appointment, just as if it were new and unread.
19470 @item
19471 Read your ``new'' messages, this one included, and start dreaming again
19472 of the night you're gonna have.
19473 @item
19474 Once the date is over (you actually fell asleep just after dinner), the
19475 message will be automatically deleted if it is marked as expirable.
19476 @end itemize
19477
19478 The Gnus Diary back end has the ability to handle regular appointments
19479 (that wouldn't ever be deleted) as well as punctual ones, operates as a
19480 real mail back end and is configurable in many ways.  All of this is
19481 explained in the sections below.
19482
19483 @menu
19484 * The NNDiary Back End::        Basic setup and usage.
19485 * The Gnus Diary Library::      Utility toolkit on top of nndiary.
19486 * Sending or Not Sending::      A final note on sending diary messages.
19487 @end menu
19488
19489
19490 @node The NNDiary Back End
19491 @subsection The NNDiary Back End
19492 @cindex nndiary
19493 @cindex the nndiary back end
19494
19495 @code{nndiary} is a back end very similar to @code{nnml} (@pxref{Mail
19496 Spool}).  Actually, it could appear as a mix of @code{nnml} and
19497 @code{nndraft}.  If you know @code{nnml}, you're already familiar with
19498 the message storing scheme of @code{nndiary}: one file per message, one
19499 directory per group.
19500
19501   Before anything, there is one requirement to be able to run
19502 @code{nndiary} properly: you @emph{must} use the group timestamp feature
19503 of Gnus.  This adds a timestamp to each group's parameters.  @ref{Group
19504 Timestamp} to see how it's done.
19505
19506 @menu
19507 * Diary Messages::              What makes a message valid for nndiary.
19508 * Running NNDiary::             NNDiary has two modes of operation.
19509 * Customizing NNDiary::         Bells and whistles.
19510 @end menu
19511
19512 @node Diary Messages
19513 @subsubsection Diary Messages
19514 @cindex nndiary messages
19515 @cindex nndiary mails
19516
19517 @code{nndiary} messages are just normal ones, except for the mandatory
19518 presence of 7 special headers.  These headers are of the form
19519 @code{X-Diary-<something>}, @code{<something>} being one of
19520 @code{Minute}, @code{Hour}, @code{Dom}, @code{Month}, @code{Year},
19521 @code{Time-Zone} and @code{Dow}.  @code{Dom} means ``Day of Month'', and
19522 @code{dow} means ``Day of Week''.  These headers actually behave like
19523 crontab specifications and define the event date(s):
19524
19525 @itemize @bullet
19526 @item
19527 For all headers except the @code{Time-Zone} one, a header value is
19528 either a star (meaning all possible values), or a list of fields
19529 (separated by a comma).
19530 @item
19531 A field is either an integer, or a range.
19532 @item
19533 A range is two integers separated by a dash.
19534 @item
19535 Possible integer values are 0--59 for @code{Minute}, 0--23 for
19536 @code{Hour}, 1--31 for @code{Dom}, 1--12 for @code{Month}, above 1971
19537 for @code{Year} and 0--6 for @code{Dow} (0 meaning Sunday).
19538 @item
19539 As a special case, a star in either @code{Dom} or @code{Dow} doesn't
19540 mean ``all possible values'', but ``use only the other field''.  Note
19541 that if both are star'ed, the use of either one gives the same result.
19542 @item
19543 The @code{Time-Zone} header is special in that it can only have one
19544 value (@code{GMT}, for instance).  A star doesn't mean ``all possible
19545 values'' (because it makes no sense), but ``the current local time
19546 zone''.  Most of the time, you'll be using a star here.  However, for a
19547 list of available time zone values, see the variable
19548 @code{nndiary-headers}.
19549 @end itemize
19550
19551 As a concrete example, here are the diary headers to add to your message
19552 for specifying ``Each Monday and each 1st of month, at 12:00, 20:00,
19553 21:00, 22:00, 23:00 and 24:00, from 1999 to 2010'' (I'll let you find
19554 what to do then):
19555
19556 @example
19557 X-Diary-Minute: 0
19558 X-Diary-Hour: 12, 20-24
19559 X-Diary-Dom: 1
19560 X-Diary-Month: *
19561 X-Diary-Year: 1999-2010
19562 X-Diary-Dow: 1
19563 X-Diary-Time-Zone: *
19564 @end example
19565
19566 @node Running NNDiary
19567 @subsubsection Running NNDiary
19568 @cindex running nndiary
19569 @cindex nndiary operation modes
19570
19571 @code{nndiary} has two modes of operation: ``traditional'' (the default)
19572 and ``autonomous''.  In traditional mode, @code{nndiary} does not get new
19573 mail by itself.  You have to move (@kbd{B m}) or copy (@kbd{B c}) mails
19574 from your primary mail back end to nndiary groups in order to handle them
19575 as diary messages.  In autonomous mode, @code{nndiary} retrieves its own
19576 mail and handles it independently from your primary mail back end.
19577
19578 One should note that Gnus is not inherently designed to allow several
19579 ``master'' mail back ends at the same time.  However, this does make
19580 sense with @code{nndiary}: you really want to send and receive diary
19581 messages to your diary groups directly.  So, @code{nndiary} supports
19582 being sort of a ``second primary mail back end'' (to my knowledge, it is
19583 the only back end offering this feature).  However, there is a limitation
19584 (which I hope to fix some day): respooling doesn't work in autonomous
19585 mode.
19586
19587 In order to use @code{nndiary} in autonomous mode, you have several
19588 things to do:
19589
19590 @itemize @bullet
19591 @item
19592 Allow @code{nndiary} to retrieve new mail by itself.  Put the following
19593 line in your @file{~/.gnus.el} file:
19594
19595 @lisp
19596 (setq nndiary-get-new-mail t)
19597 @end lisp
19598 @item
19599 You must arrange for diary messages (those containing @code{X-Diary-*}
19600 headers) to be split in a private folder @emph{before} Gnus treat them.
19601 Again, this is needed because Gnus cannot (yet ?) properly handle
19602 multiple primary mail back ends.  Getting those messages from a separate
19603 source will compensate this misfeature to some extent.
19604
19605 As an example, here's my procmailrc entry to store diary files in
19606 @file{~/.nndiary} (the default @code{nndiary} mail source file):
19607
19608 @example
19609 :0 HD :
19610 * ^X-Diary
19611 .nndiary
19612 @end example
19613 @end itemize
19614
19615 Once this is done, you might want to customize the following two options
19616 that affect the diary mail retrieval and splitting processes:
19617
19618 @defvar nndiary-mail-sources
19619 This is the diary-specific replacement for the standard
19620 @code{mail-sources} variable.  It obeys the same syntax, and defaults to
19621 @code{(file :path "~/.nndiary")}.
19622 @end defvar
19623
19624 @defvar nndiary-split-methods
19625 This is the diary-specific replacement for the standard
19626 @code{nnmail-split-methods} variable.  It obeys the same syntax.
19627 @end defvar
19628
19629   Finally, you may add a permanent @code{nndiary} virtual server
19630 (something like @code{(nndiary "diary")} should do) to your
19631 @code{gnus-secondary-select-methods}.
19632
19633   Hopefully, almost everything (see the TODO section in
19634 @file{nndiary.el}) will work as expected when you restart Gnus: in
19635 autonomous mode, typing @kbd{g} and @kbd{M-g} in the group buffer, will
19636 also get your new diary mails and split them according to your
19637 diary-specific rules, @kbd{F} will find your new diary groups etc.
19638
19639 @node Customizing NNDiary
19640 @subsubsection Customizing NNDiary
19641 @cindex customizing nndiary
19642 @cindex nndiary customization
19643
19644 Now that @code{nndiary} is up and running, it's time to customize it.
19645 The custom group is called @code{nndiary} (no, really ?!).  You should
19646 browse it to figure out which options you'd like to tweak.  The following
19647 two variables are probably the only ones you will want to change:
19648
19649 @defvar nndiary-reminders
19650 This is the list of times when you want to be reminded of your
19651 appointments (e.g. 3 weeks before, then 2 days before, then 1 hour
19652 before and that's it).  Remember that ``being reminded'' means that the
19653 diary message will pop up as brand new and unread again when you get new
19654 mail.
19655 @end defvar
19656
19657 @defvar nndiary-week-starts-on-monday
19658 Rather self-explanatory.  Otherwise, Sunday is assumed (this is the
19659 default).
19660 @end defvar
19661
19662
19663 @node The Gnus Diary Library
19664 @subsection The Gnus Diary Library
19665 @cindex gnus-diary
19666 @cindex the gnus diary library
19667
19668 Using @code{nndiary} manually (I mean, writing the headers by hand and
19669 so on) would be rather boring.  Fortunately, there is a library called
19670 @code{gnus-diary} written on top of @code{nndiary}, that does many
19671 useful things for you.
19672
19673   In order to use it, add the following line to your @file{~/.gnus.el} file:
19674
19675 @lisp
19676 (require 'gnus-diary)
19677 @end lisp
19678
19679   Also, you shouldn't use any @code{gnus-user-format-function-[d|D]}
19680 (@pxref{Summary Buffer Lines}).  @code{gnus-diary} provides both of these
19681 (sorry if you used them before).
19682
19683
19684 @menu
19685 * Diary Summary Line Format::           A nicer summary buffer line format.
19686 * Diary Articles Sorting::              A nicer way to sort messages.
19687 * Diary Headers Generation::            Not doing it manually.
19688 * Diary Group Parameters::              Not handling them manually.
19689 @end menu
19690
19691 @node Diary Summary Line Format
19692 @subsubsection Diary Summary Line Format
19693 @cindex diary summary buffer line
19694 @cindex diary summary line format
19695
19696 Displaying diary messages in standard summary line format (usually
19697 something like @samp{From Joe: Subject}) is pretty useless.  Most of
19698 the time, you're the one who wrote the message, and you mostly want to
19699 see the event's date.
19700
19701   @code{gnus-diary} provides two supplemental user formats to be used in
19702 summary line formats.  @code{D} corresponds to a formatted time string
19703 for the next occurrence of the event (e.g. ``Sat, Sep 22 01, 12:00''),
19704 while @code{d} corresponds to an approximative remaining time until the
19705 next occurrence of the event (e.g. ``in 6 months, 1 week'').
19706
19707   For example, here's how Joe's birthday is displayed in my
19708 @code{nndiary+diary:birthdays} summary buffer (note that the message is
19709 expirable, but will never be deleted, as it specifies a periodic event):
19710
19711 @example
19712    E  Sat, Sep 22 01, 12:00: Joe's birthday (in 6 months, 1 week)
19713 @end example
19714
19715 In order to get something like the above, you would normally add the
19716 following line to your diary groups'parameters:
19717
19718 @lisp
19719 (gnus-summary-line-format "%U%R%z %uD: %(%s%) (%ud)\n")
19720 @end lisp
19721
19722 However, @code{gnus-diary} does it automatically (@pxref{Diary Group
19723 Parameters}).  You can however customize the provided summary line format
19724 with the following user options:
19725
19726 @defvar gnus-diary-summary-line-format
19727 Defines the summary line format used for diary groups (@pxref{Summary
19728 Buffer Lines}).  @code{gnus-diary} uses it to automatically update the
19729 diary groups'parameters.
19730 @end defvar
19731
19732 @defvar gnus-diary-time-format
19733 Defines the format to display dates in diary summary buffers.  This is
19734 used by the @code{D} user format.  See the docstring for details.
19735 @end defvar
19736
19737 @defvar gnus-diary-delay-format-function
19738 Defines the format function to use for displaying delays (remaining
19739 times) in diary summary buffers.  This is used by the @code{d} user
19740 format.  There are currently built-in functions for English and French;
19741 you can also define your own.  See the docstring for details.
19742 @end defvar
19743
19744 @node Diary Articles Sorting
19745 @subsubsection Diary Articles Sorting
19746 @cindex diary articles sorting
19747 @cindex diary summary lines sorting
19748 @findex gnus-summary-sort-by-schedule
19749 @findex gnus-thread-sort-by-schedule
19750 @findex gnus-article-sort-by-schedule
19751
19752 @code{gnus-diary} provides new sorting functions (@pxref{Sorting the
19753 Summary Buffer} ) called @code{gnus-summary-sort-by-schedule},
19754 @code{gnus-thread-sort-by-schedule} and
19755 @code{gnus-article-sort-by-schedule}.  These functions let you organize
19756 your diary summary buffers from the closest event to the farthest one.
19757
19758 @code{gnus-diary} automatically installs
19759 @code{gnus-summary-sort-by-schedule} as a menu item in the summary
19760 buffer's ``sort'' menu, and the two others as the primary (hence
19761 default) sorting functions in the group parameters (@pxref{Diary Group
19762 Parameters}).
19763
19764 @node Diary Headers Generation
19765 @subsubsection Diary Headers Generation
19766 @cindex diary headers generation
19767 @findex gnus-diary-check-message
19768
19769 @code{gnus-diary} provides a function called
19770 @code{gnus-diary-check-message} to help you handle the @code{X-Diary-*}
19771 headers.  This function ensures that the current message contains all the
19772 required diary headers, and prompts you for values or corrections if
19773 needed.
19774
19775   This function is hooked into the @code{nndiary} back end, so that
19776 moving or copying an article to a diary group will trigger it
19777 automatically.  It is also bound to @kbd{C-c C-f d} in
19778 @code{message-mode} and @code{article-edit-mode} in order to ease the
19779 process of converting a usual mail to a diary one.
19780
19781   This function takes a prefix argument which will force prompting of
19782 all diary headers, regardless of their presence or validity.  That way,
19783 you can very easily reschedule an already valid diary message, for
19784 instance.
19785
19786 @node Diary Group Parameters
19787 @subsubsection Diary Group Parameters
19788 @cindex diary group parameters
19789
19790 When you create a new diary group, or visit one, @code{gnus-diary}
19791 automatically checks your group parameters and if needed, sets the
19792 summary line format to the diary-specific value, installs the
19793 diary-specific sorting functions, and also adds the different
19794 @code{X-Diary-*} headers to the group's posting-style.  It is then easier
19795 to send a diary message, because if you use @kbd{C-u a} or @kbd{C-u m}
19796 on a diary group to prepare a message, these headers will be inserted
19797 automatically (although not filled with proper values yet).
19798
19799 @node Sending or Not Sending
19800 @subsection Sending or Not Sending
19801
19802 Well, assuming you've read all of the above, here are two final notes on
19803 mail sending with @code{nndiary}:
19804
19805 @itemize @bullet
19806 @item
19807 @code{nndiary} is a @emph{real} mail back end.  You really send real diary
19808 messsages for real.  This means for instance that you can give
19809 appointments to anybody (provided they use Gnus and @code{nndiary}) by
19810 sending the diary message to them as well.
19811 @item
19812 However, since @code{nndiary} also has a @code{request-post} method, you
19813 can also use @kbd{C-u a} instead of @kbd{C-u m} on a diary group and the
19814 message won't actually be sent; just stored locally in the group. This
19815 comes in very handy for private appointments.
19816 @end itemize
19817
19818 @node Gnus Unplugged
19819 @section Gnus Unplugged
19820 @cindex offline
19821 @cindex unplugged
19822 @cindex agent
19823 @cindex Gnus agent
19824 @cindex Gnus unplugged
19825
19826 In olden times (ca. February '88), people used to run their newsreaders
19827 on big machines with permanent connections to the net.  News transport
19828 was dealt with by news servers, and all the newsreaders had to do was to
19829 read news.  Believe it or not.
19830
19831 Nowadays most people read news and mail at home, and use some sort of
19832 modem to connect to the net.  To avoid running up huge phone bills, it
19833 would be nice to have a way to slurp down all the news and mail, hang up
19834 the phone, read for several hours, and then upload any responses you
19835 have to make.  And then you repeat the procedure.
19836
19837 Of course, you can use news servers for doing this as well.  I've used
19838 @code{inn} together with @code{slurp}, @code{pop} and @code{sendmail}
19839 for some years, but doing that's a bore.  Moving the news server
19840 functionality up to the newsreader makes sense if you're the only person
19841 reading news on a machine.
19842
19843 Setting up Gnus as an ``offline'' newsreader is quite simple.  In
19844 fact, you don't have to configure anything as the agent is now enabled
19845 by default (@pxref{Agent Variables, gnus-agent}).
19846
19847 Of course, to use it as such, you have to learn a few new commands.
19848
19849 @menu
19850 * Agent Basics::                How it all is supposed to work.
19851 * Agent Categories::            How to tell the Gnus Agent what to download.
19852 * Agent Commands::              New commands for all the buffers.
19853 * Agent Visuals::               Ways that the agent may effect your summary buffer.
19854 * Agent as Cache::              The Agent is a big cache too.
19855 * Agent Expiry::                How to make old articles go away.
19856 * Agent Regeneration::          How to recover from lost connections and other accidents.
19857 * Agent and flags::             How the Agent maintains flags.
19858 * Agent and IMAP::              How to use the Agent with @acronym{IMAP}.
19859 * Outgoing Messages::           What happens when you post/mail something?
19860 * Agent Variables::             Customizing is fun.
19861 * Example Setup::               An example @file{~/.gnus.el} file for offline people.
19862 * Batching Agents::             How to fetch news from a @code{cron} job.
19863 * Agent Caveats::               What you think it'll do and what it does.
19864 @end menu
19865
19866
19867 @node Agent Basics
19868 @subsection Agent Basics
19869
19870 First, let's get some terminology out of the way.
19871
19872 The Gnus Agent is said to be @dfn{unplugged} when you have severed the
19873 connection to the net (and notified the Agent that this is the case).
19874 When the connection to the net is up again (and Gnus knows this), the
19875 Agent is @dfn{plugged}.
19876
19877 The @dfn{local} machine is the one you're running on, and which isn't
19878 connected to the net continuously.
19879
19880 @dfn{Downloading} means fetching things from the net to your local
19881 machine.  @dfn{Uploading} is doing the opposite.
19882
19883 You know that Gnus gives you all the opportunity you'd ever want for
19884 shooting yourself in the foot.  Some people call it flexibility.  Gnus
19885 is also customizable to a great extent, which means that the user has a
19886 say on how Gnus behaves.  Other newsreaders might unconditionally shoot
19887 you in your foot, but with Gnus, you have a choice!
19888
19889 Gnus is never really in plugged or unplugged state.  Rather, it applies
19890 that state to each server individually.  This means that some servers
19891 can be plugged while others can be unplugged.  Additionally, some
19892 servers can be ignored by the Agent altogether (which means that
19893 they're kinda like plugged always).
19894
19895 So when you unplug the Agent and then wonder why is Gnus opening a
19896 connection to the Net, the next step to do is to look whether all
19897 servers are agentized.  If there is an unagentized server, you found
19898 the culprit.
19899
19900 Another thing is the @dfn{offline} state.  Sometimes, servers aren't
19901 reachable.  When Gnus notices this, it asks you whether you want the
19902 server to be switched to offline state.  If you say yes, then the
19903 server will behave somewhat as if it was unplugged, except that Gnus
19904 will ask you whether you want to switch it back online again.
19905
19906 Let's take a typical Gnus session using the Agent.
19907
19908 @itemize @bullet
19909
19910 @item
19911 @findex gnus-unplugged
19912 You start Gnus with @code{gnus-unplugged}.  This brings up the Gnus
19913 Agent in a disconnected state.  You can read all the news that you have
19914 already fetched while in this mode.
19915
19916 @item
19917 You then decide to see whether any new news has arrived.  You connect
19918 your machine to the net (using PPP or whatever), and then hit @kbd{J j}
19919 to make Gnus become @dfn{plugged} and use @kbd{g} to check for new mail
19920 as usual.  To check for new mail in unplugged mode (@pxref{Mail
19921 Source Specifiers}).
19922
19923 @item
19924 You can then read the new news immediately, or you can download the
19925 news onto your local machine.  If you want to do the latter, you press
19926 @kbd{g} to check if there are any new news and then @kbd{J s} to fetch
19927 all the eligible articles in all the groups.  (To let Gnus know which
19928 articles you want to download, @pxref{Agent Categories}).
19929
19930 @item
19931 After fetching the articles, you press @kbd{J j} to make Gnus become
19932 unplugged again, and you shut down the PPP thing (or whatever).  And
19933 then you read the news offline.
19934
19935 @item
19936 And then you go to step 2.
19937 @end itemize
19938
19939 Here are some things you should do the first time (or so) that you use
19940 the Agent.
19941
19942 @itemize @bullet
19943
19944 @item
19945 Decide which servers should be covered by the Agent.  If you have a mail
19946 back end, it would probably be nonsensical to have it covered by the
19947 Agent.  Go to the server buffer (@kbd{^} in the group buffer) and press
19948 @kbd{J a} on the server (or servers) that you wish to have covered by the
19949 Agent (@pxref{Server Agent Commands}), or @kbd{J r} on automatically
19950 added servers you do not wish to have covered by the Agent.  By default,
19951 all @code{nntp} and @code{nnimap} servers in @code{gnus-select-method} and
19952 @code{gnus-secondary-select-methods} are agentized.
19953
19954 @item
19955 Decide on download policy.  It's fairly simple once you decide whether
19956 you are going to use agent categories, topic parameters, and/or group
19957 parameters to implement your policy.  If you're new to gnus, it
19958 is probably best to start with a category, @xref{Agent Categories}.
19959
19960 Both topic parameters (@pxref{Topic Parameters}) and agent categories
19961 (@pxref{Agent Categories}) provide for setting a policy that applies
19962 to multiple groups.  Which you use is entirely up to you.  Topic
19963 parameters do override categories so, if you mix the two, you'll have
19964 to take that into account.  If you have a few groups that deviate from
19965 your policy, you can use group parameters (@pxref{Group Parameters}) to
19966 configure them.
19967
19968 @item
19969 Uhm@dots{} that's it.
19970 @end itemize
19971
19972
19973 @node Agent Categories
19974 @subsection Agent Categories
19975
19976 One of the main reasons to integrate the news transport layer into the
19977 newsreader is to allow greater control over what articles to download.
19978 There's not much point in downloading huge amounts of articles, just to
19979 find out that you're not interested in reading any of them.  It's better
19980 to be somewhat more conservative in choosing what to download, and then
19981 mark the articles for downloading manually if it should turn out that
19982 you're interested in the articles anyway.
19983
19984 One of the more effective methods for controlling what is to be
19985 downloaded is to create a @dfn{category} and then assign some (or all)
19986 groups to this category.  Groups that do not belong in any other
19987 category belong to the @code{default} category.  Gnus has its own
19988 buffer for creating and managing categories.
19989
19990 If you prefer, you can also use group parameters (@pxref{Group
19991 Parameters}) and topic parameters (@pxref{Topic Parameters}) for an
19992 alternative approach to controlling the agent.  The only real
19993 difference is that categories are specific to the agent (so there is
19994 less to learn) while group and topic parameters include the kitchen
19995 sink.
19996
19997 Since you can set agent parameters in several different places we have
19998 a rule to decide which source to believe.  This rule specifies that
19999 the parameter sources are checked in the following order: group
20000 parameters, topic parameters, agent category, and finally customizable
20001 variables.  So you can mix all of these sources to produce a wide range
20002 of behavior, just don't blame me if you don't remember where you put
20003 your settings.
20004
20005 @menu
20006 * Category Syntax::             What a category looks like.
20007 * Category Buffer::             A buffer for maintaining categories.
20008 * Category Variables::          Customize'r'Us.
20009 @end menu
20010
20011
20012 @node Category Syntax
20013 @subsubsection Category Syntax
20014
20015 A category consists of a name, the list of groups belonging to the
20016 category, and a number of optional parameters that override the
20017 customizable variables.  The complete list of agent parameters are
20018 listed below.
20019
20020 @cindex Agent Parameters
20021 @table @code
20022 @item agent-groups
20023 The list of groups that are in this category.
20024
20025 @item agent-predicate
20026 A predicate which (generally) gives a rough outline of which articles
20027 are eligible for downloading; and
20028
20029 @item agent-score
20030 a score rule which (generally) gives you a finer granularity when
20031 deciding what articles to download.  (Note that this @dfn{download
20032 score} is not necessarily related to normal scores.)
20033
20034 @item agent-enable-expiration
20035 a boolean indicating whether the agent should expire old articles in
20036 this group.  Most groups should be expired to conserve disk space.  In
20037 fact, its probably safe to say that the gnus.* hierarchy contains the
20038 only groups that should not be expired.
20039
20040 @item agent-days-until-old
20041 an integer indicating the number of days that the agent should wait
20042 before deciding that a read article is safe to expire.
20043
20044 @item agent-low-score
20045 an integer that overrides the value of @code{gnus-agent-low-score}.
20046
20047 @item agent-high-score
20048 an integer that overrides the value of @code{gnus-agent-high-score}.
20049
20050 @item agent-short-article
20051 an integer that overrides the value of
20052 @code{gnus-agent-short-article}.
20053
20054 @item agent-long-article
20055 an integer that overrides the value of @code{gnus-agent-long-article}.
20056
20057 @item agent-enable-undownloaded-faces
20058 a symbol indicating whether the summary buffer should display
20059 undownloaded articles using the @code{gnus-summary-*-undownloaded-face}
20060 faces.  Any symbol other than @code{nil} will enable the use of
20061 undownloaded faces.
20062 @end table
20063
20064 The name of a category can not be changed once the category has been
20065 created.
20066
20067 Each category maintains a list of groups that are exclusive members of
20068 that category.  The exclusivity rule is automatically enforced, add a
20069 group to a new category and it is automatically removed from its old
20070 category.
20071
20072 A predicate in its simplest form can be a single predicate such as
20073 @code{true} or @code{false}.  These two will download every available
20074 article or nothing respectively.  In the case of these two special
20075 predicates an additional score rule is superfluous.
20076
20077 Predicates of @code{high} or @code{low} download articles in respect of
20078 their scores in relationship to @code{gnus-agent-high-score} and
20079 @code{gnus-agent-low-score} as described below.
20080
20081 To gain even finer control of what is to be regarded eligible for
20082 download a predicate can consist of a number of predicates with logical
20083 operators sprinkled in between.
20084
20085 Perhaps some examples are in order.
20086
20087 Here's a simple predicate.  (It's the default predicate, in fact, used
20088 for all groups that don't belong to any other category.)
20089
20090 @lisp
20091 short
20092 @end lisp
20093
20094 Quite simple, eh?  This predicate is true if and only if the article is
20095 short (for some value of ``short'').
20096
20097 Here's a more complex predicate:
20098
20099 @lisp
20100 (or high
20101     (and
20102      (not low)
20103      (not long)))
20104 @end lisp
20105
20106 This means that an article should be downloaded if it has a high score,
20107 or if the score is not low and the article is not long.  You get the
20108 drift.
20109
20110 The available logical operators are @code{or}, @code{and} and
20111 @code{not}.  (If you prefer, you can use the more ``C''-ish operators
20112 @samp{|}, @code{&} and @code{!} instead.)
20113
20114 The following predicates are pre-defined, but if none of these fit what
20115 you want to do, you can write your own.
20116
20117 When evaluating each of these predicates, the named constant will be
20118 bound to the value determined by calling
20119 @code{gnus-agent-find-parameter} on the appropriate parameter.  For
20120 example, gnus-agent-short-article will be bound to
20121 @code{(gnus-agent-find-parameter group 'agent-short-article)}.  This
20122 means that you can specify a predicate in your category then tune that
20123 predicate to individual groups.
20124
20125 @table @code
20126 @item short
20127 True if the article is shorter than @code{gnus-agent-short-article}
20128 lines; default 100.
20129
20130 @item long
20131 True if the article is longer than @code{gnus-agent-long-article}
20132 lines; default 200.
20133
20134 @item low
20135 True if the article has a download score less than
20136 @code{gnus-agent-low-score}; default 0.
20137
20138 @item high
20139 True if the article has a download score greater than
20140 @code{gnus-agent-high-score}; default 0.
20141
20142 @item spam
20143 True if the Gnus Agent guesses that the article is spam.  The
20144 heuristics may change over time, but at present it just computes a
20145 checksum and sees whether articles match.
20146
20147 @item true
20148 Always true.
20149
20150 @item false
20151 Always false.
20152 @end table
20153
20154 If you want to create your own predicate function, here's what you have
20155 to know:  The functions are called with no parameters, but the
20156 @code{gnus-headers} and @code{gnus-score} dynamic variables are bound to
20157 useful values.
20158
20159 For example, you could decide that you don't want to download articles
20160 that were posted more than a certain number of days ago (e.g. posted
20161 more than @code{gnus-agent-expire-days} ago) you might write a function
20162 something along the lines of the following:
20163
20164 @lisp
20165 (defun my-article-old-p ()
20166   "Say whether an article is old."
20167   (< (time-to-days (date-to-time (mail-header-date gnus-headers)))
20168      (- (time-to-days (current-time)) gnus-agent-expire-days)))
20169 @end lisp
20170
20171 with the predicate then defined as:
20172
20173 @lisp
20174 (not my-article-old-p)
20175 @end lisp
20176
20177 or you could append your predicate to the predefined
20178 @code{gnus-category-predicate-alist} in your @file{~/.gnus.el} or
20179 wherever.
20180
20181 @lisp
20182 (require 'gnus-agent)
20183 (setq  gnus-category-predicate-alist
20184   (append gnus-category-predicate-alist
20185          '((old . my-article-old-p))))
20186 @end lisp
20187
20188 and simply specify your predicate as:
20189
20190 @lisp
20191 (not old)
20192 @end lisp
20193
20194 If/when using something like the above, be aware that there are many
20195 misconfigured systems/mailers out there and so an article's date is not
20196 always a reliable indication of when it was posted.  Hell, some people
20197 just don't give a damn.
20198
20199 The above predicates apply to @emph{all} the groups which belong to the
20200 category.  However, if you wish to have a specific predicate for an
20201 individual group within a category, or you're just too lazy to set up a
20202 new category, you can enter a group's individual predicate in its group
20203 parameters like so:
20204
20205 @lisp
20206 (agent-predicate . short)
20207 @end lisp
20208
20209 This is the group/topic parameter equivalent of the agent category default.
20210 Note that when specifying a single word predicate like this, the
20211 @code{agent-predicate} specification must be in dotted pair notation.
20212
20213 The equivalent of the longer example from above would be:
20214
20215 @lisp
20216 (agent-predicate or high (and (not low) (not long)))
20217 @end lisp
20218
20219 The outer parenthesis required in the category specification are not
20220 entered here as, not being in dotted pair notation, the value of the
20221 predicate is assumed to be a list.
20222
20223
20224 Now, the syntax of the download score is the same as the syntax of
20225 normal score files, except that all elements that require actually
20226 seeing the article itself are verboten.  This means that only the
20227 following headers can be scored on: @code{Subject}, @code{From},
20228 @code{Date}, @code{Message-ID}, @code{References}, @code{Chars},
20229 @code{Lines}, and @code{Xref}.
20230
20231 As with predicates, the specification of the @code{download score rule}
20232 to use in respect of a group can be in either the category definition if
20233 it's to be applicable to all groups in therein, or a group's parameters
20234 if it's to be specific to that group.
20235
20236 In both of these places the @code{download score rule} can take one of
20237 three forms:
20238
20239 @enumerate
20240 @item
20241 Score rule
20242
20243 This has the same syntax as a normal Gnus score file except only a
20244 subset of scoring keywords are available as mentioned above.
20245
20246 example:
20247
20248 @itemize @bullet
20249 @item
20250 Category specification
20251
20252 @lisp
20253 (("from"
20254        ("Lars Ingebrigtsen" 1000000 nil s))
20255 ("lines"
20256        (500 -100 nil <)))
20257 @end lisp
20258
20259 @item
20260 Group/Topic Parameter specification
20261
20262 @lisp
20263 (agent-score ("from"
20264                    ("Lars Ingebrigtsen" 1000000 nil s))
20265              ("lines"
20266                    (500 -100 nil <)))
20267 @end lisp
20268
20269 Again, note the omission of the outermost parenthesis here.
20270 @end itemize
20271
20272 @item
20273 Agent score file
20274
20275 These score files must @emph{only} contain the permitted scoring
20276 keywords stated above.
20277
20278 example:
20279
20280 @itemize @bullet
20281 @item
20282 Category specification
20283
20284 @lisp
20285 ("~/News/agent.SCORE")
20286 @end lisp
20287
20288 or perhaps
20289
20290 @lisp
20291 ("~/News/agent.SCORE" "~/News/agent.group.SCORE")
20292 @end lisp
20293
20294 @item
20295 Group Parameter specification
20296
20297 @lisp
20298 (agent-score "~/News/agent.SCORE")
20299 @end lisp
20300
20301 Additional score files can be specified as above.  Need I say anything
20302 about parenthesis?
20303 @end itemize
20304
20305 @item
20306 Use @code{normal} score files
20307
20308 If you don't want to maintain two sets of scoring rules for a group, and
20309 your desired @code{downloading} criteria for a group are the same as your
20310 @code{reading} criteria then you can tell the agent to refer to your
20311 @code{normal} score files when deciding what to download.
20312
20313 These directives in either the category definition or a group's
20314 parameters will cause the agent to read in all the applicable score
20315 files for a group, @emph{filtering out} those sections that do not
20316 relate to one of the permitted subset of scoring keywords.
20317
20318 @itemize @bullet
20319 @item
20320 Category Specification
20321
20322 @lisp
20323 file
20324 @end lisp
20325
20326 @item
20327 Group Parameter specification
20328
20329 @lisp
20330 (agent-score . file)
20331 @end lisp
20332 @end itemize
20333 @end enumerate
20334
20335 @node Category Buffer
20336 @subsubsection Category Buffer
20337
20338 You'd normally do all category maintenance from the category buffer.
20339 When you enter it for the first time (with the @kbd{J c} command from
20340 the group buffer), you'll only see the @code{default} category.
20341
20342 The following commands are available in this buffer:
20343
20344 @table @kbd
20345 @item q
20346 @kindex q (Category)
20347 @findex gnus-category-exit
20348 Return to the group buffer (@code{gnus-category-exit}).
20349
20350 @item e
20351 @kindex e (Category)
20352 @findex gnus-category-customize-category
20353 Use a customization buffer to set all of the selected category's
20354 parameters at one time (@code{gnus-category-customize-category}).
20355
20356 @item k
20357 @kindex k (Category)
20358 @findex gnus-category-kill
20359 Kill the current category (@code{gnus-category-kill}).
20360
20361 @item c
20362 @kindex c (Category)
20363 @findex gnus-category-copy
20364 Copy the current category (@code{gnus-category-copy}).
20365
20366 @item a
20367 @kindex a (Category)
20368 @findex gnus-category-add
20369 Add a new category (@code{gnus-category-add}).
20370
20371 @item p
20372 @kindex p (Category)
20373 @findex gnus-category-edit-predicate
20374 Edit the predicate of the current category
20375 (@code{gnus-category-edit-predicate}).
20376
20377 @item g
20378 @kindex g (Category)
20379 @findex gnus-category-edit-groups
20380 Edit the list of groups belonging to the current category
20381 (@code{gnus-category-edit-groups}).
20382
20383 @item s
20384 @kindex s (Category)
20385 @findex gnus-category-edit-score
20386 Edit the download score rule of the current category
20387 (@code{gnus-category-edit-score}).
20388
20389 @item l
20390 @kindex l (Category)
20391 @findex gnus-category-list
20392 List all the categories (@code{gnus-category-list}).
20393 @end table
20394
20395
20396 @node Category Variables
20397 @subsubsection Category Variables
20398
20399 @table @code
20400 @item gnus-category-mode-hook
20401 @vindex gnus-category-mode-hook
20402 Hook run in category buffers.
20403
20404 @item gnus-category-line-format
20405 @vindex gnus-category-line-format
20406 Format of the lines in the category buffer (@pxref{Formatting
20407 Variables}).  Valid elements are:
20408
20409 @table @samp
20410 @item c
20411 The name of the category.
20412
20413 @item g
20414 The number of groups in the category.
20415 @end table
20416
20417 @item gnus-category-mode-line-format
20418 @vindex gnus-category-mode-line-format
20419 Format of the category mode line (@pxref{Mode Line Formatting}).
20420
20421 @item gnus-agent-short-article
20422 @vindex gnus-agent-short-article
20423 Articles that have fewer lines than this are short.  Default 100.
20424
20425 @item gnus-agent-long-article
20426 @vindex gnus-agent-long-article
20427 Articles that have more lines than this are long.  Default 200.
20428
20429 @item gnus-agent-low-score
20430 @vindex gnus-agent-low-score
20431 Articles that have a score lower than this have a low score.  Default
20432 0.
20433
20434 @item gnus-agent-high-score
20435 @vindex gnus-agent-high-score
20436 Articles that have a score higher than this have a high score.  Default
20437 0.
20438
20439 @item gnus-agent-expire-days
20440 @vindex gnus-agent-expire-days
20441 The number of days that a @samp{read} article must stay in the agent's
20442 local disk before becoming eligible for expiration (While the name is
20443 the same, this doesn't mean expiring the article on the server.  It
20444 just means deleting the local copy of the article).  What is also
20445 important to understand is that the counter starts with the time the
20446 article was written to the local disk and not the time the article was
20447 read.
20448 Default 7.
20449
20450 @item gnus-agent-enable-expiration
20451 @vindex gnus-agent-enable-expiration
20452 Determines whether articles in a group are, by default, expired or
20453 retained indefinitely.  The default is @code{ENABLE} which means that
20454 you'll have to disable expiration when desired.  On the other hand,
20455 you could set this to @code{DISABLE}.  In that case, you would then
20456 have to enable expiration in selected groups.
20457
20458 @end table
20459
20460
20461 @node Agent Commands
20462 @subsection Agent Commands
20463 @findex gnus-agent-toggle-plugged
20464 @kindex J j (Agent)
20465
20466 All the Gnus Agent commands are on the @kbd{J} submap.  The @kbd{J j}
20467 (@code{gnus-agent-toggle-plugged}) command works in all modes, and
20468 toggles the plugged/unplugged state of the Gnus Agent.
20469
20470
20471 @menu
20472 * Group Agent Commands::        Configure groups and fetch their contents.
20473 * Summary Agent Commands::      Manually select then fetch specific articles.
20474 * Server Agent Commands::       Select the servers that are supported by the agent.
20475 @end menu
20476
20477
20478
20479
20480 @node Group Agent Commands
20481 @subsubsection Group Agent Commands
20482
20483 @table @kbd
20484 @item J u
20485 @kindex J u (Agent Group)
20486 @findex gnus-agent-fetch-groups
20487 Fetch all eligible articles in the current group
20488 (@code{gnus-agent-fetch-groups}).
20489
20490 @item J c
20491 @kindex J c (Agent Group)
20492 @findex gnus-enter-category-buffer
20493 Enter the Agent category buffer (@code{gnus-enter-category-buffer}).
20494
20495 @item J s
20496 @kindex J s (Agent Group)
20497 @findex gnus-agent-fetch-session
20498 Fetch all eligible articles in all groups
20499 (@code{gnus-agent-fetch-session}).
20500
20501 @item J S
20502 @kindex J S (Agent Group)
20503 @findex gnus-group-send-queue
20504 Send all sendable messages in the queue group
20505 (@code{gnus-group-send-queue}).  @xref{Drafts}.
20506
20507 @item J a
20508 @kindex J a (Agent Group)
20509 @findex gnus-agent-add-group
20510 Add the current group to an Agent category
20511 (@code{gnus-agent-add-group}).  This command understands the
20512 process/prefix convention (@pxref{Process/Prefix}).
20513
20514 @item J r
20515 @kindex J r (Agent Group)
20516 @findex gnus-agent-remove-group
20517 Remove the current group from its category, if any
20518 (@code{gnus-agent-remove-group}).  This command understands the
20519 process/prefix convention (@pxref{Process/Prefix}).
20520
20521 @item J Y
20522 @kindex J Y (Agent Group)
20523 @findex gnus-agent-synchronize-flags
20524 Synchronize flags changed while unplugged with remote server, if any.
20525
20526
20527 @end table
20528
20529
20530 @node Summary Agent Commands
20531 @subsubsection Summary Agent Commands
20532
20533 @table @kbd
20534 @item J #
20535 @kindex J # (Agent Summary)
20536 @findex gnus-agent-mark-article
20537 Mark the article for downloading (@code{gnus-agent-mark-article}).
20538
20539 @item J M-#
20540 @kindex J M-# (Agent Summary)
20541 @findex gnus-agent-unmark-article
20542 Remove the downloading mark from the article
20543 (@code{gnus-agent-unmark-article}).
20544
20545 @cindex %
20546 @item @@
20547 @kindex @@ (Agent Summary)
20548 @findex gnus-agent-toggle-mark
20549 Toggle whether to download the article
20550 (@code{gnus-agent-toggle-mark}).  The download mark is @samp{%} by
20551 default.
20552
20553 @item J c
20554 @kindex J c (Agent Summary)
20555 @findex gnus-agent-catchup
20556 Mark all articles as read (@code{gnus-agent-catchup}) that are neither cached, downloaded, nor downloadable.
20557
20558 @item J S
20559 @kindex J S (Agent Summary)
20560 @findex gnus-agent-fetch-group
20561 Download all eligible (@pxref{Agent Categories}) articles in this group.
20562 (@code{gnus-agent-fetch-group}).
20563
20564 @item J s
20565 @kindex J s (Agent Summary)
20566 @findex gnus-agent-summary-fetch-series
20567 Download all processable articles in this group.
20568 (@code{gnus-agent-summary-fetch-series}).
20569
20570 @item J u
20571 @kindex J u (Agent Summary)
20572 @findex gnus-agent-summary-fetch-group
20573 Download all downloadable articles in the current group
20574 (@code{gnus-agent-summary-fetch-group}).
20575
20576 @end table
20577
20578
20579 @node Server Agent Commands
20580 @subsubsection Server Agent Commands
20581
20582 @table @kbd
20583 @item J a
20584 @kindex J a (Agent Server)
20585 @findex gnus-agent-add-server
20586 Add the current server to the list of servers covered by the Gnus Agent
20587 (@code{gnus-agent-add-server}).
20588
20589 @item J r
20590 @kindex J r (Agent Server)
20591 @findex gnus-agent-remove-server
20592 Remove the current server from the list of servers covered by the Gnus
20593 Agent (@code{gnus-agent-remove-server}).
20594
20595 @end table
20596
20597
20598 @node Agent Visuals
20599 @subsection Agent Visuals
20600
20601 If you open a summary while unplugged and, Gnus knows from the group's
20602 active range that there are more articles than the headers currently
20603 stored in the Agent, you may see some articles whose subject looks
20604 something like @samp{[Undownloaded article #####]}.  These are
20605 placeholders for the missing headers.  Aside from setting a mark,
20606 there is not much that can be done with one of these placeholders.
20607 When Gnus finally gets a chance to fetch the group's headers, the
20608 placeholders will automatically be replaced by the actual headers.
20609 You can configure the summary buffer's maneuvering to skip over the
20610 placeholders if you care (See @code{gnus-auto-goto-ignores}).
20611
20612 While it may be obvious to all, the only headers and articles
20613 available while unplugged are those headers and articles that were
20614 fetched into the Agent while previously plugged.  To put it another
20615 way, ``If you forget to fetch something while plugged, you might have a
20616 less than satisfying unplugged session''.  For this reason, the Agent
20617 adds two visual effects to your summary buffer.  These effects display
20618 the download status of each article so that you always know which
20619 articles will be available when unplugged.
20620
20621 The first visual effect is the @samp{%O} spec.  If you customize
20622 @code{gnus-summary-line-format} to include this specifier, you will add
20623 a single character field that indicates an article's download status.
20624 Articles that have been fetched into either the Agent or the Cache,
20625 will display @code{gnus-downloaded-mark} (defaults to @samp{+}).  All
20626 other articles will display @code{gnus-undownloaded-mark} (defaults to
20627 @samp{-}).  If you open a group that has not been agentized, a space
20628 (@samp{ }) will be displayed.
20629
20630 The second visual effect are the undownloaded faces.  The faces, there
20631 are three indicating the article's score (low, normal, high), seem to
20632 result in a love/hate response from many Gnus users.  The problem is
20633 that the face selection is controlled by a list of condition tests and
20634 face names (See @code{gnus-summary-highlight}).  Each condition is
20635 tested in the order in which it appears in the list so early
20636 conditions have precedence over later conditions.  All of this means
20637 that, if you tick an undownloaded article, the article will continue
20638 to be displayed in the undownloaded face rather than the ticked face.
20639
20640 If you use the Agent as a cache (to avoid downloading the same article
20641 each time you visit it or to minimize your connection time), the
20642 undownloaded face will probably seem like a good idea.  The reason
20643 being that you do all of our work (marking, reading, deleting) with
20644 downloaded articles so the normal faces always appear.  For those
20645 users using the agent to improve online performance by caching the NOV
20646 database (most users since 5.10.2), the undownloaded faces may appear
20647 to be an absolutely horrible idea.  The issue being that, since none
20648 of their articles have been fetched into the Agent, all of the
20649 normal faces will be obscured by the undownloaded faces.
20650
20651 If you would like to use the undownloaded faces, you must enable the
20652 undownloaded faces by setting the @code{agent-enable-undownloaded-faces}
20653 group parameter to @code{t}.  This parameter, like all other agent
20654 parameters, may be set on an Agent Category (@pxref{Agent Categories}),
20655 a Group Topic (@pxref{Topic Parameters}), or an individual group
20656 (@pxref{Group Parameters}).
20657
20658 The one problem common to all users using the agent is how quickly it
20659 can consume disk space.  If you using the agent on many groups, it is
20660 even more difficult to effectively recover disk space.  One solution
20661 is the @samp{%F} format available in @code{gnus-group-line-format}.
20662 This format will display the actual disk space used by articles
20663 fetched into both the agent and cache.  By knowing which groups use
20664 the most space, users know where to focus their efforts when ``agent
20665 expiring'' articles.
20666
20667 @node Agent as Cache
20668 @subsection Agent as Cache
20669
20670 When Gnus is plugged, it is not efficient to download headers or
20671 articles from the server again, if they are already stored in the
20672 Agent.  So, Gnus normally only downloads headers once, and stores them
20673 in the Agent.  These headers are later used when generating the summary
20674 buffer, regardless of whether you are plugged or unplugged.  Articles
20675 are not cached in the Agent by default though (that would potentially
20676 consume lots of disk space), but if you have already downloaded an
20677 article into the Agent, Gnus will not download the article from the
20678 server again but use the locally stored copy instead.
20679
20680 If you so desire, you can configure the agent (see @code{gnus-agent-cache}
20681 @pxref{Agent Variables}) to always download headers and articles while
20682 plugged.  Gnus will almost certainly be slower, but it will be kept
20683 synchronized with the server.  That last point probably won't make any
20684 sense if you are using a nntp or nnimap back end.
20685
20686 @node Agent Expiry
20687 @subsection Agent Expiry
20688
20689 @vindex gnus-agent-expire-days
20690 @findex gnus-agent-expire
20691 @kindex M-x gnus-agent-expire
20692 @kindex M-x gnus-agent-expire-group
20693 @findex gnus-agent-expire-group
20694 @cindex agent expiry
20695 @cindex Gnus agent expiry
20696 @cindex expiry, in Gnus agent
20697
20698 The Agent back end, @code{nnagent}, doesn't handle expiry.  Well, at
20699 least it doesn't handle it like other back ends.  Instead, there are
20700 special @code{gnus-agent-expire} and @code{gnus-agent-expire-group}
20701 commands that will expire all read articles that are older than
20702 @code{gnus-agent-expire-days} days.  They can be run whenever you feel
20703 that you're running out of space.  Neither are particularly fast or
20704 efficient, and it's not a particularly good idea to interrupt them (with
20705 @kbd{C-g} or anything else) once you've started one of them.
20706
20707 Note that other functions, e.g. @code{gnus-request-expire-articles},
20708 might run @code{gnus-agent-expire} for you to keep the agent
20709 synchronized with the group.
20710
20711 The agent parameter @code{agent-enable-expiration} may be used to
20712 prevent expiration in selected groups.
20713
20714 @vindex gnus-agent-expire-all
20715 If @code{gnus-agent-expire-all} is non-@code{nil}, the agent
20716 expiration commands will expire all articles---unread, read, ticked
20717 and dormant.  If @code{nil} (which is the default), only read articles
20718 are eligible for expiry, and unread, ticked and dormant articles will
20719 be kept indefinitely.
20720
20721 If you find that some articles eligible for expiry are never expired,
20722 perhaps some Gnus Agent files are corrupted.  There's are special
20723 commands, @code{gnus-agent-regenerate} and
20724 @code{gnus-agent-regenerate-group}, to fix possible problems.
20725
20726 @node Agent Regeneration
20727 @subsection Agent Regeneration
20728
20729 @cindex agent regeneration
20730 @cindex Gnus agent regeneration
20731 @cindex regeneration
20732
20733 The local data structures used by @code{nnagent} may become corrupted
20734 due to certain exceptional conditions.  When this happens,
20735 @code{nnagent} functionality may degrade or even fail.  The solution
20736 to this problem is to repair the local data structures by removing all
20737 internal inconsistencies.
20738
20739 For example, if your connection to your server is lost while
20740 downloaded articles into the agent, the local data structures will not
20741 know about articles successfully downloaded prior to the connection
20742 failure.  Running @code{gnus-agent-regenerate} or
20743 @code{gnus-agent-regenerate-group} will update the data structures
20744 such that you don't need to download these articles a second time.
20745
20746 @findex gnus-agent-regenerate
20747 @kindex M-x gnus-agent-regenerate
20748 The command @code{gnus-agent-regenerate} will perform
20749 @code{gnus-agent-regenerate-group} on every agentized group.  While
20750 you can run @code{gnus-agent-regenerate} in any buffer, it is strongly
20751 recommended that you first close all summary buffers.
20752
20753 @findex gnus-agent-regenerate-group
20754 @kindex M-x gnus-agent-regenerate-group
20755 The command @code{gnus-agent-regenerate-group} uses the local copies
20756 of individual articles to repair the local @acronym{NOV}(header) database.  It
20757 then updates the internal data structures that document which articles
20758 are stored locally.  An optional argument will mark articles in the
20759 agent as unread.
20760
20761 @node Agent and flags
20762 @subsection Agent and flags
20763
20764 The Agent works with any Gnus back end including those, such as
20765 nnimap, that store flags (read, ticked, etc) on the server.  Sadly,
20766 the Agent does not actually know which backends keep their flags in
20767 the backend server rather than in @file{.newsrc}.  This means that the
20768 Agent, while unplugged or disconnected, will always record all changes
20769 to the flags in its own files.
20770
20771 When you plug back in, Gnus will then check to see if you have any
20772 changed any flags and ask if you wish to synchronize these with the
20773 server.  This behavior is customizable by @code{gnus-agent-synchronize-flags}.
20774
20775 @vindex gnus-agent-synchronize-flags
20776 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
20777 never automatically synchronize flags.  If it is @code{ask}, which is
20778 the default, the Agent will check if you made any changes and if so
20779 ask if you wish to synchronize these when you re-connect.  If it has
20780 any other value, all flags will be synchronized automatically.
20781
20782 If you do not wish to synchronize flags automatically when you
20783 re-connect, you can do it manually with the
20784 @code{gnus-agent-synchronize-flags} command that is bound to @kbd{J Y}
20785 in the group buffer.
20786
20787 Technical note: the synchronization algorithm does not work by ``pushing''
20788 all local flags to the server, but rather by incrementally updated the
20789 server view of flags by changing only those flags that were changed by
20790 the user.  Thus, if you set one flag on an article, quit the group then
20791 re-select the group and remove the flag; the flag will be set and
20792 removed from the server when you ``synchronize''.  The queued flag
20793 operations can be found in the per-server @code{flags} file in the Agent
20794 directory.  It's emptied when you synchronize flags.
20795
20796 @node Agent and IMAP
20797 @subsection Agent and IMAP
20798
20799 The Agent works with any Gnus back end, including nnimap.  However,
20800 since there are some conceptual differences between @acronym{NNTP} and
20801 @acronym{IMAP}, this section (should) provide you with some information to
20802 make Gnus Agent work smoother as a @acronym{IMAP} Disconnected Mode client.
20803
20804 Some things are currently not implemented in the Agent that you'd might
20805 expect from a disconnected @acronym{IMAP} client, including:
20806
20807 @itemize @bullet
20808
20809 @item
20810 Copying/moving articles into nnimap groups when unplugged.
20811
20812 @item
20813 Creating/deleting nnimap groups when unplugged.
20814
20815 @end itemize
20816
20817 @node Outgoing Messages
20818 @subsection Outgoing Messages
20819
20820 By default, when Gnus is unplugged, all outgoing messages (both mail
20821 and news) are stored in the draft group ``queue'' (@pxref{Drafts}).
20822 You can view them there after posting, and edit them at will.
20823
20824 You can control the circumstances under which outgoing mail is queued
20825 (see @code{gnus-agent-queue-mail}, @pxref{Agent Variables}).  Outgoing
20826 news is always queued when Gnus is unplugged, and never otherwise.
20827
20828 You can send the messages either from the draft group with the special
20829 commands available there, or you can use the @kbd{J S} command in the
20830 group buffer to send all the sendable messages in the draft group.
20831 Posting news will only work when Gnus is plugged, but you can send
20832 mail at any time.
20833
20834 If sending mail while unplugged does not work for you and you worry
20835 about hitting @kbd{J S} by accident when unplugged, you can have Gnus
20836 ask you to confirm your action (see
20837 @code{gnus-agent-prompt-send-queue}, @pxref{Agent Variables}).
20838
20839 @node Agent Variables
20840 @subsection Agent Variables
20841
20842 @table @code
20843 @item gnus-agent
20844 @vindex gnus-agent
20845 Is the agent enabled?  The default is @code{t}.  When first enabled,
20846 the agent will use @code{gnus-agent-auto-agentize-methods} to
20847 automatically mark some back ends as agentized.  You may change which
20848 back ends are agentized using the agent commands in the server buffer.
20849
20850 To enter the server buffer, use the @kbd{^}
20851 (@code{gnus-group-enter-server-mode}) command in the group buffer.
20852
20853
20854 @item gnus-agent-directory
20855 @vindex gnus-agent-directory
20856 Where the Gnus Agent will store its files.  The default is
20857 @file{~/News/agent/}.
20858
20859 @item gnus-agent-handle-level
20860 @vindex gnus-agent-handle-level
20861 Groups on levels (@pxref{Group Levels}) higher than this variable will
20862 be ignored by the Agent.  The default is @code{gnus-level-subscribed},
20863 which means that only subscribed group will be considered by the Agent
20864 by default.
20865
20866 @item gnus-agent-plugged-hook
20867 @vindex gnus-agent-plugged-hook
20868 Hook run when connecting to the network.
20869
20870 @item gnus-agent-unplugged-hook
20871 @vindex gnus-agent-unplugged-hook
20872 Hook run when disconnecting from the network.
20873
20874 @item gnus-agent-fetched-hook
20875 @vindex gnus-agent-fetched-hook
20876 Hook run when finished fetching articles.
20877
20878 @item gnus-agent-cache
20879 @vindex gnus-agent-cache
20880 Variable to control whether use the locally stored @acronym{NOV} and
20881 articles when plugged, e.g. essentially using the Agent as a cache.
20882 The default is non-@code{nil}, which means to use the Agent as a cache.
20883
20884 @item gnus-agent-go-online
20885 @vindex gnus-agent-go-online
20886 If @code{gnus-agent-go-online} is @code{nil}, the Agent will never
20887 automatically switch offline servers into online status.  If it is
20888 @code{ask}, the default, the Agent will ask if you wish to switch
20889 offline servers into online status when you re-connect.  If it has any
20890 other value, all offline servers will be automatically switched into
20891 online status.
20892
20893 @item gnus-agent-mark-unread-after-downloaded
20894 @vindex gnus-agent-mark-unread-after-downloaded
20895 If @code{gnus-agent-mark-unread-after-downloaded} is non-@code{nil},
20896 mark articles as unread after downloading.  This is usually a safe
20897 thing to do as the newly downloaded article has obviously not been
20898 read.  The default is @code{t}.
20899
20900 @item gnus-agent-synchronize-flags
20901 @vindex gnus-agent-synchronize-flags
20902 If @code{gnus-agent-synchronize-flags} is @code{nil}, the Agent will
20903 never automatically synchronize flags.  If it is @code{ask}, which is
20904 the default, the Agent will check if you made any changes and if so
20905 ask if you wish to synchronize these when you re-connect.  If it has
20906 any other value, all flags will be synchronized automatically.
20907
20908 @item gnus-agent-consider-all-articles
20909 @vindex gnus-agent-consider-all-articles
20910 If @code{gnus-agent-consider-all-articles} is non-@code{nil}, the
20911 agent will let the agent predicate decide whether articles need to be
20912 downloaded or not, for all articles.  When @code{nil}, the default,
20913 the agent will only let the predicate decide whether unread articles
20914 are downloaded or not.  If you enable this, you may also want to look
20915 into the agent expiry settings (@pxref{Category Variables}), so that
20916 the agent doesn't download articles which the agent will later expire,
20917 over and over again.
20918
20919 @item gnus-agent-max-fetch-size
20920 @vindex gnus-agent-max-fetch-size
20921 The agent fetches articles into a temporary buffer prior to parsing
20922 them into individual files.  To avoid exceeding the max. buffer size,
20923 the agent alternates between fetching and parsing until all articles
20924 have been fetched.  @code{gnus-agent-max-fetch-size} provides a size
20925 limit to control how often the cycling occurs.  A large value improves
20926 performance.  A small value minimizes the time lost should the
20927 connection be lost while fetching (You may need to run
20928 @code{gnus-agent-regenerate-group} to update the group's state.
20929 However, all articles parsed prior to loosing the connection will be
20930 available while unplugged).  The default is 10M so it is unusual to
20931 see any cycling.
20932
20933 @item gnus-server-unopen-status
20934 @vindex gnus-server-unopen-status
20935 Perhaps not an Agent variable, but closely related to the Agent, this
20936 variable says what will happen if Gnus cannot open a server.  If the
20937 Agent is enabled, the default, @code{nil}, makes Gnus ask the user
20938 whether to deny the server or whether to unplug the agent.  If the
20939 Agent is disabled, Gnus always simply deny the server.  Other choices
20940 for this variable include @code{denied} and @code{offline} the latter
20941 is only valid if the Agent is used.
20942
20943 @item gnus-auto-goto-ignores
20944 @vindex gnus-auto-goto-ignores
20945 Another variable that isn't an Agent variable, yet so closely related
20946 that most will look for it here, this variable tells the summary
20947 buffer how to maneuver around undownloaded (only headers stored in the
20948 agent) and unfetched (neither article nor headers stored) articles.
20949
20950 The valid values are @code{nil} (maneuver to any article),
20951 @code{undownloaded} (maneuvering while unplugged ignores articles that
20952 have not been fetched), @code{always-undownloaded} (maneuvering always
20953 ignores articles that have not been fetched), @code{unfetched}
20954 (maneuvering ignores articles whose headers have not been fetched).
20955
20956 @item gnus-agent-queue-mail
20957 @vindex gnus-agent-queue-mail
20958 When @code{gnus-agent-queue-mail} is @code{always}, Gnus will always
20959 queue mail rather than sending it straight away.  When @code{t}, Gnus
20960 will queue mail when unplugged only.  When @code{nil}, never queue
20961 mail.  The default is @code{t}.
20962
20963 @item gnus-agent-prompt-send-queue
20964 @vindex gnus-agent-prompt-send-queue
20965 When @code{gnus-agent-prompt-send-queue} is non-@code{nil} Gnus will
20966 prompt you to confirm that you really wish to proceed if you hit
20967 @kbd{J S} while unplugged.  The default is @code{nil}.
20968
20969 @item gnus-agent-auto-agentize-methods
20970 @vindex gnus-agent-auto-agentize-methods
20971 If you have never used the Agent before (or more technically, if
20972 @file{~/News/agent/lib/servers} does not exist), Gnus will
20973 automatically agentize a few servers for you.  This variable control
20974 which back ends should be auto-agentized.  It is typically only useful
20975 to agentize remote back ends.  The auto-agentizing has the same effect
20976 as running @kbd{J a} on the servers (@pxref{Server Agent Commands}).
20977 If the file exist, you must manage the servers manually by adding or
20978 removing them, this variable is only applicable the first time you
20979 start Gnus.  The default is @samp{(nntp nnimap)}.
20980
20981 @end table
20982
20983
20984 @node Example Setup
20985 @subsection Example Setup
20986
20987 If you don't want to read this manual, and you have a fairly standard
20988 setup, you may be able to use something like the following as your
20989 @file{~/.gnus.el} file to get started.
20990
20991 @lisp
20992 ;; @r{Define how Gnus is to fetch news.  We do this over @acronym{NNTP}}
20993 ;; @r{from your ISP's server.}
20994 (setq gnus-select-method '(nntp "news.your-isp.com"))
20995
20996 ;; @r{Define how Gnus is to read your mail.  We read mail from}
20997 ;; @r{your ISP's @acronym{POP} server.}
20998 (setq mail-sources '((pop :server "pop.your-isp.com")))
20999
21000 ;; @r{Say how Gnus is to store the mail.  We use nnml groups.}
21001 (setq gnus-secondary-select-methods '((nnml "")))
21002
21003 ;; @r{Make Gnus into an offline newsreader.}
21004 ;; (gnus-agentize) ; @r{The obsolete setting.}
21005 ;; (setq gnus-agent t) ; @r{Now the default.}
21006 @end lisp
21007
21008 That should be it, basically.  Put that in your @file{~/.gnus.el} file,
21009 edit to suit your needs, start up PPP (or whatever), and type @kbd{M-x
21010 gnus}.
21011
21012 If this is the first time you've run Gnus, you will be subscribed
21013 automatically to a few default newsgroups.  You'll probably want to
21014 subscribe to more groups, and to do that, you have to query the
21015 @acronym{NNTP} server for a complete list of groups with the @kbd{A A}
21016 command.  This usually takes quite a while, but you only have to do it
21017 once.
21018
21019 After reading and parsing a while, you'll be presented with a list of
21020 groups.  Subscribe to the ones you want to read with the @kbd{u}
21021 command.  @kbd{l} to make all the killed groups disappear after you've
21022 subscribe to all the groups you want to read.  (@kbd{A k} will bring
21023 back all the killed groups.)
21024
21025 You can now read the groups at once, or you can download the articles
21026 with the @kbd{J s} command.  And then read the rest of this manual to
21027 find out which of the other gazillion things you want to customize.
21028
21029
21030 @node Batching Agents
21031 @subsection Batching Agents
21032 @findex gnus-agent-batch
21033
21034 Having the Gnus Agent fetch articles (and post whatever messages you've
21035 written) is quite easy once you've gotten things set up properly.  The
21036 following shell script will do everything that is necessary:
21037
21038 You can run a complete batch command from the command line with the
21039 following incantation:
21040
21041 @example
21042 #!/bin/sh
21043 emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-agent-batch >/dev/null 2>&1
21044 @end example
21045
21046
21047 @node Agent Caveats
21048 @subsection Agent Caveats
21049
21050 The Gnus Agent doesn't seem to work like most other offline
21051 newsreaders.  Here are some common questions that some imaginary people
21052 may ask:
21053
21054 @table @dfn
21055 @item If I read an article while plugged, do they get entered into the Agent?
21056
21057 @strong{No}.  If you want this behavior, add
21058 @code{gnus-agent-fetch-selected-article} to
21059 @code{gnus-select-article-hook}.
21060
21061 @item If I read an article while plugged, and the article already exists in
21062 the Agent, will it get downloaded once more?
21063
21064 @strong{No}, unless @code{gnus-agent-cache} is @code{nil}.
21065
21066 @end table
21067
21068 In short, when Gnus is unplugged, it only looks into the locally stored
21069 articles; when it's plugged, it talks to your ISP and may also use the
21070 locally stored articles.
21071
21072
21073 @node Scoring
21074 @chapter Scoring
21075 @cindex scoring
21076
21077 Other people use @dfn{kill files}, but we here at Gnus Towers like
21078 scoring better than killing, so we'd rather switch than fight.  They do
21079 something completely different as well, so sit up straight and pay
21080 attention!
21081
21082 @vindex gnus-summary-mark-below
21083 All articles have a default score (@code{gnus-summary-default-score}),
21084 which is 0 by default.  This score may be raised or lowered either
21085 interactively or by score files.  Articles that have a score lower than
21086 @code{gnus-summary-mark-below} are marked as read.
21087
21088 Gnus will read any @dfn{score files} that apply to the current group
21089 before generating the summary buffer.
21090
21091 There are several commands in the summary buffer that insert score
21092 entries based on the current article.  You can, for instance, ask Gnus to
21093 lower or increase the score of all articles with a certain subject.
21094
21095 There are two sorts of scoring entries: Permanent and temporary.
21096 Temporary score entries are self-expiring entries.  Any entries that are
21097 temporary and have not been used for, say, a week, will be removed
21098 silently to help keep the sizes of the score files down.
21099
21100 @menu
21101 * Summary Score Commands::      Adding score entries for the current group.
21102 * Group Score Commands::        General score commands.
21103 * Score Variables::             Customize your scoring.  (My, what terminology).
21104 * Score File Format::           What a score file may contain.
21105 * Score File Editing::          You can edit score files by hand as well.
21106 * Adaptive Scoring::            Big Sister Gnus knows what you read.
21107 * Home Score File::             How to say where new score entries are to go.
21108 * Followups To Yourself::       Having Gnus notice when people answer you.
21109 * Scoring On Other Headers::    Scoring on non-standard headers.
21110 * Scoring Tips::                How to score effectively.
21111 * Reverse Scoring::             That problem child of old is not problem.
21112 * Global Score Files::          Earth-spanning, ear-splitting score files.
21113 * Kill Files::                  They are still here, but they can be ignored.
21114 * Converting Kill Files::       Translating kill files to score files.
21115 * Advanced Scoring::            Using logical expressions to build score rules.
21116 * Score Decays::                It can be useful to let scores wither away.
21117 @end menu
21118
21119
21120 @node Summary Score Commands
21121 @section Summary Score Commands
21122 @cindex score commands
21123
21124 The score commands that alter score entries do not actually modify real
21125 score files.  That would be too inefficient.  Gnus maintains a cache of
21126 previously loaded score files, one of which is considered the
21127 @dfn{current score file alist}.  The score commands simply insert
21128 entries into this list, and upon group exit, this list is saved.
21129
21130 The current score file is by default the group's local score file, even
21131 if no such score file actually exists.  To insert score commands into
21132 some other score file (e.g. @file{all.SCORE}), you must first make this
21133 score file the current one.
21134
21135 General score commands that don't actually change the score file:
21136
21137 @table @kbd
21138
21139 @item V s
21140 @kindex V s (Summary)
21141 @findex gnus-summary-set-score
21142 Set the score of the current article (@code{gnus-summary-set-score}).
21143
21144 @item V S
21145 @kindex V S (Summary)
21146 @findex gnus-summary-current-score
21147 Display the score of the current article
21148 (@code{gnus-summary-current-score}).
21149
21150 @item V t
21151 @kindex V t (Summary)
21152 @findex gnus-score-find-trace
21153 Display all score rules that have been used on the current article
21154 (@code{gnus-score-find-trace}).  In the @code{*Score Trace*} buffer, you
21155 may type @kbd{e} to edit score file corresponding to the score rule on
21156 current line and @kbd{f} to format (@code{gnus-score-pretty-print}) the
21157 score file and edit it.
21158
21159 @item V w
21160 @kindex V w (Summary)
21161 @findex gnus-score-find-favourite-words
21162 List words used in scoring (@code{gnus-score-find-favourite-words}).
21163
21164 @item V R
21165 @kindex V R (Summary)
21166 @findex gnus-summary-rescore
21167 Run the current summary through the scoring process
21168 (@code{gnus-summary-rescore}).  This might be useful if you're playing
21169 around with your score files behind Gnus' back and want to see the
21170 effect you're having.
21171
21172 @item V c
21173 @kindex V c (Summary)
21174 @findex gnus-score-change-score-file
21175 Make a different score file the current
21176 (@code{gnus-score-change-score-file}).
21177
21178 @item V e
21179 @kindex V e (Summary)
21180 @findex gnus-score-edit-current-scores
21181 Edit the current score file (@code{gnus-score-edit-current-scores}).
21182 You will be popped into a @code{gnus-score-mode} buffer (@pxref{Score
21183 File Editing}).
21184
21185 @item V f
21186 @kindex V f (Summary)
21187 @findex gnus-score-edit-file
21188 Edit a score file and make this score file the current one
21189 (@code{gnus-score-edit-file}).
21190
21191 @item V F
21192 @kindex V F (Summary)
21193 @findex gnus-score-flush-cache
21194 Flush the score cache (@code{gnus-score-flush-cache}).  This is useful
21195 after editing score files.
21196
21197 @item V C
21198 @kindex V C (Summary)
21199 @findex gnus-score-customize
21200 Customize a score file in a visually pleasing manner
21201 (@code{gnus-score-customize}).
21202
21203 @end table
21204
21205 The rest of these commands modify the local score file.
21206
21207 @table @kbd
21208
21209 @item V m
21210 @kindex V m (Summary)
21211 @findex gnus-score-set-mark-below
21212 Prompt for a score, and mark all articles with a score below this as
21213 read (@code{gnus-score-set-mark-below}).
21214
21215 @item V x
21216 @kindex V x (Summary)
21217 @findex gnus-score-set-expunge-below
21218 Prompt for a score, and add a score rule to the current score file to
21219 expunge all articles below this score
21220 (@code{gnus-score-set-expunge-below}).
21221 @end table
21222
21223 The keystrokes for actually making score entries follow a very regular
21224 pattern, so there's no need to list all the commands.  (Hundreds of
21225 them.)
21226
21227 @findex gnus-summary-increase-score
21228 @findex gnus-summary-lower-score
21229
21230 @enumerate
21231 @item
21232 The first key is either @kbd{I} (upper case i) for increasing the score
21233 or @kbd{L} for lowering the score.
21234 @item
21235 The second key says what header you want to score on.  The following
21236 keys are available:
21237 @table @kbd
21238
21239 @item a
21240 Score on the author name.
21241
21242 @item s
21243 Score on the subject line.
21244
21245 @item x
21246 Score on the @code{Xref} line---i.e., the cross-posting line.
21247
21248 @item r
21249 Score on the @code{References} line.
21250
21251 @item d
21252 Score on the date.
21253
21254 @item l
21255 Score on the number of lines.
21256
21257 @item i
21258 Score on the @code{Message-ID} header.
21259
21260 @item e
21261 Score on an ``extra'' header, that is, one of those in gnus-extra-headers,
21262 if your @acronym{NNTP} server tracks additional header data in overviews.
21263
21264 @item f
21265 Score on followups---this matches the author name, and adds scores to
21266 the followups to this author.  (Using this key leads to the creation of
21267 @file{ADAPT} files.)
21268
21269 @item b
21270 Score on the body.
21271
21272 @item h
21273 Score on the head.
21274
21275 @item t
21276 Score on thread.  (Using this key leads to the creation of @file{ADAPT}
21277 files.)
21278
21279 @end table
21280
21281 @item
21282 The third key is the match type.  Which match types are valid depends on
21283 what headers you are scoring on.
21284
21285 @table @code
21286
21287 @item strings
21288
21289 @table @kbd
21290
21291 @item e
21292 Exact matching.
21293
21294 @item s
21295 Substring matching.
21296
21297 @item f
21298 Fuzzy matching (@pxref{Fuzzy Matching}).
21299
21300 @item r
21301 Regexp matching
21302 @end table
21303
21304 @item date
21305 @table @kbd
21306
21307 @item b
21308 Before date.
21309
21310 @item a
21311 After date.
21312
21313 @item n
21314 This date.
21315 @end table
21316
21317 @item number
21318 @table @kbd
21319
21320 @item <
21321 Less than number.
21322
21323 @item =
21324 Equal to number.
21325
21326 @item >
21327 Greater than number.
21328 @end table
21329 @end table
21330
21331 @item
21332 The fourth and usually final key says whether this is a temporary (i.e.,
21333 expiring) score entry, or a permanent (i.e., non-expiring) score entry,
21334 or whether it is to be done immediately, without adding to the score
21335 file.
21336 @table @kbd
21337
21338 @item t
21339 Temporary score entry.
21340
21341 @item p
21342 Permanent score entry.
21343
21344 @item i
21345 Immediately scoring.
21346 @end table
21347
21348 @item
21349 If you are scoring on `e' (extra) headers, you will then be prompted for
21350 the header name on which you wish to score.  This must be a header named
21351 in gnus-extra-headers, and @samp{TAB} completion is available.
21352
21353 @end enumerate
21354
21355 So, let's say you want to increase the score on the current author with
21356 exact matching permanently: @kbd{I a e p}.  If you want to lower the
21357 score based on the subject line, using substring matching, and make a
21358 temporary score entry: @kbd{L s s t}.  Pretty easy.
21359
21360 To make things a bit more complicated, there are shortcuts.  If you use
21361 a capital letter on either the second or third keys, Gnus will use
21362 defaults for the remaining one or two keystrokes.  The defaults are
21363 ``substring'' and ``temporary''.  So @kbd{I A} is the same as @kbd{I a s
21364 t}, and @kbd{I a R} is the same as @kbd{I a r t}.
21365
21366 These functions take both the numerical prefix and the symbolic prefix
21367 (@pxref{Symbolic Prefixes}).  A numerical prefix says how much to lower
21368 (or increase) the score of the article.  A symbolic prefix of @code{a}
21369 says to use the @file{all.SCORE} file for the command instead of the
21370 current score file.
21371
21372 @vindex gnus-score-mimic-keymap
21373 The @code{gnus-score-mimic-keymap} says whether these commands will
21374 pretend they are keymaps or not.
21375
21376
21377 @node Group Score Commands
21378 @section Group Score Commands
21379 @cindex group score commands
21380
21381 There aren't many of these as yet, I'm afraid.
21382
21383 @table @kbd
21384
21385 @item W e
21386 @kindex W e (Group)
21387 @findex gnus-score-edit-all-score
21388 Edit the apply-to-all-groups all.SCORE file.  You will be popped into
21389 a @code{gnus-score-mode} buffer (@pxref{Score File Editing}).
21390
21391 @item W f
21392 @kindex W f (Group)
21393 @findex gnus-score-flush-cache
21394 Gnus maintains a cache of score alists to avoid having to reload them
21395 all the time.  This command will flush the cache
21396 (@code{gnus-score-flush-cache}).
21397
21398 @end table
21399
21400 You can do scoring from the command line by saying something like:
21401
21402 @findex gnus-batch-score
21403 @cindex batch scoring
21404 @example
21405 $ emacs -batch -l ~/.emacs -l ~/.gnus.el -f gnus-batch-score
21406 @end example
21407
21408
21409 @node Score Variables
21410 @section Score Variables
21411 @cindex score variables
21412
21413 @table @code
21414
21415 @item gnus-use-scoring
21416 @vindex gnus-use-scoring
21417 If @code{nil}, Gnus will not check for score files, and will not, in
21418 general, do any score-related work.  This is @code{t} by default.
21419
21420 @item gnus-kill-killed
21421 @vindex gnus-kill-killed
21422 If this variable is @code{nil}, Gnus will never apply score files to
21423 articles that have already been through the kill process.  While this
21424 may save you lots of time, it also means that if you apply a kill file
21425 to a group, and then change the kill file and want to run it over you
21426 group again to kill more articles, it won't work.  You have to set this
21427 variable to @code{t} to do that.  (It is @code{t} by default.)
21428
21429 @item gnus-kill-files-directory
21430 @vindex gnus-kill-files-directory
21431 All kill and score files will be stored in this directory, which is
21432 initialized from the @env{SAVEDIR} environment variable by default.
21433 This is @file{~/News/} by default.
21434
21435 @item gnus-score-file-suffix
21436 @vindex gnus-score-file-suffix
21437 Suffix to add to the group name to arrive at the score file name
21438 (@file{SCORE} by default.)
21439
21440 @item gnus-score-uncacheable-files
21441 @vindex gnus-score-uncacheable-files
21442 @cindex score cache
21443 All score files are normally cached to avoid excessive re-loading of
21444 score files.  However, this might make your Emacs grow big and
21445 bloated, so this regexp can be used to weed out score files unlikely
21446 to be needed again.  It would be a bad idea to deny caching of
21447 @file{all.SCORE}, while it might be a good idea to not cache
21448 @file{comp.infosystems.www.authoring.misc.ADAPT}.  In fact, this
21449 variable is @samp{ADAPT$} by default, so no adaptive score files will
21450 be cached.
21451
21452 @item gnus-save-score
21453 @vindex gnus-save-score
21454 If you have really complicated score files, and do lots of batch
21455 scoring, then you might set this variable to @code{t}.  This will make
21456 Gnus save the scores into the @file{.newsrc.eld} file.
21457
21458 If you do not set this to @code{t}, then manual scores (like those set
21459 with @kbd{V s} (@code{gnus-summary-set-score})) will not be preserved
21460 across group visits.
21461
21462 @item gnus-score-interactive-default-score
21463 @vindex gnus-score-interactive-default-score
21464 Score used by all the interactive raise/lower commands to raise/lower
21465 score with.  Default is 1000, which may seem excessive, but this is to
21466 ensure that the adaptive scoring scheme gets enough room to play with.
21467 We don't want the small changes from the adaptive scoring to overwrite
21468 manually entered data.
21469
21470 @item gnus-summary-default-score
21471 @vindex gnus-summary-default-score
21472 Default score of an article, which is 0 by default.
21473
21474 @item gnus-summary-expunge-below
21475 @vindex gnus-summary-expunge-below
21476 Don't display the summary lines of articles that have scores lower than
21477 this variable.  This is @code{nil} by default, which means that no
21478 articles will be hidden.  This variable is local to the summary buffers,
21479 and has to be set from @code{gnus-summary-mode-hook}.
21480
21481 @item gnus-score-over-mark
21482 @vindex gnus-score-over-mark
21483 Mark (in the third column) used for articles with a score over the
21484 default.  Default is @samp{+}.
21485
21486 @item gnus-score-below-mark
21487 @vindex gnus-score-below-mark
21488 Mark (in the third column) used for articles with a score below the
21489 default.  Default is @samp{-}.
21490
21491 @item gnus-score-find-score-files-function
21492 @vindex gnus-score-find-score-files-function
21493 Function used to find score files for the current group.  This function
21494 is called with the name of the group as the argument.
21495
21496 Predefined functions available are:
21497 @table @code
21498
21499 @item gnus-score-find-single
21500 @findex gnus-score-find-single
21501 Only apply the group's own score file.
21502
21503 @item gnus-score-find-bnews
21504 @findex gnus-score-find-bnews
21505 Apply all score files that match, using bnews syntax.  This is the
21506 default.  If the current group is @samp{gnu.emacs.gnus}, for instance,
21507 @file{all.emacs.all.SCORE}, @file{not.alt.all.SCORE} and
21508 @file{gnu.all.SCORE} would all apply.  In short, the instances of
21509 @samp{all} in the score file names are translated into @samp{.*}, and
21510 then a regexp match is done.
21511
21512 This means that if you have some score entries that you want to apply to
21513 all groups, then you put those entries in the @file{all.SCORE} file.
21514
21515 The score files are applied in a semi-random order, although Gnus will
21516 try to apply the more general score files before the more specific score
21517 files.  It does this by looking at the number of elements in the score
21518 file names---discarding the @samp{all} elements.
21519
21520 @item gnus-score-find-hierarchical
21521 @findex gnus-score-find-hierarchical
21522 Apply all score files from all the parent groups.  This means that you
21523 can't have score files like @file{all.SCORE}, but you can have
21524 @file{SCORE}, @file{comp.SCORE} and @file{comp.emacs.SCORE} for each
21525 server.
21526
21527 @end table
21528 This variable can also be a list of functions.  In that case, all
21529 these functions will be called with the group name as argument, and
21530 all the returned lists of score files will be applied.  These
21531 functions can also return lists of lists of score alists directly.  In
21532 that case, the functions that return these non-file score alists
21533 should probably be placed before the ``real'' score file functions, to
21534 ensure that the last score file returned is the local score file.
21535 Phu.
21536
21537 For example, to do hierarchical scoring but use a non-server-specific
21538 overall score file, you could use the value
21539 @example
21540 (list (lambda (group) ("all.SCORE"))
21541       'gnus-score-find-hierarchical)
21542 @end example
21543
21544 @item gnus-score-expiry-days
21545 @vindex gnus-score-expiry-days
21546 This variable says how many days should pass before an unused score file
21547 entry is expired.  If this variable is @code{nil}, no score file entries
21548 are expired.  It's 7 by default.
21549
21550 @item gnus-update-score-entry-dates
21551 @vindex gnus-update-score-entry-dates
21552 If this variable is non-@code{nil}, temporary score entries that have
21553 been triggered (matched) will have their dates updated.  (This is how Gnus
21554 controls expiry---all non-matched-entries will become too old while
21555 matched entries will stay fresh and young.)  However, if you set this
21556 variable to @code{nil}, even matched entries will grow old and will
21557 have to face that oh-so grim reaper.
21558
21559 @item gnus-score-after-write-file-function
21560 @vindex gnus-score-after-write-file-function
21561 Function called with the name of the score file just written.
21562
21563 @item gnus-score-thread-simplify
21564 @vindex gnus-score-thread-simplify
21565 If this variable is non-@code{nil}, article subjects will be
21566 simplified for subject scoring purposes in the same manner as with
21567 threading---according to the current value of
21568 @code{gnus-simplify-subject-functions}.  If the scoring entry uses
21569 @code{substring} or @code{exact} matching, the match will also be
21570 simplified in this manner.
21571
21572 @end table
21573
21574
21575 @node Score File Format
21576 @section Score File Format
21577 @cindex score file format
21578
21579 A score file is an @code{emacs-lisp} file that normally contains just a
21580 single form.  Casual users are not expected to edit these files;
21581 everything can be changed from the summary buffer.
21582
21583 Anyway, if you'd like to dig into it yourself, here's an example:
21584
21585 @lisp
21586 (("from"
21587   ("Lars Ingebrigtsen" -10000)
21588   ("Per Abrahamsen")
21589   ("larsi\\|lmi" -50000 nil R))
21590  ("subject"
21591   ("Ding is Badd" nil 728373))
21592  ("xref"
21593   ("alt.politics" -1000 728372 s))
21594  ("lines"
21595   (2 -100 nil <))
21596  (mark 0)
21597  (expunge -1000)
21598  (mark-and-expunge -10)
21599  (read-only nil)
21600  (orphan -10)
21601  (adapt t)
21602  (files "/hom/larsi/News/gnu.SCORE")
21603  (exclude-files "all.SCORE")
21604  (local (gnus-newsgroup-auto-expire t)
21605         (gnus-summary-make-false-root empty))
21606  (eval (ding)))
21607 @end lisp
21608
21609 This example demonstrates most score file elements.  @xref{Advanced
21610 Scoring}, for a different approach.
21611
21612 Even though this looks much like Lisp code, nothing here is actually
21613 @code{eval}ed.  The Lisp reader is used to read this form, though, so it
21614 has to be valid syntactically, if not semantically.
21615
21616 Six keys are supported by this alist:
21617
21618 @table @code
21619
21620 @item STRING
21621 If the key is a string, it is the name of the header to perform the
21622 match on.  Scoring can only be performed on these eight headers:
21623 @code{From}, @code{Subject}, @code{References}, @code{Message-ID},
21624 @code{Xref}, @code{Lines}, @code{Chars} and @code{Date}.  In addition to
21625 these headers, there are three strings to tell Gnus to fetch the entire
21626 article and do the match on larger parts of the article: @code{Body}
21627 will perform the match on the body of the article, @code{Head} will
21628 perform the match on the head of the article, and @code{All} will
21629 perform the match on the entire article.  Note that using any of these
21630 last three keys will slow down group entry @emph{considerably}.  The
21631 final ``header'' you can score on is @code{Followup}.  These score
21632 entries will result in new score entries being added for all follow-ups
21633 to articles that matches these score entries.
21634
21635 Following this key is an arbitrary number of score entries, where each
21636 score entry has one to four elements.
21637 @enumerate
21638
21639 @item
21640 The first element is the @dfn{match element}.  On most headers this will
21641 be a string, but on the Lines and Chars headers, this must be an
21642 integer.
21643
21644 @item
21645 If the second element is present, it should be a number---the @dfn{score
21646 element}.  This number should be an integer in the neginf to posinf
21647 interval.  This number is added to the score of the article if the match
21648 is successful.  If this element is not present, the
21649 @code{gnus-score-interactive-default-score} number will be used
21650 instead.  This is 1000 by default.
21651
21652 @item
21653 If the third element is present, it should be a number---the @dfn{date
21654 element}.  This date says when the last time this score entry matched,
21655 which provides a mechanism for expiring the score entries.  It this
21656 element is not present, the score entry is permanent.  The date is
21657 represented by the number of days since December 31, 1 BCE.
21658
21659 @item
21660 If the fourth element is present, it should be a symbol---the @dfn{type
21661 element}.  This element specifies what function should be used to see
21662 whether this score entry matches the article.  What match types that can
21663 be used depends on what header you wish to perform the match on.
21664 @table @dfn
21665
21666 @item From, Subject, References, Xref, Message-ID
21667 For most header types, there are the @code{r} and @code{R} (regexp), as
21668 well as @code{s} and @code{S} (substring) types, and @code{e} and
21669 @code{E} (exact match), and @code{w} (word match) types.  If this
21670 element is not present, Gnus will assume that substring matching should
21671 be used.  @code{R}, @code{S}, and @code{E} differ from the others in
21672 that the matches will be done in a case-sensitive manner.  All these
21673 one-letter types are really just abbreviations for the @code{regexp},
21674 @code{string}, @code{exact}, and @code{word} types, which you can use
21675 instead, if you feel like.
21676
21677 @item Extra
21678 Just as for the standard string overview headers, if you are using
21679 gnus-extra-headers, you can score on these headers' values.  In this
21680 case, there is a 5th element in the score entry, being the name of the
21681 header to be scored.  The following entry is useful in your
21682 @file{all.SCORE} file in case of spam attacks from a single origin
21683 host, if your @acronym{NNTP} server tracks @samp{NNTP-Posting-Host} in
21684 overviews:
21685
21686 @lisp
21687 ("111.222.333.444" -1000 nil s
21688  "NNTP-Posting-Host")
21689 @end lisp
21690
21691 @item Lines, Chars
21692 These two headers use different match types: @code{<}, @code{>},
21693 @code{=}, @code{>=} and @code{<=}.
21694
21695 These predicates are true if
21696
21697 @example
21698 (PREDICATE HEADER MATCH)
21699 @end example
21700
21701 evaluates to non-@code{nil}.  For instance, the advanced match
21702 @code{("lines" 4 <)} (@pxref{Advanced Scoring}) will result in the
21703 following form:
21704
21705 @lisp
21706 (< header-value 4)
21707 @end lisp
21708
21709 Or to put it another way: When using @code{<} on @code{Lines} with 4 as
21710 the match, we get the score added if the article has less than 4 lines.
21711 (It's easy to get confused and think it's the other way around.  But
21712 it's not.  I think.)
21713
21714 When matching on @code{Lines}, be careful because some back ends (like
21715 @code{nndir}) do not generate @code{Lines} header, so every article ends
21716 up being marked as having 0 lines.  This can lead to strange results if
21717 you happen to lower score of the articles with few lines.
21718
21719 @item Date
21720 For the Date header we have three kinda silly match types:
21721 @code{before}, @code{at} and @code{after}.  I can't really imagine this
21722 ever being useful, but, like, it would feel kinda silly not to provide
21723 this function.  Just in case.  You never know.  Better safe than sorry.
21724 Once burnt, twice shy.  Don't judge a book by its cover.  Never not have
21725 sex on a first date.  (I have been told that at least one person, and I
21726 quote, ``found this function indispensable'', however.)
21727
21728 @cindex ISO8601
21729 @cindex date
21730 A more useful match type is @code{regexp}.  With it, you can match the
21731 date string using a regular expression.  The date is normalized to
21732 ISO8601 compact format first---@var{YYYYMMDD}@code{T}@var{HHMMSS}.  If
21733 you want to match all articles that have been posted on April 1st in
21734 every year, you could use @samp{....0401.........} as a match string,
21735 for instance.  (Note that the date is kept in its original time zone, so
21736 this will match articles that were posted when it was April 1st where
21737 the article was posted from.  Time zones are such wholesome fun for the
21738 whole family, eh?)
21739
21740 @item Head, Body, All
21741 These three match keys use the same match types as the @code{From} (etc)
21742 header uses.
21743
21744 @item Followup
21745 This match key is somewhat special, in that it will match the
21746 @code{From} header, and affect the score of not only the matching
21747 articles, but also all followups to the matching articles.  This allows
21748 you e.g. increase the score of followups to your own articles, or
21749 decrease the score of followups to the articles of some known
21750 trouble-maker.  Uses the same match types as the @code{From} header
21751 uses.  (Using this match key will lead to creation of @file{ADAPT}
21752 files.)
21753
21754 @item Thread
21755 This match key works along the same lines as the @code{Followup} match
21756 key.  If you say that you want to score on a (sub-)thread started by an
21757 article with a @code{Message-ID} @var{x}, then you add a @samp{thread}
21758 match.  This will add a new @samp{thread} match for each article that
21759 has @var{x} in its @code{References} header.  (These new @samp{thread}
21760 matches will use the @code{Message-ID}s of these matching articles.)
21761 This will ensure that you can raise/lower the score of an entire thread,
21762 even though some articles in the thread may not have complete
21763 @code{References} headers.  Note that using this may lead to
21764 undeterministic scores of the articles in the thread.  (Using this match
21765 key will lead to creation of @file{ADAPT} files.)
21766 @end table
21767 @end enumerate
21768
21769 @cindex score file atoms
21770 @item mark
21771 The value of this entry should be a number.  Any articles with a score
21772 lower than this number will be marked as read.
21773
21774 @item expunge
21775 The value of this entry should be a number.  Any articles with a score
21776 lower than this number will be removed from the summary buffer.
21777
21778 @item mark-and-expunge
21779 The value of this entry should be a number.  Any articles with a score
21780 lower than this number will be marked as read and removed from the
21781 summary buffer.
21782
21783 @item thread-mark-and-expunge
21784 The value of this entry should be a number.  All articles that belong to
21785 a thread that has a total score below this number will be marked as read
21786 and removed from the summary buffer.  @code{gnus-thread-score-function}
21787 says how to compute the total score for a thread.
21788
21789 @item files
21790 The value of this entry should be any number of file names.  These files
21791 are assumed to be score files as well, and will be loaded the same way
21792 this one was.
21793
21794 @item exclude-files
21795 The clue of this entry should be any number of files.  These files will
21796 not be loaded, even though they would normally be so, for some reason or
21797 other.
21798
21799 @item eval
21800 The value of this entry will be @code{eval}ed.  This element will be
21801 ignored when handling global score files.
21802
21803 @item read-only
21804 Read-only score files will not be updated or saved.  Global score files
21805 should feature this atom (@pxref{Global Score Files}).  (Note:
21806 @dfn{Global} here really means @dfn{global}; not your personal
21807 apply-to-all-groups score files.)
21808
21809 @item orphan
21810 The value of this entry should be a number.  Articles that do not have
21811 parents will get this number added to their scores.  Imagine you follow
21812 some high-volume newsgroup, like @samp{comp.lang.c}.  Most likely you
21813 will only follow a few of the threads, also want to see any new threads.
21814
21815 You can do this with the following two score file entries:
21816
21817 @example
21818         (orphan -500)
21819         (mark-and-expunge -100)
21820 @end example
21821
21822 When you enter the group the first time, you will only see the new
21823 threads.  You then raise the score of the threads that you find
21824 interesting (with @kbd{I T} or @kbd{I S}), and ignore (@kbd{c y}) the
21825 rest.  Next time you enter the group, you will see new articles in the
21826 interesting threads, plus any new threads.
21827
21828 I.e.---the orphan score atom is for high-volume groups where a few
21829 interesting threads which can't be found automatically by ordinary
21830 scoring rules exist.
21831
21832 @item adapt
21833 This entry controls the adaptive scoring.  If it is @code{t}, the
21834 default adaptive scoring rules will be used.  If it is @code{ignore}, no
21835 adaptive scoring will be performed on this group.  If it is a list, this
21836 list will be used as the adaptive scoring rules.  If it isn't present,
21837 or is something other than @code{t} or @code{ignore}, the default
21838 adaptive scoring rules will be used.  If you want to use adaptive
21839 scoring on most groups, you'd set @code{gnus-use-adaptive-scoring} to
21840 @code{t}, and insert an @code{(adapt ignore)} in the groups where you do
21841 not want adaptive scoring.  If you only want adaptive scoring in a few
21842 groups, you'd set @code{gnus-use-adaptive-scoring} to @code{nil}, and
21843 insert @code{(adapt t)} in the score files of the groups where you want
21844 it.
21845
21846 @item adapt-file
21847 All adaptive score entries will go to the file named by this entry.  It
21848 will also be applied when entering the group.  This atom might be handy
21849 if you want to adapt on several groups at once, using the same adaptive
21850 file for a number of groups.
21851
21852 @item local
21853 @cindex local variables
21854 The value of this entry should be a list of @code{(@var{var}
21855 @var{value})} pairs.  Each @var{var} will be made buffer-local to the
21856 current summary buffer, and set to the value specified.  This is a
21857 convenient, if somewhat strange, way of setting variables in some
21858 groups if you don't like hooks much.  Note that the @var{value} won't
21859 be evaluated.
21860 @end table
21861
21862
21863 @node Score File Editing
21864 @section Score File Editing
21865
21866 You normally enter all scoring commands from the summary buffer, but you
21867 might feel the urge to edit them by hand as well, so we've supplied you
21868 with a mode for that.
21869
21870 It's simply a slightly customized @code{emacs-lisp} mode, with these
21871 additional commands:
21872
21873 @table @kbd
21874
21875 @item C-c C-c
21876 @kindex C-c C-c (Score)
21877 @findex gnus-score-edit-exit
21878 Save the changes you have made and return to the summary buffer
21879 (@code{gnus-score-edit-exit}).
21880
21881 @item C-c C-d
21882 @kindex C-c C-d (Score)
21883 @findex gnus-score-edit-insert-date
21884 Insert the current date in numerical format
21885 (@code{gnus-score-edit-insert-date}).  This is really the day number, if
21886 you were wondering.
21887
21888 @item C-c C-p
21889 @kindex C-c C-p (Score)
21890 @findex gnus-score-pretty-print
21891 The adaptive score files are saved in an unformatted fashion.  If you
21892 intend to read one of these files, you want to @dfn{pretty print} it
21893 first.  This command (@code{gnus-score-pretty-print}) does that for
21894 you.
21895
21896 @end table
21897
21898 Type @kbd{M-x gnus-score-mode} to use this mode.
21899
21900 @vindex gnus-score-mode-hook
21901 @code{gnus-score-menu-hook} is run in score mode buffers.
21902
21903 In the summary buffer you can use commands like @kbd{V f}, @kbd{V e} and
21904 @kbd{V t} to begin editing score files.
21905
21906
21907 @node Adaptive Scoring
21908 @section Adaptive Scoring
21909 @cindex adaptive scoring
21910
21911 If all this scoring is getting you down, Gnus has a way of making it all
21912 happen automatically---as if by magic.  Or rather, as if by artificial
21913 stupidity, to be precise.
21914
21915 @vindex gnus-use-adaptive-scoring
21916 When you read an article, or mark an article as read, or kill an
21917 article, you leave marks behind.  On exit from the group, Gnus can sniff
21918 these marks and add score elements depending on what marks it finds.
21919 You turn on this ability by setting @code{gnus-use-adaptive-scoring} to
21920 @code{t} or @code{(line)}.  If you want score adaptively on separate
21921 words appearing in the subjects, you should set this variable to
21922 @code{(word)}.  If you want to use both adaptive methods, set this
21923 variable to @code{(word line)}.
21924
21925 @vindex gnus-default-adaptive-score-alist
21926 To give you complete control over the scoring process, you can customize
21927 the @code{gnus-default-adaptive-score-alist} variable.  For instance, it
21928 might look something like this:
21929
21930 @lisp
21931 (setq gnus-default-adaptive-score-alist
21932   '((gnus-unread-mark)
21933     (gnus-ticked-mark (from 4))
21934     (gnus-dormant-mark (from 5))
21935     (gnus-del-mark (from -4) (subject -1))
21936     (gnus-read-mark (from 4) (subject 2))
21937     (gnus-expirable-mark (from -1) (subject -1))
21938     (gnus-killed-mark (from -1) (subject -3))
21939     (gnus-kill-file-mark)
21940     (gnus-ancient-mark)
21941     (gnus-low-score-mark)
21942     (gnus-catchup-mark (from -1) (subject -1))))
21943 @end lisp
21944
21945 As you see, each element in this alist has a mark as a key (either a
21946 variable name or a ``real'' mark---a character).  Following this key is
21947 a arbitrary number of header/score pairs.  If there are no header/score
21948 pairs following the key, no adaptive scoring will be done on articles
21949 that have that key as the article mark.  For instance, articles with
21950 @code{gnus-unread-mark} in the example above will not get adaptive score
21951 entries.
21952
21953 Each article can have only one mark, so just a single of these rules
21954 will be applied to each article.
21955
21956 To take @code{gnus-del-mark} as an example---this alist says that all
21957 articles that have that mark (i.e., are marked with @samp{e}) will have a
21958 score entry added to lower based on the @code{From} header by -4, and
21959 lowered by @code{Subject} by -1.  Change this to fit your prejudices.
21960
21961 If you have marked 10 articles with the same subject with
21962 @code{gnus-del-mark}, the rule for that mark will be applied ten times.
21963 That means that that subject will get a score of ten times -1, which
21964 should be, unless I'm much mistaken, -10.
21965
21966 If you have auto-expirable (mail) groups (@pxref{Expiring Mail}), all
21967 the read articles will be marked with the @samp{E} mark.  This'll
21968 probably make adaptive scoring slightly impossible, so auto-expiring and
21969 adaptive scoring doesn't really mix very well.
21970
21971 The headers you can score on are @code{from}, @code{subject},
21972 @code{message-id}, @code{references}, @code{xref}, @code{lines},
21973 @code{chars} and @code{date}.  In addition, you can score on
21974 @code{followup}, which will create an adaptive score entry that matches
21975 on the @code{References} header using the @code{Message-ID} of the
21976 current article, thereby matching the following thread.
21977
21978 If you use this scheme, you should set the score file atom @code{mark}
21979 to something small---like -300, perhaps, to avoid having small random
21980 changes result in articles getting marked as read.
21981
21982 After using adaptive scoring for a week or so, Gnus should start to
21983 become properly trained and enhance the authors you like best, and kill
21984 the authors you like least, without you having to say so explicitly.
21985
21986 You can control what groups the adaptive scoring is to be performed on
21987 by using the score files (@pxref{Score File Format}).  This will also
21988 let you use different rules in different groups.
21989
21990 @vindex gnus-adaptive-file-suffix
21991 The adaptive score entries will be put into a file where the name is the
21992 group name with @code{gnus-adaptive-file-suffix} appended.  The default
21993 is @file{ADAPT}.
21994
21995 @vindex gnus-adaptive-pretty-print
21996 Adaptive score files can get huge and are not meant to be edited by
21997 human hands.  If @code{gnus-adaptive-pretty-print} is @code{nil} (the
21998 deafult) those files will not be written in a human readable way.
21999
22000 @vindex gnus-score-exact-adapt-limit
22001 When doing adaptive scoring, substring or fuzzy matching would probably
22002 give you the best results in most cases.  However, if the header one
22003 matches is short, the possibility for false positives is great, so if
22004 the length of the match is less than
22005 @code{gnus-score-exact-adapt-limit}, exact matching will be used.  If
22006 this variable is @code{nil}, exact matching will always be used to avoid
22007 this problem.
22008
22009 @vindex gnus-default-adaptive-word-score-alist
22010 As mentioned above, you can adapt either on individual words or entire
22011 headers.  If you adapt on words, the
22012 @code{gnus-default-adaptive-word-score-alist} variable says what score
22013 each instance of a word should add given a mark.
22014
22015 @lisp
22016 (setq gnus-default-adaptive-word-score-alist
22017       `((,gnus-read-mark . 30)
22018         (,gnus-catchup-mark . -10)
22019         (,gnus-killed-mark . -20)
22020         (,gnus-del-mark . -15)))
22021 @end lisp
22022
22023 This is the default value.  If you have adaption on words enabled, every
22024 word that appears in subjects of articles marked with
22025 @code{gnus-read-mark} will result in a score rule that increase the
22026 score with 30 points.
22027
22028 @vindex gnus-default-ignored-adaptive-words
22029 @vindex gnus-ignored-adaptive-words
22030 Words that appear in the @code{gnus-default-ignored-adaptive-words} list
22031 will be ignored.  If you wish to add more words to be ignored, use the
22032 @code{gnus-ignored-adaptive-words} list instead.
22033
22034 @vindex gnus-adaptive-word-length-limit
22035 Some may feel that short words shouldn't count when doing adaptive
22036 scoring.  If so, you may set @code{gnus-adaptive-word-length-limit} to
22037 an integer.  Words shorter than this number will be ignored.  This
22038 variable defaults to @code{nil}.
22039
22040 @vindex gnus-adaptive-word-syntax-table
22041 When the scoring is done, @code{gnus-adaptive-word-syntax-table} is the
22042 syntax table in effect.  It is similar to the standard syntax table, but
22043 it considers numbers to be non-word-constituent characters.
22044
22045 @vindex gnus-adaptive-word-minimum
22046 If @code{gnus-adaptive-word-minimum} is set to a number, the adaptive
22047 word scoring process will never bring down the score of an article to
22048 below this number.  The default is @code{nil}.
22049
22050 @vindex gnus-adaptive-word-no-group-words
22051 If @code{gnus-adaptive-word-no-group-words} is set to @code{t}, gnus
22052 won't adaptively word score any of the words in the group name.  Useful
22053 for groups like @samp{comp.editors.emacs}, where most of the subject
22054 lines contain the word @samp{emacs}.
22055
22056 After using this scheme for a while, it might be nice to write a
22057 @code{gnus-psychoanalyze-user} command to go through the rules and see
22058 what words you like and what words you don't like.  Or perhaps not.
22059
22060 Note that the adaptive word scoring thing is highly experimental and is
22061 likely to change in the future.  Initial impressions seem to indicate
22062 that it's totally useless as it stands.  Some more work (involving more
22063 rigorous statistical methods) will have to be done to make this useful.
22064
22065
22066 @node Home Score File
22067 @section Home Score File
22068
22069 The score file where new score file entries will go is called the
22070 @dfn{home score file}.  This is normally (and by default) the score file
22071 for the group itself.  For instance, the home score file for
22072 @samp{gnu.emacs.gnus} is @file{gnu.emacs.gnus.SCORE}.
22073
22074 However, this may not be what you want.  It is often convenient to share
22075 a common home score file among many groups---all @samp{emacs} groups
22076 could perhaps use the same home score file.
22077
22078 @vindex gnus-home-score-file
22079 The variable that controls this is @code{gnus-home-score-file}.  It can
22080 be:
22081
22082 @enumerate
22083 @item
22084 A string.  Then this file will be used as the home score file for all
22085 groups.
22086
22087 @item
22088 A function.  The result of this function will be used as the home score
22089 file.  The function will be called with the name of the group as the
22090 parameter.
22091
22092 @item
22093 A list.  The elements in this list can be:
22094
22095 @enumerate
22096 @item
22097 @code{(@var{regexp} @var{file-name})}.  If the @var{regexp} matches the
22098 group name, the @var{file-name} will be used as the home score file.
22099
22100 @item
22101 A function.  If the function returns non-@code{nil}, the result will
22102 be used as the home score file.  The function will be called with the
22103 name of the group as the parameter.
22104
22105 @item
22106 A string.  Use the string as the home score file.
22107 @end enumerate
22108
22109 The list will be traversed from the beginning towards the end looking
22110 for matches.
22111
22112 @end enumerate
22113
22114 So, if you want to use just a single score file, you could say:
22115
22116 @lisp
22117 (setq gnus-home-score-file
22118       "my-total-score-file.SCORE")
22119 @end lisp
22120
22121 If you want to use @file{gnu.SCORE} for all @samp{gnu} groups and
22122 @file{rec.SCORE} for all @samp{rec} groups (and so on), you can say:
22123
22124 @findex gnus-hierarchial-home-score-file
22125 @lisp
22126 (setq gnus-home-score-file
22127       'gnus-hierarchial-home-score-file)
22128 @end lisp
22129
22130 This is a ready-made function provided for your convenience.
22131 Other functions include
22132
22133 @table @code
22134 @item gnus-current-home-score-file
22135 @findex gnus-current-home-score-file
22136 Return the ``current'' regular score file.  This will make scoring
22137 commands add entry to the ``innermost'' matching score file.
22138
22139 @end table
22140
22141 If you want to have one score file for the @samp{emacs} groups and
22142 another for the @samp{comp} groups, while letting all other groups use
22143 their own home score files:
22144
22145 @lisp
22146 (setq gnus-home-score-file
22147       ;; @r{All groups that match the regexp @code{"\\.emacs"}}
22148       '(("\\.emacs" "emacs.SCORE")
22149         ;; @r{All the comp groups in one score file}
22150         ("^comp" "comp.SCORE")))
22151 @end lisp
22152
22153 @vindex gnus-home-adapt-file
22154 @code{gnus-home-adapt-file} works exactly the same way as
22155 @code{gnus-home-score-file}, but says what the home adaptive score file
22156 is instead.  All new adaptive file entries will go into the file
22157 specified by this variable, and the same syntax is allowed.
22158
22159 In addition to using @code{gnus-home-score-file} and
22160 @code{gnus-home-adapt-file}, you can also use group parameters
22161 (@pxref{Group Parameters}) and topic parameters (@pxref{Topic
22162 Parameters}) to achieve much the same.  Group and topic parameters take
22163 precedence over this variable.
22164
22165
22166 @node Followups To Yourself
22167 @section Followups To Yourself
22168
22169 Gnus offers two commands for picking out the @code{Message-ID} header in
22170 the current buffer.  Gnus will then add a score rule that scores using
22171 this @code{Message-ID} on the @code{References} header of other
22172 articles.  This will, in effect, increase the score of all articles that
22173 respond to the article in the current buffer.  Quite useful if you want
22174 to easily note when people answer what you've said.
22175
22176 @table @code
22177
22178 @item gnus-score-followup-article
22179 @findex gnus-score-followup-article
22180 This will add a score to articles that directly follow up your own
22181 article.
22182
22183 @item gnus-score-followup-thread
22184 @findex gnus-score-followup-thread
22185 This will add a score to all articles that appear in a thread ``below''
22186 your own article.
22187 @end table
22188
22189 @vindex message-sent-hook
22190 These two functions are both primarily meant to be used in hooks like
22191 @code{message-sent-hook}, like this:
22192 @lisp
22193 (add-hook 'message-sent-hook 'gnus-score-followup-thread)
22194 @end lisp
22195
22196
22197 If you look closely at your own @code{Message-ID}, you'll notice that
22198 the first two or three characters are always the same.  Here's two of
22199 mine:
22200
22201 @example
22202 <x6u3u47icf.fsf@@eyesore.no>
22203 <x6sp9o7ibw.fsf@@eyesore.no>
22204 @end example
22205
22206 So ``my'' ident on this machine is @samp{x6}.  This can be
22207 exploited---the following rule will raise the score on all followups to
22208 myself:
22209
22210 @lisp
22211 ("references"
22212  ("<x6[0-9a-z]+\\.fsf\\(_-_\\)?@@.*eyesore\\.no>"
22213   1000 nil r))
22214 @end lisp
22215
22216 Whether it's the first two or first three characters that are ``yours''
22217 is system-dependent.
22218
22219
22220 @node Scoring On Other Headers
22221 @section Scoring On Other Headers
22222 @cindex scoring on other headers
22223
22224 Gnus is quite fast when scoring the ``traditional''
22225 headers---@samp{From}, @samp{Subject} and so on.  However, scoring
22226 other headers requires writing a @code{head} scoring rule, which means
22227 that Gnus has to request every single article from the back end to find
22228 matches.  This takes a long time in big groups.
22229
22230 @vindex gnus-inhibit-slow-scoring
22231 You can inhibit this slow scoring on headers or body by setting the
22232 variable @code{gnus-inhibit-slow-scoring}.  If
22233 @code{gnus-inhibit-slow-scoring} is regexp, slow scoring is inhibited if
22234 the group matches the regexp.  If it is t, slow scoring on it is
22235 inhibited for all groups.
22236
22237 Now, there's not much you can do about the slowness for news groups, but for
22238 mail groups, you have greater control.  In @ref{To From Newsgroups},
22239 it's explained in greater detail what this mechanism does, but here's
22240 a cookbook example for @code{nnml} on how to allow scoring on the
22241 @samp{To} and @samp{Cc} headers.
22242
22243 Put the following in your @file{~/.gnus.el} file.
22244
22245 @lisp
22246 (setq gnus-extra-headers '(To Cc Newsgroups Keywords)
22247       nnmail-extra-headers gnus-extra-headers)
22248 @end lisp
22249
22250 Restart Gnus and rebuild your @code{nnml} overview files with the
22251 @kbd{M-x nnml-generate-nov-databases} command.  This will take a long
22252 time if you have much mail.
22253
22254 Now you can score on @samp{To} and @samp{Cc} as ``extra headers'' like
22255 so: @kbd{I e s p To RET <your name> RET}.
22256
22257 See?  Simple.
22258
22259
22260 @node Scoring Tips
22261 @section Scoring Tips
22262 @cindex scoring tips
22263
22264 @table @dfn
22265
22266 @item Crossposts
22267 @cindex crossposts
22268 @cindex scoring crossposts
22269 If you want to lower the score of crossposts, the line to match on is
22270 the @code{Xref} header.
22271 @lisp
22272 ("xref" (" talk.politics.misc:" -1000))
22273 @end lisp
22274
22275 @item Multiple crossposts
22276 If you want to lower the score of articles that have been crossposted to
22277 more than, say, 3 groups:
22278 @lisp
22279 ("xref"
22280   ("[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+ +[^:\n]+:[0-9]+"
22281    -1000 nil r))
22282 @end lisp
22283
22284 @item Matching on the body
22285 This is generally not a very good idea---it takes a very long time.
22286 Gnus actually has to fetch each individual article from the server.  But
22287 you might want to anyway, I guess.  Even though there are three match
22288 keys (@code{Head}, @code{Body} and @code{All}), you should choose one
22289 and stick with it in each score file.  If you use any two, each article
22290 will be fetched @emph{twice}.  If you want to match a bit on the
22291 @code{Head} and a bit on the @code{Body}, just use @code{All} for all
22292 the matches.
22293
22294 @item Marking as read
22295 You will probably want to mark articles that have scores below a certain
22296 number as read.  This is most easily achieved by putting the following
22297 in your @file{all.SCORE} file:
22298 @lisp
22299 ((mark -100))
22300 @end lisp
22301 You may also consider doing something similar with @code{expunge}.
22302
22303 @item Negated character classes
22304 If you say stuff like @code{[^abcd]*}, you may get unexpected results.
22305 That will match newlines, which might lead to, well, The Unknown.  Say
22306 @code{[^abcd\n]*} instead.
22307 @end table
22308
22309
22310 @node Reverse Scoring
22311 @section Reverse Scoring
22312 @cindex reverse scoring
22313
22314 If you want to keep just articles that have @samp{Sex with Emacs} in the
22315 subject header, and expunge all other articles, you could put something
22316 like this in your score file:
22317
22318 @lisp
22319 (("subject"
22320   ("Sex with Emacs" 2))
22321  (mark 1)
22322  (expunge 1))
22323 @end lisp
22324
22325 So, you raise all articles that match @samp{Sex with Emacs} and mark the
22326 rest as read, and expunge them to boot.
22327
22328
22329 @node Global Score Files
22330 @section Global Score Files
22331 @cindex global score files
22332
22333 Sure, other newsreaders have ``global kill files''.  These are usually
22334 nothing more than a single kill file that applies to all groups, stored
22335 in the user's home directory.  Bah!  Puny, weak newsreaders!
22336
22337 What I'm talking about here are Global Score Files.  Score files from
22338 all over the world, from users everywhere, uniting all nations in one
22339 big, happy score file union!  Ange-score!  New and untested!
22340
22341 @vindex gnus-global-score-files
22342 All you have to do to use other people's score files is to set the
22343 @code{gnus-global-score-files} variable.  One entry for each score file,
22344 or each score file directory.  Gnus will decide by itself what score
22345 files are applicable to which group.
22346
22347 To use the score file
22348 @file{/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE} and
22349 all score files in the @file{/ftp@@ftp.some-where:/pub/score} directory,
22350 say this:
22351
22352 @lisp
22353 (setq gnus-global-score-files
22354       '("/ftp@@ftp.gnus.org:/pub/larsi/ding/score/soc.motss.SCORE"
22355         "/ftp@@ftp.some-where:/pub/score/"))
22356 @end lisp
22357
22358 @findex gnus-score-search-global-directories
22359 @noindent
22360 Simple, eh?  Directory names must end with a @samp{/}.  These
22361 directories are typically scanned only once during each Gnus session.
22362 If you feel the need to manually re-scan the remote directories, you can
22363 use the @code{gnus-score-search-global-directories} command.
22364
22365 Note that, at present, using this option will slow down group entry
22366 somewhat.  (That is---a lot.)
22367
22368 If you want to start maintaining score files for other people to use,
22369 just put your score file up for anonymous ftp and announce it to the
22370 world.  Become a retro-moderator!  Participate in the retro-moderator
22371 wars sure to ensue, where retro-moderators battle it out for the
22372 sympathy of the people, luring them to use their score files on false
22373 premises!  Yay!  The net is saved!
22374
22375 Here are some tips for the would-be retro-moderator, off the top of my
22376 head:
22377
22378 @itemize @bullet
22379
22380 @item
22381 Articles heavily crossposted are probably junk.
22382 @item
22383 To lower a single inappropriate article, lower by @code{Message-ID}.
22384 @item
22385 Particularly brilliant authors can be raised on a permanent basis.
22386 @item
22387 Authors that repeatedly post off-charter for the group can safely be
22388 lowered out of existence.
22389 @item
22390 Set the @code{mark} and @code{expunge} atoms to obliterate the nastiest
22391 articles completely.
22392
22393 @item
22394 Use expiring score entries to keep the size of the file down.  You
22395 should probably have a long expiry period, though, as some sites keep
22396 old articles for a long time.
22397 @end itemize
22398
22399 @dots{} I wonder whether other newsreaders will support global score files
22400 in the future.  @emph{Snicker}.  Yup, any day now, newsreaders like Blue
22401 Wave, xrn and 1stReader are bound to implement scoring.  Should we start
22402 holding our breath yet?
22403
22404
22405 @node Kill Files
22406 @section Kill Files
22407 @cindex kill files
22408
22409 Gnus still supports those pesky old kill files.  In fact, the kill file
22410 entries can now be expiring, which is something I wrote before Daniel
22411 Quinlan thought of doing score files, so I've left the code in there.
22412
22413 In short, kill processing is a lot slower (and I do mean @emph{a lot})
22414 than score processing, so it might be a good idea to rewrite your kill
22415 files into score files.
22416
22417 Anyway, a kill file is a normal @code{emacs-lisp} file.  You can put any
22418 forms into this file, which means that you can use kill files as some
22419 sort of primitive hook function to be run on group entry, even though
22420 that isn't a very good idea.
22421
22422 Normal kill files look like this:
22423
22424 @lisp
22425 (gnus-kill "From" "Lars Ingebrigtsen")
22426 (gnus-kill "Subject" "ding")
22427 (gnus-expunge "X")
22428 @end lisp
22429
22430 This will mark every article written by me as read, and remove the
22431 marked articles from the summary buffer.  Very useful, you'll agree.
22432
22433 Other programs use a totally different kill file syntax.  If Gnus
22434 encounters what looks like a @code{rn} kill file, it will take a stab at
22435 interpreting it.
22436
22437 Two summary functions for editing a @sc{gnus} kill file:
22438
22439 @table @kbd
22440
22441 @item M-k
22442 @kindex M-k (Summary)
22443 @findex gnus-summary-edit-local-kill
22444 Edit this group's kill file (@code{gnus-summary-edit-local-kill}).
22445
22446 @item M-K
22447 @kindex M-K (Summary)
22448 @findex gnus-summary-edit-global-kill
22449 Edit the general kill file (@code{gnus-summary-edit-global-kill}).
22450 @end table
22451
22452 Two group mode functions for editing the kill files:
22453
22454 @table @kbd
22455
22456 @item M-k
22457 @kindex M-k (Group)
22458 @findex gnus-group-edit-local-kill
22459 Edit this group's kill file (@code{gnus-group-edit-local-kill}).
22460
22461 @item M-K
22462 @kindex M-K (Group)
22463 @findex gnus-group-edit-global-kill
22464 Edit the general kill file (@code{gnus-group-edit-global-kill}).
22465 @end table
22466
22467 Kill file variables:
22468
22469 @table @code
22470 @item gnus-kill-file-name
22471 @vindex gnus-kill-file-name
22472 A kill file for the group @samp{soc.motss} is normally called
22473 @file{soc.motss.KILL}.  The suffix appended to the group name to get
22474 this file name is detailed by the @code{gnus-kill-file-name} variable.
22475 The ``global'' kill file (not in the score file sense of ``global'', of
22476 course) is just called @file{KILL}.
22477
22478 @vindex gnus-kill-save-kill-file
22479 @item gnus-kill-save-kill-file
22480 If this variable is non-@code{nil}, Gnus will save the
22481 kill file after processing, which is necessary if you use expiring
22482 kills.
22483
22484 @item gnus-apply-kill-hook
22485 @vindex gnus-apply-kill-hook
22486 @findex gnus-apply-kill-file-unless-scored
22487 @findex gnus-apply-kill-file
22488 A hook called to apply kill files to a group.  It is
22489 @code{(gnus-apply-kill-file)} by default.  If you want to ignore the
22490 kill file if you have a score file for the same group, you can set this
22491 hook to @code{(gnus-apply-kill-file-unless-scored)}.  If you don't want
22492 kill files to be processed, you should set this variable to @code{nil}.
22493
22494 @item gnus-kill-file-mode-hook
22495 @vindex gnus-kill-file-mode-hook
22496 A hook called in kill-file mode buffers.
22497
22498 @end table
22499
22500
22501 @node Converting Kill Files
22502 @section Converting Kill Files
22503 @cindex kill files
22504 @cindex converting kill files
22505
22506 If you have loads of old kill files, you may want to convert them into
22507 score files.  If they are ``regular'', you can use
22508 the @file{gnus-kill-to-score.el} package; if not, you'll have to do it
22509 by hand.
22510
22511 The kill to score conversion package isn't included in Emacs by default.
22512 You can fetch it from the contrib directory of the Gnus distribution or
22513 from
22514 @uref{http://heim.ifi.uio.no/~larsi/ding-various/gnus-kill-to-score.el}.
22515
22516 If your old kill files are very complex---if they contain more
22517 non-@code{gnus-kill} forms than not, you'll have to convert them by
22518 hand.  Or just let them be as they are.  Gnus will still use them as
22519 before.
22520
22521
22522 @node Advanced Scoring
22523 @section Advanced Scoring
22524
22525 Scoring on Subjects and From headers is nice enough, but what if you're
22526 really interested in what a person has to say only when she's talking
22527 about a particular subject?  Or what if you really don't want to
22528 read what person A has to say when she's following up to person B, but
22529 want to read what she says when she's following up to person C?
22530
22531 By using advanced scoring rules you may create arbitrarily complex
22532 scoring patterns.
22533
22534 @menu
22535 * Advanced Scoring Syntax::     A definition.
22536 * Advanced Scoring Examples::   What they look like.
22537 * Advanced Scoring Tips::       Getting the most out of it.
22538 @end menu
22539
22540
22541 @node Advanced Scoring Syntax
22542 @subsection Advanced Scoring Syntax
22543
22544 Ordinary scoring rules have a string as the first element in the rule.
22545 Advanced scoring rules have a list as the first element.  The second
22546 element is the score to be applied if the first element evaluated to a
22547 non-@code{nil} value.
22548
22549 These lists may consist of three logical operators, one redirection
22550 operator, and various match operators.
22551
22552 Logical operators:
22553
22554 @table @code
22555 @item &
22556 @itemx and
22557 This logical operator will evaluate each of its arguments until it finds
22558 one that evaluates to @code{false}, and then it'll stop.  If all arguments
22559 evaluate to @code{true} values, then this operator will return
22560 @code{true}.
22561
22562 @item |
22563 @itemx or
22564 This logical operator will evaluate each of its arguments until it finds
22565 one that evaluates to @code{true}.  If no arguments are @code{true},
22566 then this operator will return @code{false}.
22567
22568 @item !
22569 @itemx not
22570 @itemx Â¬
22571 This logical operator only takes a single argument.  It returns the
22572 logical negation of the value of its argument.
22573
22574 @end table
22575
22576 There is an @dfn{indirection operator} that will make its arguments
22577 apply to the ancestors of the current article being scored.  For
22578 instance, @code{1-} will make score rules apply to the parent of the
22579 current article.  @code{2-} will make score rules apply to the
22580 grandparent of the current article.  Alternatively, you can write
22581 @code{^^}, where the number of @code{^}s (carets) says how far back into
22582 the ancestry you want to go.
22583
22584 Finally, we have the match operators.  These are the ones that do the
22585 real work.  Match operators are header name strings followed by a match
22586 and a match type.  A typical match operator looks like @samp{("from"
22587 "Lars Ingebrigtsen" s)}.  The header names are the same as when using
22588 simple scoring, and the match types are also the same.
22589
22590
22591 @node Advanced Scoring Examples
22592 @subsection Advanced Scoring Examples
22593
22594 Please note that the following examples are score file rules.  To
22595 make a complete score file from them, surround them with another pair
22596 of parentheses.
22597
22598 Let's say you want to increase the score of articles written by Lars
22599 when he's talking about Gnus:
22600
22601 @example
22602 @group
22603 ((&
22604   ("from" "Lars Ingebrigtsen")
22605   ("subject" "Gnus"))
22606  1000)
22607 @end group
22608 @end example
22609
22610 Quite simple, huh?
22611
22612 When he writes long articles, he sometimes has something nice to say:
22613
22614 @example
22615 ((&
22616   ("from" "Lars Ingebrigtsen")
22617   (|
22618    ("subject" "Gnus")
22619    ("lines" 100 >)))
22620  1000)
22621 @end example
22622
22623 However, when he responds to things written by Reig Eigil Logge, you
22624 really don't want to read what he's written:
22625
22626 @example
22627 ((&
22628   ("from" "Lars Ingebrigtsen")
22629   (1- ("from" "Reig Eigil Logge")))
22630  -100000)
22631 @end example
22632
22633 Everybody that follows up Redmondo when he writes about disappearing
22634 socks should have their scores raised, but only when they talk about
22635 white socks.  However, when Lars talks about socks, it's usually not
22636 very interesting:
22637
22638 @example
22639 ((&
22640   (1-
22641    (&
22642     ("from" "redmondo@@.*no" r)
22643     ("body" "disappearing.*socks" t)))
22644   (! ("from" "Lars Ingebrigtsen"))
22645   ("body" "white.*socks"))
22646  1000)
22647 @end example
22648
22649 Suppose you're reading a high volume group and you're only interested
22650 in replies. The plan is to score down all articles that don't have
22651 subject that begin with "Re:", "Fw:" or "Fwd:" and then score up all
22652 parents of articles that have subjects that begin with reply marks.
22653
22654 @example
22655 ((! ("subject" "re:\\|fwd?:" r))
22656   -200)
22657 ((1- ("subject" "re:\\|fwd?:" r))
22658   200)
22659 @end example
22660
22661 The possibilities are endless.
22662
22663 @node Advanced Scoring Tips
22664 @subsection Advanced Scoring Tips
22665
22666 The @code{&} and @code{|} logical operators do short-circuit logic.
22667 That is, they stop processing their arguments when it's clear what the
22668 result of the operation will be.  For instance, if one of the arguments
22669 of an @code{&} evaluates to @code{false}, there's no point in evaluating
22670 the rest of the arguments.  This means that you should put slow matches
22671 (@samp{body}, @samp{header}) last and quick matches (@samp{from},
22672 @samp{subject}) first.
22673
22674 The indirection arguments (@code{1-} and so on) will make their
22675 arguments work on previous generations of the thread.  If you say
22676 something like:
22677
22678 @example
22679 ...
22680 (1-
22681  (1-
22682   ("from" "lars")))
22683 ...
22684 @end example
22685
22686 Then that means ``score on the from header of the grandparent of the
22687 current article''.  An indirection is quite fast, but it's better to say:
22688
22689 @example
22690 (1-
22691  (&
22692   ("from" "Lars")
22693   ("subject" "Gnus")))
22694 @end example
22695
22696 than it is to say:
22697
22698 @example
22699 (&
22700  (1- ("from" "Lars"))
22701  (1- ("subject" "Gnus")))
22702 @end example
22703
22704
22705 @node Score Decays
22706 @section Score Decays
22707 @cindex score decays
22708 @cindex decays
22709
22710 You may find that your scores have a tendency to grow without
22711 bounds, especially if you're using adaptive scoring.  If scores get too
22712 big, they lose all meaning---they simply max out and it's difficult to
22713 use them in any sensible way.
22714
22715 @vindex gnus-decay-scores
22716 @findex gnus-decay-score
22717 @vindex gnus-decay-score-function
22718 Gnus provides a mechanism for decaying scores to help with this problem.
22719 When score files are loaded and @code{gnus-decay-scores} is
22720 non-@code{nil}, Gnus will run the score files through the decaying
22721 mechanism thereby lowering the scores of all non-permanent score rules.
22722 If @code{gnus-decay-scores} is a regexp, only score files matching this
22723 regexp are treated.  E.g. you may set it to @samp{\\.ADAPT\\'} if only
22724 @emph{adaptive} score files should be decayed.  The decay itself if
22725 performed by the @code{gnus-decay-score-function} function, which is
22726 @code{gnus-decay-score} by default.  Here's the definition of that
22727 function:
22728
22729 @lisp
22730 (defun gnus-decay-score (score)
22731   "Decay SCORE according to `gnus-score-decay-constant'
22732 and `gnus-score-decay-scale'."
22733   (let ((n (- score
22734               (* (if (< score 0) -1 1)
22735                  (min (abs score)
22736                       (max gnus-score-decay-constant
22737                            (* (abs score)
22738                               gnus-score-decay-scale)))))))
22739     (if (and (featurep 'xemacs)
22740              ;; XEmacs' floor can handle only the floating point
22741              ;; number below the half of the maximum integer.
22742              (> (abs n) (lsh -1 -2)))
22743         (string-to-number
22744          (car (split-string (number-to-string n) "\\.")))
22745       (floor n))))
22746 @end lisp
22747
22748 @vindex gnus-score-decay-scale
22749 @vindex gnus-score-decay-constant
22750 @code{gnus-score-decay-constant} is 3 by default and
22751 @code{gnus-score-decay-scale} is 0.05.  This should cause the following:
22752
22753 @enumerate
22754 @item
22755 Scores between -3 and 3 will be set to 0 when this function is called.
22756
22757 @item
22758 Scores with magnitudes between 3 and 60 will be shrunk by 3.
22759
22760 @item
22761 Scores with magnitudes greater than 60 will be shrunk by 5% of the
22762 score.
22763 @end enumerate
22764
22765 If you don't like this decay function, write your own.  It is called
22766 with the score to be decayed as its only parameter, and it should return
22767 the new score, which should be an integer.
22768
22769 Gnus will try to decay scores once a day.  If you haven't run Gnus for
22770 four days, Gnus will decay the scores four times, for instance.
22771
22772 @iftex
22773 @iflatex
22774 @chapter Message
22775 @include message.texi
22776 @chapter Emacs MIME
22777 @include emacs-mime.texi
22778 @chapter Sieve
22779 @include sieve.texi
22780 @chapter PGG
22781 @include pgg.texi
22782 @chapter SASL
22783 @include sasl.texi
22784 @end iflatex
22785 @end iftex
22786
22787 @node Various
22788 @chapter Various
22789
22790 @menu
22791 * Process/Prefix::              A convention used by many treatment commands.
22792 * Interactive::                 Making Gnus ask you many questions.
22793 * Symbolic Prefixes::           How to supply some Gnus functions with options.
22794 * Formatting Variables::        You can specify what buffers should look like.
22795 * Window Layout::               Configuring the Gnus buffer windows.
22796 * Faces and Fonts::             How to change how faces look.
22797 * Compilation::                 How to speed Gnus up.
22798 * Mode Lines::                  Displaying information in the mode lines.
22799 * Highlighting and Menus::      Making buffers look all nice and cozy.
22800 * Buttons::                     Get tendinitis in ten easy steps!
22801 * Daemons::                     Gnus can do things behind your back.
22802 * NoCeM::                       How to avoid spam and other fatty foods.
22803 * Undo::                        Some actions can be undone.
22804 * Predicate Specifiers::        Specifying predicates.
22805 * Moderation::                  What to do if you're a moderator.
22806 * Fetching a Group::            Starting Gnus just to read a group.
22807 * Image Enhancements::          Modern versions of Emacs/XEmacs can display images.
22808 * Fuzzy Matching::              What's the big fuzz?
22809 * Thwarting Email Spam::        Simple ways to avoid unsolicited commercial email.
22810 * Spam Package::                A package for filtering and processing spam.
22811 * The Gnus Registry::           A package for tracking messages by Message-ID.
22812 * Other modes::                 Interaction with other modes.
22813 * Various Various::             Things that are really various.
22814 @end menu
22815
22816
22817 @node Process/Prefix
22818 @section Process/Prefix
22819 @cindex process/prefix convention
22820
22821 Many functions, among them functions for moving, decoding and saving
22822 articles, use what is known as the @dfn{Process/Prefix convention}.
22823
22824 This is a method for figuring out what articles the user wants the
22825 command to be performed on.
22826
22827 It goes like this:
22828
22829 If the numeric prefix is N, perform the operation on the next N
22830 articles, starting with the current one.  If the numeric prefix is
22831 negative, perform the operation on the previous N articles, starting
22832 with the current one.
22833
22834 @vindex transient-mark-mode
22835 If @code{transient-mark-mode} in non-@code{nil} and the region is
22836 active, all articles in the region will be worked upon.
22837
22838 If there is no numeric prefix, but some articles are marked with the
22839 process mark, perform the operation on the articles marked with
22840 the process mark.
22841
22842 If there is neither a numeric prefix nor any articles marked with the
22843 process mark, just perform the operation on the current article.
22844
22845 Quite simple, really, but it needs to be made clear so that surprises
22846 are avoided.
22847
22848 Commands that react to the process mark will push the current list of
22849 process marked articles onto a stack and will then clear all process
22850 marked articles.  You can restore the previous configuration with the
22851 @kbd{M P y} command (@pxref{Setting Process Marks}).
22852
22853 @vindex gnus-summary-goto-unread
22854 One thing that seems to shock & horrify lots of people is that, for
22855 instance, @kbd{3 d} does exactly the same as @kbd{d} @kbd{d} @kbd{d}.
22856 Since each @kbd{d} (which marks the current article as read) by default
22857 goes to the next unread article after marking, this means that @kbd{3 d}
22858 will mark the next three unread articles as read, no matter what the
22859 summary buffer looks like.  Set @code{gnus-summary-goto-unread} to
22860 @code{nil} for a more straightforward action.
22861
22862 Many commands do not use the process/prefix convention.  All commands
22863 that do explicitly say so in this manual.  To apply the process/prefix
22864 convention to commands that do not use it, you can use the @kbd{M-&}
22865 command.  For instance, to mark all the articles in the group as
22866 expirable, you could say @kbd{M P b M-& E}.
22867
22868
22869 @node Interactive
22870 @section Interactive
22871 @cindex interaction
22872
22873 @table @code
22874
22875 @item gnus-novice-user
22876 @vindex gnus-novice-user
22877 If this variable is non-@code{nil}, you are either a newcomer to the
22878 World of Usenet, or you are very cautious, which is a nice thing to be,
22879 really.  You will be given questions of the type ``Are you sure you want
22880 to do this?'' before doing anything dangerous.  This is @code{t} by
22881 default.
22882
22883 @item gnus-expert-user
22884 @vindex gnus-expert-user
22885 If this variable is non-@code{nil}, you will seldom be asked any
22886 questions by Gnus.  It will simply assume you know what you're doing,
22887 no matter how strange.  For example, quitting Gnus, exiting a group
22888 without an update, catching up with a group, deleting expired
22889 articles, and replying by mail to a news message will not require
22890 confirmation.
22891
22892 @item gnus-interactive-catchup
22893 @vindex gnus-interactive-catchup
22894 Require confirmation before catching up a group if non-@code{nil}.  It
22895 is @code{t} by default.
22896
22897 @item gnus-interactive-exit
22898 @vindex gnus-interactive-exit
22899 Require confirmation before exiting Gnus.  This variable is @code{t} by
22900 default.
22901 @end table
22902
22903
22904 @node Symbolic Prefixes
22905 @section Symbolic Prefixes
22906 @cindex symbolic prefixes
22907
22908 Quite a lot of Emacs commands react to the (numeric) prefix.  For
22909 instance, @kbd{C-u 4 C-f} moves point four characters forward, and
22910 @kbd{C-u 9 0 0 I s s p} adds a permanent @code{Subject} substring score
22911 rule of 900 to the current article.
22912
22913 This is all nice and well, but what if you want to give a command some
22914 additional information?  Well, what most commands do is interpret the
22915 ``raw'' prefix in some special way.  @kbd{C-u 0 C-x C-s} means that one
22916 doesn't want a backup file to be created when saving the current buffer,
22917 for instance.  But what if you want to save without making a backup
22918 file, and you want Emacs to flash lights and play a nice tune at the
22919 same time?  You can't, and you're probably perfectly happy that way.
22920
22921 @kindex M-i (Summary)
22922 @findex gnus-symbolic-argument
22923 I'm not, so I've added a second prefix---the @dfn{symbolic prefix}.  The
22924 prefix key is @kbd{M-i} (@code{gnus-symbolic-argument}), and the next
22925 character typed in is the value.  You can stack as many @kbd{M-i}
22926 prefixes as you want.  @kbd{M-i a C-M-u} means ``feed the @kbd{C-M-u}
22927 command the symbolic prefix @code{a}''.  @kbd{M-i a M-i b C-M-u} means
22928 ``feed the @kbd{C-M-u} command the symbolic prefixes @code{a} and
22929 @code{b}''.  You get the drift.
22930
22931 Typing in symbolic prefixes to commands that don't accept them doesn't
22932 hurt, but it doesn't do any good either.  Currently not many Gnus
22933 functions make use of the symbolic prefix.
22934
22935 If you're interested in how Gnus implements this, @pxref{Extended
22936 Interactive}.
22937
22938
22939 @node Formatting Variables
22940 @section Formatting Variables
22941 @cindex formatting variables
22942
22943 Throughout this manual you've probably noticed lots of variables called
22944 things like @code{gnus-group-line-format} and
22945 @code{gnus-summary-mode-line-format}.  These control how Gnus is to
22946 output lines in the various buffers.  There's quite a lot of them.
22947 Fortunately, they all use the same syntax, so there's not that much to
22948 be annoyed by.
22949
22950 Here's an example format spec (from the group buffer): @samp{%M%S%5y:
22951 %(%g%)\n}.  We see that it is indeed extremely ugly, and that there are
22952 lots of percentages everywhere.
22953
22954 @menu
22955 * Formatting Basics::           A formatting variable is basically a format string.
22956 * Mode Line Formatting::        Some rules about mode line formatting variables.
22957 * Advanced Formatting::         Modifying output in various ways.
22958 * User-Defined Specs::          Having Gnus call your own functions.
22959 * Formatting Fonts::            Making the formatting look colorful and nice.
22960 * Positioning Point::           Moving point to a position after an operation.
22961 * Tabulation::                  Tabulating your output.
22962 * Wide Characters::             Dealing with wide characters.
22963 @end menu
22964
22965 Currently Gnus uses the following formatting variables:
22966 @code{gnus-group-line-format}, @code{gnus-summary-line-format},
22967 @code{gnus-server-line-format}, @code{gnus-topic-line-format},
22968 @code{gnus-group-mode-line-format},
22969 @code{gnus-summary-mode-line-format},
22970 @code{gnus-article-mode-line-format},
22971 @code{gnus-server-mode-line-format}, and
22972 @code{gnus-summary-pick-line-format}.
22973
22974 All these format variables can also be arbitrary elisp forms.  In that
22975 case, they will be @code{eval}ed to insert the required lines.
22976
22977 @kindex M-x gnus-update-format
22978 @findex gnus-update-format
22979 Gnus includes a command to help you while creating your own format
22980 specs.  @kbd{M-x gnus-update-format} will @code{eval} the current form,
22981 update the spec in question and pop you to a buffer where you can
22982 examine the resulting Lisp code to be run to generate the line.
22983
22984
22985
22986 @node Formatting Basics
22987 @subsection Formatting Basics
22988
22989 Each @samp{%} element will be replaced by some string or other when the
22990 buffer in question is generated.  @samp{%5y} means ``insert the @samp{y}
22991 spec, and pad with spaces to get a 5-character field''.
22992
22993 As with normal C and Emacs Lisp formatting strings, the numerical
22994 modifier between the @samp{%} and the formatting type character will
22995 @dfn{pad} the output so that it is always at least that long.
22996 @samp{%5y} will make the field always (at least) five characters wide by
22997 padding with spaces to the left.  If you say @samp{%-5y}, it will pad to
22998 the right instead.
22999
23000 You may also wish to limit the length of the field to protect against
23001 particularly wide values.  For that you can say @samp{%4,6y}, which
23002 means that the field will never be more than 6 characters wide and never
23003 less than 4 characters wide.
23004
23005 Also Gnus supports some extended format specifications, such as
23006 @samp{%&user-date;}.
23007
23008
23009 @node Mode Line Formatting
23010 @subsection Mode Line Formatting
23011
23012 Mode line formatting variables (e.g.,
23013 @code{gnus-summary-mode-line-format}) follow the same rules as other,
23014 buffer line oriented formatting variables (@pxref{Formatting Basics})
23015 with the following two differences:
23016
23017 @enumerate
23018
23019 @item
23020 There must be no newline (@samp{\n}) at the end.
23021
23022 @item
23023 The special @samp{%%b} spec can be used to display the buffer name.
23024 Well, it's no spec at all, really---@samp{%%} is just a way to quote
23025 @samp{%} to allow it to pass through the formatting machinery unmangled,
23026 so that Emacs receives @samp{%b}, which is something the Emacs mode line
23027 display interprets to mean ``show the buffer name''.  For a full list of
23028 mode line specs Emacs understands, see the documentation of the
23029 @code{mode-line-format} variable.
23030
23031 @end enumerate
23032
23033
23034 @node Advanced Formatting
23035 @subsection Advanced Formatting
23036
23037 It is frequently useful to post-process the fields in some way.
23038 Padding, limiting, cutting off parts and suppressing certain values can
23039 be achieved by using @dfn{tilde modifiers}.  A typical tilde spec might
23040 look like @samp{%~(cut 3)~(ignore "0")y}.
23041
23042 These are the valid modifiers:
23043
23044 @table @code
23045 @item pad
23046 @itemx pad-left
23047 Pad the field to the left with spaces until it reaches the required
23048 length.
23049
23050 @item pad-right
23051 Pad the field to the right with spaces until it reaches the required
23052 length.
23053
23054 @item max
23055 @itemx max-left
23056 Cut off characters from the left until it reaches the specified length.
23057
23058 @item max-right
23059 Cut off characters from the right until it reaches the specified
23060 length.
23061
23062 @item cut
23063 @itemx cut-left
23064 Cut off the specified number of characters from the left.
23065
23066 @item cut-right
23067 Cut off the specified number of characters from the right.
23068
23069 @item ignore
23070 Return an empty string if the field is equal to the specified value.
23071
23072 @item form
23073 Use the specified form as the field value when the @samp{@@} spec is
23074 used.
23075
23076 Here's an example:
23077
23078 @lisp
23079 "~(form (current-time-string))@@"
23080 @end lisp
23081
23082 @end table
23083
23084 Let's take an example.  The @samp{%o} spec in the summary mode lines
23085 will return a date in compact ISO8601 format---@samp{19960809T230410}.
23086 This is quite a mouthful, so we want to shave off the century number and
23087 the time, leaving us with a six-character date.  That would be
23088 @samp{%~(cut-left 2)~(max-right 6)~(pad 6)o}.  (Cutting is done before
23089 maxing, and we need the padding to ensure that the date is never less
23090 than 6 characters to make it look nice in columns.)
23091
23092 Ignoring is done first; then cutting; then maxing; and then as the very
23093 last operation, padding.
23094
23095 If you use lots of these advanced thingies, you'll find that Gnus gets
23096 quite slow.  This can be helped enormously by running @kbd{M-x
23097 gnus-compile} when you are satisfied with the look of your lines.
23098 @xref{Compilation}.
23099
23100
23101 @node User-Defined Specs
23102 @subsection User-Defined Specs
23103
23104 All the specs allow for inserting user defined specifiers---@samp{u}.
23105 The next character in the format string should be a letter.  Gnus
23106 will call the function @code{gnus-user-format-function-}@samp{X}, where
23107 @samp{X} is the letter following @samp{%u}.  The function will be passed
23108 a single parameter---what the parameter means depends on what buffer
23109 it's being called from.  The function should return a string, which will
23110 be inserted into the buffer just like information from any other
23111 specifier.  This function may also be called with dummy values, so it
23112 should protect against that.
23113
23114 Also Gnus supports extended user-defined specs, such as @samp{%u&foo;}.
23115 Gnus will call the function @code{gnus-user-format-function-}@samp{foo}.
23116
23117 You can also use tilde modifiers (@pxref{Advanced Formatting} to achieve
23118 much the same without defining new functions.  Here's an example:
23119 @samp{%~(form (count-lines (point-min) (point)))@@}.  The form
23120 given here will be evaluated to yield the current line number, and then
23121 inserted.
23122
23123
23124 @node Formatting Fonts
23125 @subsection Formatting Fonts
23126
23127 @cindex %(, %)
23128 @vindex gnus-mouse-face
23129 There are specs for highlighting, and these are shared by all the format
23130 variables.  Text inside the @samp{%(} and @samp{%)} specifiers will get
23131 the special @code{mouse-face} property set, which means that it will be
23132 highlighted (with @code{gnus-mouse-face}) when you put the mouse pointer
23133 over it.
23134
23135 @cindex %@{, %@}
23136 @vindex gnus-face-0
23137 Text inside the @samp{%@{} and @samp{%@}} specifiers will have their
23138 normal faces set using @code{gnus-face-0}, which is @code{bold} by
23139 default.  If you say @samp{%1@{}, you'll get @code{gnus-face-1} instead,
23140 and so on.  Create as many faces as you wish.  The same goes for the
23141 @code{mouse-face} specs---you can say @samp{%3(hello%)} to have
23142 @samp{hello} mouse-highlighted with @code{gnus-mouse-face-3}.
23143
23144 @cindex %<<, %>>, guillemets
23145 @c @cindex %<<, %>>, %«, %», guillemets
23146 @vindex gnus-balloon-face-0
23147 Text inside the @samp{%<<} and @samp{%>>} specifiers will get the
23148 special @code{balloon-help} property set to
23149 @code{gnus-balloon-face-0}.  If you say @samp{%1<<}, you'll get
23150 @code{gnus-balloon-face-1} and so on.  The @code{gnus-balloon-face-*}
23151 variables should be either strings or symbols naming functions that
23152 return a string.  When the mouse passes over text with this property
23153 set, a balloon window will appear and display the string.  Please
23154 refer to @ref{Tooltips, ,Tooltips, emacs, The Emacs Manual},
23155 (in GNU Emacs) or the doc string of @code{balloon-help-mode} (in
23156 XEmacs) for more information on this.  (For technical reasons, the
23157 guillemets have been approximated as @samp{<<} and @samp{>>} in this
23158 paragraph.)
23159
23160 Here's an alternative recipe for the group buffer:
23161
23162 @lisp
23163 ;; @r{Create three face types.}
23164 (setq gnus-face-1 'bold)
23165 (setq gnus-face-3 'italic)
23166
23167 ;; @r{We want the article count to be in}
23168 ;; @r{a bold and green face.  So we create}
23169 ;; @r{a new face called @code{my-green-bold}.}
23170 (copy-face 'bold 'my-green-bold)
23171 ;; @r{Set the color.}
23172 (set-face-foreground 'my-green-bold "ForestGreen")
23173 (setq gnus-face-2 'my-green-bold)
23174
23175 ;; @r{Set the new & fancy format.}
23176 (setq gnus-group-line-format
23177       "%M%S%3@{%5y%@}%2[:%] %(%1@{%g%@}%)\n")
23178 @end lisp
23179
23180 I'm sure you'll be able to use this scheme to create totally unreadable
23181 and extremely vulgar displays.  Have fun!
23182
23183 Note that the @samp{%(} specs (and friends) do not make any sense on the
23184 mode-line variables.
23185
23186 @node Positioning Point
23187 @subsection Positioning Point
23188
23189 Gnus usually moves point to a pre-defined place on each line in most
23190 buffers.  By default, point move to the first colon character on the
23191 line.  You can customize this behavior in three different ways.
23192
23193 You can move the colon character to somewhere else on the line.
23194
23195 @findex gnus-goto-colon
23196 You can redefine the function that moves the point to the colon.  The
23197 function is called @code{gnus-goto-colon}.
23198
23199 But perhaps the most convenient way to deal with this, if you don't want
23200 to have a colon in your line, is to use the @samp{%*} specifier.  If you
23201 put a @samp{%*} somewhere in your format line definition, Gnus will
23202 place point there.
23203
23204
23205 @node Tabulation
23206 @subsection Tabulation
23207
23208 You can usually line up your displays by padding and cutting your
23209 strings.  However, when combining various strings of different size, it
23210 can often be more convenient to just output the strings, and then worry
23211 about lining up the following text afterwards.
23212
23213 To do that, Gnus supplies tabulator specs---@samp{%=}.  There are two
23214 different types---@dfn{hard tabulators} and @dfn{soft tabulators}.
23215
23216 @samp{%50=} will insert space characters to pad the line up to column
23217 50.  If the text is already past column 50, nothing will be inserted.
23218 This is the soft tabulator.
23219
23220 @samp{%-50=} will insert space characters to pad the line up to column
23221 50.  If the text is already past column 50, the excess text past column
23222 50 will be removed.  This is the hard tabulator.
23223
23224
23225 @node Wide Characters
23226 @subsection Wide Characters
23227
23228 Fixed width fonts in most countries have characters of the same width.
23229 Some countries, however, use Latin characters mixed with wider
23230 characters---most notable East Asian countries.
23231
23232 The problem is that when formatting, Gnus assumes that if a string is 10
23233 characters wide, it'll be 10 Latin characters wide on the screen.  In
23234 these countries, that's not true.
23235
23236 @vindex gnus-use-correct-string-widths
23237 To help fix this, you can set @code{gnus-use-correct-string-widths} to
23238 @code{t}.  This makes buffer generation slower, but the results will be
23239 prettier.  The default value under XEmacs is @code{t} but @code{nil}
23240 for Emacs.
23241
23242
23243 @node Window Layout
23244 @section Window Layout
23245 @cindex window layout
23246
23247 No, there's nothing here about X, so be quiet.
23248
23249 @vindex gnus-use-full-window
23250 If @code{gnus-use-full-window} non-@code{nil}, Gnus will delete all
23251 other windows and occupy the entire Emacs screen by itself.  It is
23252 @code{t} by default.
23253
23254 Setting this variable to @code{nil} kinda works, but there are
23255 glitches.  Use at your own peril.
23256
23257 @vindex gnus-buffer-configuration
23258 @code{gnus-buffer-configuration} describes how much space each Gnus
23259 buffer should be given.  Here's an excerpt of this variable:
23260
23261 @lisp
23262 ((group (vertical 1.0 (group 1.0 point)
23263                       (if gnus-carpal (group-carpal 4))))
23264  (article (vertical 1.0 (summary 0.25 point)
23265                         (article 1.0))))
23266 @end lisp
23267
23268 This is an alist.  The @dfn{key} is a symbol that names some action or
23269 other.  For instance, when displaying the group buffer, the window
23270 configuration function will use @code{group} as the key.  A full list of
23271 possible names is listed below.
23272
23273 The @dfn{value} (i.e., the @dfn{split}) says how much space each buffer
23274 should occupy.  To take the @code{article} split as an example -
23275
23276 @lisp
23277 (article (vertical 1.0 (summary 0.25 point)
23278                        (article 1.0)))
23279 @end lisp
23280
23281 This @dfn{split} says that the summary buffer should occupy 25% of upper
23282 half of the screen, and that it is placed over the article buffer.  As
23283 you may have noticed, 100% + 25% is actually 125% (yup, I saw y'all
23284 reaching for that calculator there).  However, the special number
23285 @code{1.0} is used to signal that this buffer should soak up all the
23286 rest of the space available after the rest of the buffers have taken
23287 whatever they need.  There should be only one buffer with the @code{1.0}
23288 size spec per split.
23289
23290 Point will be put in the buffer that has the optional third element
23291 @code{point}.  In a @code{frame} split, the last subsplit having a leaf
23292 split where the tag @code{frame-focus} is a member (i.e. is the third or
23293 fourth element in the list, depending on whether the @code{point} tag is
23294 present) gets focus.
23295
23296 Here's a more complicated example:
23297
23298 @lisp
23299 (article (vertical 1.0 (group 4)
23300                        (summary 0.25 point)
23301                        (if gnus-carpal (summary-carpal 4))
23302                        (article 1.0)))
23303 @end lisp
23304
23305 If the size spec is an integer instead of a floating point number,
23306 then that number will be used to say how many lines a buffer should
23307 occupy, not a percentage.
23308
23309 If the @dfn{split} looks like something that can be @code{eval}ed (to be
23310 precise---if the @code{car} of the split is a function or a subr), this
23311 split will be @code{eval}ed.  If the result is non-@code{nil}, it will
23312 be used as a split.  This means that there will be three buffers if
23313 @code{gnus-carpal} is @code{nil}, and four buffers if @code{gnus-carpal}
23314 is non-@code{nil}.
23315
23316 Not complicated enough for you?  Well, try this on for size:
23317
23318 @lisp
23319 (article (horizontal 1.0
23320              (vertical 0.5
23321                  (group 1.0)
23322                  (gnus-carpal 4))
23323              (vertical 1.0
23324                  (summary 0.25 point)
23325                  (summary-carpal 4)
23326                  (article 1.0))))
23327 @end lisp
23328
23329 Whoops.  Two buffers with the mystery 100% tag.  And what's that
23330 @code{horizontal} thingie?
23331
23332 If the first element in one of the split is @code{horizontal}, Gnus will
23333 split the window horizontally, giving you two windows side-by-side.
23334 Inside each of these strips you may carry on all you like in the normal
23335 fashion.  The number following @code{horizontal} says what percentage of
23336 the screen is to be given to this strip.
23337
23338 For each split, there @emph{must} be one element that has the 100% tag.
23339 The splitting is never accurate, and this buffer will eat any leftover
23340 lines from the splits.
23341
23342 To be slightly more formal, here's a definition of what a valid split
23343 may look like:
23344
23345 @example
23346 @group
23347 split      = frame | horizontal | vertical | buffer | form
23348 frame      = "(frame " size *split ")"
23349 horizontal = "(horizontal " size *split ")"
23350 vertical   = "(vertical " size *split ")"
23351 buffer     = "(" buf-name " " size *[ "point" ] *[ "frame-focus"] ")"
23352 size       = number | frame-params
23353 buf-name   = group | article | summary ...
23354 @end group
23355 @end example
23356
23357 The limitations are that the @code{frame} split can only appear as the
23358 top-level split.  @var{form} should be an Emacs Lisp form that should
23359 return a valid split.  We see that each split is fully recursive, and
23360 may contain any number of @code{vertical} and @code{horizontal} splits.
23361
23362 @vindex gnus-window-min-width
23363 @vindex gnus-window-min-height
23364 @cindex window height
23365 @cindex window width
23366 Finding the right sizes can be a bit complicated.  No window may be less
23367 than @code{gnus-window-min-height} (default 1) characters high, and all
23368 windows must be at least @code{gnus-window-min-width} (default 1)
23369 characters wide.  Gnus will try to enforce this before applying the
23370 splits.  If you want to use the normal Emacs window width/height limit,
23371 you can just set these two variables to @code{nil}.
23372
23373 If you're not familiar with Emacs terminology, @code{horizontal} and
23374 @code{vertical} splits may work the opposite way of what you'd expect.
23375 Windows inside a @code{horizontal} split are shown side-by-side, and
23376 windows within a @code{vertical} split are shown above each other.
23377
23378 @findex gnus-configure-frame
23379 If you want to experiment with window placement, a good tip is to call
23380 @code{gnus-configure-frame} directly with a split.  This is the function
23381 that does all the real work when splitting buffers.  Below is a pretty
23382 nonsensical configuration with 5 windows; two for the group buffer and
23383 three for the article buffer.  (I said it was nonsensical.)  If you
23384 @code{eval} the statement below, you can get an idea of how that would
23385 look straight away, without going through the normal Gnus channels.
23386 Play with it until you're satisfied, and then use
23387 @code{gnus-add-configuration} to add your new creation to the buffer
23388 configuration list.
23389
23390 @lisp
23391 (gnus-configure-frame
23392  '(horizontal 1.0
23393     (vertical 10
23394       (group 1.0)
23395       (article 0.3 point))
23396     (vertical 1.0
23397       (article 1.0)
23398       (horizontal 4
23399         (group 1.0)
23400         (article 10)))))
23401 @end lisp
23402
23403 You might want to have several frames as well.  No prob---just use the
23404 @code{frame} split:
23405
23406 @lisp
23407 (gnus-configure-frame
23408  '(frame 1.0
23409          (vertical 1.0
23410                    (summary 0.25 point frame-focus)
23411                    (article 1.0))
23412          (vertical ((height . 5) (width . 15)
23413                     (user-position . t)
23414                     (left . -1) (top . 1))
23415                    (picon 1.0))))
23416
23417 @end lisp
23418
23419 This split will result in the familiar summary/article window
23420 configuration in the first (or ``main'') frame, while a small additional
23421 frame will be created where picons will be shown.  As you can see,
23422 instead of the normal @code{1.0} top-level spec, each additional split
23423 should have a frame parameter alist as the size spec.
23424 @xref{Frame Parameters, , Frame Parameters, elisp, The GNU Emacs Lisp
23425 Reference Manual}.  Under XEmacs, a frame property list will be
23426 accepted, too---for instance, @code{(height 5 width 15 left -1 top 1)}
23427 is such a plist.
23428 The list of all possible keys for @code{gnus-buffer-configuration} can
23429 be found in its default value.
23430
23431 Note that the @code{message} key is used for both
23432 @code{gnus-group-mail} and @code{gnus-summary-mail-other-window}.  If
23433 it is desirable to distinguish between the two, something like this
23434 might be used:
23435
23436 @lisp
23437 (message (horizontal 1.0
23438                      (vertical 1.0 (message 1.0 point))
23439                      (vertical 0.24
23440                                (if (buffer-live-p gnus-summary-buffer)
23441                                    '(summary 0.5))
23442                                (group 1.0))))
23443 @end lisp
23444
23445 One common desire for a multiple frame split is to have a separate frame
23446 for composing mail and news while leaving the original frame intact.  To
23447 accomplish that, something like the following can be done:
23448
23449 @lisp
23450 (message
23451   (frame 1.0
23452          (if (not (buffer-live-p gnus-summary-buffer))
23453              (car (cdr (assoc 'group gnus-buffer-configuration)))
23454            (car (cdr (assoc 'summary gnus-buffer-configuration))))
23455          (vertical ((user-position . t) (top . 1) (left . 1)
23456                     (name . "Message"))
23457                    (message 1.0 point))))
23458 @end lisp
23459
23460 @findex gnus-add-configuration
23461 Since the @code{gnus-buffer-configuration} variable is so long and
23462 complicated, there's a function you can use to ease changing the config
23463 of a single setting: @code{gnus-add-configuration}.  If, for instance,
23464 you want to change the @code{article} setting, you could say:
23465
23466 @lisp
23467 (gnus-add-configuration
23468  '(article (vertical 1.0
23469                (group 4)
23470                (summary .25 point)
23471                (article 1.0))))
23472 @end lisp
23473
23474 You'd typically stick these @code{gnus-add-configuration} calls in your
23475 @file{~/.gnus.el} file or in some startup hook---they should be run after
23476 Gnus has been loaded.
23477
23478 @vindex gnus-always-force-window-configuration
23479 If all windows mentioned in the configuration are already visible, Gnus
23480 won't change the window configuration.  If you always want to force the
23481 ``right'' window configuration, you can set
23482 @code{gnus-always-force-window-configuration} to non-@code{nil}.
23483
23484 If you're using tree displays (@pxref{Tree Display}), and the tree
23485 window is displayed vertically next to another window, you may also want
23486 to fiddle with @code{gnus-tree-minimize-window} to avoid having the
23487 windows resized.
23488
23489 @subsection Example Window Configurations
23490
23491 @itemize @bullet
23492 @item
23493 Narrow left hand side occupied by group buffer.  Right hand side split
23494 between summary buffer (top one-sixth) and article buffer (bottom).
23495
23496 @ifinfo
23497 @example
23498 +---+---------+
23499 | G | Summary |
23500 | r +---------+
23501 | o |         |
23502 | u | Article |
23503 | p |         |
23504 +---+---------+
23505 @end example
23506 @end ifinfo
23507
23508 @lisp
23509 (gnus-add-configuration
23510  '(article
23511    (horizontal 1.0
23512                (vertical 25 (group 1.0))
23513                (vertical 1.0
23514                          (summary 0.16 point)
23515                          (article 1.0)))))
23516
23517 (gnus-add-configuration
23518  '(summary
23519    (horizontal 1.0
23520                (vertical 25 (group 1.0))
23521                (vertical 1.0 (summary 1.0 point)))))
23522 @end lisp
23523
23524 @end itemize
23525
23526
23527 @node Faces and Fonts
23528 @section Faces and Fonts
23529 @cindex faces
23530 @cindex fonts
23531 @cindex colors
23532
23533 Fiddling with fonts and faces used to be very difficult, but these days
23534 it is very simple.  You simply say @kbd{M-x customize-face}, pick out
23535 the face you want to alter, and alter it via the standard Customize
23536 interface.
23537
23538
23539 @node Compilation
23540 @section Compilation
23541 @cindex compilation
23542 @cindex byte-compilation
23543
23544 @findex gnus-compile
23545
23546 Remember all those line format specification variables?
23547 @code{gnus-summary-line-format}, @code{gnus-group-line-format}, and so
23548 on.  Now, Gnus will of course heed whatever these variables are, but,
23549 unfortunately, changing them will mean a quite significant slow-down.
23550 (The default values of these variables have byte-compiled functions
23551 associated with them, while the user-generated versions do not, of
23552 course.)
23553
23554 To help with this, you can run @kbd{M-x gnus-compile} after you've
23555 fiddled around with the variables and feel that you're (kind of)
23556 satisfied.  This will result in the new specs being byte-compiled, and
23557 you'll get top speed again.  Gnus will save these compiled specs in the
23558 @file{.newsrc.eld} file.  (User-defined functions aren't compiled by
23559 this function, though---you should compile them yourself by sticking
23560 them into the @file{~/.gnus.el} file and byte-compiling that file.)
23561
23562
23563 @node Mode Lines
23564 @section Mode Lines
23565 @cindex mode lines
23566
23567 @vindex gnus-updated-mode-lines
23568 @code{gnus-updated-mode-lines} says what buffers should keep their mode
23569 lines updated.  It is a list of symbols.  Supported symbols include
23570 @code{group}, @code{article}, @code{summary}, @code{server},
23571 @code{browse}, and @code{tree}.  If the corresponding symbol is present,
23572 Gnus will keep that mode line updated with information that may be
23573 pertinent.  If this variable is @code{nil}, screen refresh may be
23574 quicker.
23575
23576 @cindex display-time
23577
23578 @vindex gnus-mode-non-string-length
23579 By default, Gnus displays information on the current article in the mode
23580 lines of the summary and article buffers.  The information Gnus wishes
23581 to display (e.g. the subject of the article) is often longer than the
23582 mode lines, and therefore have to be cut off at some point.  The
23583 @code{gnus-mode-non-string-length} variable says how long the other
23584 elements on the line is (i.e., the non-info part).  If you put
23585 additional elements on the mode line (e.g. a clock), you should modify
23586 this variable:
23587
23588 @c Hook written by Francesco Potorti` <pot@cnuce.cnr.it>
23589 @lisp
23590 (add-hook 'display-time-hook
23591           (lambda () (setq gnus-mode-non-string-length
23592                            (+ 21
23593                               (if line-number-mode 5 0)
23594                               (if column-number-mode 4 0)
23595                               (length display-time-string)))))
23596 @end lisp
23597
23598 If this variable is @code{nil} (which is the default), the mode line
23599 strings won't be chopped off, and they won't be padded either.  Note
23600 that the default is unlikely to be desirable, as even the percentage
23601 complete in the buffer may be crowded off the mode line; the user should
23602 configure this variable appropriately for her configuration.
23603
23604
23605 @node Highlighting and Menus
23606 @section Highlighting and Menus
23607 @cindex visual
23608 @cindex highlighting
23609 @cindex menus
23610
23611 @vindex gnus-visual
23612 The @code{gnus-visual} variable controls most of the Gnus-prettifying
23613 aspects.  If @code{nil}, Gnus won't attempt to create menus or use fancy
23614 colors or fonts.  This will also inhibit loading the @file{gnus-vis.el}
23615 file.
23616
23617 This variable can be a list of visual properties that are enabled.  The
23618 following elements are valid, and are all included by default:
23619
23620 @table @code
23621 @item group-highlight
23622 Do highlights in the group buffer.
23623 @item summary-highlight
23624 Do highlights in the summary buffer.
23625 @item article-highlight
23626 Do highlights in the article buffer.
23627 @item highlight
23628 Turn on highlighting in all buffers.
23629 @item group-menu
23630 Create menus in the group buffer.
23631 @item summary-menu
23632 Create menus in the summary buffers.
23633 @item article-menu
23634 Create menus in the article buffer.
23635 @item browse-menu
23636 Create menus in the browse buffer.
23637 @item server-menu
23638 Create menus in the server buffer.
23639 @item score-menu
23640 Create menus in the score buffers.
23641 @item menu
23642 Create menus in all buffers.
23643 @end table
23644
23645 So if you only want highlighting in the article buffer and menus in all
23646 buffers, you could say something like:
23647
23648 @lisp
23649 (setq gnus-visual '(article-highlight menu))
23650 @end lisp
23651
23652 If you want highlighting only and no menus whatsoever, you'd say:
23653
23654 @lisp
23655 (setq gnus-visual '(highlight))
23656 @end lisp
23657
23658 If @code{gnus-visual} is @code{t}, highlighting and menus will be used
23659 in all Gnus buffers.
23660
23661 Other general variables that influence the look of all buffers include:
23662
23663 @table @code
23664 @item gnus-mouse-face
23665 @vindex gnus-mouse-face
23666 This is the face (i.e., font) used for mouse highlighting in Gnus.  No
23667 mouse highlights will be done if @code{gnus-visual} is @code{nil}.
23668
23669 @end table
23670
23671 There are hooks associated with the creation of all the different menus:
23672
23673 @table @code
23674
23675 @item gnus-article-menu-hook
23676 @vindex gnus-article-menu-hook
23677 Hook called after creating the article mode menu.
23678
23679 @item gnus-group-menu-hook
23680 @vindex gnus-group-menu-hook
23681 Hook called after creating the group mode menu.
23682
23683 @item gnus-summary-menu-hook
23684 @vindex gnus-summary-menu-hook
23685 Hook called after creating the summary mode menu.
23686
23687 @item gnus-server-menu-hook
23688 @vindex gnus-server-menu-hook
23689 Hook called after creating the server mode menu.
23690
23691 @item gnus-browse-menu-hook
23692 @vindex gnus-browse-menu-hook
23693 Hook called after creating the browse mode menu.
23694
23695 @item gnus-score-menu-hook
23696 @vindex gnus-score-menu-hook
23697 Hook called after creating the score mode menu.
23698
23699 @end table
23700
23701
23702 @node Buttons
23703 @section Buttons
23704 @cindex buttons
23705 @cindex mouse
23706 @cindex click
23707
23708 Those new-fangled @dfn{mouse} contraptions is very popular with the
23709 young, hep kids who don't want to learn the proper way to do things
23710 these days.  Why, I remember way back in the summer of '89, when I was
23711 using Emacs on a Tops 20 system.  Three hundred users on one single
23712 machine, and every user was running Simula compilers.  Bah!
23713
23714 Right.
23715
23716 @vindex gnus-carpal
23717 Well, you can make Gnus display bufferfuls of buttons you can click to
23718 do anything by setting @code{gnus-carpal} to @code{t}.  Pretty simple,
23719 really.  Tell the chiropractor I sent you.
23720
23721
23722 @table @code
23723
23724 @item gnus-carpal-mode-hook
23725 @vindex gnus-carpal-mode-hook
23726 Hook run in all carpal mode buffers.
23727
23728 @item gnus-carpal-button-face
23729 @vindex gnus-carpal-button-face
23730 Face used on buttons.
23731
23732 @item gnus-carpal-header-face
23733 @vindex gnus-carpal-header-face
23734 Face used on carpal buffer headers.
23735
23736 @item gnus-carpal-group-buffer-buttons
23737 @vindex gnus-carpal-group-buffer-buttons
23738 Buttons in the group buffer.
23739
23740 @item gnus-carpal-summary-buffer-buttons
23741 @vindex gnus-carpal-summary-buffer-buttons
23742 Buttons in the summary buffer.
23743
23744 @item gnus-carpal-server-buffer-buttons
23745 @vindex gnus-carpal-server-buffer-buttons
23746 Buttons in the server buffer.
23747
23748 @item gnus-carpal-browse-buffer-buttons
23749 @vindex gnus-carpal-browse-buffer-buttons
23750 Buttons in the browse buffer.
23751 @end table
23752
23753 All the @code{buttons} variables are lists.  The elements in these list
23754 are either cons cells where the @code{car} contains a text to be displayed and
23755 the @code{cdr} contains a function symbol, or a simple string.
23756
23757
23758 @node Daemons
23759 @section Daemons
23760 @cindex demons
23761 @cindex daemons
23762
23763 Gnus, being larger than any program ever written (allegedly), does lots
23764 of strange stuff that you may wish to have done while you're not
23765 present.  For instance, you may want it to check for new mail once in a
23766 while.  Or you may want it to close down all connections to all servers
23767 when you leave Emacs idle.  And stuff like that.
23768
23769 Gnus will let you do stuff like that by defining various
23770 @dfn{handlers}.  Each handler consists of three elements:  A
23771 @var{function}, a @var{time}, and an @var{idle} parameter.
23772
23773 Here's an example of a handler that closes connections when Emacs has
23774 been idle for thirty minutes:
23775
23776 @lisp
23777 (gnus-demon-close-connections nil 30)
23778 @end lisp
23779
23780 Here's a handler that scans for @acronym{PGP} headers every hour when
23781 Emacs is idle:
23782
23783 @lisp
23784 (gnus-demon-scan-pgp 60 t)
23785 @end lisp
23786
23787 This @var{time} parameter and that @var{idle} parameter work together
23788 in a strange, but wonderful fashion.  Basically, if @var{idle} is
23789 @code{nil}, then the function will be called every @var{time} minutes.
23790
23791 If @var{idle} is @code{t}, then the function will be called after
23792 @var{time} minutes only if Emacs is idle.  So if Emacs is never idle,
23793 the function will never be called.  But once Emacs goes idle, the
23794 function will be called every @var{time} minutes.
23795
23796 If @var{idle} is a number and @var{time} is a number, the function will
23797 be called every @var{time} minutes only when Emacs has been idle for
23798 @var{idle} minutes.
23799
23800 If @var{idle} is a number and @var{time} is @code{nil}, the function
23801 will be called once every time Emacs has been idle for @var{idle}
23802 minutes.
23803
23804 And if @var{time} is a string, it should look like @samp{07:31}, and
23805 the function will then be called once every day somewhere near that
23806 time.  Modified by the @var{idle} parameter, of course.
23807
23808 @vindex gnus-demon-timestep
23809 (When I say ``minute'' here, I really mean @code{gnus-demon-timestep}
23810 seconds.  This is 60 by default.  If you change that variable,
23811 all the timings in the handlers will be affected.)
23812
23813 So, if you want to add a handler, you could put something like this in
23814 your @file{~/.gnus.el} file:
23815
23816 @findex gnus-demon-add-handler
23817 @lisp
23818 (gnus-demon-add-handler 'gnus-demon-close-connections 30 t)
23819 @end lisp
23820
23821 @findex gnus-demon-add-nocem
23822 @findex gnus-demon-add-scanmail
23823 @findex gnus-demon-add-rescan
23824 @findex gnus-demon-add-scan-timestamps
23825 @findex gnus-demon-add-disconnection
23826 Some ready-made functions to do this have been created:
23827 @code{gnus-demon-add-nocem}, @code{gnus-demon-add-disconnection},
23828 @code{gnus-demon-add-nntp-close-connection},
23829 @code{gnus-demon-add-scan-timestamps}, @code{gnus-demon-add-rescan}, and
23830 @code{gnus-demon-add-scanmail}.  Just put those functions in your
23831 @file{~/.gnus.el} if you want those abilities.
23832
23833 @findex gnus-demon-init
23834 @findex gnus-demon-cancel
23835 @vindex gnus-demon-handlers
23836 If you add handlers to @code{gnus-demon-handlers} directly, you should
23837 run @code{gnus-demon-init} to make the changes take hold.  To cancel all
23838 daemons, you can use the @code{gnus-demon-cancel} function.
23839
23840 Note that adding daemons can be pretty naughty if you over do it.  Adding
23841 functions that scan all news and mail from all servers every two seconds
23842 is a sure-fire way of getting booted off any respectable system.  So
23843 behave.
23844
23845
23846 @node NoCeM
23847 @section NoCeM
23848 @cindex nocem
23849 @cindex spam
23850
23851 @dfn{Spamming} is posting the same article lots and lots of times.
23852 Spamming is bad.  Spamming is evil.
23853
23854 Spamming is usually canceled within a day or so by various anti-spamming
23855 agencies.  These agencies usually also send out @dfn{NoCeM} messages.
23856 NoCeM is pronounced ``no see-'em'', and means what the name
23857 implies---these are messages that make the offending articles, like, go
23858 away.
23859
23860 What use are these NoCeM messages if the articles are canceled anyway?
23861 Some sites do not honor cancel messages and some sites just honor cancels
23862 from a select few people.  Then you may wish to make use of the NoCeM
23863 messages, which are distributed in the newsgroups
23864 @samp{news.lists.filters}, @samp{alt.nocem.misc}, etc.
23865
23866 Gnus can read and parse the messages in this group automatically, and
23867 this will make spam disappear.
23868
23869 There are some variables to customize, of course:
23870
23871 @table @code
23872 @item gnus-use-nocem
23873 @vindex gnus-use-nocem
23874 Set this variable to @code{t} to set the ball rolling.  It is @code{nil}
23875 by default.
23876
23877 You can also set this variable to a positive number as a group level.
23878 In that case, Gnus scans NoCeM messages when checking new news if this
23879 value is not exceeding a group level that you specify as the prefix
23880 argument to some commands, e.g. @code{gnus},
23881 @code{gnus-group-get-new-news}, etc.  Otherwise, Gnus does not scan
23882 NoCeM messages if you specify a group level that is smaller than this
23883 value to those commands.  For example, if you use 1 or 2 on the mail
23884 groups and the levels on the news groups remain the default, 3 is the
23885 best choice.
23886
23887 @item gnus-nocem-groups
23888 @vindex gnus-nocem-groups
23889 Gnus will look for NoCeM messages in the groups in this list.  The
23890 default is
23891 @lisp
23892 ("news.lists.filters" "alt.nocem.misc")
23893 @end lisp
23894
23895 @item gnus-nocem-issuers
23896 @vindex gnus-nocem-issuers
23897 There are many people issuing NoCeM messages.  This list says what
23898 people you want to listen to.  The default is:
23899
23900 @lisp
23901 ("Adri Verhoef"
23902  "alba-nocem@@albasani.net"
23903  "bleachbot@@httrack.com"
23904  "news@@arcor-online.net"
23905  "news@@uni-berlin.de"
23906  "nocem@@arcor.de"
23907  "pgpmoose@@killfile.org"
23908  "xjsppl@@gmx.de")
23909 @end lisp
23910
23911 Known despammers that you can put in this list are listed at@*
23912 @uref{http://www.xs4all.nl/~rosalind/nocemreg/nocemreg.html}.
23913
23914 You do not have to heed NoCeM messages from all these people---just the
23915 ones you want to listen to.  You also don't have to accept all NoCeM
23916 messages from the people you like.  Each NoCeM message has a @dfn{type}
23917 header that gives the message a (more or less, usually less) rigorous
23918 definition.  Common types are @samp{spam}, @samp{spew}, @samp{mmf},
23919 @samp{binary}, and @samp{troll}.  To specify this, you have to use
23920 @code{(@var{issuer} @var{conditions} @dots{})} elements in the list.
23921 Each condition is either a string (which is a regexp that matches types
23922 you want to use) or a list on the form @code{(not @var{string})}, where
23923 @var{string} is a regexp that matches types you don't want to use.
23924
23925 For instance, if you want all NoCeM messages from Chris Lewis except his
23926 @samp{troll} messages, you'd say:
23927
23928 @lisp
23929 ("clewis@@ferret.ocunix.on.ca" ".*" (not "troll"))
23930 @end lisp
23931
23932 On the other hand, if you just want nothing but his @samp{spam} and
23933 @samp{spew} messages, you'd say:
23934
23935 @lisp
23936 ("clewis@@ferret.ocunix.on.ca" (not ".*") "spew" "spam")
23937 @end lisp
23938
23939 The specs are applied left-to-right.
23940
23941
23942 @item gnus-nocem-verifyer
23943 @vindex gnus-nocem-verifyer
23944 @findex gnus-nocem-epg-verify
23945 @findex pgg-verify
23946 This should be a function for verifying that the NoCeM issuer is who she
23947 says she is.  This variable defaults to @code{gnus-nocem-epg-verify} if
23948 EasyPG is available, otherwise defaults to @code{pgg-verify}.  The
23949 function should return non-@code{nil} if the verification is successful,
23950 otherwise (including the case the NoCeM message was not signed) should
23951 return @code{nil}.  If this is too slow and you don't care for
23952 verification (which may be dangerous), you can set this variable to
23953 @code{nil}.
23954
23955 Formerly the default was @code{mc-verify}, which is a Mailcrypt
23956 function.  While you can still use it, you can change it into
23957 @code{gnus-nocem-epg-verify} or @code{pgg-verify} running with GnuPG if
23958 you are willing to add the @acronym{PGP} public keys to GnuPG's keyring.
23959
23960 @item gnus-nocem-directory
23961 @vindex gnus-nocem-directory
23962 This is where Gnus will store its NoCeM cache files.  The default is@*
23963 @file{~/News/NoCeM/}.
23964
23965 @item gnus-nocem-expiry-wait
23966 @vindex gnus-nocem-expiry-wait
23967 The number of days before removing old NoCeM entries from the cache.
23968 The default is 15.  If you make it shorter Gnus will be faster, but you
23969 might then see old spam.
23970
23971 @item gnus-nocem-check-from
23972 @vindex gnus-nocem-check-from
23973 Non-@code{nil} means check for valid issuers in message bodies.
23974 Otherwise don't bother fetching articles unless their author matches a
23975 valid issuer; that is much faster if you are selective about the
23976 issuers.
23977
23978 @item gnus-nocem-check-article-limit
23979 @vindex gnus-nocem-check-article-limit
23980 If non-@code{nil}, the maximum number of articles to check in any NoCeM
23981 group.  @code{nil} means no restriction.  NoCeM groups can be huge and
23982 very slow to process.
23983
23984 @end table
23985
23986 Using NoCeM could potentially be a memory hog.  If you have many living
23987 (i. e., subscribed or unsubscribed groups), your Emacs process will grow
23988 big.  If this is a problem, you should kill off all (or most) of your
23989 unsubscribed groups (@pxref{Subscription Commands}).
23990
23991
23992 @node Undo
23993 @section Undo
23994 @cindex undo
23995
23996 It is very useful to be able to undo actions one has done.  In normal
23997 Emacs buffers, it's easy enough---you just push the @code{undo} button.
23998 In Gnus buffers, however, it isn't that simple.
23999
24000 The things Gnus displays in its buffer is of no value whatsoever to
24001 Gnus---it's all just data designed to look nice to the user.
24002 Killing a group in the group buffer with @kbd{C-k} makes the line
24003 disappear, but that's just a side-effect of the real action---the
24004 removal of the group in question from the internal Gnus structures.
24005 Undoing something like that can't be done by the normal Emacs
24006 @code{undo} function.
24007
24008 Gnus tries to remedy this somewhat by keeping track of what the user
24009 does and coming up with actions that would reverse the actions the user
24010 takes.  When the user then presses the @code{undo} key, Gnus will run
24011 the code to reverse the previous action, or the previous actions.
24012 However, not all actions are easily reversible, so Gnus currently offers
24013 a few key functions to be undoable.  These include killing groups,
24014 yanking groups, and changing the list of read articles of groups.
24015 That's it, really.  More functions may be added in the future, but each
24016 added function means an increase in data to be stored, so Gnus will
24017 never be totally undoable.
24018
24019 @findex gnus-undo-mode
24020 @vindex gnus-use-undo
24021 @findex gnus-undo
24022 The undoability is provided by the @code{gnus-undo-mode} minor mode.  It
24023 is used if @code{gnus-use-undo} is non-@code{nil}, which is the
24024 default.  The @kbd{C-M-_} key performs the @code{gnus-undo}
24025 command, which should feel kinda like the normal Emacs @code{undo}
24026 command.
24027
24028
24029 @node Predicate Specifiers
24030 @section Predicate Specifiers
24031 @cindex predicate specifiers
24032
24033 Some Gnus variables are @dfn{predicate specifiers}.  This is a special
24034 form that allows flexible specification of predicates without having
24035 to type all that much.
24036
24037 These specifiers are lists consisting of functions, symbols and lists.
24038
24039 Here's an example:
24040
24041 @lisp
24042 (or gnus-article-unseen-p
24043     gnus-article-unread-p)
24044 @end lisp
24045
24046 The available symbols are @code{or}, @code{and} and @code{not}.  The
24047 functions all take one parameter.
24048
24049 @findex gnus-make-predicate
24050 Internally, Gnus calls @code{gnus-make-predicate} on these specifiers
24051 to create a function that can be called.  This input parameter to this
24052 function will be passed along to all the functions in the predicate
24053 specifier.
24054
24055
24056 @node Moderation
24057 @section Moderation
24058 @cindex moderation
24059
24060 If you are a moderator, you can use the @file{gnus-mdrtn.el} package.
24061 It is not included in the standard Gnus package.  Write a mail to
24062 @samp{larsi@@gnus.org} and state what group you moderate, and you'll
24063 get a copy.
24064
24065 The moderation package is implemented as a minor mode for summary
24066 buffers.  Put
24067
24068 @lisp
24069 (add-hook 'gnus-summary-mode-hook 'gnus-moderate)
24070 @end lisp
24071
24072 in your @file{~/.gnus.el} file.
24073
24074 If you are the moderator of @samp{rec.zoofle}, this is how it's
24075 supposed to work:
24076
24077 @enumerate
24078 @item
24079 You split your incoming mail by matching on
24080 @samp{Newsgroups:.*rec.zoofle}, which will put all the to-be-posted
24081 articles in some mail group---for instance, @samp{nnml:rec.zoofle}.
24082
24083 @item
24084 You enter that group once in a while and post articles using the @kbd{e}
24085 (edit-and-post) or @kbd{s} (just send unedited) commands.
24086
24087 @item
24088 If, while reading the @samp{rec.zoofle} newsgroup, you happen upon some
24089 articles that weren't approved by you, you can cancel them with the
24090 @kbd{c} command.
24091 @end enumerate
24092
24093 To use moderation mode in these two groups, say:
24094
24095 @lisp
24096 (setq gnus-moderated-list
24097       "^nnml:rec.zoofle$\\|^rec.zoofle$")
24098 @end lisp
24099
24100
24101 @node Fetching a Group
24102 @section Fetching a Group
24103 @cindex fetching a group
24104
24105 @findex gnus-fetch-group
24106 It is sometimes convenient to be able to just say ``I want to read this
24107 group and I don't care whether Gnus has been started or not''.  This is
24108 perhaps more useful for people who write code than for users, but the
24109 command @code{gnus-fetch-group} provides this functionality in any case.
24110 It takes the group name as a parameter.
24111
24112
24113 @node Image Enhancements
24114 @section Image Enhancements
24115
24116 XEmacs, as well as Emacs 21@footnote{Emacs 21 on MS Windows doesn't
24117 support images, Emacs 22 does.} and up, are able to display pictures and
24118 stuff, so Gnus has taken advantage of that.
24119
24120 @menu
24121 * X-Face::                      Display a funky, teensy black-and-white image.
24122 * Face::                        Display a funkier, teensier colored image.
24123 * Smileys::                     Show all those happy faces the way they were meant to be shown.
24124 * Picons::                      How to display pictures of what you're reading.
24125 * XVarious::                    Other XEmacsy Gnusey variables.
24126 @end menu
24127
24128
24129 @node X-Face
24130 @subsection X-Face
24131 @cindex x-face
24132
24133 @code{X-Face} headers describe a 48x48 pixel black-and-white (1 bit
24134 depth) image that's supposed to represent the author of the message.
24135 It seems to be supported by an ever-growing number of mail and news
24136 readers.
24137
24138 @cindex x-face
24139 @findex gnus-article-display-x-face
24140 @vindex gnus-article-x-face-command
24141 @vindex gnus-article-x-face-too-ugly
24142 @iftex
24143 @iflatex
24144 \include{xface}
24145 @end iflatex
24146 @end iftex
24147 @c @anchor{X-Face}
24148
24149 Viewing an @code{X-Face} header either requires an Emacs that has
24150 @samp{compface} support (which most XEmacs versions have), or that you
24151 have suitable conversion or display programs installed.  If your Emacs
24152 has image support the default action is to display the face before the
24153 @code{From} header.  If there's no native @code{X-Face} support, Gnus
24154 will try to convert the @code{X-Face} header using external programs
24155 from the @code{pbmplus} package and friends, see below.  For XEmacs it's
24156 faster if XEmacs has been compiled with @code{X-Face} support.  The
24157 default action under Emacs without image support is to fork off the
24158 @code{display} program.
24159
24160 On a GNU/Linux system, the @code{display} program is included in the
24161 ImageMagick package.  For external conversion programs look for packages
24162 with names like @code{netpbm}, @code{libgr-progs} and @code{compface}.
24163 On Windows, you may use the packages @code{netpbm} and @code{compface}
24164 from @url{http://gnuwin32.sourceforge.net}.  You need to add the
24165 @code{bin} directory to your @code{PATH} environment variable.
24166 @c In fact only the following DLLs and binaries seem to be required:
24167 @c compface1.dll uncompface.exe libnetpbm10.dll icontopbm.exe
24168
24169 The variable @code{gnus-article-x-face-command} controls which programs
24170 are used to display the @code{X-Face} header.  If this variable is a
24171 string, this string will be executed in a sub-shell.  If it is a
24172 function, this function will be called with the face as the argument.
24173 If @code{gnus-article-x-face-too-ugly} (which is a regexp) matches the
24174 @code{From} header, the face will not be shown.
24175
24176 (Note: @code{x-face} is used in the variable/function names, not
24177 @code{xface}).
24178
24179 @noindent
24180 Face and variable:
24181
24182 @table @code
24183 @item gnus-x-face
24184 @vindex gnus-x-face
24185 Face to show X-Face.  The colors from this face are used as the
24186 foreground and background colors of the displayed X-Faces.  The
24187 default colors are black and white.
24188
24189 @item gnus-face-properties-alist
24190 @vindex gnus-face-properties-alist
24191 Alist of image types and properties applied to Face (@pxref{Face}) and
24192 X-Face images.  The default value is @code{((pbm . (:face gnus-x-face))
24193 (png . nil))} for Emacs or @code{((xface . (:face gnus-x-face)))} for
24194 XEmacs.  Here are examples:
24195
24196 @lisp
24197 ;; Specify the altitude of Face and X-Face images in the From header.
24198 (setq gnus-face-properties-alist
24199       '((pbm . (:face gnus-x-face :ascent 80))
24200         (png . (:ascent 80))))
24201
24202 ;; Show Face and X-Face images as pressed buttons.
24203 (setq gnus-face-properties-alist
24204       '((pbm . (:face gnus-x-face :relief -2))
24205         (png . (:relief -2))))
24206 @end lisp
24207
24208 @pxref{Image Descriptors, ,Image Descriptors, elisp, The Emacs Lisp
24209 Reference Manual} for the valid properties for various image types.
24210 Currently, @code{pbm} is used for X-Face images and @code{png} is used
24211 for Face images in Emacs.  Only the @code{:face} property is effective
24212 on the @code{xface} image type in XEmacs if it is built with the
24213 @samp{libcompface} library.
24214 @end table
24215
24216 If you use posting styles, you can use an @code{x-face-file} entry in
24217 @code{gnus-posting-styles}, @xref{Posting Styles}.  If you don't, Gnus
24218 provides a few convenience functions and variables to allow easier
24219 insertion of X-Face headers in outgoing messages.  You also need the
24220 above mentioned ImageMagick, netpbm or other image conversion packages
24221 (depending the values of the variables below) for these functions.
24222
24223 @findex gnus-random-x-face
24224 @vindex gnus-convert-pbm-to-x-face-command
24225 @vindex gnus-x-face-directory
24226 @code{gnus-random-x-face} goes through all the @samp{pbm} files in
24227 @code{gnus-x-face-directory} and picks one at random, and then
24228 converts it to the X-Face format by using the
24229 @code{gnus-convert-pbm-to-x-face-command} shell command.  The
24230 @samp{pbm} files should be 48x48 pixels big.  It returns the X-Face
24231 header data as a string.
24232
24233 @findex gnus-insert-random-x-face-header
24234 @code{gnus-insert-random-x-face-header} calls
24235 @code{gnus-random-x-face} and inserts a @samp{X-Face} header with the
24236 randomly generated data.
24237
24238 @findex gnus-x-face-from-file
24239 @vindex gnus-convert-image-to-x-face-command
24240 @code{gnus-x-face-from-file} takes a GIF file as the parameter, and then
24241 converts the file to X-Face format by using the
24242 @code{gnus-convert-image-to-x-face-command} shell command.
24243
24244 Here's how you would typically use the first function.  Put something
24245 like the following in your @file{~/.gnus.el} file:
24246
24247 @lisp
24248 (setq message-required-news-headers
24249       (nconc message-required-news-headers
24250              (list '(X-Face . gnus-random-x-face))))
24251 @end lisp
24252
24253 Using the last function would be something like this:
24254
24255 @lisp
24256 (setq message-required-news-headers
24257       (nconc message-required-news-headers
24258              (list '(X-Face . (lambda ()
24259                                 (gnus-x-face-from-file
24260                                  "~/My-face.gif"))))))
24261 @end lisp
24262
24263
24264 @node Face
24265 @subsection Face
24266 @cindex face
24267
24268 @c #### FIXME: faces and x-faces' implementations should really be harmonized.
24269
24270 @code{Face} headers are essentially a funkier version of @code{X-Face}
24271 ones. They describe a 48x48 pixel colored image that's supposed to
24272 represent the author of the message.
24273
24274 @cindex face
24275 @findex gnus-article-display-face
24276 The contents of a @code{Face} header must be a base64 encoded PNG image.
24277 See @uref{http://quimby.gnus.org/circus/face/} for the precise
24278 specifications.
24279
24280 The @code{gnus-face-properties-alist} variable affects the appearance of
24281 displayed Face images.  @xref{X-Face}.
24282
24283 Viewing an @code{Face} header requires an Emacs that is able to display
24284 PNG images.
24285 @c Maybe add this:
24286 @c (if (featurep 'xemacs)
24287 @c     (featurep 'png)
24288 @c   (image-type-available-p 'png))
24289
24290 Gnus provides a few convenience functions and variables to allow
24291 easier insertion of Face headers in outgoing messages.
24292
24293 @findex gnus-convert-png-to-face
24294 @code{gnus-convert-png-to-face} takes a 48x48 PNG image, no longer than
24295 726 bytes long, and converts it to a face.
24296
24297 @findex gnus-face-from-file
24298 @vindex gnus-convert-image-to-face-command
24299 @code{gnus-face-from-file} takes a JPEG file as the parameter, and then
24300 converts the file to Face format by using the
24301 @code{gnus-convert-image-to-face-command} shell command.
24302
24303 Here's how you would typically use this function. Put something like the
24304 following in your @file{~/.gnus.el} file:
24305
24306 @lisp
24307 (setq message-required-news-headers
24308       (nconc message-required-news-headers
24309              (list '(Face . (lambda ()
24310                               (gnus-face-from-file "~/face.jpg"))))))
24311 @end lisp
24312
24313
24314 @node Smileys
24315 @subsection Smileys
24316 @cindex smileys
24317
24318 @iftex
24319 @iflatex
24320 \gnusfig{-3cm}{0.5cm}{\epsfig{figure=ps/BigFace,height=20cm}}
24321 \input{smiley}
24322 @end iflatex
24323 @end iftex
24324
24325 @dfn{Smiley} is a package separate from Gnus, but since Gnus is
24326 currently the only package that uses Smiley, it is documented here.
24327
24328 In short---to use Smiley in Gnus, put the following in your
24329 @file{~/.gnus.el} file:
24330
24331 @lisp
24332 (setq gnus-treat-display-smileys t)
24333 @end lisp
24334
24335 Smiley maps text smiley faces---@samp{:-)}, @samp{8-)}, @samp{:-(} and
24336 the like---to pictures and displays those instead of the text smiley
24337 faces.  The conversion is controlled by a list of regexps that matches
24338 text and maps that to file names.
24339
24340 @vindex smiley-regexp-alist
24341 The alist used is specified by the @code{smiley-regexp-alist}
24342 variable.  The first item in each element is the regexp to be matched;
24343 the second element is the regexp match group that is to be replaced by
24344 the picture; and the third element is the name of the file to be
24345 displayed.
24346
24347 The following variables customize the appearance of the smileys:
24348
24349 @table @code
24350
24351 @item smiley-style
24352 @vindex smiley-style
24353 Specifies the smiley style.  Predefined smiley styles include
24354 @code{low-color} (small 13x14 pixel, three-color images), @code{medium}
24355 (more colorful images, 16x16 pixel), and @code{grayscale} (grayscale
24356 images, 14x14 pixel).  The default depends on the height of the default
24357 face.
24358
24359 @item smiley-data-directory
24360 @vindex smiley-data-directory
24361 Where Smiley will look for smiley faces files.  You shouldn't set this
24362 variable anymore.  Customize @code{smiley-style} instead.
24363
24364 @item gnus-smiley-file-types
24365 @vindex gnus-smiley-file-types
24366 List of suffixes on smiley file names to try.
24367
24368 @end table
24369
24370
24371 @node Picons
24372 @subsection Picons
24373
24374 @iftex
24375 @iflatex
24376 \include{picons}
24377 @end iflatex
24378 @end iftex
24379
24380 So@dots{}  You want to slow down your news reader even more!  This is a
24381 good way to do so.  It's also a great way to impress people staring
24382 over your shoulder as you read news.
24383
24384 What are Picons?  To quote directly from the Picons Web site:
24385
24386 @iftex
24387 @iflatex
24388 \margindex{}
24389 @end iflatex
24390 @end iftex
24391
24392 @quotation
24393 @dfn{Picons} is short for ``personal icons''.  They're small,
24394 constrained images used to represent users and domains on the net,
24395 organized into databases so that the appropriate image for a given
24396 e-mail address can be found.  Besides users and domains, there are picon
24397 databases for Usenet newsgroups and weather forecasts.  The picons are
24398 in either monochrome @code{XBM} format or color @code{XPM} and
24399 @code{GIF} formats.
24400 @end quotation
24401
24402 @vindex gnus-picon-databases
24403 For instructions on obtaining and installing the picons databases,
24404 point your Web browser at
24405 @uref{http://www.cs.indiana.edu/picons/ftp/index.html}.
24406
24407 If you are using Debian GNU/Linux, saying @samp{apt-get install
24408 picons.*} will install the picons where Gnus can find them.
24409
24410 To enable displaying picons, simply make sure that
24411 @code{gnus-picon-databases} points to the directory containing the
24412 Picons databases.
24413
24414 @vindex gnus-picon-style
24415 The variable @code{gnus-picon-style} controls how picons are displayed.
24416 If @code{inline}, the textual representation is replaced.  If
24417 @code{right}, picons are added right to the textual representation.
24418
24419 The following variables offer control over where things are located.
24420
24421 @table @code
24422
24423 @item gnus-picon-databases
24424 @vindex gnus-picon-databases
24425 The location of the picons database.  This is a list of directories
24426 containing the @file{news}, @file{domains}, @file{users} (and so on)
24427 subdirectories.  Defaults to @code{("/usr/lib/picon"
24428 "/usr/local/faces")}.
24429
24430 @item gnus-picon-news-directories
24431 @vindex gnus-picon-news-directories
24432 List of subdirectories to search in @code{gnus-picon-databases} for
24433 newsgroups faces.  @code{("news")} is the default.
24434
24435 @item gnus-picon-user-directories
24436 @vindex gnus-picon-user-directories
24437 List of subdirectories to search in @code{gnus-picon-databases} for user
24438 faces.  @code{("users" "usenix" "local" "misc")} is the default.
24439
24440 @item gnus-picon-domain-directories
24441 @vindex gnus-picon-domain-directories
24442 List of subdirectories to search in @code{gnus-picon-databases} for
24443 domain name faces.  Defaults to @code{("domains")}.  Some people may
24444 want to add @samp{"unknown"} to this list.
24445
24446 @item gnus-picon-file-types
24447 @vindex gnus-picon-file-types
24448 Ordered list of suffixes on picon file names to try.  Defaults to
24449 @code{("xpm" "gif" "xbm")} minus those not built-in your Emacs.
24450
24451 @end table
24452
24453
24454 @node XVarious
24455 @subsection Various XEmacs Variables
24456
24457 @table @code
24458 @item gnus-xmas-glyph-directory
24459 @vindex gnus-xmas-glyph-directory
24460 This is where Gnus will look for pictures.  Gnus will normally
24461 auto-detect this directory, but you may set it manually if you have an
24462 unusual directory structure.
24463
24464 @item gnus-xmas-modeline-glyph
24465 @vindex gnus-xmas-modeline-glyph
24466 A glyph displayed in all Gnus mode lines.  It is a tiny gnu head by
24467 default.
24468
24469 @end table
24470
24471 @subsubsection Toolbar
24472
24473 @table @code
24474
24475 @item gnus-use-toolbar
24476 @vindex gnus-use-toolbar
24477 This variable specifies the position to display the toolbar.  If
24478 @code{nil}, don't display toolbars.  If it is non-@code{nil}, it should
24479 be one of the symbols @code{default}, @code{top}, @code{bottom},
24480 @code{right}, and @code{left}.  @code{default} means to use the default
24481 toolbar, the rest mean to display the toolbar on the place which those
24482 names show.  The default is @code{default}.
24483
24484 @item gnus-toolbar-thickness
24485 @vindex gnus-toolbar-thickness
24486 Cons of the height and the width specifying the thickness of a toolbar.
24487 The height is used for the toolbar displayed on the top or the bottom,
24488 the width is used for the toolbar displayed on the right or the left.
24489 The default is that of the default toolbar.
24490
24491 @item gnus-group-toolbar
24492 @vindex gnus-group-toolbar
24493 The toolbar in the group buffer.
24494
24495 @item gnus-summary-toolbar
24496 @vindex gnus-summary-toolbar
24497 The toolbar in the summary buffer.
24498
24499 @item gnus-summary-mail-toolbar
24500 @vindex gnus-summary-mail-toolbar
24501 The toolbar in the summary buffer of mail groups.
24502
24503 @end table
24504
24505 @iftex
24506 @iflatex
24507 \margindex{}
24508 @end iflatex
24509 @end iftex
24510
24511
24512 @node Fuzzy Matching
24513 @section Fuzzy Matching
24514 @cindex fuzzy matching
24515
24516 Gnus provides @dfn{fuzzy matching} of @code{Subject} lines when doing
24517 things like scoring, thread gathering and thread comparison.
24518
24519 As opposed to regular expression matching, fuzzy matching is very fuzzy.
24520 It's so fuzzy that there's not even a definition of what @dfn{fuzziness}
24521 means, and the implementation has changed over time.
24522
24523 Basically, it tries to remove all noise from lines before comparing.
24524 @samp{Re: }, parenthetical remarks, white space, and so on, are filtered
24525 out of the strings before comparing the results.  This often leads to
24526 adequate results---even when faced with strings generated by text
24527 manglers masquerading as newsreaders.
24528
24529
24530 @node Thwarting Email Spam
24531 @section Thwarting Email Spam
24532 @cindex email spam
24533 @cindex spam
24534 @cindex UCE
24535 @cindex unsolicited commercial email
24536
24537 In these last days of the Usenet, commercial vultures are hanging about
24538 and grepping through news like crazy to find email addresses they can
24539 foist off their scams and products to.  As a reaction to this, many
24540 people have started putting nonsense addresses into their @code{From}
24541 lines.  I think this is counterproductive---it makes it difficult for
24542 people to send you legitimate mail in response to things you write, as
24543 well as making it difficult to see who wrote what.  This rewriting may
24544 perhaps be a bigger menace than the unsolicited commercial email itself
24545 in the end.
24546
24547 The biggest problem I have with email spam is that it comes in under
24548 false pretenses.  I press @kbd{g} and Gnus merrily informs me that I
24549 have 10 new emails.  I say ``Golly gee!  Happy is me!'' and select the
24550 mail group, only to find two pyramid schemes, seven advertisements
24551 (``New!  Miracle tonic for growing full, lustrous hair on your toes!'')
24552 and one mail asking me to repent and find some god.
24553
24554 This is annoying.  Here's what you can do about it.
24555
24556 @menu
24557 * The problem of spam::         Some background, and some solutions
24558 * Anti-Spam Basics::            Simple steps to reduce the amount of spam.
24559 * SpamAssassin::                How to use external anti-spam tools.
24560 * Hashcash::                    Reduce spam by burning CPU time.
24561 @end menu
24562
24563 @node The problem of spam
24564 @subsection The problem of spam
24565 @cindex email spam
24566 @cindex spam filtering approaches
24567 @cindex filtering approaches, spam
24568 @cindex UCE
24569 @cindex unsolicited commercial email
24570
24571 First, some background on spam.
24572
24573 If you have access to e-mail, you are familiar with spam (technically
24574 termed @acronym{UCE}, Unsolicited Commercial E-mail).  Simply put, it
24575 exists because e-mail delivery is very cheap compared to paper mail,
24576 so only a very small percentage of people need to respond to an UCE to
24577 make it worthwhile to the advertiser.  Ironically, one of the most
24578 common spams is the one offering a database of e-mail addresses for
24579 further spamming.  Senders of spam are usually called @emph{spammers},
24580 but terms like @emph{vermin}, @emph{scum}, @emph{sociopaths}, and
24581 @emph{morons} are in common use as well.
24582
24583 Spam comes from a wide variety of sources.  It is simply impossible to
24584 dispose of all spam without discarding useful messages.  A good
24585 example is the TMDA system, which requires senders
24586 unknown to you to confirm themselves as legitimate senders before
24587 their e-mail can reach you.  Without getting into the technical side
24588 of TMDA, a downside is clearly that e-mail from legitimate sources may
24589 be discarded if those sources can't or won't confirm themselves
24590 through the TMDA system.  Another problem with TMDA is that it
24591 requires its users to have a basic understanding of e-mail delivery
24592 and processing.
24593
24594 The simplest approach to filtering spam is filtering, at the mail
24595 server or when you sort through incoming mail.  If you get 200 spam
24596 messages per day from @samp{random-address@@vmadmin.com}, you block
24597 @samp{vmadmin.com}.  If you get 200 messages about @samp{VIAGRA}, you
24598 discard all messages with @samp{VIAGRA} in the message.  If you get
24599 lots of spam from Bulgaria, for example, you try to filter all mail
24600 from Bulgarian IPs.
24601
24602 This, unfortunately, is a great way to discard legitimate e-mail.  The
24603 risks of blocking a whole country (Bulgaria, Norway, Nigeria, China,
24604 etc.) or even a continent (Asia, Africa, Europe, etc.) from contacting
24605 you should be obvious, so don't do it if you have the choice.
24606
24607 In another instance, the very informative and useful RISKS digest has
24608 been blocked by overzealous mail filters because it @strong{contained}
24609 words that were common in spam messages.  Nevertheless, in isolated
24610 cases, with great care, direct filtering of mail can be useful.
24611
24612 Another approach to filtering e-mail is the distributed spam
24613 processing, for instance DCC implements such a system.  In essence,
24614 @var{N} systems around the world agree that a machine @var{X} in
24615 Ghana, Estonia, or California is sending out spam e-mail, and these
24616 @var{N} systems enter @var{X} or the spam e-mail from @var{X} into a
24617 database.  The criteria for spam detection vary---it may be the number
24618 of messages sent, the content of the messages, and so on.  When a user
24619 of the distributed processing system wants to find out if a message is
24620 spam, he consults one of those @var{N} systems.
24621
24622 Distributed spam processing works very well against spammers that send
24623 a large number of messages at once, but it requires the user to set up
24624 fairly complicated checks.  There are commercial and free distributed
24625 spam processing systems.  Distributed spam processing has its risks as
24626 well.  For instance legitimate e-mail senders have been accused of
24627 sending spam, and their web sites and mailing lists have been shut
24628 down for some time because of the incident.
24629
24630 The statistical approach to spam filtering is also popular.  It is
24631 based on a statistical analysis of previous spam messages.  Usually
24632 the analysis is a simple word frequency count, with perhaps pairs of
24633 words or 3-word combinations thrown into the mix.  Statistical
24634 analysis of spam works very well in most of the cases, but it can
24635 classify legitimate e-mail as spam in some cases.  It takes time to
24636 run the analysis, the full message must be analyzed, and the user has
24637 to store the database of spam analysis.  Statistical analysis on the
24638 server is gaining popularity.  This has the advantage of letting the
24639 user Just Read Mail, but has the disadvantage that it's harder to tell
24640 the server that it has misclassified mail.
24641
24642 Fighting spam is not easy, no matter what anyone says.  There is no
24643 magic switch that will distinguish Viagra ads from Mom's e-mails.
24644 Even people are having a hard time telling spam apart from non-spam,
24645 because spammers are actively looking to fool us into thinking they
24646 are Mom, essentially.  Spamming is irritating, irresponsible, and
24647 idiotic behavior from a bunch of people who think the world owes them
24648 a favor.  We hope the following sections will help you in fighting the
24649 spam plague.
24650
24651 @node Anti-Spam Basics
24652 @subsection Anti-Spam Basics
24653 @cindex email spam
24654 @cindex spam
24655 @cindex UCE
24656 @cindex unsolicited commercial email
24657
24658 One way of dealing with spam is having Gnus split out all spam into a
24659 @samp{spam} mail group (@pxref{Splitting Mail}).
24660
24661 First, pick one (1) valid mail address that you can be reached at, and
24662 put it in your @code{From} header of all your news articles.  (I've
24663 chosen @samp{larsi@@trym.ifi.uio.no}, but for many addresses on the form
24664 @samp{larsi+usenet@@ifi.uio.no} will be a better choice.  Ask your
24665 sysadmin whether your sendmail installation accepts keywords in the local
24666 part of the mail address.)
24667
24668 @lisp
24669 (setq message-default-news-headers
24670       "From: Lars Magne Ingebrigtsen <larsi@@trym.ifi.uio.no>\n")
24671 @end lisp
24672
24673 Then put the following split rule in @code{nnmail-split-fancy}
24674 (@pxref{Fancy Mail Splitting}):
24675
24676 @lisp
24677 (...
24678  (to "larsi@@trym.ifi.uio.no"
24679      (| ("subject" "re:.*" "misc")
24680         ("references" ".*@@.*" "misc")
24681         "spam"))
24682  ...)
24683 @end lisp
24684
24685 This says that all mail to this address is suspect, but if it has a
24686 @code{Subject} that starts with a @samp{Re:} or has a @code{References}
24687 header, it's probably ok.  All the rest goes to the @samp{spam} group.
24688 (This idea probably comes from Tim Pierce.)
24689
24690 In addition, many mail spammers talk directly to your @acronym{SMTP} server
24691 and do not include your email address explicitly in the @code{To}
24692 header.  Why they do this is unknown---perhaps it's to thwart this
24693 thwarting scheme?  In any case, this is trivial to deal with---you just
24694 put anything not addressed to you in the @samp{spam} group by ending
24695 your fancy split rule in this way:
24696
24697 @lisp
24698 (
24699  ...
24700  (to "larsi" "misc")
24701  "spam")
24702 @end lisp
24703
24704 In my experience, this will sort virtually everything into the right
24705 group.  You still have to check the @samp{spam} group from time to time to
24706 check for legitimate mail, though.  If you feel like being a good net
24707 citizen, you can even send off complaints to the proper authorities on
24708 each unsolicited commercial email---at your leisure.
24709
24710 This works for me.  It allows people an easy way to contact me (they can
24711 just press @kbd{r} in the usual way), and I'm not bothered at all with
24712 spam.  It's a win-win situation.  Forging @code{From} headers to point
24713 to non-existent domains is yucky, in my opinion.
24714
24715 Be careful with this approach.  Spammers are wise to it.
24716
24717
24718 @node SpamAssassin
24719 @subsection SpamAssassin, Vipul's Razor, DCC, etc
24720 @cindex SpamAssassin
24721 @cindex Vipul's Razor
24722 @cindex DCC
24723
24724 The days where the hints in the previous section were sufficient in
24725 avoiding spam are coming to an end.  There are many tools out there
24726 that claim to reduce the amount of spam you get.  This section could
24727 easily become outdated fast, as new products replace old, but
24728 fortunately most of these tools seem to have similar interfaces.  Even
24729 though this section will use SpamAssassin as an example, it should be
24730 easy to adapt it to most other tools.
24731
24732 Note that this section does not involve the @code{spam.el} package,
24733 which is discussed in the next section.  If you don't care for all
24734 the features of @code{spam.el}, you can make do with these simple
24735 recipes.
24736
24737 If the tool you are using is not installed on the mail server, you
24738 need to invoke it yourself.  Ideas on how to use the
24739 @code{:postscript} mail source parameter (@pxref{Mail Source
24740 Specifiers}) follow.
24741
24742 @lisp
24743 (setq mail-sources
24744       '((file :prescript "formail -bs spamassassin < /var/mail/%u")
24745         (pop :user "jrl"
24746              :server "pophost"
24747              :postscript
24748              "mv %t /tmp/foo; formail -bs spamc < /tmp/foo > %t")))
24749 @end lisp
24750
24751 Once you manage to process your incoming spool somehow, thus making
24752 the mail contain e.g.@: a header indicating it is spam, you are ready to
24753 filter it out.  Using normal split methods (@pxref{Splitting Mail}):
24754
24755 @lisp
24756 (setq nnmail-split-methods '(("spam"  "^X-Spam-Flag: YES")
24757                              ...))
24758 @end lisp
24759
24760 Or using fancy split methods (@pxref{Fancy Mail Splitting}):
24761
24762 @lisp
24763 (setq nnmail-split-methods 'nnmail-split-fancy
24764       nnmail-split-fancy '(| ("X-Spam-Flag" "YES" "spam")
24765                              ...))
24766 @end lisp
24767
24768 Some people might not like the idea of piping the mail through various
24769 programs using a @code{:prescript} (if some program is buggy, you
24770 might lose all mail).  If you are one of them, another solution is to
24771 call the external tools during splitting.  Example fancy split method:
24772
24773 @lisp
24774 (setq nnmail-split-fancy '(| (: kevin-spamassassin)
24775                              ...))
24776 (defun kevin-spamassassin ()
24777   (save-excursion
24778     (save-restriction
24779       (widen)
24780       (if (eq 1 (call-process-region (point-min) (point-max)
24781                                      "spamc" nil nil nil "-c"))
24782           "spam"))))
24783 @end lisp
24784
24785 Note that with the nnimap back end, message bodies will not be
24786 downloaded by default.  You need to set
24787 @code{nnimap-split-download-body} to @code{t} to do that
24788 (@pxref{Splitting in IMAP}).
24789
24790 That is about it.  As some spam is likely to get through anyway, you
24791 might want to have a nifty function to call when you happen to read
24792 spam.  And here is the nifty function:
24793
24794 @lisp
24795 (defun my-gnus-raze-spam ()
24796   "Submit SPAM to Vipul's Razor, then mark it as expirable."
24797   (interactive)
24798   (gnus-summary-save-in-pipe "razor-report -f -d" t)
24799   (gnus-summary-mark-as-expirable 1))
24800 @end lisp
24801
24802 @node Hashcash
24803 @subsection Hashcash
24804 @cindex hashcash
24805
24806 A novel technique to fight spam is to require senders to do something
24807 costly and demonstrably unique for each message they send.  This has
24808 the obvious drawback that you cannot rely on everyone in the world
24809 using this technique, since it is not part of the Internet standards,
24810 but it may be useful in smaller communities.
24811
24812 While the tools in the previous section work well in practice, they
24813 work only because the tools are constantly maintained and updated as
24814 new form of spam appears.  This means that a small percentage of spam
24815 will always get through.  It also means that somewhere, someone needs
24816 to read lots of spam to update these tools.  Hashcash avoids that, but
24817 instead prefers that everyone you contact through e-mail supports the
24818 scheme.  You can view the two approaches as pragmatic vs dogmatic.
24819 The approaches have their own advantages and disadvantages, but as
24820 often in the real world, a combination of them is stronger than either
24821 one of them separately.
24822
24823 @cindex X-Hashcash
24824 The ``something costly'' is to burn CPU time, more specifically to
24825 compute a hash collision up to a certain number of bits.  The
24826 resulting hashcash cookie is inserted in a @samp{X-Hashcash:} header.
24827 For more details, and for the external application @code{hashcash} you
24828 need to install to use this feature, see
24829 @uref{http://www.hashcash.org/}.  Even more information can be found
24830 at @uref{http://www.camram.org/}.
24831
24832 If you wish to generate hashcash for each message you send, you can
24833 customize @code{message-generate-hashcash} (@pxref{Mail Headers, ,Mail
24834 Headers,message, The Message Manual}), as in:
24835
24836 @lisp
24837 (setq message-generate-hashcash t)
24838 @end lisp
24839
24840 You will need to set up some additional variables as well:
24841
24842 @table @code
24843
24844 @item hashcash-default-payment
24845 @vindex hashcash-default-payment
24846 This variable indicates the default number of bits the hash collision
24847 should consist of.  By default this is 20.  Suggested useful values
24848 include 17 to 29.
24849
24850 @item hashcash-payment-alist
24851 @vindex hashcash-payment-alist
24852 Some receivers may require you to spend burn more CPU time than the
24853 default.  This variable contains a list of @samp{(@var{addr}
24854 @var{amount})} cells, where @var{addr} is the receiver (email address
24855 or newsgroup) and @var{amount} is the number of bits in the collision
24856 that is needed.  It can also contain @samp{(@var{addr} @var{string}
24857 @var{amount})} cells, where the @var{string} is the string to use
24858 (normally the email address or newsgroup name is used).
24859
24860 @item hashcash-path
24861 @vindex hashcash-path
24862 Where the @code{hashcash} binary is installed.  This variable should
24863 be automatically set by @code{executable-find}, but if it's @code{nil}
24864 (usually because the @code{hashcash} binary is not in your path)
24865 you'll get a warning when you check hashcash payments and an error
24866 when you generate hashcash payments.
24867
24868 @end table
24869
24870 Gnus can verify hashcash cookies, although this can also be done by
24871 hand customized mail filtering scripts.  To verify a hashcash cookie
24872 in a message, use the @code{mail-check-payment} function in the
24873 @code{hashcash.el} library.  You can also use the @code{spam.el}
24874 package with the @code{spam-use-hashcash} back end to validate hashcash
24875 cookies in incoming mail and filter mail accordingly (@pxref{Anti-spam
24876 Hashcash Payments}).
24877
24878 @node Spam Package
24879 @section Spam Package
24880 @cindex spam filtering
24881 @cindex spam
24882
24883 The Spam package provides Gnus with a centralized mechanism for
24884 detecting and filtering spam.  It filters new mail, and processes
24885 messages according to whether they are spam or ham.  (@dfn{Ham} is the
24886 name used throughout this manual to indicate non-spam messages.)
24887
24888 @menu
24889 * Spam Package Introduction::
24890 * Filtering Incoming Mail::
24891 * Detecting Spam in Groups::
24892 * Spam and Ham Processors::
24893 * Spam Package Configuration Examples::
24894 * Spam Back Ends::
24895 * Extending the Spam package::
24896 * Spam Statistics Package::
24897 @end menu
24898
24899 @node Spam Package Introduction
24900 @subsection Spam Package Introduction
24901 @cindex spam filtering
24902 @cindex spam filtering sequence of events
24903 @cindex spam
24904
24905 You must read this section to understand how the Spam package works.
24906 Do not skip, speed-read, or glance through this section.
24907
24908 Make sure you read the section on the @code{spam.el} sequence of
24909 events.  See @xref{Extending the Spam package}.
24910
24911 @cindex spam-initialize
24912 @vindex spam-use-stat
24913 To use the Spam package, you @strong{must} first run the function
24914 @code{spam-initialize}:
24915
24916 @example
24917 (spam-initialize)
24918 @end example
24919
24920 This autoloads @code{spam.el} and installs the various hooks necessary
24921 to let the Spam package do its job.  In order to make use of the Spam
24922 package, you have to set up certain group parameters and variables,
24923 which we will describe below.  All of the variables controlling the
24924 Spam package can be found in the @samp{spam} customization group.
24925
24926 There are two ``contact points'' between the Spam package and the rest
24927 of Gnus: checking new mail for spam, and leaving a group.
24928
24929 Checking new mail for spam is done in one of two ways: while splitting
24930 incoming mail, or when you enter a group.
24931
24932 The first way, checking for spam while splitting incoming mail, is
24933 suited to mail back ends such as @code{nnml} or @code{nnimap}, where
24934 new mail appears in a single spool file.  The Spam package processes
24935 incoming mail, and sends mail considered to be spam to a designated
24936 ``spam'' group.  @xref{Filtering Incoming Mail}.
24937
24938 The second way is suited to back ends such as @code{nntp}, which have
24939 no incoming mail spool, or back ends where the server is in charge of
24940 splitting incoming mail.  In this case, when you enter a Gnus group,
24941 the unseen or unread messages in that group are checked for spam.
24942 Detected spam messages are marked as spam.  @xref{Detecting Spam in
24943 Groups}.
24944
24945 @cindex spam back ends
24946 In either case, you have to tell the Spam package what method to use
24947 to detect spam messages.  There are several methods, or @dfn{spam back
24948 ends} (not to be confused with Gnus back ends!) to choose from: spam
24949 ``blacklists'' and ``whitelists'', dictionary-based filters, and so
24950 forth.  @xref{Spam Back Ends}.
24951
24952 In the Gnus summary buffer, messages that have been identified as spam
24953 always appear with a @samp{$} symbol.
24954
24955 The Spam package divides Gnus groups into three categories: ham
24956 groups, spam groups, and unclassified groups.  You should mark each of
24957 the groups you subscribe to as either a ham group or a spam group,
24958 using the @code{spam-contents} group parameter (@pxref{Group
24959 Parameters}).  Spam groups have a special property: when you enter a
24960 spam group, all unseen articles are marked as spam.  Thus, mail split
24961 into a spam group is automatically marked as spam.
24962
24963 Identifying spam messages is only half of the Spam package's job.  The
24964 second half comes into play whenever you exit a group buffer.  At this
24965 point, the Spam package does several things:
24966
24967 First, it calls @dfn{spam and ham processors} to process the articles
24968 according to whether they are spam or ham.  There is a pair of spam
24969 and ham processors associated with each spam back end, and what the
24970 processors do depends on the back end.  At present, the main role of
24971 spam and ham processors is for dictionary-based spam filters: they add
24972 the contents of the messages in the group to the filter's dictionary,
24973 to improve its ability to detect future spam.  The @code{spam-process}
24974 group parameter specifies what spam processors to use.  @xref{Spam and
24975 Ham Processors}.
24976
24977 If the spam filter failed to mark a spam message, you can mark it
24978 yourself, so that the message is processed as spam when you exit the
24979 group:
24980
24981 @table @kbd
24982 @item M-d
24983 @itemx M s x
24984 @itemx S x
24985 @kindex M-d
24986 @kindex S x
24987 @kindex M s x
24988 @findex gnus-summary-mark-as-spam
24989 @findex gnus-summary-mark-as-spam
24990 Mark current article as spam, showing it with the @samp{$} mark
24991 (@code{gnus-summary-mark-as-spam}).
24992 @end table
24993
24994 @noindent
24995 Similarly, you can unmark an article if it has been erroneously marked
24996 as spam.  @xref{Setting Marks}.
24997
24998 Normally, a ham message found in a non-ham group is not processed as
24999 ham---the rationale is that it should be moved into a ham group for
25000 further processing (see below).  However, you can force these articles
25001 to be processed as ham by setting
25002 @code{spam-process-ham-in-spam-groups} and
25003 @code{spam-process-ham-in-nonham-groups}.
25004
25005 @vindex gnus-ham-process-destinations
25006 @vindex gnus-spam-process-destinations
25007 The second thing that the Spam package does when you exit a group is
25008 to move ham articles out of spam groups, and spam articles out of ham
25009 groups.  Ham in a spam group is moved to the group specified by the
25010 variable @code{gnus-ham-process-destinations}, or the group parameter
25011 @code{ham-process-destination}.  Spam in a ham group is moved to the
25012 group specified by the variable @code{gnus-spam-process-destinations},
25013 or the group parameter @code{spam-process-destination}.  If these
25014 variables are not set, the articles are left in their current group.
25015 If an article cannot be moved (e.g., with a read-only backend such
25016 as @acronym{NNTP}), it is copied.
25017
25018 If an article is moved to another group, it is processed again when
25019 you visit the new group.  Normally, this is not a problem, but if you
25020 want each article to be processed only once, load the
25021 @code{gnus-registry.el} package and set the variable
25022 @code{spam-log-to-registry} to @code{t}.  @xref{Spam Package
25023 Configuration Examples}.
25024
25025 Normally, spam groups ignore @code{gnus-spam-process-destinations}.
25026 However, if you set @code{spam-move-spam-nonspam-groups-only} to
25027 @code{nil}, spam will also be moved out of spam groups, depending on
25028 the @code{spam-process-destination} parameter.
25029
25030 The final thing the Spam package does is to mark spam articles as
25031 expired, which is usually the right thing to do.
25032
25033 If all this seems confusing, don't worry.  Soon it will be as natural
25034 as typing Lisp one-liners on a neural interface@dots{} err, sorry, that's
25035 50 years in the future yet.  Just trust us, it's not so bad.
25036
25037 @node Filtering Incoming Mail
25038 @subsection Filtering Incoming Mail
25039 @cindex spam filtering
25040 @cindex spam filtering incoming mail
25041 @cindex spam
25042
25043 To use the Spam package to filter incoming mail, you must first set up
25044 fancy mail splitting.  @xref{Fancy Mail Splitting}.  The Spam package
25045 defines a special splitting function that you can add to your fancy
25046 split variable (either @code{nnmail-split-fancy} or
25047 @code{nnimap-split-fancy}, depending on your mail back end):
25048
25049 @example
25050 (: spam-split)
25051 @end example
25052
25053 @vindex spam-split-group
25054 @noindent
25055 The @code{spam-split} function scans incoming mail according to your
25056 chosen spam back end(s), and sends messages identified as spam to a
25057 spam group.  By default, the spam group is a group named @samp{spam},
25058 but you can change this by customizing @code{spam-split-group}.  Make
25059 sure the contents of @code{spam-split-group} are an unqualified group
25060 name.  For instance, in an @code{nnimap} server @samp{your-server},
25061 the value @samp{spam} means @samp{nnimap+your-server:spam}.  The value
25062 @samp{nnimap+server:spam} is therefore wrong---it gives the group
25063 @samp{nnimap+your-server:nnimap+server:spam}.
25064
25065 @code{spam-split} does not modify the contents of messages in any way.
25066
25067 @vindex nnimap-split-download-body
25068 Note for IMAP users: if you use the @code{spam-check-bogofilter},
25069 @code{spam-check-ifile}, and @code{spam-check-stat} spam back ends,
25070 you should also set the variable @code{nnimap-split-download-body}
25071 to @code{t}.  These spam back ends are most useful when they can
25072 ``scan'' the full message body.  By default, the nnimap back end only
25073 retrieves the message headers; @code{nnimap-split-download-body} tells
25074 it to retrieve the message bodies as well.  We don't set this by
25075 default because it will slow @acronym{IMAP} down, and that is not an
25076 appropriate decision to make on behalf of the user.  @xref{Splitting
25077 in IMAP}.
25078
25079 You have to specify one or more spam back ends for @code{spam-split}
25080 to use, by setting the @code{spam-use-*} variables.  @xref{Spam Back
25081 Ends}.  Normally, @code{spam-split} simply uses all the spam back ends
25082 you enabled in this way.  However, you can tell @code{spam-split} to
25083 use only some of them.  Why this is useful?  Suppose you are using the
25084 @code{spam-use-regex-headers} and @code{spam-use-blackholes} spam back
25085 ends, and the following split rule:
25086
25087 @example
25088  nnimap-split-fancy '(|
25089                       (any "ding" "ding")
25090                       (: spam-split)
25091                       ;; @r{default mailbox}
25092                       "mail")
25093 @end example
25094
25095 @noindent
25096 The problem is that you want all ding messages to make it to the ding
25097 folder.  But that will let obvious spam (for example, spam detected by
25098 SpamAssassin, and @code{spam-use-regex-headers}) through, when it's
25099 sent to the ding list.  On the other hand, some messages to the ding
25100 list are from a mail server in the blackhole list, so the invocation
25101 of @code{spam-split} can't be before the ding rule.
25102
25103 The solution is to let SpamAssassin headers supersede ding rules, and
25104 perform the other @code{spam-split} rules (including a second
25105 invocation of the regex-headers check) after the ding rule.  This is
25106 done by passing a parameter to @code{spam-split}:
25107
25108 @example
25109 nnimap-split-fancy
25110       '(|
25111         ;; @r{spam detected by @code{spam-use-regex-headers} goes to @samp{regex-spam}}
25112         (: spam-split "regex-spam" 'spam-use-regex-headers)
25113         (any "ding" "ding")
25114         ;; @r{all other spam detected by spam-split goes to @code{spam-split-group}}
25115         (: spam-split)
25116         ;; @r{default mailbox}
25117         "mail")
25118 @end example
25119
25120 @noindent
25121 This lets you invoke specific @code{spam-split} checks depending on
25122 your particular needs, and target the results of those checks to a
25123 particular spam group.  You don't have to throw all mail into all the
25124 spam tests.  Another reason why this is nice is that messages to
25125 mailing lists you have rules for don't have to have resource-intensive
25126 blackhole checks performed on them.  You could also specify different
25127 spam checks for your nnmail split vs. your nnimap split.  Go crazy.
25128
25129 You should set the @code{spam-use-*} variables for whatever spam back
25130 ends you intend to use.  The reason is that when loading
25131 @file{spam.el}, some conditional loading is done depending on what
25132 @code{spam-use-xyz} variables you have set.  @xref{Spam Back Ends}.
25133
25134 @c @emph{TODO: spam.el needs to provide a uniform way of training all the
25135 @c statistical databases.  Some have that functionality built-in, others
25136 @c don't.}
25137
25138 @node Detecting Spam in Groups
25139 @subsection Detecting Spam in Groups
25140
25141 To detect spam when visiting a group, set the group's
25142 @code{spam-autodetect} and @code{spam-autodetect-methods} group
25143 parameters.  These are accessible with @kbd{G c} or @kbd{G p}, as
25144 usual (@pxref{Group Parameters}).
25145
25146 You should set the @code{spam-use-*} variables for whatever spam back
25147 ends you intend to use.  The reason is that when loading
25148 @file{spam.el}, some conditional loading is done depending on what
25149 @code{spam-use-xyz} variables you have set.
25150
25151 By default, only unseen articles are processed for spam.  You can
25152 force Gnus to recheck all messages in the group by setting the
25153 variable @code{spam-autodetect-recheck-messages} to @code{t}.
25154
25155 If you use the @code{spam-autodetect} method of checking for spam, you
25156 can specify different spam detection methods for different groups.
25157 For instance, the @samp{ding} group may have @code{spam-use-BBDB} as
25158 the autodetection method, while the @samp{suspect} group may have the
25159 @code{spam-use-blacklist} and @code{spam-use-bogofilter} methods
25160 enabled.  Unlike with @code{spam-split}, you don't have any control
25161 over the @emph{sequence} of checks, but this is probably unimportant.
25162
25163 @node Spam and Ham Processors
25164 @subsection Spam and Ham Processors
25165 @cindex spam filtering
25166 @cindex spam filtering variables
25167 @cindex spam variables
25168 @cindex spam
25169
25170 @vindex gnus-spam-process-newsgroups
25171 Spam and ham processors specify special actions to take when you exit
25172 a group buffer.  Spam processors act on spam messages, and ham
25173 processors on ham messages.  At present, the main role of these
25174 processors is to update the dictionaries of dictionary-based spam back
25175 ends such as Bogofilter (@pxref{Bogofilter}) and the Spam Statistics
25176 package (@pxref{Spam Statistics Filtering}).
25177
25178 The spam and ham processors that apply to each group are determined by
25179 the group's@code{spam-process} group parameter.  If this group
25180 parameter is not defined, they are determined by the variable
25181 @code{gnus-spam-process-newsgroups}.
25182
25183 @vindex gnus-spam-newsgroup-contents
25184 Gnus learns from the spam you get.  You have to collect your spam in
25185 one or more spam groups, and set or customize the variable
25186 @code{spam-junk-mailgroups} as appropriate.  You can also declare
25187 groups to contain spam by setting their group parameter
25188 @code{spam-contents} to @code{gnus-group-spam-classification-spam}, or
25189 by customizing the corresponding variable
25190 @code{gnus-spam-newsgroup-contents}.  The @code{spam-contents} group
25191 parameter and the @code{gnus-spam-newsgroup-contents} variable can
25192 also be used to declare groups as @emph{ham} groups if you set their
25193 classification to @code{gnus-group-spam-classification-ham}.  If
25194 groups are not classified by means of @code{spam-junk-mailgroups},
25195 @code{spam-contents}, or @code{gnus-spam-newsgroup-contents}, they are
25196 considered @emph{unclassified}.  All groups are unclassified by
25197 default.
25198
25199 @vindex gnus-spam-mark
25200 @cindex $
25201 In spam groups, all messages are considered to be spam by default:
25202 they get the @samp{$} mark (@code{gnus-spam-mark}) when you enter the
25203 group.  If you have seen a message, had it marked as spam, then
25204 unmarked it, it won't be marked as spam when you enter the group
25205 thereafter.  You can disable that behavior, so all unread messages
25206 will get the @samp{$} mark, if you set the
25207 @code{spam-mark-only-unseen-as-spam} parameter to @code{nil}.  You
25208 should remove the @samp{$} mark when you are in the group summary
25209 buffer for every message that is not spam after all.  To remove the
25210 @samp{$} mark, you can use @kbd{M-u} to ``unread'' the article, or
25211 @kbd{d} for declaring it read the non-spam way.  When you leave a
25212 group, all spam-marked (@samp{$}) articles are sent to a spam
25213 processor which will study them as spam samples.
25214
25215 Messages may also be deleted in various other ways, and unless
25216 @code{ham-marks} group parameter gets overridden below, marks @samp{R}
25217 and @samp{r} for default read or explicit delete, marks @samp{X} and
25218 @samp{K} for automatic or explicit kills, as well as mark @samp{Y} for
25219 low scores, are all considered to be associated with articles which
25220 are not spam.  This assumption might be false, in particular if you
25221 use kill files or score files as means for detecting genuine spam, you
25222 should then adjust the @code{ham-marks} group parameter.
25223
25224 @defvar ham-marks
25225 You can customize this group or topic parameter to be the list of
25226 marks you want to consider ham.  By default, the list contains the
25227 deleted, read, killed, kill-filed, and low-score marks (the idea is
25228 that these articles have been read, but are not spam).  It can be
25229 useful to also include the tick mark in the ham marks.  It is not
25230 recommended to make the unread mark a ham mark, because it normally
25231 indicates a lack of classification.  But you can do it, and we'll be
25232 happy for you.
25233 @end defvar
25234
25235 @defvar spam-marks
25236 You can customize this group or topic parameter to be the list of
25237 marks you want to consider spam.  By default, the list contains only
25238 the spam mark.  It is not recommended to change that, but you can if
25239 you really want to.
25240 @end defvar
25241
25242 When you leave @emph{any} group, regardless of its
25243 @code{spam-contents} classification, all spam-marked articles are sent
25244 to a spam processor, which will study these as spam samples.  If you
25245 explicit kill a lot, you might sometimes end up with articles marked
25246 @samp{K} which you never saw, and which might accidentally contain
25247 spam.  Best is to make sure that real spam is marked with @samp{$},
25248 and nothing else.
25249
25250 @vindex gnus-ham-process-destinations
25251 When you leave a @emph{spam} group, all spam-marked articles are
25252 marked as expired after processing with the spam processor.  This is
25253 not done for @emph{unclassified} or @emph{ham} groups.  Also, any
25254 @strong{ham} articles in a spam group will be moved to a location
25255 determined by either the @code{ham-process-destination} group
25256 parameter or a match in the @code{gnus-ham-process-destinations}
25257 variable, which is a list of regular expressions matched with group
25258 names (it's easiest to customize this variable with @kbd{M-x
25259 customize-variable @key{RET} gnus-ham-process-destinations}).  Each
25260 group name list is a standard Lisp list, if you prefer to customize
25261 the variable manually.  If the @code{ham-process-destination}
25262 parameter is not set, ham articles are left in place.  If the
25263 @code{spam-mark-ham-unread-before-move-from-spam-group} parameter is
25264 set, the ham articles are marked as unread before being moved.
25265
25266 If ham can not be moved---because of a read-only back end such as
25267 @acronym{NNTP}, for example, it will be copied.
25268
25269 Note that you can use multiples destinations per group or regular
25270 expression!  This enables you to send your ham to a regular mail
25271 group and to a @emph{ham training} group.
25272
25273 When you leave a @emph{ham} group, all ham-marked articles are sent to
25274 a ham processor, which will study these as non-spam samples.
25275
25276 @vindex spam-process-ham-in-spam-groups
25277 By default the variable @code{spam-process-ham-in-spam-groups} is
25278 @code{nil}.  Set it to @code{t} if you want ham found in spam groups
25279 to be processed.  Normally this is not done, you are expected instead
25280 to send your ham to a ham group and process it there.
25281
25282 @vindex spam-process-ham-in-nonham-groups
25283 By default the variable @code{spam-process-ham-in-nonham-groups} is
25284 @code{nil}.  Set it to @code{t} if you want ham found in non-ham (spam
25285 or unclassified) groups to be processed.  Normally this is not done,
25286 you are expected instead to send your ham to a ham group and process
25287 it there.
25288
25289 @vindex gnus-spam-process-destinations
25290 When you leave a @emph{ham} or @emph{unclassified} group, all
25291 @strong{spam} articles are moved to a location determined by either
25292 the @code{spam-process-destination} group parameter or a match in the
25293 @code{gnus-spam-process-destinations} variable, which is a list of
25294 regular expressions matched with group names (it's easiest to
25295 customize this variable with @kbd{M-x customize-variable @key{RET}
25296 gnus-spam-process-destinations}).  Each group name list is a standard
25297 Lisp list, if you prefer to customize the variable manually.  If the
25298 @code{spam-process-destination} parameter is not set, the spam
25299 articles are only expired.  The group name is fully qualified, meaning
25300 that if you see @samp{nntp:servername} before the group name in the
25301 group buffer then you need it here as well.
25302
25303 If spam can not be moved---because of a read-only back end such as
25304 @acronym{NNTP}, for example, it will be copied.
25305
25306 Note that you can use multiples destinations per group or regular
25307 expression!  This enables you to send your spam to multiple @emph{spam
25308 training} groups.
25309
25310 @vindex spam-log-to-registry
25311 The problem with processing ham and spam is that Gnus doesn't track
25312 this processing by default.  Enable the @code{spam-log-to-registry}
25313 variable so @code{spam.el} will use @code{gnus-registry.el} to track
25314 what articles have been processed, and avoid processing articles
25315 multiple times.  Keep in mind that if you limit the number of registry
25316 entries, this won't work as well as it does without a limit.
25317
25318 @vindex spam-mark-only-unseen-as-spam
25319 Set this variable if you want only unseen articles in spam groups to
25320 be marked as spam.  By default, it is set.  If you set it to
25321 @code{nil}, unread articles will also be marked as spam.
25322
25323 @vindex spam-mark-ham-unread-before-move-from-spam-group
25324 Set this variable if you want ham to be unmarked before it is moved
25325 out of the spam group.  This is very useful when you use something
25326 like the tick mark @samp{!} to mark ham---the article will be placed
25327 in your @code{ham-process-destination}, unmarked as if it came fresh
25328 from the mail server.
25329
25330 @vindex spam-autodetect-recheck-messages
25331 When autodetecting spam, this variable tells @code{spam.el} whether
25332 only unseen articles or all unread articles should be checked for
25333 spam.  It is recommended that you leave it off.
25334
25335 @node Spam Package Configuration Examples
25336 @subsection Spam Package Configuration Examples
25337 @cindex spam filtering
25338 @cindex spam filtering configuration examples
25339 @cindex spam configuration examples
25340 @cindex spam
25341
25342 @subsubheading Ted's setup
25343
25344 From Ted Zlatanov <tzz@@lifelogs.com>.
25345 @example
25346 ;; @r{for @code{gnus-registry-split-fancy-with-parent} and spam autodetection}
25347 ;; @r{see @file{gnus-registry.el} for more information}
25348 (gnus-registry-initialize)
25349 (spam-initialize)
25350
25351 (setq
25352  spam-log-to-registry t     ; @r{for spam autodetection}
25353  spam-use-BBDB t
25354  spam-use-regex-headers t   ; @r{catch X-Spam-Flag (SpamAssassin)}
25355  ;; @r{all groups with @samp{spam} in the name contain spam}
25356  gnus-spam-newsgroup-contents
25357   '(("spam" gnus-group-spam-classification-spam))
25358  ;; @r{see documentation for these}
25359  spam-move-spam-nonspam-groups-only nil
25360  spam-mark-only-unseen-as-spam t
25361  spam-mark-ham-unread-before-move-from-spam-group t
25362  nnimap-split-rule 'nnimap-split-fancy
25363  ;; @r{understand what this does before you copy it to your own setup!}
25364  nnimap-split-fancy '(|
25365                       ;; @r{trace references to parents and put in their group}
25366                       (: gnus-registry-split-fancy-with-parent)
25367                       ;; @r{this will catch server-side SpamAssassin tags}
25368                       (: spam-split 'spam-use-regex-headers)
25369                       (any "ding" "ding")
25370                       ;; @r{note that spam by default will go to @samp{spam}}
25371                       (: spam-split)
25372                       ;; @r{default mailbox}
25373                       "mail"))
25374
25375 ;; @r{my parameters, set with @kbd{G p}}
25376
25377 ;; @r{all nnml groups, and all nnimap groups except}
25378 ;; @r{@samp{nnimap+mail.lifelogs.com:train} and}
25379 ;; @r{@samp{nnimap+mail.lifelogs.com:spam}: any spam goes to nnimap training,}
25380 ;; @r{because it must have been detected manually}
25381
25382 ((spam-process-destination . "nnimap+mail.lifelogs.com:train"))
25383
25384 ;; @r{all @acronym{NNTP} groups}
25385 ;; @r{autodetect spam with the blacklist and ham with the BBDB}
25386 ((spam-autodetect-methods spam-use-blacklist spam-use-BBDB)
25387 ;; @r{send all spam to the training group}
25388  (spam-process-destination . "nnimap+mail.lifelogs.com:train"))
25389
25390 ;; @r{only some @acronym{NNTP} groups, where I want to autodetect spam}
25391 ((spam-autodetect . t))
25392
25393 ;; @r{my nnimap @samp{nnimap+mail.lifelogs.com:spam} group}
25394
25395 ;; @r{this is a spam group}
25396 ((spam-contents gnus-group-spam-classification-spam)
25397
25398  ;; @r{any spam (which happens when I enter for all unseen messages,}
25399  ;; @r{because of the @code{gnus-spam-newsgroup-contents} setting above), goes to}
25400  ;; @r{@samp{nnimap+mail.lifelogs.com:train} unless I mark it as ham}
25401
25402  (spam-process-destination "nnimap+mail.lifelogs.com:train")
25403
25404  ;; @r{any ham goes to my @samp{nnimap+mail.lifelogs.com:mail} folder, but}
25405  ;; @r{also to my @samp{nnimap+mail.lifelogs.com:trainham} folder for training}
25406
25407  (ham-process-destination "nnimap+mail.lifelogs.com:mail"
25408                           "nnimap+mail.lifelogs.com:trainham")
25409  ;; @r{in this group, only @samp{!} marks are ham}
25410  (ham-marks
25411   (gnus-ticked-mark))
25412  ;; @r{remembers senders in the blacklist on the way out---this is}
25413  ;; @r{definitely not needed, it just makes me feel better}
25414  (spam-process (gnus-group-spam-exit-processor-blacklist)))
25415
25416 ;; @r{Later, on the @acronym{IMAP} server I use the @samp{train} group for training}
25417 ;; @r{SpamAssassin to recognize spam, and the @samp{trainham} group fora}
25418 ;; @r{recognizing ham---but Gnus has nothing to do with it.}
25419
25420 @end example
25421
25422 @subsubheading Using @code{spam.el} on an IMAP server with a statistical filter on the server
25423 From Reiner Steib <reiner.steib@@gmx.de>.
25424
25425 My provider has set up bogofilter (in combination with @acronym{DCC}) on
25426 the mail server (@acronym{IMAP}).  Recognized spam goes to
25427 @samp{spam.detected}, the rest goes through the normal filter rules,
25428 i.e. to @samp{some.folder} or to @samp{INBOX}.  Training on false
25429 positives or negatives is done by copying or moving the article to
25430 @samp{training.ham} or @samp{training.spam} respectively.  A cron job on
25431 the server feeds those to bogofilter with the suitable ham or spam
25432 options and deletes them from the @samp{training.ham} and
25433 @samp{training.spam} folders.
25434
25435 With the following entries in @code{gnus-parameters}, @code{spam.el}
25436 does most of the job for me:
25437
25438 @lisp
25439    ("nnimap:spam\\.detected"
25440     (gnus-article-sort-functions '(gnus-article-sort-by-chars))
25441     (ham-process-destination "nnimap:INBOX" "nnimap:training.ham")
25442     (spam-contents gnus-group-spam-classification-spam))
25443    ("nnimap:\\(INBOX\\|other-folders\\)"
25444     (spam-process-destination . "nnimap:training.spam")
25445     (spam-contents gnus-group-spam-classification-ham))
25446 @end lisp
25447
25448 @itemize
25449
25450 @item @b{The Spam folder:}
25451
25452 In the folder @samp{spam.detected}, I have to check for false positives
25453 (i.e. legitimate mails, that were wrongly judged as spam by
25454 bogofilter or DCC).
25455
25456 Because of the @code{gnus-group-spam-classification-spam} entry, all
25457 messages are marked as spam (with @code{$}).  When I find a false
25458 positive, I mark the message with some other ham mark
25459 (@code{ham-marks}, @ref{Spam and Ham Processors}).  On group exit,
25460 those messages are copied to both groups, @samp{INBOX} (where I want
25461 to have the article) and @samp{training.ham} (for training bogofilter)
25462 and deleted from the @samp{spam.detected} folder.
25463
25464 The @code{gnus-article-sort-by-chars} entry simplifies detection of
25465 false positives for me.  I receive lots of worms (sweN, @dots{}), that all
25466 have a similar size.  Grouping them by size (i.e. chars) makes finding
25467 other false positives easier.  (Of course worms aren't @i{spam}
25468 (@acronym{UCE}, @acronym{UBE}) strictly speaking.  Anyhow, bogofilter is
25469 an excellent tool for filtering those unwanted mails for me.)
25470
25471 @item @b{Ham folders:}
25472
25473 In my ham folders, I just hit @kbd{S x}
25474 (@code{gnus-summary-mark-as-spam}) whenever I see an unrecognized spam
25475 mail (false negative).  On group exit, those messages are moved to
25476 @samp{training.spam}.
25477 @end itemize
25478
25479 @subsubheading Reporting spam articles in Gmane groups with @code{spam-report.el}
25480
25481 From Reiner Steib <reiner.steib@@gmx.de>.
25482
25483 With following entry in @code{gnus-parameters}, @kbd{S x}
25484 (@code{gnus-summary-mark-as-spam}) marks articles in @code{gmane.*}
25485 groups as spam and reports the to Gmane at group exit:
25486
25487 @lisp
25488    ("^gmane\\."
25489     (spam-process (gnus-group-spam-exit-processor-report-gmane)))
25490 @end lisp
25491
25492 Additionally, I use @code{(setq spam-report-gmane-use-article-number nil)}
25493 because I don't read the groups directly from news.gmane.org, but
25494 through my local news server (leafnode).  I.e. the article numbers are
25495 not the same as on news.gmane.org, thus @code{spam-report.el} has to check
25496 the @code{X-Report-Spam} header to find the correct number.
25497
25498 @node Spam Back Ends
25499 @subsection Spam Back Ends
25500 @cindex spam back ends
25501
25502 The spam package offers a variety of back ends for detecting spam.
25503 Each back end defines a set of methods for detecting spam
25504 (@pxref{Filtering Incoming Mail}, @pxref{Detecting Spam in Groups}),
25505 and a pair of spam and ham processors (@pxref{Spam and Ham
25506 Processors}).
25507
25508 @menu
25509 * Blacklists and Whitelists::
25510 * BBDB Whitelists::
25511 * Gmane Spam Reporting::
25512 * Anti-spam Hashcash Payments::
25513 * Blackholes::
25514 * Regular Expressions Header Matching::
25515 * Bogofilter::
25516 * SpamAssassin back end::
25517 * ifile spam filtering::
25518 * Spam Statistics Filtering::
25519 * SpamOracle::
25520 @end menu
25521
25522 @node Blacklists and Whitelists
25523 @subsubsection Blacklists and Whitelists
25524 @cindex spam filtering
25525 @cindex whitelists, spam filtering
25526 @cindex blacklists, spam filtering
25527 @cindex spam
25528
25529 @defvar spam-use-blacklist
25530
25531 Set this variable to @code{t} if you want to use blacklists when
25532 splitting incoming mail.  Messages whose senders are in the blacklist
25533 will be sent to the @code{spam-split-group}.  This is an explicit
25534 filter, meaning that it acts only on mail senders @emph{declared} to
25535 be spammers.
25536
25537 @end defvar
25538
25539 @defvar spam-use-whitelist
25540
25541 Set this variable to @code{t} if you want to use whitelists when
25542 splitting incoming mail.  Messages whose senders are not in the
25543 whitelist will be sent to the next spam-split rule.  This is an
25544 explicit filter, meaning that unless someone is in the whitelist, their
25545 messages are not assumed to be spam or ham.
25546
25547 @end defvar
25548
25549 @defvar spam-use-whitelist-exclusive
25550
25551 Set this variable to @code{t} if you want to use whitelists as an
25552 implicit filter, meaning that every message will be considered spam
25553 unless the sender is in the whitelist.  Use with care.
25554
25555 @end defvar
25556
25557 @defvar gnus-group-spam-exit-processor-blacklist
25558
25559 Add this symbol to a group's @code{spam-process} parameter by
25560 customizing the group parameters or the
25561 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25562 added to a group's @code{spam-process} parameter, the senders of
25563 spam-marked articles will be added to the blacklist.
25564
25565 @emph{WARNING}
25566
25567 Instead of the obsolete
25568 @code{gnus-group-spam-exit-processor-blacklist}, it is recommended
25569 that you use @code{(spam spam-use-blacklist)}.  Everything will work
25570 the same way, we promise.
25571
25572 @end defvar
25573
25574 @defvar gnus-group-ham-exit-processor-whitelist
25575
25576 Add this symbol to a group's @code{spam-process} parameter by
25577 customizing the group parameters or the
25578 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25579 added to a group's @code{spam-process} parameter, the senders of
25580 ham-marked articles in @emph{ham} groups will be added to the
25581 whitelist.
25582
25583 @emph{WARNING}
25584
25585 Instead of the obsolete
25586 @code{gnus-group-ham-exit-processor-whitelist}, it is recommended
25587 that you use @code{(ham spam-use-whitelist)}.  Everything will work
25588 the same way, we promise.
25589
25590 @end defvar
25591
25592 Blacklists are lists of regular expressions matching addresses you
25593 consider to be spam senders.  For instance, to block mail from any
25594 sender at @samp{vmadmin.com}, you can put @samp{vmadmin.com} in your
25595 blacklist.  You start out with an empty blacklist.  Blacklist entries
25596 use the Emacs regular expression syntax.
25597
25598 Conversely, whitelists tell Gnus what addresses are considered
25599 legitimate.  All messages from whitelisted addresses are considered
25600 non-spam.  Also see @ref{BBDB Whitelists}.  Whitelist entries use the
25601 Emacs regular expression syntax.
25602
25603 The blacklist and whitelist file locations can be customized with the
25604 @code{spam-directory} variable (@file{~/News/spam} by default), or
25605 the @code{spam-whitelist} and @code{spam-blacklist} variables
25606 directly.  The whitelist and blacklist files will by default be in the
25607 @code{spam-directory} directory, named @file{whitelist} and
25608 @file{blacklist} respectively.
25609
25610 @node BBDB Whitelists
25611 @subsubsection BBDB Whitelists
25612 @cindex spam filtering
25613 @cindex BBDB whitelists, spam filtering
25614 @cindex BBDB, spam filtering
25615 @cindex spam
25616
25617 @defvar spam-use-BBDB
25618
25619 Analogous to @code{spam-use-whitelist} (@pxref{Blacklists and
25620 Whitelists}), but uses the BBDB as the source of whitelisted
25621 addresses, without regular expressions.  You must have the BBDB loaded
25622 for @code{spam-use-BBDB} to work properly.  Messages whose senders are
25623 not in the BBDB will be sent to the next spam-split rule.  This is an
25624 explicit filter, meaning that unless someone is in the BBDB, their
25625 messages are not assumed to be spam or ham.
25626
25627 @end defvar
25628
25629 @defvar spam-use-BBDB-exclusive
25630
25631 Set this variable to @code{t} if you want to use the BBDB as an
25632 implicit filter, meaning that every message will be considered spam
25633 unless the sender is in the BBDB.  Use with care.  Only sender
25634 addresses in the BBDB will be allowed through; all others will be
25635 classified as spammers.
25636
25637 While @code{spam-use-BBDB-exclusive} @emph{can} be used as an alias
25638 for @code{spam-use-BBDB} as far as @code{spam.el} is concerned, it is
25639 @emph{not} a separate back end.  If you set
25640 @code{spam-use-BBDB-exclusive} to t, @emph{all} your BBDB splitting
25641 will be exclusive.
25642
25643 @end defvar
25644
25645 @defvar gnus-group-ham-exit-processor-BBDB
25646
25647 Add this symbol to a group's @code{spam-process} parameter by
25648 customizing the group parameters or the
25649 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25650 added to a group's @code{spam-process} parameter, the senders of
25651 ham-marked articles in @emph{ham} groups will be added to the
25652 BBDB.
25653
25654 @emph{WARNING}
25655
25656 Instead of the obsolete
25657 @code{gnus-group-ham-exit-processor-BBDB}, it is recommended
25658 that you use @code{(ham spam-use-BBDB)}.  Everything will work
25659 the same way, we promise.
25660
25661 @end defvar
25662
25663 @node Gmane Spam Reporting
25664 @subsubsection Gmane Spam Reporting
25665 @cindex spam reporting
25666 @cindex Gmane, spam reporting
25667 @cindex Gmane, spam reporting
25668 @cindex spam
25669
25670 @defvar gnus-group-spam-exit-processor-report-gmane
25671
25672 Add this symbol to a group's @code{spam-process} parameter by
25673 customizing the group parameters or the
25674 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25675 added to a group's @code{spam-process} parameter, the spam-marked
25676 articles groups will be reported to the Gmane administrators via a
25677 HTTP request.
25678
25679 Gmane can be found at @uref{http://gmane.org}.
25680
25681 @emph{WARNING}
25682
25683 Instead of the obsolete
25684 @code{gnus-group-spam-exit-processor-report-gmane}, it is recommended
25685 that you use @code{(spam spam-use-gmane)}.  Everything will work the
25686 same way, we promise.
25687
25688 @end defvar
25689
25690 @defvar spam-report-gmane-use-article-number
25691
25692 This variable is @code{t} by default.  Set it to @code{nil} if you are
25693 running your own news server, for instance, and the local article
25694 numbers don't correspond to the Gmane article numbers.  When
25695 @code{spam-report-gmane-use-article-number} is @code{nil},
25696 @code{spam-report.el} will fetch the number from the article headers.
25697
25698 @end defvar
25699
25700 @defvar spam-report-user-mail-address
25701
25702 Mail address exposed in the User-Agent spam reports to Gmane.  It allows
25703 the Gmane administrators to contact you in case of misreports.  The
25704 default is @code{user-mail-address}.
25705
25706 @end defvar
25707
25708 @node Anti-spam Hashcash Payments
25709 @subsubsection Anti-spam Hashcash Payments
25710 @cindex spam filtering
25711 @cindex hashcash, spam filtering
25712 @cindex spam
25713
25714 @defvar spam-use-hashcash
25715
25716 Similar to @code{spam-use-whitelist} (@pxref{Blacklists and
25717 Whitelists}), but uses hashcash tokens for whitelisting messages
25718 instead of the sender address.  Messages without a hashcash payment
25719 token will be sent to the next spam-split rule.  This is an explicit
25720 filter, meaning that unless a hashcash token is found, the messages
25721 are not assumed to be spam or ham.
25722
25723 @end defvar
25724
25725 @node Blackholes
25726 @subsubsection Blackholes
25727 @cindex spam filtering
25728 @cindex blackholes, spam filtering
25729 @cindex spam
25730
25731 @defvar spam-use-blackholes
25732
25733 This option is disabled by default.  You can let Gnus consult the
25734 blackhole-type distributed spam processing systems (DCC, for instance)
25735 when you set this option.  The variable @code{spam-blackhole-servers}
25736 holds the list of blackhole servers Gnus will consult.  The current
25737 list is fairly comprehensive, but make sure to let us know if it
25738 contains outdated servers.
25739
25740 The blackhole check uses the @code{dig.el} package, but you can tell
25741 @code{spam.el} to use @code{dns.el} instead for better performance if
25742 you set @code{spam-use-dig} to @code{nil}.  It is not recommended at
25743 this time to set @code{spam-use-dig} to @code{nil} despite the
25744 possible performance improvements, because some users may be unable to
25745 use it, but you can try it and see if it works for you.
25746
25747 @end defvar
25748
25749 @defvar spam-blackhole-servers
25750
25751 The list of servers to consult for blackhole checks.
25752
25753 @end defvar
25754
25755 @defvar spam-blackhole-good-server-regex
25756
25757 A regular expression for IPs that should not be checked against the
25758 blackhole server list.  When set to @code{nil}, it has no effect.
25759
25760 @end defvar
25761
25762 @defvar spam-use-dig
25763
25764 Use the @code{dig.el} package instead of the @code{dns.el} package.
25765 The default setting of @code{t} is recommended.
25766
25767 @end defvar
25768
25769 Blackhole checks are done only on incoming mail.  There is no spam or
25770 ham processor for blackholes.
25771
25772 @node Regular Expressions Header Matching
25773 @subsubsection Regular Expressions Header Matching
25774 @cindex spam filtering
25775 @cindex regular expressions header matching, spam filtering
25776 @cindex spam
25777
25778 @defvar spam-use-regex-headers
25779
25780 This option is disabled by default.  You can let Gnus check the
25781 message headers against lists of regular expressions when you set this
25782 option.  The variables @code{spam-regex-headers-spam} and
25783 @code{spam-regex-headers-ham} hold the list of regular expressions.
25784 Gnus will check against the message headers to determine if the
25785 message is spam or ham, respectively.
25786
25787 @end defvar
25788
25789 @defvar spam-regex-headers-spam
25790
25791 The list of regular expressions that, when matched in the headers of
25792 the message, positively identify it as spam.
25793
25794 @end defvar
25795
25796 @defvar spam-regex-headers-ham
25797
25798 The list of regular expressions that, when matched in the headers of
25799 the message, positively identify it as ham.
25800
25801 @end defvar
25802
25803 Regular expression header checks are done only on incoming mail.
25804 There is no specific spam or ham processor for regular expressions.
25805
25806 @node Bogofilter
25807 @subsubsection Bogofilter
25808 @cindex spam filtering
25809 @cindex bogofilter, spam filtering
25810 @cindex spam
25811
25812 @defvar spam-use-bogofilter
25813
25814 Set this variable if you want @code{spam-split} to use Eric Raymond's
25815 speedy Bogofilter.
25816
25817 With a minimum of care for associating the @samp{$} mark for spam
25818 articles only, Bogofilter training all gets fairly automatic.  You
25819 should do this until you get a few hundreds of articles in each
25820 category, spam or not.  The command @kbd{S t} in summary mode, either
25821 for debugging or for curiosity, shows the @emph{spamicity} score of
25822 the current article (between 0.0 and 1.0).
25823
25824 Bogofilter determines if a message is spam based on a specific
25825 threshold.  That threshold can be customized, consult the Bogofilter
25826 documentation.
25827
25828 If the @code{bogofilter} executable is not in your path, Bogofilter
25829 processing will be turned off.
25830
25831 You should not enable this if you use @code{spam-use-bogofilter-headers}.
25832
25833 @end defvar
25834
25835 @table @kbd
25836 @item M s t
25837 @itemx S t
25838 @kindex M s t
25839 @kindex S t
25840 @findex spam-bogofilter-score
25841 Get the Bogofilter spamicity score (@code{spam-bogofilter-score}).
25842 @end table
25843
25844 @defvar spam-use-bogofilter-headers
25845
25846 Set this variable if you want @code{spam-split} to use Eric Raymond's
25847 speedy Bogofilter, looking only at the message headers.  It works
25848 similarly to @code{spam-use-bogofilter}, but the @code{X-Bogosity} header
25849 must be in the message already.  Normally you would do this with a
25850 procmail recipe or something similar; consult the Bogofilter
25851 installation documents for details.
25852
25853 You should not enable this if you use @code{spam-use-bogofilter}.
25854
25855 @end defvar
25856
25857 @defvar gnus-group-spam-exit-processor-bogofilter
25858 Add this symbol to a group's @code{spam-process} parameter by
25859 customizing the group parameters or the
25860 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25861 added to a group's @code{spam-process} parameter, spam-marked articles
25862 will be added to the Bogofilter spam database.
25863
25864 @emph{WARNING}
25865
25866 Instead of the obsolete
25867 @code{gnus-group-spam-exit-processor-bogofilter}, it is recommended
25868 that you use @code{(spam spam-use-bogofilter)}.  Everything will work
25869 the same way, we promise.
25870 @end defvar
25871
25872 @defvar gnus-group-ham-exit-processor-bogofilter
25873 Add this symbol to a group's @code{spam-process} parameter by
25874 customizing the group parameters or the
25875 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
25876 added to a group's @code{spam-process} parameter, the ham-marked
25877 articles in @emph{ham} groups will be added to the Bogofilter database
25878 of non-spam messages.
25879
25880 @emph{WARNING}
25881
25882 Instead of the obsolete
25883 @code{gnus-group-ham-exit-processor-bogofilter}, it is recommended
25884 that you use @code{(ham spam-use-bogofilter)}.  Everything will work
25885 the same way, we promise.
25886 @end defvar
25887
25888 @defvar spam-bogofilter-database-directory
25889
25890 This is the directory where Bogofilter will store its databases.  It
25891 is not specified by default, so Bogofilter will use its own default
25892 database directory.
25893
25894 @end defvar
25895
25896 The Bogofilter mail classifier is similar to @command{ifile} in intent and
25897 purpose.  A ham and a spam processor are provided, plus the
25898 @code{spam-use-bogofilter} and @code{spam-use-bogofilter-headers}
25899 variables to indicate to spam-split that Bogofilter should either be
25900 used, or has already been used on the article.  The 0.9.2.1 version of
25901 Bogofilter was used to test this functionality.
25902
25903 @node SpamAssassin back end
25904 @subsubsection SpamAssassin back end
25905 @cindex spam filtering
25906 @cindex spamassassin, spam filtering
25907 @cindex spam
25908
25909 @defvar spam-use-spamassassin
25910
25911 Set this variable if you want @code{spam-split} to use SpamAssassin.
25912
25913 SpamAssassin assigns a score to each article based on a set of rules
25914 and tests, including a Bayesian filter.  The Bayesian filter can be
25915 trained by associating the @samp{$} mark for spam articles.  The
25916 spam score can be viewed by using the command @kbd{S t} in summary
25917 mode.
25918
25919 If you set this variable, each article will be processed by
25920 SpamAssassin when @code{spam-split} is called.  If your mail is
25921 preprocessed by SpamAssassin, and you want to just use the
25922 SpamAssassin headers, set @code{spam-use-spamassassin-headers}
25923 instead.
25924
25925 You should not enable this if you use
25926 @code{spam-use-spamassassin-headers}.
25927
25928 @end defvar
25929
25930 @defvar spam-use-spamassassin-headers
25931
25932 Set this variable if your mail is preprocessed by SpamAssassin and
25933 want @code{spam-split} to split based on the SpamAssassin headers.
25934
25935 You should not enable this if you use @code{spam-use-spamassassin}.
25936
25937 @end defvar
25938
25939 @defvar spam-spamassassin-program
25940
25941 This variable points to the SpamAssassin executable.  If you have
25942 @code{spamd} running, you can set this variable to the @code{spamc}
25943 executable for faster processing.  See the SpamAssassin documentation
25944 for more information on @code{spamd}/@code{spamc}.
25945
25946 @end defvar
25947
25948 SpamAssassin is a powerful and flexible spam filter that uses a wide
25949 variety of tests to identify spam.  A ham and a spam processors are
25950 provided, plus the @code{spam-use-spamassassin} and
25951 @code{spam-use-spamassassin-headers} variables to indicate to
25952 spam-split that SpamAssassin should be either used, or has already
25953 been used on the article.  The 2.63 version of SpamAssassin was used
25954 to test this functionality.
25955
25956 @node ifile spam filtering
25957 @subsubsection ifile spam filtering
25958 @cindex spam filtering
25959 @cindex ifile, spam filtering
25960 @cindex spam
25961
25962 @defvar spam-use-ifile
25963
25964 Enable this variable if you want @code{spam-split} to use @command{ifile}, a
25965 statistical analyzer similar to Bogofilter.
25966
25967 @end defvar
25968
25969 @defvar spam-ifile-all-categories
25970
25971 Enable this variable if you want @code{spam-use-ifile} to give you all
25972 the ifile categories, not just spam/non-spam.  If you use this, make
25973 sure you train ifile as described in its documentation.
25974
25975 @end defvar
25976
25977 @defvar spam-ifile-spam-category
25978
25979 This is the category of spam messages as far as ifile is concerned.
25980 The actual string used is irrelevant, but you probably want to leave
25981 the default value of @samp{spam}.
25982 @end defvar
25983
25984 @defvar spam-ifile-database
25985
25986 This is the filename for the ifile database.  It is not specified by
25987 default, so ifile will use its own default database name.
25988
25989 @end defvar
25990
25991 The ifile mail classifier is similar to Bogofilter in intent and
25992 purpose.  A ham and a spam processor are provided, plus the
25993 @code{spam-use-ifile} variable to indicate to spam-split that ifile
25994 should be used.  The 1.2.1 version of ifile was used to test this
25995 functionality.
25996
25997 @node Spam Statistics Filtering
25998 @subsubsection Spam Statistics Filtering
25999 @cindex spam filtering
26000 @cindex spam-stat, spam filtering
26001 @cindex spam-stat
26002 @cindex spam
26003
26004 This back end uses the Spam Statistics Emacs Lisp package to perform
26005 statistics-based filtering (@pxref{Spam Statistics Package}).  Before
26006 using this, you may want to perform some additional steps to
26007 initialize your Spam Statistics dictionary.  @xref{Creating a
26008 spam-stat dictionary}.
26009
26010 @defvar spam-use-stat
26011
26012 @end defvar
26013
26014 @defvar gnus-group-spam-exit-processor-stat
26015 Add this symbol to a group's @code{spam-process} parameter by
26016 customizing the group parameters or the
26017 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
26018 added to a group's @code{spam-process} parameter, the spam-marked
26019 articles will be added to the spam-stat database of spam messages.
26020
26021 @emph{WARNING}
26022
26023 Instead of the obsolete
26024 @code{gnus-group-spam-exit-processor-stat}, it is recommended
26025 that you use @code{(spam spam-use-stat)}.  Everything will work
26026 the same way, we promise.
26027 @end defvar
26028
26029 @defvar gnus-group-ham-exit-processor-stat
26030 Add this symbol to a group's @code{spam-process} parameter by
26031 customizing the group parameters or the
26032 @code{gnus-spam-process-newsgroups} variable.  When this symbol is
26033 added to a group's @code{spam-process} parameter, the ham-marked
26034 articles in @emph{ham} groups will be added to the spam-stat database
26035 of non-spam messages.
26036
26037 @emph{WARNING}
26038
26039 Instead of the obsolete
26040 @code{gnus-group-ham-exit-processor-stat}, it is recommended
26041 that you use @code{(ham spam-use-stat)}.  Everything will work
26042 the same way, we promise.
26043 @end defvar
26044
26045 This enables @code{spam.el} to cooperate with @file{spam-stat.el}.
26046 @file{spam-stat.el} provides an internal (Lisp-only) spam database,
26047 which unlike ifile or Bogofilter does not require external programs.
26048 A spam and a ham processor, and the @code{spam-use-stat} variable for
26049 @code{spam-split} are provided.
26050
26051 @node SpamOracle
26052 @subsubsection Using SpamOracle with Gnus
26053 @cindex spam filtering
26054 @cindex SpamOracle
26055 @cindex spam
26056
26057 An easy way to filter out spam is to use SpamOracle.  SpamOracle is an
26058 statistical mail filtering tool written by Xavier Leroy and needs to be
26059 installed separately.
26060
26061 There are several ways to use SpamOracle with Gnus.  In all cases, your
26062 mail is piped through SpamOracle in its @emph{mark} mode.  SpamOracle will
26063 then enter an @samp{X-Spam} header indicating whether it regards the
26064 mail as a spam mail or not.
26065
26066 One possibility is to run SpamOracle as a @code{:prescript} from the
26067 @xref{Mail Source Specifiers}, (@pxref{SpamAssassin}).  This method has
26068 the advantage that the user can see the @emph{X-Spam} headers.
26069
26070 The easiest method is to make @file{spam.el} (@pxref{Spam Package})
26071 call SpamOracle.
26072
26073 @vindex spam-use-spamoracle
26074 To enable SpamOracle usage by @code{spam.el}, set the variable
26075 @code{spam-use-spamoracle} to @code{t} and configure the
26076 @code{nnmail-split-fancy} or @code{nnimap-split-fancy}.  @xref{Spam
26077 Package}.  In this example the @samp{INBOX} of an nnimap server is
26078 filtered using SpamOracle.  Mails recognized as spam mails will be
26079 moved to @code{spam-split-group}, @samp{Junk} in this case.  Ham
26080 messages stay in @samp{INBOX}:
26081
26082 @example
26083 (setq spam-use-spamoracle t
26084       spam-split-group "Junk"
26085       nnimap-split-inbox '("INBOX")
26086       nnimap-split-rule 'nnimap-split-fancy
26087       nnimap-split-fancy '(| (: spam-split) "INBOX"))
26088 @end example
26089
26090 @defvar spam-use-spamoracle
26091 Set to @code{t} if you want Gnus to enable spam filtering using
26092 SpamOracle.
26093 @end defvar
26094
26095 @defvar spam-spamoracle-binary
26096 Gnus uses the SpamOracle binary called @file{spamoracle} found in the
26097 user's PATH.  Using the variable @code{spam-spamoracle-binary}, this
26098 can be customized.
26099 @end defvar
26100
26101 @defvar spam-spamoracle-database
26102 By default, SpamOracle uses the file @file{~/.spamoracle.db} as a database to
26103 store its analysis.  This is controlled by the variable
26104 @code{spam-spamoracle-database} which defaults to @code{nil}.  That means
26105 the default SpamOracle database will be used.  In case you want your
26106 database to live somewhere special, set
26107 @code{spam-spamoracle-database} to this path.
26108 @end defvar
26109
26110 SpamOracle employs a statistical algorithm to determine whether a
26111 message is spam or ham.  In order to get good results, meaning few
26112 false hits or misses, SpamOracle needs training.  SpamOracle learns
26113 the characteristics of your spam mails.  Using the @emph{add} mode
26114 (training mode) one has to feed good (ham) and spam mails to
26115 SpamOracle.  This can be done by pressing @kbd{|} in the Summary
26116 buffer and pipe the mail to a SpamOracle process or using
26117 @file{spam.el}'s spam- and ham-processors, which is much more
26118 convenient.  For a detailed description of spam- and ham-processors,
26119 @xref{Spam Package}.
26120
26121 @defvar gnus-group-spam-exit-processor-spamoracle
26122 Add this symbol to a group's @code{spam-process} parameter by
26123 customizing the group parameter or the
26124 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
26125 to a group's @code{spam-process} parameter, spam-marked articles will be
26126 sent to SpamOracle as spam samples.
26127
26128 @emph{WARNING}
26129
26130 Instead of the obsolete
26131 @code{gnus-group-spam-exit-processor-spamoracle}, it is recommended
26132 that you use @code{(spam spam-use-spamoracle)}.  Everything will work
26133 the same way, we promise.
26134 @end defvar
26135
26136 @defvar gnus-group-ham-exit-processor-spamoracle
26137 Add this symbol to a group's @code{spam-process} parameter by
26138 customizing the group parameter or the
26139 @code{gnus-spam-process-newsgroups} variable.  When this symbol is added
26140 to a group's @code{spam-process} parameter, the ham-marked articles in
26141 @emph{ham} groups will be sent to the SpamOracle as samples of ham
26142 messages.
26143
26144 @emph{WARNING}
26145
26146 Instead of the obsolete
26147 @code{gnus-group-ham-exit-processor-spamoracle}, it is recommended
26148 that you use @code{(ham spam-use-spamoracle)}.  Everything will work
26149 the same way, we promise.
26150 @end defvar
26151
26152 @emph{Example:} These are the Group Parameters of a group that has been
26153 classified as a ham group, meaning that it should only contain ham
26154 messages.
26155 @example
26156  ((spam-contents gnus-group-spam-classification-ham)
26157   (spam-process ((ham spam-use-spamoracle)
26158                  (spam spam-use-spamoracle))))
26159 @end example
26160 For this group the @code{spam-use-spamoracle} is installed for both
26161 ham and spam processing.  If the group contains spam message
26162 (e.g. because SpamOracle has not had enough sample messages yet) and
26163 the user marks some messages as spam messages, these messages will be
26164 processed by SpamOracle.  The processor sends the messages to
26165 SpamOracle as new samples for spam.
26166
26167 @node Extending the Spam package
26168 @subsection Extending the Spam package
26169 @cindex spam filtering
26170 @cindex spam elisp package, extending
26171 @cindex extending the spam elisp package
26172
26173 Say you want to add a new back end called blackbox.  For filtering
26174 incoming mail, provide the following:
26175
26176 @enumerate
26177
26178 @item
26179 Code
26180
26181 @lisp
26182 (defvar spam-use-blackbox nil
26183   "True if blackbox should be used.")
26184 @end lisp
26185
26186 Write @code{spam-check-blackbox} if Blackbox can check incoming mail.
26187
26188 Write @code{spam-blackbox-register-routine} and
26189 @code{spam-blackbox-unregister-routine} using the bogofilter
26190 register/unregister routines as a start, or other restister/unregister
26191 routines more appropriate to Blackbox, if Blackbox can
26192 register/unregister spam and ham.
26193
26194 @item
26195 Functionality
26196
26197 The @code{spam-check-blackbox} function should return @samp{nil} or
26198 @code{spam-split-group}, observing the other conventions.  See the
26199 existing @code{spam-check-*} functions for examples of what you can
26200 do, and stick to the template unless you fully understand the reasons
26201 why you aren't.
26202
26203 @end enumerate
26204
26205 For processing spam and ham messages, provide the following:
26206
26207 @enumerate
26208
26209 @item
26210 Code
26211
26212 Note you don't have to provide a spam or a ham processor.  Only
26213 provide them if Blackbox supports spam or ham processing.
26214
26215 Also, ham and spam processors are being phased out as single
26216 variables.  Instead the form @code{(spam spam-use-blackbox)} or
26217 @code{(ham spam-use-blackbox)} is favored.  For now, spam/ham
26218 processor variables are still around but they won't be for long.
26219
26220 @lisp
26221 (defvar gnus-group-spam-exit-processor-blackbox "blackbox-spam"
26222   "The Blackbox summary exit spam processor.
26223 Only applicable to spam groups.")
26224
26225 (defvar gnus-group-ham-exit-processor-blackbox "blackbox-ham"
26226   "The whitelist summary exit ham processor.
26227 Only applicable to non-spam (unclassified and ham) groups.")
26228
26229 @end lisp
26230
26231 @item
26232 Gnus parameters
26233
26234 Add
26235 @lisp
26236 (const :tag "Spam: Blackbox" (spam spam-use-blackbox))
26237 (const :tag "Ham: Blackbox"  (ham spam-use-blackbox))
26238 @end lisp
26239 to the @code{spam-process} group parameter in @code{gnus.el}.  Make
26240 sure you do it twice, once for the parameter and once for the
26241 variable customization.
26242
26243 Add
26244 @lisp
26245 (variable-item spam-use-blackbox)
26246 @end lisp
26247 to the @code{spam-autodetect-methods} group parameter in
26248 @code{gnus.el} if Blackbox can check incoming mail for spam contents.
26249
26250 Finally, use the appropriate @code{spam-install-*-backend} function in
26251 @code{spam.el}.  Here are the available functions.
26252
26253
26254 @enumerate
26255
26256 @item
26257 @code{spam-install-backend-alias}
26258
26259 This function will simply install an alias for a back end that does
26260 everything like the original back end.  It is currently only used to
26261 make @code{spam-use-BBDB-exclusive} act like @code{spam-use-BBDB}.
26262
26263 @item
26264 @code{spam-install-nocheck-backend}
26265
26266 This function installs a back end that has no check function, but can
26267 register/unregister ham or spam.  The @code{spam-use-gmane} back end is
26268 such a back end.
26269
26270 @item
26271 @code{spam-install-checkonly-backend}
26272
26273 This function will install a back end that can only check incoming mail
26274 for spam contents.  It can't register or unregister messages.
26275 @code{spam-use-blackholes} and @code{spam-use-hashcash} are such
26276 back ends.
26277
26278 @item
26279 @code{spam-install-statistical-checkonly-backend}
26280
26281 This function installs a statistical back end (one which requires the
26282 full body of a message to check it) that can only check incoming mail
26283 for contents.  @code{spam-use-regex-body} is such a filter.
26284
26285 @item
26286 @code{spam-install-statistical-backend}
26287
26288 This function install a statistical back end with incoming checks and
26289 registration/unregistration routines.  @code{spam-use-bogofilter} is
26290 set up this way.
26291
26292 @item
26293 @code{spam-install-backend}
26294
26295 This is the most normal back end installation, where a back end that can
26296 check and register/unregister messages is set up without statistical
26297 abilities.  The @code{spam-use-BBDB} is such a back end.
26298
26299 @item
26300 @code{spam-install-mover-backend}
26301
26302 Mover back ends are internal to @code{spam.el} and specifically move
26303 articles around when the summary is exited.  You will very probably
26304 never install such a back end.
26305 @end enumerate
26306
26307 @end enumerate
26308
26309 @node Spam Statistics Package
26310 @subsection Spam Statistics Package
26311 @cindex Paul Graham
26312 @cindex Graham, Paul
26313 @cindex naive Bayesian spam filtering
26314 @cindex Bayesian spam filtering, naive
26315 @cindex spam filtering, naive Bayesian
26316
26317 Paul Graham has written an excellent essay about spam filtering using
26318 statistics: @uref{http://www.paulgraham.com/spam.html,A Plan for
26319 Spam}.  In it he describes the inherent deficiency of rule-based
26320 filtering as used by SpamAssassin, for example: Somebody has to write
26321 the rules, and everybody else has to install these rules.  You are
26322 always late.  It would be much better, he argues, to filter mail based
26323 on whether it somehow resembles spam or non-spam.  One way to measure
26324 this is word distribution.  He then goes on to describe a solution
26325 that checks whether a new mail resembles any of your other spam mails
26326 or not.
26327
26328 The basic idea is this:  Create a two collections of your mail, one
26329 with spam, one with non-spam.  Count how often each word appears in
26330 either collection, weight this by the total number of mails in the
26331 collections, and store this information in a dictionary.  For every
26332 word in a new mail, determine its probability to belong to a spam or a
26333 non-spam mail.  Use the 15 most conspicuous words, compute the total
26334 probability of the mail being spam.  If this probability is higher
26335 than a certain threshold, the mail is considered to be spam.
26336
26337 The Spam Statistics package adds support to Gnus for this kind of
26338 filtering.  It can be used as one of the back ends of the Spam package
26339 (@pxref{Spam Package}), or by itself.
26340
26341 Before using the Spam Statistics package, you need to set it up.
26342 First, you need two collections of your mail, one with spam, one with
26343 non-spam.  Then you need to create a dictionary using these two
26344 collections, and save it.  And last but not least, you need to use
26345 this dictionary in your fancy mail splitting rules.
26346
26347 @menu
26348 * Creating a spam-stat dictionary::
26349 * Splitting mail using spam-stat::
26350 * Low-level interface to the spam-stat dictionary::
26351 @end menu
26352
26353 @node Creating a spam-stat dictionary
26354 @subsubsection Creating a spam-stat dictionary
26355
26356 Before you can begin to filter spam based on statistics, you must
26357 create these statistics based on two mail collections, one with spam,
26358 one with non-spam.  These statistics are then stored in a dictionary
26359 for later use.  In order for these statistics to be meaningful, you
26360 need several hundred emails in both collections.
26361
26362 Gnus currently supports only the nnml back end for automated dictionary
26363 creation.  The nnml back end stores all mails in a directory, one file
26364 per mail.  Use the following:
26365
26366 @defun spam-stat-process-spam-directory
26367 Create spam statistics for every file in this directory.  Every file
26368 is treated as one spam mail.
26369 @end defun
26370
26371 @defun spam-stat-process-non-spam-directory
26372 Create non-spam statistics for every file in this directory.  Every
26373 file is treated as one non-spam mail.
26374 @end defun
26375
26376 Usually you would call @code{spam-stat-process-spam-directory} on a
26377 directory such as @file{~/Mail/mail/spam} (this usually corresponds to
26378 the group @samp{nnml:mail.spam}), and you would call
26379 @code{spam-stat-process-non-spam-directory} on a directory such as
26380 @file{~/Mail/mail/misc} (this usually corresponds to the group
26381 @samp{nnml:mail.misc}).
26382
26383 When you are using @acronym{IMAP}, you won't have the mails available
26384 locally, so that will not work.  One solution is to use the Gnus Agent
26385 to cache the articles.  Then you can use directories such as
26386 @file{"~/News/agent/nnimap/mail.yourisp.com/personal_spam"} for
26387 @code{spam-stat-process-spam-directory}.  @xref{Agent as Cache}.
26388
26389 @defvar spam-stat
26390 This variable holds the hash-table with all the statistics---the
26391 dictionary we have been talking about.  For every word in either
26392 collection, this hash-table stores a vector describing how often the
26393 word appeared in spam and often it appeared in non-spam mails.
26394 @end defvar
26395
26396 If you want to regenerate the statistics from scratch, you need to
26397 reset the dictionary.
26398
26399 @defun spam-stat-reset
26400 Reset the @code{spam-stat} hash-table, deleting all the statistics.
26401 @end defun
26402
26403 When you are done, you must save the dictionary.  The dictionary may
26404 be rather large.  If you will not update the dictionary incrementally
26405 (instead, you will recreate it once a month, for example), then you
26406 can reduce the size of the dictionary by deleting all words that did
26407 not appear often enough or that do not clearly belong to only spam or
26408 only non-spam mails.
26409
26410 @defun spam-stat-reduce-size
26411 Reduce the size of the dictionary.  Use this only if you do not want
26412 to update the dictionary incrementally.
26413 @end defun
26414
26415 @defun spam-stat-save
26416 Save the dictionary.
26417 @end defun
26418
26419 @defvar spam-stat-file
26420 The filename used to store the dictionary.  This defaults to
26421 @file{~/.spam-stat.el}.
26422 @end defvar
26423
26424 @node Splitting mail using spam-stat
26425 @subsubsection Splitting mail using spam-stat
26426
26427 This section describes how to use the Spam statistics
26428 @emph{independently} of the @xref{Spam Package}.
26429
26430 First, add the following to your @file{~/.gnus.el} file:
26431
26432 @lisp
26433 (require 'spam-stat)
26434 (spam-stat-load)
26435 @end lisp
26436
26437 This will load the necessary Gnus code, and the dictionary you
26438 created.
26439
26440 Next, you need to adapt your fancy splitting rules:  You need to
26441 determine how to use @code{spam-stat}.  The following examples are for
26442 the nnml back end.  Using the nnimap back end works just as well.  Just
26443 use @code{nnimap-split-fancy} instead of @code{nnmail-split-fancy}.
26444
26445 In the simplest case, you only have two groups, @samp{mail.misc} and
26446 @samp{mail.spam}.  The following expression says that mail is either
26447 spam or it should go into @samp{mail.misc}.  If it is spam, then
26448 @code{spam-stat-split-fancy} will return @samp{mail.spam}.
26449
26450 @lisp
26451 (setq nnmail-split-fancy
26452       `(| (: spam-stat-split-fancy)
26453           "mail.misc"))
26454 @end lisp
26455
26456 @defvar spam-stat-split-fancy-spam-group
26457 The group to use for spam.  Default is @samp{mail.spam}.
26458 @end defvar
26459
26460 If you also filter mail with specific subjects into other groups, use
26461 the following expression.  Only mails not matching the regular
26462 expression are considered potential spam.
26463
26464 @lisp
26465 (setq nnmail-split-fancy
26466       `(| ("Subject" "\\bspam-stat\\b" "mail.emacs")
26467           (: spam-stat-split-fancy)
26468           "mail.misc"))
26469 @end lisp
26470
26471 If you want to filter for spam first, then you must be careful when
26472 creating the dictionary.  Note that @code{spam-stat-split-fancy} must
26473 consider both mails in @samp{mail.emacs} and in @samp{mail.misc} as
26474 non-spam, therefore both should be in your collection of non-spam
26475 mails, when creating the dictionary!
26476
26477 @lisp
26478 (setq nnmail-split-fancy
26479       `(| (: spam-stat-split-fancy)
26480           ("Subject" "\\bspam-stat\\b" "mail.emacs")
26481           "mail.misc"))
26482 @end lisp
26483
26484 You can combine this with traditional filtering.  Here, we move all
26485 HTML-only mails into the @samp{mail.spam.filtered} group.  Note that since
26486 @code{spam-stat-split-fancy} will never see them, the mails in
26487 @samp{mail.spam.filtered} should be neither in your collection of spam mails,
26488 nor in your collection of non-spam mails, when creating the
26489 dictionary!
26490
26491 @lisp
26492 (setq nnmail-split-fancy
26493       `(| ("Content-Type" "text/html" "mail.spam.filtered")
26494           (: spam-stat-split-fancy)
26495           ("Subject" "\\bspam-stat\\b" "mail.emacs")
26496           "mail.misc"))
26497 @end lisp
26498
26499
26500 @node Low-level interface to the spam-stat dictionary
26501 @subsubsection Low-level interface to the spam-stat dictionary
26502
26503 The main interface to using @code{spam-stat}, are the following functions:
26504
26505 @defun spam-stat-buffer-is-spam
26506 Called in a buffer, that buffer is considered to be a new spam mail.
26507 Use this for new mail that has not been processed before.
26508 @end defun
26509
26510 @defun spam-stat-buffer-is-no-spam
26511 Called in a buffer, that buffer is considered to be a new non-spam
26512 mail.  Use this for new mail that has not been processed before.
26513 @end defun
26514
26515 @defun spam-stat-buffer-change-to-spam
26516 Called in a buffer, that buffer is no longer considered to be normal
26517 mail but spam.  Use this to change the status of a mail that has
26518 already been processed as non-spam.
26519 @end defun
26520
26521 @defun spam-stat-buffer-change-to-non-spam
26522 Called in a buffer, that buffer is no longer considered to be spam but
26523 normal mail.  Use this to change the status of a mail that has already
26524 been processed as spam.
26525 @end defun
26526
26527 @defun spam-stat-save
26528 Save the hash table to the file.  The filename used is stored in the
26529 variable @code{spam-stat-file}.
26530 @end defun
26531
26532 @defun spam-stat-load
26533 Load the hash table from a file.  The filename used is stored in the
26534 variable @code{spam-stat-file}.
26535 @end defun
26536
26537 @defun spam-stat-score-word
26538 Return the spam score for a word.
26539 @end defun
26540
26541 @defun spam-stat-score-buffer
26542 Return the spam score for a buffer.
26543 @end defun
26544
26545 @defun spam-stat-split-fancy
26546 Use this function for fancy mail splitting.  Add the rule @samp{(:
26547 spam-stat-split-fancy)} to @code{nnmail-split-fancy}
26548 @end defun
26549
26550 Make sure you load the dictionary before using it.  This requires the
26551 following in your @file{~/.gnus.el} file:
26552
26553 @lisp
26554 (require 'spam-stat)
26555 (spam-stat-load)
26556 @end lisp
26557
26558 Typical test will involve calls to the following functions:
26559
26560 @smallexample
26561 Reset: (setq spam-stat (make-hash-table :test 'equal))
26562 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
26563 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
26564 Save table: (spam-stat-save)
26565 File size: (nth 7 (file-attributes spam-stat-file))
26566 Number of words: (hash-table-count spam-stat)
26567 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
26568 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
26569 Reduce table size: (spam-stat-reduce-size)
26570 Save table: (spam-stat-save)
26571 File size: (nth 7 (file-attributes spam-stat-file))
26572 Number of words: (hash-table-count spam-stat)
26573 Test spam: (spam-stat-test-directory "~/Mail/mail/spam")
26574 Test non-spam: (spam-stat-test-directory "~/Mail/mail/misc")
26575 @end smallexample
26576
26577 Here is how you would create your dictionary:
26578
26579 @smallexample
26580 Reset: (setq spam-stat (make-hash-table :test 'equal))
26581 Learn spam: (spam-stat-process-spam-directory "~/Mail/mail/spam")
26582 Learn non-spam: (spam-stat-process-non-spam-directory "~/Mail/mail/misc")
26583 Repeat for any other non-spam group you need...
26584 Reduce table size: (spam-stat-reduce-size)
26585 Save table: (spam-stat-save)
26586 @end smallexample
26587
26588 @node The Gnus Registry
26589 @section The Gnus Registry
26590 @cindex registry
26591 @cindex split
26592 @cindex track
26593
26594 The Gnus registry is a package that tracks messages by their
26595 Message-ID across all backends.  This allows Gnus users to do several
26596 cool things, be the envy of the locals, get free haircuts, and be
26597 experts on world issues.  Well, maybe not all of those, but the
26598 features are pretty cool.
26599
26600 Although they will be explained in detail shortly, here's a quick list
26601 of said features in case your attention span is...  never mind.
26602
26603 @enumerate
26604 @item
26605 Split messages to their parent
26606
26607 This keeps discussions in the same group.  You can use the subject and
26608 the sender in addition to the Message-ID.  Several strategies are
26609 available.
26610
26611 @item
26612 Store custom flags and keywords
26613
26614 The registry can store custom flags and keywords for a message.  For
26615 instance, you can mark a message ``To-Do'' this way and the flag will
26616 persist whether the message is in the nnimap, nnml, nnmaildir,
26617 etc. backends.
26618
26619 @item
26620 Store arbitrary data
26621
26622 Through a simple ELisp API, the registry can remember any data for a
26623 message.  A built-in inverse map, when activated, allows quick lookups
26624 of all messages matching a particular set of criteria.
26625 @end enumerate
26626
26627 @menu
26628 * Setup::
26629 * Fancy splitting to parent::
26630 * Store custom flags and keywords::
26631 * Store arbitrary data::
26632 @end menu
26633
26634 @node Setup
26635 @subsection Setup
26636
26637 Fortunately, setting up the Gnus registry is pretty easy:
26638
26639 @lisp
26640 (setq gnus-registry-max-entries 2500
26641       gnus-registry-use-long-group-names t)
26642
26643 (gnus-registry-initialize)
26644 @end lisp
26645
26646 This adds registry saves to Gnus newsrc saves (which happen on exit
26647 and when you press @kbd{s} from the @code{*Group*} buffer.  It also
26648 adds registry calls to article actions in Gnus (copy, move, etc.)  so
26649 it's not easy to undo the initialization.  See
26650 @code{gnus-registry-initialize} for the gory details.
26651
26652 Here are other settings used by the author of the registry (understand
26653 what they do before you copy them blindly).
26654
26655 @lisp
26656 (setq
26657  gnus-registry-split-strategy 'majority
26658  gnus-registry-ignored-groups '(("nntp" t)
26659                                 ("nnrss" t)
26660                                 ("spam" t)
26661                                 ("train" t))
26662  gnus-registry-max-entries 500000
26663  gnus-registry-use-long-group-names t
26664  gnus-registry-track-extra '(sender subject))
26665 @end lisp
26666
26667 They say: keep a lot of messages around, use long group names, track
26668 messages by sender and subject (not just parent Message-ID), and when
26669 the registry splits incoming mail, use a majority rule to decide where
26670 messages should go if there's more than one possibility.  In addition,
26671 the registry should ignore messages in groups that match ``nntp'',
26672 ``nnrss'', ``spam'', or ``train.''
26673
26674 You are doubtless impressed by all this, but you ask: ``I am a Gnus
26675 user, I customize to live.  Give me more.''  Here you go, these are
26676 the general settings.
26677
26678 @defvar gnus-registry-unfollowed-groups
26679 The groups that will not be followed by
26680 @code{gnus-registry-split-fancy-with-parent}.  They will still be
26681 remembered by the registry.  This is a list of regular expressions.
26682 @end defvar
26683
26684 @defvar gnus-registry-ignored-groups
26685 The groups that will not be remembered by the registry.  This is a
26686 list of regular expressions, also available through Group/Topic
26687 customization (so you can ignore or keep a specific group or a whole
26688 topic).
26689 @end defvar
26690
26691 @defvar gnus-registry-use-long-group-names
26692 Whether the registry will use long group names.  It's recommended to
26693 set this to @code{t}, although everything works if you don't.  Future
26694 functionality will require it.
26695 @end defvar
26696
26697 @defvar gnus-registry-max-entries
26698 The number (an integer or @code{nil} for unlimited) of entries the
26699 registry will keep.
26700 @end defvar
26701
26702 @defvar gnus-registry-cache-file
26703 The file where the registry will be stored between Gnus sessions.
26704 @end defvar
26705
26706 @node Fancy splitting to parent
26707 @subsection Fancy splitting to parent
26708
26709 Simply put, this lets you put followup e-mail where it belongs.
26710
26711 Every message has a Message-ID, which is unique, and the registry
26712 remembers it.  When the message is moved or copied, the registry will
26713 notice this and offer the new group as a choice to the splitting
26714 strategy.
26715
26716 When a followup is made, usually it mentions the original message's
26717 Message-ID in the headers.  The registry knows this and uses that
26718 mention to find the group where the original message lives.  You only
26719 have to put a rule like this:
26720
26721 @lisp
26722 (setq nnimap-my-split-fancy '(|
26723
26724       ;; split to parent: you need this
26725       (: gnus-registry-split-fancy-with-parent)
26726
26727       ;; other rules, as an example
26728       (: spam-split)
26729       ;; default mailbox
26730       "mail")
26731 @end lisp
26732
26733 in your fancy split setup.  In addition, you may want to customize the
26734 following variables.
26735
26736 @defvar gnus-registry-track-extra
26737 This is a list of symbols, so it's best to change it from the
26738 Customize interface.  By default it's @code{nil}, but you may want to
26739 track @code{subject} and @code{sender} as well when splitting by parent.
26740 It may work for you.  It can be annoying if your mail flow is large and
26741 people don't stick to the same groups.
26742 @end defvar
26743
26744 @defvar gnus-registry-split-strategy
26745 This is a symbol, so it's best to change it from the Customize
26746 interface.  By default it's @code{nil}, but you may want to set it to
26747 @code{majority} or @code{first} to split by sender or subject based on
26748 the majority of matches or on the first found.
26749 @end defvar
26750
26751 @node Store custom flags and keywords
26752 @subsection Store custom flags and keywords
26753
26754 The registry lets you set custom flags and keywords per message.  You
26755 can use the Gnus->Registry Marks menu or the @kbd{M M x} keyboard
26756 shortcuts, where @code{x} is the first letter of the mark's name.
26757
26758 @defvar gnus-registry-marks
26759 The custom marks that the registry can use.  You can modify the
26760 default list, if you like.  If you do, you'll have to exit Emacs
26761 before they take effect (you can also unload the registry and reload
26762 it or evaluate the specific macros you'll need, but you probably don't
26763 want to bother).  Use the Customize interface to modify the list.
26764
26765 By default this list has the @code{Important}, @code{Work},
26766 @code{Personal}, @code{To-Do}, and @code{Later} marks.  They all have
26767 keyboard shortcuts like @kbd{M M i} for Important, using the first
26768 letter.
26769 @end defvar
26770
26771 @defun gnus-registry-mark-article
26772 Call this function to mark an article with a custom registry mark.  It
26773 will offer the available marks for completion.
26774 @end defun
26775
26776 @node Store arbitrary data
26777 @subsection Store arbitrary data
26778
26779 The registry has a simple API that uses a Message-ID as the key to
26780 store arbitrary data (as long as it can be converted to a list for
26781 storage).
26782
26783 @defun gnus-registry-store-extra-entry (id key value)
26784 Store @code{value} in the extra data key @code{key} for message
26785 @code{id}.
26786 @end defun
26787
26788 @defun gnus-registry-delete-extra-entry (id key)
26789 Delete the extra data key @code{key} for message @code{id}.
26790 @end defun
26791
26792 @defun gnus-registry-fetch-extra (id key)
26793 Get the extra data key @code{key} for message @code{id}.
26794 @end defun
26795
26796 @defvar gnus-registry-extra-entries-precious
26797 If any extra entries are precious, their presence will make the
26798 registry keep the whole entry forever, even if there are no groups for
26799 the Message-ID and if the size limit of the registry is reached.  By
26800 default this is just @code{(marks)} so the custom registry marks are
26801 precious.
26802 @end defvar
26803
26804 @node Other modes
26805 @section Interaction with other modes
26806
26807 @subsection Dired
26808 @cindex dired
26809
26810 @code{gnus-dired-minor-mode} provides some useful functions for dired
26811 buffers.  It is enabled with
26812 @lisp
26813 (add-hook 'dired-mode-hook 'turn-on-gnus-dired-mode)
26814 @end lisp
26815
26816 @table @kbd
26817 @item C-c C-m C-a
26818 @findex gnus-dired-attach
26819 @cindex attachments, selection via dired
26820 Send dired's marked files as an attachment (@code{gnus-dired-attach}).
26821 You will be prompted for a message buffer.
26822
26823 @item C-c C-m C-l
26824 @findex gnus-dired-find-file-mailcap
26825 Visit a file according to the appropriate mailcap entry
26826 (@code{gnus-dired-find-file-mailcap}).  With prefix, open file in a new
26827 buffer.
26828
26829 @item C-c C-m C-p
26830 @findex gnus-dired-print
26831 Print file according to the mailcap entry (@code{gnus-dired-print}).  If
26832 there is no print command, print in a PostScript image.
26833 @end table
26834
26835 @node Various Various
26836 @section Various Various
26837 @cindex mode lines
26838 @cindex highlights
26839
26840 @table @code
26841
26842 @item gnus-home-directory
26843 @vindex gnus-home-directory
26844 All Gnus file and directory variables will be initialized from this
26845 variable, which defaults to @file{~/}.
26846
26847 @item gnus-directory
26848 @vindex gnus-directory
26849 Most Gnus storage file and directory variables will be initialized from
26850 this variable, which defaults to the @env{SAVEDIR} environment
26851 variable, or @file{~/News/} if that variable isn't set.
26852
26853 Note that Gnus is mostly loaded when the @file{~/.gnus.el} file is read.
26854 This means that other directory variables that are initialized from this
26855 variable won't be set properly if you set this variable in
26856 @file{~/.gnus.el}.  Set this variable in @file{.emacs} instead.
26857
26858 @item gnus-default-directory
26859 @vindex gnus-default-directory
26860 Not related to the above variable at all---this variable says what the
26861 default directory of all Gnus buffers should be.  If you issue commands
26862 like @kbd{C-x C-f}, the prompt you'll get starts in the current buffer's
26863 default directory.  If this variable is @code{nil} (which is the
26864 default), the default directory will be the default directory of the
26865 buffer you were in when you started Gnus.
26866
26867 @item gnus-verbose
26868 @vindex gnus-verbose
26869 This variable is an integer between zero and ten.  The higher the value,
26870 the more messages will be displayed.  If this variable is zero, Gnus
26871 will never flash any messages, if it is seven (which is the default),
26872 most important messages will be shown, and if it is ten, Gnus won't ever
26873 shut up, but will flash so many messages it will make your head swim.
26874
26875 @item gnus-verbose-backends
26876 @vindex gnus-verbose-backends
26877 This variable works the same way as @code{gnus-verbose}, but it applies
26878 to the Gnus back ends instead of Gnus proper.
26879
26880 @item gnus-add-timestamp-to-message
26881 @vindex gnus-add-timestamp-to-message
26882 This variable controls whether to add timestamps to messages that are
26883 controlled by @code{gnus-verbose} and @code{gnus-verbose-backends} and
26884 are issued.  The default value is @code{nil} which means never to add
26885 timestamp.  If it is @code{log}, add timestamps to only the messages
26886 that go into the @samp{*Messages*} buffer (in XEmacs, it is the
26887 @w{@samp{ *Message-Log*}} buffer).  If it is neither @code{nil} nor
26888 @code{log}, add timestamps not only to log messages but also to the ones
26889 displayed in the echo area.
26890
26891 @item nnheader-max-head-length
26892 @vindex nnheader-max-head-length
26893 When the back ends read straight heads of articles, they all try to read
26894 as little as possible.  This variable (default 8192) specifies
26895 the absolute max length the back ends will try to read before giving up
26896 on finding a separator line between the head and the body.  If this
26897 variable is @code{nil}, there is no upper read bound.  If it is
26898 @code{t}, the back ends won't try to read the articles piece by piece,
26899 but read the entire articles.  This makes sense with some versions of
26900 @code{ange-ftp} or @code{efs}.
26901
26902 @item nnheader-head-chop-length
26903 @vindex nnheader-head-chop-length
26904 This variable (default 2048) says how big a piece of each article to
26905 read when doing the operation described above.
26906
26907 @item nnheader-file-name-translation-alist
26908 @vindex nnheader-file-name-translation-alist
26909 @cindex file names
26910 @cindex invalid characters in file names
26911 @cindex characters in file names
26912 This is an alist that says how to translate characters in file names.
26913 For instance, if @samp{:} is invalid as a file character in file names
26914 on your system (you OS/2 user you), you could say something like:
26915
26916 @lisp
26917 @group
26918 (setq nnheader-file-name-translation-alist
26919       '((?: . ?_)))
26920 @end group
26921 @end lisp
26922
26923 In fact, this is the default value for this variable on OS/2 and MS
26924 Windows (phooey) systems.
26925
26926 @item gnus-hidden-properties
26927 @vindex gnus-hidden-properties
26928 This is a list of properties to use to hide ``invisible'' text.  It is
26929 @code{(invisible t intangible t)} by default on most systems, which
26930 makes invisible text invisible and intangible.
26931
26932 @item gnus-parse-headers-hook
26933 @vindex gnus-parse-headers-hook
26934 A hook called before parsing headers.  It can be used, for instance, to
26935 gather statistics on the headers fetched, or perhaps you'd like to prune
26936 some headers.  I don't see why you'd want that, though.
26937
26938 @item gnus-shell-command-separator
26939 @vindex gnus-shell-command-separator
26940 String used to separate two shell commands.  The default is @samp{;}.
26941
26942 @item gnus-invalid-group-regexp
26943 @vindex gnus-invalid-group-regexp
26944
26945 Regexp to match ``invalid'' group names when querying user for a group
26946 name.  The default value catches some @strong{really} invalid group
26947 names who could possibly mess up Gnus internally (like allowing
26948 @samp{:} in a group name, which is normally used to delimit method and
26949 group).
26950
26951 @acronym{IMAP} users might want to allow @samp{/} in group names though.
26952
26953 @item gnus-safe-html-newsgroups
26954 @vindex gnus-safe-html-newsgroups
26955 Groups in which links in html articles are considered all safe.  The
26956 value may be a regexp matching those groups, a list of group names, or
26957 @code{nil}.  This overrides @code{mm-w3m-safe-url-regexp}.  The default
26958 value is @code{"\\`nnrss[+:]"}.  This is effective only when emacs-w3m
26959 renders html articles, i.e., in the case @code{mm-text-html-renderer} is
26960 set to @code{w3m}.  @xref{Display Customization, ,Display Customization,
26961 emacs-mime, The Emacs MIME Manual}.
26962
26963 @end table
26964
26965 @node The End
26966 @chapter The End
26967
26968 Well, that's the manual---you can get on with your life now.  Keep in
26969 touch.  Say hello to your cats from me.
26970
26971 My @strong{ghod}---I just can't stand goodbyes.  Sniffle.
26972
26973 Ol' Charles Reznikoff said it pretty well, so I leave the floor to him:
26974
26975 @quotation
26976 @strong{Te Deum}
26977
26978 @sp 1
26979 Not because of victories @*
26980 I sing,@*
26981 having none,@*
26982 but for the common sunshine,@*
26983 the breeze,@*
26984 the largess of the spring.
26985
26986 @sp 1
26987 Not for victory@*
26988 but for the day's work done@*
26989 as well as I was able;@*
26990 not for a seat upon the dais@*
26991 but at the common table.@*
26992 @end quotation
26993
26994
26995 @node Appendices
26996 @chapter Appendices
26997
26998 @menu
26999 * XEmacs::                      Requirements for installing under XEmacs.
27000 * History::                     How Gnus got where it is today.
27001 * On Writing Manuals::          Why this is not a beginner's guide.
27002 * Terminology::                 We use really difficult, like, words here.
27003 * Customization::               Tailoring Gnus to your needs.
27004 * Troubleshooting::             What you might try if things do not work.
27005 * Gnus Reference Guide::        Rilly, rilly technical stuff.
27006 * Emacs for Heathens::          A short introduction to Emacsian terms.
27007 * Frequently Asked Questions::  The Gnus FAQ
27008 @end menu
27009
27010
27011 @node XEmacs
27012 @section XEmacs
27013 @cindex XEmacs
27014 @cindex installing under XEmacs
27015
27016 XEmacs is distributed as a collection of packages.  You should install
27017 whatever packages the Gnus XEmacs package requires.  The current
27018 requirements are @samp{gnus}, @samp{mail-lib}, @samp{xemacs-base},
27019 @samp{eterm}, @samp{sh-script}, @samp{net-utils}, @samp{os-utils},
27020 @samp{dired}, @samp{mh-e}, @samp{sieve}, @samp{ps-print}, @samp{W3},
27021 @samp{pgg}, @samp{mailcrypt}, @samp{ecrypto}, and @samp{sasl}.
27022
27023
27024 @node History
27025 @section History
27026
27027 @cindex history
27028 @sc{gnus} was written by Masanobu @sc{Umeda}.  When autumn crept up in
27029 '94, Lars Magne Ingebrigtsen grew bored and decided to rewrite Gnus.
27030
27031 If you want to investigate the person responsible for this outrage,
27032 you can point your (feh!) web browser to
27033 @uref{http://quimby.gnus.org/}.  This is also the primary
27034 distribution point for the new and spiffy versions of Gnus, and is
27035 known as The Site That Destroys Newsrcs And Drives People Mad.
27036
27037 During the first extended alpha period of development, the new Gnus was
27038 called ``(ding) Gnus''.  @dfn{(ding)} is, of course, short for
27039 @dfn{ding is not Gnus}, which is a total and utter lie, but who cares?
27040 (Besides, the ``Gnus'' in this abbreviation should probably be
27041 pronounced ``news'' as @sc{Umeda} intended, which makes it a more
27042 appropriate name, don't you think?)
27043
27044 In any case, after spending all that energy on coming up with a new and
27045 spunky name, we decided that the name was @emph{too} spunky, so we
27046 renamed it back again to ``Gnus''.  But in mixed case.  ``Gnus'' vs.
27047 ``@sc{gnus}''.  New vs. old.
27048
27049 @menu
27050 * Gnus Versions::               What Gnus versions have been released.
27051 * Other Gnus Versions::         Other Gnus versions that also have been released.
27052 * Why?::                        What's the point of Gnus?
27053 * Compatibility::               Just how compatible is Gnus with @sc{gnus}?
27054 * Conformity::                  Gnus tries to conform to all standards.
27055 * Emacsen::                     Gnus can be run on a few modern Emacsen.
27056 * Gnus Development::            How Gnus is developed.
27057 * Contributors::                Oodles of people.
27058 * New Features::                Pointers to some of the new stuff in Gnus.
27059 @end menu
27060
27061
27062 @node Gnus Versions
27063 @subsection Gnus Versions
27064 @cindex ding Gnus
27065 @cindex September Gnus
27066 @cindex Red Gnus
27067 @cindex Quassia Gnus
27068 @cindex Pterodactyl Gnus
27069 @cindex Oort Gnus
27070 @cindex No Gnus
27071 @cindex Gnus versions
27072
27073 The first ``proper'' release of Gnus 5 was done in November 1995 when it
27074 was included in the Emacs 19.30 distribution (132 (ding) Gnus releases
27075 plus 15 Gnus 5.0 releases).
27076
27077 In May 1996 the next Gnus generation (aka. ``September Gnus'' (after 99
27078 releases)) was released under the name ``Gnus 5.2'' (40 releases).
27079
27080 On July 28th 1996 work on Red Gnus was begun, and it was released on
27081 January 25th 1997 (after 84 releases) as ``Gnus 5.4'' (67 releases).
27082
27083 On September 13th 1997, Quassia Gnus was started and lasted 37 releases.
27084 It was released as ``Gnus 5.6'' on March 8th 1998 (46 releases).
27085
27086 Gnus 5.6 begat Pterodactyl Gnus on August 29th 1998 and was released as
27087 ``Gnus 5.8'' (after 99 releases and a CVS repository) on December 3rd
27088 1999.
27089
27090 On the 26th of October 2000, Oort Gnus was begun and was released as
27091 Gnus 5.10 on May 1st 2003 (24 releases).
27092
27093 On the January 4th 2004, No Gnus was begun.
27094
27095 On April 19, 2010 Gnus development was moved to Git.  See
27096 http://git.gnus.org for details (http://www.gnus.org will be updated
27097 with the information when possible).
27098
27099 If you happen upon a version of Gnus that has a prefixed name --
27100 ``(ding) Gnus'', ``September Gnus'', ``Red Gnus'', ``Quassia Gnus'',
27101 ``Pterodactyl Gnus'', ``Oort Gnus'', ``No Gnus'' -- don't panic.
27102 Don't let it know that you're frightened.  Back away.  Slowly.  Whatever
27103 you do, don't run.  Walk away, calmly, until you're out of its reach.
27104 Find a proper released version of Gnus and snuggle up to that instead.
27105
27106
27107 @node Other Gnus Versions
27108 @subsection Other Gnus Versions
27109 @cindex Semi-gnus
27110
27111 In addition to the versions of Gnus which have had their releases
27112 coordinated by Lars, one major development has been Semi-gnus from
27113 Japan.  It's based on a library called @acronym{SEMI}, which provides
27114 @acronym{MIME} capabilities.
27115
27116 These Gnusae are based mainly on Gnus 5.6 and Pterodactyl Gnus.
27117 Collectively, they are called ``Semi-gnus'', and different strains are
27118 called T-gnus, ET-gnus, Nana-gnus and Chaos.  These provide powerful
27119 @acronym{MIME} and multilingualization things, especially important for
27120 Japanese users.
27121
27122
27123 @node Why?
27124 @subsection Why?
27125
27126 What's the point of Gnus?
27127
27128 I want to provide a ``rad'', ``happening'', ``way cool'' and ``hep''
27129 newsreader, that lets you do anything you can think of.  That was my
27130 original motivation, but while working on Gnus, it has become clear to
27131 me that this generation of newsreaders really belong in the stone age.
27132 Newsreaders haven't developed much since the infancy of the net.  If the
27133 volume continues to rise with the current rate of increase, all current
27134 newsreaders will be pretty much useless.  How do you deal with
27135 newsgroups that have thousands of new articles each day?  How do you
27136 keep track of millions of people who post?
27137
27138 Gnus offers no real solutions to these questions, but I would very much
27139 like to see Gnus being used as a testing ground for new methods of
27140 reading and fetching news.  Expanding on @sc{Umeda}-san's wise decision
27141 to separate the newsreader from the back ends, Gnus now offers a simple
27142 interface for anybody who wants to write new back ends for fetching mail
27143 and news from different sources.  I have added hooks for customizations
27144 everywhere I could imagine it being useful.  By doing so, I'm inviting
27145 every one of you to explore and invent.
27146
27147 May Gnus never be complete.  @kbd{C-u 100 M-x all-hail-emacs} and
27148 @kbd{C-u 100 M-x all-hail-xemacs}.
27149
27150
27151 @node Compatibility
27152 @subsection Compatibility
27153
27154 @cindex compatibility
27155 Gnus was designed to be fully compatible with @sc{gnus}.  Almost all key
27156 bindings have been kept.  More key bindings have been added, of course,
27157 but only in one or two obscure cases have old bindings been changed.
27158
27159 Our motto is:
27160 @quotation
27161 @cartouche
27162 @center In a cloud bones of steel.
27163 @end cartouche
27164 @end quotation
27165
27166 All commands have kept their names.  Some internal functions have changed
27167 their names.
27168
27169 The @code{gnus-uu} package has changed drastically.  @xref{Decoding
27170 Articles}.
27171
27172 One major compatibility question is the presence of several summary
27173 buffers.  All variables relevant while reading a group are
27174 buffer-local to the summary buffer they belong in.  Although many
27175 important variables have their values copied into their global
27176 counterparts whenever a command is executed in the summary buffer, this
27177 change might lead to incorrect values being used unless you are careful.
27178
27179 All code that relies on knowledge of @sc{gnus} internals will probably
27180 fail.  To take two examples: Sorting @code{gnus-newsrc-alist} (or
27181 changing it in any way, as a matter of fact) is strictly verboten.  Gnus
27182 maintains a hash table that points to the entries in this alist (which
27183 speeds up many functions), and changing the alist directly will lead to
27184 peculiar results.
27185
27186 @cindex hilit19
27187 @cindex highlighting
27188 Old hilit19 code does not work at all.  In fact, you should probably
27189 remove all hilit code from all Gnus hooks
27190 (@code{gnus-group-prepare-hook} and @code{gnus-summary-prepare-hook}).
27191 Gnus provides various integrated functions for highlighting.  These are
27192 faster and more accurate.  To make life easier for everybody, Gnus will
27193 by default remove all hilit calls from all hilit hooks.  Uncleanliness!
27194 Away!
27195
27196 Packages like @code{expire-kill} will no longer work.  As a matter of
27197 fact, you should probably remove all old @sc{gnus} packages (and other
27198 code) when you start using Gnus.  More likely than not, Gnus already
27199 does what you have written code to make @sc{gnus} do.  (Snicker.)
27200
27201 Even though old methods of doing things are still supported, only the
27202 new methods are documented in this manual.  If you detect a new method of
27203 doing something while reading this manual, that does not mean you have
27204 to stop doing it the old way.
27205
27206 Gnus understands all @sc{gnus} startup files.
27207
27208 @kindex M-x gnus-bug
27209 @findex gnus-bug
27210 @cindex reporting bugs
27211 @cindex bugs
27212 Overall, a casual user who hasn't written much code that depends on
27213 @sc{gnus} internals should suffer no problems.  If problems occur,
27214 please let me know by issuing that magic command @kbd{M-x gnus-bug}.
27215
27216 @vindex gnus-bug-create-help-buffer
27217 If you are in the habit of sending bug reports @emph{very} often, you
27218 may find the helpful help buffer annoying after a while.  If so, set
27219 @code{gnus-bug-create-help-buffer} to @code{nil} to avoid having it pop
27220 up at you.
27221
27222
27223 @node Conformity
27224 @subsection Conformity
27225
27226 No rebels without a clue here, ma'am.  We conform to all standards known
27227 to (wo)man.  Except for those standards and/or conventions we disagree
27228 with, of course.
27229
27230 @table @strong
27231
27232 @item RFC (2)822
27233 @cindex RFC 822
27234 @cindex RFC 2822
27235 There are no known breaches of this standard.
27236
27237 @item RFC 1036
27238 @cindex RFC 1036
27239 There are no known breaches of this standard, either.
27240
27241 @item Son-of-RFC 1036
27242 @cindex Son-of-RFC 1036
27243 We do have some breaches to this one.
27244
27245 @table @emph
27246
27247 @item X-Newsreader
27248 @itemx User-Agent
27249 These are considered to be ``vanity headers'', while I consider them
27250 to be consumer information.  After seeing so many badly formatted
27251 articles coming from @code{tin} and @code{Netscape} I know not to use
27252 either of those for posting articles.  I would not have known that if
27253 it wasn't for the @code{X-Newsreader} header.
27254 @end table
27255
27256 @item USEFOR
27257 @cindex USEFOR
27258 USEFOR is an IETF working group writing a successor to RFC 1036, based
27259 on Son-of-RFC 1036.  They have produced a number of drafts proposing
27260 various changes to the format of news articles.  The Gnus towers will
27261 look into implementing the changes when the draft is accepted as an RFC.
27262
27263 @item MIME - RFC 2045-2049 etc
27264 @cindex @acronym{MIME}
27265 All the various @acronym{MIME} RFCs are supported.
27266
27267 @item Disposition Notifications - RFC 2298
27268 Message Mode is able to request notifications from the receiver.
27269
27270 @item PGP - RFC 1991 and RFC 2440
27271 @cindex RFC 1991
27272 @cindex RFC 2440
27273 RFC 1991 is the original @acronym{PGP} message specification,
27274 published as an informational RFC.  RFC 2440 was the follow-up, now
27275 called Open PGP, and put on the Standards Track.  Both document a
27276 non-@acronym{MIME} aware @acronym{PGP} format.  Gnus supports both
27277 encoding (signing and encryption) and decoding (verification and
27278 decryption).
27279
27280 @item PGP/MIME - RFC 2015/3156
27281 RFC 2015 (superseded by 3156 which references RFC 2440 instead of RFC
27282 1991) describes the @acronym{MIME}-wrapping around the RFC 1991/2440 format.
27283 Gnus supports both encoding and decoding.
27284
27285 @item S/MIME - RFC 2633
27286 RFC 2633 describes the @acronym{S/MIME} format.
27287
27288 @item IMAP - RFC 1730/2060, RFC 2195, RFC 2086, RFC 2359, RFC 2595, RFC 1731
27289 RFC 1730 is @acronym{IMAP} version 4, updated somewhat by RFC 2060
27290 (@acronym{IMAP} 4 revision 1).  RFC 2195 describes CRAM-MD5
27291 authentication for @acronym{IMAP}.  RFC 2086 describes access control
27292 lists (ACLs) for @acronym{IMAP}.  RFC 2359 describes a @acronym{IMAP}
27293 protocol enhancement.  RFC 2595 describes the proper @acronym{TLS}
27294 integration (STARTTLS) with @acronym{IMAP}.  RFC 1731 describes the
27295 GSSAPI/Kerberos4 mechanisms for @acronym{IMAP}.
27296
27297 @end table
27298
27299 If you ever notice Gnus acting non-compliant with regards to the texts
27300 mentioned above, don't hesitate to drop a note to Gnus Towers and let us
27301 know.
27302
27303
27304 @node Emacsen
27305 @subsection Emacsen
27306 @cindex Emacsen
27307 @cindex XEmacs
27308 @cindex Mule
27309 @cindex Emacs
27310
27311 This version of Gnus should work on:
27312
27313 @itemize @bullet
27314
27315 @item
27316 Emacs 21.1 and up.
27317
27318 @item
27319 XEmacs 21.4 and up.
27320
27321 @end itemize
27322
27323 This Gnus version will absolutely not work on any Emacsen older than
27324 that.  Not reliably, at least.  Older versions of Gnus may work on older
27325 Emacs versions.  Particularly, Gnus 5.10.8 should also work on Emacs
27326 20.7 and XEmacs 21.1.
27327
27328 @c No-merge comment: The paragraph added in v5-10 here must not be
27329 @c synced here!
27330
27331 @node Gnus Development
27332 @subsection Gnus Development
27333
27334 Gnus is developed in a two-phased cycle.  The first phase involves much
27335 discussion on the development mailing list @samp{ding@@gnus.org}, where people
27336 propose changes and new features, post patches and new back ends.  This
27337 phase is called the @dfn{alpha} phase, since the Gnusae released in this
27338 phase are @dfn{alpha releases}, or (perhaps more commonly in other
27339 circles) @dfn{snapshots}.  During this phase, Gnus is assumed to be
27340 unstable and should not be used by casual users.  Gnus alpha releases
27341 have names like ``Oort Gnus'' and ``No Gnus''.  @xref{Gnus Versions}.
27342
27343 After futzing around for 10-100 alpha releases, Gnus is declared
27344 @dfn{frozen}, and only bug fixes are applied.  Gnus loses the prefix,
27345 and is called things like ``Gnus 5.10.1'' instead.  Normal people are
27346 supposed to be able to use these, and these are mostly discussed on the
27347 @samp{gnu.emacs.gnus} newsgroup.  This newgroup is mirrored to the
27348 mailing list @samp{info-gnus-english@@gnu.org} which is carried on Gmane
27349 as @samp{gmane.emacs.gnus.user}.  These releases are finally integrated
27350 in Emacs.
27351
27352 @cindex Incoming*
27353 @vindex mail-source-delete-incoming
27354 Some variable defaults differ between alpha Gnusae and released Gnusae,
27355 in particular, @code{mail-source-delete-incoming}.  This is to prevent
27356 lossage of mail if an alpha release hiccups while handling the mail.
27357 @xref{Mail Source Customization}.
27358
27359 The division of discussion between the ding mailing list and the Gnus
27360 newsgroup is not purely based on publicity concerns.  It's true that
27361 having people write about the horrible things that an alpha Gnus release
27362 can do (sometimes) in a public forum may scare people off, but more
27363 importantly, talking about new experimental features that have been
27364 introduced may confuse casual users.  New features are frequently
27365 introduced, fiddled with, and judged to be found wanting, and then
27366 either discarded or totally rewritten.  People reading the mailing list
27367 usually keep up with these rapid changes, while people on the newsgroup
27368 can't be assumed to do so.
27369
27370 So if you have problems with or questions about the alpha versions,
27371 direct those to the ding mailing list @samp{ding@@gnus.org}.  This list
27372 is also available on Gmane as @samp{gmane.emacs.gnus.general}.
27373
27374 @cindex Incoming*
27375 @vindex mail-source-delete-incoming
27376 Some variable defaults differ between alpha Gnusae and released Gnusae,
27377 in particular, @code{mail-source-delete-incoming}.  This is to prevent
27378 lossage of mail if an alpha release hiccups while handling the mail.
27379 @xref{Mail Source Customization}.
27380
27381 @node Contributors
27382 @subsection Contributors
27383 @cindex contributors
27384
27385 The new Gnus version couldn't have been done without the help of all the
27386 people on the (ding) mailing list.  Every day for over a year I have
27387 gotten billions of nice bug reports from them, filling me with joy,
27388 every single one of them.  Smooches.  The people on the list have been
27389 tried beyond endurance, what with my ``oh, that's a neat idea <type
27390 type>, yup, I'll release it right away <ship off> no wait, that doesn't
27391 work at all <type type>, yup, I'll ship that one off right away <ship
27392 off> no, wait, that absolutely does not work'' policy for releases.
27393 Micro$oft---bah.  Amateurs.  I'm @emph{much} worse.  (Or is that
27394 ``worser''? ``much worser''?  ``worsest''?)
27395
27396 I would like to take this opportunity to thank the Academy for@dots{}  oops,
27397 wrong show.
27398
27399 @itemize @bullet
27400
27401 @item
27402 Masanobu @sc{Umeda}---the writer of the original @sc{gnus}.
27403
27404 @item
27405 Shenghuo Zhu---uudecode.el, mm-uu.el, rfc1843.el, webmail.el,
27406 nnwarchive and many, many other things connected with @acronym{MIME} and
27407 other types of en/decoding, as well as general bug fixing, new
27408 functionality and stuff.
27409
27410 @item
27411 Per Abrahamsen---custom, scoring, highlighting and @sc{soup} code (as
27412 well as numerous other things).
27413
27414 @item
27415 Luis Fernandes---design and graphics.
27416
27417 @item
27418 Joe Reiss---creator of the smiley faces.
27419
27420 @item
27421 Justin Sheehy---the @acronym{FAQ} maintainer.
27422
27423 @item
27424 Erik Naggum---help, ideas, support, code and stuff.
27425
27426 @item
27427 Wes Hardaker---@file{gnus-picon.el} and the manual section on
27428 @dfn{picons} (@pxref{Picons}).
27429
27430 @item
27431 Kim-Minh Kaplan---further work on the picon code.
27432
27433 @item
27434 Brad Miller---@file{gnus-gl.el} and the GroupLens manual section.
27435
27436 @item
27437 Sudish Joseph---innumerable bug fixes.
27438
27439 @item
27440 Ilja Weis---@file{gnus-topic.el}.
27441
27442 @item
27443 Steven L. Baur---lots and lots and lots of bugs detections and fixes.
27444
27445 @item
27446 Vladimir Alexiev---the refcard and reference booklets.
27447
27448 @item
27449 Felix Lee & Jamie Zawinski---I stole some pieces from the XGnus
27450 distribution by Felix Lee and JWZ.
27451
27452 @item
27453 Scott Byer---@file{nnfolder.el} enhancements & rewrite.
27454
27455 @item
27456 Peter Mutsaers---orphan article scoring code.
27457
27458 @item
27459 Ken Raeburn---POP mail support.
27460
27461 @item
27462 Hallvard B Furuseth---various bits and pieces, especially dealing with
27463 .newsrc files.
27464
27465 @item
27466 Brian Edmonds---@file{gnus-bbdb.el}.
27467
27468 @item
27469 David Moore---rewrite of @file{nnvirtual.el} and many other things.
27470
27471 @item
27472 Kevin Davidson---came up with the name @dfn{ding}, so blame him.
27473
27474 @item
27475 Fran@,{c}ois Pinard---many, many interesting and thorough bug reports, as
27476 well as autoconf support.
27477
27478 @end itemize
27479
27480 This manual was proof-read by Adrian Aichner, with Ricardo Nassif, Mark
27481 Borges, and Jost Krieger proof-reading parts of the manual.
27482
27483 The following people have contributed many patches and suggestions:
27484
27485 Christopher Davis,
27486 Andrew Eskilsson,
27487 Kai Grossjohann,
27488 Kevin Greiner,
27489 Jesper Harder,
27490 Paul Jarc,
27491 Simon Josefsson,
27492 David K@aa{}gedal,
27493 Richard Pieri,
27494 Fabrice Popineau,
27495 Daniel Quinlan,
27496 Michael Shields,
27497 Reiner Steib,
27498 Jason L. Tibbitts, III,
27499 Jack Vinson,
27500 Katsumi Yamaoka, @c Yamaoka
27501 and
27502 Teodor Zlatanov.
27503
27504 Also thanks to the following for patches and stuff:
27505
27506 Jari Aalto,
27507 Adrian Aichner,
27508 Vladimir Alexiev,
27509 Russ Allbery,
27510 Peter Arius,
27511 Matt Armstrong,
27512 Marc Auslander,
27513 Miles Bader,
27514 Alexei V. Barantsev,
27515 Frank Bennett,
27516 Robert Bihlmeyer,
27517 Chris Bone,
27518 Mark Borges,
27519 Mark Boyns,
27520 Lance A. Brown,
27521 Rob Browning,
27522 Kees de Bruin,
27523 Martin Buchholz,
27524 Joe Buehler,
27525 Kevin Buhr,
27526 Alastair Burt,
27527 Joao Cachopo,
27528 Zlatko Calusic,
27529 Massimo Campostrini,
27530 Castor,
27531 David Charlap,
27532 Dan Christensen,
27533 Kevin Christian,
27534 Jae-you Chung, @c ?
27535 James H. Cloos, Jr.,
27536 Laura Conrad,
27537 Michael R. Cook,
27538 Glenn Coombs,
27539 Andrew J. Cosgriff,
27540 Neil Crellin,
27541 Frank D. Cringle,
27542 Geoffrey T. Dairiki,
27543 Andre Deparade,
27544 Ulrik Dickow,
27545 Dave Disser,
27546 Rui-Tao Dong, @c ?
27547 Joev Dubach,
27548 Michael Welsh Duggan,
27549 Dave Edmondson,
27550 Paul Eggert,
27551 Mark W. Eichin,
27552 Karl Eichwalder,
27553 Enami Tsugutomo, @c Enami
27554 Michael Ernst,
27555 Luc Van Eycken,
27556 Sam Falkner,
27557 Nelson Jose dos Santos Ferreira,
27558 Sigbjorn Finne,
27559 Sven Fischer,
27560 Paul Fisher,
27561 Decklin Foster,
27562 Gary D. Foster,
27563 Paul Franklin,
27564 Guy Geens,
27565 Arne Georg Gleditsch,
27566 David S. Goldberg,
27567 Michelangelo Grigni,
27568 Dale Hagglund,
27569 D. Hall,
27570 Magnus Hammerin,
27571 Kenichi Handa, @c Handa
27572 Raja R. Harinath,
27573 Yoshiki Hayashi, @c Hayashi
27574 P. E. Jareth Hein,
27575 Hisashige Kenji, @c Hisashige
27576 Scott Hofmann,
27577 Tassilo Horn,
27578 Marc Horowitz,
27579 Gunnar Horrigmo,
27580 Richard Hoskins,
27581 Brad Howes,
27582 Miguel de Icaza,
27583 Fran@,{c}ois Felix Ingrand,
27584 Tatsuya Ichikawa, @c Ichikawa
27585 Ishikawa Ichiro, @c Ishikawa
27586 Lee Iverson,
27587 Iwamuro Motonori, @c Iwamuro
27588 Rajappa Iyer,
27589 Andreas Jaeger,
27590 Adam P. Jenkins,
27591 Randell Jesup,
27592 Fred Johansen,
27593 Gareth Jones,
27594 Greg Klanderman,
27595 Karl Kleinpaste,
27596 Michael Klingbeil,
27597 Peter Skov Knudsen,
27598 Shuhei Kobayashi, @c Kobayashi
27599 Petr Konecny,
27600 Koseki Yoshinori, @c Koseki
27601 Thor Kristoffersen,
27602 Jens Lautenbacher,
27603 Martin Larose,
27604 Seokchan Lee, @c Lee
27605 Joerg Lenneis,
27606 Carsten Leonhardt,
27607 James LewisMoss,
27608 Christian Limpach,
27609 Markus Linnala,
27610 Dave Love,
27611 Mike McEwan,
27612 Tonny Madsen,
27613 Shlomo Mahlab,
27614 Nat Makarevitch,
27615 Istvan Marko,
27616 David Martin,
27617 Jason R. Mastaler,
27618 Gordon Matzigkeit,
27619 Timo Metzemakers,
27620 Richard Mlynarik,
27621 Lantz Moore,
27622 Morioka Tomohiko, @c Morioka
27623 Erik Toubro Nielsen,
27624 Hrvoje Niksic,
27625 Andy Norman,
27626 Fred Oberhauser,
27627 C. R. Oldham,
27628 Alexandre Oliva,
27629 Ken Olstad,
27630 Masaharu Onishi, @c Onishi
27631 Hideki Ono, @c Ono
27632 Ettore Perazzoli,
27633 William Perry,
27634 Stephen Peters,
27635 Jens-Ulrik Holger Petersen,
27636 Ulrich Pfeifer,
27637 Matt Pharr,
27638 Andy Piper,
27639 John McClary Prevost,
27640 Bill Pringlemeir,
27641 Mike Pullen,
27642 Jim Radford,
27643 Colin Rafferty,
27644 Lasse Rasinen,
27645 Lars Balker Rasmussen,
27646 Joe Reiss,
27647 Renaud Rioboo,
27648 Roland B. Roberts,
27649 Bart Robinson,
27650 Christian von Roques,
27651 Markus Rost,
27652 Jason Rumney,
27653 Wolfgang Rupprecht,
27654 Jay Sachs,
27655 Dewey M. Sasser,
27656 Conrad Sauerwald,
27657 Loren Schall,
27658 Dan Schmidt,
27659 Ralph Schleicher,
27660 Philippe Schnoebelen,
27661 Andreas Schwab,
27662 Randal L. Schwartz,
27663 Danny Siu,
27664 Matt Simmons,
27665 Paul D. Smith,
27666 Jeff Sparkes,
27667 Toby Speight,
27668 Michael Sperber,
27669 Darren Stalder,
27670 Richard Stallman,
27671 Greg Stark,
27672 Sam Steingold,
27673 Paul Stevenson,
27674 Jonas Steverud,
27675 Paul Stodghill,
27676 Kiyokazu Suto, @c Suto
27677 Kurt Swanson,
27678 Samuel Tardieu,
27679 Teddy,
27680 Chuck Thompson,
27681 Tozawa Akihiko, @c Tozawa
27682 Philippe Troin,
27683 James Troup,
27684 Trung Tran-Duc,
27685 Jack Twilley,
27686 Aaron M. Ucko,
27687 Aki Vehtari,
27688 Didier Verna,
27689 Vladimir Volovich,
27690 Jan Vroonhof,
27691 Stefan Waldherr,
27692 Pete Ware,
27693 Barry A. Warsaw,
27694 Christoph Wedler,
27695 Joe Wells,
27696 Lee Willis,
27697 and
27698 Lloyd Zusman.
27699
27700
27701 For a full overview of what each person has done, the ChangeLogs
27702 included in the Gnus alpha distributions should give ample reading
27703 (550kB and counting).
27704
27705 Apologies to everybody that I've forgotten, of which there are many, I'm
27706 sure.
27707
27708 Gee, that's quite a list of people.  I guess that must mean that there
27709 actually are people who are using Gnus.  Who'd'a thunk it!
27710
27711
27712 @node New Features
27713 @subsection New Features
27714 @cindex new features
27715
27716 @menu
27717 * ding Gnus::                   New things in Gnus 5.0/5.1, the first new Gnus.
27718 * September Gnus::              The Thing Formally Known As Gnus 5.2/5.3.
27719 * Red Gnus::                    Third time best---Gnus 5.4/5.5.
27720 * Quassia Gnus::                Two times two is four, or Gnus 5.6/5.7.
27721 * Pterodactyl Gnus::            Pentad also starts with P, AKA Gnus 5.8/5.9.
27722 * Oort Gnus::                   It's big.  It's far out.  Gnus 5.10/5.11.
27723 * No Gnus::                     Very punny.
27724 @end menu
27725
27726 These lists are, of course, just @emph{short} overviews of the
27727 @emph{most} important new features.  No, really.  There are tons more.
27728 Yes, we have feeping creaturism in full effect.
27729
27730 @node ding Gnus
27731 @subsubsection (ding) Gnus
27732
27733 New features in Gnus 5.0/5.1:
27734
27735 @itemize @bullet
27736
27737 @item
27738 The look of all buffers can be changed by setting format-like variables
27739 (@pxref{Group Buffer Format} and @pxref{Summary Buffer Format}).
27740
27741 @item
27742 Local spool and several @acronym{NNTP} servers can be used at once
27743 (@pxref{Select Methods}).
27744
27745 @item
27746 You can combine groups into virtual groups (@pxref{Virtual Groups}).
27747
27748 @item
27749 You can read a number of different mail formats (@pxref{Getting Mail}).
27750 All the mail back ends implement a convenient mail expiry scheme
27751 (@pxref{Expiring Mail}).
27752
27753 @item
27754 Gnus can use various strategies for gathering threads that have lost
27755 their roots (thereby gathering loose sub-threads into one thread) or it
27756 can go back and retrieve enough headers to build a complete thread
27757 (@pxref{Customizing Threading}).
27758
27759 @item
27760 Killed groups can be displayed in the group buffer, and you can read
27761 them as well (@pxref{Listing Groups}).
27762
27763 @item
27764 Gnus can do partial group updates---you do not have to retrieve the
27765 entire active file just to check for new articles in a few groups
27766 (@pxref{The Active File}).
27767
27768 @item
27769 Gnus implements a sliding scale of subscribedness to groups
27770 (@pxref{Group Levels}).
27771
27772 @item
27773 You can score articles according to any number of criteria
27774 (@pxref{Scoring}).  You can even get Gnus to find out how to score
27775 articles for you (@pxref{Adaptive Scoring}).
27776
27777 @item
27778 Gnus maintains a dribble buffer that is auto-saved the normal Emacs
27779 manner, so it should be difficult to lose much data on what you have
27780 read if your machine should go down (@pxref{Auto Save}).
27781
27782 @item
27783 Gnus now has its own startup file (@file{~/.gnus.el}) to avoid
27784 cluttering up the @file{.emacs} file.
27785
27786 @item
27787 You can set the process mark on both groups and articles and perform
27788 operations on all the marked items (@pxref{Process/Prefix}).
27789
27790 @item
27791 You can grep through a subset of groups and create a group from the
27792 results (@pxref{Kibozed Groups}).
27793
27794 @item
27795 You can list subsets of groups according to, well, anything
27796 (@pxref{Listing Groups}).
27797
27798 @item
27799 You can browse foreign servers and subscribe to groups from those
27800 servers (@pxref{Browse Foreign Server}).
27801
27802 @item
27803 Gnus can fetch articles, asynchronously, on a second connection to the
27804 server (@pxref{Asynchronous Fetching}).
27805
27806 @item
27807 You can cache articles locally (@pxref{Article Caching}).
27808
27809 @item
27810 The uudecode functions have been expanded and generalized
27811 (@pxref{Decoding Articles}).
27812
27813 @item
27814 You can still post uuencoded articles, which was a little-known feature
27815 of @sc{gnus}' past (@pxref{Uuencoding and Posting}).
27816
27817 @item
27818 Fetching parents (and other articles) now actually works without
27819 glitches (@pxref{Finding the Parent}).
27820
27821 @item
27822 Gnus can fetch @acronym{FAQ}s and group descriptions (@pxref{Group Information}).
27823
27824 @item
27825 Digests (and other files) can be used as the basis for groups
27826 (@pxref{Document Groups}).
27827
27828 @item
27829 Articles can be highlighted and customized (@pxref{Customizing
27830 Articles}).
27831
27832 @item
27833 URLs and other external references can be buttonized (@pxref{Article
27834 Buttons}).
27835
27836 @item
27837 You can do lots of strange stuff with the Gnus window & frame
27838 configuration (@pxref{Window Layout}).
27839
27840 @item
27841 You can click on buttons instead of using the keyboard
27842 (@pxref{Buttons}).
27843
27844 @end itemize
27845
27846
27847 @node September Gnus
27848 @subsubsection September Gnus
27849
27850 @iftex
27851 @iflatex
27852 \gnusfig{-28cm}{0cm}{\epsfig{figure=ps/september,height=20cm}}
27853 @end iflatex
27854 @end iftex
27855
27856 New features in Gnus 5.2/5.3:
27857
27858 @itemize @bullet
27859
27860 @item
27861 A new message composition mode is used.  All old customization variables
27862 for @code{mail-mode}, @code{rnews-reply-mode} and @code{gnus-msg} are
27863 now obsolete.
27864
27865 @item
27866 Gnus is now able to generate @dfn{sparse} threads---threads where
27867 missing articles are represented by empty nodes (@pxref{Customizing
27868 Threading}).
27869
27870 @lisp
27871 (setq gnus-build-sparse-threads 'some)
27872 @end lisp
27873
27874 @item
27875 Outgoing articles are stored on a special archive server
27876 (@pxref{Archived Messages}).
27877
27878 @item
27879 Partial thread regeneration now happens when articles are
27880 referred.
27881
27882 @item
27883 Gnus can make use of GroupLens predictions.
27884
27885 @item
27886 Picons (personal icons) can be displayed under XEmacs (@pxref{Picons}).
27887
27888 @item
27889 A @code{trn}-like tree buffer can be displayed (@pxref{Tree Display}).
27890
27891 @lisp
27892 (setq gnus-use-trees t)
27893 @end lisp
27894
27895 @item
27896 An @code{nn}-like pick-and-read minor mode is available for the summary
27897 buffers (@pxref{Pick and Read}).
27898
27899 @lisp
27900 (add-hook 'gnus-summary-mode-hook 'gnus-pick-mode)
27901 @end lisp
27902
27903 @item
27904 In binary groups you can use a special binary minor mode (@pxref{Binary
27905 Groups}).
27906
27907 @item
27908 Groups can be grouped in a folding topic hierarchy (@pxref{Group
27909 Topics}).
27910
27911 @lisp
27912 (add-hook 'gnus-group-mode-hook 'gnus-topic-mode)
27913 @end lisp
27914
27915 @item
27916 Gnus can re-send and bounce mail (@pxref{Summary Mail Commands}).
27917
27918 @item
27919 Groups can now have a score, and bubbling based on entry frequency
27920 is possible (@pxref{Group Score}).
27921
27922 @lisp
27923 (add-hook 'gnus-summary-exit-hook 'gnus-summary-bubble-group)
27924 @end lisp
27925
27926 @item
27927 Groups can be process-marked, and commands can be performed on
27928 groups of groups (@pxref{Marking Groups}).
27929
27930 @item
27931 Caching is possible in virtual groups.
27932
27933 @item
27934 @code{nndoc} now understands all kinds of digests, mail boxes, rnews
27935 news batches, ClariNet briefs collections, and just about everything
27936 else (@pxref{Document Groups}).
27937
27938 @item
27939 Gnus has a new back end (@code{nnsoup}) to create/read SOUP packets
27940 (@pxref{SOUP}).
27941
27942 @item
27943 The Gnus cache is much faster.
27944
27945 @item
27946 Groups can be sorted according to many criteria (@pxref{Sorting
27947 Groups}).
27948
27949 @item
27950 New group parameters have been introduced to set list-addresses and
27951 expiry times (@pxref{Group Parameters}).
27952
27953 @item
27954 All formatting specs allow specifying faces to be used
27955 (@pxref{Formatting Fonts}).
27956
27957 @item
27958 There are several more commands for setting/removing/acting on process
27959 marked articles on the @kbd{M P} submap (@pxref{Setting Process Marks}).
27960
27961 @item
27962 The summary buffer can be limited to show parts of the available
27963 articles based on a wide range of criteria.  These commands have been
27964 bound to keys on the @kbd{/} submap (@pxref{Limiting}).
27965
27966 @item
27967 Articles can be made persistent with the @kbd{*} command
27968 (@pxref{Persistent Articles}).
27969
27970 @item
27971 All functions for hiding article elements are now toggles.
27972
27973 @item
27974 Article headers can be buttonized (@pxref{Article Washing}).
27975
27976 @item
27977 All mail back ends support fetching articles by @code{Message-ID}.
27978
27979 @item
27980 Duplicate mail can now be treated properly (@pxref{Duplicates}).
27981
27982 @item
27983 All summary mode commands are available directly from the article
27984 buffer (@pxref{Article Keymap}).
27985
27986 @item
27987 Frames can be part of @code{gnus-buffer-configuration} (@pxref{Window
27988 Layout}).
27989
27990 @item
27991 Mail can be re-scanned by a daemonic process (@pxref{Daemons}).
27992 @iftex
27993 @iflatex
27994 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fseptember,height=5cm}]{\epsfig{figure=ps/fseptember,height=5cm}}
27995 @end iflatex
27996 @end iftex
27997
27998 @item
27999 Gnus can make use of NoCeM files to weed out spam (@pxref{NoCeM}).
28000
28001 @lisp
28002 (setq gnus-use-nocem t)
28003 @end lisp
28004
28005 @item
28006 Groups can be made permanently visible (@pxref{Listing Groups}).
28007
28008 @lisp
28009 (setq gnus-permanently-visible-groups "^nnml:")
28010 @end lisp
28011
28012 @item
28013 Many new hooks have been introduced to make customizing easier.
28014
28015 @item
28016 Gnus respects the @code{Mail-Copies-To} header.
28017
28018 @item
28019 Threads can be gathered by looking at the @code{References} header
28020 (@pxref{Customizing Threading}).
28021
28022 @lisp
28023 (setq gnus-summary-thread-gathering-function
28024       'gnus-gather-threads-by-references)
28025 @end lisp
28026
28027 @item
28028 Read articles can be stored in a special backlog buffer to avoid
28029 refetching (@pxref{Article Backlog}).
28030
28031 @lisp
28032 (setq gnus-keep-backlog 50)
28033 @end lisp
28034
28035 @item
28036 A clean copy of the current article is always stored in a separate
28037 buffer to allow easier treatment.
28038
28039 @item
28040 Gnus can suggest where to save articles (@pxref{Saving Articles}).
28041
28042 @item
28043 Gnus doesn't have to do as much prompting when saving (@pxref{Saving
28044 Articles}).
28045
28046 @lisp
28047 (setq gnus-prompt-before-saving t)
28048 @end lisp
28049
28050 @item
28051 @code{gnus-uu} can view decoded files asynchronously while fetching
28052 articles (@pxref{Other Decode Variables}).
28053
28054 @lisp
28055 (setq gnus-uu-grabbed-file-functions 'gnus-uu-grab-view)
28056 @end lisp
28057
28058 @item
28059 Filling in the article buffer now works properly on cited text
28060 (@pxref{Article Washing}).
28061
28062 @item
28063 Hiding cited text adds buttons to toggle hiding, and how much
28064 cited text to hide is now customizable (@pxref{Article Hiding}).
28065
28066 @lisp
28067 (setq gnus-cited-lines-visible 2)
28068 @end lisp
28069
28070 @item
28071 Boring headers can be hidden (@pxref{Article Hiding}).
28072
28073 @item
28074 Default scoring values can now be set from the menu bar.
28075
28076 @item
28077 Further syntax checking of outgoing articles have been added.
28078
28079 @end itemize
28080
28081
28082 @node Red Gnus
28083 @subsubsection Red Gnus
28084
28085 New features in Gnus 5.4/5.5:
28086
28087 @iftex
28088 @iflatex
28089 \gnusfig{-5.5cm}{-4cm}{\epsfig{figure=ps/red,height=20cm}}
28090 @end iflatex
28091 @end iftex
28092
28093 @itemize @bullet
28094
28095 @item
28096 @file{nntp.el} has been totally rewritten in an asynchronous fashion.
28097
28098 @item
28099 Article prefetching functionality has been moved up into
28100 Gnus (@pxref{Asynchronous Fetching}).
28101
28102 @item
28103 Scoring can now be performed with logical operators like @code{and},
28104 @code{or}, @code{not}, and parent redirection (@pxref{Advanced
28105 Scoring}).
28106
28107 @item
28108 Article washing status can be displayed in the
28109 article mode line (@pxref{Misc Article}).
28110
28111 @item
28112 @file{gnus.el} has been split into many smaller files.
28113
28114 @item
28115 Suppression of duplicate articles based on Message-ID can be done
28116 (@pxref{Duplicate Suppression}).
28117
28118 @lisp
28119 (setq gnus-suppress-duplicates t)
28120 @end lisp
28121
28122 @item
28123 New variables for specifying what score and adapt files are to be
28124 considered home score and adapt files (@pxref{Home Score File}) have
28125 been added.
28126
28127 @item
28128 @code{nndoc} was rewritten to be easily extendable (@pxref{Document
28129 Server Internals}).
28130
28131 @item
28132 Groups can inherit group parameters from parent topics (@pxref{Topic
28133 Parameters}).
28134
28135 @item
28136 Article editing has been revamped and is now actually usable.
28137
28138 @item
28139 Signatures can be recognized in more intelligent fashions
28140 (@pxref{Article Signature}).
28141
28142 @item
28143 Summary pick mode has been made to look more @code{nn}-like.  Line
28144 numbers are displayed and the @kbd{.} command can be used to pick
28145 articles (@code{Pick and Read}).
28146
28147 @item
28148 Commands for moving the @file{.newsrc.eld} from one server to
28149 another have been added (@pxref{Changing Servers}).
28150
28151 @item
28152 There's a way now to specify that ``uninteresting'' fields be suppressed
28153 when generating lines in buffers (@pxref{Advanced Formatting}).
28154
28155 @item
28156 Several commands in the group buffer can be undone with @kbd{C-M-_}
28157 (@pxref{Undo}).
28158
28159 @item
28160 Scoring can be done on words using the new score type @code{w}
28161 (@pxref{Score File Format}).
28162
28163 @item
28164 Adaptive scoring can be done on a Subject word-by-word basis
28165 (@pxref{Adaptive Scoring}).
28166
28167 @lisp
28168 (setq gnus-use-adaptive-scoring '(word))
28169 @end lisp
28170
28171 @item
28172 Scores can be decayed (@pxref{Score Decays}).
28173
28174 @lisp
28175 (setq gnus-decay-scores t)
28176 @end lisp
28177
28178 @item
28179 Scoring can be performed using a regexp on the Date header.  The Date is
28180 normalized to compact ISO 8601 format first (@pxref{Score File Format}).
28181
28182 @item
28183 A new command has been added to remove all data on articles from
28184 the native server (@pxref{Changing Servers}).
28185
28186 @item
28187 A new command for reading collections of documents
28188 (@code{nndoc} with @code{nnvirtual} on top) has been added---@kbd{C-M-d}
28189 (@pxref{Really Various Summary Commands}).
28190
28191 @item
28192 Process mark sets can be pushed and popped (@pxref{Setting Process
28193 Marks}).
28194
28195 @item
28196 A new mail-to-news back end makes it possible to post even when the @acronym{NNTP}
28197 server doesn't allow posting (@pxref{Mail-To-News Gateways}).
28198
28199 @item
28200 A new back end for reading searches from Web search engines
28201 (@dfn{DejaNews}, @dfn{Alta Vista}, @dfn{InReference}) has been added
28202 (@pxref{Web Searches}).
28203
28204 @item
28205 Groups inside topics can now be sorted using the standard sorting
28206 functions, and each topic can be sorted independently (@pxref{Topic
28207 Sorting}).
28208
28209 @item
28210 Subsets of the groups can be sorted independently (@code{Sorting
28211 Groups}).
28212
28213 @item
28214 Cached articles can be pulled into the groups (@pxref{Summary Generation
28215 Commands}).
28216 @iftex
28217 @iflatex
28218 \marginpar[\mbox{}\hfill\epsfig{figure=ps/fred,width=3cm}]{\epsfig{figure=ps/fred,width=3cm}}
28219 @end iflatex
28220 @end iftex
28221
28222 @item
28223 Score files are now applied in a more reliable order (@pxref{Score
28224 Variables}).
28225
28226 @item
28227 Reports on where mail messages end up can be generated (@pxref{Splitting
28228 Mail}).
28229
28230 @item
28231 More hooks and functions have been added to remove junk from incoming
28232 mail before saving the mail (@pxref{Washing Mail}).
28233
28234 @item
28235 Emphasized text can be properly fontisized:
28236
28237 @end itemize
28238
28239
28240 @node Quassia Gnus
28241 @subsubsection Quassia Gnus
28242
28243 New features in Gnus 5.6:
28244
28245 @itemize @bullet
28246
28247 @item
28248 New functionality for using Gnus as an offline newsreader has been
28249 added.  A plethora of new commands and modes have been added.
28250 @xref{Gnus Unplugged}, for the full story.
28251
28252 @item
28253 The @code{nndraft} back end has returned, but works differently than
28254 before.  All Message buffers are now also articles in the @code{nndraft}
28255 group, which is created automatically.
28256
28257 @item
28258 @code{gnus-alter-header-function} can now be used to alter header
28259 values.
28260
28261 @item
28262 @code{gnus-summary-goto-article} now accept Message-ID's.
28263
28264 @item
28265 A new Message command for deleting text in the body of a message
28266 outside the region: @kbd{C-c C-v}.
28267
28268 @item
28269 You can now post to component group in @code{nnvirtual} groups with
28270 @kbd{C-u C-c C-c}.
28271
28272 @item
28273  @code{nntp-rlogin-program}---new variable to ease customization.
28274
28275 @item
28276 @code{C-u C-c C-c} in @code{gnus-article-edit-mode} will now inhibit
28277 re-highlighting of the article buffer.
28278
28279 @item
28280 New element in @code{gnus-boring-article-headers}---@code{long-to}.
28281
28282 @item
28283 @kbd{M-i} symbolic prefix command.  @xref{Symbolic Prefixes}, for
28284 details.
28285
28286 @item
28287 @kbd{L} and @kbd{I} in the summary buffer now take the symbolic prefix
28288 @kbd{a} to add the score rule to the @file{all.SCORE} file.
28289
28290 @item
28291 @code{gnus-simplify-subject-functions} variable to allow greater
28292 control over simplification.
28293
28294 @item
28295 @kbd{A T}---new command for fetching the current thread.
28296
28297 @item
28298 @kbd{/ T}---new command for including the current thread in the
28299 limit.
28300
28301 @item
28302 @kbd{M-RET} is a new Message command for breaking cited text.
28303
28304 @item
28305 @samp{\\1}-expressions are now valid in @code{nnmail-split-methods}.
28306
28307 @item
28308 The @code{custom-face-lookup} function has been removed.
28309 If you used this function in your initialization files, you must
28310 rewrite them to use @code{face-spec-set} instead.
28311
28312 @item
28313 Canceling now uses the current select method.  Symbolic prefix
28314 @kbd{a} forces normal posting method.
28315
28316 @item
28317 New command to translate M******** sm*rtq**t*s into proper
28318 text---@kbd{W d}.
28319
28320 @item
28321 For easier debugging of @code{nntp}, you can set
28322 @code{nntp-record-commands} to a non-@code{nil} value.
28323
28324 @item
28325 @code{nntp} now uses @file{~/.authinfo}, a @file{.netrc}-like file, for
28326 controlling where and how to send @sc{authinfo} to @acronym{NNTP} servers.
28327
28328 @item
28329 A command for editing group parameters from the summary buffer
28330 has been added.
28331
28332 @item
28333 A history of where mails have been split is available.
28334
28335 @item
28336 A new article date command has been added---@code{article-date-iso8601}.
28337
28338 @item
28339 Subjects can be simplified when threading by setting
28340 @code{gnus-score-thread-simplify}.
28341
28342 @item
28343 A new function for citing in Message has been
28344 added---@code{message-cite-original-without-signature}.
28345
28346 @item
28347 @code{article-strip-all-blank-lines}---new article command.
28348
28349 @item
28350 A new Message command to kill to the end of the article has
28351 been added.
28352
28353 @item
28354 A minimum adaptive score can be specified by using the
28355 @code{gnus-adaptive-word-minimum} variable.
28356
28357 @item
28358 The ``lapsed date'' article header can be kept continually
28359 updated by the @code{gnus-start-date-timer} command.
28360
28361 @item
28362 Web listserv archives can be read with the @code{nnlistserv} back end.
28363
28364 @item
28365 Old dejanews archives can now be read by @code{nnweb}.
28366
28367 @end itemize
28368
28369 @node Pterodactyl Gnus
28370 @subsubsection Pterodactyl Gnus
28371
28372 New features in Gnus 5.8:
28373
28374 @itemize @bullet
28375
28376 @item
28377 The mail-fetching functions have changed.  See the manual for the
28378 many details.  In particular, all procmail fetching variables are gone.
28379
28380 If you used procmail like in
28381
28382 @lisp
28383 (setq nnmail-use-procmail t)
28384 (setq nnmail-spool-file 'procmail)
28385 (setq nnmail-procmail-directory "~/mail/incoming/")
28386 (setq nnmail-procmail-suffix "\\.in")
28387 @end lisp
28388
28389 this now has changed to
28390
28391 @lisp
28392 (setq mail-sources
28393       '((directory :path "~/mail/incoming/"
28394                    :suffix ".in")))
28395 @end lisp
28396
28397 @xref{Mail Source Specifiers}.
28398
28399 @item
28400 Gnus is now a @acronym{MIME}-capable reader.  This affects many parts of
28401 Gnus, and adds a slew of new commands.  See the manual for details.
28402
28403 @item
28404 Gnus has also been multilingualized.  This also affects too
28405 many parts of Gnus to summarize here, and adds many new variables.
28406
28407 @item
28408 @code{gnus-auto-select-first} can now be a function to be
28409 called to position point.
28410
28411 @item
28412 The user can now decide which extra headers should be included in
28413 summary buffers and @acronym{NOV} files.
28414
28415 @item
28416 @code{gnus-article-display-hook} has been removed.  Instead, a number
28417 of variables starting with @code{gnus-treat-} have been added.
28418
28419 @item
28420 The Gnus posting styles have been redone again and now works in a
28421 subtly different manner.
28422
28423 @item
28424 New web-based back ends have been added: @code{nnslashdot},
28425 @code{nnwarchive} and @code{nnultimate}.  nnweb has been revamped,
28426 again, to keep up with ever-changing layouts.
28427
28428 @item
28429 Gnus can now read @acronym{IMAP} mail via @code{nnimap}.
28430
28431 @end itemize
28432
28433 @node Oort Gnus
28434 @subsubsection Oort Gnus
28435 @cindex Oort Gnus
28436
28437 New features in Gnus 5.10:
28438
28439 @itemize @bullet
28440
28441 @item Installation changes
28442 @c ***********************
28443
28444 @itemize @bullet
28445 @item
28446 Upgrading from previous (stable) version if you have used Oort.
28447
28448 If you have tried Oort (the unstable Gnus branch leading to this
28449 release) but went back to a stable version, be careful when upgrading to
28450 this version.  In particular, you will probably want to remove all
28451 @file{.marks} (nnml) and @file{.mrk} (nnfolder) files, so that flags are
28452 read from your @file{.newsrc.eld} instead of from the
28453 @file{.marks}/@file{.mrk} file where this release store flags.  See a
28454 later entry for more information about marks.  Note that downgrading
28455 isn't save in general.
28456
28457 @item
28458 Lisp files are now installed in @file{.../site-lisp/gnus/} by default.
28459 It defaulted to @file{.../site-lisp/} formerly.  In addition to this,
28460 the new installer issues a warning if other Gnus installations which
28461 will shadow the latest one are detected.  You can then remove those
28462 shadows manually or remove them using @code{make
28463 remove-installed-shadows}.
28464
28465 @item
28466 New @file{make.bat} for compiling and installing Gnus under MS Windows
28467
28468 Use @file{make.bat} if you want to install Gnus under MS Windows, the
28469 first argument to the batch-program should be the directory where
28470 @file{xemacs.exe} respectively @file{emacs.exe} is located, if you want
28471 to install Gnus after compiling it, give @file{make.bat} @code{/copy} as
28472 the second parameter.
28473
28474 @file{make.bat} has been rewritten from scratch, it now features
28475 automatic recognition of XEmacs and GNU Emacs, generates
28476 @file{gnus-load.el}, checks if errors occur while compilation and
28477 generation of info files and reports them at the end of the build
28478 process.  It now uses @code{makeinfo} if it is available and falls
28479 back to @file{infohack.el} otherwise.  @file{make.bat} should now
28480 install all files which are necessary to run Gnus and be generally a
28481 complete replacement for the @code{configure; make; make install}
28482 cycle used under Unix systems.
28483
28484 The new @file{make.bat} makes @file{make-x.bat} and @file{xemacs.mak}
28485 superfluous, so they have been removed.
28486
28487 @item
28488 @file{~/News/overview/} not used.
28489
28490 As a result of the following change, the @file{~/News/overview/}
28491 directory is not used any more.  You can safely delete the entire
28492 hierarchy.
28493
28494 @c FIXME: `gnus-load' is mentioned in README, which is not included in
28495 @c the repository.  We should find a better place for this item.
28496 @item
28497 @code{(require 'gnus-load)}
28498
28499 If you use a stand-alone Gnus distribution, you'd better add
28500 @code{(require 'gnus-load)} into your @file{~/.emacs} after adding the Gnus
28501 lisp directory into load-path.
28502
28503 File @file{gnus-load.el} contains autoload commands, functions and variables,
28504 some of which may not be included in distributions of Emacsen.
28505
28506 @end itemize
28507
28508 @item New packages and libraries within Gnus
28509 @c *****************************************
28510
28511 @itemize @bullet
28512
28513 @item
28514 The revised Gnus @acronym{FAQ} is included in the manual,
28515 @xref{Frequently Asked Questions}.
28516
28517 @item
28518 @acronym{TLS} wrapper shipped with Gnus
28519
28520 @acronym{TLS}/@acronym{SSL} is now supported in @acronym{IMAP} and
28521 @acronym{NNTP} via @file{tls.el} and GNUTLS.  The old
28522 @acronym{TLS}/@acronym{SSL} support via (external third party)
28523 @file{ssl.el} and OpenSSL still works.
28524
28525 @item
28526 Improved anti-spam features.
28527
28528 Gnus is now able to take out spam from your mail and news streams
28529 using a wide variety of programs and filter rules.  Among the supported
28530 methods are RBL blocklists, bogofilter and white/blacklists.  Hooks
28531 for easy use of external packages such as SpamAssassin and Hashcash
28532 are also new.  @ref{Thwarting Email Spam} and @ref{Spam Package}.
28533 @c FIXME: @xref{Spam Package}?.  Should this be under Misc?
28534
28535 @item
28536 Gnus supports server-side mail filtering using Sieve.
28537
28538 Sieve rules can be added as Group Parameters for groups, and the
28539 complete Sieve script is generated using @kbd{D g} from the Group
28540 buffer, and then uploaded to the server using @kbd{C-c C-l} in the
28541 generated Sieve buffer.  @xref{Sieve Commands}, and the new Sieve
28542 manual @ref{Top, , Top, sieve, Emacs Sieve}.
28543
28544 @end itemize
28545
28546 @item Changes in group mode
28547 @c ************************
28548
28549 @itemize @bullet
28550
28551 @item
28552 @code{gnus-group-read-ephemeral-group} can be called interactively,
28553 using @kbd{G M}.
28554
28555 @item
28556 Retrieval of charters and control messages
28557
28558 There are new commands for fetching newsgroup charters (@kbd{H c}) and
28559 control messages (@kbd{H C}).
28560
28561 @item
28562 The new variable @code{gnus-parameters} can be used to set group parameters.
28563
28564 Earlier this was done only via @kbd{G p} (or @kbd{G c}), which stored
28565 the parameters in @file{~/.newsrc.eld}, but via this variable you can
28566 enjoy the powers of customize, and simplified backups since you set the
28567 variable in @file{~/.gnus.el} instead of @file{~/.newsrc.eld}.  The
28568 variable maps regular expressions matching group names to group
28569 parameters, a'la:
28570 @lisp
28571 (setq gnus-parameters
28572       '(("mail\\..*"
28573          (gnus-show-threads nil)
28574          (gnus-use-scoring nil))
28575         ("^nnimap:\\(foo.bar\\)$"
28576          (to-group . "\\1"))))
28577 @end lisp
28578
28579 @item
28580 Unread count correct in nnimap groups.
28581
28582 The estimated number of unread articles in the group buffer should now
28583 be correct for nnimap groups.  This is achieved by calling
28584 @code{nnimap-fixup-unread-after-getting-new-news} from the
28585 @code{gnus-setup-news-hook} (called on startup) and
28586 @code{gnus-after-getting-new-news-hook}. (called after getting new
28587 mail).  If you have modified those variables from the default, you may
28588 want to add @code{nnimap-fixup-unread-after-getting-new-news} again.  If
28589 you were happy with the estimate and want to save some (minimal) time
28590 when getting new mail, remove the function.
28591
28592 @item
28593 Group names are treated as UTF-8 by default.
28594
28595 This is supposedly what USEFOR wanted to migrate to.  See
28596 @code{gnus-group-name-charset-group-alist} and
28597 @code{gnus-group-name-charset-method-alist} for customization.
28598
28599 @item
28600 @code{gnus-group-charset-alist} and
28601 @code{gnus-group-ignored-charsets-alist}.
28602
28603 The regexps in these variables are compared with full group names
28604 instead of real group names in 5.8.  Users who customize these
28605 variables should change those regexps accordingly.  For example:
28606 @lisp
28607 ("^han\\>" euc-kr) -> ("\\(^\\|:\\)han\\>" euc-kr)
28608 @end lisp
28609
28610 @item
28611 Old intermediate incoming mail files (@file{Incoming*}) are deleted
28612 after a couple of days, not immediately.  @xref{Mail Source
28613 Customization}.  (New in Gnus 5.10.10 / Emacs 22.2)
28614
28615 @end itemize
28616
28617 @item Changes in summary and article mode
28618 @c **************************************
28619
28620 @itemize @bullet
28621
28622 @item
28623 @kbd{F} (@code{gnus-article-followup-with-original}) and @kbd{R}
28624 (@code{gnus-article-reply-with-original}) only yank the text in the
28625 region if the region is active.
28626
28627 @item
28628 In draft groups, @kbd{e} is now bound to @code{gnus-draft-edit-message}.
28629 Use @kbd{B w} for @code{gnus-summary-edit-article} instead.
28630
28631 @item
28632 Article Buttons
28633
28634 More buttons for URLs, mail addresses, Message-IDs, Info links, man
28635 pages and Emacs or Gnus related references.  @xref{Article Buttons}.  The
28636 variables @code{gnus-button-@var{*}-level} can be used to control the
28637 appearance of all article buttons.  @xref{Article Button Levels}.
28638
28639 @item
28640 Single-part yenc encoded attachments can be decoded.
28641
28642 @item
28643 Picons
28644
28645 The picons code has been reimplemented to work in GNU Emacs---some of
28646 the previous options have been removed or renamed.
28647
28648 Picons are small ``personal icons'' representing users, domain and
28649 newsgroups, which can be displayed in the Article buffer.
28650 @xref{Picons}.
28651
28652 @item
28653 If the new option @code{gnus-treat-body-boundary} is non-@code{nil}, a
28654 boundary line is drawn at the end of the headers.
28655
28656 @item
28657 Signed article headers (X-PGP-Sig) can be verified with @kbd{W p}.
28658
28659 @item
28660 The Summary Buffer uses an arrow in the fringe to indicate the current
28661 article.  Use @code{(setq gnus-summary-display-arrow nil)} to disable it.
28662
28663 @item
28664 Warn about email replies to news
28665
28666 Do you often find yourself replying to news by email by mistake?  Then
28667 the new option @code{gnus-confirm-mail-reply-to-news} is just the thing for
28668 you.
28669
28670 @item
28671 If the new option @code{gnus-summary-display-while-building} is
28672 non-@code{nil}, the summary buffer is shown and updated as it's being
28673 built.
28674
28675 @item
28676 The new @code{recent} mark @samp{.} indicates newly arrived messages (as
28677 opposed to old but unread messages).
28678
28679 @item
28680 Gnus supports RFC 2369 mailing list headers, and adds a number of
28681 related commands in mailing list groups.  @xref{Mailing List}.
28682
28683 @item
28684 The Date header can be displayed in a format that can be read aloud
28685 in English.  @xref{Article Date}.
28686
28687 @item
28688 diffs are automatically highlighted in groups matching
28689 @code{mm-uu-diff-groups-regexp}
28690
28691 @item
28692 Better handling of Microsoft citation styles
28693
28694 Gnus now tries to recognize the mangled header block that some Microsoft
28695 mailers use to indicate that the rest of the message is a citation, even
28696 though it is not quoted in any way.  The variable
28697 @code{gnus-cite-unsightly-citation-regexp} matches the start of these
28698 citations.
28699
28700 The new command @kbd{W Y f}
28701 (@code{gnus-article-outlook-deuglify-article}) allows deuglifying broken
28702 Outlook (Express) articles.
28703
28704 @item
28705 @code{gnus-article-skip-boring}
28706
28707 If you set @code{gnus-article-skip-boring} to @code{t}, then Gnus will
28708 not scroll down to show you a page that contains only boring text,
28709 which by default means cited text and signature.  You can customize
28710 what is skippable using @code{gnus-article-boring-faces}.
28711
28712 This feature is especially useful if you read many articles that
28713 consist of a little new content at the top with a long, untrimmed
28714 message cited below.
28715
28716 @item
28717 Smileys (@samp{:-)}, @samp{;-)} etc) are now displayed graphically in
28718 Emacs too.
28719
28720 Put @code{(setq gnus-treat-display-smileys nil)} in @file{~/.gnus.el} to
28721 disable it.
28722
28723 @item
28724 Face headers handling.  @xref{Face}.
28725
28726 @item
28727 In the summary buffer, the new command @kbd{/ N} inserts new messages
28728 and @kbd{/ o} inserts old messages.
28729
28730 @item
28731 Gnus decodes morse encoded messages if you press @kbd{W m}.
28732
28733 @item
28734 @code{gnus-summary-line-format}
28735
28736 The default value changed to @samp{%U%R%z%I%(%[%4L: %-23,23f%]%)
28737 %s\n}.  Moreover @code{gnus-extra-headers},
28738 @code{nnmail-extra-headers} and @code{gnus-ignored-from-addresses}
28739 changed their default so that the users name will be replaced by the
28740 recipient's name or the group name posting to for @acronym{NNTP}
28741 groups.
28742
28743 @item
28744 Deleting of attachments.
28745
28746 The command @code{gnus-mime-save-part-and-strip} (bound to @kbd{C-o}
28747 on @acronym{MIME} buttons) saves a part and replaces the part with an
28748 external one.  @code{gnus-mime-delete-part} (bound to @kbd{d} on
28749 @acronym{MIME} buttons) removes a part.  It works only on back ends
28750 that support editing.
28751
28752 @item
28753 @code{gnus-default-charset}
28754
28755 The default value is determined from the
28756 @code{current-language-environment} variable, instead of
28757 @code{iso-8859-1}.  Also the @samp{.*} item in
28758 @code{gnus-group-charset-alist} is removed.
28759
28760 @item
28761 Printing capabilities are enhanced.
28762
28763 Gnus supports Muttprint natively with @kbd{O P} from the Summary and
28764 Article buffers.  Also, each individual @acronym{MIME} part can be
28765 printed using @kbd{p} on the @acronym{MIME} button.
28766
28767 @item
28768 Extended format specs.
28769
28770 Format spec @samp{%&user-date;} is added into
28771 @code{gnus-summary-line-format-alist}.  Also, user defined extended
28772 format specs are supported.  The extended format specs look like
28773 @samp{%u&foo;}, which invokes function
28774 @code{gnus-user-format-function-@var{foo}}.  Because @samp{&} is used as the
28775 escape character, old user defined format @samp{%u&} is no longer supported.
28776
28777 @item
28778 @kbd{/ *} (@code{gnus-summary-limit-include-cached}) is rewritten.
28779 @c FIXME: Was this a user-visible change?
28780
28781 It was aliased to @kbd{Y c}
28782 (@code{gnus-summary-insert-cached-articles}).  The new function filters
28783 out other articles.
28784
28785 @item
28786 Some limiting commands accept a @kbd{C-u} prefix to negate the match.
28787
28788 If @kbd{C-u} is used on subject, author or extra headers, i.e., @kbd{/
28789 s}, @kbd{/ a}, and @kbd{/ x}
28790 (@code{gnus-summary-limit-to-@{subject,author,extra@}}) respectively, the
28791 result will be to display all articles that do not match the expression.
28792
28793 @item
28794 Gnus inlines external parts (message/external).
28795
28796 @end itemize
28797
28798 @item Changes in Message mode and related Gnus features
28799 @c ****************************************************
28800
28801 @itemize @bullet
28802
28803 @item
28804 Delayed articles
28805
28806 You can delay the sending of a message with @kbd{C-c C-j} in the Message
28807 buffer.  The messages are delivered at specified time.  This is useful
28808 for sending yourself reminders.  @xref{Delayed Articles}.
28809
28810 @item
28811 If the new option @code{nnml-use-compressed-files} is non-@code{nil},
28812 the nnml back end allows compressed message files.
28813
28814 @item
28815 The new option @code{gnus-gcc-mark-as-read} automatically marks
28816 Gcc articles as read.
28817
28818 @item
28819 Externalizing of attachments
28820
28821 If @code{gnus-gcc-externalize-attachments} or
28822 @code{message-fcc-externalize-attachments} is non-@code{nil}, attach
28823 local files as external parts.
28824
28825 @item
28826 The envelope sender address can be customized when using Sendmail.
28827 @xref{Mail Variables, Mail Variables,, message, Message Manual}.
28828
28829 @item
28830 Gnus no longer generate the Sender: header automatically.
28831
28832 Earlier it was generated when the user configurable email address was
28833 different from the Gnus guessed default user address.  As the guessing
28834 algorithm is rarely correct these days, and (more controversially) the
28835 only use of the Sender: header was to check if you are entitled to
28836 cancel/supersede news (which is now solved by Cancel Locks instead,
28837 see another entry), generation of the header has been disabled by
28838 default.  See the variables @code{message-required-headers},
28839 @code{message-required-news-headers}, and
28840 @code{message-required-mail-headers}.
28841
28842 @item
28843 Features from third party @file{message-utils.el} added to @file{message.el}.
28844
28845 Message now asks if you wish to remove @samp{(was: <old subject>)} from
28846 subject lines (see @code{message-subject-trailing-was-query}).  @kbd{C-c
28847 M-m} and @kbd{C-c M-f} inserts markers indicating included text.
28848 @kbd{C-c C-f a} adds a X-No-Archive: header.  @kbd{C-c C-f x} inserts
28849 appropriate headers and a note in the body for cross-postings and
28850 followups (see the variables @code{message-cross-post-@var{*}}).
28851
28852 @item
28853 References and X-Draft-From headers are no longer generated when you
28854 start composing messages and @code{message-generate-headers-first} is
28855 @code{nil}.
28856
28857 @item
28858 Easy inclusion of X-Faces headers.  @xref{X-Face}.
28859
28860 @item
28861 Group Carbon Copy (GCC) quoting
28862
28863 To support groups that contains SPC and other weird characters, groups
28864 are quoted before they are placed in the Gcc: header.  This means
28865 variables such as @code{gnus-message-archive-group} should no longer
28866 contain quote characters to make groups containing SPC work.  Also, if
28867 you are using the string @samp{nnml:foo, nnml:bar} (indicating Gcc
28868 into two groups) you must change it to return the list
28869 @code{("nnml:foo" "nnml:bar")}, otherwise the Gcc: line will be quoted
28870 incorrectly.  Note that returning the string @samp{nnml:foo, nnml:bar}
28871 was incorrect earlier, it just didn't generate any problems since it
28872 was inserted directly.
28873
28874 @item
28875 @code{message-insinuate-rmail}
28876
28877 @c FIXME should that not be 'message-user-agent?
28878 Adding @code{(message-insinuate-rmail)} and @code{(setq
28879 mail-user-agent 'gnus-user-agent)} in @file{.emacs} convinces Rmail to
28880 compose, reply and forward messages in message-mode, where you can
28881 enjoy the power of @acronym{MML}.
28882
28883 @item
28884 @code{message-minibuffer-local-map}
28885
28886 The line below enables BBDB in resending a message:
28887 @lisp
28888 (define-key message-minibuffer-local-map [(tab)]
28889   'bbdb-complete-name)
28890 @end lisp
28891
28892 @item
28893 @code{gnus-posting-styles}
28894
28895 Add a new format of match like
28896 @lisp
28897 ((header "to" "larsi.*org")
28898  (Organization "Somewhere, Inc."))
28899 @end lisp
28900 The old format like the lines below is obsolete, but still accepted.
28901 @lisp
28902 (header "to" "larsi.*org"
28903         (Organization "Somewhere, Inc."))
28904 @end lisp
28905
28906 @item
28907 @code{message-ignored-news-headers} and @code{message-ignored-mail-headers}
28908
28909 @samp{X-Draft-From} and @samp{X-Gnus-Agent-Meta-Information} have been
28910 added into these two variables.  If you customized those, perhaps you
28911 need add those two headers too.
28912
28913 @item
28914 Gnus supports the ``format=flowed'' (RFC 2646) parameter.  On
28915 composing messages, it is enabled by @code{use-hard-newlines}.
28916 Decoding format=flowed was present but not documented in earlier
28917 versions.
28918
28919 @item
28920 The option @code{mm-fill-flowed} can be used to disable treatment of
28921 ``format=flowed'' messages.  Also, flowed text is disabled when sending
28922 inline PGP signed messages.  @xref{Flowed text, , Flowed text,
28923 emacs-mime, The Emacs MIME Manual}.  (New in Gnus 5.10.7)
28924 @c This entry is also present in the node "No Gnus".
28925
28926 @item
28927 Gnus supports the generation of RFC 2298 Disposition Notification requests.
28928
28929 This is invoked with the @kbd{C-c M-n} key binding from message mode.
28930
28931 @item
28932 Message supports the Importance: (RFC 2156) header.
28933
28934 In the message buffer, @kbd{C-c C-f C-i} or @kbd{C-c C-u} cycles through
28935 the valid values.
28936
28937 @item
28938 Gnus supports Cancel Locks in News.
28939
28940 This means a header @samp{Cancel-Lock} is inserted in news posting.  It is
28941 used to determine if you wrote an article or not (for canceling and
28942 superseding).  Gnus generates a random password string the first time
28943 you post a message, and saves it in your @file{~/.emacs} using the Custom
28944 system.  While the variable is called @code{canlock-password}, it is not
28945 security sensitive data.  Publishing your canlock string on the web
28946 will not allow anyone to be able to anything she could not already do.
28947 The behavior can be changed by customizing @code{message-insert-canlock}.
28948
28949 @item
28950 Gnus supports @acronym{PGP} (RFC 1991/2440), @acronym{PGP/MIME} (RFC
28951 2015/3156) and @acronym{S/MIME} (RFC 2630-2633).
28952
28953 It needs an external @acronym{S/MIME} and OpenPGP implementation, but no
28954 additional Lisp libraries.  This add several menu items to the
28955 Attachments menu, and @kbd{C-c RET} key bindings, when composing
28956 messages.  This also obsoletes @code{gnus-article-hide-pgp-hook}.
28957
28958 @item
28959 @acronym{MML} (Mime compose) prefix changed from @kbd{M-m} to @kbd{C-c
28960 C-m}.
28961
28962 This change was made to avoid conflict with the standard binding of
28963 @code{back-to-indentation}, which is also useful in message mode.
28964
28965 @item
28966 The default for @code{message-forward-show-mml} changed to the symbol
28967 @code{best}.
28968
28969 The behavior for the @code{best} value is to show @acronym{MML} (i.e.,
28970 convert to @acronym{MIME}) when appropriate.  @acronym{MML} will not be
28971 used when forwarding signed or encrypted messages, as the conversion
28972 invalidate the digital signature.
28973
28974 @item
28975 If @code{auto-compression-mode} is enabled, attachments are automatically
28976 decompressed when activated.
28977 @c FIXME: Does this affect article or message mode?
28978
28979 @item
28980 Support for non-@acronym{ASCII} domain names
28981
28982 Message supports non-@acronym{ASCII} domain names in From:, To: and
28983 Cc: and will query you whether to perform encoding when you try to
28984 send a message.  The variable @code{message-use-idna} controls this.
28985 Gnus will also decode non-@acronym{ASCII} domain names in From:, To:
28986 and Cc: when you view a message.  The variable @code{gnus-use-idna}
28987 controls this.
28988
28989 @item You can now drag and drop attachments to the Message buffer.
28990 See @code{mml-dnd-protocol-alist} and @code{mml-dnd-attach-options}.
28991 @xref{MIME, ,MIME, message, Message Manual}.
28992 @c New in 5.10.9 / 5.11 (Emacs 22.1)
28993
28994 @item @code{auto-fill-mode} is enabled by default in Message mode.
28995 See @code{message-fill-column}.  @xref{Various Message Variables, ,
28996 Message Headers, message, Message Manual}.
28997 @c New in Gnus 5.10.12 / 5.11 (Emacs 22.3)
28998
28999 @end itemize
29000
29001 @item Changes in back ends
29002 @c ***********************
29003
29004 @itemize @bullet
29005 @item
29006 Gnus can display RSS newsfeeds as a newsgroup.  @xref{RSS}.
29007
29008 @item
29009 The nndoc back end now supports mailman digests and exim bounces.
29010
29011 @item
29012 Gnus supports Maildir groups.
29013
29014 Gnus includes a new back end @file{nnmaildir.el}.  @xref{Maildir}.
29015
29016 @item
29017 The nnml and nnfolder back ends store marks for each groups.
29018
29019 This makes it possible to take backup of nnml/nnfolder servers/groups
29020 separately of @file{~/.newsrc.eld}, while preserving marks.  It also
29021 makes it possible to share articles and marks between users (without
29022 sharing the @file{~/.newsrc.eld} file) within e.g. a department.  It
29023 works by storing the marks stored in @file{~/.newsrc.eld} in a per-group
29024 file @file{.marks} (for nnml) and @file{@var{groupname}.mrk} (for
29025 nnfolder, named @var{groupname}).  If the nnml/nnfolder is moved to
29026 another machine, Gnus will automatically use the @file{.marks} or
29027 @file{.mrk} file instead of the information in @file{~/.newsrc.eld}.
29028 The new server variables @code{nnml-marks-is-evil} and
29029 @code{nnfolder-marks-is-evil} can be used to disable this feature.
29030
29031 @end itemize
29032
29033 @item Appearance
29034 @c *************
29035
29036 @itemize @bullet
29037
29038 @item
29039 The menu bar item (in Group and Summary buffer) named ``Misc'' has
29040 been renamed to ``Gnus''.
29041
29042 @item
29043 The menu bar item (in Message mode) named ``@acronym{MML}'' has been
29044 renamed to ``Attachments''.  Note that this menu also contains security
29045 related stuff, like signing and encryption (@pxref{Security, Security,,
29046 message, Message Manual}).
29047
29048 @item
29049 The tool bars have been updated to use GNOME icons in Group, Summary and
29050 Message mode.  You can also customize the tool bars: @kbd{M-x
29051 customize-apropos RET -tool-bar$} should get you started.  This is a new
29052 feature in Gnus 5.10.10.  (Only for Emacs, not in XEmacs.)
29053
29054 @item The tool bar icons are now (de)activated correctly
29055 in the group buffer, see the variable @code{gnus-group-update-tool-bar}.
29056 Its default value depends on your Emacs version.  This is a new feature
29057 in Gnus 5.10.9.
29058 @end itemize
29059
29060
29061 @item Miscellaneous changes
29062 @c ************************
29063
29064 @itemize @bullet
29065
29066 @item
29067 @code{gnus-agent}
29068
29069 The Gnus Agent has seen a major updated and is now enabled by default,
29070 and all nntp and nnimap servers from @code{gnus-select-method} and
29071 @code{gnus-secondary-select-method} are agentized by default.  Earlier
29072 only the server in @code{gnus-select-method} was agentized by the
29073 default, and the agent was disabled by default.  When the agent is
29074 enabled, headers are now also retrieved from the Agent cache instead
29075 of the back ends when possible.  Earlier this only happened in the
29076 unplugged state.  You can enroll or remove servers with @kbd{J a} and
29077 @kbd{J r} in the server buffer.  Gnus will not download articles into
29078 the Agent cache, unless you instruct it to do so, though, by using
29079 @kbd{J u} or @kbd{J s} from the Group buffer.  You revert to the old
29080 behavior of having the Agent disabled with @code{(setq gnus-agent
29081 nil)}.  Note that putting @code{(gnus-agentize)} in @file{~/.gnus.el}
29082 is not needed any more.
29083
29084 @item
29085 Gnus reads the @acronym{NOV} and articles in the Agent if plugged.
29086
29087 If one reads an article while plugged, and the article already exists
29088 in the Agent, it won't get downloaded once more.  @code{(setq
29089 gnus-agent-cache nil)} reverts to the old behavior.
29090
29091 @item
29092 Dired integration
29093
29094 @code{gnus-dired-minor-mode} (see @ref{Other modes}) installs key
29095 bindings in dired buffers to send a file as an attachment, open a file
29096 using the appropriate mailcap entry, and print a file using the mailcap
29097 entry.
29098
29099 @item
29100 The format spec @code{%C} for positioning point has changed to @code{%*}.
29101
29102 @item
29103 @code{gnus-slave-unplugged}
29104
29105 A new command which starts Gnus offline in slave mode.
29106
29107 @end itemize
29108
29109 @end itemize
29110
29111 @node No Gnus
29112 @subsubsection No Gnus
29113 @cindex No Gnus
29114
29115 New features in No Gnus:
29116 @c FIXME: Gnus 5.12?
29117
29118 @include gnus-news.texi
29119
29120 @iftex
29121
29122 @page
29123 @node The Manual
29124 @section The Manual
29125 @cindex colophon
29126 @cindex manual
29127
29128 This manual was generated from a TeXinfo file and then run through
29129 either @code{texi2dvi}
29130 @iflatex
29131 or my own home-brewed TeXinfo to \LaTeX\ transformer,
29132 and then run through @code{latex} and @code{dvips}
29133 @end iflatex
29134 to get what you hold in your hands now.
29135
29136 The following conventions have been used:
29137
29138 @enumerate
29139
29140 @item
29141 This is a @samp{string}
29142
29143 @item
29144 This is a @kbd{keystroke}
29145
29146 @item
29147 This is a @file{file}
29148
29149 @item
29150 This is a @code{symbol}
29151
29152 @end enumerate
29153
29154 So if I were to say ``set @code{flargnoze} to @samp{yes}'', that would
29155 mean:
29156
29157 @lisp
29158 (setq flargnoze "yes")
29159 @end lisp
29160
29161 If I say ``set @code{flumphel} to @code{yes}'', that would mean:
29162
29163 @lisp
29164 (setq flumphel 'yes)
29165 @end lisp
29166
29167 @samp{yes} and @code{yes} are two @emph{very} different things---don't
29168 ever get them confused.
29169
29170 @iflatex
29171 @c @head
29172 Of course, everything in this manual is of vital interest, so you should
29173 read it all.  Several times.  However, if you feel like skimming the
29174 manual, look for that gnu head you should see in the margin over
29175 there---it means that what's being discussed is of more importance than
29176 the rest of the stuff.  (On the other hand, if everything is infinitely
29177 important, how can anything be more important than that?  Just one more
29178 of the mysteries of this world, I guess.)
29179 @end iflatex
29180
29181 @end iftex
29182
29183
29184 @node On Writing Manuals
29185 @section On Writing Manuals
29186
29187 I guess most manuals are written after-the-fact; documenting a program
29188 that's already there.  This is not how this manual is written.  When
29189 implementing something, I write the manual entry for that something
29190 straight away.  I then see that it's difficult to explain the
29191 functionality, so I write how it's supposed to be, and then I change the
29192 implementation.  Writing the documentation and writing the code go hand
29193 in hand.
29194
29195 This, of course, means that this manual has no, or little, flow.  It
29196 documents absolutely everything in Gnus, but often not where you're
29197 looking for it.  It is a reference manual, and not a guide to how to get
29198 started with Gnus.
29199
29200 That would be a totally different book, that should be written using the
29201 reference manual as source material.  It would look quite different.
29202
29203
29204 @page
29205 @node Terminology
29206 @section Terminology
29207
29208 @cindex terminology
29209 @table @dfn
29210
29211 @item news
29212 @cindex news
29213 This is what you are supposed to use this thing for---reading news.
29214 News is generally fetched from a nearby @acronym{NNTP} server, and is
29215 generally publicly available to everybody.  If you post news, the entire
29216 world is likely to read just what you have written, and they'll all
29217 snigger mischievously.  Behind your back.
29218
29219 @item mail
29220 @cindex mail
29221 Everything that's delivered to you personally is mail.  Some news/mail
29222 readers (like Gnus) blur the distinction between mail and news, but
29223 there is a difference.  Mail is private.  News is public.  Mailing is
29224 not posting, and replying is not following up.
29225
29226 @item reply
29227 @cindex reply
29228 Send a mail to the person who has written what you are reading.
29229
29230 @item follow up
29231 @cindex follow up
29232 Post an article to the current newsgroup responding to the article you
29233 are reading.
29234
29235 @item back end
29236 @cindex back end
29237 Gnus considers mail and news to be mostly the same, really.  The only
29238 difference is how to access the actual articles.  News articles are
29239 commonly fetched via the protocol @acronym{NNTP}, whereas mail
29240 messages could be read from a file on the local disk.  The internal
29241 architecture of Gnus thus comprises a ``front end'' and a number of
29242 ``back ends''.  Internally, when you enter a group (by hitting
29243 @key{RET}, say), you thereby invoke a function in the front end in
29244 Gnus.  The front end then ``talks'' to a back end and says things like
29245 ``Give me the list of articles in the foo group'' or ``Show me article
29246 number 4711''.
29247
29248 So a back end mainly defines either a protocol (the @code{nntp} back
29249 end accesses news via @acronym{NNTP}, the @code{nnimap} back end
29250 accesses mail via @acronym{IMAP}) or a file format and directory
29251 layout (the @code{nnspool} back end accesses news via the common
29252 ``spool directory'' format, the @code{nnml} back end access mail via a
29253 file format and directory layout that's quite similar).
29254
29255 Gnus does not handle the underlying media, so to speak---this is all
29256 done by the back ends.  A back end is a collection of functions to
29257 access the articles.
29258
29259 However, sometimes the term ``back end'' is also used where ``server''
29260 would have been more appropriate.  And then there is the term ``select
29261 method'' which can mean either.  The Gnus terminology can be quite
29262 confusing.
29263
29264 @item native
29265 @cindex native
29266 Gnus will always use one method (and back end) as the @dfn{native}, or
29267 default, way of getting news.
29268
29269 @item foreign
29270 @cindex foreign
29271 You can also have any number of foreign groups active at the same time.
29272 These are groups that use non-native non-secondary back ends for getting
29273 news.
29274
29275 @item secondary
29276 @cindex secondary
29277 Secondary back ends are somewhere half-way between being native and being
29278 foreign, but they mostly act like they are native.
29279
29280 @item article
29281 @cindex article
29282 A message that has been posted as news.
29283
29284 @item mail message
29285 @cindex mail message
29286 A message that has been mailed.
29287
29288 @item message
29289 @cindex message
29290 A mail message or news article
29291
29292 @item head
29293 @cindex head
29294 The top part of a message, where administrative information (etc.) is
29295 put.
29296
29297 @item body
29298 @cindex body
29299 The rest of an article.  Everything not in the head is in the
29300 body.
29301
29302 @item header
29303 @cindex header
29304 A line from the head of an article.
29305
29306 @item headers
29307 @cindex headers
29308 A collection of such lines, or a collection of heads.  Or even a
29309 collection of @acronym{NOV} lines.
29310
29311 @item @acronym{NOV}
29312 @cindex @acronym{NOV}
29313 @acronym{NOV} stands for News OverView, which is a type of news server
29314 header which provide datas containing the condensed header information
29315 of articles.  They are produced by the server itself; in the @code{nntp}
29316 back end Gnus uses the ones that the @acronym{NNTP} server makes, but
29317 Gnus makes them by itself for some backends (in particular, @code{nnml}).
29318
29319 When Gnus enters a group, it asks the back end for the headers of all
29320 unread articles in the group.  Most servers support the News OverView
29321 format, which is more compact and much faster to read and parse than the
29322 normal @sc{head} format.
29323
29324 The @acronym{NOV} data consist of one or more text lines (@pxref{Text
29325 Lines, ,Motion by Text Lines, elisp, The Emacs Lisp Reference Manual})
29326 where each line has the header information of one article.  The header
29327 information is a tab-separated series of the header's contents including
29328 an article number, a subject, an author, a date, a message-id,
29329 references, etc.
29330
29331 Those data enable Gnus to generate summary lines quickly.  However, if
29332 the server does not support @acronym{NOV} or you disable it purposely or
29333 for some reason, Gnus will try to generate the header information by
29334 parsing each article's headers one by one.  It will take time.
29335 Therefore, it is not usually a good idea to set nn*-nov-is-evil
29336 (@pxref{Slow/Expensive Connection}) to a non-@code{nil} value unless you
29337 know that the server makes wrong @acronym{NOV} data.
29338
29339 @item level
29340 @cindex levels
29341 Each group is subscribed at some @dfn{level} or other (1-9).  The ones
29342 that have a lower level are ``more'' subscribed than the groups with a
29343 higher level.  In fact, groups on levels 1-5 are considered
29344 @dfn{subscribed}; 6-7 are @dfn{unsubscribed}; 8 are @dfn{zombies}; and 9
29345 are @dfn{killed}.  Commands for listing groups and scanning for new
29346 articles will all use the numeric prefix as @dfn{working level}.
29347
29348 @item killed groups
29349 @cindex killed groups
29350 No information on killed groups is stored or updated, which makes killed
29351 groups much easier to handle than subscribed groups.
29352
29353 @item zombie groups
29354 @cindex zombie groups
29355 Just like killed groups, only slightly less dead.
29356
29357 @item active file
29358 @cindex active file
29359 The news server has to keep track of what articles it carries, and what
29360 groups exist.  All this information in stored in the active file, which
29361 is rather large, as you might surmise.
29362
29363 @item bogus groups
29364 @cindex bogus groups
29365 A group that exists in the @file{.newsrc} file, but isn't known to the
29366 server (i.e.,  it isn't in the active file), is a @emph{bogus group}.
29367 This means that the group probably doesn't exist (any more).
29368
29369 @item activating
29370 @cindex activating groups
29371 The act of asking the server for info on a group and computing the
29372 number of unread articles is called @dfn{activating the group}.
29373 Un-activated groups are listed with @samp{*} in the group buffer.
29374
29375 @item spool
29376 @cindex spool
29377 News servers store their articles locally in one fashion or other.
29378 One old-fashioned storage method is to have just one file per
29379 article.  That's called a ``traditional spool''.
29380
29381 @item server
29382 @cindex server
29383 A machine one can connect to and get news (or mail) from.
29384
29385 @item select method
29386 @cindex select method
29387 A structure that specifies the back end, the server and the virtual
29388 server settings.
29389
29390 @item virtual server
29391 @cindex virtual server
29392 A named select method.  Since a select method defines all there is to
29393 know about connecting to a (physical) server, taking the thing as a
29394 whole is a virtual server.
29395
29396 @item washing
29397 @cindex washing
29398 Taking a buffer and running it through a filter of some sort.  The
29399 result will (more often than not) be cleaner and more pleasing than the
29400 original.
29401
29402 @item ephemeral groups
29403 @cindex ephemeral groups
29404 @cindex temporary groups
29405 Most groups store data on what articles you have read.  @dfn{Ephemeral}
29406 groups are groups that will have no data stored---when you exit the
29407 group, it'll disappear into the aether.
29408
29409 @item solid groups
29410 @cindex solid groups
29411 This is the opposite of ephemeral groups.  All groups listed in the
29412 group buffer are solid groups.
29413
29414 @item sparse articles
29415 @cindex sparse articles
29416 These are article placeholders shown in the summary buffer when
29417 @code{gnus-build-sparse-threads} has been switched on.
29418
29419 @item threading
29420 @cindex threading
29421 To put responses to articles directly after the articles they respond
29422 to---in a hierarchical fashion.
29423
29424 @item root
29425 @cindex root
29426 @cindex thread root
29427 The first article in a thread is the root.  It is the ancestor of all
29428 articles in the thread.
29429
29430 @item parent
29431 @cindex parent
29432 An article that has responses.
29433
29434 @item child
29435 @cindex child
29436 An article that responds to a different article---its parent.
29437
29438 @item digest
29439 @cindex digest
29440 A collection of messages in one file.  The most common digest format is
29441 specified by RFC 1153.
29442
29443 @item splitting
29444 @cindex splitting, terminology
29445 @cindex mail sorting
29446 @cindex mail filtering (splitting)
29447 The action of sorting your emails according to certain rules. Sometimes
29448 incorrectly called mail filtering.
29449
29450 @end table
29451
29452
29453 @page
29454 @node Customization
29455 @section Customization
29456 @cindex general customization
29457
29458 All variables are properly documented elsewhere in this manual.  This
29459 section is designed to give general pointers on how to customize Gnus
29460 for some quite common situations.
29461
29462 @menu
29463 * Slow/Expensive Connection::   You run a local Emacs and get the news elsewhere.
29464 * Slow Terminal Connection::    You run a remote Emacs.
29465 * Little Disk Space::           You feel that having large setup files is icky.
29466 * Slow Machine::                You feel like buying a faster machine.
29467 @end menu
29468
29469
29470 @node Slow/Expensive Connection
29471 @subsection Slow/Expensive Connection
29472
29473 If you run Emacs on a machine locally, and get your news from a machine
29474 over some very thin strings, you want to cut down on the amount of data
29475 Gnus has to get from the server.
29476
29477 @table @code
29478
29479 @item gnus-read-active-file
29480 Set this to @code{nil}, which will inhibit Gnus from requesting the
29481 entire active file from the server.  This file is often very large.  You
29482 also have to set @code{gnus-check-new-newsgroups} and
29483 @code{gnus-check-bogus-newsgroups} to @code{nil} to make sure that Gnus
29484 doesn't suddenly decide to fetch the active file anyway.
29485
29486 @item gnus-nov-is-evil
29487 @vindex gnus-nov-is-evil
29488 Usually this one must @emph{always} be @code{nil} (which is the
29489 default).  If, for example, you wish to not use @acronym{NOV}
29490 (@pxref{Terminology}) with the @code{nntp} back end (@pxref{Crosspost
29491 Handling}), set @code{nntp-nov-is-evil} to a non-@code{nil} value
29492 instead of setting this.  But you normally do not need to set
29493 @code{nntp-nov-is-evil} since Gnus by itself will detect whether the
29494 @acronym{NNTP} server supports @acronym{NOV}.  Anyway, grabbing article
29495 headers from the @acronym{NNTP} server will not be very fast if you tell
29496 Gnus not to use @acronym{NOV}.
29497
29498 As the variables for the other back ends, there are
29499 @code{nndiary-nov-is-evil}, @code{nndir-nov-is-evil},
29500 @code{nnfolder-nov-is-evil}, @code{nnimap-nov-is-evil},
29501 @code{nnml-nov-is-evil}, @code{nnspool-nov-is-evil}, and
29502 @code{nnwarchive-nov-is-evil}.  Note that a non-@code{nil} value for
29503 @code{gnus-nov-is-evil} overrides all those variables.@footnote{Although
29504 the back ends @code{nnkiboze}, @code{nnultimate}, and
29505 @code{nnwfm} don't have their own nn*-nov-is-evil.}
29506 @end table
29507
29508
29509 @node Slow Terminal Connection
29510 @subsection Slow Terminal Connection
29511
29512 Let's say you use your home computer for dialing up the system that runs
29513 Emacs and Gnus.  If your modem is slow, you want to reduce (as much as
29514 possible) the amount of data sent over the wires.
29515
29516 @table @code
29517
29518 @item gnus-auto-center-summary
29519 Set this to @code{nil} to inhibit Gnus from re-centering the summary
29520 buffer all the time.  If it is @code{vertical}, do only vertical
29521 re-centering.  If it is neither @code{nil} nor @code{vertical}, do both
29522 horizontal and vertical recentering.
29523
29524 @item gnus-visible-headers
29525 Cut down on the headers included in the articles to the
29526 minimum.  You can, in fact, make do without them altogether---most of the
29527 useful data is in the summary buffer, anyway.  Set this variable to
29528 @samp{^NEVVVVER} or @samp{From:}, or whatever you feel you need.
29529
29530 Use the following to enable all the available hiding features:
29531 @lisp
29532 (setq gnus-treat-hide-headers 'head
29533       gnus-treat-hide-signature t
29534       gnus-treat-hide-citation t)
29535 @end lisp
29536
29537 @item gnus-use-full-window
29538 By setting this to @code{nil}, you can make all the windows smaller.
29539 While this doesn't really cut down much generally, it means that you
29540 have to see smaller portions of articles before deciding that you didn't
29541 want to read them anyway.
29542
29543 @item gnus-thread-hide-subtree
29544 If this is non-@code{nil}, all threads in the summary buffer will be
29545 hidden initially.
29546
29547
29548 @item gnus-updated-mode-lines
29549 If this is @code{nil}, Gnus will not put information in the buffer mode
29550 lines, which might save some time.
29551 @end table
29552
29553
29554 @node Little Disk Space
29555 @subsection Little Disk Space
29556 @cindex disk space
29557
29558 The startup files can get rather large, so you may want to cut their
29559 sizes a bit if you are running out of space.
29560
29561 @table @code
29562
29563 @item gnus-save-newsrc-file
29564 If this is @code{nil}, Gnus will never save @file{.newsrc}---it will
29565 only save @file{.newsrc.eld}.  This means that you will not be able to
29566 use any other newsreaders than Gnus.  This variable is @code{t} by
29567 default.
29568
29569 @item gnus-read-newsrc-file
29570 If this is @code{nil}, Gnus will never read @file{.newsrc}---it will
29571 only read @file{.newsrc.eld}.  This means that you will not be able to
29572 use any other newsreaders than Gnus.  This variable is @code{t} by
29573 default.
29574
29575 @item gnus-save-killed-list
29576 If this is @code{nil}, Gnus will not save the list of dead groups.  You
29577 should also set @code{gnus-check-new-newsgroups} to @code{ask-server}
29578 and @code{gnus-check-bogus-newsgroups} to @code{nil} if you set this
29579 variable to @code{nil}.  This variable is @code{t} by default.
29580
29581 @end table
29582
29583
29584 @node Slow Machine
29585 @subsection Slow Machine
29586 @cindex slow machine
29587
29588 If you have a slow machine, or are just really impatient, there are a
29589 few things you can do to make Gnus run faster.
29590
29591 Set @code{gnus-check-new-newsgroups} and
29592 @code{gnus-check-bogus-newsgroups} to @code{nil} to make startup faster.
29593
29594 Set @code{gnus-show-threads}, @code{gnus-use-cross-reference} and
29595 @code{gnus-nov-is-evil} to @code{nil} to make entering and exiting the
29596 summary buffer faster.  Also @pxref{Slow/Expensive Connection}.
29597
29598
29599 @page
29600 @node Troubleshooting
29601 @section Troubleshooting
29602 @cindex troubleshooting
29603
29604 Gnus works @emph{so} well straight out of the box---I can't imagine any
29605 problems, really.
29606
29607 Ahem.
29608
29609 @enumerate
29610
29611 @item
29612 Make sure your computer is switched on.
29613
29614 @item
29615 Make sure that you really load the current Gnus version.  If you have
29616 been running @sc{gnus}, you need to exit Emacs and start it up again before
29617 Gnus will work.
29618
29619 @item
29620 Try doing an @kbd{M-x gnus-version}.  If you get something that looks
29621 like @c
29622 @samp{No Gnus v0.10} @c Adjust ../Makefile.in if you change this line!
29623 @c
29624 you have the right files loaded.  Otherwise you have some old @file{.el}
29625 files lying around.  Delete these.
29626
29627 @item
29628 Read the help group (@kbd{G h} in the group buffer) for a
29629 @acronym{FAQ} and a how-to.
29630
29631 @item
29632 @vindex max-lisp-eval-depth
29633 Gnus works on many recursive structures, and in some extreme (and very
29634 rare) cases Gnus may recurse down ``too deeply'' and Emacs will beep at
29635 you.  If this happens to you, set @code{max-lisp-eval-depth} to 500 or
29636 something like that.
29637 @end enumerate
29638
29639 If all else fails, report the problem as a bug.
29640
29641 @cindex bugs
29642 @cindex reporting bugs
29643
29644 @kindex M-x gnus-bug
29645 @findex gnus-bug
29646 If you find a bug in Gnus, you can report it with the @kbd{M-x gnus-bug}
29647 command.  @kbd{M-x set-variable RET debug-on-error RET t RET}, and send
29648 me the backtrace.  I will fix bugs, but I can only fix them if you send
29649 me a precise description as to how to reproduce the bug.
29650
29651 You really can never be too detailed in a bug report.  Always use the
29652 @kbd{M-x gnus-bug} command when you make bug reports, even if it creates
29653 a 10Kb mail each time you use it, and even if you have sent me your
29654 environment 500 times before.  I don't care.  I want the full info each
29655 time.
29656
29657 It is also important to remember that I have no memory whatsoever.  If
29658 you send a bug report, and I send you a reply, and then you just send
29659 back ``No, it's not! Moron!'', I will have no idea what you are
29660 insulting me about.  Always over-explain everything.  It's much easier
29661 for all of us---if I don't have all the information I need, I will just
29662 mail you and ask for more info, and everything takes more time.
29663
29664 If the problem you're seeing is very visual, and you can't quite explain
29665 it, copy the Emacs window to a file (with @code{xwd}, for instance), put
29666 it somewhere it can be reached, and include the URL of the picture in
29667 the bug report.
29668
29669 @cindex patches
29670 If you would like to contribute a patch to fix bugs or make
29671 improvements, please produce the patch using @samp{diff -u}.
29672
29673 @cindex edebug
29674 If you want to debug your problem further before reporting, possibly
29675 in order to solve the problem yourself and send a patch, you can use
29676 edebug.  Debugging Lisp code is documented in the Elisp manual
29677 (@pxref{Debugging, , Debugging Lisp Programs, elisp, The GNU Emacs
29678 Lisp Reference Manual}).  To get you started with edebug, consider if
29679 you discover some weird behavior when pressing @kbd{c}, the first
29680 step is to do @kbd{C-h k c} and click on the hyperlink (Emacs only) in
29681 the documentation buffer that leads you to the function definition,
29682 then press @kbd{M-x edebug-defun RET} with point inside that function,
29683 return to Gnus and press @kbd{c} to invoke the code.  You will be
29684 placed in the lisp buffer and can single step using @kbd{SPC} and
29685 evaluate expressions using @kbd{M-:} or inspect variables using
29686 @kbd{C-h v}, abort execution with @kbd{q}, and resume execution with
29687 @kbd{c} or @kbd{g}.
29688
29689 @cindex elp
29690 @cindex profile
29691 @cindex slow
29692 Sometimes, a problem do not directly generate an elisp error but
29693 manifests itself by causing Gnus to be very slow.  In these cases, you
29694 can use @kbd{M-x toggle-debug-on-quit} and press @kbd{C-g} when things are
29695 slow, and then try to analyze the backtrace (repeating the procedure
29696 helps isolating the real problem areas).
29697
29698 A fancier approach is to use the elisp profiler, ELP.  The profiler is
29699 (or should be) fully documented elsewhere, but to get you started
29700 there are a few steps that need to be followed.  First, instrument the
29701 part of Gnus you are interested in for profiling, e.g. @kbd{M-x
29702 elp-instrument-package RET gnus} or @kbd{M-x elp-instrument-package
29703 RET message}.  Then perform the operation that is slow and press
29704 @kbd{M-x elp-results}.  You will then see which operations that takes
29705 time, and can debug them further.  If the entire operation takes much
29706 longer than the time spent in the slowest function in the profiler
29707 output, you probably profiled the wrong part of Gnus.  To reset
29708 profiling statistics, use @kbd{M-x elp-reset-all}.  @kbd{M-x
29709 elp-restore-all} is supposed to remove profiling, but given the
29710 complexities and dynamic code generation in Gnus, it might not always
29711 work perfectly.
29712
29713 @cindex gnu.emacs.gnus
29714 @cindex ding mailing list
29715 If you just need help, you are better off asking on
29716 @samp{gnu.emacs.gnus}.  I'm not very helpful.  You can also ask on
29717 @email{ding@@gnus.org, the ding mailing list}.  Write to
29718 @email{ding-request@@gnus.org} to subscribe.
29719
29720
29721 @page
29722 @node Gnus Reference Guide
29723 @section Gnus Reference Guide
29724
29725 It is my hope that other people will figure out smart stuff that Gnus
29726 can do, and that other people will write those smart things as well.  To
29727 facilitate that I thought it would be a good idea to describe the inner
29728 workings of Gnus.  And some of the not-so-inner workings, while I'm at
29729 it.
29730
29731 You can never expect the internals of a program not to change, but I
29732 will be defining (in some details) the interface between Gnus and its
29733 back ends (this is written in stone), the format of the score files
29734 (ditto), data structures (some are less likely to change than others)
29735 and general methods of operation.
29736
29737 @menu
29738 * Gnus Utility Functions::      Common functions and variable to use.
29739 * Back End Interface::          How Gnus communicates with the servers.
29740 * Score File Syntax::           A BNF definition of the score file standard.
29741 * Headers::                     How Gnus stores headers internally.
29742 * Ranges::                      A handy format for storing mucho numbers.
29743 * Group Info::                  The group info format.
29744 * Extended Interactive::        Symbolic prefixes and stuff.
29745 * Emacs/XEmacs Code::           Gnus can be run under all modern Emacsen.
29746 * Various File Formats::        Formats of files that Gnus use.
29747 @end menu
29748
29749
29750 @node Gnus Utility Functions
29751 @subsection Gnus Utility Functions
29752 @cindex Gnus utility functions
29753 @cindex utility functions
29754 @cindex functions
29755 @cindex internal variables
29756
29757 When writing small functions to be run from hooks (and stuff), it's
29758 vital to have access to the Gnus internal functions and variables.
29759 Below is a list of the most common ones.
29760
29761 @table @code
29762
29763 @item gnus-newsgroup-name
29764 @vindex gnus-newsgroup-name
29765 This variable holds the name of the current newsgroup.
29766
29767 @item gnus-find-method-for-group
29768 @findex gnus-find-method-for-group
29769 A function that returns the select method for @var{group}.
29770
29771 @item gnus-group-real-name
29772 @findex gnus-group-real-name
29773 Takes a full (prefixed) Gnus group name, and returns the unprefixed
29774 name.
29775
29776 @item gnus-group-prefixed-name
29777 @findex gnus-group-prefixed-name
29778 Takes an unprefixed group name and a select method, and returns the full
29779 (prefixed) Gnus group name.
29780
29781 @item gnus-get-info
29782 @findex gnus-get-info
29783 Returns the group info list for @var{group}.
29784
29785 @item gnus-group-unread
29786 @findex gnus-group-unread
29787 The number of unread articles in @var{group}, or @code{t} if that is
29788 unknown.
29789
29790 @item gnus-active
29791 @findex gnus-active
29792 The active entry for @var{group}.
29793
29794 @item gnus-set-active
29795 @findex gnus-set-active
29796 Set the active entry for @var{group}.
29797
29798 @item gnus-add-current-to-buffer-list
29799 @findex gnus-add-current-to-buffer-list
29800 Adds the current buffer to the list of buffers to be killed on Gnus
29801 exit.
29802
29803 @item gnus-continuum-version
29804 @findex gnus-continuum-version
29805 Takes a Gnus version string as a parameter and returns a floating point
29806 number.  Earlier versions will always get a lower number than later
29807 versions.
29808
29809 @item gnus-group-read-only-p
29810 @findex gnus-group-read-only-p
29811 Says whether @var{group} is read-only or not.
29812
29813 @item gnus-news-group-p
29814 @findex gnus-news-group-p
29815 Says whether @var{group} came from a news back end.
29816
29817 @item gnus-ephemeral-group-p
29818 @findex gnus-ephemeral-group-p
29819 Says whether @var{group} is ephemeral or not.
29820
29821 @item gnus-server-to-method
29822 @findex gnus-server-to-method
29823 Returns the select method corresponding to @var{server}.
29824
29825 @item gnus-server-equal
29826 @findex gnus-server-equal
29827 Says whether two virtual servers are equal.
29828
29829 @item gnus-group-native-p
29830 @findex gnus-group-native-p
29831 Says whether @var{group} is native or not.
29832
29833 @item gnus-group-secondary-p
29834 @findex gnus-group-secondary-p
29835 Says whether @var{group} is secondary or not.
29836
29837 @item gnus-group-foreign-p
29838 @findex gnus-group-foreign-p
29839 Says whether @var{group} is foreign or not.
29840
29841 @item gnus-group-find-parameter
29842 @findex gnus-group-find-parameter
29843 Returns the parameter list of @var{group}.  If given a second parameter,
29844 returns the value of that parameter for @var{group}.
29845
29846 @item gnus-group-set-parameter
29847 @findex gnus-group-set-parameter
29848 Takes three parameters; @var{group}, @var{parameter} and @var{value}.
29849
29850 @item gnus-narrow-to-body
29851 @findex gnus-narrow-to-body
29852 Narrows the current buffer to the body of the article.
29853
29854 @item gnus-check-backend-function
29855 @findex gnus-check-backend-function
29856 Takes two parameters, @var{function} and @var{group}.  If the back end
29857 @var{group} comes from supports @var{function}, return non-@code{nil}.
29858
29859 @lisp
29860 (gnus-check-backend-function "request-scan" "nnml:misc")
29861 @result{} t
29862 @end lisp
29863
29864 @item gnus-read-method
29865 @findex gnus-read-method
29866 Prompts the user for a select method.
29867
29868 @end table
29869
29870
29871 @node Back End Interface
29872 @subsection Back End Interface
29873
29874 Gnus doesn't know anything about @acronym{NNTP}, spools, mail or virtual
29875 groups.  It only knows how to talk to @dfn{virtual servers}.  A virtual
29876 server is a @dfn{back end} and some @dfn{back end variables}.  As examples
29877 of the first, we have @code{nntp}, @code{nnspool} and @code{nnmbox}.  As
29878 examples of the latter we have @code{nntp-port-number} and
29879 @code{nnmbox-directory}.
29880
29881 When Gnus asks for information from a back end---say @code{nntp}---on
29882 something, it will normally include a virtual server name in the
29883 function parameters.  (If not, the back end should use the ``current''
29884 virtual server.)  For instance, @code{nntp-request-list} takes a virtual
29885 server as its only (optional) parameter.  If this virtual server hasn't
29886 been opened, the function should fail.
29887
29888 Note that a virtual server name has no relation to some physical server
29889 name.  Take this example:
29890
29891 @lisp
29892 (nntp "odd-one"
29893       (nntp-address "ifi.uio.no")
29894       (nntp-port-number 4324))
29895 @end lisp
29896
29897 Here the virtual server name is @samp{odd-one} while the name of
29898 the physical server is @samp{ifi.uio.no}.
29899
29900 The back ends should be able to switch between several virtual servers.
29901 The standard back ends implement this by keeping an alist of virtual
29902 server environments that they pull down/push up when needed.
29903
29904 There are two groups of interface functions: @dfn{required functions},
29905 which must be present, and @dfn{optional functions}, which Gnus will
29906 always check for presence before attempting to call 'em.
29907
29908 All these functions are expected to return data in the buffer
29909 @code{nntp-server-buffer} (@samp{ *nntpd*}), which is somewhat
29910 unfortunately named, but we'll have to live with it.  When I talk about
29911 @dfn{resulting data}, I always refer to the data in that buffer.  When I
29912 talk about @dfn{return value}, I talk about the function value returned by
29913 the function call.  Functions that fail should return @code{nil} as the
29914 return value.
29915
29916 Some back ends could be said to be @dfn{server-forming} back ends, and
29917 some might be said not to be.  The latter are back ends that generally
29918 only operate on one group at a time, and have no concept of ``server''
29919 ---they have a group, and they deliver info on that group and nothing
29920 more.
29921
29922 Gnus identifies each message by way of group name and article number.  A
29923 few remarks about these article numbers might be useful.  First of all,
29924 the numbers are positive integers.  Secondly, it is normally not
29925 possible for later articles to ``re-use'' older article numbers without
29926 confusing Gnus.  That is, if a group has ever contained a message
29927 numbered 42, then no other message may get that number, or Gnus will get
29928 mightily confused.@footnote{See the function
29929 @code{nnchoke-request-update-info}, @ref{Optional Back End Functions}.}
29930 Third, article numbers must be assigned in order of arrival in the
29931 group; this is not necessarily the same as the date of the message.
29932
29933 The previous paragraph already mentions all the ``hard'' restrictions that
29934 article numbers must fulfill.  But it seems that it might be useful to
29935 assign @emph{consecutive} article numbers, for Gnus gets quite confused
29936 if there are holes in the article numbering sequence.  However, due to
29937 the ``no-reuse'' restriction, holes cannot be avoided altogether.  It's
29938 also useful for the article numbers to start at 1 to avoid running out
29939 of numbers as long as possible.
29940
29941 Note that by convention, back ends are named @code{nnsomething}, but
29942 Gnus also comes with some @code{nnnotbackends}, such as
29943 @file{nnheader.el}, @file{nnmail.el} and @file{nnoo.el}.
29944
29945 In the examples and definitions I will refer to the imaginary back end
29946 @code{nnchoke}.
29947
29948 @cindex @code{nnchoke}
29949
29950 @menu
29951 * Required Back End Functions::  Functions that must be implemented.
29952 * Optional Back End Functions::  Functions that need not be implemented.
29953 * Error Messaging::             How to get messages and report errors.
29954 * Writing New Back Ends::       Extending old back ends.
29955 * Hooking New Back Ends Into Gnus::  What has to be done on the Gnus end.
29956 * Mail-like Back Ends::         Some tips on mail back ends.
29957 @end menu
29958
29959
29960 @node Required Back End Functions
29961 @subsubsection Required Back End Functions
29962
29963 @table @code
29964
29965 @item (nnchoke-retrieve-headers ARTICLES &optional GROUP SERVER FETCH-OLD)
29966
29967 @var{articles} is either a range of article numbers or a list of
29968 @code{Message-ID}s.  Current back ends do not fully support either---only
29969 sequences (lists) of article numbers, and most back ends do not support
29970 retrieval of @code{Message-ID}s.  But they should try for both.
29971
29972 The result data should either be HEADs or @acronym{NOV} lines, and the result
29973 value should either be @code{headers} or @code{nov} to reflect this.
29974 This might later be expanded to @code{various}, which will be a mixture
29975 of HEADs and @acronym{NOV} lines, but this is currently not supported by Gnus.
29976
29977 If @var{fetch-old} is non-@code{nil} it says to try fetching ``extra
29978 headers'', in some meaning of the word.  This is generally done by
29979 fetching (at most) @var{fetch-old} extra headers less than the smallest
29980 article number in @code{articles}, and filling the gaps as well.  The
29981 presence of this parameter can be ignored if the back end finds it
29982 cumbersome to follow the request.  If this is non-@code{nil} and not a
29983 number, do maximum fetches.
29984
29985 Here's an example HEAD:
29986
29987 @example
29988 221 1056 Article retrieved.
29989 Path: ifi.uio.no!sturles
29990 From: sturles@@ifi.uio.no (Sturle Sunde)
29991 Newsgroups: ifi.discussion
29992 Subject: Re: Something very droll
29993 Date: 27 Oct 1994 14:02:57 +0100
29994 Organization: Dept. of Informatics, University of Oslo, Norway
29995 Lines: 26
29996 Message-ID: <38o8e1$a0o@@holmenkollen.ifi.uio.no>
29997 References: <38jdmq$4qu@@visbur.ifi.uio.no>
29998 NNTP-Posting-Host: holmenkollen.ifi.uio.no
29999 .
30000 @end example
30001
30002 So a @code{headers} return value would imply that there's a number of
30003 these in the data buffer.
30004
30005 Here's a BNF definition of such a buffer:
30006
30007 @example
30008 headers        = *head
30009 head           = error / valid-head
30010 error-message  = [ "4" / "5" ] 2number " " <error message> eol
30011 valid-head     = valid-message *header "." eol
30012 valid-message  = "221 " <number> " Article retrieved." eol
30013 header         = <text> eol
30014 @end example
30015
30016 @cindex BNF
30017 (The version of BNF used here is the one used in RFC822.)
30018
30019 If the return value is @code{nov}, the data buffer should contain
30020 @dfn{network overview database} lines.  These are basically fields
30021 separated by tabs.
30022
30023 @example
30024 nov-buffer = *nov-line
30025 nov-line   = field 7*8[ <TAB> field ] eol
30026 field      = <text except TAB>
30027 @end example
30028
30029 For a closer look at what should be in those fields,
30030 @pxref{Headers}.
30031
30032
30033 @item (nnchoke-open-server SERVER &optional DEFINITIONS)
30034
30035 @var{server} is here the virtual server name.  @var{definitions} is a
30036 list of @code{(VARIABLE VALUE)} pairs that define this virtual server.
30037
30038 If the server can't be opened, no error should be signaled.  The back end
30039 may then choose to refuse further attempts at connecting to this
30040 server.  In fact, it should do so.
30041
30042 If the server is opened already, this function should return a
30043 non-@code{nil} value.  There should be no data returned.
30044
30045
30046 @item (nnchoke-close-server &optional SERVER)
30047
30048 Close connection to @var{server} and free all resources connected
30049 to it.  Return @code{nil} if the server couldn't be closed for some
30050 reason.
30051
30052 There should be no data returned.
30053
30054
30055 @item (nnchoke-request-close)
30056
30057 Close connection to all servers and free all resources that the back end
30058 have reserved.  All buffers that have been created by that back end
30059 should be killed.  (Not the @code{nntp-server-buffer}, though.)  This
30060 function is generally only called when Gnus is shutting down.
30061
30062 There should be no data returned.
30063
30064
30065 @item (nnchoke-server-opened &optional SERVER)
30066
30067 If @var{server} is the current virtual server, and the connection to the
30068 physical server is alive, then this function should return a
30069 non-@code{nil} value.  This function should under no circumstances
30070 attempt to reconnect to a server we have lost connection to.
30071
30072 There should be no data returned.
30073
30074
30075 @item (nnchoke-status-message &optional SERVER)
30076
30077 This function should return the last error message from @var{server}.
30078
30079 There should be no data returned.
30080
30081
30082 @item (nnchoke-request-article ARTICLE &optional GROUP SERVER TO-BUFFER)
30083
30084 The result data from this function should be the article specified by
30085 @var{article}.  This might either be a @code{Message-ID} or a number.
30086 It is optional whether to implement retrieval by @code{Message-ID}, but
30087 it would be nice if that were possible.
30088
30089 If @var{to-buffer} is non-@code{nil}, the result data should be returned
30090 in this buffer instead of the normal data buffer.  This is to make it
30091 possible to avoid copying large amounts of data from one buffer to
30092 another, while Gnus mainly requests articles to be inserted directly
30093 into its article buffer.
30094
30095 If it is at all possible, this function should return a cons cell where
30096 the @code{car} is the group name the article was fetched from, and the @code{cdr} is
30097 the article number.  This will enable Gnus to find out what the real
30098 group and article numbers are when fetching articles by
30099 @code{Message-ID}.  If this isn't possible, @code{t} should be returned
30100 on successful article retrieval.
30101
30102
30103 @item (nnchoke-request-group GROUP &optional SERVER FAST)
30104
30105 Get data on @var{group}.  This function also has the side effect of
30106 making @var{group} the current group.
30107
30108 If @var{fast}, don't bother to return useful data, just make @var{group}
30109 the current group.
30110
30111 Here's an example of some result data and a definition of the same:
30112
30113 @example
30114 211 56 1000 1059 ifi.discussion
30115 @end example
30116
30117 The first number is the status, which should be 211.  Next is the
30118 total number of articles in the group, the lowest article number, the
30119 highest article number, and finally the group name.  Note that the total
30120 number of articles may be less than one might think while just
30121 considering the highest and lowest article numbers, but some articles
30122 may have been canceled.  Gnus just discards the total-number, so
30123 whether one should take the bother to generate it properly (if that is a
30124 problem) is left as an exercise to the reader.  If the group contains no
30125 articles, the lowest article number should be reported as 1 and the
30126 highest as 0.
30127
30128 @example
30129 group-status = [ error / info ] eol
30130 error        = [ "4" / "5" ] 2<number> " " <Error message>
30131 info         = "211 " 3* [ <number> " " ] <string>
30132 @end example
30133
30134
30135 @item (nnchoke-close-group GROUP &optional SERVER)
30136
30137 Close @var{group} and free any resources connected to it.  This will be
30138 a no-op on most back ends.
30139
30140 There should be no data returned.
30141
30142
30143 @item (nnchoke-request-list &optional SERVER)
30144
30145 Return a list of all groups available on @var{server}.  And that means
30146 @emph{all}.
30147
30148 Here's an example from a server that only carries two groups:
30149
30150 @example
30151 ifi.test 0000002200 0000002000 y
30152 ifi.discussion 3324 3300 n
30153 @end example
30154
30155 On each line we have a group name, then the highest article number in
30156 that group, the lowest article number, and finally a flag.  If the group
30157 contains no articles, the lowest article number should be reported as 1
30158 and the highest as 0.
30159
30160 @example
30161 active-file = *active-line
30162 active-line = name " " <number> " " <number> " " flags eol
30163 name        = <string>
30164 flags       = "n" / "y" / "m" / "x" / "j" / "=" name
30165 @end example
30166
30167 The flag says whether the group is read-only (@samp{n}), is moderated
30168 (@samp{m}), is dead (@samp{x}), is aliased to some other group
30169 (@samp{=other-group}) or none of the above (@samp{y}).
30170
30171
30172 @item (nnchoke-request-post &optional SERVER)
30173
30174 This function should post the current buffer.  It might return whether
30175 the posting was successful or not, but that's not required.  If, for
30176 instance, the posting is done asynchronously, it has generally not been
30177 completed by the time this function concludes.  In that case, this
30178 function should set up some kind of sentinel to beep the user loud and
30179 clear if the posting could not be completed.
30180
30181 There should be no result data from this function.
30182
30183 @end table
30184
30185
30186 @node Optional Back End Functions
30187 @subsubsection Optional Back End Functions
30188
30189 @table @code
30190
30191 @item (nnchoke-retrieve-groups GROUPS &optional SERVER)
30192
30193 @var{groups} is a list of groups, and this function should request data
30194 on all those groups.  How it does it is of no concern to Gnus, but it
30195 should attempt to do this in a speedy fashion.
30196
30197 The return value of this function can be either @code{active} or
30198 @code{group}, which says what the format of the result data is.  The
30199 former is in the same format as the data from
30200 @code{nnchoke-request-list}, while the latter is a buffer full of lines
30201 in the same format as @code{nnchoke-request-group} gives.
30202
30203 @example
30204 group-buffer = *active-line / *group-status
30205 @end example
30206
30207
30208 @item (nnchoke-request-update-info GROUP INFO &optional SERVER)
30209
30210 A Gnus group info (@pxref{Group Info}) is handed to the back end for
30211 alterations.  This comes in handy if the back end really carries all
30212 the information (as is the case with virtual and imap groups).  This
30213 function should destructively alter the info to suit its needs, and
30214 should return a non-@code{nil} value (exceptionally,
30215 @code{nntp-request-update-info} always returns @code{nil} not to waste
30216 the network resources).
30217
30218 There should be no result data from this function.
30219
30220
30221 @item (nnchoke-request-type GROUP &optional ARTICLE)
30222
30223 When the user issues commands for ``sending news'' (@kbd{F} in the
30224 summary buffer, for instance), Gnus has to know whether the article the
30225 user is following up on is news or mail.  This function should return
30226 @code{news} if @var{article} in @var{group} is news, @code{mail} if it
30227 is mail and @code{unknown} if the type can't be decided.  (The
30228 @var{article} parameter is necessary in @code{nnvirtual} groups which
30229 might very well combine mail groups and news groups.)  Both @var{group}
30230 and @var{article} may be @code{nil}.
30231
30232 There should be no result data from this function.
30233
30234
30235 @item (nnchoke-request-set-mark GROUP ACTION &optional SERVER)
30236
30237 Set/remove/add marks on articles.  Normally Gnus handles the article
30238 marks (such as read, ticked, expired etc) internally, and store them in
30239 @file{~/.newsrc.eld}.  Some back ends (such as @acronym{IMAP}) however carry
30240 all information about the articles on the server, so Gnus need to
30241 propagate the mark information to the server.
30242
30243 @var{action} is a list of mark setting requests, having this format:
30244
30245 @example
30246 (RANGE ACTION MARK)
30247 @end example
30248
30249 @var{range} is a range of articles you wish to update marks on.
30250 @var{action} is @code{add} or @code{del}, used to add marks or remove
30251 marks (preserving all marks not mentioned).  @var{mark} is a list of
30252 marks; where each mark is a symbol.  Currently used marks are
30253 @code{read}, @code{tick}, @code{reply}, @code{expire}, @code{killed},
30254 @code{dormant}, @code{save}, @code{download}, @code{unsend},
30255 @code{forward} and @code{recent}, but your back end should, if
30256 possible, not limit itself to these.
30257
30258 Given contradictory actions, the last action in the list should be the
30259 effective one.  That is, if your action contains a request to add the
30260 @code{tick} mark on article 1 and, later in the list, a request to
30261 remove the mark on the same article, the mark should in fact be removed.
30262
30263 An example action list:
30264
30265 @example
30266 (((5 12 30) 'del '(tick))
30267  ((10 . 90) 'add '(read expire))
30268  ((92 94) 'del '(read)))
30269 @end example
30270
30271 The function should return a range of articles it wasn't able to set the
30272 mark on (currently not used for anything).
30273
30274 There should be no result data from this function.
30275
30276 @item (nnchoke-request-update-mark GROUP ARTICLE MARK)
30277
30278 If the user tries to set a mark that the back end doesn't like, this
30279 function may change the mark.  Gnus will use whatever this function
30280 returns as the mark for @var{article} instead of the original
30281 @var{mark}.  If the back end doesn't care, it must return the original
30282 @var{mark}, and not @code{nil} or any other type of garbage.
30283
30284 The only use for this I can see is what @code{nnvirtual} does with
30285 it---if a component group is auto-expirable, marking an article as read
30286 in the virtual group should result in the article being marked as
30287 expirable.
30288
30289 There should be no result data from this function.
30290
30291
30292 @item (nnchoke-request-scan &optional GROUP SERVER)
30293
30294 This function may be called at any time (by Gnus or anything else) to
30295 request that the back end check for incoming articles, in one way or
30296 another.  A mail back end will typically read the spool file or query
30297 the @acronym{POP} server when this function is invoked.  The
30298 @var{group} doesn't have to be heeded---if the back end decides that
30299 it is too much work just scanning for a single group, it may do a
30300 total scan of all groups.  It would be nice, however, to keep things
30301 local if that's practical.
30302
30303 There should be no result data from this function.
30304
30305
30306 @item (nnchoke-request-group-description GROUP &optional SERVER)
30307
30308 The result data from this function should be a description of
30309 @var{group}.
30310
30311 @example
30312 description-line = name <TAB> description eol
30313 name             = <string>
30314 description      = <text>
30315 @end example
30316
30317 @item (nnchoke-request-list-newsgroups &optional SERVER)
30318
30319 The result data from this function should be the description of all
30320 groups available on the server.
30321
30322 @example
30323 description-buffer = *description-line
30324 @end example
30325
30326
30327 @item (nnchoke-request-newgroups DATE &optional SERVER)
30328
30329 The result data from this function should be all groups that were
30330 created after @samp{date}, which is in normal human-readable date format
30331 (i.e., the date format used in mail and news headers, and returned by
30332 the function @code{message-make-date} by default).  The data should be
30333 in the active buffer format.
30334
30335 It is okay for this function to return ``too many'' groups; some back ends
30336 might find it cheaper to return the full list of groups, rather than
30337 just the new groups.  But don't do this for back ends with many groups.
30338 Normally, if the user creates the groups herself, there won't be too
30339 many groups, so @code{nnml} and the like are probably safe.  But for
30340 back ends like @code{nntp}, where the groups have been created by the
30341 server, it is quite likely that there can be many groups.
30342
30343
30344 @item (nnchoke-request-create-group GROUP &optional SERVER)
30345
30346 This function should create an empty group with name @var{group}.
30347
30348 There should be no return data.
30349
30350
30351 @item (nnchoke-request-expire-articles ARTICLES &optional GROUP SERVER FORCE)
30352
30353 This function should run the expiry process on all articles in the
30354 @var{articles} range (which is currently a simple list of article
30355 numbers.)  It is left up to the back end to decide how old articles
30356 should be before they are removed by this function.  If @var{force} is
30357 non-@code{nil}, all @var{articles} should be deleted, no matter how new
30358 they are.
30359
30360 This function should return a list of articles that it did not/was not
30361 able to delete.
30362
30363 There should be no result data returned.
30364
30365
30366 @item (nnchoke-request-move-article ARTICLE GROUP SERVER ACCEPT-FORM &optional LAST)
30367
30368 This function should move @var{article} (which is a number) from
30369 @var{group} by calling @var{accept-form}.
30370
30371 This function should ready the article in question for moving by
30372 removing any header lines it has added to the article, and generally
30373 should ``tidy up'' the article.  Then it should @code{eval}
30374 @var{accept-form} in the buffer where the ``tidy'' article is.  This
30375 will do the actual copying.  If this @code{eval} returns a
30376 non-@code{nil} value, the article should be removed.
30377
30378 If @var{last} is @code{nil}, that means that there is a high likelihood
30379 that there will be more requests issued shortly, so that allows some
30380 optimizations.
30381
30382 The function should return a cons where the @code{car} is the group name and
30383 the @code{cdr} is the article number that the article was entered as.
30384
30385 There should be no data returned.
30386
30387
30388 @item (nnchoke-request-accept-article GROUP &optional SERVER LAST)
30389
30390 This function takes the current buffer and inserts it into @var{group}.
30391 If @var{last} in @code{nil}, that means that there will be more calls to
30392 this function in short order.
30393
30394 The function should return a cons where the @code{car} is the group name and
30395 the @code{cdr} is the article number that the article was entered as.
30396
30397 The group should exist before the back end is asked to accept the
30398 article for that group.
30399
30400 There should be no data returned.
30401
30402
30403 @item (nnchoke-request-replace-article ARTICLE GROUP BUFFER)
30404
30405 This function should remove @var{article} (which is a number) from
30406 @var{group} and insert @var{buffer} there instead.
30407
30408 There should be no data returned.
30409
30410
30411 @item (nnchoke-request-delete-group GROUP FORCE &optional SERVER)
30412
30413 This function should delete @var{group}.  If @var{force}, it should
30414 really delete all the articles in the group, and then delete the group
30415 itself.  (If there is such a thing as ``the group itself''.)
30416
30417 There should be no data returned.
30418
30419
30420 @item (nnchoke-request-rename-group GROUP NEW-NAME &optional SERVER)
30421
30422 This function should rename @var{group} into @var{new-name}.  All
30423 articles in @var{group} should move to @var{new-name}.
30424
30425 There should be no data returned.
30426
30427 @end table
30428
30429
30430 @node Error Messaging
30431 @subsubsection Error Messaging
30432
30433 @findex nnheader-report
30434 @findex nnheader-get-report
30435 The back ends should use the function @code{nnheader-report} to report
30436 error conditions---they should not raise errors when they aren't able to
30437 perform a request.  The first argument to this function is the back end
30438 symbol, and the rest are interpreted as arguments to @code{format} if
30439 there are multiple of them, or just a string if there is one of them.
30440 This function must always returns @code{nil}.
30441
30442 @lisp
30443 (nnheader-report 'nnchoke "You did something totally bogus")
30444
30445 (nnheader-report 'nnchoke "Could not request group %s" group)
30446 @end lisp
30447
30448 Gnus, in turn, will call @code{nnheader-get-report} when it gets a
30449 @code{nil} back from a server, and this function returns the most
30450 recently reported message for the back end in question.  This function
30451 takes one argument---the server symbol.
30452
30453 Internally, these functions access @var{back-end}@code{-status-string},
30454 so the @code{nnchoke} back end will have its error message stored in
30455 @code{nnchoke-status-string}.
30456
30457
30458 @node Writing New Back Ends
30459 @subsubsection Writing New Back Ends
30460
30461 Many back ends are quite similar.  @code{nnml} is just like
30462 @code{nnspool}, but it allows you to edit the articles on the server.
30463 @code{nnmh} is just like @code{nnml}, but it doesn't use an active file,
30464 and it doesn't maintain overview databases.  @code{nndir} is just like
30465 @code{nnml}, but it has no concept of ``groups'', and it doesn't allow
30466 editing articles.
30467
30468 It would make sense if it were possible to ``inherit'' functions from
30469 back ends when writing new back ends.  And, indeed, you can do that if you
30470 want to.  (You don't have to if you don't want to, of course.)
30471
30472 All the back ends declare their public variables and functions by using a
30473 package called @code{nnoo}.
30474
30475 To inherit functions from other back ends (and allow other back ends to
30476 inherit functions from the current back end), you should use the
30477 following macros:
30478
30479 @table @code
30480
30481 @item nnoo-declare
30482 This macro declares the first parameter to be a child of the subsequent
30483 parameters.  For instance:
30484
30485 @lisp
30486 (nnoo-declare nndir
30487   nnml nnmh)
30488 @end lisp
30489
30490 @code{nndir} has declared here that it intends to inherit functions from
30491 both @code{nnml} and @code{nnmh}.
30492
30493 @item defvoo
30494 This macro is equivalent to @code{defvar}, but registers the variable as
30495 a public server variable.  Most state-oriented variables should be
30496 declared with @code{defvoo} instead of @code{defvar}.
30497
30498 In addition to the normal @code{defvar} parameters, it takes a list of
30499 variables in the parent back ends to map the variable to when executing
30500 a function in those back ends.
30501
30502 @lisp
30503 (defvoo nndir-directory nil
30504   "Where nndir will look for groups."
30505   nnml-current-directory nnmh-current-directory)
30506 @end lisp
30507
30508 This means that @code{nnml-current-directory} will be set to
30509 @code{nndir-directory} when an @code{nnml} function is called on behalf
30510 of @code{nndir}.  (The same with @code{nnmh}.)
30511
30512 @item nnoo-define-basics
30513 This macro defines some common functions that almost all back ends should
30514 have.
30515
30516 @lisp
30517 (nnoo-define-basics nndir)
30518 @end lisp
30519
30520 @item deffoo
30521 This macro is just like @code{defun} and takes the same parameters.  In
30522 addition to doing the normal @code{defun} things, it registers the
30523 function as being public so that other back ends can inherit it.
30524
30525 @item nnoo-map-functions
30526 This macro allows mapping of functions from the current back end to
30527 functions from the parent back ends.
30528
30529 @lisp
30530 (nnoo-map-functions nndir
30531   (nnml-retrieve-headers 0 nndir-current-group 0 0)
30532   (nnmh-request-article 0 nndir-current-group 0 0))
30533 @end lisp
30534
30535 This means that when @code{nndir-retrieve-headers} is called, the first,
30536 third, and fourth parameters will be passed on to
30537 @code{nnml-retrieve-headers}, while the second parameter is set to the
30538 value of @code{nndir-current-group}.
30539
30540 @item nnoo-import
30541 This macro allows importing functions from back ends.  It should be the
30542 last thing in the source file, since it will only define functions that
30543 haven't already been defined.
30544
30545 @lisp
30546 (nnoo-import nndir
30547   (nnmh
30548    nnmh-request-list
30549    nnmh-request-newgroups)
30550   (nnml))
30551 @end lisp
30552
30553 This means that calls to @code{nndir-request-list} should just be passed
30554 on to @code{nnmh-request-list}, while all public functions from
30555 @code{nnml} that haven't been defined in @code{nndir} yet should be
30556 defined now.
30557
30558 @end table
30559
30560 Below is a slightly shortened version of the @code{nndir} back end.
30561
30562 @lisp
30563 ;;; @r{nndir.el --- single directory newsgroup access for Gnus}
30564 ;; @r{Copyright (C) 1995,1996 Free Software Foundation, Inc.}
30565
30566 ;;; @r{Code:}
30567
30568 (require 'nnheader)
30569 (require 'nnmh)
30570 (require 'nnml)
30571 (require 'nnoo)
30572 (eval-when-compile (require 'cl))
30573
30574 (nnoo-declare nndir
30575   nnml nnmh)
30576
30577 (defvoo nndir-directory nil
30578   "Where nndir will look for groups."
30579   nnml-current-directory nnmh-current-directory)
30580
30581 (defvoo nndir-nov-is-evil nil
30582   "*Non-nil means that nndir will never retrieve NOV headers."
30583   nnml-nov-is-evil)
30584
30585 (defvoo nndir-current-group ""
30586   nil
30587   nnml-current-group nnmh-current-group)
30588 (defvoo nndir-top-directory nil nil nnml-directory nnmh-directory)
30589 (defvoo nndir-get-new-mail nil nil nnml-get-new-mail nnmh-get-new-mail)
30590
30591 (defvoo nndir-status-string "" nil nnmh-status-string)
30592 (defconst nndir-version "nndir 1.0")
30593
30594 ;;; @r{Interface functions.}
30595
30596 (nnoo-define-basics nndir)
30597
30598 (deffoo nndir-open-server (server &optional defs)
30599   (setq nndir-directory
30600         (or (cadr (assq 'nndir-directory defs))
30601             server))
30602   (unless (assq 'nndir-directory defs)
30603     (push `(nndir-directory ,server) defs))
30604   (push `(nndir-current-group
30605           ,(file-name-nondirectory
30606             (directory-file-name nndir-directory)))
30607         defs)
30608   (push `(nndir-top-directory
30609           ,(file-name-directory (directory-file-name nndir-directory)))
30610         defs)
30611   (nnoo-change-server 'nndir server defs))
30612
30613 (nnoo-map-functions nndir
30614   (nnml-retrieve-headers 0 nndir-current-group 0 0)
30615   (nnmh-request-article 0 nndir-current-group 0 0)
30616   (nnmh-request-group nndir-current-group 0 0)
30617   (nnmh-close-group nndir-current-group 0))
30618
30619 (nnoo-import nndir
30620   (nnmh
30621    nnmh-status-message
30622    nnmh-request-list
30623    nnmh-request-newgroups))
30624
30625 (provide 'nndir)
30626 @end lisp
30627
30628
30629 @node Hooking New Back Ends Into Gnus
30630 @subsubsection Hooking New Back Ends Into Gnus
30631
30632 @vindex gnus-valid-select-methods
30633 @findex gnus-declare-backend
30634 Having Gnus start using your new back end is rather easy---you just
30635 declare it with the @code{gnus-declare-backend} functions.  This will
30636 enter the back end into the @code{gnus-valid-select-methods} variable.
30637
30638 @code{gnus-declare-backend} takes two parameters---the back end name and
30639 an arbitrary number of @dfn{abilities}.
30640
30641 Here's an example:
30642
30643 @lisp
30644 (gnus-declare-backend "nnchoke" 'mail 'respool 'address)
30645 @end lisp
30646
30647 The above line would then go in the @file{nnchoke.el} file.
30648
30649 The abilities can be:
30650
30651 @table @code
30652 @item mail
30653 This is a mailish back end---followups should (probably) go via mail.
30654 @item post
30655 This is a newsish back end---followups should (probably) go via news.
30656 @item post-mail
30657 This back end supports both mail and news.
30658 @item none
30659 This is neither a post nor mail back end---it's something completely
30660 different.
30661 @item respool
30662 It supports respooling---or rather, it is able to modify its source
30663 articles and groups.
30664 @item address
30665 The name of the server should be in the virtual server name.  This is
30666 true for almost all back ends.
30667 @item prompt-address
30668 The user should be prompted for an address when doing commands like
30669 @kbd{B} in the group buffer.  This is true for back ends like
30670 @code{nntp}, but not @code{nnmbox}, for instance.
30671 @end table
30672
30673
30674 @node Mail-like Back Ends
30675 @subsubsection Mail-like Back Ends
30676
30677 One of the things that separate the mail back ends from the rest of the
30678 back ends is the heavy dependence by most of the mail back ends on
30679 common functions in @file{nnmail.el}.  For instance, here's the
30680 definition of @code{nnml-request-scan}:
30681
30682 @lisp
30683 (deffoo nnml-request-scan (&optional group server)
30684   (setq nnml-article-file-alist nil)
30685   (nnmail-get-new-mail 'nnml 'nnml-save-nov nnml-directory group))
30686 @end lisp
30687
30688 It simply calls @code{nnmail-get-new-mail} with a few parameters,
30689 and @code{nnmail} takes care of all the moving and splitting of the
30690 mail.
30691
30692 This function takes four parameters.
30693
30694 @table @var
30695 @item method
30696 This should be a symbol to designate which back end is responsible for
30697 the call.
30698
30699 @item exit-function
30700 This function should be called after the splitting has been performed.
30701
30702 @item temp-directory
30703 Where the temporary files should be stored.
30704
30705 @item group
30706 This optional argument should be a group name if the splitting is to be
30707 performed for one group only.
30708 @end table
30709
30710 @code{nnmail-get-new-mail} will call @var{back-end}@code{-save-mail} to
30711 save each article.  @var{back-end}@code{-active-number} will be called to
30712 find the article number assigned to this article.
30713
30714 The function also uses the following variables:
30715 @var{back-end}@code{-get-new-mail} (to see whether to get new mail for
30716 this back end); and @var{back-end}@code{-group-alist} and
30717 @var{back-end}@code{-active-file} to generate the new active file.
30718 @var{back-end}@code{-group-alist} should be a group-active alist, like
30719 this:
30720
30721 @example
30722 (("a-group" (1 . 10))
30723  ("some-group" (34 . 39)))
30724 @end example
30725
30726
30727 @node Score File Syntax
30728 @subsection Score File Syntax
30729
30730 Score files are meant to be easily parseable, but yet extremely
30731 mallable.  It was decided that something that had the same read syntax
30732 as an Emacs Lisp list would fit that spec.
30733
30734 Here's a typical score file:
30735
30736 @lisp
30737 (("summary"
30738   ("win95" -10000 nil s)
30739   ("Gnus"))
30740  ("from"
30741   ("Lars" -1000))
30742  (mark -100))
30743 @end lisp
30744
30745 BNF definition of a score file:
30746
30747 @example
30748 score-file      = "" / "(" *element ")"
30749 element         = rule / atom
30750 rule            = string-rule / number-rule / date-rule
30751 string-rule     = "(" quote string-header quote space *string-match ")"
30752 number-rule     = "(" quote number-header quote space *number-match ")"
30753 date-rule       = "(" quote date-header quote space *date-match ")"
30754 quote           = <ascii 34>
30755 string-header   = "subject" / "from" / "references" / "message-id" /
30756                   "xref" / "body" / "head" / "all" / "followup"
30757 number-header   = "lines" / "chars"
30758 date-header     = "date"
30759 string-match    = "(" quote <string> quote [ "" / [ space score [ "" /
30760                   space date [ "" / [ space string-match-t ] ] ] ] ] ")"
30761 score           = "nil" / <integer>
30762 date            = "nil" / <natural number>
30763 string-match-t  = "nil" / "s" / "substring" / "S" / "Substring" /
30764                   "r" / "regex" / "R" / "Regex" /
30765                   "e" / "exact" / "E" / "Exact" /
30766                   "f" / "fuzzy" / "F" / "Fuzzy"
30767 number-match    = "(" <integer> [ "" / [ space score [ "" /
30768                   space date [ "" / [ space number-match-t ] ] ] ] ] ")"
30769 number-match-t  = "nil" / "=" / "<" / ">" / ">=" / "<="
30770 date-match      = "(" quote <string> quote [ "" / [ space score [ "" /
30771                   space date [ "" / [ space date-match-t ] ] ] ] ")"
30772 date-match-t    = "nil" / "at" / "before" / "after"
30773 atom            = "(" [ required-atom / optional-atom ] ")"
30774 required-atom   = mark / expunge / mark-and-expunge / files /
30775                   exclude-files / read-only / touched
30776 optional-atom   = adapt / local / eval
30777 mark            = "mark" space nil-or-number
30778 nil-or-number   = "nil" / <integer>
30779 expunge         = "expunge" space nil-or-number
30780 mark-and-expunge = "mark-and-expunge" space nil-or-number
30781 files           = "files" *[ space <string> ]
30782 exclude-files   = "exclude-files" *[ space <string> ]
30783 read-only       = "read-only" [ space "nil" / space "t" ]
30784 adapt        = "adapt" [ space "ignore" / space "t" / space adapt-rule ]
30785 adapt-rule      = "(" *[ <string> *[ "(" <string> <integer> ")" ] ")"
30786 local           = "local" *[ space "(" <string> space <form> ")" ]
30787 eval            = "eval" space <form>
30788 space           = *[ " " / <TAB> / <NEWLINE> ]
30789 @end example
30790
30791 Any unrecognized elements in a score file should be ignored, but not
30792 discarded.
30793
30794 As you can see, white space is needed, but the type and amount of white
30795 space is irrelevant.  This means that formatting of the score file is
30796 left up to the programmer---if it's simpler to just spew it all out on
30797 one looong line, then that's ok.
30798
30799 The meaning of the various atoms are explained elsewhere in this
30800 manual (@pxref{Score File Format}).
30801
30802
30803 @node Headers
30804 @subsection Headers
30805
30806 Internally Gnus uses a format for storing article headers that
30807 corresponds to the @acronym{NOV} format in a mysterious fashion.  One could
30808 almost suspect that the author looked at the @acronym{NOV} specification and
30809 just shamelessly @emph{stole} the entire thing, and one would be right.
30810
30811 @dfn{Header} is a severely overloaded term.  ``Header'' is used in
30812 RFC 1036 to talk about lines in the head of an article (e.g.,
30813 @code{From}).  It is used by many people as a synonym for
30814 ``head''---``the header and the body''.  (That should be avoided, in my
30815 opinion.)  And Gnus uses a format internally that it calls ``header'',
30816 which is what I'm talking about here.  This is a 9-element vector,
30817 basically, with each header (ouch) having one slot.
30818
30819 These slots are, in order: @code{number}, @code{subject}, @code{from},
30820 @code{date}, @code{id}, @code{references}, @code{chars}, @code{lines},
30821 @code{xref}, and @code{extra}.  There are macros for accessing and
30822 setting these slots---they all have predictable names beginning with
30823 @code{mail-header-} and @code{mail-header-set-}, respectively.
30824
30825 All these slots contain strings, except the @code{extra} slot, which
30826 contains an alist of header/value pairs (@pxref{To From Newsgroups}).
30827
30828
30829 @node Ranges
30830 @subsection Ranges
30831
30832 @sc{gnus} introduced a concept that I found so useful that I've started
30833 using it a lot and have elaborated on it greatly.
30834
30835 The question is simple: If you have a large amount of objects that are
30836 identified by numbers (say, articles, to take a @emph{wild} example)
30837 that you want to qualify as being ``included'', a normal sequence isn't
30838 very useful.  (A 200,000 length sequence is a bit long-winded.)
30839
30840 The solution is as simple as the question: You just collapse the
30841 sequence.
30842
30843 @example
30844 (1 2 3 4 5 6 10 11 12)
30845 @end example
30846
30847 is transformed into
30848
30849 @example
30850 ((1 . 6) (10 . 12))
30851 @end example
30852
30853 To avoid having those nasty @samp{(13 . 13)} elements to denote a
30854 lonesome object, a @samp{13} is a valid element:
30855
30856 @example
30857 ((1 . 6) 7 (10 . 12))
30858 @end example
30859
30860 This means that comparing two ranges to find out whether they are equal
30861 is slightly tricky:
30862
30863 @example
30864 ((1 . 5) 7 8 (10 . 12))
30865 @end example
30866
30867 and
30868
30869 @example
30870 ((1 . 5) (7 . 8) (10 . 12))
30871 @end example
30872
30873 are equal.  In fact, any non-descending list is a range:
30874
30875 @example
30876 (1 2 3 4 5)
30877 @end example
30878
30879 is a perfectly valid range, although a pretty long-winded one.  This is
30880 also valid:
30881
30882 @example
30883 (1 . 5)
30884 @end example
30885
30886 and is equal to the previous range.
30887
30888 Here's a BNF definition of ranges.  Of course, one must remember the
30889 semantic requirement that the numbers are non-descending.  (Any number
30890 of repetition of the same number is allowed, but apt to disappear in
30891 range handling.)
30892
30893 @example
30894 range           = simple-range / normal-range
30895 simple-range    = "(" number " . " number ")"
30896 normal-range    = "(" start-contents ")"
30897 contents        = "" / simple-range *[ " " contents ] /
30898                   number *[ " " contents ]
30899 @end example
30900
30901 Gnus currently uses ranges to keep track of read articles and article
30902 marks.  I plan on implementing a number of range operators in C if The
30903 Powers That Be are willing to let me.  (I haven't asked yet, because I
30904 need to do some more thinking on what operators I need to make life
30905 totally range-based without ever having to convert back to normal
30906 sequences.)
30907
30908
30909 @node Group Info
30910 @subsection Group Info
30911
30912 Gnus stores all permanent info on groups in a @dfn{group info} list.
30913 This list is from three to six elements (or more) long and exhaustively
30914 describes the group.
30915
30916 Here are two example group infos; one is a very simple group while the
30917 second is a more complex one:
30918
30919 @example
30920 ("no.group" 5 ((1 . 54324)))
30921
30922 ("nnml:my.mail" 3 ((1 . 5) 9 (20 . 55))
30923                 ((tick (15 . 19)) (replied 3 6 (19 . 3)))
30924                 (nnml "")
30925                 ((auto-expire . t) (to-address . "ding@@gnus.org")))
30926 @end example
30927
30928 The first element is the @dfn{group name}---as Gnus knows the group,
30929 anyway.  The second element is the @dfn{subscription level}, which
30930 normally is a small integer.  (It can also be the @dfn{rank}, which is a
30931 cons cell where the @code{car} is the level and the @code{cdr} is the
30932 score.)  The third element is a list of ranges of read articles.  The
30933 fourth element is a list of lists of article marks of various kinds.
30934 The fifth element is the select method (or virtual server, if you like).
30935 The sixth element is a list of @dfn{group parameters}, which is what
30936 this section is about.
30937
30938 Any of the last three elements may be missing if they are not required.
30939 In fact, the vast majority of groups will normally only have the first
30940 three elements, which saves quite a lot of cons cells.
30941
30942 Here's a BNF definition of the group info format:
30943
30944 @example
30945 info          = "(" group space ralevel space read
30946                 [ "" / [ space marks-list [ "" / [ space method [ "" /
30947                 space parameters ] ] ] ] ] ")"
30948 group         = quote <string> quote
30949 ralevel       = rank / level
30950 level         = <integer in the range of 1 to inf>
30951 rank          = "(" level "." score ")"
30952 score         = <integer in the range of 1 to inf>
30953 read          = range
30954 marks-lists   = nil / "(" *marks ")"
30955 marks         = "(" <string> range ")"
30956 method        = "(" <string> *elisp-forms ")"
30957 parameters    = "(" *elisp-forms ")"
30958 @end example
30959
30960 Actually that @samp{marks} rule is a fib.  A @samp{marks} is a
30961 @samp{<string>} consed on to a @samp{range}, but that's a bitch to say
30962 in pseudo-BNF.
30963
30964 If you have a Gnus info and want to access the elements, Gnus offers a
30965 series of macros for getting/setting these elements.
30966
30967 @table @code
30968 @item gnus-info-group
30969 @itemx gnus-info-set-group
30970 @findex gnus-info-group
30971 @findex gnus-info-set-group
30972 Get/set the group name.
30973
30974 @item gnus-info-rank
30975 @itemx gnus-info-set-rank
30976 @findex gnus-info-rank
30977 @findex gnus-info-set-rank
30978 Get/set the group rank (@pxref{Group Score}).
30979
30980 @item gnus-info-level
30981 @itemx gnus-info-set-level
30982 @findex gnus-info-level
30983 @findex gnus-info-set-level
30984 Get/set the group level.
30985
30986 @item gnus-info-score
30987 @itemx gnus-info-set-score
30988 @findex gnus-info-score
30989 @findex gnus-info-set-score
30990 Get/set the group score (@pxref{Group Score}).
30991
30992 @item gnus-info-read
30993 @itemx gnus-info-set-read
30994 @findex gnus-info-read
30995 @findex gnus-info-set-read
30996 Get/set the ranges of read articles.
30997
30998 @item gnus-info-marks
30999 @itemx gnus-info-set-marks
31000 @findex gnus-info-marks
31001 @findex gnus-info-set-marks
31002 Get/set the lists of ranges of marked articles.
31003
31004 @item gnus-info-method
31005 @itemx gnus-info-set-method
31006 @findex gnus-info-method
31007 @findex gnus-info-set-method
31008 Get/set the group select method.
31009
31010 @item gnus-info-params
31011 @itemx gnus-info-set-params
31012 @findex gnus-info-params
31013 @findex gnus-info-set-params
31014 Get/set the group parameters.
31015 @end table
31016
31017 All the getter functions take one parameter---the info list.  The setter
31018 functions take two parameters---the info list and the new value.
31019
31020 The last three elements in the group info aren't mandatory, so it may be
31021 necessary to extend the group info before setting the element.  If this
31022 is necessary, you can just pass on a non-@code{nil} third parameter to
31023 the three final setter functions to have this happen automatically.
31024
31025
31026 @node Extended Interactive
31027 @subsection Extended Interactive
31028 @cindex interactive
31029 @findex gnus-interactive
31030
31031 Gnus extends the standard Emacs @code{interactive} specification
31032 slightly to allow easy use of the symbolic prefix (@pxref{Symbolic
31033 Prefixes}).  Here's an example of how this is used:
31034
31035 @lisp
31036 (defun gnus-summary-increase-score (&optional score symp)
31037   (interactive (gnus-interactive "P\ny"))
31038   ...
31039   )
31040 @end lisp
31041
31042 The best thing to do would have been to implement
31043 @code{gnus-interactive} as a macro which would have returned an
31044 @code{interactive} form, but this isn't possible since Emacs checks
31045 whether a function is interactive or not by simply doing an @code{assq}
31046 on the lambda form.  So, instead we have @code{gnus-interactive}
31047 function that takes a string and returns values that are usable to
31048 @code{interactive}.
31049
31050 This function accepts (almost) all normal @code{interactive} specs, but
31051 adds a few more.
31052
31053 @table @samp
31054 @item y
31055 @vindex gnus-current-prefix-symbol
31056 The current symbolic prefix---the @code{gnus-current-prefix-symbol}
31057 variable.
31058
31059 @item Y
31060 @vindex gnus-current-prefix-symbols
31061 A list of the current symbolic prefixes---the
31062 @code{gnus-current-prefix-symbol} variable.
31063
31064 @item A
31065 The current article number---the @code{gnus-summary-article-number}
31066 function.
31067
31068 @item H
31069 The current article header---the @code{gnus-summary-article-header}
31070 function.
31071
31072 @item g
31073 The current group name---the @code{gnus-group-group-name}
31074 function.
31075
31076 @end table
31077
31078
31079 @node Emacs/XEmacs Code
31080 @subsection Emacs/XEmacs Code
31081 @cindex XEmacs
31082 @cindex Emacsen
31083
31084 While Gnus runs under Emacs, XEmacs and Mule, I decided that one of the
31085 platforms must be the primary one.  I chose Emacs.  Not because I don't
31086 like XEmacs or Mule, but because it comes first alphabetically.
31087
31088 This means that Gnus will byte-compile under Emacs with nary a warning,
31089 while XEmacs will pump out gigabytes of warnings while byte-compiling.
31090 As I use byte-compilation warnings to help me root out trivial errors in
31091 Gnus, that's very useful.
31092
31093 I've also consistently used Emacs function interfaces, but have used
31094 Gnusey aliases for the functions.  To take an example:  Emacs defines a
31095 @code{run-at-time} function while XEmacs defines a @code{start-itimer}
31096 function.  I then define a function called @code{gnus-run-at-time} that
31097 takes the same parameters as the Emacs @code{run-at-time}.  When running
31098 Gnus under Emacs, the former function is just an alias for the latter.
31099 However, when running under XEmacs, the former is an alias for the
31100 following function:
31101
31102 @lisp
31103 (defun gnus-xmas-run-at-time (time repeat function &rest args)
31104   (start-itimer
31105    "gnus-run-at-time"
31106    `(lambda ()
31107       (,function ,@@args))
31108    time repeat))
31109 @end lisp
31110
31111 This sort of thing has been done for bunches of functions.  Gnus does
31112 not redefine any native Emacs functions while running under XEmacs---it
31113 does this @code{defalias} thing with Gnus equivalents instead.  Cleaner
31114 all over.
31115
31116 In the cases where the XEmacs function interface was obviously cleaner,
31117 I used it instead.  For example @code{gnus-region-active-p} is an alias
31118 for @code{region-active-p} in XEmacs, whereas in Emacs it is a function.
31119
31120 Of course, I could have chosen XEmacs as my native platform and done
31121 mapping functions the other way around.  But I didn't.  The performance
31122 hit these indirections impose on Gnus under XEmacs should be slight.
31123
31124
31125 @node Various File Formats
31126 @subsection Various File Formats
31127
31128 @menu
31129 * Active File Format::          Information on articles and groups available.
31130 * Newsgroups File Format::      Group descriptions.
31131 @end menu
31132
31133
31134 @node Active File Format
31135 @subsubsection Active File Format
31136
31137 The active file lists all groups available on the server in
31138 question.  It also lists the highest and lowest current article numbers
31139 in each group.
31140
31141 Here's an excerpt from a typical active file:
31142
31143 @example
31144 soc.motss 296030 293865 y
31145 alt.binaries.pictures.fractals 3922 3913 n
31146 comp.sources.unix 1605 1593 m
31147 comp.binaries.ibm.pc 5097 5089 y
31148 no.general 1000 900 y
31149 @end example
31150
31151 Here's a pseudo-BNF definition of this file:
31152
31153 @example
31154 active      = *group-line
31155 group-line  = group spc high-number spc low-number spc flag <NEWLINE>
31156 group       = <non-white-space string>
31157 spc         = " "
31158 high-number = <non-negative integer>
31159 low-number  = <positive integer>
31160 flag        = "y" / "n" / "m" / "j" / "x" / "=" group
31161 @end example
31162
31163 For a full description of this file, see the manual pages for
31164 @samp{innd}, in particular @samp{active(5)}.
31165
31166
31167 @node Newsgroups File Format
31168 @subsubsection Newsgroups File Format
31169
31170 The newsgroups file lists groups along with their descriptions.  Not all
31171 groups on the server have to be listed,  and not all groups in the file
31172 have to exist on the server.  The file is meant purely as information to
31173 the user.
31174
31175 The format is quite simple; a group name, a tab, and the description.
31176 Here's the definition:
31177
31178 @example
31179 newsgroups    = *line
31180 line          = group tab description <NEWLINE>
31181 group         = <non-white-space string>
31182 tab           = <TAB>
31183 description   = <string>
31184 @end example
31185
31186
31187 @page
31188 @node Emacs for Heathens
31189 @section Emacs for Heathens
31190
31191 Believe it or not, but some people who use Gnus haven't really used
31192 Emacs much before they embarked on their journey on the Gnus Love Boat.
31193 If you are one of those unfortunates whom ``@kbd{C-M-a}'', ``kill the
31194 region'', and ``set @code{gnus-flargblossen} to an alist where the key
31195 is a regexp that is used for matching on the group name'' are magical
31196 phrases with little or no meaning, then this appendix is for you.  If
31197 you are already familiar with Emacs, just ignore this and go fondle your
31198 cat instead.
31199
31200 @menu
31201 * Keystrokes::                  Entering text and executing commands.
31202 * Emacs Lisp::                  The built-in Emacs programming language.
31203 @end menu
31204
31205
31206 @node Keystrokes
31207 @subsection Keystrokes
31208
31209 @itemize @bullet
31210 @item
31211 Q: What is an experienced Emacs user?
31212
31213 @item
31214 A: A person who wishes that the terminal had pedals.
31215 @end itemize
31216
31217 Yes, when you use Emacs, you are apt to use the control key, the shift
31218 key and the meta key a lot.  This is very annoying to some people
31219 (notably @code{vi}le users), and the rest of us just love the hell out
31220 of it.  Just give up and submit.  Emacs really does stand for
31221 ``Escape-Meta-Alt-Control-Shift'', and not ``Editing Macros'', as you
31222 may have heard from other disreputable sources (like the Emacs author).
31223
31224 The shift keys are normally located near your pinky fingers, and are
31225 normally used to get capital letters and stuff.  You probably use it all
31226 the time.  The control key is normally marked ``CTRL'' or something like
31227 that.  The meta key is, funnily enough, never marked as such on any
31228 keyboard.  The one I'm currently at has a key that's marked ``Alt'',
31229 which is the meta key on this keyboard.  It's usually located somewhere
31230 to the left hand side of the keyboard, usually on the bottom row.
31231
31232 Now, us Emacs people don't say ``press the meta-control-m key'',
31233 because that's just too inconvenient.  We say ``press the @kbd{C-M-m}
31234 key''.  @kbd{M-} is the prefix that means ``meta'' and ``C-'' is the
31235 prefix that means ``control''.  So ``press @kbd{C-k}'' means ``press
31236 down the control key, and hold it down while you press @kbd{k}''.
31237 ``Press @kbd{C-M-k}'' means ``press down and hold down the meta key and
31238 the control key and then press @kbd{k}''.  Simple, ay?
31239
31240 This is somewhat complicated by the fact that not all keyboards have a
31241 meta key.  In that case you can use the ``escape'' key.  Then @kbd{M-k}
31242 means ``press escape, release escape, press @kbd{k}''.  That's much more
31243 work than if you have a meta key, so if that's the case, I respectfully
31244 suggest you get a real keyboard with a meta key.  You can't live without
31245 it.
31246
31247
31248
31249 @node Emacs Lisp
31250 @subsection Emacs Lisp
31251
31252 Emacs is the King of Editors because it's really a Lisp interpreter.
31253 Each and every key you tap runs some Emacs Lisp code snippet, and since
31254 Emacs Lisp is an interpreted language, that means that you can configure
31255 any key to run any arbitrary code.  You just, like, do it.
31256
31257 Gnus is written in Emacs Lisp, and is run as a bunch of interpreted
31258 functions.  (These are byte-compiled for speed, but it's still
31259 interpreted.)  If you decide that you don't like the way Gnus does
31260 certain things, it's trivial to have it do something a different way.
31261 (Well, at least if you know how to write Lisp code.)  However, that's
31262 beyond the scope of this manual, so we are simply going to talk about
31263 some common constructs that you normally use in your @file{~/.gnus.el}
31264 file to customize Gnus.  (You can also use the @file{~/.emacs} file, but
31265 in order to set things of Gnus up, it is much better to use the
31266 @file{~/.gnus.el} file, @xref{Startup Files}.)
31267
31268 If you want to set the variable @code{gnus-florgbnize} to four (4), you
31269 write the following:
31270
31271 @lisp
31272 (setq gnus-florgbnize 4)
31273 @end lisp
31274
31275 This function (really ``special form'') @code{setq} is the one that can
31276 set a variable to some value.  This is really all you need to know.  Now
31277 you can go and fill your @file{~/.gnus.el} file with lots of these to
31278 change how Gnus works.
31279
31280 If you have put that thing in your @file{~/.gnus.el} file, it will be
31281 read and @code{eval}ed (which is Lisp-ese for ``run'') the next time you
31282 start Gnus.  If you want to change the variable right away, simply say
31283 @kbd{C-x C-e} after the closing parenthesis.  That will @code{eval} the
31284 previous ``form'', which is a simple @code{setq} statement here.
31285
31286 Go ahead---just try it, if you're located at your Emacs.  After you
31287 @kbd{C-x C-e}, you will see @samp{4} appear in the echo area, which
31288 is the return value of the form you @code{eval}ed.
31289
31290 Some pitfalls:
31291
31292 If the manual says ``set @code{gnus-read-active-file} to @code{some}'',
31293 that means:
31294
31295 @lisp
31296 (setq gnus-read-active-file 'some)
31297 @end lisp
31298
31299 On the other hand, if the manual says ``set @code{gnus-nntp-server} to
31300 @samp{nntp.ifi.uio.no}'', that means:
31301
31302 @lisp
31303 (setq gnus-nntp-server "nntp.ifi.uio.no")
31304 @end lisp
31305
31306 So be careful not to mix up strings (the latter) with symbols (the
31307 former).  The manual is unambiguous, but it can be confusing.
31308
31309 @page
31310 @include gnus-faq.texi
31311
31312 @node GNU Free Documentation License
31313 @chapter GNU Free Documentation License
31314 @include doclicense.texi
31315
31316 @node Index
31317 @chapter Index
31318 @printindex cp
31319
31320 @node Key Index
31321 @chapter Key Index
31322 @printindex ky
31323
31324 @bye
31325
31326 @iftex
31327 @iflatex
31328 \end{document}
31329 @end iflatex
31330 @end iftex
31331
31332 @c Local Variables:
31333 @c mode: texinfo
31334 @c coding: iso-8859-1
31335 @c End:
31336
31337 @ignore
31338    arch-tag: c9fa47e7-78ca-4681-bda9-9fef45d1c819
31339 @end ignore